Private
Public Access
1
0
Files
rowsandall/static/js/bokeh-widgets-0.12.3.min.js
sanderroosendaal 3eed3cc3e7 Uploading files
2016-10-30 17:39:32 +01:00

224 lines
283 KiB
JavaScript

!function(){var define=void 0;return function(e,t,i){if("undefined"==typeof Bokeh)throw new Error("Cannot find Bokeh. You have to load it prior to loading plugins.");var n=Bokeh._;for(var o in e)Bokeh.require.modules[o]=e[o];for(var s=0;s<i.length;s++){var r=Bokeh.require(i[s]);n.isObject(r.models)&&Bokeh.Models.register_locations(r.models),n.extend(Bokeh,n.omit(r,"models"))}}({"models/widgets/abstract_button":[function(e,t,i){var n,o,s,r,a,l,u=function(e,t){function i(){this.constructor=e}for(var n in t)c.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},c={}.hasOwnProperty;a=e("../../core/properties"),r=e("../../core/build_views"),s=e("./widget"),l=e("./button_template"),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.events={click:"change_input"},t.prototype.template=l,t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.icon_views={},this.listenTo(this.model,"change",this.render),this.render()},t.prototype.render=function(){var e,i,n,o,s,a;if(t.__super__.render.call(this),n=this.model.icon,null!=n){r(this.icon_views,[n]),s=this.icon_views;for(o in s)c.call(s,o)&&(a=s[o],a.$el.detach())}return this.$el.empty(),i=this.template(this.model.attributes),this.$el.append(i),e=this.$el.find("button"),null!=n&&e.prepend(this.icon_views[n.id].$el),e.prop("disabled",this.model.disabled),this},t.prototype.change_input=function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0},t}(s.View),n=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.type="AbstractButton",t.prototype.default_view=o,t.define({callback:[a.Instance],label:[a.String,"Button"],icon:[a.Instance],button_type:[a.String,"default"]}),t}(s.Model),t.exports={Model:n,View:o}},{"../../core/build_views":"core/build_views","../../core/properties":"core/properties","./button_template":"models/widgets/button_template","./widget":"models/widgets/widget"}],"models/widgets/abstract_icon":[function(e,t,i){var n,o,s,r=function(e,t){function i(){this.constructor=e}for(var n in t)a.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},a={}.hasOwnProperty;s=e("underscore"),o=e("./widget"),n=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return r(t,e),t.prototype.type="AbstractIcon",t}(o.Model),t.exports={Model:n}},{"./widget":"models/widgets/widget",underscore:"underscore"}],"models/widgets/autocomplete_input":[function(e,t,i){var n,o,s,r,a,l,u=function(e,t){function i(){this.constructor=e}for(var n in t)c.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},c={}.hasOwnProperty;a=e("underscore"),n=e("jquery-ui/autocomplete"),r=e("./text_input"),l=e("../../core/properties"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=this.$el.find("input"),e.autocomplete({source:this.model.completions}),e.autocomplete("widget").addClass("bk-autocomplete-input"),this},t}(r.View),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.type="AutocompleteInput",t.prototype.default_view=s,t.define({completions:[l.Array,[]]}),t}(r.Model),t.exports={View:s,Model:o}},{"../../core/properties":"core/properties","./text_input":"models/widgets/text_input","jquery-ui/autocomplete":"jquery-ui/autocomplete",underscore:"underscore"}],"models/widgets/button":[function(e,t,i){var n,o,s,r,a,l=function(e,t){function i(){this.constructor=e}for(var n in t)u.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},u={}.hasOwnProperty;r=e("underscore"),a=e("../../core/properties"),n=e("./abstract_button"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return l(t,e),t.prototype.change_input=function(){return this.model.clicks=this.model.clicks+1,t.__super__.change_input.call(this)},t}(n.View),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return l(t,e),t.prototype.type="Button",t.prototype.default_view=s,t.define({clicks:[a.Number,0]}),t}(n.Model),t.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./abstract_button":"models/widgets/abstract_button",underscore:"underscore"}],"models/widgets/button_group_template":[function(e,t,i){t.exports=function(e){e||(e={});var t=[];return function(){(function(){t.push('<div class="bk-bs-btn-group" data-bk-bs-toggle="buttons">\n</div>\n')}).call(this)}.call(e),t.join("")}},{}],"models/widgets/button_template":[function(e,t,i){t.exports=function(e){e||(e={});var t=[],i=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?n(e):""},n=function(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};return function(){(function(){t.push('<button type="button" class="bk-bs-btn bk-bs-btn-'),t.push(i(this.button_type)),t.push('">\n '),t.push(i(this.label)),t.push("\n</button>\n")}).call(this)}.call(e),t.join("")}},{}],"models/widgets/cell_editors":[function(e,t,i){var n,o,s,r,a,l,u,c,h,d,p,f,m,g,v,_,b,y,w,k,C,x,D,S,M,R,I,P=function(e,t){function i(){this.constructor=e}for(var n in t)T.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},T={}.hasOwnProperty;R=e("underscore"),n=e("jquery"),o=e("jquery-ui/autocomplete"),s=e("jquery-ui/spinner"),I=e("../../core/properties"),r=e("../../core/bokeh_view"),m=e("../../model"),l=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.tagName="div",t.prototype.attributes={"class":"bk-cell-editor"},t.prototype.input=null,t.prototype.emptyValue=null,t.prototype.defaultValue=null,t.prototype.initialize=function(e){return this.args=e,this.model=this.args.column.editor,t.__super__.initialize.call(this),this.render()},t.prototype.render=function(){return t.__super__.render.call(this),this.$el.appendTo(this.args.container),this.$input=n(this.input),this.$el.append(this.$input),this.renderEditor(),this.disableNavigation(),this},t.prototype.renderEditor=function(){},t.prototype.disableNavigation=function(){return this.$input.keydown(function(e){return function(e){var t;switch(t=function(){return e.stopImmediatePropagation()},e.keyCode){case n.ui.keyCode.LEFT:return t();case n.ui.keyCode.RIGHT:return t();case n.ui.keyCode.UP:return t();case n.ui.keyCode.DOWN:return t();case n.ui.keyCode.PAGE_UP:return t();case n.ui.keyCode.PAGE_DOWN:return t()}}}(this))},t.prototype.destroy=function(){return this.remove()},t.prototype.focus=function(){return this.$input.focus()},t.prototype.show=function(){},t.prototype.hide=function(){},t.prototype.position=function(){},t.prototype.getValue=function(){return this.$input.val()},t.prototype.setValue=function(e){return this.$input.val(e)},t.prototype.serializeValue=function(){return this.getValue()},t.prototype.isValueChanged=function(){return!(""===this.getValue()&&null==this.defaultValue)&&this.getValue()!==this.defaultValue},t.prototype.applyValue=function(e,t){return this.args.grid.getData().setField(e.index,this.args.column.field,t)},t.prototype.loadValue=function(e){var t;return t=e[this.args.column.field],this.defaultValue=null!=t?t:this.emptyValue,this.setValue(this.defaultValue)},t.prototype.validateValue=function(e){var t;return this.args.column.validator&&(t=this.args.column.validator(e),!t.valid)?t:{valid:!0,msg:null}},t.prototype.validate=function(){return this.validateValue(this.getValue())},t}(r),a=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.type="CellEditor",t.prototype.default_view=l,t}(m),C=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.emptyValue="",t.prototype.input='<input type="text" />',t.prototype.renderEditor=function(){var e;return e=this.model.completions,R.isEmpty(e)||(this.$input.autocomplete({source:e}),this.$input.autocomplete("widget").addClass("bk-cell-editor-completion")),this.$input.focus().select()},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t}(l),k=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.type="StringEditor",t.prototype.default_view=C,t.define({completions:[I.Array,[]]}),t}(a),D=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t}(l),x=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.type="TextEditor",t.prototype.default_view=D,t}(a),w=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.input="<select />",t.prototype.renderEditor=function(){var e,t,i,o;for(o=this.model.options,e=0,t=o.length;e<t;e++)i=o[e],this.$input.append(n("<option>").attr({value:i}).text(i));return this.focus()},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input.select()},t}(l),y=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.type="SelectEditor",t.prototype.default_view=w,t.define({options:[I.Array,[]]}),t}(a),b=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t}(l),_=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.type="PercentEditor",t.prototype.default_view=b,t}(a),c=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.input='<input type="checkbox" value="true" />',t.prototype.renderEditor=function(){return this.focus()},t.prototype.loadValue=function(e){return this.defaultValue=!!e[this.args.column.field],this.$input.prop("checked",this.defaultValue)},t.prototype.serializeValue=function(){return this.$input.prop("checked")},t}(l),u=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.type="CheckboxEditor",t.prototype.default_view=c,t}(a),f=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.input='<input type="text" />',t.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.step}),this.$input.focus().select()},t.prototype.remove=function(){return this.$input.spinner("destroy"),t.__super__.remove.call(this)},t.prototype.serializeValue=function(){return parseInt(this.getValue(),10)||0},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t.prototype.validateValue=function(e){return isNaN(e)?{valid:!1,msg:"Please enter a valid integer"}:t.__super__.validateValue.call(this,e)},t}(l),p=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.type="IntEditor",t.prototype.default_view=f,t.define({step:[I.Number,1]}),t}(a),v=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.input='<input type="text" />',t.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.step}),this.$input.focus().select()},t.prototype.remove=function(){return this.$input.spinner("destroy"),t.__super__.remove.call(this)},t.prototype.serializeValue=function(){return parseFloat(this.getValue())||0},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t.prototype.validateValue=function(e){return isNaN(e)?{valid:!1,msg:"Please enter a valid number"}:t.__super__.validateValue.call(this,e)},t}(l),g=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.type="NumberEditor",t.prototype.default_view=v,t.define({step:[I.Number,.01]}),t}(a),M=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t}(l),S=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.type="TimeEditor",t.prototype.default_view=M,t}(a),d=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.emptyValue=new Date,t.prototype.input='<input type="text" />',t.prototype.renderEditor=function(){return this.calendarOpen=!1,this.$input.datepicker({showOn:"button",buttonImageOnly:!0,beforeShow:function(e){return function(){return e.calendarOpen=!0}}(this),onClose:function(e){return function(){return e.calendarOpen=!1}}(this)}),this.$input.siblings(".bk-ui-datepicker-trigger").css({"vertical-align":"middle"}),this.$input.width(this.$input.width()-26),this.$input.focus().select()},t.prototype.destroy=function(){return n.datepicker.dpDiv.stop(!0,!0),this.$input.datepicker("hide"),this.$input.datepicker("destroy"),t.__super__.destroy.call(this)},t.prototype.show=function(){return this.calendarOpen&&n.datepicker.dpDiv.stop(!0,!0).show(),t.__super__.show.call(this)},t.prototype.hide=function(){return this.calendarOpen&&n.datepicker.dpDiv.stop(!0,!0).hide(),t.__super__.hide.call(this)},t.prototype.position=function(e){return this.calendarOpen&&n.datepicker.dpDiv.css({top:e.top+30,left:e.left}),t.__super__.position.call(this)},t.prototype.getValue=function(){return this.$input.datepicker("getDate").getTime()},t.prototype.setValue=function(e){return this.$input.datepicker("setDate",new Date(e))},t}(l),h=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return P(t,e),t.prototype.type="DateEditor",t.prototype.default_view=d,t}(a),t.exports={String:{Model:k,View:C},Text:{Model:x,View:D},Select:{Model:y,View:w},Percent:{Model:_,View:b},Checkbox:{Model:u,View:c},Int:{Model:p,View:f},Number:{Model:g,View:v},Time:{Model:S,View:M},Date:{Model:h,View:d}}},{"../../core/bokeh_view":"core/bokeh_view","../../core/properties":"core/properties","../../model":"model",jquery:"jquery","jquery-ui/autocomplete":"jquery-ui/autocomplete","jquery-ui/spinner":"jquery-ui/spinner",underscore:"underscore"}],"models/widgets/cell_formatters":[function(e,t,i){var n,o,s,r,a,l,u,c,h,d,p,f=function(e,t){function i(){this.constructor=e}for(var n in t)m.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},m={}.hasOwnProperty;d=e("underscore"),n=e("jquery"),c=e("numbro"),p=e("../../core/properties"),l=e("../../model"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return f(t,e),t.prototype.doFormat=function(e,t,i,n,o){return null===i?"":(i+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},t}(l),h=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return f(t,e),t.prototype.type="StringFormatter",t.define({font_style:[p.FontStyle,"normal"],text_align:[p.TextAlign,"left"],text_color:[p.Color]}),t.prototype.doFormat=function(e,i,o,s,r){var a,l,u,c;if(l=t.__super__.doFormat.call(this,e,i,o,s,r),a=this.font_style,u=this.text_align,c=this.text_color,null!=a||null!=u||null!=c){switch(l=n("<span>"+l+"</span>"),a){case"bold":l=l.css("font-weight","bold");break;case"italic":l=l.css("font-style","italic")}null!=u&&(l=l.css("text-align",u)),null!=c&&(l=l.css("color",c)),l=l.prop("outerHTML")}return l},t}(s),u=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return f(t,e),t.prototype.type="NumberFormatter",t.define({format:[p.String,"0,0"],language:[p.String,"en"],rounding:[p.String,"round"]}),t.prototype.doFormat=function(e,i,n,o,s){var r,a,l;return r=this.format,a=this.language,l=function(){switch(this.rounding){case"round":case"nearest":return Math.round;case"floor":case"rounddown":return Math.floor;case"ceil":case"roundup":return Math.ceil}}.call(this),n=c.format(n,r,a,l),t.__super__.doFormat.call(this,e,i,n,o,s)},t}(h),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return f(t,e),t.prototype.type="BooleanFormatter",t.define({icon:[p.String,"check"]}),t.prototype.doFormat=function(e,t,i,o,s){return i?n("<i>").addClass(this.icon).html():""},t}(s),r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return f(t,e),t.prototype.type="DateFormatter",t.define({format:[p.String,"yy M d"]}),t.prototype.getFormat=function(){var e,t;return e=this.format,t=function(){switch(e){case"ATOM":case"W3C":case"RFC-3339":case"ISO-8601":return"ISO-8601";case"COOKIE":return"COOKIE";case"RFC-850":return"RFC-850";case"RFC-1036":return"RFC-1036";case"RFC-1123":return"RFC-1123";case"RFC-2822":return"RFC-2822";case"RSS":case"RFC-822":return"RFC-822";case"TICKS":return"TICKS";case"TIMESTAMP":return"TIMESTAMP";default:return null}}(),null!=t?n.datepicker[t]:e},t.prototype.doFormat=function(e,i,o,s,r){var a;return o=d.isString(o)?parseInt(o,10):o,a=n.datepicker.formatDate(this.getFormat(),new Date(o)),t.__super__.doFormat.call(this,e,i,a,s,r)},t}(s),a=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return f(t,e),t.prototype.type="HTMLTemplateFormatter",t.define({template:[p.String,"<%= value %>"]}),t.prototype.doFormat=function(e,t,i,n,o){var s,r;return r=this.template,null===i?"":(o=d.extend({},o,{value:i}),(s=d.template(r))(o))},t}(s),t.exports={String:{Model:h},Number:{Model:u},Boolean:{Model:o},Date:{Model:r},HTMLTemplate:{Model:a}}},{"../../core/properties":"core/properties","../../model":"model",jquery:"jquery",numbro:"numbro",underscore:"underscore"}],"models/widgets/checkbox_button_group":[function(e,t,i){var n,o,s,r,a,l,u,c,h,d=function(e,t){function i(){this.constructor=e}for(var n in t)p.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},p={}.hasOwnProperty,f=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1};u=e("underscore"),n=e("jquery"),o=e("bootstrap/button"),l=e("./widget"),s=e("../../core/bokeh_view"),c=e("../../core/properties"),h=e("./button_group_template"),a=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return d(t,e),t.prototype.events={"change input":"change_input"},t.prototype.template=h,t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){var e,i,o,s,r,a,l,u,c;for(t.__super__.render.call(this),this.$el.empty(),s=this.template(),this.$el.append(s),o=this.model.active,c=this.model.labels,r=a=0,u=c.length;a<u;r=++a)l=c[r],e=n('<input type="checkbox">').attr({value:""+r}),f.call(o,r)>=0&&e.prop("checked",!0),i=n('<label class="bk-bs-btn"></label>'),i.text(l).prepend(e),i.addClass("bk-bs-btn-"+this.model.button_type),f.call(o,r)>=0&&i.addClass("bk-bs-active"),this.$el.find(".bk-bs-btn-group").append(i);return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,s;for(o=this.$("input"),s=[],i=e=0,n=o.length;e<n;i=++e)t=o[i],t.checked&&s.push(i);return s}.call(this),this.model.active=e,null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(l.View),r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return d(t,e),t.prototype.type="CheckboxButtonGroup",t.prototype.default_view=a,t.define({active:[c.Array,[]],labels:[c.Array,[]],button_type:[c.String,"default"],callback:[c.Instance]}),t}(l.Model),t.exports={Model:r,View:a}},{"../../core/bokeh_view":"core/bokeh_view","../../core/properties":"core/properties","./button_group_template":"models/widgets/button_group_template","./widget":"models/widgets/widget","bootstrap/button":"bootstrap/button",jquery:"jquery",underscore:"underscore"}],"models/widgets/checkbox_group":[function(e,t,i){var n,o,s,r,a,l,u,c=function(e,t){function i(){this.constructor=e}for(var n in t)h.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},h={}.hasOwnProperty,d=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1};l=e("underscore"),n=e("jquery"),a=e("./widget"),o=e("../../core/bokeh_view"),u=e("../../core/properties"),r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.events={"change input":"change_input"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){var e,i,o,s,r,a,l,u,c;for(t.__super__.render.call(this),this.$el.empty(),s=this.model.active,c=this.model.labels,r=a=0,u=c.length;a<u;r=++a)l=c[r],i=n('<input type="checkbox">').attr({value:""+r}),this.model.disabled&&i.prop("disabled",!0),d.call(s,r)>=0&&i.prop("checked",!0),o=n("<label></label>").text(l).prepend(i),this.model.inline?(o.addClass("bk-bs-checkbox-inline"),this.$el.append(o)):(e=n('<div class="bk-bs-checkbox"></div>').append(o),this.$el.append(e));return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,s;for(o=this.$("input"),s=[],i=e=0,n=o.length;e<n;i=++e)t=o[i],t.checked&&s.push(i);return s}.call(this),this.model.active=e,null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(a.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.type="CheckboxGroup",t.prototype.default_view=r,t.define({active:[u.Array,[]],labels:[u.Array,[]],inline:[u.Bool,!1],callback:[u.Instance]}),t}(a.Model),t.exports={Model:s,View:r}},{"../../core/bokeh_view":"core/bokeh_view","../../core/properties":"core/properties","./widget":"models/widgets/widget",jquery:"jquery",underscore:"underscore"}],"models/widgets/data_table":[function(e,t,i){var n,o,s,r,a,l,u,c,h,d,p,f,m,g,v=function(e,t){function i(){this.constructor=e}for(var n in t)_.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},_={}.hasOwnProperty;p=e("underscore"),n=e("jquery"),o=e("jquery-ui/sortable"),c=e("slick_grid/slick.grid"),u=e("slick_grid/plugins/slick.rowselectionmodel"),s=e("slick_grid/plugins/slick.checkboxselectcolumn"),f=e("../../core/hittest"),m=e("../../core/properties"),h=e("./table_widget"),d=e("./widget"),g=function(e,t){var i,o;return i=function(i){return function(){if(n.contains(document.documentElement,e))return clearInterval(o),t()}}(this),o=setInterval(i,50)},r=function(){function e(e){var t;this.source=e,this.data=this.source.data,this.fields=p.keys(this.data),p.contains(this.fields,"index")||(this.data.index=function(){t=[];for(var e=0,i=this.getLength();0<=i?e<i:e>i;0<=i?e++:e--)t.push(e);return t}.apply(this),this.fields.push("index"))}return e.prototype.getLength=function(){return this.source.get_length()},e.prototype.getItem=function(e){var t,i,n,o,s;for(i={},s=this.fields,n=0,o=s.length;n<o;n++)t=s[n],i[t]=this.data[t][e];return i},e.prototype._setItem=function(e,t){var i,n;for(i in t)n=t[i],this.data[i][e]=n},e.prototype.setItem=function(e,t){return this._setItem(e,t),this.updateSource()},e.prototype.getField=function(e,t){var i;return i=this.data.index.indexOf(e),this.data[t][i]},e.prototype._setField=function(e,t,i){var n;n=this.data.index.indexOf(e),this.data[t][n]=i},e.prototype.setField=function(e,t,i){return this._setField(e,t,i),this.updateSource()},e.prototype.updateSource=function(){return this.source.trigger("change:data",this,this.source.attributes.data)},e.prototype.getItemMetadata=function(e){return null},e.prototype.getRecords=function(){var e;return function(){var t,i,n;for(n=[],e=t=0,i=this.getLength();0<=i?t<i:t>i;e=0<=i?++t:--t)n.push(this.getItem(e));return n}.call(this)},e.prototype.sort=function(e){var t,i,n,o,s,r,a;for(t=function(){var t,n,o;for(o=[],t=0,n=e.length;t<n;t++)i=e[t],o.push([i.sortCol.field,i.sortAsc?1:-1]);return o}(),p.isEmpty(t)&&(t=[["index",1]]),a=this.getRecords(),a.sort(function(e,i){var n,o,s,r,a,l,u,c;for(o=0,s=t.length;o<s;o++)if(r=t[o],n=r[0],l=r[1],u=e[n],c=i[n],a=u===c?0:u>c?l:-l,0!==a)return a;return 0}),n=o=0,s=a.length;o<s;n=++o)r=a[n],this._setItem(n,r);return this.updateSource()},e}(),l=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return v(t,e),t.prototype.attributes={"class":"bk-data-table"},t.prototype.initialize=function(e){var i;return t.__super__.initialize.call(this,e),g(this.el,function(e){return function(){return e.render()}}(this)),this.listenTo(this.model,"change",function(e){return function(){return e.render()}}(this)),i=this.model.source,this.listenTo(i,"change:data",function(e){return function(){return e.updateGrid()}}(this)),this.listenTo(i,"change:selected",function(e){return function(){return e.updateSelection()}}(this))},t.prototype.updateGrid=function(){return this.data.constructor(this.model.source),this.grid.invalidate(),this.grid.render(),this.model.source.data=this.model.source.data,this.model.source.trigger("change")},t.prototype.updateSelection=function(){var e,t,i,n;if(n=this.model.source.selected,t=n["1d"].indices,this.grid.setSelectedRows(t),e=this.grid.getViewport(),this.model.scroll_to_selection&&!p.any(p.map(t,function(t){return e.top<=t&&t<=e.bottom})))return i=Math.max(0,Math.min.apply(null,t)-1),this.grid.scrollRowToTop(i)},t.prototype.newIndexColumn=function(){return{id:p.uniqueId(),name:"#",field:"index",width:40,behavior:"select",cannotTriggerInsert:!0,resizable:!1,selectable:!1,sortable:!0,cssClass:"bk-cell-index"}},t.prototype.render=function(){var e,t,i,n,o,a;return i=function(){var e,i,n,o;for(n=this.model.columns,o=[],e=0,i=n.length;e<i;e++)t=n[e],o.push(t.toColumn());return o}.call(this),"checkbox"===this.model.selectable&&(e=new s({cssClass:"bk-cell-select"}),i.unshift(e.getColumnDefinition())),this.model.row_headers&&null!=this.model.source.get_column("index")&&i.unshift(this.newIndexColumn()),a=this.model.width,n=this.model.height,o={enableCellNavigation:this.model.selectable!==!1,enableColumnReorder:!0,forceFitColumns:this.model.fit_columns,autoHeight:"auto"===n,multiColumnSort:this.model.sortable,editable:this.model.editable,autoEdit:!1},null!=a?this.$el.css({width:this.model.width+"px"}):this.$el.css({width:this.model.default_width+"px"}),null!=n&&"auto"!==n&&this.$el.css({height:this.model.height+"px"}),this.data=new r(this.model.source),this.grid=new c(this.el,this.data,i,o),this.grid.onSort.subscribe(function(e){return function(t,n){return i=n.sortCols,e.data.sort(i),e.grid.invalidate(),e.grid.render()}}(this)),this.model.selectable!==!1&&(this.grid.setSelectionModel(new u({selectActiveRow:null==e})),null!=e&&this.grid.registerPlugin(e),this.grid.onSelectedRowsChanged.subscribe(function(e){return function(t,i){var n;return n=f.create_hit_test_result(),n["1d"].indices=i.rows,e.model.source.selected=n}}(this))),this},t}(d.View),a=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return v(t,e),t.prototype.type="DataTable",t.prototype.default_view=l,t.define({columns:[m.Array,[]],fit_columns:[m.Bool,!0],sortable:[m.Bool,!0],editable:[m.Bool,!1],selectable:[m.Bool,!0],row_headers:[m.Bool,!0],scroll_to_selection:[m.Bool,!0]}),t.override({height:400}),t.internal({default_width:[m.Number,600]}),t}(h.Model),t.exports={Model:a,View:l}},{"../../core/hittest":"core/hittest","../../core/properties":"core/properties","./table_widget":"models/widgets/table_widget","./widget":"models/widgets/widget",jquery:"jquery","jquery-ui/sortable":"jquery-ui/sortable","slick_grid/plugins/slick.checkboxselectcolumn":"slick_grid/plugins/slick.checkboxselectcolumn","slick_grid/plugins/slick.rowselectionmodel":"slick_grid/plugins/slick.rowselectionmodel","slick_grid/slick.grid":"slick_grid/slick.grid",underscore:"underscore"}],"models/widgets/date_picker":[function(e,t,i){var n,o,s,r,a,l,u,c=function(e,t){return function(){return e.apply(t,arguments)}},h=function(e,t){function i(){this.constructor=e}for(var n in t)d.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},d={}.hasOwnProperty;l=e("underscore"),n=e("jquery"),o=e("jquery-ui/datepicker"),u=e("../../core/properties"),a=e("./input_widget"),r=function(e){function t(){return this.onSelect=c(this.onSelect,this),t.__super__.constructor.apply(this,arguments)}return h(t,e),t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.label=n("<label>").text(this.model.title),this.input=n('<input type="text">'),this.datepicker=this.input.datepicker({defaultDate:new Date(this.model.value),minDate:null!=this.model.min_date?new Date(this.model.min_date):null,maxDate:null!=this.model.max_date?new Date(this.model.max_date):null,onSelect:this.onSelect}),this.$el.append([this.label,this.input])},t.prototype.onSelect=function(e,t){var i,n;return i=new Date(e),this.model.value=i.toString(),null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(a.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return h(t,e),t.prototype.type="DatePicker",t.prototype.default_view=r,t.define({value:[u.Any,Date.now()],min_date:[u.Any],max_date:[u.Any]}),t}(a.Model),t.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget",jquery:"jquery","jquery-ui/datepicker":"jquery-ui/datepicker",underscore:"underscore"}],"models/widgets/date_range_slider":[function(e,t,i){var n,o,s,r,a,l,u,c=function(e,t){function i(){this.constructor=e}for(var n in t)h.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},h={}.hasOwnProperty;l=e("underscore"),n=e("jquery"),o=e("jqrangeslider/jQDateRangeSlider"),u=e("../../core/properties"),a=e("./input_widget"),r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",function(e){return function(){return e.render}}(this))},t.prototype.render=function(){var e,i,n,o,s,r,a,u,c;return t.__super__.render.call(this),this.$el.empty(),s=this.model.value,c=s[0],u=s[1],r=this.model.range,o=r[0],n=r[1],a=this.model.bounds,i=a[0],e=a[1],this.$el.dateRangeSlider({defaultValues:{min:new Date(c),max:new Date(u)},bounds:{min:new Date(i),max:new Date(e)},range:{min:!!l.isObject(o)&&o,max:!!l.isObject(n)&&n},step:this.model.step||{},enabled:this.model.enabled,arrows:this.model.arrows,valueLabels:this.model.value_labels,wheelMode:this.model.wheel_mode}),this.$el.on("userValuesChanged",function(e){return function(t,i){var n;return e.model.value=[i.values.min,i.values.max],null!=(n=e.model.callback)?n.execute(e.model):void 0}}(this)),this},t}(a.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.type="DateRangeSlider",t.prototype.default_view=r,t.define({value:[u.Any],range:[u.Any],bounds:[u.Any],step:[u.Any,{}],enabled:[u.Bool,!0],arrows:[u.Bool,!0],value_labels:[u.String,"show"],wheel_mode:[u.Any]}),t}(a.Model),t.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget","jqrangeslider/jQDateRangeSlider":"jqrangeslider/jQDateRangeSlider",jquery:"jquery",underscore:"underscore"}],"models/widgets/dialog":[function(e,t,i){var n,o,s,r,a,l,u,c,h=function(e,t){return function(){return e.apply(t,arguments)}},d=function(e,t){function i(){this.constructor=e}for(var n in t)p.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},p={}.hasOwnProperty;l=e("underscore"),n=e("jquery"),o=e("bootstrap/modal"),c=e("../../core/properties"),u=e("./dialog_template"),a=e("./widget"),r=function(e){function t(){return this.change_content=h(this.change_content,this),this.change_visibility=h(this.change_visibility,this),
this.onHide=h(this.onHide,this),t.__super__.constructor.apply(this,arguments)}return d(t,e),t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.render_content(),this.render_buttons(),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model,"change:visible",this.change_visibility),this.listenTo(this.model,"change:content",this.change_content)},t.prototype.render_content=function(){var e;return null!=this.content_view&&this.content_view.remove(),e=this.model.content,null!=e&&("object"==typeof e?(this.content_view=new e.default_view({model:e}),this.$el.find(".bk-dialog-content").empty(),this.$el.find(".bk-dialog-content").append(this.content_view.$el)):(this.$el.find(".bk-dialog-content").empty(),this.$el.find(".bk-dialog-content").text(e))),this},t.prototype.render_buttons=function(){var e;return null!=this.buttons_box_view&&this.buttons_box_view.remove(),e=this.model.buttons_box,null!=e&&(this.buttons_box_view=new e.default_view({model:e}),this.$el.find(".bk-dialog-buttons_box").empty(),this.$el.find(".bk-dialog-buttons_box").append(this.buttons_box_view.$el)),this},t.prototype.render=function(){return t.__super__.render.call(this),this.$modal=n(u(this.model.attributes)),this.$modal.modal({show:this.model.visible}),this.$modal.on("hidden.bk-bs.modal",this.onHide),this.$el.html(this.$modal),this},t.prototype.onHide=function(e){return this.model.setv("visible",!1,{silent:!0})},t.prototype.change_visibility=function(){return this.$modal.modal(this.model.visible?"show":"hide")},t.prototype.change_content=function(){return this.render_content()},t}(a.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return d(t,e),t.prototype.type="Dialog",t.prototype.default_view=r,t.define({visible:[c.Bool,!1],closable:[c.Bool,!0],title:[c.String,""],content:[c.String,""],buttons:[c.Array,[]],buttons_box:[c.Instance]}),t}(a.Model),t.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./dialog_template":"models/widgets/dialog_template","./widget":"models/widgets/widget","bootstrap/modal":"bootstrap/modal",jquery:"jquery",underscore:"underscore"}],"models/widgets/dialog_template":[function(e,t,i){t.exports=function(e){e||(e={});var t=[],i=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?n(e):""},n=function(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};return function(){(function(){t.push('<div class="bk-bs-modal" tabindex="-1">\n <div class="bk-bs-modal-dialog">\n <div class="bk-bs-modal-content">\n <div class="bk-bs-modal-header">\n '),this.closable&&t.push('\n <button type="button" class="bk-bs-close" data-bk-bs-dismiss="modal">&times;</button>\n '),t.push('\n <h4 class="bk-bs-modal-title">'),t.push(i(this.title)),t.push('</h4>\n </div>\n <div class="bk-bs-modal-body">\n <div class="bk-dialog-content" />\n </div>\n <div class="bk-bs-modal-footer">\n <div class="bk-dialog-buttons_box" />\n </div>\n </div>\n </div>\n</div>\n')}).call(this)}.call(e),t.join("")}},{}],"models/widgets/div":[function(e,t,i){var n,o,s,r,a,l=function(e,t){function i(){this.constructor=e}for(var n in t)u.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},u={}.hasOwnProperty;n=e("jquery"),r=e("./markup"),a=e("../../core/properties"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return l(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=this.model.render_as_text===!0?n("<div></div>").text(this.model.text):n("<div></div>").html(this.model.text),this.$el.find(".bk-markup").append(e),this},t}(r.View),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return l(t,e),t.prototype.type="Div",t.prototype.default_view=s,t.define({render_as_text:[a.Bool,!1]}),t}(r.Model),t.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./markup":"models/widgets/markup",jquery:"jquery"}],"models/widgets/dropdown":[function(e,t,i){var n,o,s,r,a,l,u,c=function(e,t){function i(){this.constructor=e}for(var n in t)h.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},h={}.hasOwnProperty;a=e("underscore"),n=e("jquery"),l=e("../../core/properties"),o=e("./abstract_button"),u=e("./dropdown_template"),r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.template=u,t.prototype.render=function(){var e,i,o,s,r,a,l,u,c,h;for(t.__super__.render.call(this),r=[],u=this.model.menu,o=0,l=u.length;o<l;o++)s=u[o],i=null!=s?(a=s[0],h=s[1],s,e=n("<a data-value='"+h+"'>"+a+"</a>"),c=this,e.click(function(e){return c.set_value(n(this).data("value"))}),n("<li></li>").append(e)):n('<li class="bk-bs-divider"></li>'),r.push(i);return this.$el.find(".bk-bs-dropdown-menu").append(r),this.$el.find("button").val(this.model.default_value),this},t.prototype.set_value=function(e){return this.model.value=e,this.$el.find("button").val(e)},t}(o.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.type="Dropdown",t.prototype.default_view=r,t.define({value:[l.String],default_value:[l.String],menu:[l.Array,[]]}),t.override({label:"Dropdown"}),t}(o.Model),t.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./abstract_button":"models/widgets/abstract_button","./dropdown_template":"models/widgets/dropdown_template",jquery:"jquery",underscore:"underscore"}],"models/widgets/dropdown_template":[function(e,t,i){t.exports=function(e){e||(e={});var t=[],i=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?n(e):""},n=function(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};return function(){(function(){t.push('<button type="button" class="bk-bs-btn bk-bs-btn-'),t.push(i(this.button_type)),t.push(' bk-bs-dropdown-toggle bk-bs-dropdown-btn" data-bk-bs-toggle="dropdown">\n '),t.push(i(this.label)),t.push(' <span class="bk-bs-caret"></span>\n</button>\n<ul class="bk-bs-dropdown-menu">\n</ul>\n')}).call(this)}.call(e),t.join("")}},{}],"models/widgets/icon":[function(e,t,i){var n,o,s,r,a,l,u=function(e,t){function i(){this.constructor=e}for(var n in t)c.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},c={}.hasOwnProperty;a=e("underscore"),l=e("../../core/properties"),n=e("./abstract_icon"),r=e("./widget"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.tagName="i",t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){var e,t;return this.$el.empty(),this.$el.addClass("bk-fa"),this.$el.addClass("bk-fa-"+this.model.icon_name),t=this.model.size,null!=t&&this.$el.css({"font-size":t+"em"}),e=this.model.flip,null!=e&&this.$el.addClass("bk-fa-flip-"+e),this.model.spin&&this.$el.addClass("bk-fa-spin"),this},t.prototype.update_constraints=function(){return null},t}(r.View),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.type="Icon",t.prototype.default_view=s,t.define({icon_name:[l.String,"check"],size:[l.Number],flip:[l.Any],spin:[l.Bool,!1]}),t}(n.Model),t.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./abstract_icon":"models/widgets/abstract_icon","./widget":"models/widgets/widget",underscore:"underscore"}],"models/widgets/input_widget":[function(e,t,i){var n,o,s,r,a,l=function(e,t){function i(){this.constructor=e}for(var n in t)u.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},u={}.hasOwnProperty;r=e("underscore"),s=e("./widget"),a=e("../../core/properties"),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return l(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.$el.find("input").prop("disabled",this.model.disabled)},t.prototype.change_input=function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0},t}(s.View),n=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return l(t,e),t.prototype.type="InputWidget",t.prototype.default_view=o,t.define({callback:[a.Instance],title:[a.String,""]}),t}(s.Model),t.exports={Model:n,View:o}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",underscore:"underscore"}],"models/widgets/main":[function(e,t,i){t.exports={models:{editors:[e("./cell_editors"),"Editor"],formatters:[e("./cell_formatters"),"Formatter"],AbstractButton:e("./abstract_button"),AbstractIcon:e("./abstract_icon"),TableWidget:e("./table_widget"),Markup:e("./markup"),Widget:e("./widget"),InputWidget:e("./input_widget"),TableColumn:e("./table_column"),DataTable:e("./data_table"),Paragraph:e("./paragraph"),Div:e("./div"),TextInput:e("./text_input"),AutocompleteInput:e("./autocomplete_input"),PreText:e("./pretext"),Select:e("./selectbox"),Slider:e("./slider"),MultiSelect:e("./multiselect"),DateRangeSlider:e("./date_range_slider"),DatePicker:e("./date_picker"),Panel:e("./panel"),Tabs:e("./tabs"),Dialog:e("./dialog"),Icon:e("./icon"),Button:e("./button"),Toggle:e("./toggle"),Dropdown:e("./dropdown"),CheckboxGroup:e("./checkbox_group"),RadioGroup:e("./radio_group"),CheckboxButtonGroup:e("./checkbox_button_group"),RadioButtonGroup:e("./radio_button_group")}}},{"./abstract_button":"models/widgets/abstract_button","./abstract_icon":"models/widgets/abstract_icon","./autocomplete_input":"models/widgets/autocomplete_input","./button":"models/widgets/button","./cell_editors":"models/widgets/cell_editors","./cell_formatters":"models/widgets/cell_formatters","./checkbox_button_group":"models/widgets/checkbox_button_group","./checkbox_group":"models/widgets/checkbox_group","./data_table":"models/widgets/data_table","./date_picker":"models/widgets/date_picker","./date_range_slider":"models/widgets/date_range_slider","./dialog":"models/widgets/dialog","./div":"models/widgets/div","./dropdown":"models/widgets/dropdown","./icon":"models/widgets/icon","./input_widget":"models/widgets/input_widget","./markup":"models/widgets/markup","./multiselect":"models/widgets/multiselect","./panel":"models/widgets/panel","./paragraph":"models/widgets/paragraph","./pretext":"models/widgets/pretext","./radio_button_group":"models/widgets/radio_button_group","./radio_group":"models/widgets/radio_group","./selectbox":"models/widgets/selectbox","./slider":"models/widgets/slider","./table_column":"models/widgets/table_column","./table_widget":"models/widgets/table_widget","./tabs":"models/widgets/tabs","./text_input":"models/widgets/text_input","./toggle":"models/widgets/toggle","./widget":"models/widgets/widget"}],"models/widgets/markup":[function(e,t,i){var n,o,s,r,a,l=function(e,t){function i(){this.constructor=e}for(var n in t)u.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},u={}.hasOwnProperty;r=e("../../core/properties"),s=e("./widget"),a=e("./markup_template"),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return l(t,e),t.prototype.template=a,t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){if(t.__super__.render.call(this),this.$el.empty(),this.$el.html(this.template()),this.model.height&&this.$el.height(this.model.height),this.model.width)return this.$el.width(this.model.width)},t}(s.View),n=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return l(t,e),t.prototype.type="Markup",t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e)},t.define({text:[r.String,""]}),t}(s.Model),t.exports={Model:n,View:o}},{"../../core/properties":"core/properties","./markup_template":"models/widgets/markup_template","./widget":"models/widgets/widget"}],"models/widgets/markup_template":[function(e,t,i){t.exports=function(e){e||(e={});var t=[];return function(){(function(){t.push('<div class="bk-markup">\n</div>\n')}).call(this)}.call(e),t.join("")}},{}],"models/widgets/multiselect":[function(e,t,i){var n,o,s,r,a,l,u,c=function(e,t){return function(){return e.apply(t,arguments)}},h=function(e,t){function i(){this.constructor=e}for(var n in t)d.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},d={}.hasOwnProperty;a=e("jquery"),n=e("underscore"),u=e("../../core/properties"),o=e("./input_widget"),l=e("./multiselecttemplate"),r=function(e){function t(){return this.render_selection=c(this.render_selection,this),t.__super__.constructor.apply(this,arguments)}return h(t,e),t.prototype.tagName="div",t.prototype.template=l,t.prototype.events={"change select":"change_input"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change:value",this.render_selection),this.listenTo(this.model,"change:options",this.render),this.listenTo(this.model,"change:name",this.render),this.listenTo(this.model,"change:title",this.render)},t.prototype.render=function(){var e;return t.__super__.render.call(this),this.$el.empty(),e=this.template(this.model.attributes),this.$el.html(e),this.render_selection(),this},t.prototype.render_selection=function(){var e;return e={},a.map(this.model.value,function(t){return e[t]=!0}),this.$("option").each(function(t){return function(i){if(i=t.$(i),e[i.attr("value")])return i.attr("selected","selected")}}(this))},t.prototype.change_input=function(){var e;return e=this.$el.find("select").val(),e?this.model.value=e:this.model.value=[],t.__super__.change_input.call(this)},t}(o.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return h(t,e),t.prototype.type="MultiSelect",t.prototype.default_view=r,t.define({value:[u.Array,[]],options:[u.Array,[]]}),t}(o.Model),t.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget","./multiselecttemplate":"models/widgets/multiselecttemplate",jquery:"jquery",underscore:"underscore"}],"models/widgets/multiselecttemplate":[function(e,t,i){t.exports=function(e){e||(e={});var t=[],i=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?n(e):""},n=function(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};return function(){(function(){var e,n,o,s;for(t.push('<label for="'),t.push(i(this.id)),t.push('"> '),t.push(i(this.title)),t.push(' </label>\n<select multiple class="bk-widget-form-input" id="'),t.push(i(this.id)),t.push('" name="'),t.push(i(this.name)),t.push('">\n '),s=this.options,e=0,n=s.length;e<n;e++)o=s[e],t.push("\n "),"string"==typeof o?(t.push("\n <option "),this.value.indexOf(o)>-1&&t.push('selected="selected" '),t.push('value="'),t.push(i(o)),t.push('">'),t.push(i(o)),t.push("</option>\n ")):(t.push("\n <option "),this.value.indexOf(o[0])>-1&&t.push('selected="selected" '),t.push('value="'),t.push(i(o[0])),t.push('">'),t.push(i(o[1])),t.push("</option>\n ")),t.push("\n ");t.push("\n</select>")}).call(this)}.call(e),t.join("")}},{}],"models/widgets/panel":[function(e,t,i){var n,o,s,r,a,l,u=function(e,t){function i(){this.constructor=e}for(var n in t)c.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},c={}.hasOwnProperty;a=e("underscore"),n=e("jquery"),l=e("../../core/properties"),r=e("./widget"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.$el.empty(),this},t}(r.View),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.type="Panel",t.prototype.default_view=s,t.define({title:[l.String,""],child:[l.Instance],closable:[l.Bool,!1]}),t}(r.Model),t.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",jquery:"jquery",underscore:"underscore"}],"models/widgets/paragraph":[function(e,t,i){var n,o,s,r,a=function(e,t){function i(){this.constructor=e}for(var n in t)l.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},l={}.hasOwnProperty;n=e("jquery"),o=e("./markup"),r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return a(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=n('<p style="margin: 0;"></p>').text(this.model.text),this.$el.find(".bk-markup").append(e)},t}(o.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return a(t,e),t.prototype.type="Paragraph",t.prototype.default_view=r,t}(o.Model),t.exports={Model:s,View:r}},{"./markup":"models/widgets/markup",jquery:"jquery"}],"models/widgets/pretext":[function(e,t,i){var n,o,s,r,a,l=function(e,t){function i(){this.constructor=e}for(var n in t)u.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},u={}.hasOwnProperty;n=e("jquery"),o=e("./markup"),a=e("../../core/properties"),r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return l(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=n('<pre style="overflow: auto"></pre>').text(this.model.text),this.$el.find(".bk-markup").append(e)},t}(o.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return l(t,e),t.prototype.type="PreText",t.prototype.default_view=r,t}(o.Model),t.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./markup":"models/widgets/markup",jquery:"jquery"}],"models/widgets/radio_button_group":[function(e,t,i){var n,o,s,r,a,l,u,c,h=function(e,t){function i(){this.constructor=e}for(var n in t)d.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},d={}.hasOwnProperty;l=e("underscore"),n=e("jquery"),o=e("bootstrap/button"),u=e("../../core/properties"),a=e("./widget"),c=e("./button_group_template"),r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return h(t,e),t.prototype.events={"change input":"change_input"},t.prototype.template=c,t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){var e,i,o,s,r,a,u,c,h,d;for(t.__super__.render.call(this),this.$el.empty(),s=this.template(),this.$el.append(s),h=l.uniqueId("RadioButtonGroup"),o=this.model.active,d=this.model.labels,r=a=0,c=d.length;a<c;r=++a)u=d[r],e=n('<input type="radio">').attr({name:h,value:""+r}),r===o&&e.prop("checked",!0),i=n('<label class="bk-bs-btn"></label>'),i.text(u).prepend(e),i.addClass("bk-bs-btn-"+this.model.button_type),r===o&&i.addClass("bk-bs-active"),this.$el.find(".bk-bs-btn-group").append(i);return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,s;for(o=this.$("input"),s=[],t=e=0,n=o.length;e<n;t=++e)i=o[t],i.checked&&s.push(t);return s}.call(this),this.model.active=e[0],null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(a.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return h(t,e),t.prototype.type="RadioButtonGroup",t.prototype.default_view=r,t.define({active:[u.Any,null],labels:[u.Array,[]],button_type:[u.String,"default"],callback:[u.Instance]}),t}(a.Model),t.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./button_group_template":"models/widgets/button_group_template","./widget":"models/widgets/widget","bootstrap/button":"bootstrap/button",jquery:"jquery",underscore:"underscore"}],"models/widgets/radio_group":[function(e,t,i){var n,o,s,r,a,l,u=function(e,t){function i(){this.constructor=e}for(var n in t)c.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},c={}.hasOwnProperty;a=e("underscore"),n=e("jquery"),l=e("../../core/properties"),r=e("./widget"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.tagName="div",t.prototype.events={"change input":"change_input"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){var e,i,o,s,r,l,u,c,h,d;for(t.__super__.render.call(this),this.$el.empty(),h=a.uniqueId("RadioGroup"),s=this.model.active,d=this.model.labels,r=l=0,c=d.length;l<c;r=++l)u=d[r],i=n('<input type="radio">').attr({name:h,value:""+r}),this.model.disabled&&i.prop("disabled",!0),r===s&&i.prop("checked",!0),o=n("<label></label>").text(u).prepend(i),this.model.inline?(o.addClass("bk-bs-radio-inline"),this.$el.append(o)):(e=n('<div class="bk-bs-radio"></div>').append(o),this.$el.append(e));return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,s;for(o=this.$("input"),s=[],t=e=0,n=o.length;e<n;t=++e)i=o[t],i.checked&&s.push(t);return s}.call(this),this.model.active=e[0],null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(r.View),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.type="RadioGroup",t.prototype.default_view=s,t.define({active:[l.Any,null],labels:[l.Array,[]],inline:[l.Bool,!1],callback:[l.Instance]}),t}(r.Model),t.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",jquery:"jquery",underscore:"underscore"}],"models/widgets/selectbox":[function(e,t,i){var n,o,s,r,a,l,u,c=function(e,t){function i(){this.constructor=e}for(var n in t)h.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},h={}.hasOwnProperty;r=e("underscore"),a=e("../../core/logging").logger,l=e("../../core/properties"),n=e("./input_widget"),u=e("./selecttemplate"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.template=u,t.prototype.events={"change select":"change_input"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){var e;return t.__super__.render.call(this),this.$el.empty(),e=this.template(this.model.attributes),this.$el.html(e),this},t.prototype.change_input=function(){var e;return e=this.$("select").val(),a.debug("selectbox: value = "+e),this.model.value=e,t.__super__.change_input.call(this)},t}(n.View),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.type="Select",t.prototype.default_view=s,t.define({value:[l.String,""],options:[l.Any,[]]}),t}(n.Model),t.exports={Model:o,View:s}},{"../../core/logging":"core/logging","../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget","./selecttemplate":"models/widgets/selecttemplate",underscore:"underscore"}],"models/widgets/selecttemplate":[function(e,t,i){t.exports=function(e){e||(e={});var t=[],i=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?n(e):""},n=function(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};return function(){(function(){var e,n,o,s;for(t.push('<label for="'),t.push(i(this.id)),t.push('"> '),t.push(i(this.title)),t.push(' </label>\n<select class="bk-widget-form-input" id="'),t.push(i(this.id)),t.push('" name="'),t.push(i(this.name)),t.push('">\n '),s=this.options,e=0,n=s.length;e<n;e++)o=s[e],t.push("\n "),"string"==typeof o?(t.push("\n <option "),t.push(i(o===this.value?t.push('selected="selected"'):void 0)),t.push(' value="'),t.push(i(o)),t.push('">'),t.push(i(o)),t.push("</option>\n ")):(t.push("\n <option "),t.push(i(o[0]===this.value?t.push('selected="selected"'):void 0)),t.push(' value="'),t.push(i(o[0])),t.push('">'),t.push(i(o[1])),t.push("</option>\n ")),t.push("\n ");t.push("\n</select>\n")}).call(this)}.call(e),t.join("")}},{}],"models/widgets/slider":[function(e,t,i){var n,o,s,r,a,l,u,c,h,d=function(e,t){return function(){return e.apply(t,arguments)}},p=function(e,t){function i(){this.constructor=e}for(var n in t)f.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},f={}.hasOwnProperty;l=e("underscore"),n=e("jquery-ui/slider"),u=e("../../core/logging").logger,c=e("../../core/properties"),o=e("./input_widget"),a=e("./widget"),h=e("./slidertemplate"),r=function(e){function t(){return this.slide=d(this.slide,this),this.slidestop=d(this.slidestop,this),t.__super__.constructor.apply(this,arguments)}return p(t,e),t.prototype.tagName="div",t.prototype.template=h,t.prototype.initialize=function(e){var i;return t.__super__.initialize.call(this,e),this.listenTo(this.model,"change",this.render),this.$el.empty(),i=this.template(this.model.attributes),this.$el.html(i),this.callbackWrapper=null,"continuous"===this.model.callback_policy&&(this.callbackWrapper=function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0}),"throttle"===this.model.callback_policy&&this.model.callback&&(this.callbackWrapper=l.throttle(function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0},this.model.callback_throttle)),this.render()},t.prototype.render=function(){var e,i,n,o;return t.__super__.render.call(this),e=this.model.end,i=this.model.start,o=this.model.step||(e-i)/50,u.debug("slider render: min, max, step = ("+i+", "+e+", "+o+")"),n={orientation:this.model.orientation,animate:"fast",value:this.model.value,min:i,max:e,step:o,stop:this.slidestop,slide:this.slide},this.$el.find(".slider").slider(n),null!=this.model.title&&this.$("#"+this.model.id).val(this.$(".slider").slider("value")),this.$el.find(".bk-slider-parent").height(this.model.height),this},t.prototype.slidestop=function(e,t){var i;if("mouseup"===this.model.callback_policy||"throttle"===this.model.callback_policy)return null!=(i=this.model.callback)?i.execute(this.model):void 0},t.prototype.slide=function(e,t){var i;if(i=t.value,u.debug("slide value = "+i),null!=this.model.title&&this.$("#"+this.model.id).val(t.value),this.model.value=i,this.callbackWrapper)return this.callbackWrapper()},t}(o.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return p(t,e),t.prototype.type="Slider",t.prototype.default_view=r,t.define({value:[c.Number,.5],start:[c.Number,0],end:[c.Number,1],step:[c.Number,.1],orientation:[c.Orientation,"horizontal"],callback_throttle:[c.Number,200],callback_policy:[c.String,"throttle"]}),t}(o.Model),t.exports={Model:s,View:r}},{"../../core/logging":"core/logging","../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget","./slidertemplate":"models/widgets/slidertemplate","./widget":"models/widgets/widget","jquery-ui/slider":"jquery-ui/slider",underscore:"underscore"}],"models/widgets/slidertemplate":[function(e,t,i){t.exports=function(e){e||(e={});var t=[],i=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?n(e):""},n=function(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};return function(){(function(){t.push('<div class="bk-slider-parent">\n '),null!=this.title&&(t.push("\n "),0!==this.title.length&&(t.push('\n <label for="'),t.push(i(this.id)),t.push('"> '),t.push(i(this.title)),t.push(": </label>\n ")),t.push('\n <input type="text" id="'),t.push(i(this.id)),t.push('" readonly>\n ')),t.push('\n <div class="bk-slider-'),t.push(i(this.orientation)),t.push('">\n <div class="slider" id="'),t.push(i(this.id)),t.push('"></div>\n </div>\n</div>\n')}).call(this)}.call(e),t.join("")}},{}],"models/widgets/table_column":[function(e,t,i){var n,o,s,r,a,l,u=function(e,t){function i(){this.constructor=e}for(var n in t)c.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},c={}.hasOwnProperty;a=e("underscore"),n=e("./cell_editors"),o=e("./cell_formatters"),l=e("../../core/properties"),s=e("../../model"),r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return u(t,e),t.prototype.type="TableColumn",t.prototype.default_view=null,t.define({field:[l.String],title:[l.String],width:[l.Number,300],formatter:[l.Instance,function(){return new o.String.Model}],editor:[l.Instance,function(){return new n.String.Model}],sortable:[l.Bool,!0],default_sort:[l.String,"ascending"]}),t.prototype.toColumn=function(){var e;return{id:a.uniqueId(),field:this.field,name:this.title,width:this.width,formatter:null!=(e=this.formatter)?e.doFormat.bind(this.formatter):void 0,editor:this.editor,sortable:this.sortable,defaultSortAsc:"ascending"===this.default_sort}},t}(s),t.exports={Model:r}},{"../../core/properties":"core/properties","../../model":"model","./cell_editors":"models/widgets/cell_editors","./cell_formatters":"models/widgets/cell_formatters",underscore:"underscore"}],"models/widgets/table_widget":[function(e,t,i){var n,o,s,r,a=function(e,t){function i(){this.constructor=e}for(var n in t)l.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},l={}.hasOwnProperty;s=e("underscore"),o=e("./widget"),r=e("../../core/properties"),n=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return a(t,e),t.prototype.type="TableWidget",t.define({source:[r.Instance]}),t}(o.Model),t.exports={Model:n}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",underscore:"underscore"}],"models/widgets/tabs":[function(e,t,i){var n,o,s,r,a,l,u,c,h=function(e,t){function i(){this.constructor=e}for(var n in t)d.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},d={}.hasOwnProperty;l=e("underscore"),n=e("jquery"),o=e("bootstrap/tab"),u=e("../../core/properties"),c=e("./tabs_template"),a=e("./widget"),r=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return h(t,e),t.prototype.render=function(){var e,i,o,s,r,a,u,h,p,f,m,g,v,_,b;t.__super__.render.call(this),f=this.child_views;for(u in f)d.call(f,u)&&(b=f[u],b.$el.detach());for(this.$el.empty(),v=this.model.tabs,i=this.model.active,s=this.model.children,r=n(c({tabs:v,active:function(e){return e===i?"bk-bs-active":""}})),_=this,r.find("> li > a").click(function(e){var t,i,o;return e.preventDefault(),n(this).tab("show"),t=n(this).attr("href").replace("#tab-",""),v=_.model.tabs,i=l.indexOf(v,l.find(v,function(e){return e.id===t})),_.model.active=i,null!=(o=_.model.callback)?o.execute(_.model):void 0}),e=r.children(".bk-bs-tab-pane"),m=l.zip(s,e),a=0,h=m.length;a<h;a++)g=m[a],o=g[0],p=g[1],n(p).html(this.child_views[o.id].$el);return this.$el.append(r),this.$el.tabs,this},t}(a.View),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return h(t,e),t.prototype.type="Tabs",t.prototype.default_view=r,t.prototype.initialize=function(e){var i;return t.__super__.initialize.call(this,e),this.children=function(){var e,t,n,o;for(n=this.tabs,o=[],e=0,t=n.length;e<t;e++)i=n[e],o.push(i.child);return o}.call(this)},t.define({tabs:[u.Array,[]],active:[u.Number,0],callback:[u.Instance]}),t.internal({children:[u.Array,[]]}),t.prototype.get_layoutable_children=function(){return this.children},t.prototype.get_edit_variables=function(){var e,i,n,o,s;for(i=t.__super__.get_edit_variables.call(this),s=this.get_layoutable_children(),n=0,o=s.length;n<o;n++)e=s[n],i=i.concat(e.get_edit_variables());return i},t.prototype.get_constraints=function(){var e,i,n,o,s;
for(i=t.__super__.get_constraints.call(this),s=this.get_layoutable_children(),n=0,o=s.length;n<o;n++)e=s[n],i=i.concat(e.get_constraints());return i},t}(a.Model),t.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./tabs_template":"models/widgets/tabs_template","./widget":"models/widgets/widget","bootstrap/tab":"bootstrap/tab",jquery:"jquery",underscore:"underscore"}],"models/widgets/tabs_template":[function(e,t,i){t.exports=function(e){e||(e={});var t=[],i=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?n(e):""},n=function(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};return function(){(function(){var e,n,o,s,r,a,l,u;for(t.push('<ul class="bk-bs-nav bk-bs-nav-tabs">\n '),a=this.tabs,e=n=0,s=a.length;n<s;e=++n)u=a[e],t.push('\n <li class="'),t.push(i(this.active(e))),t.push('">\n <a href="#tab-'),t.push(i(u.id)),t.push('">'),t.push(i(u.title)),t.push("</a>\n </li>\n ");for(t.push('\n</ul>\n<div class="bk-bs-tab-content">\n '),l=this.tabs,e=o=0,r=l.length;o<r;e=++o)u=l[e],t.push('\n <div class="bk-bs-tab-pane '),t.push(i(this.active(e))),t.push('" id="tab-'),t.push(i(u.id)),t.push('"></div>\n ');t.push("\n</div>\n")}).call(this)}.call(e),t.join("")}},{}],"models/widgets/text_input":[function(e,t,i){var n,o,s,r,a,l,u,c,h=function(e,t){function i(){this.constructor=e}for(var n in t)d.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},d={}.hasOwnProperty;r=e("underscore"),a=e("../../core/build_views"),l=e("../../core/logging").logger,u=e("../../core/properties"),n=e("./input_widget"),c=e("./text_input_template"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return h(t,e),t.prototype.tagName="div",t.prototype.attributes={"class":"bk-widget-form-group"},t.prototype.template=c,t.prototype.events={"change input":"change_input"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){return t.__super__.render.call(this),this.$el.html(this.template(this.model.attributes)),this.model.height&&this.$el.find("input").height(this.model.height-35),this},t.prototype.change_input=function(){var e;return e=this.$("input").val(),l.debug("widget/text_input: value = "+e),this.model.value=e,t.__super__.change_input.call(this)},t}(n.View),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return h(t,e),t.prototype.type="TextInput",t.prototype.default_view=s,t.define({value:[u.String,""]}),t}(n.Model),t.exports={Model:o,View:s}},{"../../core/build_views":"core/build_views","../../core/logging":"core/logging","../../core/properties":"core/properties","./input_widget":"models/widgets/input_widget","./text_input_template":"models/widgets/text_input_template",underscore:"underscore"}],"models/widgets/text_input_template":[function(e,t,i){t.exports=function(e){e||(e={});var t=[],i=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?n(e):""},n=function(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};return function(){(function(){t.push('<label for="'),t.push(i(this.id)),t.push('"> '),t.push(i(this.title)),t.push(' </label>\n<input class="bk-widget-form-input" type="text" id="'),t.push(i(this.id)),t.push('" name="'),t.push(i(this.name)),t.push('" value="'),t.push(i(this.value)),t.push('"/>\n')}).call(this)}.call(e),t.join("")}},{}],"models/widgets/toggle":[function(e,t,i){var n,o,s,r,a=function(e,t){function i(){this.constructor=e}for(var n in t)l.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},l={}.hasOwnProperty;r=e("../../core/properties"),n=e("./abstract_button"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return a(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.model.active?this.$el.find("button").addClass("bk-bs-active"):this.$el.find("button").removeClass("bk-bs-active"),this},t.prototype.change_input=function(){return t.__super__.change_input.call(this),this.model.active=!this.model.active},t}(n.View),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return a(t,e),t.prototype.type="Toggle",t.prototype.default_view=s,t.define({active:[r.Bool,!1]}),t.override({label:"Toggle"}),t}(n.Model),t.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./abstract_button":"models/widgets/abstract_button"}],"models/widgets/widget":[function(e,t,i){var n,o,s,r=function(e,t){function i(){this.constructor=e}for(var n in t)a.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},a={}.hasOwnProperty;n=e("../layouts/layout_dom"),s=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return r(t,e),t.prototype.className="bk-widget",t.prototype.render=function(){if(this.model.height&&this.$el.height(this.model.height),this.model.width)return this.$el.width(this.model.width)},t}(n.View),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return r(t,e),t.prototype.type="Widget",t.prototype.default_view=s,t}(n.Model),t.exports={Model:o,View:s}},{"../layouts/layout_dom":"models/layouts/layout_dom"}],"jquery-ui/autocomplete":[function(e,t,i){var n=e("jquery");e("./core"),e("./widget"),e("./position"),e("./menu"),/*!
* jQuery UI Autocomplete 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/autocomplete/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.position.js
* jquery.ui.menu.js
*/
function(e,t){e.widget("ui.autocomplete",{version:"1.10.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,n,o=this.element[0].nodeName.toLowerCase(),s="textarea"===o,r="input"===o;this.isMultiLine=!!s||!r&&this.element.prop("isContentEditable"),this.valueMethod=this.element[s||r?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return t=!0,n=!0,void(i=!0);t=!1,n=!1,i=!1;var s=e.ui.keyCode;switch(o.keyCode){case s.PAGE_UP:t=!0,this._move("previousPage",o);break;case s.PAGE_DOWN:t=!0,this._move("nextPage",o);break;case s.UP:t=!0,this._keyEvent("previous",o);break;case s.DOWN:t=!0,this._keyEvent("next",o);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,o.preventDefault(),this.menu.select(o));break;case s.TAB:this.menu.active&&this.menu.select(o);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}},keypress:function(n){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var o=e.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move("previousPage",n);break;case o.PAGE_DOWN:this._move("nextPage",n);break;case o.UP:this._keyEvent("previous",n);break;case o.DOWN:this._keyEvent("next",n)}}},input:function(e){return n?(n=!1,void e.preventDefault()):void this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),void this._change(e))}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(n){n.target===t.element[0]||n.target===i||e.contains(i,n.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)});var n=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:n})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,o){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){o(e)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,function(e,i){n._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),void this.menu.blur()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(n)},{"./core":"jquery-ui/core","./menu":"jquery-ui/menu","./position":"jquery-ui/position","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/button":[function(e,t,i){var n=e("jquery");e("./core"),e("./widget"),/*!
* jQuery UI Button 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/button/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*/
function(e,t){var i,n="ui-button ui-widget ui-state-default ui-corner-all",o="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",s=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},r=function(t){var i=t.name,n=t.form,o=e([]);return i&&(i=i.replace(/'/g,"\\'"),o=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),o};e.widget("ui.button",{version:"1.10.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,s),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,o=this.options,a="checkbox"===this.type||"radio"===this.type,l=a?"":"ui-state-active";null===o.label&&(o.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(n).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){o.disabled||this===i&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){o.disabled||e(this).removeClass(l)}).bind("click"+this.eventNamespace,function(e){o.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),a&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(o.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(o.disabled)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var i=t.element[0];r(i).not(i).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!o.disabled&&(e(this).addClass("ui-state-active"),i=this,void t.document.one("mouseup",function(){i=null}))}).bind("mouseup"+this.eventNamespace,function(){return!o.disabled&&void e(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){return!o.disabled&&void(t.keyCode!==e.ui.keyCode.SPACE&&t.keyCode!==e.ui.keyCode.ENTER||e(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",o.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(n+" ui-state-active "+o).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.element.prop("disabled",!!t),void(t&&this.buttonElement.removeClass("ui-state-focus"))):void this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?r(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var t=this.buttonElement.removeClass(o),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),n=this.options.icons,s=n.primary&&n.secondary,r=[];n.primary||n.secondary?(this.options.text&&r.push("ui-button-text-icon"+(s?"s":n.primary?"-primary":"-secondary")),n.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(r.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):r.push("ui-button-text-only"),t.addClass(r.join(" "))}}),e.widget("ui.buttonset",{version:"1.10.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(n)},{"./core":"jquery-ui/core","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/core":[function(e,t,i){var n=e("jquery");/*!
* jQuery UI Core 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
!function(e,t){function i(t,i){var o,s,r,a=t.nodeName.toLowerCase();return"area"===a?(o=t.parentNode,s=o.name,!(!t.href||!s||"map"!==o.nodeName.toLowerCase())&&(r=e("img[usemap=#"+s+"]")[0],!!r&&n(r))):(/input|select|textarea|button|object/.test(a)?!t.disabled:"a"===a?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var o=0,s=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,o,s=e(this[0]);s.length&&s[0]!==document;){if(n=s.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(o=parseInt(s.css("zIndex"),10),!isNaN(o)&&0!==o))return o;s=s.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++o)})},removeUniqueId:function(){return this.each(function(){s.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),o=isNaN(n);return(o||n>=0)&&i(t,!o)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function o(t,i,n,o){return e.each(s,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var s="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?a["inner"+n].call(this):this.each(function(){e(this).css(r,o(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?a["outer"+n].call(this,t):this.each(function(){e(this).css(r,o(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var o,s=e.ui[t].prototype;for(o in n)s.plugins[o]=s.plugins[o]||[],s.plugins[o].push([i,n[o]])},call:function(e,t,i){var n,o=e.plugins[t];if(o&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;n<o.length;n++)e.options[o[n][0]]&&o[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",o=!1;return t[n]>0||(t[n]=1,o=t[n]>0,t[n]=0,o)}})}(n)},{jquery:"jquery"}],"jquery-ui/datepicker":[function(e,t,i){var n=e("jquery");e("./core"),/*!
* jQuery UI Datepicker 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/datepicker/
*
* Depends:
* jquery.ui.core.js
*/
function(e,t){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.dpDiv=n(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&e(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){e.datepicker._isDisabledDatepicker(s.inline?t.parent()[0]:s.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&e(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&e(this).addClass("ui-datepicker-next-hover"))})}function o(t,i){e.extend(t,i);for(var n in i)null==i[n]&&(t[n]=i[n]);return t}e.extend(e.ui,{datepicker:{version:"1.10.4"}});var s,r="datepicker";e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return o(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var n,o,s;n=t.nodeName.toLowerCase(),o="div"===n||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),s=this._newInst(e(t),o),s.settings=e.extend({},i||{}),"input"===n?this._connectDatepicker(t,s):o&&this._inlineDatepicker(t,s)},_newInst:function(t,i){var o=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:o,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,r,i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var n,o,s,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[a?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),"focus"!==n&&"both"!==n||t.focus(this._showDatepicker),"button"!==n&&"both"!==n||(o=this._get(i,"buttonText"),s=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:s,alt:o,title:o}):e("<button type='button'></button>").addClass(this._triggerClass).html(s?e("<img/>").attr({src:s,alt:o,title:o}):o)),t[a?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,o,s=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,n=0,o=0;o<e.length;o++)e[o].length>i&&(i=e[o].length,n=o);return n},s.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),s.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-s.getDay())),e.input.attr("size",this._formatDate(e,s).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,n,s,a){var l,u,c,h,d,p=this._dialogInst;return p||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+l+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],r,p)),o(p.settings,s||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(u=document.documentElement.clientWidth,c=document.documentElement.clientHeight,h=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[u/2-100+h,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(t){var i,n=e(t),o=e.data(t,r);n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,r),"input"===i?(o.append.remove(),o.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,n,o=e(t),s=e.data(t,r);o.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||(n=o.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,o=e(t),s=e.data(t,r);o.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||(n=o.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,n,s){var r,a,l,u,c=this._getInst(i);return 2===arguments.length&&"string"==typeof n?"defaults"===n?e.extend({},e.datepicker._defaults):c?"all"===n?e.extend({},c.settings):this._get(c,n):null:(r=n||{},"string"==typeof n&&(r={},r[n]=s),void(c&&(this._curInst===c&&this._hideDatepicker(),a=this._getDateDatepicker(i,!0),l=this._getMinMaxDate(c,"min"),u=this._getMinMaxDate(c,"max"),o(c.settings,r),null!==l&&r.dateFormat!==t&&r.minDate===t&&(c.settings.minDate=this._formatDate(c,l)),null!==u&&r.dateFormat!==t&&r.maxDate===t&&(c.settings.maxDate=this._formatDate(c,u)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),c),this._autoSize(c),this._setDate(c,a),this._updateAlternate(c),this._updateDatepicker(c))))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,n,o,s=e.datepicker._getInst(t.target),r=!0,a=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return o=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",s.dpDiv),o[0]&&e.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,o[0]),i=e.datepicker._get(s,"onSelect"),i?(n=e.datepicker._formatDate(s),i.apply(s.input?s.input[0]:null,[n,s])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(s,"stepBigMonths"):-e.datepicker._get(s,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(s,"stepBigMonths"):+e.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(s,"stepBigMonths"):-e.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(s,"stepBigMonths"):+e.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,n,o=e.datepicker._getInst(t.target);if(e.datepicker._get(o,"constrainInput"))return i=e.datepicker._possibleChars(e.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||n<" "||!i||i.indexOf(n)>-1},_doKeyUp:function(t){var i,n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n)),i&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(o){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,s,r,a,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),s=n?n.apply(t,[t,i]):{},s!==!1&&(o(i.settings,s),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return r|="fixed"===e(this).css("position"),!r}),a={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),a=e.datepicker._checkOffset(i,a,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,s=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,n=this._getNumberOfMonths(t),o=n[1],r=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&t.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",r*o+"em"),t.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,n){var o=t.dpDiv.outerWidth(),s=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),u=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?o-r:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+a?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+o>l&&l>o?Math.abs(i.left+o-l):0),i.top-=Math.min(i.top,i.top+s>u&&u>s?Math.abs(s+a):0),i},_findPos:function(t){for(var i,n=this._getInst(t),o=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[o?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,n,o,s,a=this._curInst;!a||t&&a!==e.data(t,r)||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),o=function(){e.datepicker._tidyDialog(a)},e.effects&&(e.effects.effect[i]||e.effects[i])?a.dpDiv.hide(i,e.datepicker._get(a,"showOptions"),n,o):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,o),i||o(),this._datepickerShowing=!1,s=this._get(a,"onClose"),s&&s.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id===e.datepicker._mainDivId||0!==i.parents("#"+e.datepicker._mainDivId).length||i.hasClass(e.datepicker.markerClassName)||i.closest("."+e.datepicker._triggerClass).length||!e.datepicker._datepickerShowing||e.datepicker._inDialog&&e.blockUI)&&(!i.hasClass(e.datepicker.markerClassName)||e.datepicker._curInst===n)||e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var o=e(t),s=this._getInst(o[0]);this._isDisabledDatepicker(o[0])||(this._adjustInstDate(s,i+("M"===n?this._get(s,"showCurrentAtPos"):0),n),this._updateDatepicker(s))},_gotoToday:function(t){var i,n=e(t),o=this._getInst(n[0]);this._get(o,"gotoCurrent")&&o.currentDay?(o.selectedDay=o.currentDay,o.drawMonth=o.selectedMonth=o.currentMonth,o.drawYear=o.selectedYear=o.currentYear):(i=new Date,o.selectedDay=i.getDate(),o.drawMonth=o.selectedMonth=i.getMonth(),o.drawYear=o.selectedYear=i.getFullYear()),this._notifyChange(o),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var o=e(t),s=this._getInst(o[0]);s["selected"+("M"===n?"Month":"Year")]=s["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(o)},_selectDay:function(t,i,n,o){var s,r=e(t);e(o).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(s=this._getInst(r[0]),s.selectedDay=s.currentDay=e("a",o).html(),s.selectedMonth=s.currentMonth=i,s.selectedYear=s.currentYear=n,this._selectDate(t,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var n,o=e(t),s=this._getInst(o[0]);i=null!=i?i:this._formatDate(s),s.input&&s.input.val(i),this._updateAlternate(s),n=this._get(s,"onSelect"),n?n.apply(s.input?s.input[0]:null,[i,s]):s.input&&s.input.trigger("change"),s.inline?this._updateDatepicker(s):(this._hideDatepicker(),this._lastInput=s.input[0],"object"!=typeof s.input[0]&&s.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,n,o,s=this._get(t,"altField");s&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),o=this.formatDate(i,n,this._getFormatConfig(t)),e(s).each(function(){e(this).val(o)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,n){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var o,s,r,a,l=0,u=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),h=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,_=-1,b=!1,y=function(e){var i=o+1<t.length&&t.charAt(o+1)===e;return i&&o++,i},w=function(e){var t=y(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,o=new RegExp("^\\d{1,"+n+"}"),s=i.substring(l).match(o);if(!s)throw"Missing number at position "+l;return l+=s[0].length,parseInt(s[0],10)},k=function(t,n,o){var s=-1,r=e.map(y(t)?o:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(r,function(e,t){var n=t[1];if(i.substr(l,n.length).toLowerCase()===n.toLowerCase())return s=t[0],l+=n.length,!1}),s!==-1)return s+1;throw"Unknown name at position "+l},C=function(){if(i.charAt(l)!==t.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;o<t.length;o++)if(b)"'"!==t.charAt(o)||y("'")?C():b=!1;else switch(t.charAt(o)){case"d":v=w("d");break;case"D":k("D",h,d);break;case"o":_=w("o");break;case"m":g=w("m");break;case"M":g=k("M",p,f);break;case"y":m=w("y");break;case"@":a=new Date(w("@")),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((w("!")-this._ticksTo1970)/1e4),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"'":y("'")?C():b=!0;break;default:C()}if(l<i.length&&(r=i.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(m===-1?m=(new Date).getFullYear():m<100&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(m<=c?0:-100)),_>-1)for(g=1,v=_;;){if(s=this._getDaysInMonth(m,g-1),v<=s)break;g++,v-=s}if(a=this._daylightSavingAdjust(new Date(m,g-1,v)),a.getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";var n,o=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,s=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},u=function(e,t,i){var n=""+t;if(l(e))for(;n.length<i;)n="0"+n;return n},c=function(e,t,i,n){return l(e)?n[t]:i[t]},h="",d=!1;if(t)for(n=0;n<e.length;n++)if(d)"'"!==e.charAt(n)||l("'")?h+=e.charAt(n):d=!1;else switch(e.charAt(n)){case"d":h+=u("d",t.getDate(),2);break;case"D":h+=c("D",t.getDay(),o,s);break;case"o":h+=u("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=u("m",t.getMonth()+1,2);break;case"M":h+=c("M",t.getMonth(),r,a);break;case"y":h+=l("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":h+=t.getTime();break;case"!":h+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":d=!0;break;default:h+=e.charAt(n)}return h},_possibleChars:function(e){var t,i="",n=!1,o=function(i){var n=t+1<e.length&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;t<e.length;t++)if(n)"'"!==e.charAt(t)||o("'")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":o("'")?i+="'":n=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,o=this._getDefaultDate(e),s=o,r=this._getFormatConfig(e);try{s=this.parseDate(i,n,r)||o}catch(a){n=t?"":n}e.selectedDay=s.getDate(),e.drawMonth=e.selectedMonth=s.getMonth(),e.drawYear=e.selectedYear=s.getFullYear(),e.currentDay=n?s.getDate():0,e.currentMonth=n?s.getMonth():0,e.currentYear=n?s.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,n){var o=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},s=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(n){}for(var o=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,s=o.getFullYear(),r=o.getMonth(),a=o.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=l.exec(i);u;){switch(u[2]||"d"){case"d":case"D":a+=parseInt(u[1],10);break;case"w":case"W":a+=7*parseInt(u[1],10);break;case"m":case"M":r+=parseInt(u[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(s,r));break;case"y":case"Y":s+=parseInt(u[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(s,r))}u=l.exec(i)}return new Date(s,r,a)},r=null==i||""===i?n:"string"==typeof i?s(i):"number"==typeof i?isNaN(i)?n:o(i):new Date(i.getTime());return r=r&&"Invalid Date"===r.toString()?n:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,o=e.selectedMonth,s=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),o===e.selectedMonth&&s===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,"M")},next:function(){e.datepicker._adjustDate(n,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,n,o,s,r,a,l,u,c,h,d,p,f,m,g,v,_,b,y,w,k,C,x,D,S,M,R,I,P,T,E,A,$,N,H,L,F,W,j=new Date,O=this._daylightSavingAdjust(new Date(j.getFullYear(),j.getMonth(),j.getDate())),V=this._get(e,"isRTL"),q=this._get(e,"showButtonPanel"),z=this._get(e,"hideIfNoPrevNext"),B=this._get(e,"navigationAsDateFormat"),Y=this._getNumberOfMonths(e),K=this._get(e,"showCurrentAtPos"),U=this._get(e,"stepMonths"),X=1!==Y[0]||1!==Y[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(e,"min"),J=this._getMinMaxDate(e,"max"),Z=e.drawMonth-K,ee=e.drawYear;if(Z<0&&(Z+=12,ee--),J)for(t=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-Y[0]*Y[1]+1,J.getDate())),t=Q&&t<Q?Q:t;this._daylightSavingAdjust(new Date(ee,Z,1))>t;)Z--,Z<0&&(Z=11,ee--);for(e.drawMonth=Z,e.drawYear=ee,i=this._get(e,"prevText"),i=B?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,Z-U,1)),this._getFormatConfig(e)):i,n=this._canAdjustMonth(e,-1,ee,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+i+"</span></a>":z?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+i+"</span></a>",o=this._get(e,"nextText"),o=B?this.formatDate(o,this._daylightSavingAdjust(new Date(ee,Z+U,1)),this._getFormatConfig(e)):o,s=this._canAdjustMonth(e,1,ee,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+o+"</span></a>":z?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+o+"</span></a>",r=this._get(e,"currentText"),a=this._get(e,"gotoCurrent")&&e.currentDay?G:O,r=B?this.formatDate(r,a,this._getFormatConfig(e)):r,l=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",u=q?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(V?l:"")+(this._isInRange(e,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(V?"":l)+"</div>":"",c=parseInt(this._get(e,"firstDay"),10),c=isNaN(c)?0:c,h=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),_=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),y="",k=0;k<Y[0];k++){for(C="",this.maxRows=4,x=0;x<Y[1];x++){if(D=this._daylightSavingAdjust(new Date(ee,Z,e.selectedDay)),S=" ui-corner-all",M="",X){if(M+="<div class='ui-datepicker-group",Y[1]>1)switch(x){case 0:M+=" ui-datepicker-group-first",S=" ui-corner-"+(V?"right":"left");break;case Y[1]-1:M+=" ui-datepicker-group-last",S=" ui-corner-"+(V?"left":"right");break;default:M+=" ui-datepicker-group-middle",S=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===k?V?s:n:"")+(/all|right/.test(S)&&0===k?V?n:s:"")+this._generateMonthYearHeader(e,Z,ee,Q,J,k>0||x>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",R=h?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",w=0;w<7;w++)I=(w+c)%7,R+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[I]+"'>"+p[I]+"</span></th>";for(M+=R+"</tr></thead><tbody>",P=this._getDaysInMonth(ee,Z),ee===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,P)),T=(this._getFirstDayOfMonth(ee,Z)-c+7)%7,E=Math.ceil((T+P)/7),A=X&&this.maxRows>E?this.maxRows:E,this.maxRows=A,$=this._daylightSavingAdjust(new Date(ee,Z,1-T)),N=0;N<A;N++){for(M+="<tr>",H=h?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")($)+"</td>":"",w=0;w<7;w++)L=g?g.apply(e.input?e.input[0]:null,[$]):[!0,""],F=$.getMonth()!==Z,W=F&&!_||!L[0]||Q&&$<Q||J&&$>J,H+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+($.getTime()===D.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===$.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(W?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+L[1]+($.getTime()===G.getTime()?" "+this._currentClass:"")+($.getTime()===O.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(W?"":" data-handler='selectDay' data-event='click' data-month='"+$.getMonth()+"' data-year='"+$.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":W?"<span class='ui-state-default'>"+$.getDate()+"</span>":"<a class='ui-state-default"+($.getTime()===O.getTime()?" ui-state-highlight":"")+($.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+$.getDate()+"</a>")+"</td>",$.setDate($.getDate()+1),$=this._daylightSavingAdjust($);M+=H+"</tr>"}Z++,Z>11&&(Z=0,ee++),M+="</tbody></table>"+(X?"</div>"+(Y[0]>0&&x===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),C+=M}y+=C}return y+=u,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,i,n,o,s,r,a){var l,u,c,h,d,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),_=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(s||!g)y+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(l=n&&n.getFullYear()===i,u=o&&o.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=n.getMonth())&&(!u||c<=o.getMonth())&&(y+="<option value='"+c+"'"+(c===t?" selected='selected'":"")+">"+a[c]+"</option>");y+="</select>"}if(_||(b+=y+(!s&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",s||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);
return isNaN(t)?d:t},f=p(h[0]),m=Math.max(f,p(h[1]||"")),f=n?Math.max(f,n.getFullYear()):f,m=o?Math.min(m,o.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=m;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),_&&(b+=(!s&&g&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(e,t,i){var n=e.drawYear+("Y"===i?t:0),o=e.drawMonth+("M"===i?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(n,o))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,o,s)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),o=i&&t<i?i:t;return n&&o>n?n:o},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var o=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(i,n+(t<0?t:o[0]*o[1]),1));return t<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var i,n,o=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),r=null,a=null,l=this._get(e,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),r=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!o||t.getTime()>=o.getTime())&&(!s||t.getTime()<=s.getTime())&&(!r||t.getFullYear()>=r)&&(!a||t.getFullYear()<=a)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var o=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),o,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.4"}(n)},{"./core":"jquery-ui/core",jquery:"jquery"}],"jquery-ui/menu":[function(e,t,i){var n=e("jquery");e("./core"),e("./widget"),e("./position"),/*!
* jQuery UI Menu 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/menu/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.position.js
*/
function(e,t){e.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var i=e(t.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=e(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,o,s,r,a,l=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:l=!1,o=this.previousFilter||"",s=String.fromCharCode(t.keyCode),r=!1,clearTimeout(this.filterTimer),s===o?r=!0:s=o+s,a=new RegExp("^"+i(s),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(e(this).children("a").text())}),n=r&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(s=String.fromCharCode(t.keyCode),a=new RegExp("^"+i(s),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(e(this).children("a").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,i=this.options.icons.submenu,n=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),n.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),n=t.prev("a"),o=e("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(o),t.attr("aria-labelledby",n.attr("id"))}),t=n.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),this._super(e,t)},focus:function(e,t){var i,n;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,n,o,s,r,a;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,o=t.offset().top-this.activeMenu.offset().top-i-n,s=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=t.height(),o<0?this.activeMenu.scrollTop(s+o):o+a>r&&this.activeMenu.scrollTop(s+o-r+a))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(t),this.activeMenu=n},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var n;this.active&&(n="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(i,n)},nextPage:function(t){var i,n,o;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n-o<0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(t)},previousPage:function(t){var i,n,o;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n+o>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first()))):void this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)}})}(n)},{"./core":"jquery-ui/core","./position":"jquery-ui/position","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/mouse":[function(e,t,i){var n=e("jquery");e("./widget"),/*!
* jQuery UI Mouse 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/mouse/
*
* Depends:
* jquery.ui.widget.js
*/
function(e,t){var i=!1;e(document).mouseup(function(){i=!1}),e.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){if(!0===e.data(i.target,t.widgetName+".preventClickEvent"))return e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!i){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,o=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(o&&!s&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),i=!0,!0))}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(n)},{"./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/position":[function(e,t,i){var n=e("jquery");/*!
* jQuery UI Position 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/position/
*/
!function(e,t){function i(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function n(t,i){return parseInt(e.css(t,i),10)||0}function o(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var s,r=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(s!==t)return s;var i,n,o=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=o.children()[0];return e("body").append(o),i=r.offsetWidth,o.css("overflow","scroll"),n=r.offsetWidth,i===n&&(n=o[0].clientWidth),o.remove(),s=i-n},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),n=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),o="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,s="scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight;return{width:s?e.position.scrollbarWidth():0,height:o?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]),o=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:o,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return f.apply(this,arguments);t=e.extend({},t);var s,p,m,g,v,_,b=e(t.of),y=e.position.getWithinInfo(t.within),w=e.position.getScrollInfo(y),k=(t.collision||"flip").split(" "),C={};return _=o(b),b[0].preventDefault&&(t.at="left top"),p=_.width,m=_.height,g=_.offset,v=e.extend({},g),e.each(["my","at"],function(){var e,i,n=(t[this]||"").split(" ");1===n.length&&(n=u.test(n[0])?n.concat(["center"]):c.test(n[0])?["center"].concat(n):["center","center"]),n[0]=u.test(n[0])?n[0]:"center",n[1]=c.test(n[1])?n[1]:"center",e=h.exec(n[0]),i=h.exec(n[1]),C[this]=[e?e[0]:0,i?i[0]:0],t[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===t.at[0]?v.left+=p:"center"===t.at[0]&&(v.left+=p/2),"bottom"===t.at[1]?v.top+=m:"center"===t.at[1]&&(v.top+=m/2),s=i(C.at,p,m),v.left+=s[0],v.top+=s[1],this.each(function(){var o,u,c=e(this),h=c.outerWidth(),d=c.outerHeight(),f=n(this,"marginLeft"),_=n(this,"marginTop"),x=h+f+n(this,"marginRight")+w.width,D=d+_+n(this,"marginBottom")+w.height,S=e.extend({},v),M=i(C.my,c.outerWidth(),c.outerHeight());"right"===t.my[0]?S.left-=h:"center"===t.my[0]&&(S.left-=h/2),"bottom"===t.my[1]?S.top-=d:"center"===t.my[1]&&(S.top-=d/2),S.left+=M[0],S.top+=M[1],e.support.offsetFractions||(S.left=l(S.left),S.top=l(S.top)),o={marginLeft:f,marginTop:_},e.each(["left","top"],function(i,n){e.ui.position[k[i]]&&e.ui.position[k[i]][n](S,{targetWidth:p,targetHeight:m,elemWidth:h,elemHeight:d,collisionPosition:o,collisionWidth:x,collisionHeight:D,offset:[s[0]+M[0],s[1]+M[1]],my:t.my,at:t.at,within:y,elem:c})}),t.using&&(u=function(e){var i=g.left-S.left,n=i+p-h,o=g.top-S.top,s=o+m-d,l={target:{element:b,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:S.left,top:S.top,width:h,height:d},horizontal:n<0?"left":i>0?"right":"center",vertical:s<0?"top":o>0?"bottom":"middle"};p<h&&a(i+n)<p&&(l.horizontal="center"),m<d&&a(o+s)<m&&(l.vertical="middle"),r(a(i),a(n))>r(a(o),a(s))?l.important="horizontal":l.important="vertical",t.using.call(this,e,l)}),c.offset(e.extend(S,{using:u}))})},e.ui.position={fit:{left:function(e,t){var i,n=t.within,o=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,a=e.left-t.collisionPosition.marginLeft,l=o-a,u=a+t.collisionWidth-s-o;t.collisionWidth>s?l>0&&u<=0?(i=e.left+l+t.collisionWidth-s-o,e.left+=l-i):u>0&&l<=0?e.left=o:l>u?e.left=o+s-t.collisionWidth:e.left=o:l>0?e.left+=l:u>0?e.left-=u:e.left=r(e.left-a,e.left)},top:function(e,t){var i,n=t.within,o=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,a=e.top-t.collisionPosition.marginTop,l=o-a,u=a+t.collisionHeight-s-o;t.collisionHeight>s?l>0&&u<=0?(i=e.top+l+t.collisionHeight-s-o,e.top+=l-i):u>0&&l<=0?e.top=o:l>u?e.top=o+s-t.collisionHeight:e.top=o:l>0?e.top+=l:u>0?e.top-=u:e.top=r(e.top-a,e.top)}},flip:{left:function(e,t){var i,n,o=t.within,s=o.offset.left+o.scrollLeft,r=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,h=u+t.collisionWidth-r-l,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];c<0?(i=e.left+d+p+f+t.collisionWidth-r-s,(i<0||i<a(c))&&(e.left+=d+p+f)):h>0&&(n=e.left-t.collisionPosition.marginLeft+d+p+f-l,(n>0||a(n)<h)&&(e.left+=d+p+f))},top:function(e,t){var i,n,o=t.within,s=o.offset.top+o.scrollTop,r=o.height,l=o.isWindow?o.scrollTop:o.offset.top,u=e.top-t.collisionPosition.marginTop,c=u-l,h=u+t.collisionHeight-r-l,d="top"===t.my[1],p=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];c<0?(n=e.top+p+f+m+t.collisionHeight-r-s,e.top+p+f+m>c&&(n<0||n<a(c))&&(e.top+=p+f+m)):h>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-l,e.top+p+f+m>h&&(i>0||a(i)<h)&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,n,o,s,r=document.getElementsByTagName("body")[0],a=document.createElement("div");t=document.createElement(r?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(s in n)t.style[s]=n[s];t.appendChild(a),i=r||document.documentElement,i.insertBefore(t,i.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",o=e(a).offset().left,e.support.offsetFractions=o>10&&o<11,t.innerHTML="",i.removeChild(t)}()}(n)},{jquery:"jquery"}],"jquery-ui/slider":[function(e,t,i){var n=e("jquery");e("./core"),e("./mouse"),e("./widget"),/*!
* jQuery UI Slider 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/slider/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
function(e,t){var i=5;e.widget("ui.slider",e.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,n=this.options,o=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),s="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",r=[];for(i=n.values&&n.values.length||1,o.length>i&&(o.slice(i).remove(),o=o.slice(0,i)),t=o.length;t<i;t++)r.push(s);this.handles=o.add(e(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var e=this.handles.add(this.range).filter("a");this._off(e),this._on(e,this._handleEvents),this._hoverable(e),this._focusable(e)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,n,o,s,r,a,l,u,c=this,h=this.options;return!h.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(i),o=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(n-c.values(t));(o>i||o===i&&(t===c._lastChangedValue||c.values(t)===h.min))&&(o=i,s=e(this),r=t)}),a=this._start(t,r),a!==!1&&(this._mouseSliding=!0,this._handleIndex=r,s.addClass("ui-state-active").focus(),l=s.offset(),u=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:t.pageX-l.left-s.width()/2,top:t.pageY-l.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,n,o,s;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/t,n>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),o=this._valueMax()-this._valueMin(),s=this._valueMin()+n*o,this._trimAlignValue(s)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var n,o,s;this.options.values&&this.options.values.length?(n=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>n||1===t&&i<n)&&(i=n),i!==this.values(t)&&(o=this.values(),o[t]=i,s=this._trigger("slide",e,{handle:this.handles[t],value:i,values:o}),n=this.values(t?0:1),s!==!1&&this.values(t,i))):i!==this.value()&&(s=this._trigger("slide",e,{handle:this.handles[t],value:i}),s!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,i){var n,o,s;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(n=this.options.values,o=arguments[0],s=0;s<n.length;s+=1)n[s]=this._trimAlignValue(o[s]),this._change(null,s);this._refreshValue()},_setOption:function(t,i){var n,o=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(o=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;n<o;n+=1)this._change(null,n);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,n;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,n=e-i;return 2*Math.abs(i)>=t&&(n+=i>0?t:-t),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,n,o,s,r=this.options.range,a=this.options,l=this,u=!this._animateOff&&a.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[u?"animate":"css"](c,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[u?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[u?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:a.animate}))),t=i}):(n=this.value(),o=this._valueMin(),s=this._valueMax(),i=s!==o?(n-o)/(s-o)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](c,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(t){var n,o,s,r,a=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass("ui-state-active"),n=this._start(t,a),n===!1))return}switch(r=this.options.step,o=s=this.options.values&&this.options.values.length?this.values(a):this.value(),t.keyCode){case e.ui.keyCode.HOME:s=this._valueMin();break;case e.ui.keyCode.END:s=this._valueMax();break;case e.ui.keyCode.PAGE_UP:s=this._trimAlignValue(o+(this._valueMax()-this._valueMin())/i);break;case e.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(o-(this._valueMax()-this._valueMin())/i);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(o===this._valueMax())return;s=this._trimAlignValue(o+r);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(o===this._valueMin())return;s=this._trimAlignValue(o-r)}this._slide(t,a,s)},click:function(e){e.preventDefault()},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}})}(n)},{"./core":"jquery-ui/core","./mouse":"jquery-ui/mouse","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/sortable":[function(e,t,i){var n=e("jquery");e("./core"),e("./mouse"),e("./widget"),/*!
* jQuery UI Sortable 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/sortable/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
function(e,t){function i(e,t,i){return e>t&&e<t+i}function n(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))}e.widget("ui.sortable",e.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===e.axis||n(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,i){"disabled"===t?(this.options[t]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,i){var n=null,o=!1,s=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each(function(){if(e.data(this,s.widgetName+"-item")===s)return n=e(this),!1}),e.data(t.target,s.widgetName+"-item")===s&&(n=e(t.target)),!!n&&(!(this.options.handle&&!i&&(e(this.options.handle,n).find("*").addBack().each(function(){this===t.target&&(o=!0)}),!o))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,i,n){var o,s,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(s=this.document.find("body"),this.storedCursor=s.css("cursor"),s.css("cursor",r.cursor),this.storedStylesheet=e("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(s)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,n,o,s,r=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:t.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:t.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(t.pageY-e(document).scrollTop()<r.scrollSensitivity?a=e(document).scrollTop(e(document).scrollTop()-r.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<r.scrollSensitivity&&(a=e(document).scrollTop(e(document).scrollTop()+r.scrollSpeed)),t.pageX-e(document).scrollLeft()<r.scrollSensitivity?a=e(document).scrollLeft(e(document).scrollLeft()-r.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<r.scrollSensitivity&&(a=e(document).scrollLeft(e(document).scrollLeft()+r.scrollSpeed))),a!==!1&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],o=n.item[0],s=this._intersectsWithPointer(n),s&&n.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===s?"next":"prev"]()[0]===o||e.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],o))){if(this.direction=1===s?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var n=this,o=this.placeholder.offset(),s=this.options.axis,r={};s&&"x"!==s||(r.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),s&&"y"!==s||(r.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){n._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&n.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},i.each(function(){n.push(e(t.item||this).attr(t.attribute||"id")||"")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,s=e.left,r=s+e.width,a=e.top,l=a+e.height,u=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||n+u>a&&n+u<l,d="y"===this.options.axis||t+c>s&&t+c<r,p=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:s<t+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<n+this.helperProportions.height/2&&o-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t="x"===this.options.axis||i(this.positionAbs.top+this.offset.click.top,e.top,e.height),n="y"===this.options.axis||i(this.positionAbs.left+this.offset.click.left,e.left,e.width),o=t&&n,s=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return!!o&&(this.floating?r&&"right"===r||"down"===s?2:1:s&&("down"===s?2:1))},_intersectsWithSides:function(e){var t=i(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=i(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),o=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&n||"left"===s&&!n:o&&("down"===o&&t||"up"===o&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){a.push(this)}var n,o,s,r,a=[],l=[],u=this._connectWith();if(u&&t)for(n=u.length-1;n>=0;n--)for(s=e(u[n]),o=s.length-1;o>=0;o--)r=e.data(s[o],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([e.isFunction(r.options.items)?r.options.items.call(r.element):e(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;i<t.length;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,n,o,s,r,a,l,u,c=this.items,h=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(o=e(d[i]),n=o.length-1;n>=0;n--)s=e.data(o[n],this.widgetFullName),s&&s!==this&&!s.options.disabled&&(h.push([e.isFunction(s.options.items)?s.options.items.call(s.element[0],t,{item:this.currentItem}):e(s.options.items,s.element),s]),this.containers.push(s));for(i=h.length-1;i>=0;i--)for(r=h[i][1],a=h[i][0],n=0,u=a.length;n<u;n++)l=e(a[n]),l.data(this.widgetName+"-item",r),c.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,o,s;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?e(this.options.toleranceElement,n.item):n.item,t||(n.width=o.outerWidth(),n.height=o.outerHeight()),s=o.offset(),n.left=s.left,n.top=s.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)s=this.containers[i].element.offset(),this.containers[i].containerCache.left=s.left,this.containers[i].containerCache.top=s.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,n=t.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=t.currentItem[0].nodeName.toLowerCase(),o=e("<"+n+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?t.currentItem.children().each(function(){e("<td>&#160;</td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(o)}):"img"===n&&o.attr("src",t.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(e,o){i&&!n.forcePlaceholderSize||(o.height()||o.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var o,s,r,a,l,u,c,h,d,p,f=null,m=null;for(o=this.containers.length-1;o>=0;o--)if(!e.contains(this.currentItem[0],this.containers[o].element[0]))if(this._intersectsWith(this.containers[o].containerCache)){if(f&&e.contains(this.containers[o].element[0],f.element[0]))continue;f=this.containers[o],m=o}else this.containers[o].containerCache.over&&(this.containers[o]._trigger("out",t,this._uiHash(this)),this.containers[o].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",t,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(r=1e4,a=null,p=f.floating||n(this.currentItem),l=p?"left":"top",u=p?"width":"height",c=this.positionAbs[l]+this.offset.click[l],s=this.items.length-1;s>=0;s--)e.contains(this.containers[m].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(p&&!i(this.positionAbs.top+this.offset.click.top,this.items[s].top,this.items[s].height)||(h=this.items[s].item.offset()[l],d=!1,Math.abs(h-c)>Math.abs(h+this.items[s][u]-c)&&(d=!0,h+=this.items[s][u]),Math.abs(h-c)<r&&(r=Math.abs(h-c),a=this.items[s],this.direction=d?"up":"down")));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[m].element,!0),this._trigger("change",t,this._uiHash()),this.containers[m]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",t,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===o.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===o.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(t=e(o.containment)[0],i=e(o.containment).offset(),n="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"===t?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:o.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:o.scrollLeft())*n}},_generatePosition:function(t){var i,n,o=this.options,s=t.pageX,r=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/o.grid[1])*o.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,n=this.originalPageX+Math.round((s-this.originalPageX)/o.grid[0])*o.grid[0],s=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-o.grid[0]:n+o.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!n)})},_clear:function(e,t){function i(e,t,i){return function(n){i._trigger(e,n,t._uiHash(t))}}this.reverting=!1;var n,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&o.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||o.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(o.push(function(e){this._trigger("remove",e,this._uiHash())}),o.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)t||o.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(o.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger("beforeStop",e,this._uiHash()),n=0;n<o.length;n++)o[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!1}if(t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!t){for(n=0;n<o.length;n++)o[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})}(n)},{"./core":"jquery-ui/core","./mouse":"jquery-ui/mouse","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/spinner":[function(e,t,i){var n=e("jquery");e("./core"),e("./widget"),e("./button"),/*!
* jQuery UI Spinner 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/spinner/
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.button.js
*/
function(e){function t(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.widget("ui.spinner",{version:"1.10.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,n){var o=i.attr(n);void 0!==o&&o.length&&(t[n]=o)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",e)))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(e(t.currentTarget).hasClass("ui-state-active"))return this._start(t)!==!1&&void this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,n=e.ui.keyCode;switch(t.keyCode){case n.UP:return this._repeat(null,1,t),!0;case n.DOWN:return this._repeat(null,-1,t),!0;case n.PAGE_UP:return this._repeat(null,i.page,t),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(e){return!(!this.spinning&&this._trigger("start",e)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(".");return i===-1?0:t.length-i-1},_adjustValue:function(e){var t,i,n=this.options;return t=null!==n.min?n.min:0,i=e-t,i=Math.round(i/n.step)*n.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==n.max&&e>n.max?n.max:null!==n.min&&e<n.min?n.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,void this.element.val(this._format(i))}"max"!==e&&"min"!==e&&"step"!==e||"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(t?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:t(function(e){this._super(e),this._value(this.element.val())}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:t(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:t(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:t(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:t(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?void t(this._value).call(this,e):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(n)},{"./button":"jquery-ui/button","./core":"jquery-ui/core","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/widget":[function(e,t,i){var n=e("jquery");/*!
* jQuery UI Widget 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/jQuery.widget/
*/
!function(e,t){var i=0,n=Array.prototype.slice,o=e.cleanData;e.cleanData=function(t){for(var i,n=0;null!=(i=t[n]);n++)try{e(i).triggerHandler("remove")}catch(s){}o(t)},e.widget=function(t,i,n){var o,s,r,a,l={},u=t.split(".")[0];t=t.split(".")[1],o=u+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][o.toLowerCase()]=function(t){return!!e.data(t,o)},e[u]=e[u]||{},s=e[u][t],r=e[u][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new r(e,t)},e.extend(r,s,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),a=new i,a.options=e.widget.extend({},a.options),e.each(n,function(t,n){return e.isFunction(n)?void(l[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},o=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,s=this._superApply;return this._super=e,this._superApply=o,t=n.apply(this,arguments),this._super=i,this._superApply=s,t}}()):void(l[t]=n)}),r.prototype=e.widget.extend(a,{widgetEventPrefix:s?a.widgetEventPrefix||t:t},l,{constructor:r,namespace:u,widgetName:t,widgetFullName:o}),s?(e.each(s._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete s._childConstructors):i._childConstructors.push(r),e.widget.bridge(t,r)},e.widget.extend=function(i){for(var o,s,r=n.call(arguments,1),a=0,l=r.length;a<l;a++)for(o in r[a])s=r[a][o],r[a].hasOwnProperty(o)&&s!==t&&(e.isPlainObject(s)?i[o]=e.isPlainObject(i[o])?e.widget.extend({},i[o],s):e.widget.extend({},s):i[o]=s);return i},e.widget.bridge=function(i,o){var s=o.prototype.widgetFullName||i;e.fn[i]=function(r){var a="string"==typeof r,l=n.call(arguments,1),u=this;return r=!a&&l.length?e.widget.extend.apply(null,[r].concat(l)):r,a?this.each(function(){var n,o=e.data(this,s);return o?e.isFunction(o[r])&&"_"!==r.charAt(0)?(n=o[r].apply(o,l),n!==o&&n!==t?(u=n&&n.jquery?u.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,s);t?t.option(r||{})._init():e.data(this,s,new o(r,this))}),u}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,n){var o,s,r,a=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(a={},o=i.split("."),i=o.shift(),o.length){for(s=a[i]=e.widget.extend({},this.options[i]),r=0;r<o.length-1;r++)s[o[r]]=s[o[r]]||{},s=s[o[r]];if(i=o.pop(),1===arguments.length)return s[i]===t?null:s[i];s[i]=n}else{if(1===arguments.length)return this.options[i]===t?null:this.options[i];a[i]=n}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,i,n){var o,s=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=o=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,o=this.widget()),e.each(n,function(n,r){function a(){if(t||s.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof r?s[r]:r).apply(s,arguments)}"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+s.eventNamespace,c=l[2];c?o.delegate(c,u,a):i.bind(u,a)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,n){var o,s,r=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],s=i.originalEvent)for(o in s)o in i||(i[o]=s[o]);return this.element.trigger(i,n),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,o,s){"string"==typeof o&&(o={effect:o});var r,a=o?o===!0||"number"==typeof o?i:o.effect||i:t;o=o||{},"number"==typeof o&&(o={duration:o}),r=!e.isEmptyObject(o),o.complete=s,o.delay&&n.delay(o.delay),r&&e.effects&&e.effects.effect[a]?n[t](o):a!==t&&n[a]?n[a](o.duration,o.easing,s):n.queue(function(i){e(this)[t](),s&&s.call(n[0]),i()})}})}(n)},{jquery:"jquery"}],"bootstrap/button":[function(e,t,i){var n=e("jquery"),o=function(e,t){this.$element=n(e),this.options=n.extend({},o.DEFAULTS,t),this.isLoading=!1};o.DEFAULTS={loadingText:"loading..."},o.prototype.setState=function(e){var t="bk-bs-disabled",i=this.$element,o=i.is("input")?"val":"html",s=i.data();e+="Text",s.resetText||i.data("resetText",i[o]()),i[o](s[e]||this.options[e]),setTimeout(n.proxy(function(){"loadingText"==e?(this.isLoading=!0,i.addClass(t).attr(t,t)):this.isLoading&&(this.isLoading=!1,i.removeClass(t).removeAttr(t))},this),0)},o.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-bk-bs-toggle="buttons"]');if(t.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("bk-bs-active")?e=!1:t.find(".bk-bs-active").removeClass("bk-bs-active")),e&&i.prop("checked",!this.$element.hasClass("bk-bs-active")).trigger("change")}e&&this.$element.toggleClass("bk-bs-active")};var s=n.fn.button;n.fn.button=function(e){return this.each(function(){var t=n(this),i=t.data("bk-bs.button"),s="object"==typeof e&&e;i||t.data("bk-bs.button",i=new o(this,s)),"toggle"==e?i.toggle():e&&i.setState(e)})},n.fn.button.Constructor=o,n.fn.button.noConflict=function(){return n.fn.button=s,this},n(document).on("click.bk-bs.button.data-api","[data-bk-bs-toggle^=button]",function(e){var t=n(e.target);t.hasClass("bk-bs-btn")||(t=t.closest(".bk-bs-btn")),t.button("toggle"),e.preventDefault()})},{jquery:"jquery"}],"bootstrap/modal":[function(e,t,i){var n=e("jquery"),o=function(e,t){this.options=t,this.$element=n(e),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".bk-bs-modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bk-bs.modal")},this))};o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},o.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},o.prototype.show=function(e){var t=this,i=n.Event("show.bk-bs.modal",{relatedTarget:e});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bk-bs.modal",'[data-bk-bs-dismiss="modal"]',n.proxy(this.hide,this)),this.backdrop(function(){var i=n.support.transition&&t.$element.hasClass("bk-bs-fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show().scrollTop(0),i&&t.$element[0].offsetWidth,t.$element.addClass("bk-bs-in").attr("aria-hidden",!1),t.enforceFocus();var o=n.Event("shown.bk-bs.modal",{relatedTarget:e});i?t.$element.find(".bk-bs-modal-dialog").one(n.support.transition.end,function(){t.$element.focus().trigger(o)}).emulateTransitionEnd(300):t.$element.focus().trigger(o)}))},o.prototype.hide=function(e){e&&e.preventDefault(),e=n.Event("hide.bk-bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),n(document).off("focusin.bk-bs.modal"),this.$element.removeClass("bk-bs-in").attr("aria-hidden",!0).off("click.dismiss.bk-bs.modal"),n.support.transition&&this.$element.hasClass("bk-bs-fade")?this.$element.one(n.support.transition.end,n.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},o.prototype.enforceFocus=function(){n(document).off("focusin.bk-bs.modal").on("focusin.bk-bs.modal",n.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.focus()},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bk-bs.modal",n.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bk-bs.modal")},o.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bk-bs.modal")})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var t=this.$element.hasClass("bk-bs-fade")?"bk-bs-fade":"";if(this.isShown&&this.options.backdrop){var i=n.support.transition&&t;if(this.$backdrop=n('<div class="bk-bs-modal-backdrop '+t+'" />').appendTo(document.body),this.$element.on("click.dismiss.bk-bs.modal",n.proxy(function(e){e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("bk-bs-in"),!e)return;i?this.$backdrop.one(n.support.transition.end,e).emulateTransitionEnd(150):e()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("bk-bs-in"),n.support.transition&&this.$element.hasClass("bk-bs-fade")?this.$backdrop.one(n.support.transition.end,e).emulateTransitionEnd(150):e()):e&&e()};var s=n.fn.modal;n.fn.modal=function(e,t){return this.each(function(){var i=n(this),s=i.data("bk-bs.modal"),r=n.extend({},o.DEFAULTS,i.data(),"object"==typeof e&&e);s||i.data("bk-bs.modal",s=new o(this,r)),"string"==typeof e?s[e](t):r.show&&s.show(t)})},n.fn.modal.Constructor=o,n.fn.modal.noConflict=function(){return n.fn.modal=s,this},n(document).on("click.bk-bs.modal.data-api",'[data-bk-bs-toggle="modal"]',function(e){var t=n(this),i=t.attr("href"),o=n(t.attr("data-bk-bs-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bk-bs.modal")?"toggle":n.extend({remote:!/#/.test(i)&&i},o.data(),t.data());t.is("a")&&e.preventDefault(),o.modal(s,this).one("hide",function(){t.is(":visible")&&t.focus()})}),n(document).on("show.bk-bs.modal",".bk-bs-modal",function(){n(document.body).addClass("bk-bs-modal-open")}).on("hidden.bk-bs.modal",".bk-bs-modal",function(){n(document.body).removeClass("bk-bs-modal-open")})},{jquery:"jquery"}],"bootstrap/tab":[function(e,t,i){var n=e("jquery"),o=function(e){this.element=n(e)};o.prototype.show=function(){var e=this.element,t=e.closest("ul:not(.bk-bs-dropdown-menu)"),i=e.data("bk-bs-target");if(i||(i=e.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("bk-bs-active")){var o=t.find(".bk-bs-active:last a")[0],s=n.Event("show.bk-bs.tab",{relatedTarget:o});if(e.trigger(s),!s.isDefaultPrevented()){var r=n(i);this.activate(e.parent("li"),t),this.activate(r,r.parent(),function(){e.trigger({type:"shown.bk-bs.tab",relatedTarget:o})})}}},o.prototype.activate=function(e,t,i){function o(){s.removeClass("bk-bs-active").find("> .bk-bs-dropdown-menu > .bk-bs-active").removeClass("bk-bs-active"),e.addClass("bk-bs-active"),r?(e[0].offsetWidth,e.addClass("bk-bs-in")):e.removeClass("bk-bs-fade"),e.parent(".bk-bs-dropdown-menu")&&e.closest("li.bk-bs-dropdown").addClass("bk-bs-active"),i&&i()}var s=t.find("> .bk-bs-active"),r=i&&n.support.transition&&s.hasClass("bk-bs-fade");r?s.one(n.support.transition.end,o).emulateTransitionEnd(150):o(),s.removeClass("bk-bs-in")};var s=n.fn.tab;n.fn.tab=function(e){return this.each(function(){var t=n(this),i=t.data("bk-bs.tab");i||t.data("bk-bs.tab",i=new o(this)),"string"==typeof e&&i[e]()})},n.fn.tab.Constructor=o,n.fn.tab.noConflict=function(){return n.fn.tab=s,this},n(document).on("click.bk-bs.tab.data-api",'[data-bk-bs-toggle="tab"], [data-bk-bs-toggle="pill"]',function(e){e.preventDefault(),n(this).tab("show")})},{jquery:"jquery"}],"jqrangeslider/jQDateRangeSlider":[function(e,t,i){/**
* jQRangeSlider
* A javascript slider selector that supports dates
*
* Copyright (C) Guillaume Gautreau 2012
* Dual licensed under the MIT or GPL Version 2 licenses.
*
*/
var n=e("jquery");e("./jQRangeSlider"),t.exports=n.widget("ui.dateRangeSlider",n.ui.rangeSlider,{options:{bounds:{min:new Date(2010,0,1).valueOf(),max:new Date(2012,0,1).valueOf()},defaultValues:{min:new Date(2010,1,11).valueOf(),max:new Date(2011,1,11).valueOf()}},_create:function(){n.ui.rangeSlider.prototype._create.apply(this),this.element.addClass("bk-ui-dateRangeSlider")},destroy:function(){this.element.removeClass("bk-ui-dateRangeSlider"),n.ui.rangeSlider.prototype.destroy.apply(this)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min.valueOf(),max:this.options.defaultValues.max.valueOf()}},_setRulerParameters:function(){this.ruler.ruler({min:new Date(this.options.bounds.min),max:new Date(this.options.bounds.max),scales:this.options.scales})},_setOption:function(e,t){("defaultValues"===e||"bounds"===e)&&"undefined"!=typeof t&&null!==t&&this._isValidDate(t.min)&&this._isValidDate(t.max)?n.ui.rangeSlider.prototype._setOption.apply(this,[e,{min:t.min.valueOf(),max:t.max.valueOf()}]):n.ui.rangeSlider.prototype._setOption.apply(this,this._toArray(arguments))},_handleType:function(){return"dateRangeSliderHandle"},option:function(e){if("bounds"===e||"defaultValues"===e){var t=n.ui.rangeSlider.prototype.option.apply(this,arguments);return{min:new Date(t.min),max:new Date(t.max)}}return n.ui.rangeSlider.prototype.option.apply(this,this._toArray(arguments))},_defaultFormatter:function(e){var t=e.getMonth()+1,i=e.getDate();return""+e.getFullYear()+"-"+(t<10?"0"+t:t)+"-"+(i<10?"0"+i:i)},_getFormatter:function(){var e=this.options.formatter;return this.options.formatter!==!1&&null!==this.options.formatter||(e=this._defaultFormatter),function(e){return function(t){return e(new Date(t))}}(e)},values:function(e,t){var i=null;return i=this._isValidDate(e)&&this._isValidDate(t)?n.ui.rangeSlider.prototype.values.apply(this,[e.valueOf(),t.valueOf()]):n.ui.rangeSlider.prototype.values.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},min:function(e){return this._isValidDate(e)?new Date(n.ui.rangeSlider.prototype.min.apply(this,[e.valueOf()])):new Date(n.ui.rangeSlider.prototype.min.apply(this))},max:function(e){return this._isValidDate(e)?new Date(n.ui.rangeSlider.prototype.max.apply(this,[e.valueOf()])):new Date(n.ui.rangeSlider.prototype.max.apply(this))},bounds:function(e,t){var i;return i=this._isValidDate(e)&&this._isValidDate(t)?n.ui.rangeSlider.prototype.bounds.apply(this,[e.valueOf(),t.valueOf()]):n.ui.rangeSlider.prototype.bounds.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},_isValidDate:function(e){return"undefined"!=typeof e&&e instanceof Date},_toArray:function(e){return Array.prototype.slice.call(e)}})},{"./jQRangeSlider":"jqrangeslider/jQRangeSlider",jquery:"jquery"}],"jqrangeslider/jQRangeSlider":[function(e,t,i){/**
* jQRangeSlider
* A javascript slider selector that supports dates
*
* Copyright (C) Guillaume Gautreau 2012
* Dual licensed under the MIT or GPL Version 2 licenses.
*
*/
var n=e("jquery");e("jquery-ui/core"),e("jquery-ui/widget"),e("jquery-ui/mouse"),e("jquery-mousewheel"),t.exports=n.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(n.proxy(this.resize,this),1),setTimeout(n.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var e=this;this._resizeProxy=function(t){e.resize(t)},n(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(e,t){this._setWheelOption(e,t),this._setArrowsOption(e,t),this._setLabelsOption(e,t),this._setLabelsDurations(e,t),this._setFormatterOption(e,t),this._setBoundsOption(e,t),this._setRangeOption(e,t),this._setStepOption(e,t),this._setScalesOption(e,t),this._setEnabledOption(e,t),this._setPositionningOption(e,t)},_validProperty:function(e,t,i){return null===e||"undefined"==typeof e[t]?i:e[t]},_setStepOption:function(e,t){"step"===e&&(this.options.step=t,this._leftHandle("option","step",t),this._rightHandle("option","step",t),this._changed(!0))},_setScalesOption:function(e,t){"scales"===e&&(t===!1||null===t?(this.options.scales=!1,this._destroyRuler()):t instanceof Array&&(this.options.scales=t,this._updateRuler()))},_setRangeOption:function(e,t){"range"===e&&(this._bar("option","range",t),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(e,t){"bounds"===e&&"undefined"!=typeof t.min&&"undefined"!=typeof t.max&&this.bounds(t.min,t.max)},_setWheelOption:function(e,t){"wheelMode"!==e&&"wheelSpeed"!==e||(this._bar("option",e,t),this.options[e]=this._bar("option",e))},_setLabelsOption:function(e,t){if("valueLabels"===e){if("hide"!==t&&"show"!==t&&"change"!==t)return;this.options.valueLabels=t,"hide"!==t?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(e,t){"formatter"===e&&null!==t&&"function"==typeof t&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",t),this.options.formatter=this._rightLabel("option","formatter",t))},_setArrowsOption:function(e,t){"arrows"!==e||t!==!0&&t!==!1||t===this.options.arrows||(t===!0?(this.element.removeClass("bk-ui-rangeSlider-noArrow").addClass("bk-ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):t===!1&&(this.element.addClass("bk-ui-rangeSlider-noArrow").removeClass("bk-ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(e,t){if("durationIn"===e||"durationOut"===e||"delayOut"===e){if(parseInt(t,10)!==t)return;null!==this.labels.left&&this._leftLabel("option",e,t),null!==this.labels.right&&this._rightLabel("option",e,t),this.options[e]=t}},_setEnabledOption:function(e,t){"enabled"===e&&this.toggle(t)},_setPositionningOption:function(e,t){"symmetricPositionning"===e&&(this._rightHandle("option",e,t),this.options[e]=this._leftHandle("option",e,t))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("bk-ui-rangeSlider"),this.container=n("<div class='bk-ui-rangeSlider-container' />").css("position","absolute").appendTo(this.element),this.innerBar=n("<div class='bk-ui-rangeSlider-innerBar' />").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(e){return n("<div />")[this._handleType()](e).bind("sliderDrag",n.proxy(this._changing,this)).bind("stop",n.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=n("<div />").prependTo(this.container).bind("sliderDrag scroll zoom",n.proxy(this._changing,this)).bind("stop",n.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("bk-ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("bk-ui-rangeSlider-noArrow"))},_createArrow:function(e){var t,i=n("<div class='bk-ui-rangeSlider-arrow' />").append("<div class='bk-ui-rangeSlider-arrow-inner' />").addClass("bk-ui-rangeSlider-"+e+"Arrow").css("position","absolute").css(e,0).appendTo(this.element);return t="right"===e?n.proxy(this._scrollRightClick,this):n.proxy(this._scrollLeftClick,this),i.bind("mousedown touchstart",t),i},_proxy:function(e,t,i){var n=Array.prototype.slice.call(i);return e&&e[t]?e[t].apply(e,n):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(e,t){return t===this.rightHandle&&(e-=t.outerWidth()),e*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-t.outerWidth(!0))+this.options.bounds.min},_trigger:function(e){var t=this;setTimeout(function(){t.element.trigger(e,{label:t.element,values:t.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(e){e===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),e!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),e===!0&&this._reactivateLabels()},_updateValues:function(){var e=this._leftHandle("value"),t=this._rightHandle("value"),i=this._min(e,t),n=this._max(e,t),o=i!==this._values.min||n!==this._values.max;return this._values.min=this._min(e,t),this._values.max=this._max(e,t),o},_min:function(e,t){return Math.min(e,t)},_max:function(e,t){return Math.max(e,t)},_createLabel:function(e,t){var i;return null===e?(i=this._getLabelConstructorParameters(e,t),e=n("<div />").appendTo(this.element)[this._labelType()](i)):(i=this._getLabelRefreshParameters(e,t),e[this._labelType()](i)),e},_getLabelConstructorParameters:function(e,t){return{handle:t,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter:this.options.formatter},_defaultFormatter:function(e){return Math.round(e)},_destroyLabel:function(e){return null!==e&&(e[this._labelType()]("destroy"),e.remove(),e=null),e},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(e){return!!this.options.enabled&&(e.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1))},_continueScrolling:function(e,t,i,n){if(!this.options.enabled)return!1;this._bar(e,i),n=n||5,n--;var o=this,s=16,r=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===n&&(t>s?t=Math.max(s,t/1.5):i=Math.min(r,2*i),n=5),o._continueScrolling(e,t,i,n)},t)},_scrollLeftClick:function(e){return!!this.options.enabled&&(e.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1))},_bindStopScroll:function(){var e=this;this._stopScrollHandle=function(t){t.preventDefault(),e._stopScroll()},n(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){n(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=n("<div class='bk-ui-rangeSlider-ruler' />").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&n.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&n.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(e,t){var i;if("undefined"!=typeof e&&"undefined"!=typeof t){if(!this._initialized)return this._values.min=e,this._values.max=t,this._values;this._deactivateLabels(),i=this._bar("values",e,t),this._changed(!0),this._reactivateLabels()}else i=this._bar("values",e,t);return i},min:function(e){return this._values.min=this.values(e,this._values.max).min,this._values.min},max:function(e){return this._values.max=this.values(this._values.min,e).max,this._values.max},bounds:function(e,t){return this._isValidValue(e)&&this._isValidValue(t)&&e<t&&(this._setBounds(e,t),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(e){return"undefined"!=typeof e&&parseFloat(e)===e},_setBounds:function(e,t){this.options.bounds={min:e,max:t},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(e){this._bar("zoomIn",e)},zoomOut:function(e){this._bar("zoomOut",e)},scrollLeft:function(e){this._bar("startScroll"),this._bar("scrollLeft",e),this._bar("stopScroll")},scrollRight:function(e){this._bar("startScroll"),this._bar("scrollRight",e),this._bar("stopScroll")},resize:function(){this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update")},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(e){void 0===e&&(e=!this.options.enabled),this.options.enabled!==e&&this._toggle(e)},_toggle:function(e){this.options.enabled=e,this.element.toggleClass("bk-ui-rangeSlider-disabled",!e);var t=e?"enable":"disable";this._bar(t),this._leftHandle(t),this._rightHandle(t),this._leftLabel(t),this._rightLabel(t)},destroy:function(){this.element.removeClass("bk-ui-rangeSlider-withArrows bk-ui-rangeSlider-noArrow bk-ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("bk-ui-rangeSlider"),this.options=null,n(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,n.Widget.prototype.destroy.apply(this,arguments)},_destroyWidget:function(e){this["_"+e]("destroy"),this[e].remove(),this[e]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})},{jquery:"jquery","jquery-mousewheel":"jquery-mousewheel","jquery-ui/core":"jquery-ui/core","jquery-ui/mouse":"jquery-ui/mouse","jquery-ui/widget":"jquery-ui/widget"}],jquery_event_drag:[function(e,t,i){/*!
* jquery.event.drag - v 2.2
* Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
* Open Source MIT License - http://threedubmedia.com/code/license
*/
var n=e("jquery");n.fn.drag=function(e,t,i){var o="string"==typeof e?e:"",s=n.isFunction(e)?e:n.isFunction(t)?t:null;return 0!==o.indexOf("drag")&&(o="drag"+o),i=(e==s?t:i)||{},s?this.bind(o,i,s):this.trigger(o)};var o=n.event,s=o.special,r=s.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:!1,drop:!0,click:!1},datakey:"dragdata",noBubble:!0,add:function(e){var t=n.data(this,r.datakey),i=e.data||{};t.related+=1,n.each(r.defaults,function(e,n){void 0!==i[e]&&(t[e]=i[e])})},remove:function(){n.data(this,r.datakey).related-=1},setup:function(){if(!n.data(this,r.datakey)){var e=n.extend({related:0},r.defaults);n.data(this,r.datakey,e),o.add(this,"touchstart mousedown",r.init,e),this.attachEvent&&this.attachEvent("ondragstart",r.dontstart)}},teardown:function(){var e=n.data(this,r.datakey)||{};e.related||(n.removeData(this,r.datakey),o.remove(this,"touchstart mousedown",r.init),r.textselect(!0),this.detachEvent&&this.detachEvent("ondragstart",r.dontstart))},init:function(e){if(!r.touched){var t,i=e.data;if(!(0!=e.which&&i.which>0&&e.which!=i.which)&&!n(e.target).is(i.not)&&(!i.handle||n(e.target).closest(i.handle,e.currentTarget).length)&&(r.touched="touchstart"==e.type?this:null,i.propagates=1,i.mousedown=this,i.interactions=[r.interaction(this,i)],i.target=e.target,i.pageX=e.pageX,i.pageY=e.pageY,i.dragging=null,t=r.hijack(e,"draginit",i),i.propagates))return t=r.flatten(t),t&&t.length&&(i.interactions=[],n.each(t,function(){i.interactions.push(r.interaction(this,i))})),i.propagates=i.interactions.length,i.drop!==!1&&s.drop&&s.drop.handler(e,i),r.textselect(!1),r.touched?o.add(r.touched,"touchmove touchend",r.handler,i):o.add(document,"mousemove mouseup",r.handler,i),!(!r.touched||i.live)&&void 0}},interaction:function(e,t){var i=n(e)[t.relative?"position":"offset"]()||{top:0,left:0};return{drag:e,callback:new r.callback,droppable:[],offset:i}},handler:function(e){var t=e.data;switch(e.type){case!t.dragging&&"touchmove":e.preventDefault();case!t.dragging&&"mousemove":if(Math.pow(e.pageX-t.pageX,2)+Math.pow(e.pageY-t.pageY,2)<Math.pow(t.distance,2))break;e.target=t.target,r.hijack(e,"dragstart",t),t.propagates&&(t.dragging=!0);case"touchmove":e.preventDefault();case"mousemove":if(t.dragging){if(r.hijack(e,"drag",t),t.propagates){t.drop!==!1&&s.drop&&s.drop.handler(e,t);break}e.type="mouseup"}case"touchend":case"mouseup":default:r.touched?o.remove(r.touched,"touchmove touchend",r.handler):o.remove(document,"mousemove mouseup",r.handler),t.dragging&&(t.drop!==!1&&s.drop&&s.drop.handler(e,t),r.hijack(e,"dragend",t)),r.textselect(!0),t.click===!1&&t.dragging&&n.data(t.mousedown,"suppress.click",(new Date).getTime()+5),t.dragging=r.touched=!1}},hijack:function(e,t,i,s,a){if(i){var l,u,c,h={event:e.originalEvent,type:e.type},d=t.indexOf("drop")?"drag":"drop",p=s||0,f=isNaN(s)?i.interactions.length:s;e.type=t,e.originalEvent=null,i.results=[];do if(u=i.interactions[p]){if("dragend"!==t&&u.cancelled)continue;c=r.properties(e,i,u),u.results=[],n(a||u[d]||i.droppable).each(function(s,a){if(c.target=a,e.isPropagationStopped=function(){return!1},l=a?o.dispatch.call(a,e,c):null,l===!1?("drag"==d&&(u.cancelled=!0,i.propagates-=1),"drop"==t&&(u[d][s]=null)):"dropinit"==t&&u.droppable.push(r.element(l)||a),"dragstart"==t&&(u.proxy=n(r.element(l)||u.drag)[0]),u.results.push(l),delete e.result,"dropinit"!==t)return l}),i.results[p]=r.flatten(u.results),"dropinit"==t&&(u.droppable=r.flatten(u.droppable)),"dragstart"!=t||u.cancelled||c.update()}while(++p<f);return e.type=h.type,e.originalEvent=h.event,r.flatten(i.results)}},properties:function(e,t,i){var n=i.callback;return n.drag=i.drag,n.proxy=i.proxy||i.drag,n.startX=t.pageX,n.startY=t.pageY,n.deltaX=e.pageX-t.pageX,n.deltaY=e.pageY-t.pageY,n.originalX=i.offset.left,n.originalY=i.offset.top,n.offsetX=n.originalX+n.deltaX,n.offsetY=n.originalY+n.deltaY,n.drop=r.flatten((i.drop||[]).slice()),n.available=r.flatten((i.droppable||[]).slice()),n},element:function(e){if(e&&(e.jquery||1==e.nodeType))return e},flatten:function(e){return n.map(e,function(e){return e&&e.jquery?n.makeArray(e):e&&e.length?r.flatten(e):e})},textselect:function(e){n(document)[e?"unbind":"bind"]("selectstart",r.dontstart).css("MozUserSelect",e?"":"none"),document.unselectable=e?"off":"on"},dontstart:function(){return!1},callback:function(){}};r.callback.prototype={update:function(){s.drop&&this.available.length&&n.each(this.available,function(e){s.drop.locate(this,e)})}};var a=o.dispatch;o.dispatch=function(e){return n.data(this,"suppress."+e.type)-(new Date).getTime()>0?void n.removeData(this,"suppress."+e.type):a.apply(this,arguments)};var l=o.fixHooks.touchstart=o.fixHooks.touchmove=o.fixHooks.touchend=o.fixHooks.touchcancel={props:"clientX clientY pageX pageY screenX screenY".split(" "),filter:function(e,t){if(t){var i=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||null;i&&n.each(l.props,function(t,n){e[n]=i[n]})}return e}};s.draginit=s.dragstart=s.dragend=r},{jquery:"jquery"}],jquery_event_drop:[function(e,t,i){/*!
* jquery.event.drop - v 2.2
* Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
* Open Source MIT License - http://threedubmedia.com/code/license
*/
var n=e("jquery");e("jquery_event_drag");n.fn.drop=function(e,t,i){var o="string"==typeof e?e:"",s=n.isFunction(e)?e:n.isFunction(t)?t:null;return 0!==o.indexOf("drop")&&(o="drop"+o),i=(e==s?t:i)||{},s?this.bind(o,i,s):this.trigger(o)},n.drop=function(e){e=e||{},r.multi=e.multi===!0?1/0:e.multi===!1?1:isNaN(e.multi)?r.multi:e.multi,r.delay=e.delay||r.delay,r.tolerance=n.isFunction(e.tolerance)?e.tolerance:null===e.tolerance?null:r.tolerance,r.mode=e.mode||r.mode||"intersect"};var o=n.event,s=o.special,r=n.event.special.drop={multi:1,delay:20,mode:"overlap",targets:[],datakey:"dropdata",noBubble:!0,add:function(e){var t=n.data(this,r.datakey);t.related+=1},remove:function(){n.data(this,r.datakey).related-=1},setup:function(){if(!n.data(this,r.datakey)){var e={related:0,active:[],anyactive:0,winner:0,location:{}};n.data(this,r.datakey,e),r.targets.push(this)}},teardown:function(){var e=n.data(this,r.datakey)||{};if(!e.related){n.removeData(this,r.datakey);var t=this;r.targets=n.grep(r.targets,function(e){return e!==t})}},handler:function(e,t){var i;if(t)switch(e.type){case"mousedown":case"touchstart":i=n(r.targets),"string"==typeof t.drop&&(i=i.filter(t.drop)),i.each(function(){var e=n.data(this,r.datakey);e.active=[],e.anyactive=0,e.winner=0}),t.droppable=i,s.drag.hijack(e,"dropinit",t);break;case"mousemove":case"touchmove":r.event=e,r.timer||r.tolerate(t);break;case"mouseup":case"touchend":r.timer=clearTimeout(r.timer),t.propagates&&(s.drag.hijack(e,"drop",t),s.drag.hijack(e,"dropend",t))}},locate:function(e,t){var i=n.data(e,r.datakey),o=n(e),s=o.offset()||{},a=o.outerHeight(),l=o.outerWidth(),u={elem:e,width:l,height:a,top:s.top,left:s.left,right:s.left+l,bottom:s.top+a};return i&&(i.location=u,i.index=t,i.elem=e),u},contains:function(e,t){return(t[0]||t.left)>=e.left&&(t[0]||t.right)<=e.right&&(t[1]||t.top)>=e.top&&(t[1]||t.bottom)<=e.bottom},modes:{intersect:function(e,t,i){return this.contains(i,[e.pageX,e.pageY])?1e9:this.modes.overlap.apply(this,arguments)},overlap:function(e,t,i){return Math.max(0,Math.min(i.bottom,t.bottom)-Math.max(i.top,t.top))*Math.max(0,Math.min(i.right,t.right)-Math.max(i.left,t.left))},fit:function(e,t,i){return this.contains(i,t)?1:0},middle:function(e,t,i){return this.contains(i,[t.left+.5*t.width,t.top+.5*t.height])?1:0}},sort:function(e,t){return t.winner-e.winner||e.index-t.index},tolerate:function(e){var t,i,o,a,l,u,c,h,d=0,p=e.interactions.length,f=[r.event.pageX,r.event.pageY],m=r.tolerance||r.modes[r.mode];do if(h=e.interactions[d]){if(!h)return;h.drop=[],l=[],u=h.droppable.length,m&&(o=r.locate(h.proxy)),t=0;do if(c=h.droppable[t]){if(a=n.data(c,r.datakey),i=a.location,!i)continue;a.winner=m?m.call(r,r.event,o,i):r.contains(i,f)?1:0,l.push(a)}while(++t<u);l.sort(r.sort),t=0;do(a=l[t])&&(a.winner&&h.drop.length<r.multi?(a.active[d]||a.anyactive||(s.drag.hijack(r.event,"dropstart",e,d,a.elem)[0]!==!1?(a.active[d]=1,a.anyactive+=1):a.winner=0),a.winner&&h.drop.push(a.elem)):a.active[d]&&1==a.anyactive&&(s.drag.hijack(r.event,"dropend",e,d,a.elem),a.active[d]=0,a.anyactive-=1));while(++t<u)}while(++d<p);r.last&&f[0]==r.last.pageX&&f[1]==r.last.pageY?delete r.timer:r.timer=setTimeout(function(){r.tolerate(e)},r.delay),r.last=r.event}};s.dropinit=s.dropstart=s.dropend=r},{jquery:"jquery",jquery_event_drag:"jquery_event_drag"}],"slick_grid/plugins/slick.checkboxselectcolumn":[function(e,t,i){function n(e){function t(e){d=e,p.subscribe(d.onSelectedRowsChanged,n).subscribe(d.onClick,a).subscribe(d.onHeaderClick,u).subscribe(d.onKeyDown,r)}function i(){p.unsubscribeAll()}function n(e,t){var i,n,o=d.getSelectedRows(),s={};for(n=0;n<o.length;n++)i=o[n],s[i]=!0,s[i]!==f[i]&&(d.invalidateRow(i),delete f[i]);for(n in f)d.invalidateRow(n);f=s,d.render(),o.length&&o.length==d.getDataLength()?d.updateColumnHeader(g.columnId,"<input type='checkbox' checked='checked'>",g.toolTip):d.updateColumnHeader(g.columnId,"<input type='checkbox'>",g.toolTip)}function r(e,t){32==e.which&&d.getColumns()[t.cell].id===g.columnId&&(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit()||l(t.row),e.preventDefault(),e.stopImmediatePropagation())}function a(e,t){if(d.getColumns()[t.cell].id===g.columnId&&o(e.target).is(":checkbox")){if(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit())return e.preventDefault(),void e.stopImmediatePropagation();l(t.row),e.stopPropagation(),e.stopImmediatePropagation()}}function l(e){f[e]?d.setSelectedRows(o.grep(d.getSelectedRows(),function(t){return t!=e})):d.setSelectedRows(d.getSelectedRows().concat(e))}function u(e,t){if(t.column.id==g.columnId&&o(e.target).is(":checkbox")){if(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit())return e.preventDefault(),void e.stopImmediatePropagation();if(o(e.target).is(":checked")){for(var i=[],n=0;n<d.getDataLength();n++)i.push(n);d.setSelectedRows(i)}else d.setSelectedRows([]);e.stopPropagation(),e.stopImmediatePropagation()}}function c(){return{id:g.columnId,name:"<input type='checkbox'>",toolTip:g.toolTip,field:"sel",width:g.width,resizable:!1,sortable:!1,cssClass:g.cssClass,formatter:h}}function h(e,t,i,n,o){return o?f[e]?"<input type='checkbox' checked='checked'>":"<input type='checkbox'>":null}var d,p=new s.EventHandler,f={},m={columnId:"_checkbox_selector",cssClass:null,toolTip:"Select/Deselect All",width:30},g=o.extend(!0,{},m,e);o.extend(this,{init:t,destroy:i,getColumnDefinition:c})}var o=e("jquery"),s=e("../slick.core");t.exports=n},{"../slick.core":"slick_grid/slick.core",jquery:"jquery"}],"slick_grid/plugins/slick.rowselectionmodel":[function(e,t,i){function n(e){function t(t){_=o.extend(!0,{},k,e),g=t,w.subscribe(g.onActiveCellChanged,n(p)),w.subscribe(g.onKeyDown,n(f)),w.subscribe(g.onClick,n(m))}function i(){w.unsubscribeAll()}function n(e){return function(){v||(v=!0,e.apply(this,arguments),v=!1)}}function r(e){for(var t=[],i=0;i<e.length;i++)for(var n=e[i].fromRow;n<=e[i].toRow;n++)t.push(n);return t}function a(e){for(var t=[],i=g.getColumns().length-1,n=0;n<e.length;n++)t.push(new s.Range(e[n],0,e[n],i));return t}function l(e,t){var i,n=[];for(i=e;i<=t;i++)n.push(i);for(i=t;i<e;i++)n.push(i);return n}function u(){return r(b)}function c(e){h(a(e))}function h(e){b=e,y.onSelectedRangesChanged.notify(b)}function d(){return b}function p(e,t){_.selectActiveRow&&null!=t.row&&h([new s.Range(t.row,0,t.row,g.getColumns().length-1)])}function f(e){var t=g.getActiveCell();if(t&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(38==e.which||40==e.which)){var i=u();i.sort(function(e,t){return e-t}),i.length||(i=[t.row]);var n,o=i[0],s=i[i.length-1];n=40==e.which?t.row<s||o==s?++s:++o:t.row<s?--s:--o,n>=0&&n<g.getDataLength()&&(g.scrollRowIntoView(n),b=a(l(o,s)),h(b)),e.preventDefault(),e.stopPropagation()}}function m(e){var t=g.getCellFromEvent(e);if(!t||!g.canCellBeActive(t.row,t.cell))return!1;if(!g.getOptions().multiSelect||!e.ctrlKey&&!e.shiftKey&&!e.metaKey)return!1;var i=r(b),n=o.inArray(t.row,i);if(n===-1&&(e.ctrlKey||e.metaKey))i.push(t.row),g.setActiveCell(t.row,t.cell);else if(n!==-1&&(e.ctrlKey||e.metaKey))i=o.grep(i,function(e,i){return e!==t.row}),g.setActiveCell(t.row,t.cell);else if(i.length&&e.shiftKey){var s=i.pop(),l=Math.min(t.row,s),u=Math.max(t.row,s);i=[];for(var c=l;c<=u;c++)c!==s&&i.push(c);i.push(s),g.setActiveCell(t.row,t.cell)}return b=a(i),h(b),e.stopImmediatePropagation(),!0}var g,v,_,b=[],y=this,w=new s.EventHandler,k={selectActiveRow:!0};o.extend(this,{getSelectedRows:u,setSelectedRows:c,getSelectedRanges:d,setSelectedRanges:h,init:t,destroy:i,onSelectedRangesChanged:new s.Event})}var o=e("jquery"),s=e("../slick.core");t.exports=n},{"../slick.core":"slick_grid/slick.core",jquery:"jquery"}],"slick_grid/slick.core":[function(e,t,i){function n(){var e=!1,t=!1;this.stopPropagation=function(){e=!0},this.isPropagationStopped=function(){return e},this.stopImmediatePropagation=function(){t=!0},this.isImmediatePropagationStopped=function(){return t}}function o(){var e=[];this.subscribe=function(t){e.push(t)},this.unsubscribe=function(t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1)},this.notify=function(t,i,o){i=i||new n,o=o||this;for(var s,r=0;r<e.length&&!i.isPropagationStopped()&&!i.isImmediatePropagationStopped();r++)s=e[r].call(o,i,t);return s}}function s(){var e=[];this.subscribe=function(t,i){return e.push({event:t,handler:i}),t.subscribe(i),this},this.unsubscribe=function(t,i){for(var n=e.length;n--;)if(e[n].event===t&&e[n].handler===i)return e.splice(n,1),void t.unsubscribe(i);return this},this.unsubscribeAll=function(){for(var t=e.length;t--;)e[t].event.unsubscribe(e[t].handler);return e=[],this}}function r(e,t,i,n){void 0===i&&void 0===n&&(i=e,n=t),this.fromRow=Math.min(e,i),this.fromCell=Math.min(t,n),this.toRow=Math.max(e,i),this.toCell=Math.max(t,n),this.isSingleRow=function(){return this.fromRow==this.toRow},this.isSingleCell=function(){return this.fromRow==this.toRow&&this.fromCell==this.toCell},this.contains=function(e,t){return e>=this.fromRow&&e<=this.toRow&&t>=this.fromCell&&t<=this.toCell},this.toString=function(){return this.isSingleCell()?"("+this.fromRow+":"+this.fromCell+")":"("+this.fromRow+":"+this.fromCell+" - "+this.toRow+":"+this.toCell+")"}}function a(){this.__nonDataRow=!0}function l(){this.__group=!0,this.level=0,this.count=0,this.value=null,this.title=null,this.collapsed=!1,this.totals=null,this.rows=[],this.groups=null,this.groupingKey=null}function u(){this.__groupTotals=!0,this.group=null,this.initialized=!1}function c(){var e=null;this.isActive=function(t){return t?e===t:null!==e},this.activate=function(t){if(t!==e){if(null!==e)throw"SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController";if(!t.commitCurrentEdit)throw"SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()";if(!t.cancelCurrentEdit)throw"SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()";e=t}},this.deactivate=function(t){if(e!==t)throw"SlickGrid.EditorLock.deactivate: specified editController is not the currently active one";e=null},this.commitCurrentEdit=function(){return!e||e.commitCurrentEdit()},this.cancelCurrentEdit=function(){return!e||e.cancelCurrentEdit()}}var h=(e("jquery"),{Event:o,EventData:n,EventHandler:s,Range:r,NonDataRow:a,Group:l,GroupTotals:u,EditorLock:c,GlobalEditorLock:new c});l.prototype=new a,l.prototype.equals=function(e){return this.value===e.value&&this.count===e.count&&this.collapsed===e.collapsed&&this.title===e.title},u.prototype=new a,t.exports=h},{jquery:"jquery"}],"slick_grid/slick.grid":[function(require,module,exports){function SlickGrid(container,data,columns,options){function init(){if($container=$(container),$container.length<1)throw new Error("SlickGrid requires a valid container, "+container+" does not exist in the DOM.");maxSupportedCssHeight=maxSupportedCssHeight||getMaxSupportedCssHeight(),scrollbarDimensions=scrollbarDimensions||measureScrollbar(),options=$.extend({},defaults,options),validateAndEnforceOptions(),columnDefaults.width=options.defaultColumnWidth,columnsById={};for(var e=0;e<columns.length;e++){var t=columns[e]=$.extend({},columnDefaults,columns[e]);columnsById[t.id]=e,t.minWidth&&t.width<t.minWidth&&(t.width=t.minWidth),t.maxWidth&&t.width>t.maxWidth&&(t.width=t.maxWidth)}if(options.enableColumnReorder&&!$.fn.sortable)throw new Error("SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded");editController={commitCurrentEdit:commitCurrentEdit,cancelCurrentEdit:cancelCurrentEdit},$container.empty().css("overflow","hidden").css("outline",0).addClass(uid).addClass("bk-ui-widget"),/relative|absolute|fixed/.test($container.css("position"))||$container.css("position","relative"),$focusSink=$("<div tabIndex='0' hideFocus style='position:fixed;width:0;height:0;top:0;left:0;outline:0;'></div>").appendTo($container),$headerScroller=$("<div class='bk-slick-header bk-ui-state-default' style='overflow:hidden;position:relative;' />").appendTo($container),$headers=$("<div class='bk-slick-header-columns' style='left:-1000px' />").appendTo($headerScroller),$headers.width(getHeadersWidth()),$headerRowScroller=$("<div class='bk-slick-headerrow bk-ui-state-default' style='overflow:hidden;position:relative;' />").appendTo($container),$headerRow=$("<div class='bk-slick-headerrow-columns' />").appendTo($headerRowScroller),$headerRowSpacer=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").css("width",getCanvasWidth()+scrollbarDimensions.width+"px").appendTo($headerRowScroller),$topPanelScroller=$("<div class='bk-slick-top-panel-scroller bk-ui-state-default' style='overflow:hidden;position:relative;' />").appendTo($container),$topPanel=$("<div class='bk-slick-top-panel' style='width:10000px' />").appendTo($topPanelScroller),options.showTopPanel||$topPanelScroller.hide(),options.showHeaderRow||$headerRowScroller.hide(),$viewport=$("<div class='bk-slick-viewport' style='width:100%;overflow:auto;outline:0;position:relative;;'>").appendTo($container),$viewport.css("overflow-y",options.autoHeight?"hidden":"auto"),$canvas=$("<div class='grid-canvas' />").appendTo($viewport),$focusSink2=$focusSink.clone().appendTo($container),options.explicitInitialization||finishInitialization()}function finishInitialization(){initialized||(initialized=!0,viewportW=parseFloat($.css($container[0],"width",!0)),measureCellPaddingAndBorder(),disableSelection($headers),options.enableTextSelectionOnCells||$viewport.bind("selectstart.ui",function(e){return $(e.target).is("input,textarea")}),updateColumnCaches(),createColumnHeaders(),setupColumnSort(),createCssRules(),resizeCanvas(),bindAncestorScrollEvents(),$container.bind("resize.bk-slickgrid",resizeCanvas),$viewport.bind("scroll",handleScroll),$headerScroller.bind("contextmenu",handleHeaderContextMenu).bind("click",handleHeaderClick).delegate(".bk-slick-header-column","mouseenter",handleHeaderMouseEnter).delegate(".bk-slick-header-column","mouseleave",handleHeaderMouseLeave),$headerRowScroller.bind("scroll",handleHeaderRowScroll),$focusSink.add($focusSink2).bind("keydown",handleKeyDown),$canvas.bind("keydown",handleKeyDown).bind("click",handleClick).bind("dblclick",handleDblClick).bind("contextmenu",handleContextMenu).bind("draginit",handleDragInit).bind("dragstart",{distance:3},handleDragStart).bind("drag",handleDrag).bind("dragend",handleDragEnd).delegate(".bk-slick-cell","mouseenter",handleMouseEnter).delegate(".bk-slick-cell","mouseleave",handleMouseLeave),navigator.userAgent.toLowerCase().match(/webkit/)&&navigator.userAgent.toLowerCase().match(/macintosh/)&&$canvas.bind("mousewheel",handleMouseWheel))}function registerPlugin(e){plugins.unshift(e),e.init(self)}function unregisterPlugin(e){for(var t=plugins.length;t>=0;t--)if(plugins[t]===e){plugins[t].destroy&&plugins[t].destroy(),plugins.splice(t,1);break}}function setSelectionModel(e){selectionModel&&(selectionModel.onSelectedRangesChanged.unsubscribe(handleSelectedRangesChanged),selectionModel.destroy&&selectionModel.destroy()),selectionModel=e,selectionModel&&(selectionModel.init(self),selectionModel.onSelectedRangesChanged.subscribe(handleSelectedRangesChanged))}function getSelectionModel(){return selectionModel}function getCanvasNode(){return $canvas[0]}function measureScrollbar(){var e=$("<div style='position:absolute; top:-10000px; left:-10000px; width:100px; height:100px; overflow:scroll;'></div>").appendTo("body"),t={width:e.width()-e[0].clientWidth,height:e.height()-e[0].clientHeight};return e.remove(),t}function getHeadersWidth(){for(var e=0,t=0,i=columns.length;t<i;t++){var n=columns[t].width;e+=n}return e+=scrollbarDimensions.width,Math.max(e,viewportW)+1e3}function getCanvasWidth(){for(var e=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW,t=0,i=columns.length;i--;)t+=columns[i].width;return options.fullWidthRows?Math.max(t,e):t}function updateCanvasWidth(e){var t=canvasWidth;canvasWidth=getCanvasWidth(),canvasWidth!=t&&($canvas.width(canvasWidth),$headerRow.width(canvasWidth),$headers.width(getHeadersWidth()),viewportHasHScroll=canvasWidth>viewportW-scrollbarDimensions.width),$headerRowSpacer.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),(canvasWidth!=t||e)&&applyColumnWidths()}function disableSelection(e){e&&e.jquery&&e.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function getMaxSupportedCssHeight(){for(var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=$("<div style='display:none' />").appendTo(document.body);;){var n=2*e;if(i.css("height",n),n>t||i.height()!==n)break;e=n}return i.remove(),e}function bindAncestorScrollEvents(){for(var e=$canvas[0];(e=e.parentNode)!=document.body&&null!=e;)if(e==$viewport[0]||e.scrollWidth!=e.clientWidth||e.scrollHeight!=e.clientHeight){var t=$(e);$boundAncestors=$boundAncestors?$boundAncestors.add(t):t,t.bind("scroll."+uid,handleActiveCellPositionChange)}}function unbindAncestorScrollEvents(){$boundAncestors&&($boundAncestors.unbind("scroll."+uid),$boundAncestors=null)}function updateColumnHeader(e,t,i){if(initialized){var n=getColumnIndex(e);if(null!=n){var o=columns[n],s=$headers.children().eq(n);s&&(void 0!==t&&(columns[n].name=t),void 0!==i&&(columns[n].toolTip=i),trigger(self.onBeforeHeaderCellDestroy,{node:s[0],column:o}),s.attr("title",i||"").children().eq(0).html(t),trigger(self.onHeaderCellRendered,{node:s[0],column:o}))}}}function getHeaderRow(){return $headerRow[0]}function getHeaderRowColumn(e){var t=getColumnIndex(e),i=$headerRow.children().eq(t);return i&&i[0]}function createColumnHeaders(){function e(){$(this).addClass("bk-ui-state-hover")}function t(){$(this).removeClass("bk-ui-state-hover")}$headers.find(".bk-slick-header-column").each(function(){var e=$(this).data("column");e&&trigger(self.onBeforeHeaderCellDestroy,{node:this,column:e})}),$headers.empty(),$headers.width(getHeadersWidth()),$headerRow.find(".bk-slick-headerrow-column").each(function(){var e=$(this).data("column");e&&trigger(self.onBeforeHeaderRowCellDestroy,{node:this,column:e})}),$headerRow.empty();for(var i=0;i<columns.length;i++){var n=columns[i],o=$("<div class='bk-ui-state-default bk-slick-header-column' />").html("<span class='bk-slick-column-name'>"+n.name+"</span>").width(n.width-headerColumnWidthDiff).attr("id",""+uid+n.id).attr("title",n.toolTip||"").data("column",n).addClass(n.headerCssClass||"").appendTo($headers);if((options.enableColumnReorder||n.sortable)&&o.on("mouseenter",e).on("mouseleave",t),n.sortable&&(o.addClass("bk-slick-header-sortable"),o.append("<span class='bk-slick-sort-indicator' />")),trigger(self.onHeaderCellRendered,{node:o[0],column:n}),options.showHeaderRow){var s=$("<div class='bk-ui-state-default bk-slick-headerrow-column l"+i+" r"+i+"'></div>").data("column",n).appendTo($headerRow);trigger(self.onHeaderRowCellRendered,{node:s[0],column:n})}}setSortColumns(sortColumns),setupColumnResize(),options.enableColumnReorder&&setupColumnReorder()}function setupColumnSort(){$headers.click(function(e){if(e.metaKey=e.metaKey||e.ctrlKey,!$(e.target).hasClass("bk-slick-resizable-handle")){var t=$(e.target).closest(".bk-slick-header-column");if(t.length){var i=t.data("column");if(i.sortable){if(!getEditorLock().commitCurrentEdit())return;for(var n=null,o=0;o<sortColumns.length;o++)if(sortColumns[o].columnId==i.id){n=sortColumns[o],n.sortAsc=!n.sortAsc;break}e.metaKey&&options.multiColumnSort?n&&sortColumns.splice(o,1):((e.shiftKey||e.metaKey)&&options.multiColumnSort||(sortColumns=[]),n?0==sortColumns.length&&sortColumns.push(n):(n={columnId:i.id,sortAsc:i.defaultSortAsc},sortColumns.push(n))),setSortColumns(sortColumns),options.multiColumnSort?trigger(self.onSort,{multiColumnSort:!0,sortCols:$.map(sortColumns,function(e){return{sortCol:columns[getColumnIndex(e.columnId)],sortAsc:e.sortAsc}})},e):trigger(self.onSort,{multiColumnSort:!1,sortCol:i,sortAsc:n.sortAsc},e)}}}})}function setupColumnReorder(){$headers.filter(":ui-sortable").sortable("destroy"),$headers.sortable({containment:"parent",distance:3,axis:"x",cursor:"default",tolerance:"intersection",helper:"clone",placeholder:"bk-slick-sortable-placeholder bk-ui-state-default bk-slick-header-column",start:function(e,t){t.placeholder.width(t.helper.outerWidth()-headerColumnWidthDiff),$(t.helper).addClass("bk-slick-header-column-active")},beforeStop:function(e,t){$(t.helper).removeClass("bk-slick-header-column-active")},stop:function(e){if(!getEditorLock().commitCurrentEdit())return void $(this).sortable("cancel");for(var t=$headers.sortable("toArray"),i=[],n=0;n<t.length;n++)i.push(columns[getColumnIndex(t[n].replace(uid,""))]);setColumns(i),trigger(self.onColumnsReordered,{}),e.stopPropagation(),setupColumnResize()}})}function setupColumnResize(){var e,t,i,n,o,s,r,a,l;o=$headers.children(),o.find(".bk-slick-resizable-handle").remove(),o.each(function(e,t){columns[e].resizable&&(void 0===a&&(a=e),l=e)}),void 0!==a&&o.each(function(u,c){u<a||options.forceFitColumns&&u>=l||(e=$(c),$("<div class='bk-slick-resizable-handle' />").appendTo(c).bind("dragstart",function(e,a){if(!getEditorLock().commitCurrentEdit())return!1;n=e.pageX,$(this).parent().addClass("bk-slick-header-column-active");var l=null,c=null;if(o.each(function(e,t){columns[e].previousWidth=$(t).outerWidth()}),options.forceFitColumns)for(l=0,c=0,t=u+1;t<o.length;t++)i=columns[t],i.resizable&&(null!==c&&(i.maxWidth?c+=i.maxWidth-i.previousWidth:c=null),l+=i.previousWidth-Math.max(i.minWidth||0,absoluteColumnMinWidth));var h=0,d=0;for(t=0;t<=u;t++)i=columns[t],i.resizable&&(null!==d&&(i.maxWidth?d+=i.maxWidth-i.previousWidth:d=null),h+=i.previousWidth-Math.max(i.minWidth||0,absoluteColumnMinWidth));null===l&&(l=1e5),null===h&&(h=1e5),null===c&&(c=1e5),null===d&&(d=1e5),r=n+Math.min(l,d),s=n-Math.min(h,c)}).bind("drag",function(e,a){var l,c,h=Math.min(r,Math.max(s,e.pageX))-n;if(h<0){for(c=h,t=u;t>=0;t--)i=columns[t],i.resizable&&(l=Math.max(i.minWidth||0,absoluteColumnMinWidth),c&&i.previousWidth+c<l?(c+=i.previousWidth-l,i.width=l):(i.width=i.previousWidth+c,c=0));if(options.forceFitColumns)for(c=-h,t=u+1;t<o.length;t++)i=columns[t],i.resizable&&(c&&i.maxWidth&&i.maxWidth-i.previousWidth<c?(c-=i.maxWidth-i.previousWidth,i.width=i.maxWidth):(i.width=i.previousWidth+c,c=0))}else{for(c=h,t=u;t>=0;t--)i=columns[t],i.resizable&&(c&&i.maxWidth&&i.maxWidth-i.previousWidth<c?(c-=i.maxWidth-i.previousWidth,i.width=i.maxWidth):(i.width=i.previousWidth+c,c=0));if(options.forceFitColumns)for(c=-h,t=u+1;t<o.length;t++)i=columns[t],i.resizable&&(l=Math.max(i.minWidth||0,absoluteColumnMinWidth),c&&i.previousWidth+c<l?(c+=i.previousWidth-l,i.width=l):(i.width=i.previousWidth+c,c=0))}applyColumnHeaderWidths(),options.syncColumnCellResize&&applyColumnWidths()}).bind("dragend",function(e,n){var s;for($(this).parent().removeClass("bk-slick-header-column-active"),t=0;t<o.length;t++)i=columns[t],s=$(o[t]).outerWidth(),i.previousWidth!==s&&i.rerenderOnResize&&invalidateAllRows();updateCanvasWidth(!0),render(),trigger(self.onColumnsResized,{})}))})}function getVBoxDelta(e){var t=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i=0;return $.each(t,function(t,n){i+=parseFloat(e.css(n))||0}),i}function measureCellPaddingAndBorder(){var e,t=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],i=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];e=$("<div class='bk-ui-state-default bk-slick-header-column' style='visibility:hidden'>-</div>").appendTo($headers),headerColumnWidthDiff=headerColumnHeightDiff=0,"border-box"!=e.css("box-sizing")&&"border-box"!=e.css("-moz-box-sizing")&&"border-box"!=e.css("-webkit-box-sizing")&&($.each(t,function(t,i){headerColumnWidthDiff+=parseFloat(e.css(i))||0}),$.each(i,function(t,i){headerColumnHeightDiff+=parseFloat(e.css(i))||0})),e.remove();var n=$("<div class='bk-slick-row' />").appendTo($canvas);e=$("<div class='bk-slick-cell' id='' style='visibility:hidden'>-</div>").appendTo(n),cellWidthDiff=cellHeightDiff=0,"border-box"!=e.css("box-sizing")&&"border-box"!=e.css("-moz-box-sizing")&&"border-box"!=e.css("-webkit-box-sizing")&&($.each(t,function(t,i){cellWidthDiff+=parseFloat(e.css(i))||0}),$.each(i,function(t,i){cellHeightDiff+=parseFloat(e.css(i))||0})),n.remove(),absoluteColumnMinWidth=Math.max(headerColumnWidthDiff,cellWidthDiff)}function createCssRules(){$style=$("<style type='text/css' rel='stylesheet' />").appendTo($("head"));for(var e=options.rowHeight-cellHeightDiff,t=["."+uid+" .bk-slick-header-column { left: 1000px; }","."+uid+" .bk-slick-top-panel { height:"+options.topPanelHeight+"px; }","."+uid+" .bk-slick-headerrow-columns { height:"+options.headerRowHeight+"px; }","."+uid+" .bk-slick-cell { height:"+e+"px; }","."+uid+" .bk-slick-row { height:"+options.rowHeight+"px; }"],i=0;i<columns.length;i++)t.push("."+uid+" .l"+i+" { }"),t.push("."+uid+" .r"+i+" { }");$style[0].styleSheet?$style[0].styleSheet.cssText=t.join(" "):$style[0].appendChild(document.createTextNode(t.join(" ")))}function getColumnCssRules(e){if(!stylesheet){for(var t=document.styleSheets,i=0;i<t.length;i++)if((t[i].ownerNode||t[i].owningElement)==$style[0]){stylesheet=t[i];break}if(!stylesheet)throw new Error("Cannot find stylesheet.");columnCssRulesL=[],columnCssRulesR=[];for(var n,o,s=stylesheet.cssRules||stylesheet.rules,i=0;i<s.length;i++){var r=s[i].selectorText;(n=/\.l\d+/.exec(r))?(o=parseInt(n[0].substr(2,n[0].length-2),10),columnCssRulesL[o]=s[i]):(n=/\.r\d+/.exec(r))&&(o=parseInt(n[0].substr(2,n[0].length-2),10),columnCssRulesR[o]=s[i])}}return{left:columnCssRulesL[e],right:columnCssRulesR[e]}}function removeCssRules(){$style.remove(),stylesheet=null}function destroy(){getEditorLock().cancelCurrentEdit(),trigger(self.onBeforeDestroy,{});for(var e=plugins.length;e--;)unregisterPlugin(plugins[e]);options.enableColumnReorder&&$headers.filter(":ui-sortable").sortable("destroy"),unbindAncestorScrollEvents(),$container.unbind(".bk-slickgrid"),removeCssRules(),$canvas.unbind("draginit dragstart dragend drag"),$container.empty().removeClass(uid)}function trigger(e,t,i){return i=i||new Slick.EventData,t=t||{},t.grid=self,e.notify(t,i,self)}function getEditorLock(){return options.editorLock}function getEditController(){return editController}function getColumnIndex(e){return columnsById[e]}function autosizeColumns(){var e,t,i,n=[],o=0,s=0,r=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW;for(e=0;e<columns.length;e++)t=columns[e],n.push(t.width),s+=t.width,t.resizable&&(o+=t.width-Math.max(t.minWidth,absoluteColumnMinWidth));for(i=s;s>r&&o;){var a=(s-r)/o;for(e=0;e<columns.length&&s>r;e++){t=columns[e];var l=n[e];if(!(!t.resizable||l<=t.minWidth||l<=absoluteColumnMinWidth)){var u=Math.max(t.minWidth,absoluteColumnMinWidth),c=Math.floor(a*(l-u))||1;c=Math.min(c,l-u),s-=c,o-=c,n[e]-=c}}if(i<=s)break;i=s}for(i=s;s<r;){var h=r/s;for(e=0;e<columns.length&&s<r;e++){t=columns[e];var d,p=n[e];d=!t.resizable||t.maxWidth<=p?0:Math.min(Math.floor(h*p)-p,t.maxWidth-p||1e6)||1,s+=d,n[e]+=d}if(i>=s)break;i=s}var f=!1;for(e=0;e<columns.length;e++)columns[e].rerenderOnResize&&columns[e].width!=n[e]&&(f=!0),columns[e].width=n[e];applyColumnHeaderWidths(),updateCanvasWidth(!0),f&&(invalidateAllRows(),render())}function applyColumnHeaderWidths(){if(initialized){for(var e,t=0,i=$headers.children(),n=i.length;t<n;t++)e=$(i[t]),e.width()!==columns[t].width-headerColumnWidthDiff&&e.width(columns[t].width-headerColumnWidthDiff);updateColumnCaches()}}function applyColumnWidths(){for(var e,t,i=0,n=0;n<columns.length;n++)e=columns[n].width,t=getColumnCssRules(n),t.left.style.left=i+"px",t.right.style.right=canvasWidth-i-e+"px",i+=columns[n].width}function setSortColumn(e,t){setSortColumns([{columnId:e,sortAsc:t}])}function setSortColumns(e){sortColumns=e;var t=$headers.children();t.removeClass("bk-slick-header-column-sorted").find(".bk-slick-sort-indicator").removeClass("bk-slick-sort-indicator-asc bk-slick-sort-indicator-desc"),$.each(sortColumns,function(e,i){null==i.sortAsc&&(i.sortAsc=!0);var n=getColumnIndex(i.columnId);null!=n&&t.eq(n).addClass("bk-slick-header-column-sorted").find(".bk-slick-sort-indicator").addClass(i.sortAsc?"bk-slick-sort-indicator-asc":"bk-slick-sort-indicator-desc")})}function getSortColumns(){return sortColumns}function handleSelectedRangesChanged(e,t){selectedRows=[];for(var i={},n=0;n<t.length;n++)for(var o=t[n].fromRow;o<=t[n].toRow;o++){i[o]||(selectedRows.push(o),i[o]={});for(var s=t[n].fromCell;s<=t[n].toCell;s++)canCellBeSelected(o,s)&&(i[o][columns[s].id]=options.selectedCellCssClass)}setCellCssStyles(options.selectedCellCssClass,i),trigger(self.onSelectedRowsChanged,{rows:getSelectedRows()},e)}function getColumns(){return columns}function updateColumnCaches(){columnPosLeft=[],columnPosRight=[];for(var e=0,t=0,i=columns.length;t<i;t++)columnPosLeft[t]=e,columnPosRight[t]=e+columns[t].width,e+=columns[t].width}function setColumns(e){columns=e,columnsById={};for(var t=0;t<columns.length;t++){var i=columns[t]=$.extend({},columnDefaults,columns[t]);columnsById[i.id]=t,i.minWidth&&i.width<i.minWidth&&(i.width=i.minWidth),i.maxWidth&&i.width>i.maxWidth&&(i.width=i.maxWidth)}updateColumnCaches(),initialized&&(invalidateAllRows(),createColumnHeaders(),removeCssRules(),createCssRules(),resizeCanvas(),applyColumnWidths(),handleScroll())}function getOptions(){return options}function setOptions(e){getEditorLock().commitCurrentEdit()&&(makeActiveCellNormal(),options.enableAddRow!==e.enableAddRow&&invalidateRow(getDataLength()),options=$.extend(options,e),validateAndEnforceOptions(),$viewport.css("overflow-y",options.autoHeight?"hidden":"auto"),render())}function validateAndEnforceOptions(){options.autoHeight&&(options.leaveSpaceForNewRows=!1)}function setData(e,t){data=e,invalidateAllRows(),updateRowCount(),t&&scrollTo(0)}function getData(){return data}function getDataLength(){return data.getLength?data.getLength():data.length}function getDataLengthIncludingAddNew(){return getDataLength()+(options.enableAddRow?1:0)}function getDataItem(e){return data.getItem?data.getItem(e):data[e]}function getTopPanel(){return $topPanel[0]}function setTopPanelVisibility(e){options.showTopPanel!=e&&(options.showTopPanel=e,e?$topPanelScroller.slideDown("fast",resizeCanvas):$topPanelScroller.slideUp("fast",resizeCanvas))}function setHeaderRowVisibility(e){options.showHeaderRow!=e&&(options.showHeaderRow=e,e?$headerRowScroller.slideDown("fast",resizeCanvas):$headerRowScroller.slideUp("fast",resizeCanvas))}function getContainerNode(){return $container.get(0)}function getRowTop(e){return options.rowHeight*e-offset}function getRowFromPosition(e){return Math.floor((e+offset)/options.rowHeight)}function scrollTo(e){e=Math.max(e,0),e=Math.min(e,th-viewportH+(viewportHasHScroll?scrollbarDimensions.height:0));var t=offset;page=Math.min(n-1,Math.floor(e/ph)),offset=Math.round(page*cj);var i=e-offset;if(offset!=t){var o=getVisibleRange(i);cleanupRows(o),updateRowPositions()}prevScrollTop!=i&&(vScrollDir=prevScrollTop+t<i+offset?1:-1,$viewport[0].scrollTop=lastRenderedScrollTop=scrollTop=prevScrollTop=i,trigger(self.onViewportChanged,{}))}function defaultFormatter(e,t,i,n,o){return null==i?"":(i+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function getFormatter(e,t){var i=data.getItemMetadata&&data.getItemMetadata(e),n=i&&i.columns&&(i.columns[t.id]||i.columns[getColumnIndex(t.id)]),o=n&&n.formatter||i&&i.formatter||t.formatter||options.formatterFactory&&options.formatterFactory.getFormatter(t)||options.defaultFormatter;if(void 0!==o.format){var s=o,r=function(e,t,i,n,o){return s.format(e,t,i,n,o)};o=r}return o}function getEditor(e,t){var i,n=columns[t],o=data.getItemMetadata&&data.getItemMetadata(e),s=o&&o.columns;return i=s&&s[n.id]&&void 0!==s[n.id].editor?s[n.id].editor:s&&s[t]&&void 0!==s[t].editor?s[t].editor:n.editor||options.editorFactory&&options.editorFactory.getEditor(n),void 0!==i.default_view&&(i=i.default_view),
i}function getDataItemValueForColumn(e,t){return options.dataItemColumnValueExtractor?options.dataItemColumnValueExtractor(e,t):e[t.field]}function appendRowHtml(e,t,i,n){var o=getDataItem(t),s=t<n&&!o,r="bk-slick-row"+(s?" loading":"")+(t===activeRow?" active":"")+(t%2==1?" odd":" even");o||(r+=" "+options.addNewRowCssClass);var a=data.getItemMetadata&&data.getItemMetadata(t);a&&a.cssClasses&&(r+=" "+a.cssClasses),e.push("<div class='bk-ui-widget-content "+r+"' style='top:"+getRowTop(t)+"px'>");for(var l,u,c=0,h=columns.length;c<h;c++){if(u=columns[c],l=1,a&&a.columns){var d=a.columns[u.id]||a.columns[c];l=d&&d.colspan||1,"*"===l&&(l=h-c)}if(columnPosRight[Math.min(h-1,c+l-1)]>i.leftPx){if(columnPosLeft[c]>i.rightPx)break;appendCellHtml(e,t,c,l,o)}l>1&&(c+=l-1)}e.push("</div>")}function appendCellHtml(e,t,i,n,o){var s=columns[i],r="bk-slick-cell l"+i+" r"+Math.min(columns.length-1,i+n-1)+(s.cssClass?" "+s.cssClass:"");t===activeRow&&i===activeCell&&(r+=" active");for(var a in cellCssClasses)cellCssClasses[a][t]&&cellCssClasses[a][t][s.id]&&(r+=" "+cellCssClasses[a][t][s.id]);if(e.push("<div class='"+r+"'>"),o){var l=getDataItemValueForColumn(o,s);e.push(getFormatter(t,s)(t,i,l,s,o))}e.push("</div>"),rowsCache[t].cellRenderQueue.push(i),rowsCache[t].cellColSpans[i]=n}function cleanupRows(e){for(var t in rowsCache)(t=parseInt(t,10))!==activeRow&&(t<e.top||t>e.bottom)&&removeRowFromCache(t)}function invalidate(){updateRowCount(),invalidateAllRows(),render()}function invalidateAllRows(){currentEditor&&makeActiveCellNormal();for(var e in rowsCache)removeRowFromCache(e)}function removeRowFromCache(e){var t=rowsCache[e];t&&(rowNodeFromLastMouseWheelEvent==t.rowNode?(t.rowNode.style.display="none",zombieRowNodeFromLastMouseWheelEvent=rowNodeFromLastMouseWheelEvent):$canvas[0].removeChild(t.rowNode),delete rowsCache[e],delete postProcessedRows[e],renderedRows--,counter_rows_removed++)}function invalidateRows(e){var t,i;if(e&&e.length)for(vScrollDir=0,t=0,i=e.length;t<i;t++)currentEditor&&activeRow===e[t]&&makeActiveCellNormal(),rowsCache[e[t]]&&removeRowFromCache(e[t])}function invalidateRow(e){invalidateRows([e])}function updateCell(e,t){var i=getCellNode(e,t);if(i){var n=columns[t],o=getDataItem(e);currentEditor&&activeRow===e&&activeCell===t?currentEditor.loadValue(o):(i.innerHTML=o?getFormatter(e,n)(e,t,getDataItemValueForColumn(o,n),n,o):"",invalidatePostProcessingResults(e))}}function updateRow(e){var t=rowsCache[e];if(t){ensureCellNodesInRowsCache(e);var i=getDataItem(e);for(var n in t.cellNodesByColumnIdx)if(t.cellNodesByColumnIdx.hasOwnProperty(n)){n=0|n;var o=columns[n],s=t.cellNodesByColumnIdx[n];e===activeRow&&n===activeCell&&currentEditor?currentEditor.loadValue(i):i?s.innerHTML=getFormatter(e,o)(e,n,getDataItemValueForColumn(i,o),o,i):s.innerHTML=""}invalidatePostProcessingResults(e)}}function getViewportHeight(){return parseFloat($.css($container[0],"height",!0))-parseFloat($.css($container[0],"paddingTop",!0))-parseFloat($.css($container[0],"paddingBottom",!0))-parseFloat($.css($headerScroller[0],"height"))-getVBoxDelta($headerScroller)-(options.showTopPanel?options.topPanelHeight+getVBoxDelta($topPanelScroller):0)-(options.showHeaderRow?options.headerRowHeight+getVBoxDelta($headerRowScroller):0)}function resizeCanvas(){initialized&&(viewportH=options.autoHeight?options.rowHeight*getDataLengthIncludingAddNew():getViewportHeight(),numVisibleRows=Math.ceil(viewportH/options.rowHeight),viewportW=parseFloat($.css($container[0],"width",!0)),options.autoHeight||$viewport.height(viewportH),options.forceFitColumns&&autosizeColumns(),updateRowCount(),handleScroll(),lastRenderedScrollLeft=-1,render())}function updateRowCount(){if(initialized){var e=getDataLengthIncludingAddNew(),t=e+(options.leaveSpaceForNewRows?numVisibleRows-1:0),i=viewportHasVScroll;viewportHasVScroll=!options.autoHeight&&t*options.rowHeight>viewportH,makeActiveCellNormal();var o=e-1;for(var s in rowsCache)s>=o&&removeRowFromCache(s);activeCellNode&&activeRow>o&&resetActiveCell();var r=h;th=Math.max(options.rowHeight*t,viewportH-scrollbarDimensions.height),th<maxSupportedCssHeight?(h=ph=th,n=1,cj=0):(h=maxSupportedCssHeight,ph=h/100,n=Math.floor(th/ph),cj=(th-h)/(n-1)),h!==r&&($canvas.css("height",h),scrollTop=$viewport[0].scrollTop);var a=scrollTop+offset<=th-viewportH;0==th||0==scrollTop?page=offset=0:scrollTo(a?scrollTop+offset:th-viewportH),h!=r&&options.autoHeight&&resizeCanvas(),options.forceFitColumns&&i!=viewportHasVScroll&&autosizeColumns(),updateCanvasWidth(!1)}}function getVisibleRange(e,t){return null==e&&(e=scrollTop),null==t&&(t=scrollLeft),{top:getRowFromPosition(e),bottom:getRowFromPosition(e+viewportH)+1,leftPx:t,rightPx:t+viewportW}}function getRenderedRange(e,t){var i=getVisibleRange(e,t),n=Math.round(viewportH/options.rowHeight),o=3;return vScrollDir==-1?(i.top-=n,i.bottom+=o):1==vScrollDir?(i.top-=o,i.bottom+=n):(i.top-=o,i.bottom+=o),i.top=Math.max(0,i.top),i.bottom=Math.min(getDataLengthIncludingAddNew()-1,i.bottom),i.leftPx-=viewportW,i.rightPx+=viewportW,i.leftPx=Math.max(0,i.leftPx),i.rightPx=Math.min(canvasWidth,i.rightPx),i}function ensureCellNodesInRowsCache(e){var t=rowsCache[e];if(t&&t.cellRenderQueue.length)for(var i=t.rowNode.lastChild;t.cellRenderQueue.length;){var n=t.cellRenderQueue.pop();t.cellNodesByColumnIdx[n]=i,i=i.previousSibling}}function cleanUpCells(e,t){var i=0,n=rowsCache[t],o=[];for(var s in n.cellNodesByColumnIdx)if(n.cellNodesByColumnIdx.hasOwnProperty(s)){s=0|s;var r=n.cellColSpans[s];(columnPosLeft[s]>e.rightPx||columnPosRight[Math.min(columns.length-1,s+r-1)]<e.leftPx)&&(t==activeRow&&s==activeCell||o.push(s))}for(var a;null!=(a=o.pop());)n.rowNode.removeChild(n.cellNodesByColumnIdx[a]),delete n.cellColSpans[a],delete n.cellNodesByColumnIdx[a],postProcessedRows[t]&&delete postProcessedRows[t][a],i++}function cleanUpAndRenderCells(e){for(var t,i,n,o=[],s=[],r=0,a=e.top,l=e.bottom;a<=l;a++)if(t=rowsCache[a]){ensureCellNodesInRowsCache(a),cleanUpCells(e,a),i=0;var u=data.getItemMetadata&&data.getItemMetadata(a);u=u&&u.columns;for(var c=getDataItem(a),h=0,d=columns.length;h<d&&!(columnPosLeft[h]>e.rightPx);h++)if(null==(n=t.cellColSpans[h])){if(n=1,u){var p=u[columns[h].id]||u[h];n=p&&p.colspan||1,"*"===n&&(n=d-h)}columnPosRight[Math.min(d-1,h+n-1)]>e.leftPx&&(appendCellHtml(o,a,h,n,c),i++),h+=n>1?n-1:0}else h+=n>1?n-1:0;i&&(r+=i,s.push(a))}if(o.length){var f=document.createElement("div");f.innerHTML=o.join("");for(var m,g;null!=(m=s.pop());){t=rowsCache[m];for(var v;null!=(v=t.cellRenderQueue.pop());)g=f.lastChild,t.rowNode.appendChild(g),t.cellNodesByColumnIdx[v]=g}}}function renderRows(e){for(var t=$canvas[0],i=[],n=[],o=!1,s=getDataLength(),r=e.top,a=e.bottom;r<=a;r++)rowsCache[r]||(renderedRows++,n.push(r),rowsCache[r]={rowNode:null,cellColSpans:[],cellNodesByColumnIdx:[],cellRenderQueue:[]},appendRowHtml(i,r,e,s),activeCellNode&&activeRow===r&&(o=!0),counter_rows_rendered++);if(n.length){var l=document.createElement("div");l.innerHTML=i.join("");for(var r=0,a=n.length;r<a;r++)rowsCache[n[r]].rowNode=t.appendChild(l.firstChild);o&&(activeCellNode=getCellNode(activeRow,activeCell))}}function startPostProcessing(){options.enableAsyncPostRender&&(clearTimeout(h_postrender),h_postrender=setTimeout(asyncPostProcessRows,options.asyncPostRenderDelay))}function invalidatePostProcessingResults(e){delete postProcessedRows[e],postProcessFromRow=Math.min(postProcessFromRow,e),postProcessToRow=Math.max(postProcessToRow,e),startPostProcessing()}function updateRowPositions(){for(var e in rowsCache)rowsCache[e].rowNode.style.top=getRowTop(e)+"px"}function render(){if(initialized){var e=getVisibleRange(),t=getRenderedRange();cleanupRows(t),lastRenderedScrollLeft!=scrollLeft&&cleanUpAndRenderCells(t),renderRows(t),postProcessFromRow=e.top,postProcessToRow=Math.min(getDataLengthIncludingAddNew()-1,e.bottom),startPostProcessing(),lastRenderedScrollTop=scrollTop,lastRenderedScrollLeft=scrollLeft,h_render=null}}function handleHeaderRowScroll(){var e=$headerRowScroller[0].scrollLeft;e!=$viewport[0].scrollLeft&&($viewport[0].scrollLeft=e)}function handleScroll(){scrollTop=$viewport[0].scrollTop,scrollLeft=$viewport[0].scrollLeft;var e=Math.abs(scrollTop-prevScrollTop),t=Math.abs(scrollLeft-prevScrollLeft);if(t&&(prevScrollLeft=scrollLeft,$headerScroller[0].scrollLeft=scrollLeft,$topPanelScroller[0].scrollLeft=scrollLeft,$headerRowScroller[0].scrollLeft=scrollLeft),e)if(vScrollDir=prevScrollTop<scrollTop?1:-1,prevScrollTop=scrollTop,e<viewportH)scrollTo(scrollTop+offset);else{var i=offset;page=h==viewportH?0:Math.min(n-1,Math.floor(scrollTop*((th-viewportH)/(h-viewportH))*(1/ph))),offset=Math.round(page*cj),i!=offset&&invalidateAllRows()}(t||e)&&(h_render&&clearTimeout(h_render),(Math.abs(lastRenderedScrollTop-scrollTop)>20||Math.abs(lastRenderedScrollLeft-scrollLeft)>20)&&(options.forceSyncScrolling||Math.abs(lastRenderedScrollTop-scrollTop)<viewportH&&Math.abs(lastRenderedScrollLeft-scrollLeft)<viewportW?render():h_render=setTimeout(render,50),trigger(self.onViewportChanged,{}))),trigger(self.onScroll,{scrollLeft:scrollLeft,scrollTop:scrollTop})}function asyncPostProcessRows(){for(var e=getDataLength();postProcessFromRow<=postProcessToRow;){var t=vScrollDir>=0?postProcessFromRow++:postProcessToRow--,i=rowsCache[t];if(i&&!(t>=e)){postProcessedRows[t]||(postProcessedRows[t]={}),ensureCellNodesInRowsCache(t);for(var n in i.cellNodesByColumnIdx)if(i.cellNodesByColumnIdx.hasOwnProperty(n)){n=0|n;var o=columns[n];if(o.asyncPostRender&&!postProcessedRows[t][n]){var s=i.cellNodesByColumnIdx[n];s&&o.asyncPostRender(s,t,getDataItem(t),o),postProcessedRows[t][n]=!0}}return void(h_postrender=setTimeout(asyncPostProcessRows,options.asyncPostRenderDelay))}}}function updateCellCssStylesOnRenderedRows(e,t){var i,n,o,s;for(var r in rowsCache){if(s=t&&t[r],o=e&&e[r],s)for(n in s)o&&s[n]==o[n]||(i=getCellNode(r,getColumnIndex(n)),i&&$(i).removeClass(s[n]));if(o)for(n in o)s&&s[n]==o[n]||(i=getCellNode(r,getColumnIndex(n)),i&&$(i).addClass(o[n]))}}function addCellCssStyles(e,t){if(cellCssClasses[e])throw"addCellCssStyles: cell CSS hash with key '"+e+"' already exists.";cellCssClasses[e]=t,updateCellCssStylesOnRenderedRows(t,null),trigger(self.onCellCssStylesChanged,{key:e,hash:t})}function removeCellCssStyles(e){cellCssClasses[e]&&(updateCellCssStylesOnRenderedRows(null,cellCssClasses[e]),delete cellCssClasses[e],trigger(self.onCellCssStylesChanged,{key:e,hash:null}))}function setCellCssStyles(e,t){var i=cellCssClasses[e];cellCssClasses[e]=t,updateCellCssStylesOnRenderedRows(t,i),trigger(self.onCellCssStylesChanged,{key:e,hash:t})}function getCellCssStyles(e){return cellCssClasses[e]}function flashCell(e,t,i){if(i=i||100,rowsCache[e]){var n=$(getCellNode(e,t)),o=function(e){e&&setTimeout(function(){n.queue(function(){n.toggleClass(options.cellFlashingCssClass).dequeue(),o(e-1)})},i)};o(4)}}function handleMouseWheel(e){var t=$(e.target).closest(".bk-slick-row")[0];t!=rowNodeFromLastMouseWheelEvent&&(zombieRowNodeFromLastMouseWheelEvent&&zombieRowNodeFromLastMouseWheelEvent!=t&&($canvas[0].removeChild(zombieRowNodeFromLastMouseWheelEvent),zombieRowNodeFromLastMouseWheelEvent=null),rowNodeFromLastMouseWheelEvent=t)}function handleDragInit(e,t){var i=getCellFromEvent(e);if(!i||!cellExists(i.row,i.cell))return!1;var n=trigger(self.onDragInit,t,e);return!!e.isImmediatePropagationStopped()&&n}function handleDragStart(e,t){var i=getCellFromEvent(e);if(!i||!cellExists(i.row,i.cell))return!1;var n=trigger(self.onDragStart,t,e);return!!e.isImmediatePropagationStopped()&&n}function handleDrag(e,t){return trigger(self.onDrag,t,e)}function handleDragEnd(e,t){trigger(self.onDragEnd,t,e)}function handleKeyDown(e){trigger(self.onKeyDown,{row:activeRow,cell:activeCell},e);var t=e.isImmediatePropagationStopped();if(!t)if(e.shiftKey||e.altKey||e.ctrlKey)9!=e.which||!e.shiftKey||e.ctrlKey||e.altKey||(t=navigatePrev());else if(27==e.which){if(!getEditorLock().isActive())return;cancelEditAndSetFocus()}else 34==e.which?(navigatePageDown(),t=!0):33==e.which?(navigatePageUp(),t=!0):37==e.which?t=navigateLeft():39==e.which?t=navigateRight():38==e.which?t=navigateUp():40==e.which?t=navigateDown():9==e.which?t=navigateNext():13==e.which&&(options.editable&&(currentEditor?activeRow===getDataLength()?navigateDown():commitEditAndSetFocus():getEditorLock().commitCurrentEdit()&&makeActiveCellEditable()),t=!0);if(t){e.stopPropagation(),e.preventDefault();try{e.originalEvent.keyCode=0}catch(i){}}}function handleClick(e){currentEditor||(e.target!=document.activeElement||$(e.target).hasClass("bk-slick-cell"))&&setFocus();var t=getCellFromEvent(e);!t||null!==currentEditor&&activeRow==t.row&&activeCell==t.cell||(trigger(self.onClick,{row:t.row,cell:t.cell},e),e.isImmediatePropagationStopped()||activeCell==t.cell&&activeRow==t.row||!canCellBeActive(t.row,t.cell)||getEditorLock().isActive()&&!getEditorLock().commitCurrentEdit()||(scrollRowIntoView(t.row,!1),setActiveCellInternal(getCellNode(t.row,t.cell))))}function handleContextMenu(e){var t=$(e.target).closest(".bk-slick-cell",$canvas);0!==t.length&&(activeCellNode===t[0]&&null!==currentEditor||trigger(self.onContextMenu,{},e))}function handleDblClick(e){var t=getCellFromEvent(e);!t||null!==currentEditor&&activeRow==t.row&&activeCell==t.cell||(trigger(self.onDblClick,{row:t.row,cell:t.cell},e),e.isImmediatePropagationStopped()||options.editable&&gotoCell(t.row,t.cell,!0))}function handleHeaderMouseEnter(e){trigger(self.onHeaderMouseEnter,{column:$(this).data("column")},e)}function handleHeaderMouseLeave(e){trigger(self.onHeaderMouseLeave,{column:$(this).data("column")},e)}function handleHeaderContextMenu(e){var t=$(e.target).closest(".bk-slick-header-column",".bk-slick-header-columns"),i=t&&t.data("column");trigger(self.onHeaderContextMenu,{column:i},e)}function handleHeaderClick(e){var t=$(e.target).closest(".bk-slick-header-column",".bk-slick-header-columns"),i=t&&t.data("column");i&&trigger(self.onHeaderClick,{column:i},e)}function handleMouseEnter(e){trigger(self.onMouseEnter,{},e)}function handleMouseLeave(e){trigger(self.onMouseLeave,{},e)}function cellExists(e,t){return!(e<0||e>=getDataLength()||t<0||t>=columns.length)}function getCellFromPoint(e,t){for(var i=getRowFromPosition(t),n=0,o=0,s=0;s<columns.length&&o<e;s++)o+=columns[s].width,n++;return n<0&&(n=0),{row:i,cell:n-1}}function getCellFromNode(e){var t=/l\d+/.exec(e.className);if(!t)throw"getCellFromNode: cannot get cell - "+e.className;return parseInt(t[0].substr(1,t[0].length-1),10)}function getRowFromNode(e){for(var t in rowsCache)if(rowsCache[t].rowNode===e)return 0|t;return null}function getCellFromEvent(e){var t=$(e.target).closest(".bk-slick-cell",$canvas);if(!t.length)return null;var i=getRowFromNode(t[0].parentNode),n=getCellFromNode(t[0]);return null==i||null==n?null:{row:i,cell:n}}function getCellNodeBox(e,t){if(!cellExists(e,t))return null;for(var i=getRowTop(e),n=i+options.rowHeight-1,o=0,s=0;s<t;s++)o+=columns[s].width;var r=o+columns[t].width;return{top:i,left:o,bottom:n,right:r}}function resetActiveCell(){setActiveCellInternal(null,!1)}function setFocus(){tabbingDirection==-1?$focusSink[0].focus():$focusSink2[0].focus()}function scrollCellIntoView(e,t,i){scrollRowIntoView(e,i);var n=getColspan(e,t),o=columnPosLeft[t],s=columnPosRight[t+(n>1?n-1:0)],r=scrollLeft+viewportW;o<scrollLeft?($viewport.scrollLeft(o),handleScroll(),render()):s>r&&($viewport.scrollLeft(Math.min(o,s-$viewport[0].clientWidth)),handleScroll(),render())}function setActiveCellInternal(e,t){null!==activeCellNode&&(makeActiveCellNormal(),$(activeCellNode).removeClass("active"),rowsCache[activeRow]&&$(rowsCache[activeRow].rowNode).removeClass("active"));var i=activeCellNode!==e;activeCellNode=e,null!=activeCellNode?(activeRow=getRowFromNode(activeCellNode.parentNode),activeCell=activePosX=getCellFromNode(activeCellNode),null==t&&(t=activeRow==getDataLength()||options.autoEdit),$(activeCellNode).addClass("active"),$(rowsCache[activeRow].rowNode).addClass("active"),options.editable&&t&&isCellPotentiallyEditable(activeRow,activeCell)&&(clearTimeout(h_editorLoader),options.asyncEditorLoading?h_editorLoader=setTimeout(function(){makeActiveCellEditable()},options.asyncEditorLoadDelay):makeActiveCellEditable())):activeRow=activeCell=null,i&&trigger(self.onActiveCellChanged,getActiveCell())}function clearTextSelection(){if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}else if(window.getSelection){var t=window.getSelection();t&&t.removeAllRanges&&t.removeAllRanges()}}function isCellPotentiallyEditable(e,t){var i=getDataLength();return!(e<i&&!getDataItem(e))&&(!(columns[t].cannotTriggerInsert&&e>=i)&&!!getEditor(e,t))}function makeActiveCellNormal(){if(currentEditor){if(trigger(self.onBeforeCellEditorDestroy,{editor:currentEditor}),currentEditor.destroy(),currentEditor=null,activeCellNode){var e=getDataItem(activeRow);if($(activeCellNode).removeClass("editable invalid"),e){var t=columns[activeCell],i=getFormatter(activeRow,t);activeCellNode.innerHTML=i(activeRow,activeCell,getDataItemValueForColumn(e,t),t,e),invalidatePostProcessingResults(activeRow)}}navigator.userAgent.toLowerCase().match(/msie/)&&clearTextSelection(),getEditorLock().deactivate(editController)}}function makeActiveCellEditable(e){if(activeCellNode){if(!options.editable)throw"Grid : makeActiveCellEditable : should never get called when options.editable is false";if(clearTimeout(h_editorLoader),isCellPotentiallyEditable(activeRow,activeCell)){var t=columns[activeCell],i=getDataItem(activeRow);if(trigger(self.onBeforeEditCell,{row:activeRow,cell:activeCell,item:i,column:t})===!1)return void setFocus();getEditorLock().activate(editController),$(activeCellNode).addClass("editable"),e||(activeCellNode.innerHTML=""),currentEditor=new(e||getEditor(activeRow,activeCell))({grid:self,gridPosition:absBox($container[0]),position:absBox(activeCellNode),container:activeCellNode,column:t,item:i||{},commitChanges:commitEditAndSetFocus,cancelChanges:cancelEditAndSetFocus}),i&&currentEditor.loadValue(i),serializedEditorValue=currentEditor.serializeValue(),currentEditor.position&&handleActiveCellPositionChange()}}}function commitEditAndSetFocus(){getEditorLock().commitCurrentEdit()&&(setFocus(),options.autoEdit&&navigateDown())}function cancelEditAndSetFocus(){getEditorLock().cancelCurrentEdit()&&setFocus()}function absBox(e){var t={top:e.offsetTop,left:e.offsetLeft,bottom:0,right:0,width:$(e).outerWidth(),height:$(e).outerHeight(),visible:!0};t.bottom=t.top+t.height,t.right=t.left+t.width;for(var i=e.offsetParent;(e=e.parentNode)!=document.body;)t.visible&&e.scrollHeight!=e.offsetHeight&&"visible"!=$(e).css("overflowY")&&(t.visible=t.bottom>e.scrollTop&&t.top<e.scrollTop+e.clientHeight),t.visible&&e.scrollWidth!=e.offsetWidth&&"visible"!=$(e).css("overflowX")&&(t.visible=t.right>e.scrollLeft&&t.left<e.scrollLeft+e.clientWidth),t.left-=e.scrollLeft,t.top-=e.scrollTop,e===i&&(t.left+=e.offsetLeft,t.top+=e.offsetTop,i=e.offsetParent),t.bottom=t.top+t.height,t.right=t.left+t.width;return t}function getActiveCellPosition(){return absBox(activeCellNode)}function getGridPosition(){return absBox($container[0])}function handleActiveCellPositionChange(){if(activeCellNode&&(trigger(self.onActiveCellPositionChanged,{}),currentEditor)){var e=getActiveCellPosition();currentEditor.show&&currentEditor.hide&&(e.visible?currentEditor.show():currentEditor.hide()),currentEditor.position&&currentEditor.position(e)}}function getCellEditor(){return currentEditor}function getActiveCell(){return activeCellNode?{row:activeRow,cell:activeCell}:null}function getActiveCellNode(){return activeCellNode}function scrollRowIntoView(e,t){var i=e*options.rowHeight,n=(e+1)*options.rowHeight-viewportH+(viewportHasHScroll?scrollbarDimensions.height:0);(e+1)*options.rowHeight>scrollTop+viewportH+offset?(scrollTo(t?i:n),render()):e*options.rowHeight<scrollTop+offset&&(scrollTo(t?n:i),render())}function scrollRowToTop(e){scrollTo(e*options.rowHeight),render()}function scrollPage(e){var t=e*numVisibleRows;if(scrollTo((getRowFromPosition(scrollTop)+t)*options.rowHeight),render(),options.enableCellNavigation&&null!=activeRow){var i=activeRow+t,n=getDataLengthIncludingAddNew();i>=n&&(i=n-1),i<0&&(i=0);for(var o=0,s=null,r=activePosX;o<=activePosX;)canCellBeActive(i,o)&&(s=o),o+=getColspan(i,o);null!==s?(setActiveCellInternal(getCellNode(i,s)),activePosX=r):resetActiveCell()}}function navigatePageDown(){scrollPage(1)}function navigatePageUp(){scrollPage(-1)}function getColspan(e,t){var i=data.getItemMetadata&&data.getItemMetadata(e);if(!i||!i.columns)return 1;var n=i.columns[columns[t].id]||i.columns[t],o=n&&n.colspan;return o="*"===o?columns.length-t:o||1}function findFirstFocusableCell(e){for(var t=0;t<columns.length;){if(canCellBeActive(e,t))return t;t+=getColspan(e,t)}return null}function findLastFocusableCell(e){for(var t=0,i=null;t<columns.length;)canCellBeActive(e,t)&&(i=t),t+=getColspan(e,t);return i}function gotoRight(e,t,i){if(t>=columns.length)return null;do t+=getColspan(e,t);while(t<columns.length&&!canCellBeActive(e,t));return t<columns.length?{row:e,cell:t,posX:t}:null}function gotoLeft(e,t,i){if(t<=0)return null;var n=findFirstFocusableCell(e);if(null===n||n>=t)return null;for(var o,s={row:e,cell:n,posX:n};;){if(o=gotoRight(s.row,s.cell,s.posX),!o)return null;if(o.cell>=t)return s;s=o}}function gotoDown(e,t,i){for(var n,o=getDataLengthIncludingAddNew();;){if(++e>=o)return null;for(n=t=0;t<=i;)n=t,t+=getColspan(e,t);if(canCellBeActive(e,n))return{row:e,cell:n,posX:i}}}function gotoUp(e,t,i){for(var n;;){if(--e<0)return null;for(n=t=0;t<=i;)n=t,t+=getColspan(e,t);if(canCellBeActive(e,n))return{row:e,cell:n,posX:i}}}function gotoNext(e,t,i){if(null==e&&null==t&&(e=t=i=0,canCellBeActive(e,t)))return{row:e,cell:t,posX:t};var n=gotoRight(e,t,i);if(n)return n;for(var o=null,s=getDataLengthIncludingAddNew();++e<s;)if(o=findFirstFocusableCell(e),null!==o)return{row:e,cell:o,posX:o};return null}function gotoPrev(e,t,i){if(null==e&&null==t&&(e=getDataLengthIncludingAddNew()-1,t=i=columns.length-1,canCellBeActive(e,t)))return{row:e,cell:t,posX:t};for(var n,o;!n&&!(n=gotoLeft(e,t,i));){if(--e<0)return null;t=0,o=findLastFocusableCell(e),null!==o&&(n={row:e,cell:o,posX:o})}return n}function navigateRight(){return navigate("right")}function navigateLeft(){return navigate("left")}function navigateDown(){return navigate("down")}function navigateUp(){return navigate("up")}function navigateNext(){return navigate("next")}function navigatePrev(){return navigate("prev")}function navigate(e){if(!options.enableCellNavigation)return!1;if(!activeCellNode&&"prev"!=e&&"next"!=e)return!1;if(!getEditorLock().commitCurrentEdit())return!0;setFocus();var t={up:-1,down:1,left:-1,right:1,prev:-1,next:1};tabbingDirection=t[e];var i={up:gotoUp,down:gotoDown,left:gotoLeft,right:gotoRight,prev:gotoPrev,next:gotoNext},n=i[e],o=n(activeRow,activeCell,activePosX);if(o){var s=o.row==getDataLength();return scrollCellIntoView(o.row,o.cell,!s),setActiveCellInternal(getCellNode(o.row,o.cell)),activePosX=o.posX,!0}return setActiveCellInternal(getCellNode(activeRow,activeCell)),!1}function getCellNode(e,t){return rowsCache[e]?(ensureCellNodesInRowsCache(e),rowsCache[e].cellNodesByColumnIdx[t]):null}function setActiveCell(e,t){initialized&&(e>getDataLength()||e<0||t>=columns.length||t<0||options.enableCellNavigation&&(scrollCellIntoView(e,t,!1),setActiveCellInternal(getCellNode(e,t),!1)))}function canCellBeActive(e,t){if(!options.enableCellNavigation||e>=getDataLengthIncludingAddNew()||e<0||t>=columns.length||t<0)return!1;var i=data.getItemMetadata&&data.getItemMetadata(e);if(i&&"boolean"==typeof i.focusable)return i.focusable;var n=i&&i.columns;return n&&n[columns[t].id]&&"boolean"==typeof n[columns[t].id].focusable?n[columns[t].id].focusable:n&&n[t]&&"boolean"==typeof n[t].focusable?n[t].focusable:columns[t].focusable}function canCellBeSelected(e,t){if(e>=getDataLength()||e<0||t>=columns.length||t<0)return!1;var i=data.getItemMetadata&&data.getItemMetadata(e);if(i&&"boolean"==typeof i.selectable)return i.selectable;var n=i&&i.columns&&(i.columns[columns[t].id]||i.columns[t]);return n&&"boolean"==typeof n.selectable?n.selectable:columns[t].selectable}function gotoCell(e,t,i){if(initialized&&canCellBeActive(e,t)&&getEditorLock().commitCurrentEdit()){scrollCellIntoView(e,t,!1);var n=getCellNode(e,t);setActiveCellInternal(n,i||e===getDataLength()||options.autoEdit),currentEditor||setFocus()}}function commitCurrentEdit(){var e=getDataItem(activeRow),t=columns[activeCell];if(currentEditor){if(currentEditor.isValueChanged()){var i=currentEditor.validate();if(i.valid){if(activeRow<getDataLength()){var n={row:activeRow,cell:activeCell,editor:currentEditor,serializedValue:currentEditor.serializeValue(),prevSerializedValue:serializedEditorValue,execute:function(){this.editor.applyValue(e,this.serializedValue),updateRow(this.row),trigger(self.onCellChange,{row:activeRow,cell:activeCell,item:e})},undo:function(){this.editor.applyValue(e,this.prevSerializedValue),updateRow(this.row),trigger(self.onCellChange,{row:activeRow,cell:activeCell,item:e})}};options.editCommandHandler?(makeActiveCellNormal(),options.editCommandHandler(e,t,n)):(n.execute(),makeActiveCellNormal())}else{var o={};currentEditor.applyValue(o,currentEditor.serializeValue()),makeActiveCellNormal(),trigger(self.onAddNewRow,{item:o,column:t})}return!getEditorLock().isActive()}return $(activeCellNode).removeClass("invalid"),$(activeCellNode).width(),$(activeCellNode).addClass("invalid"),trigger(self.onValidationError,{editor:currentEditor,cellNode:activeCellNode,validationResults:i,row:activeRow,cell:activeCell,column:t}),currentEditor.focus(),!1}makeActiveCellNormal()}return!0}function cancelCurrentEdit(){return makeActiveCellNormal(),!0}function rowsToRanges(e){for(var t=[],i=columns.length-1,n=0;n<e.length;n++)t.push(new Slick.Range(e[n],0,e[n],i));return t}function getSelectedRows(){if(!selectionModel)throw"Selection model is not set";return selectedRows}function setSelectedRows(e){if(!selectionModel)throw"Selection model is not set";selectionModel.setSelectedRanges(rowsToRanges(e))}var defaults={explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,enableCellNavigation:!0,enableColumnReorder:!0,asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,autoHeight:!1,editorLock:Slick.GlobalEditorLock,showHeaderRow:!1,headerRowHeight:25,showTopPanel:!1,topPanelHeight:25,formatterFactory:null,editorFactory:null,cellFlashingCssClass:"flashing",selectedCellCssClass:"selected",multiSelect:!0,enableTextSelectionOnCells:!1,dataItemColumnValueExtractor:null,fullWidthRows:!1,multiColumnSort:!1,defaultFormatter:defaultFormatter,forceSyncScrolling:!1,addNewRowCssClass:"new-row"},columnDefaults={name:"",resizable:!0,sortable:!1,minWidth:30,rerenderOnResize:!1,headerCssClass:null,defaultSortAsc:!0,focusable:!0,selectable:!0},th,h,ph,n,cj,page=0,offset=0,vScrollDir=1,initialized=!1,$container,uid="slickgrid_"+Math.round(1e6*Math.random()),self=this,$focusSink,$focusSink2,$headerScroller,$headers,$headerRow,$headerRowScroller,$headerRowSpacer,$topPanelScroller,$topPanel,$viewport,$canvas,$style,$boundAncestors,stylesheet,columnCssRulesL,columnCssRulesR,viewportH,viewportW,canvasWidth,viewportHasHScroll,viewportHasVScroll,headerColumnWidthDiff=0,headerColumnHeightDiff=0,cellWidthDiff=0,cellHeightDiff=0,absoluteColumnMinWidth,tabbingDirection=1,activePosX,activeRow,activeCell,activeCellNode=null,currentEditor=null,serializedEditorValue,editController,rowsCache={},renderedRows=0,numVisibleRows,prevScrollTop=0,scrollTop=0,lastRenderedScrollTop=0,lastRenderedScrollLeft=0,prevScrollLeft=0,scrollLeft=0,selectionModel,selectedRows=[],plugins=[],cellCssClasses={},columnsById={},sortColumns=[],columnPosLeft=[],columnPosRight=[],h_editorLoader=null,h_render=null,h_postrender=null,postProcessedRows={},postProcessToRow=null,postProcessFromRow=null,counter_rows_rendered=0,counter_rows_removed=0,rowNodeFromLastMouseWheelEvent,zombieRowNodeFromLastMouseWheelEvent;this.debug=function(){var e="";e+="\ncounter_rows_rendered: "+counter_rows_rendered,e+="\ncounter_rows_removed: "+counter_rows_removed,e+="\nrenderedRows: "+renderedRows,e+="\nnumVisibleRows: "+numVisibleRows,e+="\nmaxSupportedCssHeight: "+maxSupportedCssHeight,e+="\nn(umber of pages): "+n,e+="\n(current) page: "+page,e+="\npage height (ph): "+ph,e+="\nvScrollDir: "+vScrollDir,alert(e)},this.eval=function(expr){return eval(expr)},$.extend(this,{slickGridVersion:"2.1",onScroll:new Slick.Event,onSort:new Slick.Event,onHeaderMouseEnter:new Slick.Event,onHeaderMouseLeave:new Slick.Event,onHeaderContextMenu:new Slick.Event,onHeaderClick:new Slick.Event,onHeaderCellRendered:new Slick.Event,onBeforeHeaderCellDestroy:new Slick.Event,onHeaderRowCellRendered:new Slick.Event,onBeforeHeaderRowCellDestroy:new Slick.Event,onMouseEnter:new Slick.Event,onMouseLeave:new Slick.Event,onClick:new Slick.Event,onDblClick:new Slick.Event,onContextMenu:new Slick.Event,onKeyDown:new Slick.Event,onAddNewRow:new Slick.Event,onValidationError:new Slick.Event,onViewportChanged:new Slick.Event,onColumnsReordered:new Slick.Event,onColumnsResized:new Slick.Event,onCellChange:new Slick.Event,onBeforeEditCell:new Slick.Event,onBeforeCellEditorDestroy:new Slick.Event,onBeforeDestroy:new Slick.Event,onActiveCellChanged:new Slick.Event,onActiveCellPositionChanged:new Slick.Event,onDragInit:new Slick.Event,onDragStart:new Slick.Event,onDrag:new Slick.Event,onDragEnd:new Slick.Event,onSelectedRowsChanged:new Slick.Event,onCellCssStylesChanged:new Slick.Event,registerPlugin:registerPlugin,unregisterPlugin:unregisterPlugin,getColumns:getColumns,setColumns:setColumns,getColumnIndex:getColumnIndex,updateColumnHeader:updateColumnHeader,setSortColumn:setSortColumn,setSortColumns:setSortColumns,getSortColumns:getSortColumns,autosizeColumns:autosizeColumns,getOptions:getOptions,setOptions:setOptions,getData:getData,getDataLength:getDataLength,getDataItem:getDataItem,setData:setData,getSelectionModel:getSelectionModel,setSelectionModel:setSelectionModel,getSelectedRows:getSelectedRows,setSelectedRows:setSelectedRows,getContainerNode:getContainerNode,render:render,invalidate:invalidate,invalidateRow:invalidateRow,invalidateRows:invalidateRows,invalidateAllRows:invalidateAllRows,updateCell:updateCell,updateRow:updateRow,getViewport:getVisibleRange,getRenderedRange:getRenderedRange,resizeCanvas:resizeCanvas,updateRowCount:updateRowCount,scrollRowIntoView:scrollRowIntoView,scrollRowToTop:scrollRowToTop,scrollCellIntoView:scrollCellIntoView,getCanvasNode:getCanvasNode,focus:setFocus,getCellFromPoint:getCellFromPoint,getCellFromEvent:getCellFromEvent,getActiveCell:getActiveCell,setActiveCell:setActiveCell,getActiveCellNode:getActiveCellNode,getActiveCellPosition:getActiveCellPosition,resetActiveCell:resetActiveCell,editActiveCell:makeActiveCellEditable,getCellEditor:getCellEditor,getCellNode:getCellNode,getCellNodeBox:getCellNodeBox,canCellBeSelected:canCellBeSelected,canCellBeActive:canCellBeActive,navigatePrev:navigatePrev,navigateNext:navigateNext,navigateUp:navigateUp,navigateDown:navigateDown,navigateLeft:navigateLeft,navigateRight:navigateRight,navigatePageUp:navigatePageUp,navigatePageDown:navigatePageDown,gotoCell:gotoCell,getTopPanel:getTopPanel,setTopPanelVisibility:setTopPanelVisibility,setHeaderRowVisibility:setHeaderRowVisibility,getHeaderRow:getHeaderRow,getHeaderRowColumn:getHeaderRowColumn,getGridPosition:getGridPosition,flashCell:flashCell,addCellCssStyles:addCellCssStyles,setCellCssStyles:setCellCssStyles,removeCellCssStyles:removeCellCssStyles,getCellCssStyles:getCellCssStyles,init:finishInitialization,destroy:destroy,getEditorLock:getEditorLock,getEditController:getEditController}),init()}/**
* @license
* (c) 2009-2013 Michael Leibman
* michael{dot}leibman{at}gmail{dot}com
* http://github.com/mleibman/slickgrid
*
* Distributed under MIT license.
* All rights reserved.
*
* SlickGrid v2.2
*
* NOTES:
* Cell/row DOM manipulations are done directly bypassing jQuery's DOM manipulation methods.
* This increases the speed dramatically, but can only be done safely because there are no event handlers
* or data associated with any cell/row DOM nodes. Cell editors must make sure they implement .destroy()
* and do proper cleanup.
*/
var $=require("jquery"),$1=require("jquery_event_drag"),$2=require("jquery_event_drop"),Slick=require("./slick.core"),scrollbarDimensions,maxSupportedCssHeight;module.exports=SlickGrid},{"./slick.core":"slick_grid/slick.core",jquery:"jquery",jquery_event_drag:"jquery_event_drag",jquery_event_drop:"jquery_event_drop"}]},{},["models/widgets/main"])}();/*
Copyright (c) 2012, Continuum Analytics, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither the name of Continuum Analytics nor the names of any contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
*/