!function(){var define=void 0;return function(t,e,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 t)Bokeh.require.modules[o]=t[o];for(var s=0;s\n\n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/button_template":[function(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")};return function(){(function(){e.push('\n")}).call(this)}.call(t),e.join("")}},{}],"models/widgets/cell_editors":[function(t,e,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(t,e){function i(){this.constructor=t}for(var n in e)T.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},T={}.hasOwnProperty;R=t("underscore"),n=t("jquery"),o=t("jquery-ui/autocomplete"),s=t("jquery-ui/spinner"),I=t("../../core/properties"),f=t("../../model"),M=t("./widget"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e}(f),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.tagName="div",e.prototype.className="bk-cell-editor",e.prototype.input=null,e.prototype.emptyValue=null,e.prototype.defaultValue=null,e.prototype.initialize=function(t){return e.__super__.initialize.call(this,{}),this.args=t,this.model=this.args.column.editor,this.render()},e.prototype.render=function(){return e.__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},e.prototype.renderEditor=function(){},e.prototype.disableNavigation=function(){return this.$input.keydown(function(t){return function(t){var e;switch(e=function(){return t.stopImmediatePropagation()},t.keyCode){case n.ui.keyCode.LEFT:return e();case n.ui.keyCode.RIGHT:return e();case n.ui.keyCode.UP:return e();case n.ui.keyCode.DOWN:return e();case n.ui.keyCode.PAGE_UP:return e();case n.ui.keyCode.PAGE_DOWN:return e()}}}(this))},e.prototype.destroy=function(){return this.remove()},e.prototype.focus=function(){return this.$input.focus()},e.prototype.show=function(){},e.prototype.hide=function(){},e.prototype.position=function(){},e.prototype.getValue=function(){return this.$input.val()},e.prototype.setValue=function(t){return this.$input.val(t)},e.prototype.serializeValue=function(){return this.getValue()},e.prototype.isValueChanged=function(){return!(""===this.getValue()&&null==this.defaultValue)&&this.getValue()!==this.defaultValue},e.prototype.applyValue=function(t,e){return this.args.grid.getData().setField(t.index,this.args.column.field,e)},e.prototype.loadValue=function(t){var e;return e=t[this.args.column.field],this.defaultValue=null!=e?e:this.emptyValue,this.setValue(this.defaultValue)},e.prototype.validateValue=function(t){var e;return this.args.column.validator&&(e=this.args.column.validator(t),!e.valid)?e:{valid:!0,msg:null}},e.prototype.validate=function(){return this.validateValue(this.getValue())},e}(M.View),k=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.emptyValue="",e.prototype.input='',e.prototype.renderEditor=function(){var t;return t=this.model.get("completions"),R.isEmpty(t)||(this.$input.autocomplete({source:t}),this.$input.autocomplete("widget").addClass("bk-cell-editor-completion")),this.$input.focus().select()},e.prototype.loadValue=function(t){return e.__super__.loadValue.call(this,t),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},e}(a),w=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="StringEditor",e.prototype.default_view=k,e.define({completions:[I.Array,[]]}),e}(r),x=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e}(a),C=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="TextEditor",e.prototype.default_view=x,e}(r),y=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.input="',e.prototype.renderEditor=function(){return this.focus()},e.prototype.loadValue=function(t){return this.defaultValue=!!t[this.args.column.field],this.$input.prop("checked",this.defaultValue)},e.prototype.serializeValue=function(){return this.$input.prop("checked")},e}(a),l=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="CheckboxEditor",e.prototype.default_view=u,e}(r),p=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.input='',e.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.get("step")}),this.$input.focus().select()},e.prototype.remove=function(){return this.$input.spinner("destroy"),e.__super__.remove.call(this)},e.prototype.serializeValue=function(){return parseInt(this.getValue(),10)||0},e.prototype.loadValue=function(t){return e.__super__.loadValue.call(this,t),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},e.prototype.validateValue=function(t){return isNaN(t)?{valid:!1,msg:"Please enter a valid integer"}:e.__super__.validateValue.call(this,t)},e}(a),d=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="IntEditor",e.prototype.default_view=p,e.define({step:[I.Number,1]}),e}(r),g=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.input='',e.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.get("step")}),this.$input.focus().select()},e.prototype.remove=function(){return this.$input.spinner("destroy"),e.__super__.remove.call(this)},e.prototype.serializeValue=function(){return parseFloat(this.getValue())||0},e.prototype.loadValue=function(t){return e.__super__.loadValue.call(this,t),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},e.prototype.validateValue=function(t){return isNaN(t)?{valid:!1,msg:"Please enter a valid number"}:e.__super__.validateValue.call(this,t)},e}(a),m=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="NumberEditor",e.prototype.default_view=g,e.define({step:[I.Number,.01]}),e}(r),S=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e}(a),D=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="TimeEditor",e.prototype.default_view=S,e}(r),h=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.emptyValue=new Date,e.prototype.input='',e.prototype.renderEditor=function(){return this.calendarOpen=!1,this.$input.datepicker({showOn:"button",buttonImageOnly:!0,beforeShow:function(t){return function(){return t.calendarOpen=!0}}(this),onClose:function(t){return function(){return t.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()},e.prototype.destroy=function(){return n.datepicker.dpDiv.stop(!0,!0),this.$input.datepicker("hide"),this.$input.datepicker("destroy"),e.__super__.destroy.call(this)},e.prototype.show=function(){return this.calendarOpen&&n.datepicker.dpDiv.stop(!0,!0).show(),e.__super__.show.call(this)},e.prototype.hide=function(){return this.calendarOpen&&n.datepicker.dpDiv.stop(!0,!0).hide(),e.__super__.hide.call(this)},e.prototype.position=function(t){return this.calendarOpen&&n.datepicker.dpDiv.css({top:t.top+30,left:t.left}),e.__super__.position.call(this)},e.prototype.getValue=function(){return this.$input.datepicker("getDate").getTime()},e.prototype.setValue=function(t){return this.$input.datepicker("setDate",new Date(t))},e}(a),c=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return P(e,t),e.prototype.type="DateEditor",e.prototype.default_view=h,e}(r),e.exports={String:{Model:w,View:k},Text:{Model:C,View:x},Select:{Model:b,View:y},Percent:{Model:v,View:_},Checkbox:{Model:l,View:u},Int:{Model:d,View:p},Number:{Model:m,View:g},Time:{Model:D,View:S},Date:{Model:c,View:h}}},{"../../core/properties":"core/properties","../../model":"model","./widget":"models/widgets/widget",jquery:"jquery","jquery-ui/autocomplete":"jquery-ui/autocomplete","jquery-ui/spinner":"jquery-ui/spinner",underscore:"underscore"}],"models/widgets/cell_formatters":[function(t,e,i){var n,o,s,r,a,l,u,c,h,d,p,f=function(t,e){function i(){this.constructor=t}for(var n in e)m.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},m={}.hasOwnProperty;d=t("underscore"),n=t("jquery"),c=t("numbro"),p=t("../../core/properties"),l=t("../../model"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.doFormat=function(t,e,i,n,o){return null===i?"":(i+"").replace(/&/g,"&").replace(//g,">")},e}(l),h=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="StringFormatter",e.define({font_style:[p.FontStyle,"normal"],text_align:[p.TextAlign,"left"],text_color:[p.Color]}),e.prototype.doFormat=function(t,i,o,s,r){var a,l,u,c;if(l=e.__super__.doFormat.call(this,t,i,o,s,r),a=this.get("font_style"),u=this.get("text_align"),c=this.get("text_color"),null!=a||null!=u||null!=c){switch(l=n(""+l+""),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},e}(s),u=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="NumberFormatter",e.define({format:[p.String,"0,0"],language:[p.String,"en"],rounding:[p.String,"round"]}),e.prototype.doFormat=function(t,i,n,o,s){var r,a,l;return r=this.get("format"),a=this.get("language"),l=function(){switch(this.get("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),e.__super__.doFormat.call(this,t,i,n,o,s)},e}(h),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="BooleanFormatter",e.define({icon:[p.String,"check"]}),e.prototype.doFormat=function(t,e,i,o,s){return i?n("").addClass(this.get("icon")).html():""},e}(s),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="DateFormatter",e.define({format:[p.String,"yy M d"]}),e.prototype.getFormat=function(){var t,e;return t=this.get("format"),e=function(){switch(t){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!=e?n.datepicker[e]:t},e.prototype.doFormat=function(t,i,o,s,r){var a;return o=d.isString(o)?parseInt(o,10):o,a=n.datepicker.formatDate(this.getFormat(),new Date(o)),e.__super__.doFormat.call(this,t,i,a,s,r)},e}(s),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="HTMLTemplateFormatter",e.define({template:[p.String,"<%= value %>"]}),e.prototype.doFormat=function(t,e,i,n,o){var s,r;return r=this.get("template"),null===i?"":(o=d.extend({},o,{value:i}),(s=d.template(r))(o))},e}(s),e.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/numbro",underscore:"underscore"}],"models/widgets/checkbox_button_group":[function(t,e,i){var n,o,s,r,a,l,u,c,h,d=function(t,e){function i(){this.constructor=t}for(var n in e)p.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},p={}.hasOwnProperty,f=[].indexOf||function(t){for(var e=0,i=this.length;e').attr({value:""+r}),f.call(o,r)>=0&&t.prop("checked",!0),i=n(''),i.text(l).prepend(t),i.addClass("bk-bs-btn-"+this.mget("button_type")),f.call(o,r)>=0&&i.addClass("bk-bs-active"),this.$el.find(".bk-bs-btn-group").append(i);return this},e.prototype.change_input=function(){var t,e,i,n;return t=function(){var t,n,o,s;for(o=this.$("input"),s=[],i=t=0,n=o.length;t').attr({value:""+r}),this.mget("disabled")&&i.prop("disabled",!0),d.call(s,r)>=0&&i.prop("checked",!0),o=n("").text(l).prepend(i),this.mget("inline")?(o.addClass("bk-bs-checkbox-inline"),this.$el.append(o)):(t=n('
').append(o),this.$el.append(t));return this},e.prototype.change_input=function(){var t,e,i,n;return t=function(){var t,n,o,s;for(o=this.$("input"),s=[],i=t=0,n=o.length;ti;0<=i?t++:t--)e.push(t);return e}.apply(this),this.fields.push("index"))}return t.prototype.getLength=function(){return this.source.get_length()},t.prototype.getItem=function(t){var e,i,n,o,s;for(i={},s=this.fields,n=0,o=s.length;ni;t=0<=i?++e:--e)n.push(this.getItem(t));return n}.call(this)},t.prototype.sort=function(t){var e,i,n,o,s,r,a;for(e=function(){var e,n,o;for(o=[],e=0,n=t.length;ec?l:-l,0!==a)return a;return 0}),n=o=0,s=a.length;o").text(this.mget("title")),this.input=n(''),this.datepicker=this.input.datepicker({defaultDate:new Date(this.mget("value")),minDate:null!=this.mget("min_date")?new Date(this.mget("min_date")):null,maxDate:null!=this.mget("max_date")?new Date(this.mget("max_date")):null,onSelect:this.onSelect}),this.$el.append([this.label,this.input])},e.prototype.onSelect=function(t,e){var i,n;return i=new Date(t),this.mset("value",i.toString()),null!=(n=this.mget("callback"))?n.execute(this.model):void 0},e}(a.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="DatePicker",e.prototype.default_view=r,e.define({value:[u.Any,Date.now()],min_date:[u.Any],max_date:[u.Any]}),e}(a.Model),e.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(t,e,i){var n,o,s,r,a,l,u,c=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;l=t("underscore"),n=t("jquery"),o=t("jqrangeslider/jQDateRangeSlider"),u=t("../../core/properties"),a=t("./input_widget"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",function(t){return function(){return t.render}}(this))},e.prototype.render=function(){var t,i,n,o,s,r,a,u,c;return e.__super__.render.call(this),this.$el.empty(),s=this.mget("value"),c=s[0],u=s[1],r=this.mget("range"),o=r[0],n=r[1],a=this.mget("bounds"),i=a[0],t=a[1],this.$el.dateRangeSlider({defaultValues:{min:new Date(c),max:new Date(u)},bounds:{min:new Date(i),max:new Date(t)},range:{min:!!l.isObject(o)&&o,max:!!l.isObject(n)&&n},step:this.mget("step")||{},enabled:this.mget("enabled"),arrows:this.mget("arrows"),valueLabels:this.mget("value_labels"),wheelMode:this.mget("wheel_mode")}),this.$el.on("userValuesChanged",function(t){return function(e,i){var n;return t.mset("value",[i.values.min,i.values.max]),null!=(n=t.mget("callback"))?n.execute(t.model):void 0}}(this)),this},e}(a.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="DateRangeSlider",e.prototype.default_view=r,e.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]}),e}(a.Model),e.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(t,e,i){var n,o,s,r,a,l,u,c,h=function(t,e){return function(){return t.apply(e,arguments)}},d=function(t,e){function i(){this.constructor=t}for(var n in e)p.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},p={}.hasOwnProperty;l=t("underscore"),n=t("jquery"),o=t("bootstrap/modal"),c=t("../../core/properties"),u=t("./dialog_template"),a=t("./widget"),r=function(t){function e(){return this.change_content=h(this.change_content,this),this.change_visibility=h(this.change_visibility,this), this.onHide=h(this.onHide,this),e.__super__.constructor.apply(this,arguments)}return d(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),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)},e.prototype.render_content=function(){var t;return null!=this.content_view&&this.content_view.remove(),t=this.mget("content"),null!=t&&("object"==typeof t?(this.content_view=new t.default_view({model:t}),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(t))),this},e.prototype.render_buttons=function(){var t;return null!=this.buttons_box_view&&this.buttons_box_view.remove(),t=this.mget("buttons_box"),null!=t&&(this.buttons_box_view=new t.default_view({model:t}),this.$el.find(".bk-dialog-buttons_box").empty(),this.$el.find(".bk-dialog-buttons_box").append(this.buttons_box_view.$el)),this},e.prototype.render=function(){return e.__super__.render.call(this),this.$modal=n(u(this.model.attributes)),this.$modal.modal({show:this.mget("visible")}),this.$modal.on("hidden.bk-bs.modal",this.onHide),this.$el.html(this.$modal),this},e.prototype.onHide=function(t){return this.mset("visible",!1,{silent:!0})},e.prototype.change_visibility=function(){return this.$modal.modal(this.mget("visible")?"show":"hide")},e.prototype.change_content=function(){return this.render_content()},e}(a.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return d(e,t),e.prototype.type="Dialog",e.prototype.default_view=r,e.define({visible:[c.Bool,!1],closable:[c.Bool,!0],title:[c.String,""],content:[c.String,""],buttons:[c.Array,[]],buttons_box:[c.Instance]}),e}(a.Model),e.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(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")};return function(){(function(){e.push('
\n
\n
\n
\n '),this.closable&&e.push('\n \n '),e.push('\n

'),e.push(i(this.title)),e.push('

\n
\n
\n
\n
\n \n
\n
\n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/div":[function(t,e,i){var n,o,s,r,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;n=t("jquery"),r=t("./markup"),a=t("../../core/properties"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=this.model.render_as_text===!0?n("
").text(this.model.text):n("
").html(this.model.text),this.$el.find(".bk-markup").append(t),this},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="Div",e.prototype.default_view=s,e.define({render_as_text:[a.Bool,!1]}),e}(r.Model),e.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./markup":"models/widgets/markup",jquery:"jquery"}],"models/widgets/dropdown":[function(t,e,i){var n,o,s,r,a,l,u,c=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;a=t("underscore"),n=t("jquery"),l=t("../../core/properties"),o=t("./abstract_button"),u=t("./dropdown_template"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.template=u,e.prototype.render=function(){var t,i,o,s,r,a,l,u,c,h;for(e.__super__.render.call(this),r=[],u=this.model.menu,o=0,l=u.length;o"+a+""),c=this,t.click(function(t){return c.set_value(n(this).data("value"))}),n("
  • ").append(t)):n('
  • '),r.push(i);return this.$el.find(".bk-bs-dropdown-menu").append(r),this.$el.find("button").val(this.model.default_value),this},e.prototype.set_value=function(t){return this.model.value=t,this.$el.find("button").val(t)},e}(o.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="Dropdown",e.prototype.default_view=r,e.define({value:[l.String],default_value:[l.String],menu:[l.Array,[]]}),e.override({label:"Dropdown"}),e}(o.Model),e.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(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")};return function(){(function(){e.push('\n
      \n
    \n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/icon":[function(t,e,i){var n,o,s,r,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("underscore"),l=t("../../core/properties"),n=t("./abstract_icon"),r=t("./widget"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.tagName="i",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){var t,e;return this.$el.empty(),this.$el.addClass("bk-fa"),this.$el.addClass("bk-fa-"+this.mget("icon_name")),e=this.mget("size"),null!=e&&this.$el.css({"font-size":e+"em"}),t=this.mget("flip"),null!=t&&this.$el.addClass("bk-fa-flip-"+t),this.mget("spin")&&this.$el.addClass("bk-fa-spin"),this},e.prototype.update_constraints=function(){return null},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="Icon",e.prototype.default_view=s,e.define({icon_name:[l.String,"check"],size:[l.Number],flip:[l.Any],spin:[l.Bool,!1]}),e}(n.Model),e.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(t,e,i){var n,o,s,r,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;r=t("underscore"),s=t("./widget"),a=t("../../core/properties"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.$el.find("input").prop("disabled",this.model.disabled)},e.prototype.change_input=function(){var t;return null!=(t=this.mget("callback"))?t.execute(this.model):void 0},e}(s.View),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="InputWidget",e.prototype.default_view=o,e.define({callback:[a.Instance],title:[a.String,""]}),e}(s.Model),e.exports={Model:n,View:o}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",underscore:"underscore"}],"models/widgets/main":[function(t,e,i){e.exports={models:{editors:[t("./cell_editors"),"Editor"],formatters:[t("./cell_formatters"),"Formatter"],AbstractButton:t("./abstract_button"),AbstractIcon:t("./abstract_icon"),TableWidget:t("./table_widget"),Markup:t("./markup"),Widget:t("./widget"),InputWidget:t("./input_widget"),TableColumn:t("./table_column"),DataTable:t("./data_table"),Paragraph:t("./paragraph"),Div:t("./div"),TextInput:t("./text_input"),AutocompleteInput:t("./autocomplete_input"),PreText:t("./pretext"),Select:t("./selectbox"),Slider:t("./slider"),MultiSelect:t("./multiselect"),DateRangeSlider:t("./date_range_slider"),DatePicker:t("./date_picker"),Panel:t("./panel"),Tabs:t("./tabs"),Dialog:t("./dialog"),Icon:t("./icon"),Button:t("./button"),Toggle:t("./toggle"),Dropdown:t("./dropdown"),CheckboxGroup:t("./checkbox_group"),RadioGroup:t("./radio_group"),CheckboxButtonGroup:t("./checkbox_button_group"),RadioButtonGroup:t("./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(t,e,i){var n,o,s,r,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;r=t("../../core/properties"),s=t("./widget"),a=t("./markup_template"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.template=a,e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){if(e.__super__.render.call(this),this.$el.empty(),this.$el.html(this.template()),this.mget("height")&&this.$el.height(this.mget("height")),this.mget("width"))return this.$el.width(this.mget("width"))},e}(s.View),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="Markup",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t)},e.define({text:[r.String,""]}),e}(s.Model),e.exports={Model:n,View:o}},{"../../core/properties":"core/properties","./markup_template":"models/widgets/markup_template","./widget":"models/widgets/widget"}],"models/widgets/markup_template":[function(t,e,i){e.exports=function(t){t||(t={});var e=[];return function(){(function(){e.push('
    \n
    \n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/multiselect":[function(t,e,i){var n,o,s,r,a,l,u,c=function(t,e){return function(){return t.apply(e,arguments)}},h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;a=t("jquery"),n=t("underscore"),u=t("../../core/properties"),o=t("./input_widget"),l=t("./multiselecttemplate"),r=function(t){function e(){return this.render_selection=c(this.render_selection,this),e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.tagName="div",e.prototype.template=l,e.prototype.events={"change select":"change_input"},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),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)},e.prototype.render=function(){var t;return e.__super__.render.call(this),this.$el.empty(),t=this.template(this.model.attributes),this.$el.html(t),this.render_selection(),this},e.prototype.render_selection=function(){var t;return t={},a.map(this.mget("value"),function(e){return t[e]=!0}),this.$("option").each(function(e){return function(i){if(i=e.$(i),t[i.attr("value")])return i.attr("selected","selected")}}(this))},e.prototype.change_input=function(){var t;return t=this.$el.find("select").val(),t?this.model.value=t:this.model.value=[],e.__super__.change_input.call(this)},e}(o.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="MultiSelect",e.prototype.default_view=r,e.define({value:[u.Array,[]],options:[u.Array,[]]}),e}(o.Model),e.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(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")};return function(){(function(){var t,n,o,s;for(e.push('\n")}).call(this)}.call(t),e.join("")}},{}],"models/widgets/panel":[function(t,e,i){var n,o,s,r,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("underscore"),n=t("jquery"),l=t("../../core/properties"),r=t("./widget"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.$el.empty(),this},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="Panel",e.prototype.default_view=s,e.define({title:[l.String,""],child:[l.Instance],closable:[l.Bool,!1]}),e}(r.Model),e.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",jquery:"jquery",underscore:"underscore"}],"models/widgets/paragraph":[function(t,e,i){var n,o,s,r,a=function(t,e){function i(){this.constructor=t}for(var n in e)l.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},l={}.hasOwnProperty;n=t("jquery"),o=t("./markup"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=n('

    ').text(this.model.text),this.$el.find(".bk-markup").append(t)},e}(o.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="Paragraph",e.prototype.default_view=r,e}(o.Model),e.exports={Model:s,View:r}},{"./markup":"models/widgets/markup",jquery:"jquery"}],"models/widgets/pretext":[function(t,e,i){var n,o,s,r,a,l=function(t,e){function i(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},u={}.hasOwnProperty;n=t("jquery"),o=t("./markup"),a=t("../../core/properties"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.render=function(){var t;return e.__super__.render.call(this),t=n('
    ').text(this.model.text),this.$el.find(".bk-markup").append(t)},e}(o.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="PreText",e.prototype.default_view=r,e}(o.Model),e.exports={Model:s,View:r}},{"../../core/properties":"core/properties","./markup":"models/widgets/markup",jquery:"jquery"}],"models/widgets/radio_button_group":[function(t,e,i){var n,o,s,r,a,l,u,c,h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;l=t("underscore"),n=t("jquery"),o=t("bootstrap/button"),u=t("../../core/properties"),a=t("./widget"),c=t("./button_group_template"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.events={"change input":"change_input"},e.prototype.template=c,e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){var t,i,o,s,r,a,u,c,h,d;for(e.__super__.render.call(this),this.$el.empty(),s=this.template(),this.$el.append(s),h=l.uniqueId("RadioButtonGroup"),o=this.mget("active"),d=this.mget("labels"),r=a=0,c=d.length;a').attr({name:h,value:""+r}),r===o&&t.prop("checked",!0),i=n(''),i.text(u).prepend(t),i.addClass("bk-bs-btn-"+this.mget("button_type")),r===o&&i.addClass("bk-bs-active"),this.$el.find(".bk-bs-btn-group").append(i);return this},e.prototype.change_input=function(){var t,e,i,n;return t=function(){var t,n,o,s;for(o=this.$("input"),s=[],e=t=0,n=o.length;t').attr({name:h,value:""+r}),this.mget("disabled")&&i.prop("disabled",!0),r===s&&i.prop("checked",!0),o=n("").text(u).prepend(i),this.mget("inline")?(o.addClass("bk-bs-radio-inline"),this.$el.append(o)):(t=n('
    ').append(o),this.$el.append(t));return this},e.prototype.change_input=function(){var t,e,i,n;return t=function(){var t,n,o,s;for(o=this.$("input"),s=[],e=t=0,n=o.length;t/g,">").replace(/"/g,""")};return function(){(function(){var t,n,o,s;for(e.push('\n\n")}).call(this)}.call(t),e.join("")}},{}],"models/widgets/slider":[function(t,e,i){var n,o,s,r,a,l,u,c,h,d=function(t,e){return function(){return t.apply(e,arguments)}},p=function(t,e){function i(){this.constructor=t}for(var n in e)f.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},f={}.hasOwnProperty;l=t("underscore"),n=t("jquery-ui/slider"),u=t("../../core/logging").logger,c=t("../../core/properties"),o=t("./input_widget"),a=t("./widget"),h=t("./slidertemplate"),r=function(t){function e(){return this.slide=d(this.slide,this),this.slidestop=d(this.slidestop,this),e.__super__.constructor.apply(this,arguments)}return p(e,t),e.prototype.tagName="div",e.prototype.template=h,e.prototype.initialize=function(t){var i;return e.__super__.initialize.call(this,t),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.mget("callback_policy")&&(this.callbackWrapper=function(){var t;return null!=(t=this.mget("callback"))?t.execute(this.model):void 0}),"throttle"===this.mget("callback_policy")&&this.mget("callback")&&(this.callbackWrapper=l.throttle(function(){var t;return null!=(t=this.mget("callback"))?t.execute(this.model):void 0},this.mget("callback_throttle"))),this.render()},e.prototype.render=function(){var t,i,n,o;return e.__super__.render.call(this),t=this.mget("end"),i=this.mget("start"),o=this.mget("step")||(t-i)/50,u.debug("slider render: min, max, step = ("+i+", "+t+", "+o+")"),n={orientation:this.mget("orientation"),animate:"fast",value:this.mget("value"),min:i,max:t,step:o,stop:this.slidestop,slide:this.slide},this.$el.find(".slider").slider(n),this.$("#"+this.mget("id")).val(this.$(".slider").slider("value")),this.$el.find(".bk-slider-parent").height(this.mget("height")),this},e.prototype.slidestop=function(t,e){var i;if("mouseup"===this.mget("callback_policy")||"throttle"===this.mget("callback_policy"))return null!=(i=this.mget("callback"))?i.execute(this.model):void 0},e.prototype.slide=function(t,e){var i;if(i=e.value,u.debug("slide value = "+i),this.$("#"+this.mget("id")).val(e.value),this.mset("value",i),this.callbackWrapper)return this.callbackWrapper()},e}(o.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return p(e,t),e.prototype.type="Slider",e.prototype.default_view=r,e.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"]}),e}(o.Model),e.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(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")};return function(){(function(){e.push('
    \n \n
    \n
    \n
    \n
    \n
    \n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/table_column":[function(t,e,i){var n,o,s,r,a,l,u=function(t,e){function i(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("underscore"),n=t("./cell_editors"),o=t("./cell_formatters"),l=t("../../core/properties"),s=t("../../model"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="TableColumn",e.prototype.default_view=null,e.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"]}),e.prototype.toColumn=function(){var t;return{id:a.uniqueId(),field:this.get("field"),name:this.get("title"),width:this.get("width"),formatter:null!=(t=this.get("formatter"))?t.doFormat.bind(this.get("formatter")):void 0,editor:this.get("editor"),sortable:this.get("sortable"),defaultSortAsc:"ascending"===this.get("default_sort")}},e}(s),e.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(t,e,i){var n,o,s,r,a=function(t,e){function i(){this.constructor=t}for(var n in e)l.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),o=t("./widget"),r=t("../../core/properties"),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="TableWidget",e.define({source:[r.Instance]}),e}(o.Model),e.exports={Model:n}},{"../../core/properties":"core/properties","./widget":"models/widgets/widget",underscore:"underscore"}],"models/widgets/tabs":[function(t,e,i){var n,o,s,r,a,l,u,c,h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;l=t("underscore"),n=t("jquery"),o=t("bootstrap/tab"),u=t("../../core/properties"),c=t("./tabs_template"),a=t("./widget"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.render=function(){var t,i,o,s,r,a,u,h,p,f,m,g,v,_,b;e.__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.mget("tabs"),i=this.mget("active"),s=this.mget("children"),r=n(c({tabs:v,active:function(t){return t===i?"bk-bs-active":""}})),_=this,r.find("> li > a").click(function(t){var e,i,o;return t.preventDefault(),n(this).tab("show"),e=n(this).attr("href").replace("#tab-",""),v=_.model.get("tabs"),i=l.indexOf(v,l.find(v,function(t){return t.id===e})),_.model.set("active",i),null!=(o=_.model.get("callback"))?o.execute(_.model):void 0}),t=r.children(".bk-bs-tab-pane"),m=l.zip(s,t),a=0,h=m.length;a/g,">").replace(/"/g,""")};return function(){(function(){var t,n,o,s,r,a,l,u;for(e.push('\n
    \n '),l=this.tabs,t=o=0,r=l.length;o
    \n ');e.push("\n
    \n")}).call(this)}.call(t),e.join("")}},{}],"models/widgets/text_input":[function(t,e,i){var n,o,s,r,a,l,u,c,h=function(t,e){function i(){this.constructor=t}for(var n in e)d.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},d={}.hasOwnProperty;r=t("underscore"),a=t("../../common/build_views"),l=t("../../core/logging").logger,u=t("../../core/properties"),n=t("./input_widget"),c=t("./text_input_template"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.tagName="div",e.prototype.attributes={"class":"bk-widget-form-group"},e.prototype.template=c,e.prototype.events={"change input":"change_input"},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){return e.__super__.render.call(this),this.$el.html(this.template(this.model.attributes)),this.model.height&&this.$el.find("input").height(this.mget("height")-35),this},e.prototype.change_input=function(){var t;return t=this.$("input").val(),l.debug("widget/text_input: value = "+t),this.model.value=t,e.__super__.change_input.call(this)},e}(n.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="TextInput",e.prototype.default_view=s,e.define({value:[u.String,""]}),e}(n.Model),e.exports={Model:o,View:s}},{"../../common/build_views":"common/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(t,e,i){e.exports=function(t){t||(t={});var e=[],i=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?n(t):""},n=function(t){return(""+t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")};return function(){(function(){e.push('\n\n')}).call(this)}.call(t),e.join("")}},{}],"models/widgets/toggle":[function(t,e,i){var n,o,s,r,a=function(t,e){function i(){this.constructor=t}for(var n in e)l.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},l={}.hasOwnProperty;r=t("../../core/properties"),n=t("./abstract_button"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.mget("active")?this.$el.find("button").addClass("bk-bs-active"):this.$el.find("button").removeClass("bk-bs-active"),this},e.prototype.change_input=function(){return e.__super__.change_input.call(this),this.mset("active",!this.mget("active"))},e}(n.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="Toggle",e.prototype.default_view=s,e.define({active:[r.Bool,!1]}),e.override({label:"Toggle"}),e}(n.Model),e.exports={Model:o,View:s}},{"../../core/properties":"core/properties","./abstract_button":"models/widgets/abstract_button"}],"models/widgets/widget":[function(t,e,i){var n,o,s,r=function(t,e){function i(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},a={}.hasOwnProperty;n=t("../layouts/layout_dom"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.className="bk-widget",e.prototype.render=function(){if(this.model.height&&this.$el.height(this.model.height),this.model.width)return this.$el.width(this.model.width)},e}(n.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return r(e,t),e.prototype.type="Widget",e.prototype.default_view=s,e}(n.Model),e.exports={Model:o,View:s}},{"../layouts/layout_dom":"models/layouts/layout_dom"}],"util/dom_util":[function(t,e,i){var n,o,s;o=t("underscore"),n=t("jquery"),s=function(t,e){var i,o;return i=function(i){return function(){if(n.contains(document.documentElement,t))return clearInterval(o),e()}}(this),o=setInterval(i,50)},e.exports={waitForElement:s}},{jquery:"jquery",underscore:"underscore"}],"jquery-ui/autocomplete":[function(t,e,i){var n=t("jquery");t("./core"),t("./widget"),t("./position"),t("./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(t,e){t.widget("ui.autocomplete",{version:"1.10.4",defaultElement:"",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 e,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 e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var s=t.ui.keyCode;switch(o.keyCode){case s.PAGE_UP:e=!0,this._move("previousPage",o);break;case s.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case s.UP:e=!0,this._keyEvent("previous",o);break;case s.DOWN:e=!0,this._keyEvent("next",o);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(e=!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(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var o=t.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(t){return n?(n=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("
    "+(Y[0]>0&&x===Y[1]-1?"
    ":""):""),C+=M}y+=C}return y+=u,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,n,o,s,r,a){var l,u,c,h,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="
    ",y="";if(s||!g)y+=""+r[e]+"";else{for(l=n&&n.getFullYear()===i,u=o&&o.getFullYear()===i,y+=""}if(_||(b+=y+(!s&&g&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",s||!v)b+=""+i+"";else{for(h=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10); return isNaN(e)?d:e},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,t.yearshtml+="",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!s&&g&&v?"":" ")+y),b+="
    "},_adjustInstDate:function(t,e,i){var n=t.drawYear+("Y"===i?e:0),o=t.drawMonth+("M"===i?e:0),s=Math.min(t.selectedDay,this._getDaysInMonth(n,o))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,o,s)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),o=i&&en?n:o},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var o=this._getNumberOfMonths(t),s=this._daylightSavingAdjust(new Date(i,n+(e<0?e:o[0]*o[1]),1));return e<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(t,s)},_isInRange:function(t,e){var i,n,o=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),r=null,a=null,l=this._get(t,"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||e.getTime()>=o.getTime())&&(!s||e.getTime()<=s.getTime())&&(!r||e.getFullYear()>=r)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var o=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),o,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.4"}(n)},{"./core":"jquery-ui/core",jquery:"jquery"}],"jquery-ui/menu":[function(t,e,i){var n=t("jquery");t("./core"),t("./widget"),t("./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(t,e){t.widget("ui.menu",{version:"1.10.4",defaultElement:"
      ",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,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(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(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),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 e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,o,s,r,a,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,o=this.previousFilter||"",s=String.fromCharCode(e.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(t(this).children("a").text())}),n=r&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(s=String.fromCharCode(e.keyCode),a=new RegExp("^"+i(s),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())})),n.length?(this.focus(e,n),n.length>1?(this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,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 e=t(this),n=e.prev("a"),o=t("").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(o),e.attr("aria-labelledby",n.attr("id"))}),e=n.add(this.element),e.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()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.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"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,o,s,r,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,o=e.offset().top-this.activeMenu.offset().top-i-n,s=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=e.height(),o<0?this.activeMenu.scrollTop(s+o):o+a>r&&this.activeMenu.scrollTop(s+o-r+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},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(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,n)},nextPage:function(e){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=t(this),i.offset().top-n-o<0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){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=t(this),i.offset().top-n+o>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()=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(t,e,i){var n=t("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(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function n(e,i){return parseInt(t.css(e,i),10)||0}function o(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.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=t.fn.position;t.position={scrollbarWidth:function(){if(s!==e)return s;var i,n,o=t("
      "),r=o.children()[0];return t("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(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===i||"auto"===i&&e.width0?"right":"center",vertical:s<0?"top":o>0?"bottom":"middle"};pr(a(o),a(s))?l.important="horizontal":l.important="vertical",e.using.call(this,t,l)}),c.offset(t.extend(S,{using:u}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,a=t.left-e.collisionPosition.marginLeft,l=o-a,u=a+e.collisionWidth-s-o;e.collisionWidth>s?l>0&&u<=0?(i=t.left+l+e.collisionWidth-s-o,t.left+=l-i):u>0&&l<=0?t.left=o:l>u?t.left=o+s-e.collisionWidth:t.left=o:l>0?t.left+=l:u>0?t.left-=u:t.left=r(t.left-a,t.left)},top:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollTop:n.offset.top,s=e.within.height,a=t.top-e.collisionPosition.marginTop,l=o-a,u=a+e.collisionHeight-s-o;e.collisionHeight>s?l>0&&u<=0?(i=t.top+l+e.collisionHeight-s-o,t.top+=l-i):u>0&&l<=0?t.top=o:l>u?t.top=o+s-e.collisionHeight:t.top=o:l>0?t.top+=l:u>0?t.top-=u:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,o=e.within,s=o.offset.left+o.scrollLeft,r=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,u=t.left-e.collisionPosition.marginLeft,c=u-l,h=u+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];c<0?(i=t.left+d+p+f+e.collisionWidth-r-s,(i<0||i0&&(n=t.left-e.collisionPosition.marginLeft+d+p+f-l,(n>0||a(n)c&&(n<0||n0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-l,t.top+p+f+m>h&&(i>0||a(i)10&&o<11,e.innerHTML="",i.removeChild(e)}()}(n)},{jquery:"jquery"}],"jquery-ui/slider":[function(t,e,i){var n=t("jquery");t("./core"),t("./mouse"),t("./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(t,e){var i=5;t.widget("ui.slider",t.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 e,i,n=this.options,o=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),s="",r=[];for(i=n.values&&n.values.length||1,o.length>i&&(o.slice(i).remove(),o=o.slice(0,i)),e=o.length;e").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_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(e){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:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),o=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-c.values(e));(o>i||o===i&&(e===c._lastChangedValue||c.values(e)===h.min))&&(o=i,s=t(this),r=e)}),a=this._start(e,r),a!==!1&&(this._mouseSliding=!0,this._handleIndex=r,s.addClass("ui-state-active").focus(),l=s.offset(),u=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-l.left-s.width()/2,top:e.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(e,r,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,o,s;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,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(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var n,o,s;this.options.values&&this.options.values.length?(n=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>n||1===e&&i1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(n=this.options.values,o=arguments[0],s=0;s=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,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+"%",t(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-e+"%"},{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-e+"%"},{queue:!1,duration:a.animate}))),e=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(e){var n,o,s,r,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),n=this._start(e,a),n===!1))return}switch(r=this.options.step,o=s=this.options.values&&this.options.values.length?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(o+(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(o-(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(o===this._valueMax())return;s=this._trimAlignValue(o+r);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(o===this._valueMin())return;s=this._trimAlignValue(o-r)}this._slide(e,a,s)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(n)},{"./core":"jquery-ui/core","./mouse":"jquery-ui/mouse","./widget":"jquery-ui/widget",jquery:"jquery"}],"jquery-ui/sortable":[function(t,e,i){var n=t("jquery");t("./core"),t("./mouse"),t("./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(t,e){function i(t,e,i){return t>e&&t *",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 t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===t.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 t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var n=null,o=!1,s=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,s.widgetName+"-item")===s)return n=t(this),!1}),t.data(e.target,s.widgetName+"-item")===s&&(n=t(e.target)),!!n&&(!(this.options.handle&&!i&&(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(o=!0)}),!o))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,n){var o,s,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.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(e),this.originalPageX=e.pageX,this.originalPageY=e.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=t("").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",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,o,s,r=this.options,a=!1;for(this.position=this._generatePosition(e),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-e.pageY=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||t.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],o))){if(this.direction=1===s?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),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,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,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 e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].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(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,s=t.left,r=s+t.width,a=t.top,l=a+t.height,u=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||n+u>a&&n+us&&e+ct[this.floating?"width":"height"]?p:s0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var n,o,s,r,a=[],l=[],u=this._connectWith();if(u&&e)for(n=u.length-1;n>=0;n--)for(s=t(u[n]),o=s.length-1;o>=0;o--)r=t.data(s[o],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(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 t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i=0;i--)for(o=t(d[i]),n=o.length-1;n>=0;n--)s=t.data(o[n],this.widgetFullName),s&&s!==this&&!s.options.disabled&&(h.push([t.isFunction(s.options.items)?s.options.items.call(s.element[0],e,{item:this.currentItem}):t(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=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(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(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),o=t("<"+n+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?e.currentItem.children().each(function(){t(" ",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(o)}):"img"===n&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,o){i&&!n.forcePlaceholderSize||(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_contactContainers:function(e){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(!t.contains(this.currentItem[0],this.containers[o].element[0]))if(this._intersectsWith(this.containers[o].containerCache)){if(f&&t.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",e,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",e,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--)t.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)this.containment[2]&&(s=this.containment[2]+this.offset.click.left),e.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(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.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(t,e){function i(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}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&&!e&&o.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||o.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(o.push(function(t){this._trigger("remove",t,this._uiHash())}),o.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||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(!e){for(this._trigger("beforeStop",t,this._uiHash()),n=0;n",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 e={},i=this.element;return t.each(["min","max","step"],function(t,n){var o=i.attr(n);void 0!==o&&o.length&&(e[n]=o)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(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(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return this._start(e)!==!1&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=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=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""},_start:function(t){return!(!this.spinning&&this._trigger("start",t)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return i===-1?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.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:t.noop,widget:function(){return this.element},option:function(i,n){var o,s,r,a=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(a={},o=i.split("."),i=o.shift(),o.length){for(s=a[i]=t.widget.extend({},this.options[i]),r=0;r').appendTo(document.body),this.$element.on("click.dismiss.bk-bs.modal",n.proxy(function(t){t.target===t.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"),!t)return;i?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()}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,t).emulateTransitionEnd(150):t()):t&&t()};var s=n.fn.modal;n.fn.modal=function(t,e){return this.each(function(){var i=n(this),s=i.data("bk-bs.modal"),r=n.extend({},o.DEFAULTS,i.data(),"object"==typeof t&&t);s||i.data("bk-bs.modal",s=new o(this,r)),"string"==typeof t?s[t](e):r.show&&s.show(e)})},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(t){var e=n(this),i=e.attr("href"),o=n(e.attr("data-bk-bs-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bk-bs.modal")?"toggle":n.extend({remote:!/#/.test(i)&&i},o.data(),e.data());e.is("a")&&t.preventDefault(),o.modal(s,this).one("hide",function(){e.is(":visible")&&e.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(t,e,i){var n=t("jquery"),o=function(t){this.element=n(t)};o.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.bk-bs-dropdown-menu)"),i=t.data("bk-bs-target");if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("bk-bs-active")){var o=e.find(".bk-bs-active:last a")[0],s=n.Event("show.bk-bs.tab",{relatedTarget:o});if(t.trigger(s),!s.isDefaultPrevented()){var r=n(i);this.activate(t.parent("li"),e),this.activate(r,r.parent(),function(){t.trigger({type:"shown.bk-bs.tab",relatedTarget:o})})}}},o.prototype.activate=function(t,e,i){function o(){s.removeClass("bk-bs-active").find("> .bk-bs-dropdown-menu > .bk-bs-active").removeClass("bk-bs-active"),t.addClass("bk-bs-active"),r?(t[0].offsetWidth,t.addClass("bk-bs-in")):t.removeClass("bk-bs-fade"),t.parent(".bk-bs-dropdown-menu")&&t.closest("li.bk-bs-dropdown").addClass("bk-bs-active"),i&&i()}var s=e.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(t){return this.each(function(){var e=n(this),i=e.data("bk-bs.tab");i||e.data("bk-bs.tab",i=new o(this)),"string"==typeof t&&i[t]()})},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(t){t.preventDefault(),n(this).tab("show")})},{jquery:"jquery"}],"jqrangeslider/jQDateRangeSlider":[function(t,e,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=t("jquery");t("./jQRangeSlider"),e.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(t,e){("defaultValues"===t||"bounds"===t)&&"undefined"!=typeof e&&null!==e&&this._isValidDate(e.min)&&this._isValidDate(e.max)?n.ui.rangeSlider.prototype._setOption.apply(this,[t,{min:e.min.valueOf(),max:e.max.valueOf()}]):n.ui.rangeSlider.prototype._setOption.apply(this,this._toArray(arguments))},_handleType:function(){return"dateRangeSliderHandle"},option:function(t){if("bounds"===t||"defaultValues"===t){var e=n.ui.rangeSlider.prototype.option.apply(this,arguments);return{min:new Date(e.min),max:new Date(e.max)}}return n.ui.rangeSlider.prototype.option.apply(this,this._toArray(arguments))},_defaultFormatter:function(t){var e=t.getMonth()+1,i=t.getDate();return""+t.getFullYear()+"-"+(e<10?"0"+e:e)+"-"+(i<10?"0"+i:i)},_getFormatter:function(){var t=this.options.formatter;return this.options.formatter!==!1&&null!==this.options.formatter||(t=this._defaultFormatter),function(t){return function(e){return t(new Date(e))}}(t)},values:function(t,e){var i=null;return i=this._isValidDate(t)&&this._isValidDate(e)?n.ui.rangeSlider.prototype.values.apply(this,[t.valueOf(),e.valueOf()]):n.ui.rangeSlider.prototype.values.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},min:function(t){return this._isValidDate(t)?new Date(n.ui.rangeSlider.prototype.min.apply(this,[t.valueOf()])):new Date(n.ui.rangeSlider.prototype.min.apply(this))},max:function(t){return this._isValidDate(t)?new Date(n.ui.rangeSlider.prototype.max.apply(this,[t.valueOf()])):new Date(n.ui.rangeSlider.prototype.max.apply(this))},bounds:function(t,e){var i;return i=this._isValidDate(t)&&this._isValidDate(e)?n.ui.rangeSlider.prototype.bounds.apply(this,[t.valueOf(),e.valueOf()]):n.ui.rangeSlider.prototype.bounds.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},_isValidDate:function(t){return"undefined"!=typeof t&&t instanceof Date},_toArray:function(t){return Array.prototype.slice.call(t)}})},{"./jQRangeSlider":"jqrangeslider/jQRangeSlider",jquery:"jquery"}],"jqrangeslider/jQRangeSlider":[function(t,e,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=t("jquery");t("jquery-ui/core"),t("jquery-ui/widget"),t("jquery-ui/mouse"),t("jquery-mousewheel"),e.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 t=this;this._resizeProxy=function(e){t.resize(e)},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(t,e){this._setWheelOption(t,e),this._setArrowsOption(t,e),this._setLabelsOption(t,e),this._setLabelsDurations(t,e),this._setFormatterOption(t,e),this._setBoundsOption(t,e),this._setRangeOption(t,e),this._setStepOption(t,e),this._setScalesOption(t,e),this._setEnabledOption(t,e),this._setPositionningOption(t,e)},_validProperty:function(t,e,i){return null===t||"undefined"==typeof t[e]?i:t[e]},_setStepOption:function(t,e){"step"===t&&(this.options.step=e,this._leftHandle("option","step",e),this._rightHandle("option","step",e),this._changed(!0))},_setScalesOption:function(t,e){"scales"===t&&(e===!1||null===e?(this.options.scales=!1,this._destroyRuler()):e instanceof Array&&(this.options.scales=e,this._updateRuler()))},_setRangeOption:function(t,e){"range"===t&&(this._bar("option","range",e),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(t,e){"bounds"===t&&"undefined"!=typeof e.min&&"undefined"!=typeof e.max&&this.bounds(e.min,e.max)},_setWheelOption:function(t,e){"wheelMode"!==t&&"wheelSpeed"!==t||(this._bar("option",t,e),this.options[t]=this._bar("option",t))},_setLabelsOption:function(t,e){if("valueLabels"===t){if("hide"!==e&&"show"!==e&&"change"!==e)return;this.options.valueLabels=e,"hide"!==e?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(t,e){"formatter"===t&&null!==e&&"function"==typeof e&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",e),this.options.formatter=this._rightLabel("option","formatter",e))},_setArrowsOption:function(t,e){"arrows"!==t||e!==!0&&e!==!1||e===this.options.arrows||(e===!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):e===!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(t,e){if("durationIn"===t||"durationOut"===t||"delayOut"===t){if(parseInt(e,10)!==e)return;null!==this.labels.left&&this._leftLabel("option",t,e),null!==this.labels.right&&this._rightLabel("option",t,e),this.options[t]=e}},_setEnabledOption:function(t,e){"enabled"===t&&this.toggle(e)},_setPositionningOption:function(t,e){"symmetricPositionning"===t&&(this._rightHandle("option",t,e),this.options[t]=this._leftHandle("option",t,e))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("bk-ui-rangeSlider"),this.container=n("
      ").css("position","absolute").appendTo(this.element),this.innerBar=n("
      ").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(t){return n("
      ")[this._handleType()](t).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("
      ").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(t){var e,i=n("
      ").append("
      ").addClass("bk-ui-rangeSlider-"+t+"Arrow").css("position","absolute").css(t,0).appendTo(this.element);return e="right"===t?n.proxy(this._scrollRightClick,this):n.proxy(this._scrollLeftClick,this),i.bind("mousedown touchstart",e),i},_proxy:function(t,e,i){var n=Array.prototype.slice.call(i);return t&&t[e]?t[e].apply(t,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(t,e){return e===this.rightHandle&&(t-=e.outerWidth()),t*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-e.outerWidth(!0))+this.options.bounds.min},_trigger:function(t){var e=this;setTimeout(function(){e.element.trigger(t,{label:e.element,values:e.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(t){t===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),t!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),t===!0&&this._reactivateLabels()},_updateValues:function(){var t=this._leftHandle("value"),e=this._rightHandle("value"),i=this._min(t,e),n=this._max(t,e),o=i!==this._values.min||n!==this._values.max;return this._values.min=this._min(t,e),this._values.max=this._max(t,e),o},_min:function(t,e){return Math.min(t,e)},_max:function(t,e){return Math.max(t,e)},_createLabel:function(t,e){var i;return null===t?(i=this._getLabelConstructorParameters(t,e),t=n("
      ").appendTo(this.element)[this._labelType()](i)):(i=this._getLabelRefreshParameters(t,e),t[this._labelType()](i)),t},_getLabelConstructorParameters:function(t,e){return{handle:e,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(t){return Math.round(t)},_destroyLabel:function(t){return null!==t&&(t[this._labelType()]("destroy"),t.remove(),t=null),t},_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(t){return!!this.options.enabled&&(t.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1))},_continueScrolling:function(t,e,i,n){if(!this.options.enabled)return!1;this._bar(t,i),n=n||5,n--;var o=this,s=16,r=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===n&&(e>s?e=Math.max(s,e/1.5):i=Math.min(r,2*i),n=5),o._continueScrolling(t,e,i,n)},e)},_scrollLeftClick:function(t){return!!this.options.enabled&&(t.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1))},_bindStopScroll:function(){var t=this;this._stopScrollHandle=function(e){e.preventDefault(),t._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("
      ").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(t,e){var i;if("undefined"!=typeof t&&"undefined"!=typeof e){if(!this._initialized)return this._values.min=t,this._values.max=e,this._values;this._deactivateLabels(),i=this._bar("values",t,e),this._changed(!0),this._reactivateLabels()}else i=this._bar("values",t,e);return i},min:function(t){return this._values.min=this.values(t,this._values.max).min,this._values.min},max:function(t){return this._values.max=this.values(this._values.min,t).max,this._values.max},bounds:function(t,e){return this._isValidValue(t)&&this._isValidValue(e)&&t0&&t.which!=i.which)&&!n(t.target).is(i.not)&&(!i.handle||n(t.target).closest(i.handle,t.currentTarget).length)&&(r.touched="touchstart"==t.type?this:null,i.propagates=1,i.mousedown=this,i.interactions=[r.interaction(this,i)],i.target=t.target,i.pageX=t.pageX,i.pageY=t.pageY,i.dragging=null,e=r.hijack(t,"draginit",i),i.propagates))return e=r.flatten(e),e&&e.length&&(i.interactions=[],n.each(e,function(){i.interactions.push(r.interaction(this,i))})),i.propagates=i.interactions.length,i.drop!==!1&&s.drop&&s.drop.handler(t,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(t,e){var i=n(t)[e.relative?"position":"offset"]()||{top:0,left:0};return{drag:t,callback:new r.callback,droppable:[],offset:i}},handler:function(t){var e=t.data;switch(t.type){case!e.dragging&&"touchmove":t.preventDefault();case!e.dragging&&"mousemove":if(Math.pow(t.pageX-e.pageX,2)+Math.pow(t.pageY-e.pageY,2)0?void n.removeData(this,"suppress."+t.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(t,e){if(e){var i=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||null;i&&n.each(l.props,function(e,n){t[n]=i[n]})}return t}};s.draginit=s.dragstart=s.dragend=r},{jquery:"jquery"}],jquery_event_drop:[function(t,e,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=t("jquery");t("jquery_event_drag");n.fn.drop=function(t,e,i){var o="string"==typeof t?t:"",s=n.isFunction(t)?t:n.isFunction(e)?e:null;return 0!==o.indexOf("drop")&&(o="drop"+o),i=(t==s?e:i)||{},s?this.bind(o,i,s):this.trigger(o)},n.drop=function(t){t=t||{},r.multi=t.multi===!0?1/0:t.multi===!1?1:isNaN(t.multi)?r.multi:t.multi,r.delay=t.delay||r.delay,r.tolerance=n.isFunction(t.tolerance)?t.tolerance:null===t.tolerance?null:r.tolerance,r.mode=t.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(t){var e=n.data(this,r.datakey);e.related+=1},remove:function(){n.data(this,r.datakey).related-=1},setup:function(){if(!n.data(this,r.datakey)){var t={related:0,active:[],anyactive:0,winner:0,location:{}};n.data(this,r.datakey,t),r.targets.push(this)}},teardown:function(){var t=n.data(this,r.datakey)||{};if(!t.related){n.removeData(this,r.datakey);var e=this;r.targets=n.grep(r.targets,function(t){return t!==e})}},handler:function(t,e){var i;if(e)switch(t.type){case"mousedown":case"touchstart":i=n(r.targets),"string"==typeof e.drop&&(i=i.filter(e.drop)),i.each(function(){var t=n.data(this,r.datakey);t.active=[],t.anyactive=0,t.winner=0}),e.droppable=i,s.drag.hijack(t,"dropinit",e);break;case"mousemove":case"touchmove":r.event=t,r.timer||r.tolerate(e);break;case"mouseup":case"touchend":r.timer=clearTimeout(r.timer),e.propagates&&(s.drag.hijack(t,"drop",e),s.drag.hijack(t,"dropend",e))}},locate:function(t,e){var i=n.data(t,r.datakey),o=n(t),s=o.offset()||{},a=o.outerHeight(),l=o.outerWidth(),u={elem:t,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=e,i.elem=t),u},contains:function(t,e){return(e[0]||e.left)>=t.left&&(e[0]||e.right)<=t.right&&(e[1]||e.top)>=t.top&&(e[1]||e.bottom)<=t.bottom},modes:{intersect:function(t,e,i){return this.contains(i,[t.pageX,t.pageY])?1e9:this.modes.overlap.apply(this,arguments)},overlap:function(t,e,i){return Math.max(0,Math.min(i.bottom,e.bottom)-Math.max(i.top,e.top))*Math.max(0,Math.min(i.right,e.right)-Math.max(i.left,e.left))},fit:function(t,e,i){return this.contains(i,e)?1:0},middle:function(t,e,i){return this.contains(i,[e.left+.5*e.width,e.top+.5*e.height])?1:0}},sort:function(t,e){return e.winner-t.winner||t.index-e.index},tolerate:function(t){var e,i,o,a,l,u,c,h,d=0,p=t.interactions.length,f=[r.event.pageX,r.event.pageY],m=r.tolerance||r.modes[r.mode];do if(h=t.interactions[d]){if(!h)return;h.drop=[],l=[],u=h.droppable.length,m&&(o=r.locate(h.proxy)),e=0;do if(c=h.droppable[e]){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(++e",g.toolTip):d.updateColumnHeader(g.columnId,"",g.toolTip)}function r(t,e){32==t.which&&d.getColumns()[e.cell].id===g.columnId&&(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit()||l(e.row),t.preventDefault(),t.stopImmediatePropagation())}function a(t,e){if(d.getColumns()[e.cell].id===g.columnId&&o(t.target).is(":checkbox")){if(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit())return t.preventDefault(),void t.stopImmediatePropagation();l(e.row),t.stopPropagation(),t.stopImmediatePropagation()}}function l(t){f[t]?d.setSelectedRows(o.grep(d.getSelectedRows(),function(e){return e!=t})):d.setSelectedRows(d.getSelectedRows().concat(t))}function u(t,e){if(e.column.id==g.columnId&&o(t.target).is(":checkbox")){if(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit())return t.preventDefault(),void t.stopImmediatePropagation();if(o(t.target).is(":checked")){for(var i=[],n=0;n",toolTip:g.toolTip,field:"sel",width:g.width,resizable:!1,sortable:!1,cssClass:g.cssClass,formatter:h}}function h(t,e,i,n,o){return o?f[t]?"":"":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,t);o.extend(this,{init:e,destroy:i,getColumnDefinition:c})}var o=t("jquery"),s=t("../slick.core");e.exports=n},{"../slick.core":"slick_grid/slick.core",jquery:"jquery"}],"slick_grid/plugins/slick.rowselectionmodel":[function(t,e,i){function n(t){function e(e){_=o.extend(!0,{},k,t),g=e,w.subscribe(g.onActiveCellChanged,n(p)),w.subscribe(g.onKeyDown,n(f)),w.subscribe(g.onClick,n(m))}function i(){w.unsubscribeAll()}function n(t){return function(){v||(v=!0,t.apply(this,arguments),v=!1)}}function r(t){for(var e=[],i=0;i=0&&n=0;i--)t[i]===e&&t.splice(i,1)},this.notify=function(e,i,o){i=i||new n,o=o||this;for(var s,r=0;r=this.fromRow&&t<=this.toRow&&e>=this.fromCell&&e<=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 t=null;this.isActive=function(e){return e?t===e:null!==t},this.activate=function(e){if(e!==t){if(null!==t)throw"SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController";if(!e.commitCurrentEdit)throw"SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()";if(!e.cancelCurrentEdit)throw"SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()";t=e}},this.deactivate=function(e){if(t!==e)throw"SlickGrid.EditorLock.deactivate: specified editController is not the currently active one";t=null},this.commitCurrentEdit=function(){return!t||t.commitCurrentEdit()},this.cancelCurrentEdit=function(){return!t||t.cancelCurrentEdit()}}var h=(t("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(t){return this.value===t.value&&this.count===t.count&&this.collapsed===t.collapsed&&this.title===t.title},u.prototype=new a,e.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 t=0;te.maxWidth&&(e.width=e.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=$("
      ").appendTo($container),$headerScroller=$("
      ").appendTo($container),$headers=$("
      ").appendTo($headerScroller),$headers.width(getHeadersWidth()),$headerRowScroller=$("
      ").appendTo($container),$headerRow=$("
      ").appendTo($headerRowScroller),$headerRowSpacer=$("
      ").css("width",getCanvasWidth()+scrollbarDimensions.width+"px").appendTo($headerRowScroller),$topPanelScroller=$("
      ").appendTo($container),$topPanel=$("
      ").appendTo($topPanelScroller),options.showTopPanel||$topPanelScroller.hide(),options.showHeaderRow||$headerRowScroller.hide(),$viewport=$("
      ").appendTo($container),$viewport.css("overflow-y",options.autoHeight?"hidden":"auto"),$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(t){return $(t.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(t){plugins.unshift(t),t.init(self)}function unregisterPlugin(t){for(var e=plugins.length;e>=0;e--)if(plugins[e]===t){plugins[e].destroy&&plugins[e].destroy(),plugins.splice(e,1);break}}function setSelectionModel(t){selectionModel&&(selectionModel.onSelectedRangesChanged.unsubscribe(handleSelectedRangesChanged),selectionModel.destroy&&selectionModel.destroy()),selectionModel=t,selectionModel&&(selectionModel.init(self),selectionModel.onSelectedRangesChanged.subscribe(handleSelectedRangesChanged))}function getSelectionModel(){return selectionModel}function getCanvasNode(){return $canvas[0]}function measureScrollbar(){var t=$("
      ").appendTo("body"),e={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),e}function getHeadersWidth(){for(var t=0,e=0,i=columns.length;eviewportW-scrollbarDimensions.width),$headerRowSpacer.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),(canvasWidth!=e||t)&&applyColumnWidths()}function disableSelection(t){t&&t.jquery&&t.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function getMaxSupportedCssHeight(){for(var t=1e6,e=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=$("
      ").appendTo(document.body);;){var n=2*t;if(i.css("height",n),n>e||i.height()!==n)break;t=n}return i.remove(),t}function bindAncestorScrollEvents(){for(var t=$canvas[0];(t=t.parentNode)!=document.body&&null!=t;)if(t==$viewport[0]||t.scrollWidth!=t.clientWidth||t.scrollHeight!=t.clientHeight){var e=$(t);$boundAncestors=$boundAncestors?$boundAncestors.add(e):e,e.bind("scroll."+uid,handleActiveCellPositionChange)}}function unbindAncestorScrollEvents(){$boundAncestors&&($boundAncestors.unbind("scroll."+uid),$boundAncestors=null)}function updateColumnHeader(t,e,i){if(initialized){var n=getColumnIndex(t);if(null!=n){var o=columns[n],s=$headers.children().eq(n);s&&(void 0!==e&&(columns[n].name=e),void 0!==i&&(columns[n].toolTip=i),trigger(self.onBeforeHeaderCellDestroy,{node:s[0],column:o}),s.attr("title",i||"").children().eq(0).html(e),trigger(self.onHeaderCellRendered,{node:s[0],column:o}))}}}function getHeaderRow(){return $headerRow[0]}function getHeaderRowColumn(t){var e=getColumnIndex(t),i=$headerRow.children().eq(e);return i&&i[0]}function createColumnHeaders(){function t(){$(this).addClass("bk-ui-state-hover")}function e(){$(this).removeClass("bk-ui-state-hover")}$headers.find(".bk-slick-header-column").each(function(){var t=$(this).data("column");t&&trigger(self.onBeforeHeaderCellDestroy,{node:this,column:t})}),$headers.empty(),$headers.width(getHeadersWidth()),$headerRow.find(".bk-slick-headerrow-column").each(function(){var t=$(this).data("column");t&&trigger(self.onBeforeHeaderRowCellDestroy,{node:this,column:t})}),$headerRow.empty();for(var i=0;i").html(""+n.name+"").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",t).on("mouseleave",e),n.sortable&&(o.addClass("bk-slick-header-sortable"),o.append("")),trigger(self.onHeaderCellRendered,{node:o[0],column:n}),options.showHeaderRow){var s=$("
      ").data("column",n).appendTo($headerRow);trigger(self.onHeaderRowCellRendered,{node:s[0],column:n})}}setSortColumns(sortColumns),setupColumnResize(),options.enableColumnReorder&&setupColumnReorder()}function setupColumnSort(){$headers.click(function(t){if(t.metaKey=t.metaKey||t.ctrlKey,!$(t.target).hasClass("bk-slick-resizable-handle")){var e=$(t.target).closest(".bk-slick-header-column");if(e.length){var i=e.data("column");if(i.sortable){if(!getEditorLock().commitCurrentEdit())return;for(var n=null,o=0;o=l||(t=$(c),$("
      ").appendTo(c).bind("dragstart",function(t,a){if(!getEditorLock().commitCurrentEdit())return!1;n=t.pageX,$(this).parent().addClass("bk-slick-header-column-active");var l=null,c=null;if(o.each(function(t,e){columns[t].previousWidth=$(e).outerWidth()}),options.forceFitColumns)for(l=0,c=0,e=u+1;e=0;e--)i=columns[e],i.resizable&&(l=Math.max(i.minWidth||0,absoluteColumnMinWidth),c&&i.previousWidth+c=0;e--)i=columns[e],i.resizable&&(c&&i.maxWidth&&i.maxWidth-i.previousWidth
      ").appendTo($headers),headerColumnWidthDiff=headerColumnHeightDiff=0,"border-box"!=t.css("box-sizing")&&"border-box"!=t.css("-moz-box-sizing")&&"border-box"!=t.css("-webkit-box-sizing")&&($.each(e,function(e,i){headerColumnWidthDiff+=parseFloat(t.css(i))||0}),$.each(i,function(e,i){headerColumnHeightDiff+=parseFloat(t.css(i))||0})),t.remove();var n=$("
      ").appendTo($canvas);t=$("").appendTo(n),cellWidthDiff=cellHeightDiff=0,"border-box"!=t.css("box-sizing")&&"border-box"!=t.css("-moz-box-sizing")&&"border-box"!=t.css("-webkit-box-sizing")&&($.each(e,function(e,i){cellWidthDiff+=parseFloat(t.css(i))||0}),$.each(i,function(e,i){cellHeightDiff+=parseFloat(t.css(i))||0})),n.remove(),absoluteColumnMinWidth=Math.max(headerColumnWidthDiff,cellWidthDiff)}function createCssRules(){$style=$("