1 line
653 KiB
Plaintext
1 line
653 KiB
Plaintext
{"version":3,"sources":["src/js/plugin-prelude.js","build/js/tree/models/widgets/abstract_button.js","build/js/tree/models/widgets/abstract_icon.js","build/js/tree/models/widgets/autocomplete_input.js","build/js/tree/models/widgets/button.js","build/js/tree/models/widgets/button_group_template.js","build/js/tree/models/widgets/button_template.js","build/js/tree/models/widgets/cell_editors.js","build/js/tree/models/widgets/cell_formatters.js","build/js/tree/models/widgets/checkbox_button_group.js","build/js/tree/models/widgets/checkbox_group.js","build/js/tree/models/widgets/data_table.js","build/js/tree/models/widgets/date_picker.js","build/js/tree/models/widgets/date_range_slider.js","build/js/tree/models/widgets/dialog.js","build/js/tree/models/widgets/dialog_template.js","build/js/tree/models/widgets/div.js","build/js/tree/models/widgets/dropdown.js","build/js/tree/models/widgets/dropdown_template.js","build/js/tree/models/widgets/icon.js","build/js/tree/models/widgets/input_widget.js","build/js/tree/models/widgets/main.js","build/js/tree/models/widgets/markup.js","build/js/tree/models/widgets/markup_template.js","build/js/tree/models/widgets/multiselect.js","build/js/tree/models/widgets/multiselecttemplate.js","build/js/tree/models/widgets/panel.js","build/js/tree/models/widgets/paragraph.js","build/js/tree/models/widgets/pretext.js","build/js/tree/models/widgets/radio_button_group.js","build/js/tree/models/widgets/radio_group.js","build/js/tree/models/widgets/selectbox.js","build/js/tree/models/widgets/selecttemplate.js","build/js/tree/models/widgets/slider.js","build/js/tree/models/widgets/slidertemplate.js","build/js/tree/models/widgets/table_column.js","build/js/tree/models/widgets/table_widget.js","build/js/tree/models/widgets/tabs.js","build/js/tree/models/widgets/tabs_template.js","build/js/tree/models/widgets/text_input.js","build/js/tree/models/widgets/text_input_template.js","build/js/tree/models/widgets/toggle.js","build/js/tree/models/widgets/widget.js","build/js/tree/util/dom_util.js","node_modules/jquery-ui/autocomplete.js","node_modules/jquery-ui/button.js","node_modules/jquery-ui/core.js","node_modules/jquery-ui/datepicker.js","node_modules/jquery-ui/menu.js","node_modules/jquery-ui/mouse.js","node_modules/jquery-ui/position.js","node_modules/jquery-ui/slider.js","node_modules/jquery-ui/sortable.js","node_modules/jquery-ui/spinner.js","node_modules/jquery-ui/widget.js","src/vendor/bootstrap-3.1.1/js/button.js","src/vendor/bootstrap-3.1.1/js/modal.js","src/vendor/bootstrap-3.1.1/js/tab.js","src/vendor/jqrangeslider-5.7.0/jQDateRangeSlider.js","src/vendor/jqrangeslider-5.7.0/jQRangeSlider.js","src/vendor/jquery-event-2.2/jquery.event.drag.js","src/vendor/jquery-event-2.2/jquery.event.drop.js","src/vendor/slick-grid-2.1.0/plugins/slick.checkboxselectcolumn.js","src/vendor/slick-grid-2.1.0/plugins/slick.rowselectionmodel.js","src/vendor/slick-grid-2.1.0/slick.core.js","src/vendor/slick-grid-2.1.0/slick.grid.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACznBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACz/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9wCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3gBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"bokeh-widgets.js","sourceRoot":"/source/","sourcesContent":["(function outer(modules, cache, entry) {\n if (typeof Bokeh !== \"undefined\") {\n var _ = Bokeh._;\n\n for (var name in modules) {\n Bokeh.require.modules[name] = modules[name];\n }\n\n for (var i = 0; i < entry.length; i++) {\n var exports = Bokeh.require(entry[i]);\n\n if (_.isObject(exports.models)) {\n Bokeh.Models.register_locations(exports.models);\n }\n\n _.extend(Bokeh, _.omit(exports, \"models\"));\n }\n } else {\n throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\");\n }\n})\n","var AbstractButton, AbstractButtonView, Widget, build_views, p, template,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\np = require(\"../../core/properties\");\n\nbuild_views = require(\"../../common/build_views\");\n\nWidget = require(\"./widget\");\n\ntemplate = require(\"./button_template\");\n\nAbstractButtonView = (function(superClass) {\n extend(AbstractButtonView, superClass);\n\n function AbstractButtonView() {\n return AbstractButtonView.__super__.constructor.apply(this, arguments);\n }\n\n AbstractButtonView.prototype.events = {\n \"click\": \"change_input\"\n };\n\n AbstractButtonView.prototype.template = template;\n\n AbstractButtonView.prototype.initialize = function(options) {\n AbstractButtonView.__super__.initialize.call(this, options);\n this.icon_views = {};\n this.listenTo(this.model, 'change', this.render);\n return this.render();\n };\n\n AbstractButtonView.prototype.render = function() {\n var $button, html, icon, key, ref, val;\n AbstractButtonView.__super__.render.call(this);\n icon = this.model.icon;\n if (icon != null) {\n build_views(this.icon_views, [icon]);\n ref = this.icon_views;\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n val = ref[key];\n val.$el.detach();\n }\n }\n this.$el.empty();\n html = this.template(this.model.attributes);\n this.$el.append(html);\n $button = this.$el.find('button');\n if (icon != null) {\n $button.prepend(this.icon_views[icon.id].$el);\n }\n $button.prop(\"disabled\", this.model.disabled);\n return this;\n };\n\n AbstractButtonView.prototype.change_input = function() {\n var ref;\n return (ref = this.model.callback) != null ? ref.execute(this.model) : void 0;\n };\n\n return AbstractButtonView;\n\n})(Widget.View);\n\nAbstractButton = (function(superClass) {\n extend(AbstractButton, superClass);\n\n function AbstractButton() {\n return AbstractButton.__super__.constructor.apply(this, arguments);\n }\n\n AbstractButton.prototype.type = \"AbstractButton\";\n\n AbstractButton.prototype.default_view = AbstractButtonView;\n\n AbstractButton.define({\n callback: [p.Instance],\n label: [p.String, \"Button\"],\n icon: [p.Instance],\n button_type: [p.String, \"default\"]\n });\n\n return AbstractButton;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: AbstractButton,\n View: AbstractButtonView\n};\n","var AbstractIcon, Widget, _,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\nWidget = require(\"./widget\");\n\nAbstractIcon = (function(superClass) {\n extend(AbstractIcon, superClass);\n\n function AbstractIcon() {\n return AbstractIcon.__super__.constructor.apply(this, arguments);\n }\n\n AbstractIcon.prototype.type = \"AbstractIcon\";\n\n return AbstractIcon;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: AbstractIcon\n};\n","var $1, AutocompleteInput, AutocompleteInputView, TextInput, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$1 = require(\"jquery-ui/autocomplete\");\n\nTextInput = require(\"./text_input\");\n\np = require(\"../../core/properties\");\n\nAutocompleteInputView = (function(superClass) {\n extend(AutocompleteInputView, superClass);\n\n function AutocompleteInputView() {\n return AutocompleteInputView.__super__.constructor.apply(this, arguments);\n }\n\n AutocompleteInputView.prototype.render = function() {\n var $input;\n AutocompleteInputView.__super__.render.call(this);\n $input = this.$el.find(\"input\");\n $input.autocomplete({\n source: this.mget(\"completions\")\n });\n $input.autocomplete(\"widget\").addClass(\"bk-autocomplete-input\");\n return this;\n };\n\n return AutocompleteInputView;\n\n})(TextInput.View);\n\nAutocompleteInput = (function(superClass) {\n extend(AutocompleteInput, superClass);\n\n function AutocompleteInput() {\n return AutocompleteInput.__super__.constructor.apply(this, arguments);\n }\n\n AutocompleteInput.prototype.type = \"AutocompleteInput\";\n\n AutocompleteInput.prototype.default_view = AutocompleteInputView;\n\n AutocompleteInput.define({\n completions: [p.Array, []]\n });\n\n return AutocompleteInput;\n\n})(TextInput.Model);\n\nmodule.exports = {\n View: AutocompleteInputView,\n Model: AutocompleteInput\n};\n","var AbstractButton, Button, ButtonView, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\np = require(\"../../core/properties\");\n\nAbstractButton = require(\"./abstract_button\");\n\nButtonView = (function(superClass) {\n extend(ButtonView, superClass);\n\n function ButtonView() {\n return ButtonView.__super__.constructor.apply(this, arguments);\n }\n\n ButtonView.prototype.change_input = function() {\n this.model.clicks = this.model.clicks + 1;\n return ButtonView.__super__.change_input.call(this);\n };\n\n return ButtonView;\n\n})(AbstractButton.View);\n\nButton = (function(superClass) {\n extend(Button, superClass);\n\n function Button() {\n return Button.__super__.constructor.apply(this, arguments);\n }\n\n Button.prototype.type = \"Button\";\n\n Button.prototype.default_view = ButtonView;\n\n Button.define({\n clicks: [p.Number, 0]\n });\n\n return Button;\n\n})(AbstractButton.Model);\n\nmodule.exports = {\n Model: Button,\n View: ButtonView\n};\n","module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [];\n var __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n };\n var __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n };\n var __safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n var __escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n (function() {\n (function() {\n __out.push('<div class=\"bk-bs-btn-group\" data-bk-bs-toggle=\"buttons\">\\n</div>\\n');\n \n }).call(this);\n \n }).call(__obj);\n return __out.join('');\n};","module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [];\n var __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n };\n var __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n };\n var __safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n var __escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n (function() {\n (function() {\n __out.push('<button type=\"button\" class=\"bk-bs-btn bk-bs-btn-');\n \n __out.push(__sanitize(this.button_type));\n \n __out.push('\">\\n ');\n \n __out.push(__sanitize(this.label));\n \n __out.push('\\n</button>\\n');\n \n }).call(this);\n \n }).call(__obj);\n return __out.join('');\n};","var $, $1, $2, CellEditor, CellEditorView, CheckboxEditor, CheckboxEditorView, DateEditor, DateEditorView, IntEditor, IntEditorView, Model, NumberEditor, NumberEditorView, PercentEditor, PercentEditorView, SelectEditor, SelectEditorView, StringEditor, StringEditorView, TextEditor, TextEditorView, TimeEditor, TimeEditorView, Widget, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\n$1 = require(\"jquery-ui/autocomplete\");\n\n$2 = require(\"jquery-ui/spinner\");\n\np = require(\"../../core/properties\");\n\nModel = require(\"../../model\");\n\nWidget = require(\"./widget\");\n\nCellEditor = (function(superClass) {\n extend(CellEditor, superClass);\n\n function CellEditor() {\n return CellEditor.__super__.constructor.apply(this, arguments);\n }\n\n return CellEditor;\n\n})(Model);\n\nCellEditorView = (function(superClass) {\n extend(CellEditorView, superClass);\n\n function CellEditorView() {\n return CellEditorView.__super__.constructor.apply(this, arguments);\n }\n\n CellEditorView.prototype.tagName = \"div\";\n\n CellEditorView.prototype.className = \"bk-cell-editor\";\n\n CellEditorView.prototype.input = null;\n\n CellEditorView.prototype.emptyValue = null;\n\n CellEditorView.prototype.defaultValue = null;\n\n CellEditorView.prototype.initialize = function(args) {\n CellEditorView.__super__.initialize.call(this, {});\n this.args = args;\n this.model = this.args.column.editor;\n return this.render();\n };\n\n CellEditorView.prototype.render = function() {\n CellEditorView.__super__.render.call(this);\n this.$el.appendTo(this.args.container);\n this.$input = $(this.input);\n this.$el.append(this.$input);\n this.renderEditor();\n this.disableNavigation();\n return this;\n };\n\n CellEditorView.prototype.renderEditor = function() {};\n\n CellEditorView.prototype.disableNavigation = function() {\n return this.$input.keydown((function(_this) {\n return function(event) {\n var stop;\n stop = function() {\n return event.stopImmediatePropagation();\n };\n switch (event.keyCode) {\n case $.ui.keyCode.LEFT:\n return stop();\n case $.ui.keyCode.RIGHT:\n return stop();\n case $.ui.keyCode.UP:\n return stop();\n case $.ui.keyCode.DOWN:\n return stop();\n case $.ui.keyCode.PAGE_UP:\n return stop();\n case $.ui.keyCode.PAGE_DOWN:\n return stop();\n }\n };\n })(this));\n };\n\n CellEditorView.prototype.destroy = function() {\n return this.remove();\n };\n\n CellEditorView.prototype.focus = function() {\n return this.$input.focus();\n };\n\n CellEditorView.prototype.show = function() {};\n\n CellEditorView.prototype.hide = function() {};\n\n CellEditorView.prototype.position = function() {};\n\n CellEditorView.prototype.getValue = function() {\n return this.$input.val();\n };\n\n CellEditorView.prototype.setValue = function(val) {\n return this.$input.val(val);\n };\n\n CellEditorView.prototype.serializeValue = function() {\n return this.getValue();\n };\n\n CellEditorView.prototype.isValueChanged = function() {\n return !(this.getValue() === \"\" && (this.defaultValue == null)) && (this.getValue() !== this.defaultValue);\n };\n\n CellEditorView.prototype.applyValue = function(item, state) {\n return this.args.grid.getData().setField(item.index, this.args.column.field, state);\n };\n\n CellEditorView.prototype.loadValue = function(item) {\n var value;\n value = item[this.args.column.field];\n this.defaultValue = value != null ? value : this.emptyValue;\n return this.setValue(this.defaultValue);\n };\n\n CellEditorView.prototype.validateValue = function(value) {\n var result;\n if (this.args.column.validator) {\n result = this.args.column.validator(value);\n if (!result.valid) {\n return result;\n }\n }\n return {\n valid: true,\n msg: null\n };\n };\n\n CellEditorView.prototype.validate = function() {\n return this.validateValue(this.getValue());\n };\n\n return CellEditorView;\n\n})(Widget.View);\n\nStringEditorView = (function(superClass) {\n extend(StringEditorView, superClass);\n\n function StringEditorView() {\n return StringEditorView.__super__.constructor.apply(this, arguments);\n }\n\n StringEditorView.prototype.emptyValue = \"\";\n\n StringEditorView.prototype.input = '<input type=\"text\" />';\n\n StringEditorView.prototype.renderEditor = function() {\n var completions;\n completions = this.model.get(\"completions\");\n if (!_.isEmpty(completions)) {\n this.$input.autocomplete({\n source: completions\n });\n this.$input.autocomplete(\"widget\").addClass(\"bk-cell-editor-completion\");\n }\n return this.$input.focus().select();\n };\n\n StringEditorView.prototype.loadValue = function(item) {\n StringEditorView.__super__.loadValue.call(this, item);\n this.$input[0].defaultValue = this.defaultValue;\n return this.$input.select();\n };\n\n return StringEditorView;\n\n})(CellEditorView);\n\nStringEditor = (function(superClass) {\n extend(StringEditor, superClass);\n\n function StringEditor() {\n return StringEditor.__super__.constructor.apply(this, arguments);\n }\n\n StringEditor.prototype.type = 'StringEditor';\n\n StringEditor.prototype.default_view = StringEditorView;\n\n StringEditor.define({\n completions: [p.Array, []]\n });\n\n return StringEditor;\n\n})(CellEditor);\n\nTextEditorView = (function(superClass) {\n extend(TextEditorView, superClass);\n\n function TextEditorView() {\n return TextEditorView.__super__.constructor.apply(this, arguments);\n }\n\n return TextEditorView;\n\n})(CellEditorView);\n\nTextEditor = (function(superClass) {\n extend(TextEditor, superClass);\n\n function TextEditor() {\n return TextEditor.__super__.constructor.apply(this, arguments);\n }\n\n TextEditor.prototype.type = 'TextEditor';\n\n TextEditor.prototype.default_view = TextEditorView;\n\n return TextEditor;\n\n})(CellEditor);\n\nSelectEditorView = (function(superClass) {\n extend(SelectEditorView, superClass);\n\n function SelectEditorView() {\n return SelectEditorView.__super__.constructor.apply(this, arguments);\n }\n\n SelectEditorView.prototype.input = '<select />';\n\n SelectEditorView.prototype.renderEditor = function() {\n var i, len, option, ref;\n ref = this.model.get(\"options\");\n for (i = 0, len = ref.length; i < len; i++) {\n option = ref[i];\n this.$input.append($('<option>').attr({\n value: option\n }).text(option));\n }\n return this.focus();\n };\n\n SelectEditorView.prototype.loadValue = function(item) {\n SelectEditorView.__super__.loadValue.call(this, item);\n return this.$input.select();\n };\n\n return SelectEditorView;\n\n})(CellEditorView);\n\nSelectEditor = (function(superClass) {\n extend(SelectEditor, superClass);\n\n function SelectEditor() {\n return SelectEditor.__super__.constructor.apply(this, arguments);\n }\n\n SelectEditor.prototype.type = 'SelectEditor';\n\n SelectEditor.prototype.default_view = SelectEditorView;\n\n SelectEditor.define({\n options: [p.Array, []]\n });\n\n return SelectEditor;\n\n})(CellEditor);\n\nPercentEditorView = (function(superClass) {\n extend(PercentEditorView, superClass);\n\n function PercentEditorView() {\n return PercentEditorView.__super__.constructor.apply(this, arguments);\n }\n\n return PercentEditorView;\n\n})(CellEditorView);\n\nPercentEditor = (function(superClass) {\n extend(PercentEditor, superClass);\n\n function PercentEditor() {\n return PercentEditor.__super__.constructor.apply(this, arguments);\n }\n\n PercentEditor.prototype.type = 'PercentEditor';\n\n PercentEditor.prototype.default_view = PercentEditorView;\n\n return PercentEditor;\n\n})(CellEditor);\n\nCheckboxEditorView = (function(superClass) {\n extend(CheckboxEditorView, superClass);\n\n function CheckboxEditorView() {\n return CheckboxEditorView.__super__.constructor.apply(this, arguments);\n }\n\n CheckboxEditorView.prototype.input = '<input type=\"checkbox\" value=\"true\" />';\n\n CheckboxEditorView.prototype.renderEditor = function() {\n return this.focus();\n };\n\n CheckboxEditorView.prototype.loadValue = function(item) {\n this.defaultValue = !!item[this.args.column.field];\n return this.$input.prop('checked', this.defaultValue);\n };\n\n CheckboxEditorView.prototype.serializeValue = function() {\n return this.$input.prop('checked');\n };\n\n return CheckboxEditorView;\n\n})(CellEditorView);\n\nCheckboxEditor = (function(superClass) {\n extend(CheckboxEditor, superClass);\n\n function CheckboxEditor() {\n return CheckboxEditor.__super__.constructor.apply(this, arguments);\n }\n\n CheckboxEditor.prototype.type = 'CheckboxEditor';\n\n CheckboxEditor.prototype.default_view = CheckboxEditorView;\n\n return CheckboxEditor;\n\n})(CellEditor);\n\nIntEditorView = (function(superClass) {\n extend(IntEditorView, superClass);\n\n function IntEditorView() {\n return IntEditorView.__super__.constructor.apply(this, arguments);\n }\n\n IntEditorView.prototype.input = '<input type=\"text\" />';\n\n IntEditorView.prototype.renderEditor = function() {\n this.$input.spinner({\n step: this.model.get(\"step\")\n });\n return this.$input.focus().select();\n };\n\n IntEditorView.prototype.remove = function() {\n this.$input.spinner(\"destroy\");\n return IntEditorView.__super__.remove.call(this);\n };\n\n IntEditorView.prototype.serializeValue = function() {\n return parseInt(this.getValue(), 10) || 0;\n };\n\n IntEditorView.prototype.loadValue = function(item) {\n IntEditorView.__super__.loadValue.call(this, item);\n this.$input[0].defaultValue = this.defaultValue;\n return this.$input.select();\n };\n\n IntEditorView.prototype.validateValue = function(value) {\n if (isNaN(value)) {\n return {\n valid: false,\n msg: \"Please enter a valid integer\"\n };\n } else {\n return IntEditorView.__super__.validateValue.call(this, value);\n }\n };\n\n return IntEditorView;\n\n})(CellEditorView);\n\nIntEditor = (function(superClass) {\n extend(IntEditor, superClass);\n\n function IntEditor() {\n return IntEditor.__super__.constructor.apply(this, arguments);\n }\n\n IntEditor.prototype.type = 'IntEditor';\n\n IntEditor.prototype.default_view = IntEditorView;\n\n IntEditor.define({\n step: [p.Number, 1]\n });\n\n return IntEditor;\n\n})(CellEditor);\n\nNumberEditorView = (function(superClass) {\n extend(NumberEditorView, superClass);\n\n function NumberEditorView() {\n return NumberEditorView.__super__.constructor.apply(this, arguments);\n }\n\n NumberEditorView.prototype.input = '<input type=\"text\" />';\n\n NumberEditorView.prototype.renderEditor = function() {\n this.$input.spinner({\n step: this.model.get(\"step\")\n });\n return this.$input.focus().select();\n };\n\n NumberEditorView.prototype.remove = function() {\n this.$input.spinner(\"destroy\");\n return NumberEditorView.__super__.remove.call(this);\n };\n\n NumberEditorView.prototype.serializeValue = function() {\n return parseFloat(this.getValue()) || 0.0;\n };\n\n NumberEditorView.prototype.loadValue = function(item) {\n NumberEditorView.__super__.loadValue.call(this, item);\n this.$input[0].defaultValue = this.defaultValue;\n return this.$input.select();\n };\n\n NumberEditorView.prototype.validateValue = function(value) {\n if (isNaN(value)) {\n return {\n valid: false,\n msg: \"Please enter a valid number\"\n };\n } else {\n return NumberEditorView.__super__.validateValue.call(this, value);\n }\n };\n\n return NumberEditorView;\n\n})(CellEditorView);\n\nNumberEditor = (function(superClass) {\n extend(NumberEditor, superClass);\n\n function NumberEditor() {\n return NumberEditor.__super__.constructor.apply(this, arguments);\n }\n\n NumberEditor.prototype.type = 'NumberEditor';\n\n NumberEditor.prototype.default_view = NumberEditorView;\n\n NumberEditor.define({\n step: [p.Number, 0.01]\n });\n\n return NumberEditor;\n\n})(CellEditor);\n\nTimeEditorView = (function(superClass) {\n extend(TimeEditorView, superClass);\n\n function TimeEditorView() {\n return TimeEditorView.__super__.constructor.apply(this, arguments);\n }\n\n return TimeEditorView;\n\n})(CellEditorView);\n\nTimeEditor = (function(superClass) {\n extend(TimeEditor, superClass);\n\n function TimeEditor() {\n return TimeEditor.__super__.constructor.apply(this, arguments);\n }\n\n TimeEditor.prototype.type = 'TimeEditor';\n\n TimeEditor.prototype.default_view = TimeEditorView;\n\n return TimeEditor;\n\n})(CellEditor);\n\nDateEditorView = (function(superClass) {\n extend(DateEditorView, superClass);\n\n function DateEditorView() {\n return DateEditorView.__super__.constructor.apply(this, arguments);\n }\n\n DateEditorView.prototype.emptyValue = new Date();\n\n DateEditorView.prototype.input = '<input type=\"text\" />';\n\n DateEditorView.prototype.renderEditor = function() {\n this.calendarOpen = false;\n this.$input.datepicker({\n showOn: \"button\",\n buttonImageOnly: true,\n beforeShow: (function(_this) {\n return function() {\n return _this.calendarOpen = true;\n };\n })(this),\n onClose: (function(_this) {\n return function() {\n return _this.calendarOpen = false;\n };\n })(this)\n });\n this.$input.siblings(\".bk-ui-datepicker-trigger\").css({\n \"vertical-align\": \"middle\"\n });\n this.$input.width(this.$input.width() - (14 + 2 * 4 + 4));\n return this.$input.focus().select();\n };\n\n DateEditorView.prototype.destroy = function() {\n $.datepicker.dpDiv.stop(true, true);\n this.$input.datepicker(\"hide\");\n this.$input.datepicker(\"destroy\");\n return DateEditorView.__super__.destroy.call(this);\n };\n\n DateEditorView.prototype.show = function() {\n if (this.calendarOpen) {\n $.datepicker.dpDiv.stop(true, true).show();\n }\n return DateEditorView.__super__.show.call(this);\n };\n\n DateEditorView.prototype.hide = function() {\n if (this.calendarOpen) {\n $.datepicker.dpDiv.stop(true, true).hide();\n }\n return DateEditorView.__super__.hide.call(this);\n };\n\n DateEditorView.prototype.position = function(position) {\n if (this.calendarOpen) {\n $.datepicker.dpDiv.css({\n top: position.top + 30,\n left: position.left\n });\n }\n return DateEditorView.__super__.position.call(this);\n };\n\n DateEditorView.prototype.getValue = function() {\n return this.$input.datepicker(\"getDate\").getTime();\n };\n\n DateEditorView.prototype.setValue = function(val) {\n return this.$input.datepicker(\"setDate\", new Date(val));\n };\n\n return DateEditorView;\n\n})(CellEditorView);\n\nDateEditor = (function(superClass) {\n extend(DateEditor, superClass);\n\n function DateEditor() {\n return DateEditor.__super__.constructor.apply(this, arguments);\n }\n\n DateEditor.prototype.type = 'DateEditor';\n\n DateEditor.prototype.default_view = DateEditorView;\n\n return DateEditor;\n\n})(CellEditor);\n\nmodule.exports = {\n String: {\n Model: StringEditor,\n View: StringEditorView\n },\n Text: {\n Model: TextEditor,\n View: TextEditorView\n },\n Select: {\n Model: SelectEditor,\n View: SelectEditorView\n },\n Percent: {\n Model: PercentEditor,\n View: PercentEditorView\n },\n Checkbox: {\n Model: CheckboxEditor,\n View: CheckboxEditorView\n },\n Int: {\n Model: IntEditor,\n View: IntEditorView\n },\n Number: {\n Model: NumberEditor,\n View: NumberEditorView\n },\n Time: {\n Model: TimeEditor,\n View: TimeEditorView\n },\n Date: {\n Model: DateEditor,\n View: DateEditorView\n }\n};\n","var $, BooleanFormatter, CellFormatter, DateFormatter, HTMLTemplateFormatter, Model, NumberFormatter, Numbro, StringFormatter, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\nNumbro = require(\"numbro\");\n\np = require(\"../../core/properties\");\n\nModel = require(\"../../model\");\n\nCellFormatter = (function(superClass) {\n extend(CellFormatter, superClass);\n\n function CellFormatter() {\n return CellFormatter.__super__.constructor.apply(this, arguments);\n }\n\n CellFormatter.prototype.doFormat = function(row, cell, value, columnDef, dataContext) {\n if (value === null) {\n return \"\";\n } else {\n return (value + \"\").replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\");\n }\n };\n\n return CellFormatter;\n\n})(Model);\n\nStringFormatter = (function(superClass) {\n extend(StringFormatter, superClass);\n\n function StringFormatter() {\n return StringFormatter.__super__.constructor.apply(this, arguments);\n }\n\n StringFormatter.prototype.type = 'StringFormatter';\n\n StringFormatter.define({\n font_style: [p.FontStyle, \"normal\"],\n text_align: [p.TextAlign, \"left\"],\n text_color: [p.Color]\n });\n\n StringFormatter.prototype.doFormat = function(row, cell, value, columnDef, dataContext) {\n var font_style, text, text_align, text_color;\n text = StringFormatter.__super__.doFormat.call(this, row, cell, value, columnDef, dataContext);\n font_style = this.get(\"font_style\");\n text_align = this.get(\"text_align\");\n text_color = this.get(\"text_color\");\n if ((font_style != null) || (text_align != null) || (text_color != null)) {\n text = $(\"<span>\" + text + \"</span>\");\n switch (font_style) {\n case \"bold\":\n text = text.css(\"font-weight\", \"bold\");\n break;\n case \"italic\":\n text = text.css(\"font-style\", \"italic\");\n }\n if (text_align != null) {\n text = text.css(\"text-align\", text_align);\n }\n if (text_color != null) {\n text = text.css(\"color\", text_color);\n }\n text = text.prop('outerHTML');\n }\n return text;\n };\n\n return StringFormatter;\n\n})(CellFormatter);\n\nNumberFormatter = (function(superClass) {\n extend(NumberFormatter, superClass);\n\n function NumberFormatter() {\n return NumberFormatter.__super__.constructor.apply(this, arguments);\n }\n\n NumberFormatter.prototype.type = 'NumberFormatter';\n\n NumberFormatter.define({\n format: [p.String, '0,0'],\n language: [p.String, 'en'],\n rounding: [p.String, 'round']\n });\n\n NumberFormatter.prototype.doFormat = function(row, cell, value, columnDef, dataContext) {\n var format, language, rounding;\n format = this.get(\"format\");\n language = this.get(\"language\");\n rounding = (function() {\n switch (this.get(\"rounding\")) {\n case \"round\":\n case \"nearest\":\n return Math.round;\n case \"floor\":\n case \"rounddown\":\n return Math.floor;\n case \"ceil\":\n case \"roundup\":\n return Math.ceil;\n }\n }).call(this);\n value = Numbro.format(value, format, language, rounding);\n return NumberFormatter.__super__.doFormat.call(this, row, cell, value, columnDef, dataContext);\n };\n\n return NumberFormatter;\n\n})(StringFormatter);\n\nBooleanFormatter = (function(superClass) {\n extend(BooleanFormatter, superClass);\n\n function BooleanFormatter() {\n return BooleanFormatter.__super__.constructor.apply(this, arguments);\n }\n\n BooleanFormatter.prototype.type = 'BooleanFormatter';\n\n BooleanFormatter.define({\n icon: [p.String, 'check']\n });\n\n BooleanFormatter.prototype.doFormat = function(row, cell, value, columnDef, dataContext) {\n if (!!value) {\n return $('<i>').addClass(this.get(\"icon\")).html();\n } else {\n return \"\";\n }\n };\n\n return BooleanFormatter;\n\n})(CellFormatter);\n\nDateFormatter = (function(superClass) {\n extend(DateFormatter, superClass);\n\n function DateFormatter() {\n return DateFormatter.__super__.constructor.apply(this, arguments);\n }\n\n DateFormatter.prototype.type = 'DateFormatter';\n\n DateFormatter.define({\n format: [p.String, 'yy M d']\n });\n\n DateFormatter.prototype.getFormat = function() {\n var format, name;\n format = this.get(\"format\");\n name = (function() {\n switch (format) {\n case \"ATOM\":\n case \"W3C\":\n case \"RFC-3339\":\n case \"ISO-8601\":\n return \"ISO-8601\";\n case \"COOKIE\":\n return \"COOKIE\";\n case \"RFC-850\":\n return \"RFC-850\";\n case \"RFC-1036\":\n return \"RFC-1036\";\n case \"RFC-1123\":\n return \"RFC-1123\";\n case \"RFC-2822\":\n return \"RFC-2822\";\n case \"RSS\":\n case \"RFC-822\":\n return \"RFC-822\";\n case \"TICKS\":\n return \"TICKS\";\n case \"TIMESTAMP\":\n return \"TIMESTAMP\";\n default:\n return null;\n }\n })();\n if (name != null) {\n return $.datepicker[name];\n } else {\n return format;\n }\n };\n\n DateFormatter.prototype.doFormat = function(row, cell, value, columnDef, dataContext) {\n var date;\n value = _.isString(value) ? parseInt(value, 10) : value;\n date = $.datepicker.formatDate(this.getFormat(), new Date(value));\n return DateFormatter.__super__.doFormat.call(this, row, cell, date, columnDef, dataContext);\n };\n\n return DateFormatter;\n\n})(CellFormatter);\n\nHTMLTemplateFormatter = (function(superClass) {\n extend(HTMLTemplateFormatter, superClass);\n\n function HTMLTemplateFormatter() {\n return HTMLTemplateFormatter.__super__.constructor.apply(this, arguments);\n }\n\n HTMLTemplateFormatter.prototype.type = 'HTMLTemplateFormatter';\n\n HTMLTemplateFormatter.define({\n template: [p.String, '<%= value %>']\n });\n\n HTMLTemplateFormatter.prototype.doFormat = function(row, cell, value, columnDef, dataContext) {\n var compiled_template, template;\n template = this.get(\"template\");\n if (value === null) {\n return \"\";\n } else {\n dataContext = _.extend({}, dataContext, {\n value: value\n });\n compiled_template = _.template(template);\n return compiled_template(dataContext);\n }\n };\n\n return HTMLTemplateFormatter;\n\n})(CellFormatter);\n\nmodule.exports = {\n String: {\n Model: StringFormatter\n },\n Number: {\n Model: NumberFormatter\n },\n Boolean: {\n Model: BooleanFormatter\n },\n Date: {\n Model: DateFormatter\n },\n HTMLTemplate: {\n Model: HTMLTemplateFormatter\n }\n};\n","var $, $1, BokehView, CheckboxButtonGroup, CheckboxButtonGroupView, Widget, _, p, template,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty,\n indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\n$1 = require(\"bootstrap/button\");\n\nWidget = require(\"./widget\");\n\nBokehView = require(\"../../core/bokeh_view\");\n\np = require(\"../../core/properties\");\n\ntemplate = require(\"./button_group_template\");\n\nCheckboxButtonGroupView = (function(superClass) {\n extend(CheckboxButtonGroupView, superClass);\n\n function CheckboxButtonGroupView() {\n return CheckboxButtonGroupView.__super__.constructor.apply(this, arguments);\n }\n\n CheckboxButtonGroupView.prototype.events = {\n \"change input\": \"change_input\"\n };\n\n CheckboxButtonGroupView.prototype.template = template;\n\n CheckboxButtonGroupView.prototype.initialize = function(options) {\n CheckboxButtonGroupView.__super__.initialize.call(this, options);\n this.render();\n return this.listenTo(this.model, 'change', this.render);\n };\n\n CheckboxButtonGroupView.prototype.render = function() {\n var $input, $label, active, html, i, j, label, len, ref;\n CheckboxButtonGroupView.__super__.render.call(this);\n this.$el.empty();\n html = this.template();\n this.$el.append(html);\n active = this.model.active;\n ref = this.model.labels;\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n label = ref[i];\n $input = $('<input type=\"checkbox\">').attr({\n value: \"\" + i\n });\n if (indexOf.call(active, i) >= 0) {\n $input.prop(\"checked\", true);\n }\n $label = $('<label class=\"bk-bs-btn\"></label>');\n $label.text(label).prepend($input);\n $label.addClass(\"bk-bs-btn-\" + this.mget(\"button_type\"));\n if (indexOf.call(active, i) >= 0) {\n $label.addClass(\"bk-bs-active\");\n }\n this.$el.find('.bk-bs-btn-group').append($label);\n }\n return this;\n };\n\n CheckboxButtonGroupView.prototype.change_input = function() {\n var active, checkbox, i, ref;\n active = (function() {\n var j, len, ref, results;\n ref = this.$(\"input\");\n results = [];\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n checkbox = ref[i];\n if (checkbox.checked) {\n results.push(i);\n }\n }\n return results;\n }).call(this);\n this.model.active = active;\n return (ref = this.mget('callback')) != null ? ref.execute(this.model) : void 0;\n };\n\n return CheckboxButtonGroupView;\n\n})(Widget.View);\n\nCheckboxButtonGroup = (function(superClass) {\n extend(CheckboxButtonGroup, superClass);\n\n function CheckboxButtonGroup() {\n return CheckboxButtonGroup.__super__.constructor.apply(this, arguments);\n }\n\n CheckboxButtonGroup.prototype.type = \"CheckboxButtonGroup\";\n\n CheckboxButtonGroup.prototype.default_view = CheckboxButtonGroupView;\n\n CheckboxButtonGroup.define({\n active: [p.Array, []],\n labels: [p.Array, []],\n button_type: [p.String, \"default\"],\n callback: [p.Instance]\n });\n\n return CheckboxButtonGroup;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: CheckboxButtonGroup,\n View: CheckboxButtonGroupView\n};\n","var $, BokehView, CheckboxGroup, CheckboxGroupView, Widget, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty,\n indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\nWidget = require(\"./widget\");\n\nBokehView = require(\"../../core/bokeh_view\");\n\np = require(\"../../core/properties\");\n\nCheckboxGroupView = (function(superClass) {\n extend(CheckboxGroupView, superClass);\n\n function CheckboxGroupView() {\n return CheckboxGroupView.__super__.constructor.apply(this, arguments);\n }\n\n CheckboxGroupView.prototype.events = {\n \"change input\": \"change_input\"\n };\n\n CheckboxGroupView.prototype.initialize = function(options) {\n CheckboxGroupView.__super__.initialize.call(this, options);\n this.render();\n return this.listenTo(this.model, 'change', this.render);\n };\n\n CheckboxGroupView.prototype.render = function() {\n var $div, $input, $label, active, i, j, label, len, ref;\n CheckboxGroupView.__super__.render.call(this);\n this.$el.empty();\n active = this.mget(\"active\");\n ref = this.mget(\"labels\");\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n label = ref[i];\n $input = $('<input type=\"checkbox\">').attr({\n value: \"\" + i\n });\n if (this.mget(\"disabled\")) {\n $input.prop(\"disabled\", true);\n }\n if (indexOf.call(active, i) >= 0) {\n $input.prop(\"checked\", true);\n }\n $label = $('<label></label>').text(label).prepend($input);\n if (this.mget(\"inline\")) {\n $label.addClass(\"bk-bs-checkbox-inline\");\n this.$el.append($label);\n } else {\n $div = $('<div class=\"bk-bs-checkbox\"></div>').append($label);\n this.$el.append($div);\n }\n }\n return this;\n };\n\n CheckboxGroupView.prototype.change_input = function() {\n var active, checkbox, i, ref;\n active = (function() {\n var j, len, ref, results;\n ref = this.$(\"input\");\n results = [];\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n checkbox = ref[i];\n if (checkbox.checked) {\n results.push(i);\n }\n }\n return results;\n }).call(this);\n this.model.active = active;\n return (ref = this.mget('callback')) != null ? ref.execute(this.model) : void 0;\n };\n\n return CheckboxGroupView;\n\n})(Widget.View);\n\nCheckboxGroup = (function(superClass) {\n extend(CheckboxGroup, superClass);\n\n function CheckboxGroup() {\n return CheckboxGroup.__super__.constructor.apply(this, arguments);\n }\n\n CheckboxGroup.prototype.type = \"CheckboxGroup\";\n\n CheckboxGroup.prototype.default_view = CheckboxGroupView;\n\n CheckboxGroup.define({\n active: [p.Array, []],\n labels: [p.Array, []],\n inline: [p.Bool, false],\n callback: [p.Instance]\n });\n\n return CheckboxGroup;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: CheckboxGroup,\n View: CheckboxGroupView\n};\n","var $, $1, CheckboxSelectColumn, DOMUtil, DataProvider, DataTable, DataTableView, RowSelectionModel, SlickGrid, TableWidget, Widget, _, hittest, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\n$1 = require(\"jquery-ui/sortable\");\n\nSlickGrid = require(\"slick_grid/slick.grid\");\n\nRowSelectionModel = require(\"slick_grid/plugins/slick.rowselectionmodel\");\n\nCheckboxSelectColumn = require(\"slick_grid/plugins/slick.checkboxselectcolumn\");\n\nhittest = require(\"../../common/hittest\");\n\np = require(\"../../core/properties\");\n\nDOMUtil = require(\"../../util/dom_util\");\n\nTableWidget = require(\"./table_widget\");\n\nWidget = require(\"./widget\");\n\nDataProvider = (function() {\n function DataProvider(source1) {\n var j, ref, results;\n this.source = source1;\n this.data = this.source.get('data');\n this.fields = _.keys(this.data);\n if (!_.contains(this.fields, \"index\")) {\n this.data[\"index\"] = (function() {\n results = [];\n for (var j = 0, ref = this.getLength(); 0 <= ref ? j < ref : j > ref; 0 <= ref ? j++ : j--){ results.push(j); }\n return results;\n }).apply(this);\n this.fields.push(\"index\");\n }\n }\n\n DataProvider.prototype.getLength = function() {\n return this.source.get_length();\n };\n\n DataProvider.prototype.getItem = function(offset) {\n var field, item, j, len, ref;\n item = {};\n ref = this.fields;\n for (j = 0, len = ref.length; j < len; j++) {\n field = ref[j];\n item[field] = this.data[field][offset];\n }\n return item;\n };\n\n DataProvider.prototype._setItem = function(offset, item) {\n var field, value;\n for (field in item) {\n value = item[field];\n this.data[field][offset] = value;\n }\n };\n\n DataProvider.prototype.setItem = function(offset, item) {\n this._setItem(offset, item);\n return this.updateSource();\n };\n\n DataProvider.prototype.getField = function(index, field) {\n var offset;\n offset = this.data[\"index\"].indexOf(index);\n return this.data[field][offset];\n };\n\n DataProvider.prototype._setField = function(index, field, value) {\n var offset;\n offset = this.data[\"index\"].indexOf(index);\n this.data[field][offset] = value;\n };\n\n DataProvider.prototype.setField = function(index, field, value) {\n this._setField(index, field, value);\n return this.updateSource();\n };\n\n DataProvider.prototype.updateSource = function() {\n return this.source.trigger(\"change:data\", this, this.source.attributes['data']);\n };\n\n DataProvider.prototype.getItemMetadata = function(index) {\n return null;\n };\n\n DataProvider.prototype.getRecords = function() {\n var i;\n return (function() {\n var j, ref, results;\n results = [];\n for (i = j = 0, ref = this.getLength(); 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {\n results.push(this.getItem(i));\n }\n return results;\n }).call(this);\n };\n\n DataProvider.prototype.sort = function(columns) {\n var cols, column, i, j, len, record, records;\n cols = (function() {\n var j, len, results;\n results = [];\n for (j = 0, len = columns.length; j < len; j++) {\n column = columns[j];\n results.push([column.sortCol.field, column.sortAsc ? 1 : -1]);\n }\n return results;\n })();\n if (_.isEmpty(cols)) {\n cols = [[\"index\", 1]];\n }\n records = this.getRecords();\n records.sort(function(record1, record2) {\n var field, j, len, ref, result, sign, value1, value2;\n for (j = 0, len = cols.length; j < len; j++) {\n ref = cols[j], field = ref[0], sign = ref[1];\n value1 = record1[field];\n value2 = record2[field];\n result = value1 === value2 ? 0 : value1 > value2 ? sign : -sign;\n if (result !== 0) {\n return result;\n }\n }\n return 0;\n });\n for (i = j = 0, len = records.length; j < len; i = ++j) {\n record = records[i];\n this._setItem(i, record);\n }\n return this.updateSource();\n };\n\n return DataProvider;\n\n})();\n\nDataTableView = (function(superClass) {\n extend(DataTableView, superClass);\n\n function DataTableView() {\n return DataTableView.__super__.constructor.apply(this, arguments);\n }\n\n DataTableView.prototype.attributes = {\n \"class\": \"bk-data-table\"\n };\n\n DataTableView.prototype.initialize = function(options) {\n var source;\n DataTableView.__super__.initialize.call(this, options);\n DOMUtil.waitForElement(this.el, (function(_this) {\n return function() {\n return _this.render();\n };\n })(this));\n this.listenTo(this.model, 'change', (function(_this) {\n return function() {\n return _this.render();\n };\n })(this));\n source = this.mget(\"source\");\n this.listenTo(source, 'change:data', (function(_this) {\n return function() {\n return _this.updateGrid();\n };\n })(this));\n return this.listenTo(source, 'change:selected', (function(_this) {\n return function() {\n return _this.updateSelection();\n };\n })(this));\n };\n\n DataTableView.prototype.updateGrid = function() {\n this.data = new DataProvider(this.mget(\"source\"));\n this.grid.setData(this.data);\n return this.grid.render();\n };\n\n DataTableView.prototype.updateSelection = function() {\n var cur_grid_range, indices, min_index, selected;\n selected = this.mget(\"source\").get(\"selected\");\n indices = selected['1d'].indices;\n this.grid.setSelectedRows(indices);\n cur_grid_range = this.grid.getViewport();\n if (this.mget(\"scroll_to_selection\") && !_.any(_.map(indices, function(index) {\n return cur_grid_range[\"top\"] <= index && index <= cur_grid_range[\"bottom\"];\n }))) {\n min_index = Math.max(0, Math.min.apply(null, indices) - 1);\n return this.grid.scrollRowToTop(min_index);\n }\n };\n\n DataTableView.prototype.newIndexColumn = function() {\n return {\n id: _.uniqueId(),\n name: \"#\",\n field: \"index\",\n width: 40,\n behavior: \"select\",\n cannotTriggerInsert: true,\n resizable: false,\n selectable: false,\n sortable: true,\n cssClass: \"bk-cell-index\"\n };\n };\n\n DataTableView.prototype.render = function() {\n var checkboxSelector, column, columns, height, options, width;\n columns = (function() {\n var j, len, ref, results;\n ref = this.mget(\"columns\");\n results = [];\n for (j = 0, len = ref.length; j < len; j++) {\n column = ref[j];\n results.push(column.toColumn());\n }\n return results;\n }).call(this);\n if (this.mget(\"selectable\") === \"checkbox\") {\n checkboxSelector = new CheckboxSelectColumn({\n cssClass: \"bk-cell-select\"\n });\n columns.unshift(checkboxSelector.getColumnDefinition());\n }\n if (this.mget(\"row_headers\") && (this.mget(\"source\").get_column(\"index\") != null)) {\n columns.unshift(this.newIndexColumn());\n }\n width = this.mget(\"width\");\n height = this.mget(\"height\");\n options = {\n enableCellNavigation: this.mget(\"selectable\") !== false,\n enableColumnReorder: true,\n forceFitColumns: this.mget(\"fit_columns\"),\n autoHeight: height === \"auto\",\n multiColumnSort: this.mget(\"sortable\"),\n editable: this.mget(\"editable\"),\n autoEdit: false\n };\n if (width != null) {\n this.$el.css({\n width: (this.mget(\"width\")) + \"px\"\n });\n } else {\n this.$el.css({\n width: (this.mget(\"default_width\")) + \"px\"\n });\n }\n if ((height != null) && height !== \"auto\") {\n this.$el.css({\n height: (this.mget(\"height\")) + \"px\"\n });\n }\n this.data = new DataProvider(this.mget(\"source\"));\n this.grid = new SlickGrid(this.el, this.data, columns, options);\n this.grid.onSort.subscribe((function(_this) {\n return function(event, args) {\n columns = args.sortCols;\n _this.data.sort(columns);\n _this.grid.invalidate();\n return _this.grid.render();\n };\n })(this));\n if (this.mget(\"selectable\") !== false) {\n this.grid.setSelectionModel(new RowSelectionModel({\n selectActiveRow: checkboxSelector == null\n }));\n if (checkboxSelector != null) {\n this.grid.registerPlugin(checkboxSelector);\n }\n this.grid.onSelectedRowsChanged.subscribe((function(_this) {\n return function(event, args) {\n var selected;\n selected = hittest.create_hit_test_result();\n selected['1d'].indices = args.rows;\n return _this.mget(\"source\").set(\"selected\", selected);\n };\n })(this));\n }\n return this;\n };\n\n return DataTableView;\n\n})(Widget.View);\n\nDataTable = (function(superClass) {\n extend(DataTable, superClass);\n\n function DataTable() {\n return DataTable.__super__.constructor.apply(this, arguments);\n }\n\n DataTable.prototype.type = 'DataTable';\n\n DataTable.prototype.default_view = DataTableView;\n\n DataTable.define({\n columns: [p.Array, []],\n fit_columns: [p.Bool, true],\n sortable: [p.Bool, true],\n editable: [p.Bool, false],\n selectable: [p.Bool, true],\n row_headers: [p.Bool, true],\n scroll_to_selection: [p.Bool, true]\n });\n\n DataTable.override({\n height: 400\n });\n\n DataTable.internal({\n default_width: [p.Number, 600]\n });\n\n return DataTable;\n\n})(TableWidget.Model);\n\nmodule.exports = {\n Model: DataTable,\n View: DataTableView\n};\n","var $, $1, DatePicker, DatePickerView, InputWidget, _, p,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\n$1 = require(\"jquery-ui/datepicker\");\n\np = require(\"../../core/properties\");\n\nInputWidget = require(\"./input_widget\");\n\nDatePickerView = (function(superClass) {\n extend(DatePickerView, superClass);\n\n function DatePickerView() {\n this.onSelect = bind(this.onSelect, this);\n return DatePickerView.__super__.constructor.apply(this, arguments);\n }\n\n DatePickerView.prototype.initialize = function(options) {\n DatePickerView.__super__.initialize.call(this, options);\n this.label = $('<label>').text(this.mget(\"title\"));\n this.input = $('<input type=\"text\">');\n this.datepicker = this.input.datepicker({\n defaultDate: new Date(this.mget('value')),\n minDate: this.mget('min_date') != null ? new Date(this.mget('min_date')) : null,\n maxDate: this.mget('max_date') != null ? new Date(this.mget('max_date')) : null,\n onSelect: this.onSelect\n });\n return this.$el.append([this.label, this.input]);\n };\n\n DatePickerView.prototype.onSelect = function(dateText, ui) {\n var d, ref;\n d = new Date(dateText);\n this.mset('value', d.toString());\n return (ref = this.mget('callback')) != null ? ref.execute(this.model) : void 0;\n };\n\n return DatePickerView;\n\n})(InputWidget.View);\n\nDatePicker = (function(superClass) {\n extend(DatePicker, superClass);\n\n function DatePicker() {\n return DatePicker.__super__.constructor.apply(this, arguments);\n }\n\n DatePicker.prototype.type = \"DatePicker\";\n\n DatePicker.prototype.default_view = DatePickerView;\n\n DatePicker.define({\n value: [p.Any, Date.now()],\n min_date: [p.Any],\n max_date: [p.Any]\n });\n\n return DatePicker;\n\n})(InputWidget.Model);\n\nmodule.exports = {\n Model: DatePicker,\n View: DatePickerView\n};\n","var $, $1, DateRangeSlider, DateRangeSliderView, InputWidget, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\n$1 = require(\"jqrangeslider/jQDateRangeSlider\");\n\np = require(\"../../core/properties\");\n\nInputWidget = require(\"./input_widget\");\n\nDateRangeSliderView = (function(superClass) {\n extend(DateRangeSliderView, superClass);\n\n function DateRangeSliderView() {\n return DateRangeSliderView.__super__.constructor.apply(this, arguments);\n }\n\n DateRangeSliderView.prototype.initialize = function(options) {\n DateRangeSliderView.__super__.initialize.call(this, options);\n this.render();\n return this.listenTo(this.model, 'change', (function(_this) {\n return function() {\n return _this.render;\n };\n })(this));\n };\n\n DateRangeSliderView.prototype.render = function() {\n var bounds_max, bounds_min, range_max, range_min, ref, ref1, ref2, value_max, value_min;\n DateRangeSliderView.__super__.render.call(this);\n this.$el.empty();\n ref = this.mget(\"value\"), value_min = ref[0], value_max = ref[1];\n ref1 = this.mget(\"range\"), range_min = ref1[0], range_max = ref1[1];\n ref2 = this.mget(\"bounds\"), bounds_min = ref2[0], bounds_max = ref2[1];\n this.$el.dateRangeSlider({\n defaultValues: {\n min: new Date(value_min),\n max: new Date(value_max)\n },\n bounds: {\n min: new Date(bounds_min),\n max: new Date(bounds_max)\n },\n range: {\n min: _.isObject(range_min) ? range_min : false,\n max: _.isObject(range_max) ? range_max : false\n },\n step: this.mget(\"step\") || {},\n enabled: this.mget(\"enabled\"),\n arrows: this.mget(\"arrows\"),\n valueLabels: this.mget(\"value_labels\"),\n wheelMode: this.mget(\"wheel_mode\")\n });\n this.$el.on(\"userValuesChanged\", (function(_this) {\n return function(event, data) {\n var ref3;\n _this.mset('value', [data.values.min, data.values.max]);\n return (ref3 = _this.mget('callback')) != null ? ref3.execute(_this.model) : void 0;\n };\n })(this));\n return this;\n };\n\n return DateRangeSliderView;\n\n})(InputWidget.View);\n\nDateRangeSlider = (function(superClass) {\n extend(DateRangeSlider, superClass);\n\n function DateRangeSlider() {\n return DateRangeSlider.__super__.constructor.apply(this, arguments);\n }\n\n DateRangeSlider.prototype.type = \"DateRangeSlider\";\n\n DateRangeSlider.prototype.default_view = DateRangeSliderView;\n\n DateRangeSlider.define({\n value: [p.Any],\n range: [p.Any],\n bounds: [p.Any],\n step: [p.Any, {}],\n enabled: [p.Bool, true],\n arrows: [p.Bool, true],\n value_labels: [p.String, \"show\"],\n wheel_mode: [p.Any]\n\n /*\n formatter\n scales\n */\n });\n\n return DateRangeSlider;\n\n})(InputWidget.Model);\n\nmodule.exports = {\n Model: DateRangeSlider,\n View: DateRangeSliderView\n};\n","var $, $1, Dialog, DialogView, Widget, _, dialog_template, p,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\n$1 = require(\"bootstrap/modal\");\n\np = require(\"../../core/properties\");\n\ndialog_template = require(\"./dialog_template\");\n\nWidget = require(\"./widget\");\n\nDialogView = (function(superClass) {\n extend(DialogView, superClass);\n\n function DialogView() {\n this.change_content = bind(this.change_content, this);\n this.change_visibility = bind(this.change_visibility, this);\n this.onHide = bind(this.onHide, this);\n return DialogView.__super__.constructor.apply(this, arguments);\n }\n\n DialogView.prototype.initialize = function(options) {\n DialogView.__super__.initialize.call(this, options);\n this.render();\n this.render_content();\n this.render_buttons();\n this.listenTo(this.model, 'destroy', this.remove);\n this.listenTo(this.model, 'change:visible', this.change_visibility);\n return this.listenTo(this.model, 'change:content', this.change_content);\n };\n\n DialogView.prototype.render_content = function() {\n var content;\n if (this.content_view != null) {\n this.content_view.remove();\n }\n content = this.mget('content');\n if (content != null) {\n if (typeof content === 'object') {\n this.content_view = new content.default_view({\n model: content\n });\n this.$el.find('.bk-dialog-content').empty();\n this.$el.find('.bk-dialog-content').append(this.content_view.$el);\n } else {\n this.$el.find('.bk-dialog-content').empty();\n this.$el.find('.bk-dialog-content').text(content);\n }\n }\n return this;\n };\n\n DialogView.prototype.render_buttons = function() {\n var buttons_box;\n if (this.buttons_box_view != null) {\n this.buttons_box_view.remove();\n }\n buttons_box = this.mget('buttons_box');\n if (buttons_box != null) {\n this.buttons_box_view = new buttons_box.default_view({\n model: buttons_box\n });\n this.$el.find('.bk-dialog-buttons_box').empty();\n this.$el.find('.bk-dialog-buttons_box').append(this.buttons_box_view.$el);\n }\n return this;\n };\n\n DialogView.prototype.render = function() {\n DialogView.__super__.render.call(this);\n this.$modal = $(dialog_template(this.model.attributes));\n this.$modal.modal({\n show: this.mget(\"visible\")\n });\n this.$modal.on('hidden.bk-bs.modal', this.onHide);\n this.$el.html(this.$modal);\n return this;\n };\n\n DialogView.prototype.onHide = function(event) {\n return this.mset(\"visible\", false, {\n silent: true\n });\n };\n\n DialogView.prototype.change_visibility = function() {\n return this.$modal.modal(this.mget(\"visible\") ? \"show\" : \"hide\");\n };\n\n DialogView.prototype.change_content = function() {\n return this.render_content();\n };\n\n return DialogView;\n\n})(Widget.View);\n\nDialog = (function(superClass) {\n extend(Dialog, superClass);\n\n function Dialog() {\n return Dialog.__super__.constructor.apply(this, arguments);\n }\n\n Dialog.prototype.type = \"Dialog\";\n\n Dialog.prototype.default_view = DialogView;\n\n Dialog.define({\n visible: [p.Bool, false],\n closable: [p.Bool, true],\n title: [p.String, \"\"],\n content: [p.String, \"\"],\n buttons: [p.Array, []],\n buttons_box: [p.Instance]\n });\n\n return Dialog;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: Dialog,\n View: DialogView\n};\n","module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [];\n var __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n };\n var __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n };\n var __safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n var __escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n (function() {\n (function() {\n __out.push('<div class=\"bk-bs-modal\" tabindex=\"-1\">\\n <div class=\"bk-bs-modal-dialog\">\\n <div class=\"bk-bs-modal-content\">\\n <div class=\"bk-bs-modal-header\">\\n ');\n \n if (this.closable) {\n __out.push('\\n <button type=\"button\" class=\"bk-bs-close\" data-bk-bs-dismiss=\"modal\">×</button>\\n ');\n }\n \n __out.push('\\n <h4 class=\"bk-bs-modal-title\">');\n \n __out.push(__sanitize(this.title));\n \n __out.push('</h4>\\n </div>\\n <div class=\"bk-bs-modal-body\">\\n <div class=\"bk-dialog-content\" />\\n </div>\\n <div class=\"bk-bs-modal-footer\">\\n <div class=\"bk-dialog-buttons_box\" />\\n </div>\\n </div>\\n </div>\\n</div>\\n');\n \n }).call(this);\n \n }).call(__obj);\n return __out.join('');\n};","var $, Div, DivView, Markup, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n$ = require(\"jquery\");\n\nMarkup = require(\"./markup\");\n\np = require(\"../../core/properties\");\n\nDivView = (function(superClass) {\n extend(DivView, superClass);\n\n function DivView() {\n return DivView.__super__.constructor.apply(this, arguments);\n }\n\n DivView.prototype.render = function() {\n var $content;\n DivView.__super__.render.call(this);\n if (this.model.render_as_text === true) {\n $content = $('<div></div>').text(this.model.text);\n } else {\n $content = $('<div></div>').html(this.model.text);\n }\n this.$el.find('.bk-markup').append($content);\n return this;\n };\n\n return DivView;\n\n})(Markup.View);\n\nDiv = (function(superClass) {\n extend(Div, superClass);\n\n function Div() {\n return Div.__super__.constructor.apply(this, arguments);\n }\n\n Div.prototype.type = \"Div\";\n\n Div.prototype.default_view = DivView;\n\n Div.define({\n render_as_text: [p.Bool, false]\n });\n\n return Div;\n\n})(Markup.Model);\n\nmodule.exports = {\n Model: Div,\n View: DivView\n};\n","var $, AbstractButton, Dropdown, DropdownView, _, p, template,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\np = require(\"../../core/properties\");\n\nAbstractButton = require(\"./abstract_button\");\n\ntemplate = require(\"./dropdown_template\");\n\nDropdownView = (function(superClass) {\n extend(DropdownView, superClass);\n\n function DropdownView() {\n return DropdownView.__super__.constructor.apply(this, arguments);\n }\n\n DropdownView.prototype.template = template;\n\n DropdownView.prototype.render = function() {\n var $a, $item, i, item, items, label, len, ref, that, value;\n DropdownView.__super__.render.call(this);\n items = [];\n ref = this.model.menu;\n for (i = 0, len = ref.length; i < len; i++) {\n item = ref[i];\n $item = item != null ? ((label = item[0], value = item[1], item), $a = $(\"<a data-value='\" + value + \"'>\" + label + \"</a>\"), that = this, $a.click(function(e) {\n return that.set_value($(this).data('value'));\n }), $('<li></li>').append($a)) : $('<li class=\"bk-bs-divider\"></li>');\n items.push($item);\n }\n this.$el.find('.bk-bs-dropdown-menu').append(items);\n this.$el.find('button').val(this.model.default_value);\n return this;\n };\n\n DropdownView.prototype.set_value = function(value) {\n this.model.value = value;\n return this.$el.find('button').val(value);\n };\n\n return DropdownView;\n\n})(AbstractButton.View);\n\nDropdown = (function(superClass) {\n extend(Dropdown, superClass);\n\n function Dropdown() {\n return Dropdown.__super__.constructor.apply(this, arguments);\n }\n\n Dropdown.prototype.type = \"Dropdown\";\n\n Dropdown.prototype.default_view = DropdownView;\n\n Dropdown.define({\n value: [p.String],\n default_value: [p.String],\n menu: [p.Array, []]\n });\n\n Dropdown.override({\n label: \"Dropdown\"\n });\n\n return Dropdown;\n\n})(AbstractButton.Model);\n\nmodule.exports = {\n Model: Dropdown,\n View: DropdownView\n};\n","module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [];\n var __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n };\n var __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n };\n var __safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n var __escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n (function() {\n (function() {\n __out.push('<button type=\"button\" class=\"bk-bs-btn bk-bs-btn-');\n \n __out.push(__sanitize(this.button_type));\n \n __out.push(' bk-bs-dropdown-toggle bk-bs-dropdown-btn\" data-bk-bs-toggle=\"dropdown\">\\n ');\n \n __out.push(__sanitize(this.label));\n \n __out.push(' <span class=\"bk-bs-caret\"></span>\\n</button>\\n<ul class=\"bk-bs-dropdown-menu\">\\n</ul>\\n');\n \n }).call(this);\n \n }).call(__obj);\n return __out.join('');\n};","var AbstractIcon, Icon, IconView, Widget, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\np = require(\"../../core/properties\");\n\nAbstractIcon = require(\"./abstract_icon\");\n\nWidget = require(\"./widget\");\n\nIconView = (function(superClass) {\n extend(IconView, superClass);\n\n function IconView() {\n return IconView.__super__.constructor.apply(this, arguments);\n }\n\n IconView.prototype.tagName = \"i\";\n\n IconView.prototype.initialize = function(options) {\n IconView.__super__.initialize.call(this, options);\n this.render();\n return this.listenTo(this.model, 'change', this.render);\n };\n\n IconView.prototype.render = function() {\n var flip, size;\n this.$el.empty();\n this.$el.addClass(\"bk-fa\");\n this.$el.addClass(\"bk-fa-\" + this.mget(\"icon_name\"));\n size = this.mget(\"size\");\n if (size != null) {\n this.$el.css({\n \"font-size\": size + \"em\"\n });\n }\n flip = this.mget(\"flip\");\n if (flip != null) {\n this.$el.addClass(\"bk-fa-flip-\" + flip);\n }\n if (this.mget(\"spin\")) {\n this.$el.addClass(\"bk-fa-spin\");\n }\n return this;\n };\n\n IconView.prototype.update_constraints = function() {\n return null;\n };\n\n return IconView;\n\n})(Widget.View);\n\nIcon = (function(superClass) {\n extend(Icon, superClass);\n\n function Icon() {\n return Icon.__super__.constructor.apply(this, arguments);\n }\n\n Icon.prototype.type = \"Icon\";\n\n Icon.prototype.default_view = IconView;\n\n Icon.define({\n icon_name: [p.String, \"check\"],\n size: [p.Number],\n flip: [p.Any],\n spin: [p.Bool, false]\n });\n\n return Icon;\n\n})(AbstractIcon.Model);\n\nmodule.exports = {\n Model: Icon,\n View: IconView\n};\n","var InputWidget, InputWidgetView, Widget, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\nWidget = require(\"./widget\");\n\np = require(\"../../core/properties\");\n\nInputWidgetView = (function(superClass) {\n extend(InputWidgetView, superClass);\n\n function InputWidgetView() {\n return InputWidgetView.__super__.constructor.apply(this, arguments);\n }\n\n InputWidgetView.prototype.render = function() {\n InputWidgetView.__super__.render.call(this);\n return this.$el.find('input').prop(\"disabled\", this.model.disabled);\n };\n\n InputWidgetView.prototype.change_input = function() {\n var ref;\n return (ref = this.mget('callback')) != null ? ref.execute(this.model) : void 0;\n };\n\n return InputWidgetView;\n\n})(Widget.View);\n\nInputWidget = (function(superClass) {\n extend(InputWidget, superClass);\n\n function InputWidget() {\n return InputWidget.__super__.constructor.apply(this, arguments);\n }\n\n InputWidget.prototype.type = \"InputWidget\";\n\n InputWidget.prototype.default_view = InputWidgetView;\n\n InputWidget.define({\n callback: [p.Instance],\n title: [p.String, '']\n });\n\n return InputWidget;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: InputWidget,\n View: InputWidgetView\n};\n","module.exports = {\n models: {\n editors: [require('./cell_editors'), 'Editor'],\n formatters: [require('./cell_formatters'), 'Formatter'],\n AbstractButton: require('./abstract_button'),\n AbstractIcon: require('./abstract_icon'),\n TableWidget: require('./table_widget'),\n Markup: require('./markup'),\n Widget: require('./widget'),\n InputWidget: require('./input_widget'),\n TableColumn: require('./table_column'),\n DataTable: require('./data_table'),\n Paragraph: require('./paragraph'),\n Div: require('./div'),\n TextInput: require('./text_input'),\n AutocompleteInput: require('./autocomplete_input'),\n PreText: require('./pretext'),\n Select: require('./selectbox'),\n Slider: require('./slider'),\n MultiSelect: require('./multiselect'),\n DateRangeSlider: require('./date_range_slider'),\n DatePicker: require('./date_picker'),\n Panel: require('./panel'),\n Tabs: require('./tabs'),\n Dialog: require('./dialog'),\n Icon: require('./icon'),\n Button: require('./button'),\n Toggle: require('./toggle'),\n Dropdown: require('./dropdown'),\n CheckboxGroup: require('./checkbox_group'),\n RadioGroup: require('./radio_group'),\n CheckboxButtonGroup: require('./checkbox_button_group'),\n RadioButtonGroup: require('./radio_button_group')\n }\n};\n","var Markup, MarkupView, Widget, p, template,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\np = require(\"../../core/properties\");\n\nWidget = require(\"./widget\");\n\ntemplate = require(\"./markup_template\");\n\nMarkupView = (function(superClass) {\n extend(MarkupView, superClass);\n\n function MarkupView() {\n return MarkupView.__super__.constructor.apply(this, arguments);\n }\n\n MarkupView.prototype.template = template;\n\n MarkupView.prototype.initialize = function(options) {\n MarkupView.__super__.initialize.call(this, options);\n this.render();\n return this.listenTo(this.model, 'change', this.render);\n };\n\n MarkupView.prototype.render = function() {\n MarkupView.__super__.render.call(this);\n this.$el.empty();\n this.$el.html(this.template());\n if (this.mget('height')) {\n this.$el.height(this.mget('height'));\n }\n if (this.mget('width')) {\n return this.$el.width(this.mget('width'));\n }\n };\n\n return MarkupView;\n\n})(Widget.View);\n\nMarkup = (function(superClass) {\n extend(Markup, superClass);\n\n function Markup() {\n return Markup.__super__.constructor.apply(this, arguments);\n }\n\n Markup.prototype.type = \"Markup\";\n\n Markup.prototype.initialize = function(options) {\n return Markup.__super__.initialize.call(this, options);\n };\n\n Markup.define({\n text: [p.String, '']\n });\n\n return Markup;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: Markup,\n View: MarkupView\n};\n","module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [];\n var __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n };\n var __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n };\n var __safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n var __escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n (function() {\n (function() {\n __out.push('<div class=\"bk-markup\">\\n</div>\\n');\n \n }).call(this);\n \n }).call(__obj);\n return __out.join('');\n};","var $, InputWidget, MultiSelect, MultiSelectView, _, multiselecttemplate, p,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"jquery\");\n\n$ = require(\"underscore\");\n\np = require(\"../../core/properties\");\n\nInputWidget = require(\"./input_widget\");\n\nmultiselecttemplate = require(\"./multiselecttemplate\");\n\nMultiSelectView = (function(superClass) {\n extend(MultiSelectView, superClass);\n\n function MultiSelectView() {\n this.render_selection = bind(this.render_selection, this);\n return MultiSelectView.__super__.constructor.apply(this, arguments);\n }\n\n MultiSelectView.prototype.tagName = \"div\";\n\n MultiSelectView.prototype.template = multiselecttemplate;\n\n MultiSelectView.prototype.events = {\n \"change select\": \"change_input\"\n };\n\n MultiSelectView.prototype.initialize = function(options) {\n MultiSelectView.__super__.initialize.call(this, options);\n this.render();\n this.listenTo(this.model, 'change:value', this.render_selection);\n this.listenTo(this.model, 'change:options', this.render);\n this.listenTo(this.model, 'change:name', this.render);\n return this.listenTo(this.model, 'change:title', this.render);\n };\n\n MultiSelectView.prototype.render = function() {\n var html;\n MultiSelectView.__super__.render.call(this);\n this.$el.empty();\n html = this.template(this.model.attributes);\n this.$el.html(html);\n this.render_selection();\n return this;\n };\n\n MultiSelectView.prototype.render_selection = function() {\n var values;\n values = {};\n _.map(this.mget('value'), function(x) {\n return values[x] = true;\n });\n return this.$('option').each((function(_this) {\n return function(el) {\n el = _this.$(el);\n if (values[el.attr('value')]) {\n return el.attr('selected', 'selected');\n }\n };\n })(this));\n };\n\n MultiSelectView.prototype.change_input = function() {\n var value;\n value = this.$el.find('select').val();\n if (value) {\n this.model.value = value;\n } else {\n this.model.value = [];\n }\n return MultiSelectView.__super__.change_input.call(this);\n };\n\n return MultiSelectView;\n\n})(InputWidget.View);\n\nMultiSelect = (function(superClass) {\n extend(MultiSelect, superClass);\n\n function MultiSelect() {\n return MultiSelect.__super__.constructor.apply(this, arguments);\n }\n\n MultiSelect.prototype.type = \"MultiSelect\";\n\n MultiSelect.prototype.default_view = MultiSelectView;\n\n MultiSelect.define({\n value: [p.Array, []],\n options: [p.Array, []]\n });\n\n return MultiSelect;\n\n})(InputWidget.Model);\n\nmodule.exports = {\n Model: MultiSelect,\n View: MultiSelectView\n};\n","module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [];\n var __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n };\n var __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n };\n var __safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n var __escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n (function() {\n (function() {\n var i, len, option, ref;\n \n __out.push('<label for=\"');\n \n __out.push(__sanitize(this.id));\n \n __out.push('\"> ');\n \n __out.push(__sanitize(this.title));\n \n __out.push(' </label>\\n<select multiple class=\"bk-widget-form-input\" id=\"');\n \n __out.push(__sanitize(this.id));\n \n __out.push('\" name=\"');\n \n __out.push(__sanitize(this.name));\n \n __out.push('\">\\n ');\n \n ref = this.options;\n for (i = 0, len = ref.length; i < len; i++) {\n option = ref[i];\n __out.push('\\n ');\n if (typeof option === \"string\") {\n __out.push('\\n <option ');\n if (this.value.indexOf(option) > -1) {\n __out.push('selected=\"selected\" ');\n }\n __out.push('value=\"');\n __out.push(__sanitize(option));\n __out.push('\">');\n __out.push(__sanitize(option));\n __out.push('</option>\\n ');\n } else {\n __out.push('\\n <option ');\n if (this.value.indexOf(option[0]) > -1) {\n __out.push('selected=\"selected\" ');\n }\n __out.push('value=\"');\n __out.push(__sanitize(option[0]));\n __out.push('\">');\n __out.push(__sanitize(option[1]));\n __out.push('</option>\\n ');\n }\n __out.push('\\n ');\n }\n \n __out.push('\\n</select>');\n \n }).call(this);\n \n }).call(__obj);\n return __out.join('');\n};","var $, Panel, PanelView, Widget, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\np = require(\"../../core/properties\");\n\nWidget = require(\"./widget\");\n\nPanelView = (function(superClass) {\n extend(PanelView, superClass);\n\n function PanelView() {\n return PanelView.__super__.constructor.apply(this, arguments);\n }\n\n PanelView.prototype.render = function() {\n PanelView.__super__.render.call(this);\n this.$el.empty();\n return this;\n };\n\n return PanelView;\n\n})(Widget.View);\n\nPanel = (function(superClass) {\n extend(Panel, superClass);\n\n function Panel() {\n return Panel.__super__.constructor.apply(this, arguments);\n }\n\n Panel.prototype.type = \"Panel\";\n\n Panel.prototype.default_view = PanelView;\n\n Panel.define({\n title: [p.String, \"\"],\n child: [p.Instance],\n closable: [p.Bool, false]\n });\n\n return Panel;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: Panel,\n View: PanelView\n};\n","var $, Markup, Paragraph, ParagraphView,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n$ = require(\"jquery\");\n\nMarkup = require(\"./markup\");\n\nParagraphView = (function(superClass) {\n extend(ParagraphView, superClass);\n\n function ParagraphView() {\n return ParagraphView.__super__.constructor.apply(this, arguments);\n }\n\n ParagraphView.prototype.render = function() {\n var $para;\n ParagraphView.__super__.render.call(this);\n $para = $('<p style=\"margin: 0;\"></p>').text(this.model.text);\n return this.$el.find('.bk-markup').append($para);\n };\n\n return ParagraphView;\n\n})(Markup.View);\n\nParagraph = (function(superClass) {\n extend(Paragraph, superClass);\n\n function Paragraph() {\n return Paragraph.__super__.constructor.apply(this, arguments);\n }\n\n Paragraph.prototype.type = \"Paragraph\";\n\n Paragraph.prototype.default_view = ParagraphView;\n\n return Paragraph;\n\n})(Markup.Model);\n\nmodule.exports = {\n Model: Paragraph,\n View: ParagraphView\n};\n","var $, Markup, PreText, PreTextView, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n$ = require(\"jquery\");\n\nMarkup = require(\"./markup\");\n\np = require(\"../../core/properties\");\n\nPreTextView = (function(superClass) {\n extend(PreTextView, superClass);\n\n function PreTextView() {\n return PreTextView.__super__.constructor.apply(this, arguments);\n }\n\n PreTextView.prototype.render = function() {\n var $pre;\n PreTextView.__super__.render.call(this);\n $pre = $('<pre style=\"overflow: auto\"></pre>').text(this.model.text);\n return this.$el.find('.bk-markup').append($pre);\n };\n\n return PreTextView;\n\n})(Markup.View);\n\nPreText = (function(superClass) {\n extend(PreText, superClass);\n\n function PreText() {\n return PreText.__super__.constructor.apply(this, arguments);\n }\n\n PreText.prototype.type = \"PreText\";\n\n PreText.prototype.default_view = PreTextView;\n\n return PreText;\n\n})(Markup.Model);\n\nmodule.exports = {\n Model: PreText,\n View: PreTextView\n};\n","var $, $1, RadioButtonGroup, RadioButtonGroupView, Widget, _, p, template,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\n$1 = require(\"bootstrap/button\");\n\np = require(\"../../core/properties\");\n\nWidget = require(\"./widget\");\n\ntemplate = require(\"./button_group_template\");\n\nRadioButtonGroupView = (function(superClass) {\n extend(RadioButtonGroupView, superClass);\n\n function RadioButtonGroupView() {\n return RadioButtonGroupView.__super__.constructor.apply(this, arguments);\n }\n\n RadioButtonGroupView.prototype.events = {\n \"change input\": \"change_input\"\n };\n\n RadioButtonGroupView.prototype.template = template;\n\n RadioButtonGroupView.prototype.initialize = function(options) {\n RadioButtonGroupView.__super__.initialize.call(this, options);\n this.render();\n return this.listenTo(this.model, 'change', this.render);\n };\n\n RadioButtonGroupView.prototype.render = function() {\n var $input, $label, active, html, i, j, label, len, name, ref;\n RadioButtonGroupView.__super__.render.call(this);\n this.$el.empty();\n html = this.template();\n this.$el.append(html);\n name = _.uniqueId(\"RadioButtonGroup\");\n active = this.mget(\"active\");\n ref = this.mget(\"labels\");\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n label = ref[i];\n $input = $('<input type=\"radio\">').attr({\n name: name,\n value: \"\" + i\n });\n if (i === active) {\n $input.prop(\"checked\", true);\n }\n $label = $('<label class=\"bk-bs-btn\"></label>');\n $label.text(label).prepend($input);\n $label.addClass(\"bk-bs-btn-\" + this.mget(\"button_type\"));\n if (i === active) {\n $label.addClass(\"bk-bs-active\");\n }\n this.$el.find('.bk-bs-btn-group').append($label);\n }\n return this;\n };\n\n RadioButtonGroupView.prototype.change_input = function() {\n var active, i, radio, ref;\n active = (function() {\n var j, len, ref, results;\n ref = this.$(\"input\");\n results = [];\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n radio = ref[i];\n if (radio.checked) {\n results.push(i);\n }\n }\n return results;\n }).call(this);\n this.model.active = active[0];\n return (ref = this.mget('callback')) != null ? ref.execute(this.model) : void 0;\n };\n\n return RadioButtonGroupView;\n\n})(Widget.View);\n\nRadioButtonGroup = (function(superClass) {\n extend(RadioButtonGroup, superClass);\n\n function RadioButtonGroup() {\n return RadioButtonGroup.__super__.constructor.apply(this, arguments);\n }\n\n RadioButtonGroup.prototype.type = \"RadioButtonGroup\";\n\n RadioButtonGroup.prototype.default_view = RadioButtonGroupView;\n\n RadioButtonGroup.define({\n active: [p.Any, null],\n labels: [p.Array, []],\n button_type: [p.String, \"default\"],\n callback: [p.Instance]\n });\n\n return RadioButtonGroup;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: RadioButtonGroup,\n View: RadioButtonGroupView\n};\n","var $, RadioGroup, RadioGroupView, Widget, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\np = require(\"../../core/properties\");\n\nWidget = require(\"./widget\");\n\nRadioGroupView = (function(superClass) {\n extend(RadioGroupView, superClass);\n\n function RadioGroupView() {\n return RadioGroupView.__super__.constructor.apply(this, arguments);\n }\n\n RadioGroupView.prototype.tagName = \"div\";\n\n RadioGroupView.prototype.events = {\n \"change input\": \"change_input\"\n };\n\n RadioGroupView.prototype.initialize = function(options) {\n RadioGroupView.__super__.initialize.call(this, options);\n this.render();\n return this.listenTo(this.model, 'change', this.render);\n };\n\n RadioGroupView.prototype.render = function() {\n var $div, $input, $label, active, i, j, label, len, name, ref;\n RadioGroupView.__super__.render.call(this);\n this.$el.empty();\n name = _.uniqueId(\"RadioGroup\");\n active = this.mget(\"active\");\n ref = this.mget(\"labels\");\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n label = ref[i];\n $input = $('<input type=\"radio\">').attr({\n name: name,\n value: \"\" + i\n });\n if (this.mget(\"disabled\")) {\n $input.prop(\"disabled\", true);\n }\n if (i === active) {\n $input.prop(\"checked\", true);\n }\n $label = $('<label></label>').text(label).prepend($input);\n if (this.mget(\"inline\")) {\n $label.addClass(\"bk-bs-radio-inline\");\n this.$el.append($label);\n } else {\n $div = $('<div class=\"bk-bs-radio\"></div>').append($label);\n this.$el.append($div);\n }\n }\n return this;\n };\n\n RadioGroupView.prototype.change_input = function() {\n var active, i, radio, ref;\n active = (function() {\n var j, len, ref, results;\n ref = this.$(\"input\");\n results = [];\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n radio = ref[i];\n if (radio.checked) {\n results.push(i);\n }\n }\n return results;\n }).call(this);\n this.model.active = active[0];\n return (ref = this.mget('callback')) != null ? ref.execute(this.model) : void 0;\n };\n\n return RadioGroupView;\n\n})(Widget.View);\n\nRadioGroup = (function(superClass) {\n extend(RadioGroup, superClass);\n\n function RadioGroup() {\n return RadioGroup.__super__.constructor.apply(this, arguments);\n }\n\n RadioGroup.prototype.type = \"RadioGroup\";\n\n RadioGroup.prototype.default_view = RadioGroupView;\n\n RadioGroup.define({\n active: [p.Any, null],\n labels: [p.Array, []],\n inline: [p.Bool, false],\n callback: [p.Instance]\n });\n\n return RadioGroup;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: RadioGroup,\n View: RadioGroupView\n};\n","var InputWidget, Select, SelectView, _, logger, p, template,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\nlogger = require(\"../../core/logging\").logger;\n\np = require(\"../../core/properties\");\n\nInputWidget = require(\"./input_widget\");\n\ntemplate = require(\"./selecttemplate\");\n\nSelectView = (function(superClass) {\n extend(SelectView, superClass);\n\n function SelectView() {\n return SelectView.__super__.constructor.apply(this, arguments);\n }\n\n SelectView.prototype.template = template;\n\n SelectView.prototype.events = {\n \"change select\": \"change_input\"\n };\n\n SelectView.prototype.initialize = function(options) {\n SelectView.__super__.initialize.call(this, options);\n this.render();\n return this.listenTo(this.model, 'change', this.render);\n };\n\n SelectView.prototype.render = function() {\n var html;\n SelectView.__super__.render.call(this);\n this.$el.empty();\n html = this.template(this.model.attributes);\n this.$el.html(html);\n return this;\n };\n\n SelectView.prototype.change_input = function() {\n var value;\n value = this.$('select').val();\n logger.debug(\"selectbox: value = \" + value);\n this.model.value = value;\n return SelectView.__super__.change_input.call(this);\n };\n\n return SelectView;\n\n})(InputWidget.View);\n\nSelect = (function(superClass) {\n extend(Select, superClass);\n\n function Select() {\n return Select.__super__.constructor.apply(this, arguments);\n }\n\n Select.prototype.type = \"Select\";\n\n Select.prototype.default_view = SelectView;\n\n Select.define({\n value: [p.String, ''],\n options: [p.Any, []]\n });\n\n return Select;\n\n})(InputWidget.Model);\n\nmodule.exports = {\n Model: Select,\n View: SelectView\n};\n","module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [];\n var __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n };\n var __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n };\n var __safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n var __escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n (function() {\n (function() {\n var i, len, option, ref;\n \n __out.push('<label for=\"');\n \n __out.push(__sanitize(this.id));\n \n __out.push('\"> ');\n \n __out.push(__sanitize(this.title));\n \n __out.push(' </label>\\n<select class=\"bk-widget-form-input\" id=\"');\n \n __out.push(__sanitize(this.id));\n \n __out.push('\" name=\"');\n \n __out.push(__sanitize(this.name));\n \n __out.push('\">\\n ');\n \n ref = this.options;\n for (i = 0, len = ref.length; i < len; i++) {\n option = ref[i];\n __out.push('\\n ');\n if (typeof option === \"string\") {\n __out.push('\\n <option ');\n __out.push(__sanitize(option === this.value ? __out.push('selected=\"selected\"') : void 0));\n __out.push(' value=\"');\n __out.push(__sanitize(option));\n __out.push('\">');\n __out.push(__sanitize(option));\n __out.push('</option>\\n ');\n } else {\n __out.push('\\n <option ');\n __out.push(__sanitize(option[0] === this.value ? __out.push('selected=\"selected\"') : void 0));\n __out.push(' value=\"');\n __out.push(__sanitize(option[0]));\n __out.push('\">');\n __out.push(__sanitize(option[1]));\n __out.push('</option>\\n ');\n }\n __out.push('\\n ');\n }\n \n __out.push('\\n</select>\\n');\n \n }).call(this);\n \n }).call(__obj);\n return __out.join('');\n};","var $2, InputWidget, Slider, SliderView, Widget, _, logger, p, slidertemplate,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$2 = require(\"jquery-ui/slider\");\n\nlogger = require(\"../../core/logging\").logger;\n\np = require(\"../../core/properties\");\n\nInputWidget = require(\"./input_widget\");\n\nWidget = require(\"./widget\");\n\nslidertemplate = require(\"./slidertemplate\");\n\nSliderView = (function(superClass) {\n extend(SliderView, superClass);\n\n function SliderView() {\n this.slide = bind(this.slide, this);\n this.slidestop = bind(this.slidestop, this);\n return SliderView.__super__.constructor.apply(this, arguments);\n }\n\n SliderView.prototype.tagName = \"div\";\n\n SliderView.prototype.template = slidertemplate;\n\n SliderView.prototype.initialize = function(options) {\n var html;\n SliderView.__super__.initialize.call(this, options);\n this.listenTo(this.model, 'change', this.render);\n this.$el.empty();\n html = this.template(this.model.attributes);\n this.$el.html(html);\n this.callbackWrapper = null;\n if (this.mget('callback_policy') === 'continuous') {\n this.callbackWrapper = function() {\n var ref;\n return (ref = this.mget('callback')) != null ? ref.execute(this.model) : void 0;\n };\n }\n if (this.mget('callback_policy') === 'throttle' && this.mget('callback')) {\n this.callbackWrapper = _.throttle(function() {\n var ref;\n return (ref = this.mget('callback')) != null ? ref.execute(this.model) : void 0;\n }, this.mget('callback_throttle'));\n }\n return this.render();\n };\n\n SliderView.prototype.render = function() {\n var max, min, opts, step;\n SliderView.__super__.render.call(this);\n max = this.mget('end');\n min = this.mget('start');\n step = this.mget('step') || ((max - min) / 50);\n logger.debug(\"slider render: min, max, step = (\" + min + \", \" + max + \", \" + step + \")\");\n opts = {\n orientation: this.mget('orientation'),\n animate: \"fast\",\n value: this.mget('value'),\n min: min,\n max: max,\n step: step,\n stop: this.slidestop,\n slide: this.slide\n };\n this.$el.find('.slider').slider(opts);\n this.$(\"#\" + (this.mget('id'))).val(this.$('.slider').slider('value'));\n this.$el.find('.bk-slider-parent').height(this.mget('height'));\n return this;\n };\n\n SliderView.prototype.slidestop = function(event, ui) {\n var ref;\n if (this.mget('callback_policy') === 'mouseup' || this.mget('callback_policy') === 'throttle') {\n return (ref = this.mget('callback')) != null ? ref.execute(this.model) : void 0;\n }\n };\n\n SliderView.prototype.slide = function(event, ui) {\n var value;\n value = ui.value;\n logger.debug(\"slide value = \" + value);\n this.$(\"#\" + (this.mget('id'))).val(ui.value);\n this.mset('value', value);\n if (this.callbackWrapper) {\n return this.callbackWrapper();\n }\n };\n\n return SliderView;\n\n})(InputWidget.View);\n\nSlider = (function(superClass) {\n extend(Slider, superClass);\n\n function Slider() {\n return Slider.__super__.constructor.apply(this, arguments);\n }\n\n Slider.prototype.type = \"Slider\";\n\n Slider.prototype.default_view = SliderView;\n\n Slider.define({\n value: [p.Number, 0.5],\n start: [p.Number, 0],\n end: [p.Number, 1],\n step: [p.Number, 0.1],\n orientation: [p.Orientation, \"horizontal\"],\n callback_throttle: [p.Number, 200],\n callback_policy: [p.String, \"throttle\"]\n });\n\n return Slider;\n\n})(InputWidget.Model);\n\nmodule.exports = {\n Model: Slider,\n View: SliderView\n};\n","module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [];\n var __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n };\n var __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n };\n var __safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n var __escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n (function() {\n (function() {\n __out.push('<div class=\"bk-slider-parent\">\\n <label for=\"');\n \n __out.push(__sanitize(this.id));\n \n __out.push('\"> ');\n \n __out.push(__sanitize(this.title));\n \n __out.push(': </label><input type=\"text\" id=\"');\n \n __out.push(__sanitize(this.id));\n \n __out.push('\" readonly>\\n <div class=\"bk-slider-');\n \n __out.push(__sanitize(this.orientation));\n \n __out.push('\">\\n <div class=\"slider \" id=\"');\n \n __out.push(__sanitize(this.id));\n \n __out.push('\">\\n </div>\\n </div>\\n</div>\\n');\n \n }).call(this);\n \n }).call(__obj);\n return __out.join('');\n};","var CellEditors, CellFormatters, Model, TableColumn, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\nCellEditors = require(\"./cell_editors\");\n\nCellFormatters = require(\"./cell_formatters\");\n\np = require(\"../../core/properties\");\n\nModel = require(\"../../model\");\n\nTableColumn = (function(superClass) {\n extend(TableColumn, superClass);\n\n function TableColumn() {\n return TableColumn.__super__.constructor.apply(this, arguments);\n }\n\n TableColumn.prototype.type = 'TableColumn';\n\n TableColumn.prototype.default_view = null;\n\n TableColumn.define({\n field: [p.String],\n title: [p.String],\n width: [p.Number, 300],\n formatter: [\n p.Instance, function() {\n return new CellFormatters.String.Model();\n }\n ],\n editor: [\n p.Instance, function() {\n return new CellEditors.String.Model();\n }\n ],\n sortable: [p.Bool, true],\n default_sort: [p.String, \"ascending\"]\n });\n\n TableColumn.prototype.toColumn = function() {\n var ref;\n return {\n id: _.uniqueId(),\n field: this.get(\"field\"),\n name: this.get(\"title\"),\n width: this.get(\"width\"),\n formatter: (ref = this.get(\"formatter\")) != null ? ref.doFormat.bind(this.get(\"formatter\")) : void 0,\n editor: this.get(\"editor\"),\n sortable: this.get(\"sortable\"),\n defaultSortAsc: this.get(\"default_sort\") === \"ascending\"\n };\n };\n\n return TableColumn;\n\n})(Model);\n\nmodule.exports = {\n Model: TableColumn\n};\n","var TableWidget, Widget, _, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\nWidget = require(\"./widget\");\n\np = require(\"../../core/properties\");\n\nTableWidget = (function(superClass) {\n extend(TableWidget, superClass);\n\n function TableWidget() {\n return TableWidget.__super__.constructor.apply(this, arguments);\n }\n\n TableWidget.prototype.type = \"TableWidget\";\n\n TableWidget.define({\n source: [p.Instance]\n });\n\n return TableWidget;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: TableWidget\n};\n","var $, $1, Tabs, TabsView, Widget, _, p, tabs_template,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\n$1 = require(\"bootstrap/tab\");\n\np = require(\"../../core/properties\");\n\ntabs_template = require(\"./tabs_template\");\n\nWidget = require(\"./widget\");\n\nTabsView = (function(superClass) {\n extend(TabsView, superClass);\n\n function TabsView() {\n return TabsView.__super__.constructor.apply(this, arguments);\n }\n\n TabsView.prototype.render = function() {\n var $panels, active, child, children, html, j, key, len, panel, ref, ref1, ref2, tabs, that, val;\n TabsView.__super__.render.call(this);\n ref = this.child_views;\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n val = ref[key];\n val.$el.detach();\n }\n this.$el.empty();\n tabs = this.mget('tabs');\n active = this.mget('active');\n children = this.mget('children');\n html = $(tabs_template({\n tabs: tabs,\n active: function(i) {\n if (i === active) {\n return 'bk-bs-active';\n } else {\n return '';\n }\n }\n }));\n that = this;\n html.find(\"> li > a\").click(function(event) {\n var panelId, panelIdx, ref1;\n event.preventDefault();\n $(this).tab('show');\n panelId = $(this).attr('href').replace('#tab-', '');\n tabs = that.model.get('tabs');\n panelIdx = _.indexOf(tabs, _.find(tabs, function(panel) {\n return panel.id === panelId;\n }));\n that.model.set('active', panelIdx);\n return (ref1 = that.model.get('callback')) != null ? ref1.execute(that.model) : void 0;\n });\n $panels = html.children(\".bk-bs-tab-pane\");\n ref1 = _.zip(children, $panels);\n for (j = 0, len = ref1.length; j < len; j++) {\n ref2 = ref1[j], child = ref2[0], panel = ref2[1];\n $(panel).html(this.child_views[child.id].$el);\n }\n this.$el.append(html);\n this.$el.tabs;\n return this;\n };\n\n return TabsView;\n\n})(Widget.View);\n\nTabs = (function(superClass) {\n extend(Tabs, superClass);\n\n function Tabs() {\n return Tabs.__super__.constructor.apply(this, arguments);\n }\n\n Tabs.prototype.type = \"Tabs\";\n\n Tabs.prototype.default_view = TabsView;\n\n Tabs.prototype.initialize = function(options) {\n var tab;\n Tabs.__super__.initialize.call(this, options);\n return this.children = (function() {\n var j, len, ref, results;\n ref = this.tabs;\n results = [];\n for (j = 0, len = ref.length; j < len; j++) {\n tab = ref[j];\n results.push(tab.get(\"child\"));\n }\n return results;\n }).call(this);\n };\n\n Tabs.define({\n tabs: [p.Array, []],\n active: [p.Number, 0],\n callback: [p.Instance]\n });\n\n Tabs.internal({\n children: [p.Array, []]\n });\n\n Tabs.prototype.get_layoutable_children = function() {\n return this.get('children');\n };\n\n Tabs.prototype.get_edit_variables = function() {\n var child, edit_variables, j, len, ref;\n edit_variables = Tabs.__super__.get_edit_variables.call(this);\n ref = this.get_layoutable_children();\n for (j = 0, len = ref.length; j < len; j++) {\n child = ref[j];\n edit_variables = edit_variables.concat(child.get_edit_variables());\n }\n return edit_variables;\n };\n\n Tabs.prototype.get_constraints = function() {\n var child, constraints, j, len, ref;\n constraints = Tabs.__super__.get_constraints.call(this);\n ref = this.get_layoutable_children();\n for (j = 0, len = ref.length; j < len; j++) {\n child = ref[j];\n constraints = constraints.concat(child.get_constraints());\n }\n return constraints;\n };\n\n return Tabs;\n\n})(Widget.Model);\n\nmodule.exports = {\n Model: Tabs,\n View: TabsView\n};\n","module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [];\n var __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n };\n var __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n };\n var __safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n var __escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n (function() {\n (function() {\n var i, j, k, len, len1, ref, ref1, tab;\n \n __out.push('<ul class=\"bk-bs-nav bk-bs-nav-tabs\">\\n ');\n \n ref = this.tabs;\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n tab = ref[i];\n __out.push('\\n <li class=\"');\n __out.push(__sanitize(this.active(i)));\n __out.push('\">\\n <a href=\"#tab-');\n __out.push(__sanitize(tab.get('id')));\n __out.push('\">');\n __out.push(__sanitize(tab.get('title')));\n __out.push('</a>\\n </li>\\n ');\n }\n \n __out.push('\\n</ul>\\n<div class=\"bk-bs-tab-content\">\\n ');\n \n ref1 = this.tabs;\n for (i = k = 0, len1 = ref1.length; k < len1; i = ++k) {\n tab = ref1[i];\n __out.push('\\n <div class=\"bk-bs-tab-pane ');\n __out.push(__sanitize(this.active(i)));\n __out.push('\" id=\"tab-');\n __out.push(__sanitize(tab.get('id')));\n __out.push('\"></div>\\n ');\n }\n \n __out.push('\\n</div>\\n');\n \n }).call(this);\n \n }).call(__obj);\n return __out.join('');\n};","var InputWidget, TextInput, TextInputView, _, build_views, logger, p, template,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n_ = require(\"underscore\");\n\nbuild_views = require(\"../../common/build_views\");\n\nlogger = require(\"../../core/logging\").logger;\n\np = require(\"../../core/properties\");\n\nInputWidget = require(\"./input_widget\");\n\ntemplate = require(\"./text_input_template\");\n\nTextInputView = (function(superClass) {\n extend(TextInputView, superClass);\n\n function TextInputView() {\n return TextInputView.__super__.constructor.apply(this, arguments);\n }\n\n TextInputView.prototype.tagName = \"div\";\n\n TextInputView.prototype.attributes = {\n \"class\": \"bk-widget-form-group\"\n };\n\n TextInputView.prototype.template = template;\n\n TextInputView.prototype.events = {\n \"change input\": \"change_input\"\n };\n\n TextInputView.prototype.initialize = function(options) {\n TextInputView.__super__.initialize.call(this, options);\n this.render();\n return this.listenTo(this.model, 'change', this.render);\n };\n\n TextInputView.prototype.render = function() {\n TextInputView.__super__.render.call(this);\n this.$el.html(this.template(this.model.attributes));\n if (this.model.height) {\n this.$el.find('input').height(this.mget('height') - 35);\n }\n return this;\n };\n\n TextInputView.prototype.change_input = function() {\n var value;\n value = this.$('input').val();\n logger.debug(\"widget/text_input: value = \" + value);\n this.model.value = value;\n return TextInputView.__super__.change_input.call(this);\n };\n\n return TextInputView;\n\n})(InputWidget.View);\n\nTextInput = (function(superClass) {\n extend(TextInput, superClass);\n\n function TextInput() {\n return TextInput.__super__.constructor.apply(this, arguments);\n }\n\n TextInput.prototype.type = \"TextInput\";\n\n TextInput.prototype.default_view = TextInputView;\n\n TextInput.define({\n value: [p.String, \"\"]\n });\n\n return TextInput;\n\n})(InputWidget.Model);\n\nmodule.exports = {\n Model: TextInput,\n View: TextInputView\n};\n","module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [];\n var __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n };\n var __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n };\n var __safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n var __escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n (function() {\n (function() {\n __out.push('<label for=\"');\n \n __out.push(__sanitize(this.id));\n \n __out.push('\"> ');\n \n __out.push(__sanitize(this.title));\n \n __out.push(' </label>\\n<input class=\"bk-widget-form-input\" type=\"text\" id=\"');\n \n __out.push(__sanitize(this.id));\n \n __out.push('\" name=\"');\n \n __out.push(__sanitize(this.name));\n \n __out.push('\" value=\"');\n \n __out.push(__sanitize(this.value));\n \n __out.push('\"/>\\n');\n \n }).call(this);\n \n }).call(__obj);\n return __out.join('');\n};","var AbstractButton, Toggle, ToggleView, p,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\np = require(\"../../core/properties\");\n\nAbstractButton = require(\"./abstract_button\");\n\nToggleView = (function(superClass) {\n extend(ToggleView, superClass);\n\n function ToggleView() {\n return ToggleView.__super__.constructor.apply(this, arguments);\n }\n\n ToggleView.prototype.render = function() {\n ToggleView.__super__.render.call(this);\n if (this.mget(\"active\")) {\n this.$el.find('button').addClass(\"bk-bs-active\");\n } else {\n this.$el.find('button').removeClass(\"bk-bs-active\");\n }\n return this;\n };\n\n ToggleView.prototype.change_input = function() {\n ToggleView.__super__.change_input.call(this);\n return this.mset('active', !this.mget('active'));\n };\n\n return ToggleView;\n\n})(AbstractButton.View);\n\nToggle = (function(superClass) {\n extend(Toggle, superClass);\n\n function Toggle() {\n return Toggle.__super__.constructor.apply(this, arguments);\n }\n\n Toggle.prototype.type = \"Toggle\";\n\n Toggle.prototype.default_view = ToggleView;\n\n Toggle.define({\n active: [p.Bool, false]\n });\n\n Toggle.override({\n label: \"Toggle\"\n });\n\n return Toggle;\n\n})(AbstractButton.Model);\n\nmodule.exports = {\n Model: Toggle,\n View: ToggleView\n};\n","var LayoutDOM, Widget, WidgetView,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\nLayoutDOM = require(\"../layouts/layout_dom\");\n\nWidgetView = (function(superClass) {\n extend(WidgetView, superClass);\n\n function WidgetView() {\n return WidgetView.__super__.constructor.apply(this, arguments);\n }\n\n WidgetView.prototype.className = \"bk-widget\";\n\n WidgetView.prototype.render = function() {\n if (this.model.height) {\n this.$el.height(this.model.height);\n }\n if (this.model.width) {\n return this.$el.width(this.model.width);\n }\n };\n\n return WidgetView;\n\n})(LayoutDOM.View);\n\nWidget = (function(superClass) {\n extend(Widget, superClass);\n\n function Widget() {\n return Widget.__super__.constructor.apply(this, arguments);\n }\n\n Widget.prototype.type = \"Widget\";\n\n Widget.prototype.default_view = WidgetView;\n\n return Widget;\n\n})(LayoutDOM.Model);\n\nmodule.exports = {\n Model: Widget,\n View: WidgetView\n};\n","var $, _, waitForElement;\n\n_ = require(\"underscore\");\n\n$ = require(\"jquery\");\n\nwaitForElement = function(el, fn) {\n var handler, interval;\n handler = (function(_this) {\n return function() {\n if ($.contains(document.documentElement, el)) {\n clearInterval(interval);\n return fn();\n }\n };\n })(this);\n return interval = setInterval(handler, 50);\n};\n\nmodule.exports = {\n waitForElement: waitForElement\n};\n","var jQuery = require('jquery');\nrequire('./core');\nrequire('./widget');\nrequire('./position');\nrequire('./menu');\n\n/*!\n * jQuery UI Autocomplete 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/autocomplete/\n *\n * Depends:\n *\tjquery.ui.core.js\n *\tjquery.ui.widget.js\n *\tjquery.ui.position.js\n *\tjquery.ui.menu.js\n */\n(function( $, undefined ) {\n\n$.widget( \"ui.autocomplete\", {\n\tversion: \"1.10.4\",\n\tdefaultElement: \"<input>\",\n\toptions: {\n\t\tappendTo: null,\n\t\tautoFocus: false,\n\t\tdelay: 300,\n\t\tminLength: 1,\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"none\"\n\t\t},\n\t\tsource: null,\n\n\t\t// callbacks\n\t\tchange: null,\n\t\tclose: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresponse: null,\n\t\tsearch: null,\n\t\tselect: null\n\t},\n\n\trequestIndex: 0,\n\tpending: 0,\n\n\t_create: function() {\n\t\t// Some browsers only repeat keydown events, not keypress events,\n\t\t// so we use the suppressKeyPress flag to determine if we've already\n\t\t// handled the keydown event. #7269\n\t\t// Unfortunately the code for & in keypress is the same as the up arrow,\n\t\t// so we use the suppressKeyPressRepeat flag to avoid handling keypress\n\t\t// events when we know the keydown event was used to modify the\n\t\t// search term. #7799\n\t\tvar suppressKeyPress, suppressKeyPressRepeat, suppressInput,\n\t\t\tnodeName = this.element[0].nodeName.toLowerCase(),\n\t\t\tisTextarea = nodeName === \"textarea\",\n\t\t\tisInput = nodeName === \"input\";\n\n\t\tthis.isMultiLine =\n\t\t\t// Textareas are always multi-line\n\t\t\tisTextarea ? true :\n\t\t\t// Inputs are always single-line, even if inside a contentEditable element\n\t\t\t// IE also treats inputs as contentEditable\n\t\t\tisInput ? false :\n\t\t\t// All other element types are determined by whether or not they're contentEditable\n\t\t\tthis.element.prop( \"isContentEditable\" );\n\n\t\tthis.valueMethod = this.element[ isTextarea || isInput ? \"val\" : \"text\" ];\n\t\tthis.isNewMenu = true;\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-autocomplete-input\" )\n\t\t\t.attr( \"autocomplete\", \"off\" );\n\n\t\tthis._on( this.element, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\tif ( this.element.prop( \"readOnly\" ) ) {\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tsuppressInput = true;\n\t\t\t\t\tsuppressKeyPressRepeat = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsuppressKeyPress = false;\n\t\t\t\tsuppressInput = false;\n\t\t\t\tsuppressKeyPressRepeat = false;\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ENTER:\n\t\t\t\tcase keyCode.NUMPAD_ENTER:\n\t\t\t\t\t// when menu is open and has focus\n\t\t\t\t\tif ( this.menu.active ) {\n\t\t\t\t\t\t// #6055 - Opera still allows the keypress to occur\n\t\t\t\t\t\t// which causes forms to submit\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.TAB:\n\t\t\t\t\tif ( this.menu.active ) {\n\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ESCAPE:\n\t\t\t\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\tthis._value( this.term );\n\t\t\t\t\t\tthis.close( event );\n\t\t\t\t\t\t// Different browsers have different default behavior for escape\n\t\t\t\t\t\t// Single press can mean undo or clear\n\t\t\t\t\t\t// Double press in IE means clear the whole form\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsuppressKeyPressRepeat = true;\n\t\t\t\t\t// search timeout should be triggered before the input value is changed\n\t\t\t\t\tthis._searchTimeout( event );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tkeypress: function( event ) {\n\t\t\t\tif ( suppressKeyPress ) {\n\t\t\t\t\tsuppressKeyPress = false;\n\t\t\t\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( suppressKeyPressRepeat ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// replicate some key handlers to allow them to repeat in Firefox and Opera\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tinput: function( event ) {\n\t\t\t\tif ( suppressInput ) {\n\t\t\t\t\tsuppressInput = false;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._searchTimeout( event );\n\t\t\t},\n\t\t\tfocus: function() {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.previous = this._value();\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tif ( this.cancelBlur ) {\n\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclearTimeout( this.searching );\n\t\t\t\tthis.close( event );\n\t\t\t\tthis._change( event );\n\t\t\t}\n\t\t});\n\n\t\tthis._initSource();\n\t\tthis.menu = $( \"<ul>\" )\n\t\t\t.addClass( \"ui-autocomplete ui-front\" )\n\t\t\t.appendTo( this._appendTo() )\n\t\t\t.menu({\n\t\t\t\t// disable ARIA support, the live region takes care of that\n\t\t\t\trole: null\n\t\t\t})\n\t\t\t.hide()\n\t\t\t.data( \"ui-menu\" );\n\n\t\tthis._on( this.menu.element, {\n\t\t\tmousedown: function( event ) {\n\t\t\t\t// prevent moving focus out of the text field\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// IE doesn't prevent moving focus even with event.preventDefault()\n\t\t\t\t// so we set a flag to know when we should ignore the blur event\n\t\t\t\tthis.cancelBlur = true;\n\t\t\t\tthis._delay(function() {\n\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t});\n\n\t\t\t\t// clicking on the scrollbar causes focus to shift to the body\n\t\t\t\t// but we can't detect a mouseup or a click immediately afterward\n\t\t\t\t// so we have to track the next mousedown and close the menu if\n\t\t\t\t// the user clicks somewhere outside of the autocomplete\n\t\t\t\tvar menuElement = this.menu.element[ 0 ];\n\t\t\t\tif ( !$( event.target ).closest( \".ui-menu-item\" ).length ) {\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tvar that = this;\n\t\t\t\t\t\tthis.document.one( \"mousedown\", function( event ) {\n\t\t\t\t\t\t\tif ( event.target !== that.element[ 0 ] &&\n\t\t\t\t\t\t\t\t\tevent.target !== menuElement &&\n\t\t\t\t\t\t\t\t\t!$.contains( menuElement, event.target ) ) {\n\t\t\t\t\t\t\t\tthat.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\tmenufocus: function( event, ui ) {\n\t\t\t\t// support: Firefox\n\t\t\t\t// Prevent accidental activation of menu items in Firefox (#7024 #9118)\n\t\t\t\tif ( this.isNewMenu ) {\n\t\t\t\t\tthis.isNewMenu = false;\n\t\t\t\t\tif ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\tthis.menu.blur();\n\n\t\t\t\t\t\tthis.document.one( \"mousemove\", function() {\n\t\t\t\t\t\t\t$( event.target ).trigger( event.originalEvent );\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar item = ui.item.data( \"ui-autocomplete-item\" );\n\t\t\t\tif ( false !== this._trigger( \"focus\", event, { item: item } ) ) {\n\t\t\t\t\t// use value to match what will end up in the input, if it was a key event\n\t\t\t\t\tif ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\tthis._value( item.value );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Normally the input is populated with the item's value as the\n\t\t\t\t\t// menu is navigated, causing screen readers to notice a change and\n\t\t\t\t\t// announce the item. Since the focus event was canceled, this doesn't\n\t\t\t\t\t// happen, so we update the live region so that screen readers can\n\t\t\t\t\t// still notice the change and announce it.\n\t\t\t\t\tthis.liveRegion.text( item.value );\n\t\t\t\t}\n\t\t\t},\n\t\t\tmenuselect: function( event, ui ) {\n\t\t\t\tvar item = ui.item.data( \"ui-autocomplete-item\" ),\n\t\t\t\t\tprevious = this.previous;\n\n\t\t\t\t// only trigger when focus was lost (click on menu)\n\t\t\t\tif ( this.element[0] !== this.document[0].activeElement ) {\n\t\t\t\t\tthis.element.focus();\n\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t// #6109 - IE triggers two focus events and the second\n\t\t\t\t\t// is asynchronous, so we need to reset the previous\n\t\t\t\t\t// term synchronously and asynchronously :-(\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t\tthis.selectedItem = item;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif ( false !== this._trigger( \"select\", event, { item: item } ) ) {\n\t\t\t\t\tthis._value( item.value );\n\t\t\t\t}\n\t\t\t\t// reset the term after the select event\n\t\t\t\t// this allows custom select handling to work properly\n\t\t\t\tthis.term = this._value();\n\n\t\t\t\tthis.close( event );\n\t\t\t\tthis.selectedItem = item;\n\t\t\t}\n\t\t});\n\n\t\tthis.liveRegion = $( \"<span>\", {\n\t\t\t\trole: \"status\",\n\t\t\t\t\"aria-live\": \"polite\"\n\t\t\t})\n\t\t\t.addClass( \"ui-helper-hidden-accessible\" )\n\t\t\t.insertBefore( this.element );\n\n\t\t// turning off autocomplete prevents the browser from remembering the\n\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\tthis._on( this.window, {\n\t\t\tbeforeunload: function() {\n\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_destroy: function() {\n\t\tclearTimeout( this.searching );\n\t\tthis.element\n\t\t\t.removeClass( \"ui-autocomplete-input\" )\n\t\t\t.removeAttr( \"autocomplete\" );\n\t\tthis.menu.element.remove();\n\t\tthis.liveRegion.remove();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"source\" ) {\n\t\t\tthis._initSource();\n\t\t}\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.menu.element.appendTo( this._appendTo() );\n\t\t}\n\t\tif ( key === \"disabled\" && value && this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\n\t\tif ( element ) {\n\t\t\telement = element.jquery || element.nodeType ?\n\t\t\t\t$( element ) :\n\t\t\t\tthis.document.find( element ).eq( 0 );\n\t\t}\n\n\t\tif ( !element ) {\n\t\t\telement = this.element.closest( \".ui-front\" );\n\t\t}\n\n\t\tif ( !element.length ) {\n\t\t\telement = this.document[0].body;\n\t\t}\n\n\t\treturn element;\n\t},\n\n\t_initSource: function() {\n\t\tvar array, url,\n\t\t\tthat = this;\n\t\tif ( $.isArray(this.options.source) ) {\n\t\t\tarray = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tresponse( $.ui.autocomplete.filter( array, request.term ) );\n\t\t\t};\n\t\t} else if ( typeof this.options.source === \"string\" ) {\n\t\t\turl = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tif ( that.xhr ) {\n\t\t\t\t\tthat.xhr.abort();\n\t\t\t\t}\n\t\t\t\tthat.xhr = $.ajax({\n\t\t\t\t\turl: url,\n\t\t\t\t\tdata: request,\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t\tresponse( data );\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\tresponse( [] );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t} else {\n\t\t\tthis.source = this.options.source;\n\t\t}\n\t},\n\n\t_searchTimeout: function( event ) {\n\t\tclearTimeout( this.searching );\n\t\tthis.searching = this._delay(function() {\n\t\t\t// only search if the value has changed\n\t\t\tif ( this.term !== this._value() ) {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.search( null, event );\n\t\t\t}\n\t\t}, this.options.delay );\n\t},\n\n\tsearch: function( value, event ) {\n\t\tvalue = value != null ? value : this._value();\n\n\t\t// always save the actual value, not the one passed as an argument\n\t\tthis.term = this._value();\n\n\t\tif ( value.length < this.options.minLength ) {\n\t\t\treturn this.close( event );\n\t\t}\n\n\t\tif ( this._trigger( \"search\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._search( value );\n\t},\n\n\t_search: function( value ) {\n\t\tthis.pending++;\n\t\tthis.element.addClass( \"ui-autocomplete-loading\" );\n\t\tthis.cancelSearch = false;\n\n\t\tthis.source( { term: value }, this._response() );\n\t},\n\n\t_response: function() {\n\t\tvar index = ++this.requestIndex;\n\n\t\treturn $.proxy(function( content ) {\n\t\t\tif ( index === this.requestIndex ) {\n\t\t\t\tthis.__response( content );\n\t\t\t}\n\n\t\t\tthis.pending--;\n\t\t\tif ( !this.pending ) {\n\t\t\t\tthis.element.removeClass( \"ui-autocomplete-loading\" );\n\t\t\t}\n\t\t}, this );\n\t},\n\n\t__response: function( content ) {\n\t\tif ( content ) {\n\t\t\tcontent = this._normalize( content );\n\t\t}\n\t\tthis._trigger( \"response\", null, { content: content } );\n\t\tif ( !this.options.disabled && content && content.length && !this.cancelSearch ) {\n\t\t\tthis._suggest( content );\n\t\t\tthis._trigger( \"open\" );\n\t\t} else {\n\t\t\t// use ._close() instead of .close() so we don't cancel future searches\n\t\t\tthis._close();\n\t\t}\n\t},\n\n\tclose: function( event ) {\n\t\tthis.cancelSearch = true;\n\t\tthis._close( event );\n\t},\n\n\t_close: function( event ) {\n\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis.menu.element.hide();\n\t\t\tthis.menu.blur();\n\t\t\tthis.isNewMenu = true;\n\t\t\tthis._trigger( \"close\", event );\n\t\t}\n\t},\n\n\t_change: function( event ) {\n\t\tif ( this.previous !== this._value() ) {\n\t\t\tthis._trigger( \"change\", event, { item: this.selectedItem } );\n\t\t}\n\t},\n\n\t_normalize: function( items ) {\n\t\t// assume all items have the right format when the first item is complete\n\t\tif ( items.length && items[0].label && items[0].value ) {\n\t\t\treturn items;\n\t\t}\n\t\treturn $.map( items, function( item ) {\n\t\t\tif ( typeof item === \"string\" ) {\n\t\t\t\treturn {\n\t\t\t\t\tlabel: item,\n\t\t\t\t\tvalue: item\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn $.extend({\n\t\t\t\tlabel: item.label || item.value,\n\t\t\t\tvalue: item.value || item.label\n\t\t\t}, item );\n\t\t});\n\t},\n\n\t_suggest: function( items ) {\n\t\tvar ul = this.menu.element.empty();\n\t\tthis._renderMenu( ul, items );\n\t\tthis.isNewMenu = true;\n\t\tthis.menu.refresh();\n\n\t\t// size and position menu\n\t\tul.show();\n\t\tthis._resizeMenu();\n\t\tul.position( $.extend({\n\t\t\tof: this.element\n\t\t}, this.options.position ));\n\n\t\tif ( this.options.autoFocus ) {\n\t\t\tthis.menu.next();\n\t\t}\n\t},\n\n\t_resizeMenu: function() {\n\t\tvar ul = this.menu.element;\n\t\tul.outerWidth( Math.max(\n\t\t\t// Firefox wraps long text (possibly a rounding bug)\n\t\t\t// so we add 1px to avoid the wrapping (#7513)\n\t\t\tul.width( \"\" ).outerWidth() + 1,\n\t\t\tthis.element.outerWidth()\n\t\t) );\n\t},\n\n\t_renderMenu: function( ul, items ) {\n\t\tvar that = this;\n\t\t$.each( items, function( index, item ) {\n\t\t\tthat._renderItemData( ul, item );\n\t\t});\n\t},\n\n\t_renderItemData: function( ul, item ) {\n\t\treturn this._renderItem( ul, item ).data( \"ui-autocomplete-item\", item );\n\t},\n\n\t_renderItem: function( ul, item ) {\n\t\treturn $( \"<li>\" )\n\t\t\t.append( $( \"<a>\" ).text( item.label ) )\n\t\t\t.appendTo( ul );\n\t},\n\n\t_move: function( direction, event ) {\n\t\tif ( !this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis.search( null, event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.menu.isFirstItem() && /^previous/.test( direction ) ||\n\t\t\t\tthis.menu.isLastItem() && /^next/.test( direction ) ) {\n\t\t\tthis._value( this.term );\n\t\t\tthis.menu.blur();\n\t\t\treturn;\n\t\t}\n\t\tthis.menu[ direction ]( event );\n\t},\n\n\twidget: function() {\n\t\treturn this.menu.element;\n\t},\n\n\t_value: function() {\n\t\treturn this.valueMethod.apply( this.element, arguments );\n\t},\n\n\t_keyEvent: function( keyEvent, event ) {\n\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis._move( keyEvent, event );\n\n\t\t\t// prevents moving cursor to beginning/end of the text field in some browsers\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n});\n\n$.extend( $.ui.autocomplete, {\n\tescapeRegex: function( value ) {\n\t\treturn value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n\t},\n\tfilter: function(array, term) {\n\t\tvar matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), \"i\" );\n\t\treturn $.grep( array, function(value) {\n\t\t\treturn matcher.test( value.label || value.value || value );\n\t\t});\n\t}\n});\n\n\n// live region extension, adding a `messages` option\n// NOTE: This is an experimental API. We are still investigating\n// a full solution for string manipulation and internationalization.\n$.widget( \"ui.autocomplete\", $.ui.autocomplete, {\n\toptions: {\n\t\tmessages: {\n\t\t\tnoResults: \"No search results.\",\n\t\t\tresults: function( amount ) {\n\t\t\t\treturn amount + ( amount > 1 ? \" results are\" : \" result is\" ) +\n\t\t\t\t\t\" available, use up and down arrow keys to navigate.\";\n\t\t\t}\n\t\t}\n\t},\n\n\t__response: function( content ) {\n\t\tvar message;\n\t\tthis._superApply( arguments );\n\t\tif ( this.options.disabled || this.cancelSearch ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( content && content.length ) {\n\t\t\tmessage = this.options.messages.results( content.length );\n\t\t} else {\n\t\t\tmessage = this.options.messages.noResults;\n\t\t}\n\t\tthis.liveRegion.text( message );\n\t}\n});\n\n}( jQuery ));\n","var jQuery = require('jquery');\nrequire('./core');\nrequire('./widget');\n\n/*!\n * jQuery UI Button 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/button/\n *\n * Depends:\n *\tjquery.ui.core.js\n *\tjquery.ui.widget.js\n */\n(function( $, undefined ) {\n\nvar lastActive,\n\tbaseClasses = \"ui-button ui-widget ui-state-default ui-corner-all\",\n\ttypeClasses = \"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",\n\tformResetHandler = function() {\n\t\tvar form = $( this );\n\t\tsetTimeout(function() {\n\t\t\tform.find( \":ui-button\" ).button( \"refresh\" );\n\t\t}, 1 );\n\t},\n\tradioGroup = function( radio ) {\n\t\tvar name = radio.name,\n\t\t\tform = radio.form,\n\t\t\tradios = $( [] );\n\t\tif ( name ) {\n\t\t\tname = name.replace( /'/g, \"\\\\'\" );\n\t\t\tif ( form ) {\n\t\t\t\tradios = $( form ).find( \"[name='\" + name + \"']\" );\n\t\t\t} else {\n\t\t\t\tradios = $( \"[name='\" + name + \"']\", radio.ownerDocument )\n\t\t\t\t\t.filter(function() {\n\t\t\t\t\t\treturn !this.form;\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn radios;\n\t};\n\n$.widget( \"ui.button\", {\n\tversion: \"1.10.4\",\n\tdefaultElement: \"<button>\",\n\toptions: {\n\t\tdisabled: null,\n\t\ttext: true,\n\t\tlabel: null,\n\t\ticons: {\n\t\t\tprimary: null,\n\t\t\tsecondary: null\n\t\t}\n\t},\n\t_create: function() {\n\t\tthis.element.closest( \"form\" )\n\t\t\t.unbind( \"reset\" + this.eventNamespace )\n\t\t\t.bind( \"reset\" + this.eventNamespace, formResetHandler );\n\n\t\tif ( typeof this.options.disabled !== \"boolean\" ) {\n\t\t\tthis.options.disabled = !!this.element.prop( \"disabled\" );\n\t\t} else {\n\t\t\tthis.element.prop( \"disabled\", this.options.disabled );\n\t\t}\n\n\t\tthis._determineButtonType();\n\t\tthis.hasTitle = !!this.buttonElement.attr( \"title\" );\n\n\t\tvar that = this,\n\t\t\toptions = this.options,\n\t\t\ttoggleButton = this.type === \"checkbox\" || this.type === \"radio\",\n\t\t\tactiveClass = !toggleButton ? \"ui-state-active\" : \"\";\n\n\t\tif ( options.label === null ) {\n\t\t\toptions.label = (this.type === \"input\" ? this.buttonElement.val() : this.buttonElement.html());\n\t\t}\n\n\t\tthis._hoverable( this.buttonElement );\n\n\t\tthis.buttonElement\n\t\t\t.addClass( baseClasses )\n\t\t\t.attr( \"role\", \"button\" )\n\t\t\t.bind( \"mouseenter\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( this === lastActive ) {\n\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bind( \"mouseleave\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$( this ).removeClass( activeClass );\n\t\t\t})\n\t\t\t.bind( \"click\" + this.eventNamespace, function( event ) {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t}\n\t\t\t});\n\n\t\t// Can't use _focusable() because the element that receives focus\n\t\t// and the element that gets the ui-state-focus class are different\n\t\tthis._on({\n\t\t\tfocus: function() {\n\t\t\t\tthis.buttonElement.addClass( \"ui-state-focus\" );\n\t\t\t},\n\t\t\tblur: function() {\n\t\t\t\tthis.buttonElement.removeClass( \"ui-state-focus\" );\n\t\t\t}\n\t\t});\n\n\t\tif ( toggleButton ) {\n\t\t\tthis.element.bind( \"change\" + this.eventNamespace, function() {\n\t\t\t\tthat.refresh();\n\t\t\t});\n\t\t}\n\n\t\tif ( this.type === \"checkbox\" ) {\n\t\t\tthis.buttonElement.bind( \"click\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t} else if ( this.type === \"radio\" ) {\n\t\t\tthis.buttonElement.bind( \"click\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\tthat.buttonElement.attr( \"aria-pressed\", \"true\" );\n\n\t\t\t\tvar radio = that.element[ 0 ];\n\t\t\t\tradioGroup( radio )\n\t\t\t\t\t.not( radio )\n\t\t\t\t\t.map(function() {\n\t\t\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t\t\t})\n\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t});\n\t\t} else {\n\t\t\tthis.buttonElement\n\t\t\t\t.bind( \"mousedown\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\tlastActive = this;\n\t\t\t\t\tthat.document.one( \"mouseup\", function() {\n\t\t\t\t\t\tlastActive = null;\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.bind( \"mouseup\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t})\n\t\t\t\t.bind( \"keydown\" + this.eventNamespace, function(event) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {\n\t\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t// see #8559, we bind to blur here in case the button element loses\n\t\t\t\t// focus between keydown and keyup, it would be left in an \"active\" state\n\t\t\t\t.bind( \"keyup\" + this.eventNamespace + \" blur\" + this.eventNamespace, function() {\n\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t});\n\n\t\t\tif ( this.buttonElement.is(\"a\") ) {\n\t\t\t\tthis.buttonElement.keyup(function(event) {\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE ) {\n\t\t\t\t\t\t// TODO pass through original event correctly (just as 2nd argument doesn't work)\n\t\t\t\t\t\t$( this ).click();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// TODO: pull out $.Widget's handling for the disabled option into\n\t\t// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can\n\t\t// be overridden by individual plugins\n\t\tthis._setOption( \"disabled\", options.disabled );\n\t\tthis._resetButton();\n\t},\n\n\t_determineButtonType: function() {\n\t\tvar ancestor, labelSelector, checked;\n\n\t\tif ( this.element.is(\"[type=checkbox]\") ) {\n\t\t\tthis.type = \"checkbox\";\n\t\t} else if ( this.element.is(\"[type=radio]\") ) {\n\t\t\tthis.type = \"radio\";\n\t\t} else if ( this.element.is(\"input\") ) {\n\t\t\tthis.type = \"input\";\n\t\t} else {\n\t\t\tthis.type = \"button\";\n\t\t}\n\n\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t// we don't search against the document in case the element\n\t\t\t// is disconnected from the DOM\n\t\t\tancestor = this.element.parents().last();\n\t\t\tlabelSelector = \"label[for='\" + this.element.attr(\"id\") + \"']\";\n\t\t\tthis.buttonElement = ancestor.find( labelSelector );\n\t\t\tif ( !this.buttonElement.length ) {\n\t\t\t\tancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();\n\t\t\t\tthis.buttonElement = ancestor.filter( labelSelector );\n\t\t\t\tif ( !this.buttonElement.length ) {\n\t\t\t\t\tthis.buttonElement = ancestor.find( labelSelector );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.element.addClass( \"ui-helper-hidden-accessible\" );\n\n\t\t\tchecked = this.element.is( \":checked\" );\n\t\t\tif ( checked ) {\n\t\t\t\tthis.buttonElement.addClass( \"ui-state-active\" );\n\t\t\t}\n\t\t\tthis.buttonElement.prop( \"aria-pressed\", checked );\n\t\t} else {\n\t\t\tthis.buttonElement = this.element;\n\t\t}\n\t},\n\n\twidget: function() {\n\t\treturn this.buttonElement;\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-helper-hidden-accessible\" );\n\t\tthis.buttonElement\n\t\t\t.removeClass( baseClasses + \" ui-state-active \" + typeClasses )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-pressed\" )\n\t\t\t.html( this.buttonElement.find(\".ui-button-text\").html() );\n\n\t\tif ( !this.hasTitle ) {\n\t\t\tthis.buttonElement.removeAttr( \"title\" );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.element.prop( \"disabled\", !!value );\n\t\t\tif ( value ) {\n\t\t\t\tthis.buttonElement.removeClass( \"ui-state-focus\" );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis._resetButton();\n\t},\n\n\trefresh: function() {\n\t\t//See #8237 & #8828\n\t\tvar isDisabled = this.element.is( \"input, button\" ) ? this.element.is( \":disabled\" ) : this.element.hasClass( \"ui-button-disabled\" );\n\n\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\tthis._setOption( \"disabled\", isDisabled );\n\t\t}\n\t\tif ( this.type === \"radio\" ) {\n\t\t\tradioGroup( this.element[0] ).each(function() {\n\t\t\t\tif ( $( this ).is( \":checked\" ) ) {\n\t\t\t\t\t$( this ).button( \"widget\" )\n\t\t\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"true\" );\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).button( \"widget\" )\n\t\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t\t}\n\t\t\t});\n\t\t} else if ( this.type === \"checkbox\" ) {\n\t\t\tif ( this.element.is( \":checked\" ) ) {\n\t\t\t\tthis.buttonElement\n\t\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"true\" );\n\t\t\t} else {\n\t\t\t\tthis.buttonElement\n\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t}\n\t\t}\n\t},\n\n\t_resetButton: function() {\n\t\tif ( this.type === \"input\" ) {\n\t\t\tif ( this.options.label ) {\n\t\t\t\tthis.element.val( this.options.label );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tvar buttonElement = this.buttonElement.removeClass( typeClasses ),\n\t\t\tbuttonText = $( \"<span></span>\", this.document[0] )\n\t\t\t\t.addClass( \"ui-button-text\" )\n\t\t\t\t.html( this.options.label )\n\t\t\t\t.appendTo( buttonElement.empty() )\n\t\t\t\t.text(),\n\t\t\ticons = this.options.icons,\n\t\t\tmultipleIcons = icons.primary && icons.secondary,\n\t\t\tbuttonClasses = [];\n\n\t\tif ( icons.primary || icons.secondary ) {\n\t\t\tif ( this.options.text ) {\n\t\t\t\tbuttonClasses.push( \"ui-button-text-icon\" + ( multipleIcons ? \"s\" : ( icons.primary ? \"-primary\" : \"-secondary\" ) ) );\n\t\t\t}\n\n\t\t\tif ( icons.primary ) {\n\t\t\t\tbuttonElement.prepend( \"<span class='ui-button-icon-primary ui-icon \" + icons.primary + \"'></span>\" );\n\t\t\t}\n\n\t\t\tif ( icons.secondary ) {\n\t\t\t\tbuttonElement.append( \"<span class='ui-button-icon-secondary ui-icon \" + icons.secondary + \"'></span>\" );\n\t\t\t}\n\n\t\t\tif ( !this.options.text ) {\n\t\t\t\tbuttonClasses.push( multipleIcons ? \"ui-button-icons-only\" : \"ui-button-icon-only\" );\n\n\t\t\t\tif ( !this.hasTitle ) {\n\t\t\t\t\tbuttonElement.attr( \"title\", $.trim( buttonText ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tbuttonClasses.push( \"ui-button-text-only\" );\n\t\t}\n\t\tbuttonElement.addClass( buttonClasses.join( \" \" ) );\n\t}\n});\n\n$.widget( \"ui.buttonset\", {\n\tversion: \"1.10.4\",\n\toptions: {\n\t\titems: \"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)\"\n\t},\n\n\t_create: function() {\n\t\tthis.element.addClass( \"ui-buttonset\" );\n\t},\n\n\t_init: function() {\n\t\tthis.refresh();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.buttons.button( \"option\", key, value );\n\t\t}\n\n\t\tthis._super( key, value );\n\t},\n\n\trefresh: function() {\n\t\tvar rtl = this.element.css( \"direction\" ) === \"rtl\";\n\n\t\tthis.buttons = this.element.find( this.options.items )\n\t\t\t.filter( \":ui-button\" )\n\t\t\t\t.button( \"refresh\" )\n\t\t\t.end()\n\t\t\t.not( \":ui-button\" )\n\t\t\t\t.button()\n\t\t\t.end()\n\t\t\t.map(function() {\n\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t})\n\t\t\t\t.removeClass( \"ui-corner-all ui-corner-left ui-corner-right\" )\n\t\t\t\t.filter( \":first\" )\n\t\t\t\t\t.addClass( rtl ? \"ui-corner-right\" : \"ui-corner-left\" )\n\t\t\t\t.end()\n\t\t\t\t.filter( \":last\" )\n\t\t\t\t\t.addClass( rtl ? \"ui-corner-left\" : \"ui-corner-right\" )\n\t\t\t\t.end()\n\t\t\t.end();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element.removeClass( \"ui-buttonset\" );\n\t\tthis.buttons\n\t\t\t.map(function() {\n\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t})\n\t\t\t\t.removeClass( \"ui-corner-left ui-corner-right\" )\n\t\t\t.end()\n\t\t\t.button( \"destroy\" );\n\t}\n});\n\n}( jQuery ) );\n","var jQuery = require('jquery');\n\n/*!\n * jQuery UI Core 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n */\n(function( $, undefined ) {\n\nvar uuid = 0,\n\truniqueId = /^ui-id-\\d+$/;\n\n// $.ui might exist from components with no dependencies, e.g., $.ui.position\n$.ui = $.ui || {};\n\n$.extend( $.ui, {\n\tversion: \"1.10.4\",\n\n\tkeyCode: {\n\t\tBACKSPACE: 8,\n\t\tCOMMA: 188,\n\t\tDELETE: 46,\n\t\tDOWN: 40,\n\t\tEND: 35,\n\t\tENTER: 13,\n\t\tESCAPE: 27,\n\t\tHOME: 36,\n\t\tLEFT: 37,\n\t\tNUMPAD_ADD: 107,\n\t\tNUMPAD_DECIMAL: 110,\n\t\tNUMPAD_DIVIDE: 111,\n\t\tNUMPAD_ENTER: 108,\n\t\tNUMPAD_MULTIPLY: 106,\n\t\tNUMPAD_SUBTRACT: 109,\n\t\tPAGE_DOWN: 34,\n\t\tPAGE_UP: 33,\n\t\tPERIOD: 190,\n\t\tRIGHT: 39,\n\t\tSPACE: 32,\n\t\tTAB: 9,\n\t\tUP: 38\n\t}\n});\n\n// plugins\n$.fn.extend({\n\tfocus: (function( orig ) {\n\t\treturn function( delay, fn ) {\n\t\t\treturn typeof delay === \"number\" ?\n\t\t\t\tthis.each(function() {\n\t\t\t\t\tvar elem = this;\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t$( elem ).focus();\n\t\t\t\t\t\tif ( fn ) {\n\t\t\t\t\t\t\tfn.call( elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}, delay );\n\t\t\t\t}) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t})( $.fn.focus ),\n\n\tscrollParent: function() {\n\t\tvar scrollParent;\n\t\tif (($.ui.ie && (/(static|relative)/).test(this.css(\"position\"))) || (/absolute/).test(this.css(\"position\"))) {\n\t\t\tscrollParent = this.parents().filter(function() {\n\t\t\t\treturn (/(relative|absolute|fixed)/).test($.css(this,\"position\")) && (/(auto|scroll)/).test($.css(this,\"overflow\")+$.css(this,\"overflow-y\")+$.css(this,\"overflow-x\"));\n\t\t\t}).eq(0);\n\t\t} else {\n\t\t\tscrollParent = this.parents().filter(function() {\n\t\t\t\treturn (/(auto|scroll)/).test($.css(this,\"overflow\")+$.css(this,\"overflow-y\")+$.css(this,\"overflow-x\"));\n\t\t\t}).eq(0);\n\t\t}\n\n\t\treturn (/fixed/).test(this.css(\"position\")) || !scrollParent.length ? $(document) : scrollParent;\n\t},\n\n\tzIndex: function( zIndex ) {\n\t\tif ( zIndex !== undefined ) {\n\t\t\treturn this.css( \"zIndex\", zIndex );\n\t\t}\n\n\t\tif ( this.length ) {\n\t\t\tvar elem = $( this[ 0 ] ), position, value;\n\t\t\twhile ( elem.length && elem[ 0 ] !== document ) {\n\t\t\t\t// Ignore z-index if position is set to a value where z-index is ignored by the browser\n\t\t\t\t// This makes behavior of this function consistent across browsers\n\t\t\t\t// WebKit always returns auto if the element is positioned\n\t\t\t\tposition = elem.css( \"position\" );\n\t\t\t\tif ( position === \"absolute\" || position === \"relative\" || position === \"fixed\" ) {\n\t\t\t\t\t// IE returns 0 when zIndex is not specified\n\t\t\t\t\t// other browsers return a string\n\t\t\t\t\t// we ignore the case of nested elements with an explicit value of 0\n\t\t\t\t\t// <div style=\"z-index: -10;\"><div style=\"z-index: 0;\"></div></div>\n\t\t\t\t\tvalue = parseInt( elem.css( \"zIndex\" ), 10 );\n\t\t\t\t\tif ( !isNaN( value ) && value !== 0 ) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telem = elem.parent();\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t},\n\n\tuniqueId: function() {\n\t\treturn this.each(function() {\n\t\t\tif ( !this.id ) {\n\t\t\t\tthis.id = \"ui-id-\" + (++uuid);\n\t\t\t}\n\t\t});\n\t},\n\n\tremoveUniqueId: function() {\n\t\treturn this.each(function() {\n\t\t\tif ( runiqueId.test( this.id ) ) {\n\t\t\t\t$( this ).removeAttr( \"id\" );\n\t\t\t}\n\t\t});\n\t}\n});\n\n// selectors\nfunction focusable( element, isTabIndexNotNaN ) {\n\tvar map, mapName, img,\n\t\tnodeName = element.nodeName.toLowerCase();\n\tif ( \"area\" === nodeName ) {\n\t\tmap = element.parentNode;\n\t\tmapName = map.name;\n\t\tif ( !element.href || !mapName || map.nodeName.toLowerCase() !== \"map\" ) {\n\t\t\treturn false;\n\t\t}\n\t\timg = $( \"img[usemap=#\" + mapName + \"]\" )[0];\n\t\treturn !!img && visible( img );\n\t}\n\treturn ( /input|select|textarea|button|object/.test( nodeName ) ?\n\t\t!element.disabled :\n\t\t\"a\" === nodeName ?\n\t\t\telement.href || isTabIndexNotNaN :\n\t\t\tisTabIndexNotNaN) &&\n\t\t// the element and all of its ancestors must be visible\n\t\tvisible( element );\n}\n\nfunction visible( element ) {\n\treturn $.expr.filters.visible( element ) &&\n\t\t!$( element ).parents().addBack().filter(function() {\n\t\t\treturn $.css( this, \"visibility\" ) === \"hidden\";\n\t\t}).length;\n}\n\n$.extend( $.expr[ \":\" ], {\n\tdata: $.expr.createPseudo ?\n\t\t$.expr.createPseudo(function( dataName ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn !!$.data( elem, dataName );\n\t\t\t};\n\t\t}) :\n\t\t// support: jQuery <1.8\n\t\tfunction( elem, i, match ) {\n\t\t\treturn !!$.data( elem, match[ 3 ] );\n\t\t},\n\n\tfocusable: function( element ) {\n\t\treturn focusable( element, !isNaN( $.attr( element, \"tabindex\" ) ) );\n\t},\n\n\ttabbable: function( element ) {\n\t\tvar tabIndex = $.attr( element, \"tabindex\" ),\n\t\t\tisTabIndexNaN = isNaN( tabIndex );\n\t\treturn ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );\n\t}\n});\n\n// support: jQuery <1.8\nif ( !$( \"<a>\" ).outerWidth( 1 ).jquery ) {\n\t$.each( [ \"Width\", \"Height\" ], function( i, name ) {\n\t\tvar side = name === \"Width\" ? [ \"Left\", \"Right\" ] : [ \"Top\", \"Bottom\" ],\n\t\t\ttype = name.toLowerCase(),\n\t\t\torig = {\n\t\t\t\tinnerWidth: $.fn.innerWidth,\n\t\t\t\tinnerHeight: $.fn.innerHeight,\n\t\t\t\touterWidth: $.fn.outerWidth,\n\t\t\t\touterHeight: $.fn.outerHeight\n\t\t\t};\n\n\t\tfunction reduce( elem, size, border, margin ) {\n\t\t\t$.each( side, function() {\n\t\t\t\tsize -= parseFloat( $.css( elem, \"padding\" + this ) ) || 0;\n\t\t\t\tif ( border ) {\n\t\t\t\t\tsize -= parseFloat( $.css( elem, \"border\" + this + \"Width\" ) ) || 0;\n\t\t\t\t}\n\t\t\t\tif ( margin ) {\n\t\t\t\t\tsize -= parseFloat( $.css( elem, \"margin\" + this ) ) || 0;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn size;\n\t\t}\n\n\t\t$.fn[ \"inner\" + name ] = function( size ) {\n\t\t\tif ( size === undefined ) {\n\t\t\t\treturn orig[ \"inner\" + name ].call( this );\n\t\t\t}\n\n\t\t\treturn this.each(function() {\n\t\t\t\t$( this ).css( type, reduce( this, size ) + \"px\" );\n\t\t\t});\n\t\t};\n\n\t\t$.fn[ \"outer\" + name] = function( size, margin ) {\n\t\t\tif ( typeof size !== \"number\" ) {\n\t\t\t\treturn orig[ \"outer\" + name ].call( this, size );\n\t\t\t}\n\n\t\t\treturn this.each(function() {\n\t\t\t\t$( this).css( type, reduce( this, size, true, margin ) + \"px\" );\n\t\t\t});\n\t\t};\n\t});\n}\n\n// support: jQuery <1.8\nif ( !$.fn.addBack ) {\n\t$.fn.addBack = function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t};\n}\n\n// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)\nif ( $( \"<a>\" ).data( \"a-b\", \"a\" ).removeData( \"a-b\" ).data( \"a-b\" ) ) {\n\t$.fn.removeData = (function( removeData ) {\n\t\treturn function( key ) {\n\t\t\tif ( arguments.length ) {\n\t\t\t\treturn removeData.call( this, $.camelCase( key ) );\n\t\t\t} else {\n\t\t\t\treturn removeData.call( this );\n\t\t\t}\n\t\t};\n\t})( $.fn.removeData );\n}\n\n\n\n\n\n// deprecated\n$.ui.ie = !!/msie [\\w.]+/.exec( navigator.userAgent.toLowerCase() );\n\n$.support.selectstart = \"onselectstart\" in document.createElement( \"div\" );\n$.fn.extend({\n\tdisableSelection: function() {\n\t\treturn this.bind( ( $.support.selectstart ? \"selectstart\" : \"mousedown\" ) +\n\t\t\t\".ui-disableSelection\", function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t});\n\t},\n\n\tenableSelection: function() {\n\t\treturn this.unbind( \".ui-disableSelection\" );\n\t}\n});\n\n$.extend( $.ui, {\n\t// $.ui.plugin is deprecated. Use $.widget() extensions instead.\n\tplugin: {\n\t\tadd: function( module, option, set ) {\n\t\t\tvar i,\n\t\t\t\tproto = $.ui[ module ].prototype;\n\t\t\tfor ( i in set ) {\n\t\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t\t}\n\t\t},\n\t\tcall: function( instance, name, args ) {\n\t\t\tvar i,\n\t\t\t\tset = instance.plugins[ name ];\n\t\t\tif ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// only used by resizable\n\thasScroll: function( el, a ) {\n\n\t\t//If overflow is hidden, the element might have extra content, but the user wants to hide it\n\t\tif ( $( el ).css( \"overflow\" ) === \"hidden\") {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar scroll = ( a && a === \"left\" ) ? \"scrollLeft\" : \"scrollTop\",\n\t\t\thas = false;\n\n\t\tif ( el[ scroll ] > 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: determine which cases actually cause this to happen\n\t\t// if the element doesn't have the scroll set, see if it's possible to\n\t\t// set the scroll\n\t\tel[ scroll ] = 1;\n\t\thas = ( el[ scroll ] > 0 );\n\t\tel[ scroll ] = 0;\n\t\treturn has;\n\t}\n});\n\n})( jQuery );\n","var jQuery = require('jquery');\nrequire('./core');\n\n/*!\n * jQuery UI Datepicker 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/datepicker/\n *\n * Depends:\n *\tjquery.ui.core.js\n */\n(function( $, undefined ) {\n\n$.extend($.ui, { datepicker: { version: \"1.10.4\" } });\n\nvar PROP_NAME = \"datepicker\",\n\tinstActive;\n\n/* Date picker manager.\n Use the singleton instance of this class, $.datepicker, to interact with the date picker.\n Settings for (groups of) date pickers are maintained in an instance object,\n allowing multiple different settings on the same page. */\n\nfunction Datepicker() {\n\tthis._curInst = null; // The current instance in use\n\tthis._keyEvent = false; // If the last event was a key event\n\tthis._disabledInputs = []; // List of date picker inputs that have been disabled\n\tthis._datepickerShowing = false; // True if the popup picker is showing , false if not\n\tthis._inDialog = false; // True if showing within a \"dialog\", false if not\n\tthis._mainDivId = \"ui-datepicker-div\"; // The ID of the main datepicker division\n\tthis._inlineClass = \"ui-datepicker-inline\"; // The name of the inline marker class\n\tthis._appendClass = \"ui-datepicker-append\"; // The name of the append marker class\n\tthis._triggerClass = \"ui-datepicker-trigger\"; // The name of the trigger marker class\n\tthis._dialogClass = \"ui-datepicker-dialog\"; // The name of the dialog marker class\n\tthis._disableClass = \"ui-datepicker-disabled\"; // The name of the disabled covering marker class\n\tthis._unselectableClass = \"ui-datepicker-unselectable\"; // The name of the unselectable cell marker class\n\tthis._currentClass = \"ui-datepicker-current-day\"; // The name of the current day marker class\n\tthis._dayOverClass = \"ui-datepicker-days-cell-over\"; // The name of the day hover marker class\n\tthis.regional = []; // Available regional settings, indexed by language code\n\tthis.regional[\"\"] = { // Default regional settings\n\t\tcloseText: \"Done\", // Display text for close link\n\t\tprevText: \"Prev\", // Display text for previous month link\n\t\tnextText: \"Next\", // Display text for next month link\n\t\tcurrentText: \"Today\", // Display text for current month link\n\t\tmonthNames: [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\n\t\t\t\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"], // Names of months for drop-down and formatting\n\t\tmonthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"], // For formatting\n\t\tdayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], // For formatting\n\t\tdayNamesShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], // For formatting\n\t\tdayNamesMin: [\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"], // Column headings for days starting at Sunday\n\t\tweekHeader: \"Wk\", // Column header for week of the year\n\t\tdateFormat: \"mm/dd/yy\", // See format options on parseDate\n\t\tfirstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...\n\t\tisRTL: false, // True if right-to-left language, false if left-to-right\n\t\tshowMonthAfterYear: false, // True if the year select precedes month, false for month then year\n\t\tyearSuffix: \"\" // Additional text to append to the year in the month headers\n\t};\n\tthis._defaults = { // Global defaults for all the date picker instances\n\t\tshowOn: \"focus\", // \"focus\" for popup on focus,\n\t\t\t// \"button\" for trigger button, or \"both\" for either\n\t\tshowAnim: \"fadeIn\", // Name of jQuery animation for popup\n\t\tshowOptions: {}, // Options for enhanced animations\n\t\tdefaultDate: null, // Used when field is blank: actual date,\n\t\t\t// +/-number for offset from today, null for today\n\t\tappendText: \"\", // Display text following the input box, e.g. showing the format\n\t\tbuttonText: \"...\", // Text for trigger button\n\t\tbuttonImage: \"\", // URL for trigger button image\n\t\tbuttonImageOnly: false, // True if the image appears alone, false if it appears on a button\n\t\thideIfNoPrevNext: false, // True to hide next/previous month links\n\t\t\t// if not applicable, false to just disable them\n\t\tnavigationAsDateFormat: false, // True if date formatting applied to prev/today/next links\n\t\tgotoCurrent: false, // True if today link goes back to current selection instead\n\t\tchangeMonth: false, // True if month can be selected directly, false if only prev/next\n\t\tchangeYear: false, // True if year can be selected directly, false if only prev/next\n\t\tyearRange: \"c-10:c+10\", // Range of years to display in drop-down,\n\t\t\t// either relative to today's year (-nn:+nn), relative to currently displayed year\n\t\t\t// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\n\t\tshowOtherMonths: false, // True to show dates in other months, false to leave blank\n\t\tselectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable\n\t\tshowWeek: false, // True to show week of the year, false to not show it\n\t\tcalculateWeek: this.iso8601Week, // How to calculate the week of the year,\n\t\t\t// takes a Date and returns the number of the week for it\n\t\tshortYearCutoff: \"+10\", // Short year values < this are in the current century,\n\t\t\t// > this are in the previous century,\n\t\t\t// string value starting with \"+\" for current year + value\n\t\tminDate: null, // The earliest selectable date, or null for no limit\n\t\tmaxDate: null, // The latest selectable date, or null for no limit\n\t\tduration: \"fast\", // Duration of display/closure\n\t\tbeforeShowDay: null, // Function that takes a date and returns an array with\n\t\t\t// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n\t\t\t// [2] = cell title (optional), e.g. $.datepicker.noWeekends\n\t\tbeforeShow: null, // Function that takes an input field and\n\t\t\t// returns a set of custom settings for the date picker\n\t\tonSelect: null, // Define a callback function when a date is selected\n\t\tonChangeMonthYear: null, // Define a callback function when the month or year is changed\n\t\tonClose: null, // Define a callback function when the datepicker is closed\n\t\tnumberOfMonths: 1, // Number of months to show at a time\n\t\tshowCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)\n\t\tstepMonths: 1, // Number of months to step back/forward\n\t\tstepBigMonths: 12, // Number of months to step back/forward for the big links\n\t\taltField: \"\", // Selector for an alternate field to store selected dates into\n\t\taltFormat: \"\", // The date format to use for the alternate field\n\t\tconstrainInput: true, // The input is constrained by the current date format\n\t\tshowButtonPanel: false, // True to show button panel, false to not show it\n\t\tautoSize: false, // True to size the input for the date format, false to leave as is\n\t\tdisabled: false // The initial disabled state\n\t};\n\t$.extend(this._defaults, this.regional[\"\"]);\n\tthis.dpDiv = bindHover($(\"<div id='\" + this._mainDivId + \"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"));\n}\n\n$.extend(Datepicker.prototype, {\n\t/* Class name added to elements to indicate already configured with a date picker. */\n\tmarkerClassName: \"hasDatepicker\",\n\n\t//Keep track of the maximum number of rows displayed (see #7043)\n\tmaxRows: 4,\n\n\t// TODO rename to \"widget\" when switching to widget factory\n\t_widgetDatepicker: function() {\n\t\treturn this.dpDiv;\n\t},\n\n\t/* Override the default settings for all instances of the date picker.\n\t * @param settings object - the new settings to use as defaults (anonymous object)\n\t * @return the manager object\n\t */\n\tsetDefaults: function(settings) {\n\t\textendRemove(this._defaults, settings || {});\n\t\treturn this;\n\t},\n\n\t/* Attach the date picker to a jQuery selection.\n\t * @param target\telement - the target input field or division or span\n\t * @param settings object - the new settings to use for this date picker instance (anonymous)\n\t */\n\t_attachDatepicker: function(target, settings) {\n\t\tvar nodeName, inline, inst;\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tinline = (nodeName === \"div\" || nodeName === \"span\");\n\t\tif (!target.id) {\n\t\t\tthis.uuid += 1;\n\t\t\ttarget.id = \"dp\" + this.uuid;\n\t\t}\n\t\tinst = this._newInst($(target), inline);\n\t\tinst.settings = $.extend({}, settings || {});\n\t\tif (nodeName === \"input\") {\n\t\t\tthis._connectDatepicker(target, inst);\n\t\t} else if (inline) {\n\t\t\tthis._inlineDatepicker(target, inst);\n\t\t}\n\t},\n\n\t/* Create a new instance object. */\n\t_newInst: function(target, inline) {\n\t\tvar id = target[0].id.replace(/([^A-Za-z0-9_\\-])/g, \"\\\\\\\\$1\"); // escape jQuery meta chars\n\t\treturn {id: id, input: target, // associated target\n\t\t\tselectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection\n\t\t\tdrawMonth: 0, drawYear: 0, // month being drawn\n\t\t\tinline: inline, // is datepicker inline or not\n\t\t\tdpDiv: (!inline ? this.dpDiv : // presentation div\n\t\t\tbindHover($(\"<div class='\" + this._inlineClass + \" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\")))};\n\t},\n\n\t/* Attach the date picker to an input field. */\n\t_connectDatepicker: function(target, inst) {\n\t\tvar input = $(target);\n\t\tinst.append = $([]);\n\t\tinst.trigger = $([]);\n\t\tif (input.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\t\tthis._attachments(input, inst);\n\t\tinput.addClass(this.markerClassName).keydown(this._doKeyDown).\n\t\t\tkeypress(this._doKeyPress).keyup(this._doKeyUp);\n\t\tthis._autoSize(inst);\n\t\t$.data(target, PROP_NAME, inst);\n\t\t//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)\n\t\tif( inst.settings.disabled ) {\n\t\t\tthis._disableDatepicker( target );\n\t\t}\n\t},\n\n\t/* Make attachments based on settings. */\n\t_attachments: function(input, inst) {\n\t\tvar showOn, buttonText, buttonImage,\n\t\t\tappendText = this._get(inst, \"appendText\"),\n\t\t\tisRTL = this._get(inst, \"isRTL\");\n\n\t\tif (inst.append) {\n\t\t\tinst.append.remove();\n\t\t}\n\t\tif (appendText) {\n\t\t\tinst.append = $(\"<span class='\" + this._appendClass + \"'>\" + appendText + \"</span>\");\n\t\t\tinput[isRTL ? \"before\" : \"after\"](inst.append);\n\t\t}\n\n\t\tinput.unbind(\"focus\", this._showDatepicker);\n\n\t\tif (inst.trigger) {\n\t\t\tinst.trigger.remove();\n\t\t}\n\n\t\tshowOn = this._get(inst, \"showOn\");\n\t\tif (showOn === \"focus\" || showOn === \"both\") { // pop-up date picker when in the marked field\n\t\t\tinput.focus(this._showDatepicker);\n\t\t}\n\t\tif (showOn === \"button\" || showOn === \"both\") { // pop-up date picker when button clicked\n\t\t\tbuttonText = this._get(inst, \"buttonText\");\n\t\t\tbuttonImage = this._get(inst, \"buttonImage\");\n\t\t\tinst.trigger = $(this._get(inst, \"buttonImageOnly\") ?\n\t\t\t\t$(\"<img/>\").addClass(this._triggerClass).\n\t\t\t\t\tattr({ src: buttonImage, alt: buttonText, title: buttonText }) :\n\t\t\t\t$(\"<button type='button'></button>\").addClass(this._triggerClass).\n\t\t\t\t\thtml(!buttonImage ? buttonText : $(\"<img/>\").attr(\n\t\t\t\t\t{ src:buttonImage, alt:buttonText, title:buttonText })));\n\t\t\tinput[isRTL ? \"before\" : \"after\"](inst.trigger);\n\t\t\tinst.trigger.click(function() {\n\t\t\t\tif ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t} else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t$.datepicker._showDatepicker(input[0]);\n\t\t\t\t} else {\n\t\t\t\t\t$.datepicker._showDatepicker(input[0]);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\t},\n\n\t/* Apply the maximum length for the date format. */\n\t_autoSize: function(inst) {\n\t\tif (this._get(inst, \"autoSize\") && !inst.inline) {\n\t\t\tvar findMax, max, maxI, i,\n\t\t\t\tdate = new Date(2009, 12 - 1, 20), // Ensure double digits\n\t\t\t\tdateFormat = this._get(inst, \"dateFormat\");\n\n\t\t\tif (dateFormat.match(/[DM]/)) {\n\t\t\t\tfindMax = function(names) {\n\t\t\t\t\tmax = 0;\n\t\t\t\t\tmaxI = 0;\n\t\t\t\t\tfor (i = 0; i < names.length; i++) {\n\t\t\t\t\t\tif (names[i].length > max) {\n\t\t\t\t\t\t\tmax = names[i].length;\n\t\t\t\t\t\t\tmaxI = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn maxI;\n\t\t\t\t};\n\t\t\t\tdate.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?\n\t\t\t\t\t\"monthNames\" : \"monthNamesShort\"))));\n\t\t\t\tdate.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?\n\t\t\t\t\t\"dayNames\" : \"dayNamesShort\"))) + 20 - date.getDay());\n\t\t\t}\n\t\t\tinst.input.attr(\"size\", this._formatDate(inst, date).length);\n\t\t}\n\t},\n\n\t/* Attach an inline date picker to a div. */\n\t_inlineDatepicker: function(target, inst) {\n\t\tvar divSpan = $(target);\n\t\tif (divSpan.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\t\tdivSpan.addClass(this.markerClassName).append(inst.dpDiv);\n\t\t$.data(target, PROP_NAME, inst);\n\t\tthis._setDate(inst, this._getDefaultDate(inst), true);\n\t\tthis._updateDatepicker(inst);\n\t\tthis._updateAlternate(inst);\n\t\t//If disabled option is true, disable the datepicker before showing it (see ticket #5665)\n\t\tif( inst.settings.disabled ) {\n\t\t\tthis._disableDatepicker( target );\n\t\t}\n\t\t// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements\n\t\t// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height\n\t\tinst.dpDiv.css( \"display\", \"block\" );\n\t},\n\n\t/* Pop-up the date picker in a \"dialog\" box.\n\t * @param input element - ignored\n\t * @param date\tstring or Date - the initial date to display\n\t * @param onSelect function - the function to call when a date is selected\n\t * @param settings object - update the dialog date picker instance's settings (anonymous object)\n\t * @param pos int[2] - coordinates for the dialog's position within the screen or\n\t *\t\t\t\t\tevent - with x/y coordinates or\n\t *\t\t\t\t\tleave empty for default (screen centre)\n\t * @return the manager object\n\t */\n\t_dialogDatepicker: function(input, date, onSelect, settings, pos) {\n\t\tvar id, browserWidth, browserHeight, scrollX, scrollY,\n\t\t\tinst = this._dialogInst; // internal instance\n\n\t\tif (!inst) {\n\t\t\tthis.uuid += 1;\n\t\t\tid = \"dp\" + this.uuid;\n\t\t\tthis._dialogInput = $(\"<input type='text' id='\" + id +\n\t\t\t\t\"' style='position: absolute; top: -100px; width: 0px;'/>\");\n\t\t\tthis._dialogInput.keydown(this._doKeyDown);\n\t\t\t$(\"body\").append(this._dialogInput);\n\t\t\tinst = this._dialogInst = this._newInst(this._dialogInput, false);\n\t\t\tinst.settings = {};\n\t\t\t$.data(this._dialogInput[0], PROP_NAME, inst);\n\t\t}\n\t\textendRemove(inst.settings, settings || {});\n\t\tdate = (date && date.constructor === Date ? this._formatDate(inst, date) : date);\n\t\tthis._dialogInput.val(date);\n\n\t\tthis._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);\n\t\tif (!this._pos) {\n\t\t\tbrowserWidth = document.documentElement.clientWidth;\n\t\t\tbrowserHeight = document.documentElement.clientHeight;\n\t\t\tscrollX = document.documentElement.scrollLeft || document.body.scrollLeft;\n\t\t\tscrollY = document.documentElement.scrollTop || document.body.scrollTop;\n\t\t\tthis._pos = // should use actual width/height below\n\t\t\t\t[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];\n\t\t}\n\n\t\t// move input on screen for focus, but hidden behind dialog\n\t\tthis._dialogInput.css(\"left\", (this._pos[0] + 20) + \"px\").css(\"top\", this._pos[1] + \"px\");\n\t\tinst.settings.onSelect = onSelect;\n\t\tthis._inDialog = true;\n\t\tthis.dpDiv.addClass(this._dialogClass);\n\t\tthis._showDatepicker(this._dialogInput[0]);\n\t\tif ($.blockUI) {\n\t\t\t$.blockUI(this.dpDiv);\n\t\t}\n\t\t$.data(this._dialogInput[0], PROP_NAME, inst);\n\t\treturn this;\n\t},\n\n\t/* Detach a datepicker from its control.\n\t * @param target\telement - the target input field or division or span\n\t */\n\t_destroyDatepicker: function(target) {\n\t\tvar nodeName,\n\t\t\t$target = $(target),\n\t\t\tinst = $.data(target, PROP_NAME);\n\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\t$.removeData(target, PROP_NAME);\n\t\tif (nodeName === \"input\") {\n\t\t\tinst.append.remove();\n\t\t\tinst.trigger.remove();\n\t\t\t$target.removeClass(this.markerClassName).\n\t\t\t\tunbind(\"focus\", this._showDatepicker).\n\t\t\t\tunbind(\"keydown\", this._doKeyDown).\n\t\t\t\tunbind(\"keypress\", this._doKeyPress).\n\t\t\t\tunbind(\"keyup\", this._doKeyUp);\n\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\t$target.removeClass(this.markerClassName).empty();\n\t\t}\n\t},\n\n\t/* Enable the date picker to a jQuery selection.\n\t * @param target\telement - the target input field or division or span\n\t */\n\t_enableDatepicker: function(target) {\n\t\tvar nodeName, inline,\n\t\t\t$target = $(target),\n\t\t\tinst = $.data(target, PROP_NAME);\n\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tif (nodeName === \"input\") {\n\t\t\ttarget.disabled = false;\n\t\t\tinst.trigger.filter(\"button\").\n\t\t\t\teach(function() { this.disabled = false; }).end().\n\t\t\t\tfilter(\"img\").css({opacity: \"1.0\", cursor: \"\"});\n\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\tinline = $target.children(\".\" + this._inlineClass);\n\t\t\tinline.children().removeClass(\"ui-state-disabled\");\n\t\t\tinline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").\n\t\t\t\tprop(\"disabled\", false);\n\t\t}\n\t\tthis._disabledInputs = $.map(this._disabledInputs,\n\t\t\tfunction(value) { return (value === target ? null : value); }); // delete entry\n\t},\n\n\t/* Disable the date picker to a jQuery selection.\n\t * @param target\telement - the target input field or division or span\n\t */\n\t_disableDatepicker: function(target) {\n\t\tvar nodeName, inline,\n\t\t\t$target = $(target),\n\t\t\tinst = $.data(target, PROP_NAME);\n\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tif (nodeName === \"input\") {\n\t\t\ttarget.disabled = true;\n\t\t\tinst.trigger.filter(\"button\").\n\t\t\t\teach(function() { this.disabled = true; }).end().\n\t\t\t\tfilter(\"img\").css({opacity: \"0.5\", cursor: \"default\"});\n\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\tinline = $target.children(\".\" + this._inlineClass);\n\t\t\tinline.children().addClass(\"ui-state-disabled\");\n\t\t\tinline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").\n\t\t\t\tprop(\"disabled\", true);\n\t\t}\n\t\tthis._disabledInputs = $.map(this._disabledInputs,\n\t\t\tfunction(value) { return (value === target ? null : value); }); // delete entry\n\t\tthis._disabledInputs[this._disabledInputs.length] = target;\n\t},\n\n\t/* Is the first field in a jQuery collection disabled as a datepicker?\n\t * @param target\telement - the target input field or division or span\n\t * @return boolean - true if disabled, false if enabled\n\t */\n\t_isDisabledDatepicker: function(target) {\n\t\tif (!target) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var i = 0; i < this._disabledInputs.length; i++) {\n\t\t\tif (this._disabledInputs[i] === target) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\n\t/* Retrieve the instance data for the target control.\n\t * @param target element - the target input field or division or span\n\t * @return object - the associated instance data\n\t * @throws error if a jQuery problem getting data\n\t */\n\t_getInst: function(target) {\n\t\ttry {\n\t\t\treturn $.data(target, PROP_NAME);\n\t\t}\n\t\tcatch (err) {\n\t\t\tthrow \"Missing instance data for this datepicker\";\n\t\t}\n\t},\n\n\t/* Update or retrieve the settings for a date picker attached to an input field or division.\n\t * @param target element - the target input field or division or span\n\t * @param name\tobject - the new settings to update or\n\t *\t\t\t\tstring - the name of the setting to change or retrieve,\n\t *\t\t\t\twhen retrieving also \"all\" for all instance settings or\n\t *\t\t\t\t\"defaults\" for all global defaults\n\t * @param value any - the new value for the setting\n\t *\t\t\t\t(omit if above is an object or to retrieve a value)\n\t */\n\t_optionDatepicker: function(target, name, value) {\n\t\tvar settings, date, minDate, maxDate,\n\t\t\tinst = this._getInst(target);\n\n\t\tif (arguments.length === 2 && typeof name === \"string\") {\n\t\t\treturn (name === \"defaults\" ? $.extend({}, $.datepicker._defaults) :\n\t\t\t\t(inst ? (name === \"all\" ? $.extend({}, inst.settings) :\n\t\t\t\tthis._get(inst, name)) : null));\n\t\t}\n\n\t\tsettings = name || {};\n\t\tif (typeof name === \"string\") {\n\t\t\tsettings = {};\n\t\t\tsettings[name] = value;\n\t\t}\n\n\t\tif (inst) {\n\t\t\tif (this._curInst === inst) {\n\t\t\t\tthis._hideDatepicker();\n\t\t\t}\n\n\t\t\tdate = this._getDateDatepicker(target, true);\n\t\t\tminDate = this._getMinMaxDate(inst, \"min\");\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\");\n\t\t\textendRemove(inst.settings, settings);\n\t\t\t// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided\n\t\t\tif (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {\n\t\t\t\tinst.settings.minDate = this._formatDate(inst, minDate);\n\t\t\t}\n\t\t\tif (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {\n\t\t\t\tinst.settings.maxDate = this._formatDate(inst, maxDate);\n\t\t\t}\n\t\t\tif ( \"disabled\" in settings ) {\n\t\t\t\tif ( settings.disabled ) {\n\t\t\t\t\tthis._disableDatepicker(target);\n\t\t\t\t} else {\n\t\t\t\t\tthis._enableDatepicker(target);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._attachments($(target), inst);\n\t\t\tthis._autoSize(inst);\n\t\t\tthis._setDate(inst, date);\n\t\t\tthis._updateAlternate(inst);\n\t\t\tthis._updateDatepicker(inst);\n\t\t}\n\t},\n\n\t// change method deprecated\n\t_changeDatepicker: function(target, name, value) {\n\t\tthis._optionDatepicker(target, name, value);\n\t},\n\n\t/* Redraw the date picker attached to an input field or division.\n\t * @param target element - the target input field or division or span\n\t */\n\t_refreshDatepicker: function(target) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst) {\n\t\t\tthis._updateDatepicker(inst);\n\t\t}\n\t},\n\n\t/* Set the dates for a jQuery selection.\n\t * @param target element - the target input field or division or span\n\t * @param date\tDate - the new date\n\t */\n\t_setDateDatepicker: function(target, date) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst) {\n\t\t\tthis._setDate(inst, date);\n\t\t\tthis._updateDatepicker(inst);\n\t\t\tthis._updateAlternate(inst);\n\t\t}\n\t},\n\n\t/* Get the date(s) for the first entry in a jQuery selection.\n\t * @param target element - the target input field or division or span\n\t * @param noDefault boolean - true if no default date is to be used\n\t * @return Date - the current date\n\t */\n\t_getDateDatepicker: function(target, noDefault) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst && !inst.inline) {\n\t\t\tthis._setDateFromField(inst, noDefault);\n\t\t}\n\t\treturn (inst ? this._getDate(inst) : null);\n\t},\n\n\t/* Handle keystrokes. */\n\t_doKeyDown: function(event) {\n\t\tvar onSelect, dateStr, sel,\n\t\t\tinst = $.datepicker._getInst(event.target),\n\t\t\thandled = true,\n\t\t\tisRTL = inst.dpDiv.is(\".ui-datepicker-rtl\");\n\n\t\tinst._keyEvent = true;\n\t\tif ($.datepicker._datepickerShowing) {\n\t\t\tswitch (event.keyCode) {\n\t\t\t\tcase 9: $.datepicker._hideDatepicker();\n\t\t\t\t\t\thandled = false;\n\t\t\t\t\t\tbreak; // hide on tab out\n\t\t\t\tcase 13: sel = $(\"td.\" + $.datepicker._dayOverClass + \":not(.\" +\n\t\t\t\t\t\t\t\t\t$.datepicker._currentClass + \")\", inst.dpDiv);\n\t\t\t\t\t\tif (sel[0]) {\n\t\t\t\t\t\t\t$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tonSelect = $.datepicker._get(inst, \"onSelect\");\n\t\t\t\t\t\tif (onSelect) {\n\t\t\t\t\t\t\tdateStr = $.datepicker._formatDate(inst);\n\n\t\t\t\t\t\t\t// trigger custom callback\n\t\t\t\t\t\t\tonSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn false; // don't submit the form\n\t\t\t\tcase 27: $.datepicker._hideDatepicker();\n\t\t\t\t\t\tbreak; // hide on escape\n\t\t\t\tcase 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\tbreak; // previous month/year on page up/+ ctrl\n\t\t\t\tcase 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\tbreak; // next month/year on page down/+ ctrl\n\t\t\t\tcase 35: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._clearDate(event.target);\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // clear on ctrl or command +end\n\t\t\t\tcase 36: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._gotoToday(event.target);\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // current on ctrl or command +home\n\t\t\t\tcase 37: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t// -1 day on ctrl or command +left\n\t\t\t\t\t\tif (event.originalEvent.altKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// next month/year on alt +left on Mac\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 38: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, -7, \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // -1 week on ctrl or command +up\n\t\t\t\tcase 39: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t// +1 day on ctrl or command +right\n\t\t\t\t\t\tif (event.originalEvent.altKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// next month/year on alt +right\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 40: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, +7, \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // +1 week on ctrl or command +down\n\t\t\t\tdefault: handled = false;\n\t\t\t}\n\t\t} else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home\n\t\t\t$.datepicker._showDatepicker(this);\n\t\t} else {\n\t\t\thandled = false;\n\t\t}\n\n\t\tif (handled) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t},\n\n\t/* Filter entered characters - based on date format. */\n\t_doKeyPress: function(event) {\n\t\tvar chars, chr,\n\t\t\tinst = $.datepicker._getInst(event.target);\n\n\t\tif ($.datepicker._get(inst, \"constrainInput\")) {\n\t\t\tchars = $.datepicker._possibleChars($.datepicker._get(inst, \"dateFormat\"));\n\t\t\tchr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);\n\t\t\treturn event.ctrlKey || event.metaKey || (chr < \" \" || !chars || chars.indexOf(chr) > -1);\n\t\t}\n\t},\n\n\t/* Synchronise manual entry and field/alternate field. */\n\t_doKeyUp: function(event) {\n\t\tvar date,\n\t\t\tinst = $.datepicker._getInst(event.target);\n\n\t\tif (inst.input.val() !== inst.lastVal) {\n\t\t\ttry {\n\t\t\t\tdate = $.datepicker.parseDate($.datepicker._get(inst, \"dateFormat\"),\n\t\t\t\t\t(inst.input ? inst.input.val() : null),\n\t\t\t\t\t$.datepicker._getFormatConfig(inst));\n\n\t\t\t\tif (date) { // only if valid\n\t\t\t\t\t$.datepicker._setDateFromField(inst);\n\t\t\t\t\t$.datepicker._updateAlternate(inst);\n\t\t\t\t\t$.datepicker._updateDatepicker(inst);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (err) {\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t},\n\n\t/* Pop-up the date picker for a given input field.\n\t * If false returned from beforeShow event handler do not show.\n\t * @param input element - the input field attached to the date picker or\n\t *\t\t\t\t\tevent - if triggered by focus\n\t */\n\t_showDatepicker: function(input) {\n\t\tinput = input.target || input;\n\t\tif (input.nodeName.toLowerCase() !== \"input\") { // find from button/image trigger\n\t\t\tinput = $(\"input\", input.parentNode)[0];\n\t\t}\n\n\t\tif ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here\n\t\t\treturn;\n\t\t}\n\n\t\tvar inst, beforeShow, beforeShowSettings, isFixed,\n\t\t\toffset, showAnim, duration;\n\n\t\tinst = $.datepicker._getInst(input);\n\t\tif ($.datepicker._curInst && $.datepicker._curInst !== inst) {\n\t\t\t$.datepicker._curInst.dpDiv.stop(true, true);\n\t\t\tif ( inst && $.datepicker._datepickerShowing ) {\n\t\t\t\t$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );\n\t\t\t}\n\t\t}\n\n\t\tbeforeShow = $.datepicker._get(inst, \"beforeShow\");\n\t\tbeforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};\n\t\tif(beforeShowSettings === false){\n\t\t\treturn;\n\t\t}\n\t\textendRemove(inst.settings, beforeShowSettings);\n\n\t\tinst.lastVal = null;\n\t\t$.datepicker._lastInput = input;\n\t\t$.datepicker._setDateFromField(inst);\n\n\t\tif ($.datepicker._inDialog) { // hide cursor\n\t\t\tinput.value = \"\";\n\t\t}\n\t\tif (!$.datepicker._pos) { // position below input\n\t\t\t$.datepicker._pos = $.datepicker._findPos(input);\n\t\t\t$.datepicker._pos[1] += input.offsetHeight; // add the height\n\t\t}\n\n\t\tisFixed = false;\n\t\t$(input).parents().each(function() {\n\t\t\tisFixed |= $(this).css(\"position\") === \"fixed\";\n\t\t\treturn !isFixed;\n\t\t});\n\n\t\toffset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};\n\t\t$.datepicker._pos = null;\n\t\t//to avoid flashes on Firefox\n\t\tinst.dpDiv.empty();\n\t\t// determine sizing offscreen\n\t\tinst.dpDiv.css({position: \"absolute\", display: \"block\", top: \"-1000px\"});\n\t\t$.datepicker._updateDatepicker(inst);\n\t\t// fix width for dynamic number of date pickers\n\t\t// and adjust position before showing\n\t\toffset = $.datepicker._checkOffset(inst, offset, isFixed);\n\t\tinst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?\n\t\t\t\"static\" : (isFixed ? \"fixed\" : \"absolute\")), display: \"none\",\n\t\t\tleft: offset.left + \"px\", top: offset.top + \"px\"});\n\n\t\tif (!inst.inline) {\n\t\t\tshowAnim = $.datepicker._get(inst, \"showAnim\");\n\t\t\tduration = $.datepicker._get(inst, \"duration\");\n\t\t\tinst.dpDiv.zIndex($(input).zIndex()+1);\n\t\t\t$.datepicker._datepickerShowing = true;\n\n\t\t\tif ( $.effects && $.effects.effect[ showAnim ] ) {\n\t\t\t\tinst.dpDiv.show(showAnim, $.datepicker._get(inst, \"showOptions\"), duration);\n\t\t\t} else {\n\t\t\t\tinst.dpDiv[showAnim || \"show\"](showAnim ? duration : null);\n\t\t\t}\n\n\t\t\tif ( $.datepicker._shouldFocusInput( inst ) ) {\n\t\t\t\tinst.input.focus();\n\t\t\t}\n\n\t\t\t$.datepicker._curInst = inst;\n\t\t}\n\t},\n\n\t/* Generate the date picker content. */\n\t_updateDatepicker: function(inst) {\n\t\tthis.maxRows = 4; //Reset the max number of rows being displayed (see #7043)\n\t\tinstActive = inst; // for delegate hover events\n\t\tinst.dpDiv.empty().append(this._generateHTML(inst));\n\t\tthis._attachHandlers(inst);\n\t\tinst.dpDiv.find(\".\" + this._dayOverClass + \" a\").mouseover();\n\n\t\tvar origyearshtml,\n\t\t\tnumMonths = this._getNumberOfMonths(inst),\n\t\t\tcols = numMonths[1],\n\t\t\twidth = 17;\n\n\t\tinst.dpDiv.removeClass(\"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\").width(\"\");\n\t\tif (cols > 1) {\n\t\t\tinst.dpDiv.addClass(\"ui-datepicker-multi-\" + cols).css(\"width\", (width * cols) + \"em\");\n\t\t}\n\t\tinst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? \"add\" : \"remove\") +\n\t\t\t\"Class\"](\"ui-datepicker-multi\");\n\t\tinst.dpDiv[(this._get(inst, \"isRTL\") ? \"add\" : \"remove\") +\n\t\t\t\"Class\"](\"ui-datepicker-rtl\");\n\n\t\tif (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {\n\t\t\tinst.input.focus();\n\t\t}\n\n\t\t// deffered render of the years select (to avoid flashes on Firefox)\n\t\tif( inst.yearshtml ){\n\t\t\torigyearshtml = inst.yearshtml;\n\t\t\tsetTimeout(function(){\n\t\t\t\t//assure that inst.yearshtml didn't change.\n\t\t\t\tif( origyearshtml === inst.yearshtml && inst.yearshtml ){\n\t\t\t\t\tinst.dpDiv.find(\"select.ui-datepicker-year:first\").replaceWith(inst.yearshtml);\n\t\t\t\t}\n\t\t\t\torigyearshtml = inst.yearshtml = null;\n\t\t\t}, 0);\n\t\t}\n\t},\n\n\t// #6694 - don't focus the input if it's already focused\n\t// this breaks the change event in IE\n\t// Support: IE and jQuery <1.9\n\t_shouldFocusInput: function( inst ) {\n\t\treturn inst.input && inst.input.is( \":visible\" ) && !inst.input.is( \":disabled\" ) && !inst.input.is( \":focus\" );\n\t},\n\n\t/* Check positioning to remain on screen. */\n\t_checkOffset: function(inst, offset, isFixed) {\n\t\tvar dpWidth = inst.dpDiv.outerWidth(),\n\t\t\tdpHeight = inst.dpDiv.outerHeight(),\n\t\t\tinputWidth = inst.input ? inst.input.outerWidth() : 0,\n\t\t\tinputHeight = inst.input ? inst.input.outerHeight() : 0,\n\t\t\tviewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),\n\t\t\tviewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());\n\n\t\toffset.left -= (this._get(inst, \"isRTL\") ? (dpWidth - inputWidth) : 0);\n\t\toffset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;\n\t\toffset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;\n\n\t\t// now check if datepicker is showing outside window viewport - move to a better place if so.\n\t\toffset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?\n\t\t\tMath.abs(offset.left + dpWidth - viewWidth) : 0);\n\t\toffset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?\n\t\t\tMath.abs(dpHeight + inputHeight) : 0);\n\n\t\treturn offset;\n\t},\n\n\t/* Find an object's position on the screen. */\n\t_findPos: function(obj) {\n\t\tvar position,\n\t\t\tinst = this._getInst(obj),\n\t\t\tisRTL = this._get(inst, \"isRTL\");\n\n\t\twhile (obj && (obj.type === \"hidden\" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {\n\t\t\tobj = obj[isRTL ? \"previousSibling\" : \"nextSibling\"];\n\t\t}\n\n\t\tposition = $(obj).offset();\n\t\treturn [position.left, position.top];\n\t},\n\n\t/* Hide the date picker from view.\n\t * @param input element - the input field attached to the date picker\n\t */\n\t_hideDatepicker: function(input) {\n\t\tvar showAnim, duration, postProcess, onClose,\n\t\t\tinst = this._curInst;\n\n\t\tif (!inst || (input && inst !== $.data(input, PROP_NAME))) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._datepickerShowing) {\n\t\t\tshowAnim = this._get(inst, \"showAnim\");\n\t\t\tduration = this._get(inst, \"duration\");\n\t\t\tpostProcess = function() {\n\t\t\t\t$.datepicker._tidyDialog(inst);\n\t\t\t};\n\n\t\t\t// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed\n\t\t\tif ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {\n\t\t\t\tinst.dpDiv.hide(showAnim, $.datepicker._get(inst, \"showOptions\"), duration, postProcess);\n\t\t\t} else {\n\t\t\t\tinst.dpDiv[(showAnim === \"slideDown\" ? \"slideUp\" :\n\t\t\t\t\t(showAnim === \"fadeIn\" ? \"fadeOut\" : \"hide\"))]((showAnim ? duration : null), postProcess);\n\t\t\t}\n\n\t\t\tif (!showAnim) {\n\t\t\t\tpostProcess();\n\t\t\t}\n\t\t\tthis._datepickerShowing = false;\n\n\t\t\tonClose = this._get(inst, \"onClose\");\n\t\t\tif (onClose) {\n\t\t\t\tonClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : \"\"), inst]);\n\t\t\t}\n\n\t\t\tthis._lastInput = null;\n\t\t\tif (this._inDialog) {\n\t\t\t\tthis._dialogInput.css({ position: \"absolute\", left: \"0\", top: \"-100px\" });\n\t\t\t\tif ($.blockUI) {\n\t\t\t\t\t$.unblockUI();\n\t\t\t\t\t$(\"body\").append(this.dpDiv);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._inDialog = false;\n\t\t}\n\t},\n\n\t/* Tidy up after a dialog display. */\n\t_tidyDialog: function(inst) {\n\t\tinst.dpDiv.removeClass(this._dialogClass).unbind(\".ui-datepicker-calendar\");\n\t},\n\n\t/* Close date picker if clicked elsewhere. */\n\t_checkExternalClick: function(event) {\n\t\tif (!$.datepicker._curInst) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar $target = $(event.target),\n\t\t\tinst = $.datepicker._getInst($target[0]);\n\n\t\tif ( ( ( $target[0].id !== $.datepicker._mainDivId &&\n\t\t\t\t$target.parents(\"#\" + $.datepicker._mainDivId).length === 0 &&\n\t\t\t\t!$target.hasClass($.datepicker.markerClassName) &&\n\t\t\t\t!$target.closest(\".\" + $.datepicker._triggerClass).length &&\n\t\t\t\t$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||\n\t\t\t( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {\n\t\t\t\t$.datepicker._hideDatepicker();\n\t\t}\n\t},\n\n\t/* Adjust one of the date sub-fields. */\n\t_adjustDate: function(id, offset, period) {\n\t\tvar target = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tif (this._isDisabledDatepicker(target[0])) {\n\t\t\treturn;\n\t\t}\n\t\tthis._adjustInstDate(inst, offset +\n\t\t\t(period === \"M\" ? this._get(inst, \"showCurrentAtPos\") : 0), // undo positioning\n\t\t\tperiod);\n\t\tthis._updateDatepicker(inst);\n\t},\n\n\t/* Action for current link. */\n\t_gotoToday: function(id) {\n\t\tvar date,\n\t\t\ttarget = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tif (this._get(inst, \"gotoCurrent\") && inst.currentDay) {\n\t\t\tinst.selectedDay = inst.currentDay;\n\t\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth;\n\t\t\tinst.drawYear = inst.selectedYear = inst.currentYear;\n\t\t} else {\n\t\t\tdate = new Date();\n\t\t\tinst.selectedDay = date.getDate();\n\t\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\t}\n\t\tthis._notifyChange(inst);\n\t\tthis._adjustDate(target);\n\t},\n\n\t/* Action for selecting a new month/year. */\n\t_selectMonthYear: function(id, select, period) {\n\t\tvar target = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tinst[\"selected\" + (period === \"M\" ? \"Month\" : \"Year\")] =\n\t\tinst[\"draw\" + (period === \"M\" ? \"Month\" : \"Year\")] =\n\t\t\tparseInt(select.options[select.selectedIndex].value,10);\n\n\t\tthis._notifyChange(inst);\n\t\tthis._adjustDate(target);\n\t},\n\n\t/* Action for selecting a day. */\n\t_selectDay: function(id, month, year, td) {\n\t\tvar inst,\n\t\t\ttarget = $(id);\n\n\t\tif ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {\n\t\t\treturn;\n\t\t}\n\n\t\tinst = this._getInst(target[0]);\n\t\tinst.selectedDay = inst.currentDay = $(\"a\", td).html();\n\t\tinst.selectedMonth = inst.currentMonth = month;\n\t\tinst.selectedYear = inst.currentYear = year;\n\t\tthis._selectDate(id, this._formatDate(inst,\n\t\t\tinst.currentDay, inst.currentMonth, inst.currentYear));\n\t},\n\n\t/* Erase the input field and hide the date picker. */\n\t_clearDate: function(id) {\n\t\tvar target = $(id);\n\t\tthis._selectDate(target, \"\");\n\t},\n\n\t/* Update the input field with the selected date. */\n\t_selectDate: function(id, dateStr) {\n\t\tvar onSelect,\n\t\t\ttarget = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tdateStr = (dateStr != null ? dateStr : this._formatDate(inst));\n\t\tif (inst.input) {\n\t\t\tinst.input.val(dateStr);\n\t\t}\n\t\tthis._updateAlternate(inst);\n\n\t\tonSelect = this._get(inst, \"onSelect\");\n\t\tif (onSelect) {\n\t\t\tonSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback\n\t\t} else if (inst.input) {\n\t\t\tinst.input.trigger(\"change\"); // fire the change event\n\t\t}\n\n\t\tif (inst.inline){\n\t\t\tthis._updateDatepicker(inst);\n\t\t} else {\n\t\t\tthis._hideDatepicker();\n\t\t\tthis._lastInput = inst.input[0];\n\t\t\tif (typeof(inst.input[0]) !== \"object\") {\n\t\t\t\tinst.input.focus(); // restore focus\n\t\t\t}\n\t\t\tthis._lastInput = null;\n\t\t}\n\t},\n\n\t/* Update any alternate field to synchronise with the main field. */\n\t_updateAlternate: function(inst) {\n\t\tvar altFormat, date, dateStr,\n\t\t\taltField = this._get(inst, \"altField\");\n\n\t\tif (altField) { // update alternate field too\n\t\t\taltFormat = this._get(inst, \"altFormat\") || this._get(inst, \"dateFormat\");\n\t\t\tdate = this._getDate(inst);\n\t\t\tdateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));\n\t\t\t$(altField).each(function() { $(this).val(dateStr); });\n\t\t}\n\t},\n\n\t/* Set as beforeShowDay function to prevent selection of weekends.\n\t * @param date Date - the date to customise\n\t * @return [boolean, string] - is this date selectable?, what is its CSS class?\n\t */\n\tnoWeekends: function(date) {\n\t\tvar day = date.getDay();\n\t\treturn [(day > 0 && day < 6), \"\"];\n\t},\n\n\t/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.\n\t * @param date Date - the date to get the week for\n\t * @return number - the number of the week within the year that contains this date\n\t */\n\tiso8601Week: function(date) {\n\t\tvar time,\n\t\t\tcheckDate = new Date(date.getTime());\n\n\t\t// Find Thursday of this week starting on Monday\n\t\tcheckDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));\n\n\t\ttime = checkDate.getTime();\n\t\tcheckDate.setMonth(0); // Compare with Jan 1\n\t\tcheckDate.setDate(1);\n\t\treturn Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;\n\t},\n\n\t/* Parse a string value into a date object.\n\t * See formatDate below for the possible formats.\n\t *\n\t * @param format string - the expected format of the date\n\t * @param value string - the date in the above format\n\t * @param settings Object - attributes include:\n\t *\t\t\t\t\tshortYearCutoff number - the cutoff year for determining the century (optional)\n\t *\t\t\t\t\tdayNamesShort\tstring[7] - abbreviated names of the days from Sunday (optional)\n\t *\t\t\t\t\tdayNames\t\tstring[7] - names of the days from Sunday (optional)\n\t *\t\t\t\t\tmonthNamesShort string[12] - abbreviated names of the months (optional)\n\t *\t\t\t\t\tmonthNames\t\tstring[12] - names of the months (optional)\n\t * @return Date - the extracted date value or null if value is blank\n\t */\n\tparseDate: function (format, value, settings) {\n\t\tif (format == null || value == null) {\n\t\t\tthrow \"Invalid arguments\";\n\t\t}\n\n\t\tvalue = (typeof value === \"object\" ? value.toString() : value + \"\");\n\t\tif (value === \"\") {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar iFormat, dim, extra,\n\t\t\tiValue = 0,\n\t\t\tshortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,\n\t\t\tshortYearCutoff = (typeof shortYearCutoffTemp !== \"string\" ? shortYearCutoffTemp :\n\t\t\t\tnew Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),\n\t\t\tdayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,\n\t\t\tdayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,\n\t\t\tmonthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,\n\t\t\tmonthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,\n\t\t\tyear = -1,\n\t\t\tmonth = -1,\n\t\t\tday = -1,\n\t\t\tdoy = -1,\n\t\t\tliteral = false,\n\t\t\tdate,\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function(match) {\n\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\tif (matches) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t},\n\t\t\t// Extract a number from the string value\n\t\t\tgetNumber = function(match) {\n\t\t\t\tvar isDoubled = lookAhead(match),\n\t\t\t\t\tsize = (match === \"@\" ? 14 : (match === \"!\" ? 20 :\n\t\t\t\t\t(match === \"y\" && isDoubled ? 4 : (match === \"o\" ? 3 : 2)))),\n\t\t\t\t\tdigits = new RegExp(\"^\\\\d{1,\" + size + \"}\"),\n\t\t\t\t\tnum = value.substring(iValue).match(digits);\n\t\t\t\tif (!num) {\n\t\t\t\t\tthrow \"Missing number at position \" + iValue;\n\t\t\t\t}\n\t\t\t\tiValue += num[0].length;\n\t\t\t\treturn parseInt(num[0], 10);\n\t\t\t},\n\t\t\t// Extract a name from the string value and convert to an index\n\t\t\tgetName = function(match, shortNames, longNames) {\n\t\t\t\tvar index = -1,\n\t\t\t\t\tnames = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {\n\t\t\t\t\t\treturn [ [k, v] ];\n\t\t\t\t\t}).sort(function (a, b) {\n\t\t\t\t\t\treturn -(a[1].length - b[1].length);\n\t\t\t\t\t});\n\n\t\t\t\t$.each(names, function (i, pair) {\n\t\t\t\t\tvar name = pair[1];\n\t\t\t\t\tif (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n\t\t\t\t\t\tindex = pair[0];\n\t\t\t\t\t\tiValue += name.length;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\treturn index + 1;\n\t\t\t\t} else {\n\t\t\t\t\tthrow \"Unknown name at position \" + iValue;\n\t\t\t\t}\n\t\t\t},\n\t\t\t// Confirm that a literal character matches the string value\n\t\t\tcheckLiteral = function() {\n\t\t\t\tif (value.charAt(iValue) !== format.charAt(iFormat)) {\n\t\t\t\t\tthrow \"Unexpected literal at position \" + iValue;\n\t\t\t\t}\n\t\t\t\tiValue++;\n\t\t\t};\n\n\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\tif (literal) {\n\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\tliteral = false;\n\t\t\t\t} else {\n\t\t\t\t\tcheckLiteral();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\tday = getNumber(\"d\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"D\":\n\t\t\t\t\t\tgetName(\"D\", dayNamesShort, dayNames);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"o\":\n\t\t\t\t\t\tdoy = getNumber(\"o\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"m\":\n\t\t\t\t\t\tmonth = getNumber(\"m\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"M\":\n\t\t\t\t\t\tmonth = getName(\"M\", monthNamesShort, monthNames);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"y\":\n\t\t\t\t\t\tyear = getNumber(\"y\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"@\":\n\t\t\t\t\t\tdate = new Date(getNumber(\"@\"));\n\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"!\":\n\t\t\t\t\t\tdate = new Date((getNumber(\"!\") - this._ticksTo1970) / 10000);\n\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\tif (lookAhead(\"'\")){\n\t\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (iValue < value.length){\n\t\t\textra = value.substr(iValue);\n\t\t\tif (!/^\\s+/.test(extra)) {\n\t\t\t\tthrow \"Extra/unparsed characters found in date: \" + extra;\n\t\t\t}\n\t\t}\n\n\t\tif (year === -1) {\n\t\t\tyear = new Date().getFullYear();\n\t\t} else if (year < 100) {\n\t\t\tyear += new Date().getFullYear() - new Date().getFullYear() % 100 +\n\t\t\t\t(year <= shortYearCutoff ? 0 : -100);\n\t\t}\n\n\t\tif (doy > -1) {\n\t\t\tmonth = 1;\n\t\t\tday = doy;\n\t\t\tdo {\n\t\t\t\tdim = this._getDaysInMonth(year, month - 1);\n\t\t\t\tif (day <= dim) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tmonth++;\n\t\t\t\tday -= dim;\n\t\t\t} while (true);\n\t\t}\n\n\t\tdate = this._daylightSavingAdjust(new Date(year, month - 1, day));\n\t\tif (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n\t\t\tthrow \"Invalid date\"; // E.g. 31/02/00\n\t\t}\n\t\treturn date;\n\t},\n\n\t/* Standard date formats. */\n\tATOM: \"yy-mm-dd\", // RFC 3339 (ISO 8601)\n\tCOOKIE: \"D, dd M yy\",\n\tISO_8601: \"yy-mm-dd\",\n\tRFC_822: \"D, d M y\",\n\tRFC_850: \"DD, dd-M-y\",\n\tRFC_1036: \"D, d M y\",\n\tRFC_1123: \"D, d M yy\",\n\tRFC_2822: \"D, d M yy\",\n\tRSS: \"D, d M y\", // RFC 822\n\tTICKS: \"!\",\n\tTIMESTAMP: \"@\",\n\tW3C: \"yy-mm-dd\", // ISO 8601\n\n\t_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +\n\t\tMath.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),\n\n\t/* Format a date object into a string value.\n\t * The format can be combinations of the following:\n\t * d - day of month (no leading zero)\n\t * dd - day of month (two digit)\n\t * o - day of year (no leading zeros)\n\t * oo - day of year (three digit)\n\t * D - day name short\n\t * DD - day name long\n\t * m - month of year (no leading zero)\n\t * mm - month of year (two digit)\n\t * M - month name short\n\t * MM - month name long\n\t * y - year (two digit)\n\t * yy - year (four digit)\n\t * @ - Unix timestamp (ms since 01/01/1970)\n\t * ! - Windows ticks (100ns since 01/01/0001)\n\t * \"...\" - literal text\n\t * '' - single quote\n\t *\n\t * @param format string - the desired format of the date\n\t * @param date Date - the date value to format\n\t * @param settings Object - attributes include:\n\t *\t\t\t\t\tdayNamesShort\tstring[7] - abbreviated names of the days from Sunday (optional)\n\t *\t\t\t\t\tdayNames\t\tstring[7] - names of the days from Sunday (optional)\n\t *\t\t\t\t\tmonthNamesShort string[12] - abbreviated names of the months (optional)\n\t *\t\t\t\t\tmonthNames\t\tstring[12] - names of the months (optional)\n\t * @return string - the date in the above format\n\t */\n\tformatDate: function (format, date, settings) {\n\t\tif (!date) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tvar iFormat,\n\t\t\tdayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,\n\t\t\tdayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,\n\t\t\tmonthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,\n\t\t\tmonthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function(match) {\n\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\tif (matches) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t},\n\t\t\t// Format a number, with leading zero if necessary\n\t\t\tformatNumber = function(match, value, len) {\n\t\t\t\tvar num = \"\" + value;\n\t\t\t\tif (lookAhead(match)) {\n\t\t\t\t\twhile (num.length < len) {\n\t\t\t\t\t\tnum = \"0\" + num;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn num;\n\t\t\t},\n\t\t\t// Format a name, short or long as requested\n\t\t\tformatName = function(match, value, shortNames, longNames) {\n\t\t\t\treturn (lookAhead(match) ? longNames[value] : shortNames[value]);\n\t\t\t},\n\t\t\toutput = \"\",\n\t\t\tliteral = false;\n\n\t\tif (date) {\n\t\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\t\tif (literal) {\n\t\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\t\tliteral = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput += format.charAt(iFormat);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\t\toutput += formatNumber(\"d\", date.getDate(), 2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"D\":\n\t\t\t\t\t\t\toutput += formatName(\"D\", date.getDay(), dayNamesShort, dayNames);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"o\":\n\t\t\t\t\t\t\toutput += formatNumber(\"o\",\n\t\t\t\t\t\t\t\tMath.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"m\":\n\t\t\t\t\t\t\toutput += formatNumber(\"m\", date.getMonth() + 1, 2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"M\":\n\t\t\t\t\t\t\toutput += formatName(\"M\", date.getMonth(), monthNamesShort, monthNames);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"y\":\n\t\t\t\t\t\t\toutput += (lookAhead(\"y\") ? date.getFullYear() :\n\t\t\t\t\t\t\t\t(date.getYear() % 100 < 10 ? \"0\" : \"\") + date.getYear() % 100);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"@\":\n\t\t\t\t\t\t\toutput += date.getTime();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"!\":\n\t\t\t\t\t\t\toutput += date.getTime() * 10000 + this._ticksTo1970;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\t\tif (lookAhead(\"'\")) {\n\t\t\t\t\t\t\t\toutput += \"'\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\toutput += format.charAt(iFormat);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t},\n\n\t/* Extract all possible characters from the date format. */\n\t_possibleChars: function (format) {\n\t\tvar iFormat,\n\t\t\tchars = \"\",\n\t\t\tliteral = false,\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function(match) {\n\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\tif (matches) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t};\n\n\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\tif (literal) {\n\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\tliteral = false;\n\t\t\t\t} else {\n\t\t\t\t\tchars += format.charAt(iFormat);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\tcase \"d\": case \"m\": case \"y\": case \"@\":\n\t\t\t\t\t\tchars += \"0123456789\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"D\": case \"M\":\n\t\t\t\t\t\treturn null; // Accept anything\n\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\tif (lookAhead(\"'\")) {\n\t\t\t\t\t\t\tchars += \"'\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tchars += format.charAt(iFormat);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn chars;\n\t},\n\n\t/* Get a setting value, defaulting if necessary. */\n\t_get: function(inst, name) {\n\t\treturn inst.settings[name] !== undefined ?\n\t\t\tinst.settings[name] : this._defaults[name];\n\t},\n\n\t/* Parse existing date and initialise date picker. */\n\t_setDateFromField: function(inst, noDefault) {\n\t\tif (inst.input.val() === inst.lastVal) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar dateFormat = this._get(inst, \"dateFormat\"),\n\t\t\tdates = inst.lastVal = inst.input ? inst.input.val() : null,\n\t\t\tdefaultDate = this._getDefaultDate(inst),\n\t\t\tdate = defaultDate,\n\t\t\tsettings = this._getFormatConfig(inst);\n\n\t\ttry {\n\t\t\tdate = this.parseDate(dateFormat, dates, settings) || defaultDate;\n\t\t} catch (event) {\n\t\t\tdates = (noDefault ? \"\" : dates);\n\t\t}\n\t\tinst.selectedDay = date.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\tinst.currentDay = (dates ? date.getDate() : 0);\n\t\tinst.currentMonth = (dates ? date.getMonth() : 0);\n\t\tinst.currentYear = (dates ? date.getFullYear() : 0);\n\t\tthis._adjustInstDate(inst);\n\t},\n\n\t/* Retrieve the default date shown on opening. */\n\t_getDefaultDate: function(inst) {\n\t\treturn this._restrictMinMax(inst,\n\t\t\tthis._determineDate(inst, this._get(inst, \"defaultDate\"), new Date()));\n\t},\n\n\t/* A date may be specified as an exact value or a relative one. */\n\t_determineDate: function(inst, date, defaultDate) {\n\t\tvar offsetNumeric = function(offset) {\n\t\t\t\tvar date = new Date();\n\t\t\t\tdate.setDate(date.getDate() + offset);\n\t\t\t\treturn date;\n\t\t\t},\n\t\t\toffsetString = function(offset) {\n\t\t\t\ttry {\n\t\t\t\t\treturn $.datepicker.parseDate($.datepicker._get(inst, \"dateFormat\"),\n\t\t\t\t\t\toffset, $.datepicker._getFormatConfig(inst));\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\t// Ignore\n\t\t\t\t}\n\n\t\t\t\tvar date = (offset.toLowerCase().match(/^c/) ?\n\t\t\t\t\t$.datepicker._getDate(inst) : null) || new Date(),\n\t\t\t\t\tyear = date.getFullYear(),\n\t\t\t\t\tmonth = date.getMonth(),\n\t\t\t\t\tday = date.getDate(),\n\t\t\t\t\tpattern = /([+\\-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g,\n\t\t\t\t\tmatches = pattern.exec(offset);\n\n\t\t\t\twhile (matches) {\n\t\t\t\t\tswitch (matches[2] || \"d\") {\n\t\t\t\t\t\tcase \"d\" : case \"D\" :\n\t\t\t\t\t\t\tday += parseInt(matches[1],10); break;\n\t\t\t\t\t\tcase \"w\" : case \"W\" :\n\t\t\t\t\t\t\tday += parseInt(matches[1],10) * 7; break;\n\t\t\t\t\t\tcase \"m\" : case \"M\" :\n\t\t\t\t\t\t\tmonth += parseInt(matches[1],10);\n\t\t\t\t\t\t\tday = Math.min(day, $.datepicker._getDaysInMonth(year, month));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"y\": case \"Y\" :\n\t\t\t\t\t\t\tyear += parseInt(matches[1],10);\n\t\t\t\t\t\t\tday = Math.min(day, $.datepicker._getDaysInMonth(year, month));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmatches = pattern.exec(offset);\n\t\t\t\t}\n\t\t\t\treturn new Date(year, month, day);\n\t\t\t},\n\t\t\tnewDate = (date == null || date === \"\" ? defaultDate : (typeof date === \"string\" ? offsetString(date) :\n\t\t\t\t(typeof date === \"number\" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));\n\n\t\tnewDate = (newDate && newDate.toString() === \"Invalid Date\" ? defaultDate : newDate);\n\t\tif (newDate) {\n\t\t\tnewDate.setHours(0);\n\t\t\tnewDate.setMinutes(0);\n\t\t\tnewDate.setSeconds(0);\n\t\t\tnewDate.setMilliseconds(0);\n\t\t}\n\t\treturn this._daylightSavingAdjust(newDate);\n\t},\n\n\t/* Handle switch to/from daylight saving.\n\t * Hours may be non-zero on daylight saving cut-over:\n\t * > 12 when midnight changeover, but then cannot generate\n\t * midnight datetime, so jump to 1AM, otherwise reset.\n\t * @param date (Date) the date to check\n\t * @return (Date) the corrected date\n\t */\n\t_daylightSavingAdjust: function(date) {\n\t\tif (!date) {\n\t\t\treturn null;\n\t\t}\n\t\tdate.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);\n\t\treturn date;\n\t},\n\n\t/* Set the date(s) directly. */\n\t_setDate: function(inst, date, noChange) {\n\t\tvar clear = !date,\n\t\t\torigMonth = inst.selectedMonth,\n\t\t\torigYear = inst.selectedYear,\n\t\t\tnewDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));\n\n\t\tinst.selectedDay = inst.currentDay = newDate.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();\n\t\tinst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();\n\t\tif ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {\n\t\t\tthis._notifyChange(inst);\n\t\t}\n\t\tthis._adjustInstDate(inst);\n\t\tif (inst.input) {\n\t\t\tinst.input.val(clear ? \"\" : this._formatDate(inst));\n\t\t}\n\t},\n\n\t/* Retrieve the date(s) directly. */\n\t_getDate: function(inst) {\n\t\tvar startDate = (!inst.currentYear || (inst.input && inst.input.val() === \"\") ? null :\n\t\t\tthis._daylightSavingAdjust(new Date(\n\t\t\tinst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\t\treturn startDate;\n\t},\n\n\t/* Attach the onxxx handlers. These are declared statically so\n\t * they work with static code transformers like Caja.\n\t */\n\t_attachHandlers: function(inst) {\n\t\tvar stepMonths = this._get(inst, \"stepMonths\"),\n\t\t\tid = \"#\" + inst.id.replace( /\\\\\\\\/g, \"\\\\\" );\n\t\tinst.dpDiv.find(\"[data-handler]\").map(function () {\n\t\t\tvar handler = {\n\t\t\t\tprev: function () {\n\t\t\t\t\t$.datepicker._adjustDate(id, -stepMonths, \"M\");\n\t\t\t\t},\n\t\t\t\tnext: function () {\n\t\t\t\t\t$.datepicker._adjustDate(id, +stepMonths, \"M\");\n\t\t\t\t},\n\t\t\t\thide: function () {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t},\n\t\t\t\ttoday: function () {\n\t\t\t\t\t$.datepicker._gotoToday(id);\n\t\t\t\t},\n\t\t\t\tselectDay: function () {\n\t\t\t\t\t$.datepicker._selectDay(id, +this.getAttribute(\"data-month\"), +this.getAttribute(\"data-year\"), this);\n\t\t\t\t\treturn false;\n\t\t\t\t},\n\t\t\t\tselectMonth: function () {\n\t\t\t\t\t$.datepicker._selectMonthYear(id, this, \"M\");\n\t\t\t\t\treturn false;\n\t\t\t\t},\n\t\t\t\tselectYear: function () {\n\t\t\t\t\t$.datepicker._selectMonthYear(id, this, \"Y\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\t\t\t$(this).bind(this.getAttribute(\"data-event\"), handler[this.getAttribute(\"data-handler\")]);\n\t\t});\n\t},\n\n\t/* Generate the HTML for the current state of the date picker. */\n\t_generateHTML: function(inst) {\n\t\tvar maxDraw, prevText, prev, nextText, next, currentText, gotoDate,\n\t\t\tcontrols, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,\n\t\t\tmonthNames, monthNamesShort, beforeShowDay, showOtherMonths,\n\t\t\tselectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,\n\t\t\tcornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,\n\t\t\tprintDate, dRow, tbody, daySettings, otherMonth, unselectable,\n\t\t\ttempDate = new Date(),\n\t\t\ttoday = this._daylightSavingAdjust(\n\t\t\t\tnew Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time\n\t\t\tisRTL = this._get(inst, \"isRTL\"),\n\t\t\tshowButtonPanel = this._get(inst, \"showButtonPanel\"),\n\t\t\thideIfNoPrevNext = this._get(inst, \"hideIfNoPrevNext\"),\n\t\t\tnavigationAsDateFormat = this._get(inst, \"navigationAsDateFormat\"),\n\t\t\tnumMonths = this._getNumberOfMonths(inst),\n\t\t\tshowCurrentAtPos = this._get(inst, \"showCurrentAtPos\"),\n\t\t\tstepMonths = this._get(inst, \"stepMonths\"),\n\t\t\tisMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),\n\t\t\tcurrentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :\n\t\t\t\tnew Date(inst.currentYear, inst.currentMonth, inst.currentDay))),\n\t\t\tminDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\tdrawMonth = inst.drawMonth - showCurrentAtPos,\n\t\t\tdrawYear = inst.drawYear;\n\n\t\tif (drawMonth < 0) {\n\t\t\tdrawMonth += 12;\n\t\t\tdrawYear--;\n\t\t}\n\t\tif (maxDate) {\n\t\t\tmaxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),\n\t\t\t\tmaxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));\n\t\t\tmaxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);\n\t\t\twhile (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {\n\t\t\t\tdrawMonth--;\n\t\t\t\tif (drawMonth < 0) {\n\t\t\t\t\tdrawMonth = 11;\n\t\t\t\t\tdrawYear--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tinst.drawMonth = drawMonth;\n\t\tinst.drawYear = drawYear;\n\n\t\tprevText = this._get(inst, \"prevText\");\n\t\tprevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,\n\t\t\tthis._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),\n\t\t\tthis._getFormatConfig(inst)));\n\n\t\tprev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?\n\t\t\t\"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'\" +\n\t\t\t\" title='\" + prevText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"e\" : \"w\") + \"'>\" + prevText + \"</span></a>\" :\n\t\t\t(hideIfNoPrevNext ? \"\" : \"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='\"+ prevText +\"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"e\" : \"w\") + \"'>\" + prevText + \"</span></a>\"));\n\n\t\tnextText = this._get(inst, \"nextText\");\n\t\tnextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,\n\t\t\tthis._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),\n\t\t\tthis._getFormatConfig(inst)));\n\n\t\tnext = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?\n\t\t\t\"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'\" +\n\t\t\t\" title='\" + nextText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"w\" : \"e\") + \"'>\" + nextText + \"</span></a>\" :\n\t\t\t(hideIfNoPrevNext ? \"\" : \"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='\"+ nextText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"w\" : \"e\") + \"'>\" + nextText + \"</span></a>\"));\n\n\t\tcurrentText = this._get(inst, \"currentText\");\n\t\tgotoDate = (this._get(inst, \"gotoCurrent\") && inst.currentDay ? currentDate : today);\n\t\tcurrentText = (!navigationAsDateFormat ? currentText :\n\t\t\tthis.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));\n\n\t\tcontrols = (!inst.inline ? \"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>\" +\n\t\t\tthis._get(inst, \"closeText\") + \"</button>\" : \"\");\n\n\t\tbuttonPanel = (showButtonPanel) ? \"<div class='ui-datepicker-buttonpane ui-widget-content'>\" + (isRTL ? controls : \"\") +\n\t\t\t(this._isInRange(inst, gotoDate) ? \"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'\" +\n\t\t\t\">\" + currentText + \"</button>\" : \"\") + (isRTL ? \"\" : controls) + \"</div>\" : \"\";\n\n\t\tfirstDay = parseInt(this._get(inst, \"firstDay\"),10);\n\t\tfirstDay = (isNaN(firstDay) ? 0 : firstDay);\n\n\t\tshowWeek = this._get(inst, \"showWeek\");\n\t\tdayNames = this._get(inst, \"dayNames\");\n\t\tdayNamesMin = this._get(inst, \"dayNamesMin\");\n\t\tmonthNames = this._get(inst, \"monthNames\");\n\t\tmonthNamesShort = this._get(inst, \"monthNamesShort\");\n\t\tbeforeShowDay = this._get(inst, \"beforeShowDay\");\n\t\tshowOtherMonths = this._get(inst, \"showOtherMonths\");\n\t\tselectOtherMonths = this._get(inst, \"selectOtherMonths\");\n\t\tdefaultDate = this._getDefaultDate(inst);\n\t\thtml = \"\";\n\t\tdow;\n\t\tfor (row = 0; row < numMonths[0]; row++) {\n\t\t\tgroup = \"\";\n\t\t\tthis.maxRows = 4;\n\t\t\tfor (col = 0; col < numMonths[1]; col++) {\n\t\t\t\tselectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));\n\t\t\t\tcornerClass = \" ui-corner-all\";\n\t\t\t\tcalender = \"\";\n\t\t\t\tif (isMultiMonth) {\n\t\t\t\t\tcalender += \"<div class='ui-datepicker-group\";\n\t\t\t\t\tif (numMonths[1] > 1) {\n\t\t\t\t\t\tswitch (col) {\n\t\t\t\t\t\t\tcase 0: calender += \" ui-datepicker-group-first\";\n\t\t\t\t\t\t\t\tcornerClass = \" ui-corner-\" + (isRTL ? \"right\" : \"left\"); break;\n\t\t\t\t\t\t\tcase numMonths[1]-1: calender += \" ui-datepicker-group-last\";\n\t\t\t\t\t\t\t\tcornerClass = \" ui-corner-\" + (isRTL ? \"left\" : \"right\"); break;\n\t\t\t\t\t\t\tdefault: calender += \" ui-datepicker-group-middle\"; cornerClass = \"\"; break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcalender += \"'>\";\n\t\t\t\t}\n\t\t\t\tcalender += \"<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix\" + cornerClass + \"'>\" +\n\t\t\t\t\t(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : \"\") +\n\t\t\t\t\t(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : \"\") +\n\t\t\t\t\tthis._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\t\t\trow > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers\n\t\t\t\t\t\"</div><table class='ui-datepicker-calendar'><thead>\" +\n\t\t\t\t\t\"<tr>\";\n\t\t\t\tthead = (showWeek ? \"<th class='ui-datepicker-week-col'>\" + this._get(inst, \"weekHeader\") + \"</th>\" : \"\");\n\t\t\t\tfor (dow = 0; dow < 7; dow++) { // days of the week\n\t\t\t\t\tday = (dow + firstDay) % 7;\n\t\t\t\t\tthead += \"<th\" + ((dow + firstDay + 6) % 7 >= 5 ? \" class='ui-datepicker-week-end'\" : \"\") + \">\" +\n\t\t\t\t\t\t\"<span title='\" + dayNames[day] + \"'>\" + dayNamesMin[day] + \"</span></th>\";\n\t\t\t\t}\n\t\t\t\tcalender += thead + \"</tr></thead><tbody>\";\n\t\t\t\tdaysInMonth = this._getDaysInMonth(drawYear, drawMonth);\n\t\t\t\tif (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {\n\t\t\t\t\tinst.selectedDay = Math.min(inst.selectedDay, daysInMonth);\n\t\t\t\t}\n\t\t\t\tleadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;\n\t\t\t\tcurRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate\n\t\t\t\tnumRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)\n\t\t\t\tthis.maxRows = numRows;\n\t\t\t\tprintDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));\n\t\t\t\tfor (dRow = 0; dRow < numRows; dRow++) { // create date picker rows\n\t\t\t\t\tcalender += \"<tr>\";\n\t\t\t\t\ttbody = (!showWeek ? \"\" : \"<td class='ui-datepicker-week-col'>\" +\n\t\t\t\t\t\tthis._get(inst, \"calculateWeek\")(printDate) + \"</td>\");\n\t\t\t\t\tfor (dow = 0; dow < 7; dow++) { // create date picker days\n\t\t\t\t\t\tdaySettings = (beforeShowDay ?\n\t\t\t\t\t\t\tbeforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, \"\"]);\n\t\t\t\t\t\totherMonth = (printDate.getMonth() !== drawMonth);\n\t\t\t\t\t\tunselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||\n\t\t\t\t\t\t\t(minDate && printDate < minDate) || (maxDate && printDate > maxDate);\n\t\t\t\t\t\ttbody += \"<td class='\" +\n\t\t\t\t\t\t\t((dow + firstDay + 6) % 7 >= 5 ? \" ui-datepicker-week-end\" : \"\") + // highlight weekends\n\t\t\t\t\t\t\t(otherMonth ? \" ui-datepicker-other-month\" : \"\") + // highlight days from other months\n\t\t\t\t\t\t\t((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key\n\t\t\t\t\t\t\t(defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?\n\t\t\t\t\t\t\t// or defaultDate is current printedDate and defaultDate is selectedDate\n\t\t\t\t\t\t\t\" \" + this._dayOverClass : \"\") + // highlight selected day\n\t\t\t\t\t\t\t(unselectable ? \" \" + this._unselectableClass + \" ui-state-disabled\": \"\") + // highlight unselectable days\n\t\t\t\t\t\t\t(otherMonth && !showOtherMonths ? \"\" : \" \" + daySettings[1] + // highlight custom dates\n\t\t\t\t\t\t\t(printDate.getTime() === currentDate.getTime() ? \" \" + this._currentClass : \"\") + // highlight selected day\n\t\t\t\t\t\t\t(printDate.getTime() === today.getTime() ? \" ui-datepicker-today\" : \"\")) + \"'\" + // highlight today (if different)\n\t\t\t\t\t\t\t((!otherMonth || showOtherMonths) && daySettings[2] ? \" title='\" + daySettings[2].replace(/'/g, \"'\") + \"'\" : \"\") + // cell title\n\t\t\t\t\t\t\t(unselectable ? \"\" : \" data-handler='selectDay' data-event='click' data-month='\" + printDate.getMonth() + \"' data-year='\" + printDate.getFullYear() + \"'\") + \">\" + // actions\n\t\t\t\t\t\t\t(otherMonth && !showOtherMonths ? \" \" : // display for other months\n\t\t\t\t\t\t\t(unselectable ? \"<span class='ui-state-default'>\" + printDate.getDate() + \"</span>\" : \"<a class='ui-state-default\" +\n\t\t\t\t\t\t\t(printDate.getTime() === today.getTime() ? \" ui-state-highlight\" : \"\") +\n\t\t\t\t\t\t\t(printDate.getTime() === currentDate.getTime() ? \" ui-state-active\" : \"\") + // highlight selected day\n\t\t\t\t\t\t\t(otherMonth ? \" ui-priority-secondary\" : \"\") + // distinguish dates from other months\n\t\t\t\t\t\t\t\"' href='#'>\" + printDate.getDate() + \"</a>\")) + \"</td>\"; // display selectable date\n\t\t\t\t\t\tprintDate.setDate(printDate.getDate() + 1);\n\t\t\t\t\t\tprintDate = this._daylightSavingAdjust(printDate);\n\t\t\t\t\t}\n\t\t\t\t\tcalender += tbody + \"</tr>\";\n\t\t\t\t}\n\t\t\t\tdrawMonth++;\n\t\t\t\tif (drawMonth > 11) {\n\t\t\t\t\tdrawMonth = 0;\n\t\t\t\t\tdrawYear++;\n\t\t\t\t}\n\t\t\t\tcalender += \"</tbody></table>\" + (isMultiMonth ? \"</div>\" +\n\t\t\t\t\t\t\t((numMonths[0] > 0 && col === numMonths[1]-1) ? \"<div class='ui-datepicker-row-break'></div>\" : \"\") : \"\");\n\t\t\t\tgroup += calender;\n\t\t\t}\n\t\t\thtml += group;\n\t\t}\n\t\thtml += buttonPanel;\n\t\tinst._keyEvent = false;\n\t\treturn html;\n\t},\n\n\t/* Generate the month and year header. */\n\t_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\tsecondary, monthNames, monthNamesShort) {\n\n\t\tvar inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,\n\t\t\tchangeMonth = this._get(inst, \"changeMonth\"),\n\t\t\tchangeYear = this._get(inst, \"changeYear\"),\n\t\t\tshowMonthAfterYear = this._get(inst, \"showMonthAfterYear\"),\n\t\t\thtml = \"<div class='ui-datepicker-title'>\",\n\t\t\tmonthHtml = \"\";\n\n\t\t// month selection\n\t\tif (secondary || !changeMonth) {\n\t\t\tmonthHtml += \"<span class='ui-datepicker-month'>\" + monthNames[drawMonth] + \"</span>\";\n\t\t} else {\n\t\t\tinMinYear = (minDate && minDate.getFullYear() === drawYear);\n\t\t\tinMaxYear = (maxDate && maxDate.getFullYear() === drawYear);\n\t\t\tmonthHtml += \"<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>\";\n\t\t\tfor ( month = 0; month < 12; month++) {\n\t\t\t\tif ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {\n\t\t\t\t\tmonthHtml += \"<option value='\" + month + \"'\" +\n\t\t\t\t\t\t(month === drawMonth ? \" selected='selected'\" : \"\") +\n\t\t\t\t\t\t\">\" + monthNamesShort[month] + \"</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tmonthHtml += \"</select>\";\n\t\t}\n\n\t\tif (!showMonthAfterYear) {\n\t\t\thtml += monthHtml + (secondary || !(changeMonth && changeYear) ? \" \" : \"\");\n\t\t}\n\n\t\t// year selection\n\t\tif ( !inst.yearshtml ) {\n\t\t\tinst.yearshtml = \"\";\n\t\t\tif (secondary || !changeYear) {\n\t\t\t\thtml += \"<span class='ui-datepicker-year'>\" + drawYear + \"</span>\";\n\t\t\t} else {\n\t\t\t\t// determine range of years to display\n\t\t\t\tyears = this._get(inst, \"yearRange\").split(\":\");\n\t\t\t\tthisYear = new Date().getFullYear();\n\t\t\t\tdetermineYear = function(value) {\n\t\t\t\t\tvar year = (value.match(/c[+\\-].*/) ? drawYear + parseInt(value.substring(1), 10) :\n\t\t\t\t\t\t(value.match(/[+\\-].*/) ? thisYear + parseInt(value, 10) :\n\t\t\t\t\t\tparseInt(value, 10)));\n\t\t\t\t\treturn (isNaN(year) ? thisYear : year);\n\t\t\t\t};\n\t\t\t\tyear = determineYear(years[0]);\n\t\t\t\tendYear = Math.max(year, determineYear(years[1] || \"\"));\n\t\t\t\tyear = (minDate ? Math.max(year, minDate.getFullYear()) : year);\n\t\t\t\tendYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);\n\t\t\t\tinst.yearshtml += \"<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>\";\n\t\t\t\tfor (; year <= endYear; year++) {\n\t\t\t\t\tinst.yearshtml += \"<option value='\" + year + \"'\" +\n\t\t\t\t\t\t(year === drawYear ? \" selected='selected'\" : \"\") +\n\t\t\t\t\t\t\">\" + year + \"</option>\";\n\t\t\t\t}\n\t\t\t\tinst.yearshtml += \"</select>\";\n\n\t\t\t\thtml += inst.yearshtml;\n\t\t\t\tinst.yearshtml = null;\n\t\t\t}\n\t\t}\n\n\t\thtml += this._get(inst, \"yearSuffix\");\n\t\tif (showMonthAfterYear) {\n\t\t\thtml += (secondary || !(changeMonth && changeYear) ? \" \" : \"\") + monthHtml;\n\t\t}\n\t\thtml += \"</div>\"; // Close datepicker_header\n\t\treturn html;\n\t},\n\n\t/* Adjust one of the date sub-fields. */\n\t_adjustInstDate: function(inst, offset, period) {\n\t\tvar year = inst.drawYear + (period === \"Y\" ? offset : 0),\n\t\t\tmonth = inst.drawMonth + (period === \"M\" ? offset : 0),\n\t\t\tday = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === \"D\" ? offset : 0),\n\t\t\tdate = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));\n\n\t\tinst.selectedDay = date.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\tif (period === \"M\" || period === \"Y\") {\n\t\t\tthis._notifyChange(inst);\n\t\t}\n\t},\n\n\t/* Ensure a date is within any min/max bounds. */\n\t_restrictMinMax: function(inst, date) {\n\t\tvar minDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\tnewDate = (minDate && date < minDate ? minDate : date);\n\t\treturn (maxDate && newDate > maxDate ? maxDate : newDate);\n\t},\n\n\t/* Notify change of month/year. */\n\t_notifyChange: function(inst) {\n\t\tvar onChange = this._get(inst, \"onChangeMonthYear\");\n\t\tif (onChange) {\n\t\t\tonChange.apply((inst.input ? inst.input[0] : null),\n\t\t\t\t[inst.selectedYear, inst.selectedMonth + 1, inst]);\n\t\t}\n\t},\n\n\t/* Determine the number of months to show. */\n\t_getNumberOfMonths: function(inst) {\n\t\tvar numMonths = this._get(inst, \"numberOfMonths\");\n\t\treturn (numMonths == null ? [1, 1] : (typeof numMonths === \"number\" ? [1, numMonths] : numMonths));\n\t},\n\n\t/* Determine the current maximum date - ensure no time components are set. */\n\t_getMinMaxDate: function(inst, minMax) {\n\t\treturn this._determineDate(inst, this._get(inst, minMax + \"Date\"), null);\n\t},\n\n\t/* Find the number of days in a given month. */\n\t_getDaysInMonth: function(year, month) {\n\t\treturn 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();\n\t},\n\n\t/* Find the day of the week of the first of a month. */\n\t_getFirstDayOfMonth: function(year, month) {\n\t\treturn new Date(year, month, 1).getDay();\n\t},\n\n\t/* Determines if we should allow a \"next/prev\" month display change. */\n\t_canAdjustMonth: function(inst, offset, curYear, curMonth) {\n\t\tvar numMonths = this._getNumberOfMonths(inst),\n\t\t\tdate = this._daylightSavingAdjust(new Date(curYear,\n\t\t\tcurMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));\n\n\t\tif (offset < 0) {\n\t\t\tdate.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));\n\t\t}\n\t\treturn this._isInRange(inst, date);\n\t},\n\n\t/* Is the given date in the accepted range? */\n\t_isInRange: function(inst, date) {\n\t\tvar yearSplit, currentYear,\n\t\t\tminDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\tminYear = null,\n\t\t\tmaxYear = null,\n\t\t\tyears = this._get(inst, \"yearRange\");\n\t\t\tif (years){\n\t\t\t\tyearSplit = years.split(\":\");\n\t\t\t\tcurrentYear = new Date().getFullYear();\n\t\t\t\tminYear = parseInt(yearSplit[0], 10);\n\t\t\t\tmaxYear = parseInt(yearSplit[1], 10);\n\t\t\t\tif ( yearSplit[0].match(/[+\\-].*/) ) {\n\t\t\t\t\tminYear += currentYear;\n\t\t\t\t}\n\t\t\t\tif ( yearSplit[1].match(/[+\\-].*/) ) {\n\t\t\t\t\tmaxYear += currentYear;\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn ((!minDate || date.getTime() >= minDate.getTime()) &&\n\t\t\t(!maxDate || date.getTime() <= maxDate.getTime()) &&\n\t\t\t(!minYear || date.getFullYear() >= minYear) &&\n\t\t\t(!maxYear || date.getFullYear() <= maxYear));\n\t},\n\n\t/* Provide the configuration settings for formatting/parsing. */\n\t_getFormatConfig: function(inst) {\n\t\tvar shortYearCutoff = this._get(inst, \"shortYearCutoff\");\n\t\tshortYearCutoff = (typeof shortYearCutoff !== \"string\" ? shortYearCutoff :\n\t\t\tnew Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));\n\t\treturn {shortYearCutoff: shortYearCutoff,\n\t\t\tdayNamesShort: this._get(inst, \"dayNamesShort\"), dayNames: this._get(inst, \"dayNames\"),\n\t\t\tmonthNamesShort: this._get(inst, \"monthNamesShort\"), monthNames: this._get(inst, \"monthNames\")};\n\t},\n\n\t/* Format the given date for display. */\n\t_formatDate: function(inst, day, month, year) {\n\t\tif (!day) {\n\t\t\tinst.currentDay = inst.selectedDay;\n\t\t\tinst.currentMonth = inst.selectedMonth;\n\t\t\tinst.currentYear = inst.selectedYear;\n\t\t}\n\t\tvar date = (day ? (typeof day === \"object\" ? day :\n\t\t\tthis._daylightSavingAdjust(new Date(year, month, day))) :\n\t\t\tthis._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\treturn this.formatDate(this._get(inst, \"dateFormat\"), date, this._getFormatConfig(inst));\n\t}\n});\n\n/*\n * Bind hover events for datepicker elements.\n * Done via delegate so the binding only occurs once in the lifetime of the parent div.\n * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.\n */\nfunction bindHover(dpDiv) {\n\tvar selector = \"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";\n\treturn dpDiv.delegate(selector, \"mouseout\", function() {\n\t\t\t$(this).removeClass(\"ui-state-hover\");\n\t\t\tif (this.className.indexOf(\"ui-datepicker-prev\") !== -1) {\n\t\t\t\t$(this).removeClass(\"ui-datepicker-prev-hover\");\n\t\t\t}\n\t\t\tif (this.className.indexOf(\"ui-datepicker-next\") !== -1) {\n\t\t\t\t$(this).removeClass(\"ui-datepicker-next-hover\");\n\t\t\t}\n\t\t})\n\t\t.delegate(selector, \"mouseover\", function(){\n\t\t\tif (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {\n\t\t\t\t$(this).parents(\".ui-datepicker-calendar\").find(\"a\").removeClass(\"ui-state-hover\");\n\t\t\t\t$(this).addClass(\"ui-state-hover\");\n\t\t\t\tif (this.className.indexOf(\"ui-datepicker-prev\") !== -1) {\n\t\t\t\t\t$(this).addClass(\"ui-datepicker-prev-hover\");\n\t\t\t\t}\n\t\t\t\tif (this.className.indexOf(\"ui-datepicker-next\") !== -1) {\n\t\t\t\t\t$(this).addClass(\"ui-datepicker-next-hover\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n}\n\n/* jQuery extend now ignores nulls! */\nfunction extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}\n\n/* Invoke the datepicker functionality.\n @param options string - a command, optionally followed by additional parameters or\n\t\t\t\t\tObject - settings for attaching new datepicker functionality\n @return jQuery object */\n$.fn.datepicker = function(options){\n\n\t/* Verify an empty collection wasn't passed - Fixes #6976 */\n\tif ( !this.length ) {\n\t\treturn this;\n\t}\n\n\t/* Initialise the date picker. */\n\tif (!$.datepicker.initialized) {\n\t\t$(document).mousedown($.datepicker._checkExternalClick);\n\t\t$.datepicker.initialized = true;\n\t}\n\n\t/* Append datepicker main container to body if not exist. */\n\tif ($(\"#\"+$.datepicker._mainDivId).length === 0) {\n\t\t$(\"body\").append($.datepicker.dpDiv);\n\t}\n\n\tvar otherArgs = Array.prototype.slice.call(arguments, 1);\n\tif (typeof options === \"string\" && (options === \"isDisabled\" || options === \"getDate\" || options === \"widget\")) {\n\t\treturn $.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\tapply($.datepicker, [this[0]].concat(otherArgs));\n\t}\n\tif (options === \"option\" && arguments.length === 2 && typeof arguments[1] === \"string\") {\n\t\treturn $.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\tapply($.datepicker, [this[0]].concat(otherArgs));\n\t}\n\treturn this.each(function() {\n\t\ttypeof options === \"string\" ?\n\t\t\t$.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\t\tapply($.datepicker, [this].concat(otherArgs)) :\n\t\t\t$.datepicker._attachDatepicker(this, options);\n\t});\n};\n\n$.datepicker = new Datepicker(); // singleton instance\n$.datepicker.initialized = false;\n$.datepicker.uuid = new Date().getTime();\n$.datepicker.version = \"1.10.4\";\n\n})(jQuery);\n","var jQuery = require('jquery');\nrequire('./core');\nrequire('./widget');\nrequire('./position');\n\n/*!\n * jQuery UI Menu 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/menu/\n *\n * Depends:\n *\tjquery.ui.core.js\n *\tjquery.ui.widget.js\n *\tjquery.ui.position.js\n */\n(function( $, undefined ) {\n\n$.widget( \"ui.menu\", {\n\tversion: \"1.10.4\",\n\tdefaultElement: \"<ul>\",\n\tdelay: 300,\n\toptions: {\n\t\ticons: {\n\t\t\tsubmenu: \"ui-icon-carat-1-e\"\n\t\t},\n\t\tmenus: \"ul\",\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"right top\"\n\t\t},\n\t\trole: \"menu\",\n\n\t\t// callbacks\n\t\tblur: null,\n\t\tfocus: null,\n\t\tselect: null\n\t},\n\n\t_create: function() {\n\t\tthis.activeMenu = this.element;\n\t\t// flag used to prevent firing of the click handler\n\t\t// as the event bubbles up through nested menus\n\t\tthis.mouseHandled = false;\n\t\tthis.element\n\t\t\t.uniqueId()\n\t\t\t.addClass( \"ui-menu ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.toggleClass( \"ui-menu-icons\", !!this.element.find( \".ui-icon\" ).length )\n\t\t\t.attr({\n\t\t\t\trole: this.options.role,\n\t\t\t\ttabIndex: 0\n\t\t\t})\n\t\t\t// need to catch all clicks on disabled menu\n\t\t\t// not possible through _on\n\t\t\t.bind( \"click\" + this.eventNamespace, $.proxy(function( event ) {\n\t\t\t\tif ( this.options.disabled ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}, this ));\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis.element\n\t\t\t\t.addClass( \"ui-state-disabled\" )\n\t\t\t\t.attr( \"aria-disabled\", \"true\" );\n\t\t}\n\n\t\tthis._on({\n\t\t\t// Prevent focus from sticking to links inside menu after clicking\n\t\t\t// them (focus should always stay on UL during navigation).\n\t\t\t\"mousedown .ui-menu-item > a\": function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\t\"click .ui-state-disabled > a\": function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\t\"click .ui-menu-item:has(a)\": function( event ) {\n\t\t\t\tvar target = $( event.target ).closest( \".ui-menu-item\" );\n\t\t\t\tif ( !this.mouseHandled && target.not( \".ui-state-disabled\" ).length ) {\n\t\t\t\t\tthis.select( event );\n\n\t\t\t\t\t// Only set the mouseHandled flag if the event will bubble, see #9469.\n\t\t\t\t\tif ( !event.isPropagationStopped() ) {\n\t\t\t\t\t\tthis.mouseHandled = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Open submenu on click\n\t\t\t\t\tif ( target.has( \".ui-menu\" ).length ) {\n\t\t\t\t\t\tthis.expand( event );\n\t\t\t\t\t} else if ( !this.element.is( \":focus\" ) && $( this.document[ 0 ].activeElement ).closest( \".ui-menu\" ).length ) {\n\n\t\t\t\t\t\t// Redirect focus to the menu\n\t\t\t\t\t\tthis.element.trigger( \"focus\", [ true ] );\n\n\t\t\t\t\t\t// If the active item is on the top level, let it stay active.\n\t\t\t\t\t\t// Otherwise, blur the active item since it is no longer visible.\n\t\t\t\t\t\tif ( this.active && this.active.parents( \".ui-menu\" ).length === 1 ) {\n\t\t\t\t\t\t\tclearTimeout( this.timer );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"mouseenter .ui-menu-item\": function( event ) {\n\t\t\t\tvar target = $( event.currentTarget );\n\t\t\t\t// Remove ui-state-active class from siblings of the newly focused menu item\n\t\t\t\t// to avoid a jump caused by adjacent elements both having a class with a border\n\t\t\t\ttarget.siblings().children( \".ui-state-active\" ).removeClass( \"ui-state-active\" );\n\t\t\t\tthis.focus( event, target );\n\t\t\t},\n\t\t\tmouseleave: \"collapseAll\",\n\t\t\t\"mouseleave .ui-menu\": \"collapseAll\",\n\t\t\tfocus: function( event, keepActiveItem ) {\n\t\t\t\t// If there's already an active item, keep it active\n\t\t\t\t// If not, activate the first item\n\t\t\t\tvar item = this.active || this.element.children( \".ui-menu-item\" ).eq( 0 );\n\n\t\t\t\tif ( !keepActiveItem ) {\n\t\t\t\t\tthis.focus( event, item );\n\t\t\t\t}\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tthis._delay(function() {\n\t\t\t\t\tif ( !$.contains( this.element[0], this.document[0].activeElement ) ) {\n\t\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\tkeydown: \"_keydown\"\n\t\t});\n\n\t\tthis.refresh();\n\n\t\t// Clicks outside of a menu collapse any open menus\n\t\tthis._on( this.document, {\n\t\t\tclick: function( event ) {\n\t\t\t\tif ( !$( event.target ).closest( \".ui-menu\" ).length ) {\n\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t}\n\n\t\t\t\t// Reset the mouseHandled flag\n\t\t\t\tthis.mouseHandled = false;\n\t\t\t}\n\t\t});\n\t},\n\n\t_destroy: function() {\n\t\t// Destroy (sub)menus\n\t\tthis.element\n\t\t\t.removeAttr( \"aria-activedescendant\" )\n\t\t\t.find( \".ui-menu\" ).addBack()\n\t\t\t\t.removeClass( \"ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.show();\n\n\t\t// Destroy menu items\n\t\tthis.element.find( \".ui-menu-item\" )\n\t\t\t.removeClass( \"ui-menu-item\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t.children( \"a\" )\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.removeClass( \"ui-corner-all ui-state-hover\" )\n\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"aria-haspopup\" )\n\t\t\t\t.children().each( function() {\n\t\t\t\t\tvar elem = $( this );\n\t\t\t\t\tif ( elem.data( \"ui-menu-submenu-carat\" ) ) {\n\t\t\t\t\t\telem.remove();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t// Destroy menu dividers\n\t\tthis.element.find( \".ui-menu-divider\" ).removeClass( \"ui-menu-divider ui-widget-content\" );\n\t},\n\n\t_keydown: function( event ) {\n\t\tvar match, prev, character, skip, regex,\n\t\t\tpreventDefault = true;\n\n\t\tfunction escape( value ) {\n\t\t\treturn value.replace( /[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\" );\n\t\t}\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\tthis.previousPage( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\tthis.nextPage( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.HOME:\n\t\t\tthis._move( \"first\", \"first\", event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.END:\n\t\t\tthis._move( \"last\", \"last\", event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.UP:\n\t\t\tthis.previous( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.DOWN:\n\t\t\tthis.next( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.LEFT:\n\t\t\tthis.collapse( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.RIGHT:\n\t\t\tif ( this.active && !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\t\tthis.expand( event );\n\t\t\t}\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.ENTER:\n\t\tcase $.ui.keyCode.SPACE:\n\t\t\tthis._activate( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.ESCAPE:\n\t\t\tthis.collapse( event );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpreventDefault = false;\n\t\t\tprev = this.previousFilter || \"\";\n\t\t\tcharacter = String.fromCharCode( event.keyCode );\n\t\t\tskip = false;\n\n\t\t\tclearTimeout( this.filterTimer );\n\n\t\t\tif ( character === prev ) {\n\t\t\t\tskip = true;\n\t\t\t} else {\n\t\t\t\tcharacter = prev + character;\n\t\t\t}\n\n\t\t\tregex = new RegExp( \"^\" + escape( character ), \"i\" );\n\t\t\tmatch = this.activeMenu.children( \".ui-menu-item\" ).filter(function() {\n\t\t\t\treturn regex.test( $( this ).children( \"a\" ).text() );\n\t\t\t});\n\t\t\tmatch = skip && match.index( this.active.next() ) !== -1 ?\n\t\t\t\tthis.active.nextAll( \".ui-menu-item\" ) :\n\t\t\t\tmatch;\n\n\t\t\t// If no matches on the current filter, reset to the last character pressed\n\t\t\t// to move down the menu to the first item that starts with that character\n\t\t\tif ( !match.length ) {\n\t\t\t\tcharacter = String.fromCharCode( event.keyCode );\n\t\t\t\tregex = new RegExp( \"^\" + escape( character ), \"i\" );\n\t\t\t\tmatch = this.activeMenu.children( \".ui-menu-item\" ).filter(function() {\n\t\t\t\t\treturn regex.test( $( this ).children( \"a\" ).text() );\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( match.length ) {\n\t\t\t\tthis.focus( event, match );\n\t\t\t\tif ( match.length > 1 ) {\n\t\t\t\t\tthis.previousFilter = character;\n\t\t\t\t\tthis.filterTimer = this._delay(function() {\n\t\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t\t}, 1000 );\n\t\t\t\t} else {\n\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdelete this.previousFilter;\n\t\t\t}\n\t\t}\n\n\t\tif ( preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t_activate: function( event ) {\n\t\tif ( !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\tif ( this.active.children( \"a[aria-haspopup='true']\" ).length ) {\n\t\t\t\tthis.expand( event );\n\t\t\t} else {\n\t\t\t\tthis.select( event );\n\t\t\t}\n\t\t}\n\t},\n\n\trefresh: function() {\n\t\tvar menus,\n\t\t\ticon = this.options.icons.submenu,\n\t\t\tsubmenus = this.element.find( this.options.menus );\n\n\t\tthis.element.toggleClass( \"ui-menu-icons\", !!this.element.find( \".ui-icon\" ).length );\n\n\t\t// Initialize nested menus\n\t\tsubmenus.filter( \":not(.ui-menu)\" )\n\t\t\t.addClass( \"ui-menu ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.hide()\n\t\t\t.attr({\n\t\t\t\trole: this.options.role,\n\t\t\t\t\"aria-hidden\": \"true\",\n\t\t\t\t\"aria-expanded\": \"false\"\n\t\t\t})\n\t\t\t.each(function() {\n\t\t\t\tvar menu = $( this ),\n\t\t\t\t\titem = menu.prev( \"a\" ),\n\t\t\t\t\tsubmenuCarat = $( \"<span>\" )\n\t\t\t\t\t\t.addClass( \"ui-menu-icon ui-icon \" + icon )\n\t\t\t\t\t\t.data( \"ui-menu-submenu-carat\", true );\n\n\t\t\t\titem\n\t\t\t\t\t.attr( \"aria-haspopup\", \"true\" )\n\t\t\t\t\t.prepend( submenuCarat );\n\t\t\t\tmenu.attr( \"aria-labelledby\", item.attr( \"id\" ) );\n\t\t\t});\n\n\t\tmenus = submenus.add( this.element );\n\n\t\t// Don't refresh list items that are already adapted\n\t\tmenus.children( \":not(.ui-menu-item):has(a)\" )\n\t\t\t.addClass( \"ui-menu-item\" )\n\t\t\t.attr( \"role\", \"presentation\" )\n\t\t\t.children( \"a\" )\n\t\t\t\t.uniqueId()\n\t\t\t\t.addClass( \"ui-corner-all\" )\n\t\t\t\t.attr({\n\t\t\t\t\ttabIndex: -1,\n\t\t\t\t\trole: this._itemRole()\n\t\t\t\t});\n\n\t\t// Initialize unlinked menu-items containing spaces and/or dashes only as dividers\n\t\tmenus.children( \":not(.ui-menu-item)\" ).each(function() {\n\t\t\tvar item = $( this );\n\t\t\t// hyphen, em dash, en dash\n\t\t\tif ( !/[^\\-\\u2014\\u2013\\s]/.test( item.text() ) ) {\n\t\t\t\titem.addClass( \"ui-widget-content ui-menu-divider\" );\n\t\t\t}\n\t\t});\n\n\t\t// Add aria-disabled attribute to any disabled menu item\n\t\tmenus.children( \".ui-state-disabled\" ).attr( \"aria-disabled\", \"true\" );\n\n\t\t// If the active item has been removed, blur the menu\n\t\tif ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\t\t\tthis.blur();\n\t\t}\n\t},\n\n\t_itemRole: function() {\n\t\treturn {\n\t\t\tmenu: \"menuitem\",\n\t\t\tlistbox: \"option\"\n\t\t}[ this.options.role ];\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis.element.find( \".ui-menu-icon\" )\n\t\t\t\t.removeClass( this.options.icons.submenu )\n\t\t\t\t.addClass( value.submenu );\n\t\t}\n\t\tthis._super( key, value );\n\t},\n\n\tfocus: function( event, item ) {\n\t\tvar nested, focused;\n\t\tthis.blur( event, event && event.type === \"focus\" );\n\n\t\tthis._scrollIntoView( item );\n\n\t\tthis.active = item.first();\n\t\tfocused = this.active.children( \"a\" ).addClass( \"ui-state-focus\" );\n\t\t// Only update aria-activedescendant if there's a role\n\t\t// otherwise we assume focus is managed elsewhere\n\t\tif ( this.options.role ) {\n\t\t\tthis.element.attr( \"aria-activedescendant\", focused.attr( \"id\" ) );\n\t\t}\n\n\t\t// Highlight active parent menu item, if any\n\t\tthis.active\n\t\t\t.parent()\n\t\t\t.closest( \".ui-menu-item\" )\n\t\t\t.children( \"a:first\" )\n\t\t\t.addClass( \"ui-state-active\" );\n\n\t\tif ( event && event.type === \"keydown\" ) {\n\t\t\tthis._close();\n\t\t} else {\n\t\t\tthis.timer = this._delay(function() {\n\t\t\t\tthis._close();\n\t\t\t}, this.delay );\n\t\t}\n\n\t\tnested = item.children( \".ui-menu\" );\n\t\tif ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {\n\t\t\tthis._startOpening(nested);\n\t\t}\n\t\tthis.activeMenu = item.parent();\n\n\t\tthis._trigger( \"focus\", event, { item: item } );\n\t},\n\n\t_scrollIntoView: function( item ) {\n\t\tvar borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;\n\t\tif ( this._hasScroll() ) {\n\t\t\tborderTop = parseFloat( $.css( this.activeMenu[0], \"borderTopWidth\" ) ) || 0;\n\t\t\tpaddingTop = parseFloat( $.css( this.activeMenu[0], \"paddingTop\" ) ) || 0;\n\t\t\toffset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;\n\t\t\tscroll = this.activeMenu.scrollTop();\n\t\t\telementHeight = this.activeMenu.height();\n\t\t\titemHeight = item.height();\n\n\t\t\tif ( offset < 0 ) {\n\t\t\t\tthis.activeMenu.scrollTop( scroll + offset );\n\t\t\t} else if ( offset + itemHeight > elementHeight ) {\n\t\t\t\tthis.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );\n\t\t\t}\n\t\t}\n\t},\n\n\tblur: function( event, fromFocus ) {\n\t\tif ( !fromFocus ) {\n\t\t\tclearTimeout( this.timer );\n\t\t}\n\n\t\tif ( !this.active ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active.children( \"a\" ).removeClass( \"ui-state-focus\" );\n\t\tthis.active = null;\n\n\t\tthis._trigger( \"blur\", event, { item: this.active } );\n\t},\n\n\t_startOpening: function( submenu ) {\n\t\tclearTimeout( this.timer );\n\n\t\t// Don't open if already open fixes a Firefox bug that caused a .5 pixel\n\t\t// shift in the submenu position when mousing over the carat icon\n\t\tif ( submenu.attr( \"aria-hidden\" ) !== \"true\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.timer = this._delay(function() {\n\t\t\tthis._close();\n\t\t\tthis._open( submenu );\n\t\t}, this.delay );\n\t},\n\n\t_open: function( submenu ) {\n\t\tvar position = $.extend({\n\t\t\tof: this.active\n\t\t}, this.options.position );\n\n\t\tclearTimeout( this.timer );\n\t\tthis.element.find( \".ui-menu\" ).not( submenu.parents( \".ui-menu\" ) )\n\t\t\t.hide()\n\t\t\t.attr( \"aria-hidden\", \"true\" );\n\n\t\tsubmenu\n\t\t\t.show()\n\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t.attr( \"aria-expanded\", \"true\" )\n\t\t\t.position( position );\n\t},\n\n\tcollapseAll: function( event, all ) {\n\t\tclearTimeout( this.timer );\n\t\tthis.timer = this._delay(function() {\n\t\t\t// If we were passed an event, look for the submenu that contains the event\n\t\t\tvar currentMenu = all ? this.element :\n\t\t\t\t$( event && event.target ).closest( this.element.find( \".ui-menu\" ) );\n\n\t\t\t// If we found no valid submenu ancestor, use the main menu to close all sub menus anyway\n\t\t\tif ( !currentMenu.length ) {\n\t\t\t\tcurrentMenu = this.element;\n\t\t\t}\n\n\t\t\tthis._close( currentMenu );\n\n\t\t\tthis.blur( event );\n\t\t\tthis.activeMenu = currentMenu;\n\t\t}, this.delay );\n\t},\n\n\t// With no arguments, closes the currently active menu - if nothing is active\n\t// it closes all menus. If passed an argument, it will search for menus BELOW\n\t_close: function( startMenu ) {\n\t\tif ( !startMenu ) {\n\t\t\tstartMenu = this.active ? this.active.parent() : this.element;\n\t\t}\n\n\t\tstartMenu\n\t\t\t.find( \".ui-menu\" )\n\t\t\t\t.hide()\n\t\t\t\t.attr( \"aria-hidden\", \"true\" )\n\t\t\t\t.attr( \"aria-expanded\", \"false\" )\n\t\t\t.end()\n\t\t\t.find( \"a.ui-state-active\" )\n\t\t\t\t.removeClass( \"ui-state-active\" );\n\t},\n\n\tcollapse: function( event ) {\n\t\tvar newItem = this.active &&\n\t\t\tthis.active.parent().closest( \".ui-menu-item\", this.element );\n\t\tif ( newItem && newItem.length ) {\n\t\t\tthis._close();\n\t\t\tthis.focus( event, newItem );\n\t\t}\n\t},\n\n\texpand: function( event ) {\n\t\tvar newItem = this.active &&\n\t\t\tthis.active\n\t\t\t\t.children( \".ui-menu \" )\n\t\t\t\t.children( \".ui-menu-item\" )\n\t\t\t\t.first();\n\n\t\tif ( newItem && newItem.length ) {\n\t\t\tthis._open( newItem.parent() );\n\n\t\t\t// Delay so Firefox will not hide activedescendant change in expanding submenu from AT\n\t\t\tthis._delay(function() {\n\t\t\t\tthis.focus( event, newItem );\n\t\t\t});\n\t\t}\n\t},\n\n\tnext: function( event ) {\n\t\tthis._move( \"next\", \"first\", event );\n\t},\n\n\tprevious: function( event ) {\n\t\tthis._move( \"prev\", \"last\", event );\n\t},\n\n\tisFirstItem: function() {\n\t\treturn this.active && !this.active.prevAll( \".ui-menu-item\" ).length;\n\t},\n\n\tisLastItem: function() {\n\t\treturn this.active && !this.active.nextAll( \".ui-menu-item\" ).length;\n\t},\n\n\t_move: function( direction, filter, event ) {\n\t\tvar next;\n\t\tif ( this.active ) {\n\t\t\tif ( direction === \"first\" || direction === \"last\" ) {\n\t\t\t\tnext = this.active\n\t\t\t\t\t[ direction === \"first\" ? \"prevAll\" : \"nextAll\" ]( \".ui-menu-item\" )\n\t\t\t\t\t.eq( -1 );\n\t\t\t} else {\n\t\t\t\tnext = this.active\n\t\t\t\t\t[ direction + \"All\" ]( \".ui-menu-item\" )\n\t\t\t\t\t.eq( 0 );\n\t\t\t}\n\t\t}\n\t\tif ( !next || !next.length || !this.active ) {\n\t\t\tnext = this.activeMenu.children( \".ui-menu-item\" )[ filter ]();\n\t\t}\n\n\t\tthis.focus( event, next );\n\t},\n\n\tnextPage: function( event ) {\n\t\tvar item, base, height;\n\n\t\tif ( !this.active ) {\n\t\t\tthis.next( event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.isLastItem() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( this._hasScroll() ) {\n\t\t\tbase = this.active.offset().top;\n\t\t\theight = this.element.height();\n\t\t\tthis.active.nextAll( \".ui-menu-item\" ).each(function() {\n\t\t\t\titem = $( this );\n\t\t\t\treturn item.offset().top - base - height < 0;\n\t\t\t});\n\n\t\t\tthis.focus( event, item );\n\t\t} else {\n\t\t\tthis.focus( event, this.activeMenu.children( \".ui-menu-item\" )\n\t\t\t\t[ !this.active ? \"first\" : \"last\" ]() );\n\t\t}\n\t},\n\n\tpreviousPage: function( event ) {\n\t\tvar item, base, height;\n\t\tif ( !this.active ) {\n\t\t\tthis.next( event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.isFirstItem() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( this._hasScroll() ) {\n\t\t\tbase = this.active.offset().top;\n\t\t\theight = this.element.height();\n\t\t\tthis.active.prevAll( \".ui-menu-item\" ).each(function() {\n\t\t\t\titem = $( this );\n\t\t\t\treturn item.offset().top - base + height > 0;\n\t\t\t});\n\n\t\t\tthis.focus( event, item );\n\t\t} else {\n\t\t\tthis.focus( event, this.activeMenu.children( \".ui-menu-item\" ).first() );\n\t\t}\n\t},\n\n\t_hasScroll: function() {\n\t\treturn this.element.outerHeight() < this.element.prop( \"scrollHeight\" );\n\t},\n\n\tselect: function( event ) {\n\t\t// TODO: It should never be possible to not have an active item at this\n\t\t// point, but the tests don't trigger mouseenter before click.\n\t\tthis.active = this.active || $( event.target ).closest( \".ui-menu-item\" );\n\t\tvar ui = { item: this.active };\n\t\tif ( !this.active.has( \".ui-menu\" ).length ) {\n\t\t\tthis.collapseAll( event, true );\n\t\t}\n\t\tthis._trigger( \"select\", event, ui );\n\t}\n});\n\n}( jQuery ));\n","var jQuery = require('jquery');\nrequire('./widget');\n\n/*!\n * jQuery UI Mouse 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/mouse/\n *\n * Depends:\n *\tjquery.ui.widget.js\n */\n(function( $, undefined ) {\n\nvar mouseHandled = false;\n$( document ).mouseup( function() {\n\tmouseHandled = false;\n});\n\n$.widget(\"ui.mouse\", {\n\tversion: \"1.10.4\",\n\toptions: {\n\t\tcancel: \"input,textarea,button,select,option\",\n\t\tdistance: 1,\n\t\tdelay: 0\n\t},\n\t_mouseInit: function() {\n\t\tvar that = this;\n\n\t\tthis.element\n\t\t\t.bind(\"mousedown.\"+this.widgetName, function(event) {\n\t\t\t\treturn that._mouseDown(event);\n\t\t\t})\n\t\t\t.bind(\"click.\"+this.widgetName, function(event) {\n\t\t\t\tif (true === $.data(event.target, that.widgetName + \".preventClickEvent\")) {\n\t\t\t\t\t$.removeData(event.target, that.widgetName + \".preventClickEvent\");\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis.started = false;\n\t},\n\n\t// TODO: make sure destroying one instance of mouse doesn't mess with\n\t// other instances of mouse\n\t_mouseDestroy: function() {\n\t\tthis.element.unbind(\".\"+this.widgetName);\n\t\tif ( this._mouseMoveDelegate ) {\n\t\t\t$(document)\n\t\t\t\t.unbind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t\t.unbind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\t\t}\n\t},\n\n\t_mouseDown: function(event) {\n\t\t// don't let more than one widget handle mouseStart\n\t\tif( mouseHandled ) { return; }\n\n\t\t// we may have missed mouseup (out of window)\n\t\t(this._mouseStarted && this._mouseUp(event));\n\n\t\tthis._mouseDownEvent = event;\n\n\t\tvar that = this,\n\t\t\tbtnIsLeft = (event.which === 1),\n\t\t\t// event.target.nodeName works around a bug in IE 8 with\n\t\t\t// disabled inputs (#7620)\n\t\t\telIsCancel = (typeof this.options.cancel === \"string\" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);\n\t\tif (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.mouseDelayMet = !this.options.delay;\n\t\tif (!this.mouseDelayMet) {\n\t\t\tthis._mouseDelayTimer = setTimeout(function() {\n\t\t\t\tthat.mouseDelayMet = true;\n\t\t\t}, this.options.delay);\n\t\t}\n\n\t\tif (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {\n\t\t\tthis._mouseStarted = (this._mouseStart(event) !== false);\n\t\t\tif (!this._mouseStarted) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Click event may never have fired (Gecko & Opera)\n\t\tif (true === $.data(event.target, this.widgetName + \".preventClickEvent\")) {\n\t\t\t$.removeData(event.target, this.widgetName + \".preventClickEvent\");\n\t\t}\n\n\t\t// these delegates are required to keep context\n\t\tthis._mouseMoveDelegate = function(event) {\n\t\t\treturn that._mouseMove(event);\n\t\t};\n\t\tthis._mouseUpDelegate = function(event) {\n\t\t\treturn that._mouseUp(event);\n\t\t};\n\t\t$(document)\n\t\t\t.bind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t.bind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\n\t\tevent.preventDefault();\n\n\t\tmouseHandled = true;\n\t\treturn true;\n\t},\n\n\t_mouseMove: function(event) {\n\t\t// IE mouseup check - mouseup happened when mouse was out of window\n\t\tif ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {\n\t\t\treturn this._mouseUp(event);\n\t\t}\n\n\t\tif (this._mouseStarted) {\n\t\t\tthis._mouseDrag(event);\n\t\t\treturn event.preventDefault();\n\t\t}\n\n\t\tif (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {\n\t\t\tthis._mouseStarted =\n\t\t\t\t(this._mouseStart(this._mouseDownEvent, event) !== false);\n\t\t\t(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));\n\t\t}\n\n\t\treturn !this._mouseStarted;\n\t},\n\n\t_mouseUp: function(event) {\n\t\t$(document)\n\t\t\t.unbind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t.unbind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\n\t\tif (this._mouseStarted) {\n\t\t\tthis._mouseStarted = false;\n\n\t\t\tif (event.target === this._mouseDownEvent.target) {\n\t\t\t\t$.data(event.target, this.widgetName + \".preventClickEvent\", true);\n\t\t\t}\n\n\t\t\tthis._mouseStop(event);\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseDistanceMet: function(event) {\n\t\treturn (Math.max(\n\t\t\t\tMath.abs(this._mouseDownEvent.pageX - event.pageX),\n\t\t\t\tMath.abs(this._mouseDownEvent.pageY - event.pageY)\n\t\t\t) >= this.options.distance\n\t\t);\n\t},\n\n\t_mouseDelayMet: function(/* event */) {\n\t\treturn this.mouseDelayMet;\n\t},\n\n\t// These are placeholder methods, to be overriden by extending plugin\n\t_mouseStart: function(/* event */) {},\n\t_mouseDrag: function(/* event */) {},\n\t_mouseStop: function(/* event */) {},\n\t_mouseCapture: function(/* event */) { return true; }\n});\n\n})(jQuery);\n","var jQuery = require('jquery');\n\n/*!\n * jQuery UI Position 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/position/\n */\n(function( $, undefined ) {\n\n$.ui = $.ui || {};\n\nvar cachedScrollbarWidth,\n\tmax = Math.max,\n\tabs = Math.abs,\n\tround = Math.round,\n\trhorizontal = /left|center|right/,\n\trvertical = /top|center|bottom/,\n\troffset = /[\\+\\-]\\d+(\\.[\\d]+)?%?/,\n\trposition = /^\\w+/,\n\trpercent = /%$/,\n\t_position = $.fn.position;\n\nfunction getOffsets( offsets, width, height ) {\n\treturn [\n\t\tparseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),\n\t\tparseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )\n\t];\n}\n\nfunction parseCss( element, property ) {\n\treturn parseInt( $.css( element, property ), 10 ) || 0;\n}\n\nfunction getDimensions( elem ) {\n\tvar raw = elem[0];\n\tif ( raw.nodeType === 9 ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: 0, left: 0 }\n\t\t};\n\t}\n\tif ( $.isWindow( raw ) ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: elem.scrollTop(), left: elem.scrollLeft() }\n\t\t};\n\t}\n\tif ( raw.preventDefault ) {\n\t\treturn {\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\toffset: { top: raw.pageY, left: raw.pageX }\n\t\t};\n\t}\n\treturn {\n\t\twidth: elem.outerWidth(),\n\t\theight: elem.outerHeight(),\n\t\toffset: elem.offset()\n\t};\n}\n\n$.position = {\n\tscrollbarWidth: function() {\n\t\tif ( cachedScrollbarWidth !== undefined ) {\n\t\t\treturn cachedScrollbarWidth;\n\t\t}\n\t\tvar w1, w2,\n\t\t\tdiv = $( \"<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>\" ),\n\t\t\tinnerDiv = div.children()[0];\n\n\t\t$( \"body\" ).append( div );\n\t\tw1 = innerDiv.offsetWidth;\n\t\tdiv.css( \"overflow\", \"scroll\" );\n\n\t\tw2 = innerDiv.offsetWidth;\n\n\t\tif ( w1 === w2 ) {\n\t\t\tw2 = div[0].clientWidth;\n\t\t}\n\n\t\tdiv.remove();\n\n\t\treturn (cachedScrollbarWidth = w1 - w2);\n\t},\n\tgetScrollInfo: function( within ) {\n\t\tvar overflowX = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-x\" ),\n\t\t\toverflowY = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-y\" ),\n\t\t\thasOverflowX = overflowX === \"scroll\" ||\n\t\t\t\t( overflowX === \"auto\" && within.width < within.element[0].scrollWidth ),\n\t\t\thasOverflowY = overflowY === \"scroll\" ||\n\t\t\t\t( overflowY === \"auto\" && within.height < within.element[0].scrollHeight );\n\t\treturn {\n\t\t\twidth: hasOverflowY ? $.position.scrollbarWidth() : 0,\n\t\t\theight: hasOverflowX ? $.position.scrollbarWidth() : 0\n\t\t};\n\t},\n\tgetWithinInfo: function( element ) {\n\t\tvar withinElement = $( element || window ),\n\t\t\tisWindow = $.isWindow( withinElement[0] ),\n\t\t\tisDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;\n\t\treturn {\n\t\t\telement: withinElement,\n\t\t\tisWindow: isWindow,\n\t\t\tisDocument: isDocument,\n\t\t\toffset: withinElement.offset() || { left: 0, top: 0 },\n\t\t\tscrollLeft: withinElement.scrollLeft(),\n\t\t\tscrollTop: withinElement.scrollTop(),\n\t\t\twidth: isWindow ? withinElement.width() : withinElement.outerWidth(),\n\t\t\theight: isWindow ? withinElement.height() : withinElement.outerHeight()\n\t\t};\n\t}\n};\n\n$.fn.position = function( options ) {\n\tif ( !options || !options.of ) {\n\t\treturn _position.apply( this, arguments );\n\t}\n\n\t// make a copy, we don't want to modify arguments\n\toptions = $.extend( {}, options );\n\n\tvar atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,\n\t\ttarget = $( options.of ),\n\t\twithin = $.position.getWithinInfo( options.within ),\n\t\tscrollInfo = $.position.getScrollInfo( within ),\n\t\tcollision = ( options.collision || \"flip\" ).split( \" \" ),\n\t\toffsets = {};\n\n\tdimensions = getDimensions( target );\n\tif ( target[0].preventDefault ) {\n\t\t// force left top to allow flipping\n\t\toptions.at = \"left top\";\n\t}\n\ttargetWidth = dimensions.width;\n\ttargetHeight = dimensions.height;\n\ttargetOffset = dimensions.offset;\n\t// clone to reuse original targetOffset later\n\tbasePosition = $.extend( {}, targetOffset );\n\n\t// force my and at to have valid horizontal and vertical positions\n\t// if a value is missing or invalid, it will be converted to center\n\t$.each( [ \"my\", \"at\" ], function() {\n\t\tvar pos = ( options[ this ] || \"\" ).split( \" \" ),\n\t\t\thorizontalOffset,\n\t\t\tverticalOffset;\n\n\t\tif ( pos.length === 1) {\n\t\t\tpos = rhorizontal.test( pos[ 0 ] ) ?\n\t\t\t\tpos.concat( [ \"center\" ] ) :\n\t\t\t\trvertical.test( pos[ 0 ] ) ?\n\t\t\t\t\t[ \"center\" ].concat( pos ) :\n\t\t\t\t\t[ \"center\", \"center\" ];\n\t\t}\n\t\tpos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : \"center\";\n\t\tpos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : \"center\";\n\n\t\t// calculate offsets\n\t\thorizontalOffset = roffset.exec( pos[ 0 ] );\n\t\tverticalOffset = roffset.exec( pos[ 1 ] );\n\t\toffsets[ this ] = [\n\t\t\thorizontalOffset ? horizontalOffset[ 0 ] : 0,\n\t\t\tverticalOffset ? verticalOffset[ 0 ] : 0\n\t\t];\n\n\t\t// reduce to just the positions without the offsets\n\t\toptions[ this ] = [\n\t\t\trposition.exec( pos[ 0 ] )[ 0 ],\n\t\t\trposition.exec( pos[ 1 ] )[ 0 ]\n\t\t];\n\t});\n\n\t// normalize collision option\n\tif ( collision.length === 1 ) {\n\t\tcollision[ 1 ] = collision[ 0 ];\n\t}\n\n\tif ( options.at[ 0 ] === \"right\" ) {\n\t\tbasePosition.left += targetWidth;\n\t} else if ( options.at[ 0 ] === \"center\" ) {\n\t\tbasePosition.left += targetWidth / 2;\n\t}\n\n\tif ( options.at[ 1 ] === \"bottom\" ) {\n\t\tbasePosition.top += targetHeight;\n\t} else if ( options.at[ 1 ] === \"center\" ) {\n\t\tbasePosition.top += targetHeight / 2;\n\t}\n\n\tatOffset = getOffsets( offsets.at, targetWidth, targetHeight );\n\tbasePosition.left += atOffset[ 0 ];\n\tbasePosition.top += atOffset[ 1 ];\n\n\treturn this.each(function() {\n\t\tvar collisionPosition, using,\n\t\t\telem = $( this ),\n\t\t\telemWidth = elem.outerWidth(),\n\t\t\telemHeight = elem.outerHeight(),\n\t\t\tmarginLeft = parseCss( this, \"marginLeft\" ),\n\t\t\tmarginTop = parseCss( this, \"marginTop\" ),\n\t\t\tcollisionWidth = elemWidth + marginLeft + parseCss( this, \"marginRight\" ) + scrollInfo.width,\n\t\t\tcollisionHeight = elemHeight + marginTop + parseCss( this, \"marginBottom\" ) + scrollInfo.height,\n\t\t\tposition = $.extend( {}, basePosition ),\n\t\t\tmyOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );\n\n\t\tif ( options.my[ 0 ] === \"right\" ) {\n\t\t\tposition.left -= elemWidth;\n\t\t} else if ( options.my[ 0 ] === \"center\" ) {\n\t\t\tposition.left -= elemWidth / 2;\n\t\t}\n\n\t\tif ( options.my[ 1 ] === \"bottom\" ) {\n\t\t\tposition.top -= elemHeight;\n\t\t} else if ( options.my[ 1 ] === \"center\" ) {\n\t\t\tposition.top -= elemHeight / 2;\n\t\t}\n\n\t\tposition.left += myOffset[ 0 ];\n\t\tposition.top += myOffset[ 1 ];\n\n\t\t// if the browser doesn't support fractions, then round for consistent results\n\t\tif ( !$.support.offsetFractions ) {\n\t\t\tposition.left = round( position.left );\n\t\t\tposition.top = round( position.top );\n\t\t}\n\n\t\tcollisionPosition = {\n\t\t\tmarginLeft: marginLeft,\n\t\t\tmarginTop: marginTop\n\t\t};\n\n\t\t$.each( [ \"left\", \"top\" ], function( i, dir ) {\n\t\t\tif ( $.ui.position[ collision[ i ] ] ) {\n\t\t\t\t$.ui.position[ collision[ i ] ][ dir ]( position, {\n\t\t\t\t\ttargetWidth: targetWidth,\n\t\t\t\t\ttargetHeight: targetHeight,\n\t\t\t\t\telemWidth: elemWidth,\n\t\t\t\t\telemHeight: elemHeight,\n\t\t\t\t\tcollisionPosition: collisionPosition,\n\t\t\t\t\tcollisionWidth: collisionWidth,\n\t\t\t\t\tcollisionHeight: collisionHeight,\n\t\t\t\t\toffset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],\n\t\t\t\t\tmy: options.my,\n\t\t\t\t\tat: options.at,\n\t\t\t\t\twithin: within,\n\t\t\t\t\telem : elem\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tif ( options.using ) {\n\t\t\t// adds feedback as second argument to using callback, if present\n\t\t\tusing = function( props ) {\n\t\t\t\tvar left = targetOffset.left - position.left,\n\t\t\t\t\tright = left + targetWidth - elemWidth,\n\t\t\t\t\ttop = targetOffset.top - position.top,\n\t\t\t\t\tbottom = top + targetHeight - elemHeight,\n\t\t\t\t\tfeedback = {\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\telement: target,\n\t\t\t\t\t\t\tleft: targetOffset.left,\n\t\t\t\t\t\t\ttop: targetOffset.top,\n\t\t\t\t\t\t\twidth: targetWidth,\n\t\t\t\t\t\t\theight: targetHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\telement: {\n\t\t\t\t\t\t\telement: elem,\n\t\t\t\t\t\t\tleft: position.left,\n\t\t\t\t\t\t\ttop: position.top,\n\t\t\t\t\t\t\twidth: elemWidth,\n\t\t\t\t\t\t\theight: elemHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\thorizontal: right < 0 ? \"left\" : left > 0 ? \"right\" : \"center\",\n\t\t\t\t\t\tvertical: bottom < 0 ? \"top\" : top > 0 ? \"bottom\" : \"middle\"\n\t\t\t\t\t};\n\t\t\t\tif ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {\n\t\t\t\t\tfeedback.horizontal = \"center\";\n\t\t\t\t}\n\t\t\t\tif ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {\n\t\t\t\t\tfeedback.vertical = \"middle\";\n\t\t\t\t}\n\t\t\t\tif ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {\n\t\t\t\t\tfeedback.important = \"horizontal\";\n\t\t\t\t} else {\n\t\t\t\t\tfeedback.important = \"vertical\";\n\t\t\t\t}\n\t\t\t\toptions.using.call( this, props, feedback );\n\t\t\t};\n\t\t}\n\n\t\telem.offset( $.extend( position, { using: using } ) );\n\t});\n};\n\n$.ui.position = {\n\tfit: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\touterWidth = within.width,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = withinOffset - collisionPosLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,\n\t\t\t\tnewOverRight;\n\n\t\t\t// element is wider than within\n\t\t\tif ( data.collisionWidth > outerWidth ) {\n\t\t\t\t// element is initially over the left side of within\n\t\t\t\tif ( overLeft > 0 && overRight <= 0 ) {\n\t\t\t\t\tnewOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;\n\t\t\t\t\tposition.left += overLeft - newOverRight;\n\t\t\t\t// element is initially over right side of within\n\t\t\t\t} else if ( overRight > 0 && overLeft <= 0 ) {\n\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t// element is initially over both left and right sides of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overLeft > overRight ) {\n\t\t\t\t\t\tposition.left = withinOffset + outerWidth - data.collisionWidth;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// too far left -> align with left edge\n\t\t\t} else if ( overLeft > 0 ) {\n\t\t\t\tposition.left += overLeft;\n\t\t\t// too far right -> align with right edge\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tposition.left -= overRight;\n\t\t\t// adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.left = max( position.left - collisionPosLeft, position.left );\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\touterHeight = data.within.height,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = withinOffset - collisionPosTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,\n\t\t\t\tnewOverBottom;\n\n\t\t\t// element is taller than within\n\t\t\tif ( data.collisionHeight > outerHeight ) {\n\t\t\t\t// element is initially over the top of within\n\t\t\t\tif ( overTop > 0 && overBottom <= 0 ) {\n\t\t\t\t\tnewOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;\n\t\t\t\t\tposition.top += overTop - newOverBottom;\n\t\t\t\t// element is initially over bottom of within\n\t\t\t\t} else if ( overBottom > 0 && overTop <= 0 ) {\n\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t// element is initially over both top and bottom of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overTop > overBottom ) {\n\t\t\t\t\t\tposition.top = withinOffset + outerHeight - data.collisionHeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// too far up -> align with top\n\t\t\t} else if ( overTop > 0 ) {\n\t\t\t\tposition.top += overTop;\n\t\t\t// too far down -> align with bottom edge\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tposition.top -= overBottom;\n\t\t\t// adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.top = max( position.top - collisionPosTop, position.top );\n\t\t\t}\n\t\t}\n\t},\n\tflip: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.left + within.scrollLeft,\n\t\t\t\touterWidth = within.width,\n\t\t\t\toffsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = collisionPosLeft - offsetLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,\n\t\t\t\tmyOffset = data.my[ 0 ] === \"left\" ?\n\t\t\t\t\t-data.elemWidth :\n\t\t\t\t\tdata.my[ 0 ] === \"right\" ?\n\t\t\t\t\t\tdata.elemWidth :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 0 ] === \"left\" ?\n\t\t\t\t\tdata.targetWidth :\n\t\t\t\t\tdata.at[ 0 ] === \"right\" ?\n\t\t\t\t\t\t-data.targetWidth :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 0 ],\n\t\t\t\tnewOverRight,\n\t\t\t\tnewOverLeft;\n\n\t\t\tif ( overLeft < 0 ) {\n\t\t\t\tnewOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;\n\t\t\t\tif ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( overRight > 0 ) {\n\t\t\t\tnewOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;\n\t\t\t\tif ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.top + within.scrollTop,\n\t\t\t\touterHeight = within.height,\n\t\t\t\toffsetTop = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = collisionPosTop - offsetTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,\n\t\t\t\ttop = data.my[ 1 ] === \"top\",\n\t\t\t\tmyOffset = top ?\n\t\t\t\t\t-data.elemHeight :\n\t\t\t\t\tdata.my[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\tdata.elemHeight :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 1 ] === \"top\" ?\n\t\t\t\t\tdata.targetHeight :\n\t\t\t\t\tdata.at[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\t-data.targetHeight :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 1 ],\n\t\t\t\tnewOverTop,\n\t\t\t\tnewOverBottom;\n\t\t\tif ( overTop < 0 ) {\n\t\t\t\tnewOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;\n\t\t\t\tif ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( overBottom > 0 ) {\n\t\t\t\tnewOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;\n\t\t\t\tif ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tflipfit: {\n\t\tleft: function() {\n\t\t\t$.ui.position.flip.left.apply( this, arguments );\n\t\t\t$.ui.position.fit.left.apply( this, arguments );\n\t\t},\n\t\ttop: function() {\n\t\t\t$.ui.position.flip.top.apply( this, arguments );\n\t\t\t$.ui.position.fit.top.apply( this, arguments );\n\t\t}\n\t}\n};\n\n// fraction support test\n(function () {\n\tvar testElement, testElementParent, testElementStyle, offsetLeft, i,\n\t\tbody = document.getElementsByTagName( \"body\" )[ 0 ],\n\t\tdiv = document.createElement( \"div\" );\n\n\t//Create a \"fake body\" for testing based on method used in jQuery.support\n\ttestElement = document.createElement( body ? \"div\" : \"body\" );\n\ttestElementStyle = {\n\t\tvisibility: \"hidden\",\n\t\twidth: 0,\n\t\theight: 0,\n\t\tborder: 0,\n\t\tmargin: 0,\n\t\tbackground: \"none\"\n\t};\n\tif ( body ) {\n\t\t$.extend( testElementStyle, {\n\t\t\tposition: \"absolute\",\n\t\t\tleft: \"-1000px\",\n\t\t\ttop: \"-1000px\"\n\t\t});\n\t}\n\tfor ( i in testElementStyle ) {\n\t\ttestElement.style[ i ] = testElementStyle[ i ];\n\t}\n\ttestElement.appendChild( div );\n\ttestElementParent = body || document.documentElement;\n\ttestElementParent.insertBefore( testElement, testElementParent.firstChild );\n\n\tdiv.style.cssText = \"position: absolute; left: 10.7432222px;\";\n\n\toffsetLeft = $( div ).offset().left;\n\t$.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;\n\n\ttestElement.innerHTML = \"\";\n\ttestElementParent.removeChild( testElement );\n})();\n\n}( jQuery ) );\n","var jQuery = require('jquery');\nrequire('./core');\nrequire('./mouse');\nrequire('./widget');\n\n/*!\n * jQuery UI Slider 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/slider/\n *\n * Depends:\n *\tjquery.ui.core.js\n *\tjquery.ui.mouse.js\n *\tjquery.ui.widget.js\n */\n(function( $, undefined ) {\n\n// number of pages in a slider\n// (how many times can you page up/down to go through the whole range)\nvar numPages = 5;\n\n$.widget( \"ui.slider\", $.ui.mouse, {\n\tversion: \"1.10.4\",\n\twidgetEventPrefix: \"slide\",\n\n\toptions: {\n\t\tanimate: false,\n\t\tdistance: 0,\n\t\tmax: 100,\n\t\tmin: 0,\n\t\torientation: \"horizontal\",\n\t\trange: false,\n\t\tstep: 1,\n\t\tvalue: 0,\n\t\tvalues: null,\n\n\t\t// callbacks\n\t\tchange: null,\n\t\tslide: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_create: function() {\n\t\tthis._keySliding = false;\n\t\tthis._mouseSliding = false;\n\t\tthis._animateOff = true;\n\t\tthis._handleIndex = null;\n\t\tthis._detectOrientation();\n\t\tthis._mouseInit();\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-slider\" +\n\t\t\t\t\" ui-slider-\" + this.orientation +\n\t\t\t\t\" ui-widget\" +\n\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\" ui-corner-all\");\n\n\t\tthis._refresh();\n\t\tthis._setOption( \"disabled\", this.options.disabled );\n\n\t\tthis._animateOff = false;\n\t},\n\n\t_refresh: function() {\n\t\tthis._createRange();\n\t\tthis._createHandles();\n\t\tthis._setupEvents();\n\t\tthis._refreshValue();\n\t},\n\n\t_createHandles: function() {\n\t\tvar i, handleCount,\n\t\t\toptions = this.options,\n\t\t\texistingHandles = this.element.find( \".ui-slider-handle\" ).addClass( \"ui-state-default ui-corner-all\" ),\n\t\t\thandle = \"<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>\",\n\t\t\thandles = [];\n\n\t\thandleCount = ( options.values && options.values.length ) || 1;\n\n\t\tif ( existingHandles.length > handleCount ) {\n\t\t\texistingHandles.slice( handleCount ).remove();\n\t\t\texistingHandles = existingHandles.slice( 0, handleCount );\n\t\t}\n\n\t\tfor ( i = existingHandles.length; i < handleCount; i++ ) {\n\t\t\thandles.push( handle );\n\t\t}\n\n\t\tthis.handles = existingHandles.add( $( handles.join( \"\" ) ).appendTo( this.element ) );\n\n\t\tthis.handle = this.handles.eq( 0 );\n\n\t\tthis.handles.each(function( i ) {\n\t\t\t$( this ).data( \"ui-slider-handle-index\", i );\n\t\t});\n\t},\n\n\t_createRange: function() {\n\t\tvar options = this.options,\n\t\t\tclasses = \"\";\n\n\t\tif ( options.range ) {\n\t\t\tif ( options.range === true ) {\n\t\t\t\tif ( !options.values ) {\n\t\t\t\t\toptions.values = [ this._valueMin(), this._valueMin() ];\n\t\t\t\t} else if ( options.values.length && options.values.length !== 2 ) {\n\t\t\t\t\toptions.values = [ options.values[0], options.values[0] ];\n\t\t\t\t} else if ( $.isArray( options.values ) ) {\n\t\t\t\t\toptions.values = options.values.slice(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !this.range || !this.range.length ) {\n\t\t\t\tthis.range = $( \"<div></div>\" )\n\t\t\t\t\t.appendTo( this.element );\n\n\t\t\t\tclasses = \"ui-slider-range\" +\n\t\t\t\t// note: this isn't the most fittingly semantic framework class for this element,\n\t\t\t\t// but worked best visually with a variety of themes\n\t\t\t\t\" ui-widget-header ui-corner-all\";\n\t\t\t} else {\n\t\t\t\tthis.range.removeClass( \"ui-slider-range-min ui-slider-range-max\" )\n\t\t\t\t\t// Handle range switching from true to min/max\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"left\": \"\",\n\t\t\t\t\t\t\"bottom\": \"\"\n\t\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.range.addClass( classes +\n\t\t\t\t( ( options.range === \"min\" || options.range === \"max\" ) ? \" ui-slider-range-\" + options.range : \"\" ) );\n\t\t} else {\n\t\t\tif ( this.range ) {\n\t\t\t\tthis.range.remove();\n\t\t\t}\n\t\t\tthis.range = null;\n\t\t}\n\t},\n\n\t_setupEvents: function() {\n\t\tvar elements = this.handles.add( this.range ).filter( \"a\" );\n\t\tthis._off( elements );\n\t\tthis._on( elements, this._handleEvents );\n\t\tthis._hoverable( elements );\n\t\tthis._focusable( elements );\n\t},\n\n\t_destroy: function() {\n\t\tthis.handles.remove();\n\t\tif ( this.range ) {\n\t\t\tthis.range.remove();\n\t\t}\n\n\t\tthis.element\n\t\t\t.removeClass( \"ui-slider\" +\n\t\t\t\t\" ui-slider-horizontal\" +\n\t\t\t\t\" ui-slider-vertical\" +\n\t\t\t\t\" ui-widget\" +\n\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\" ui-corner-all\" );\n\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,\n\t\t\tthat = this,\n\t\t\to = this.options;\n\n\t\tif ( o.disabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.elementSize = {\n\t\t\twidth: this.element.outerWidth(),\n\t\t\theight: this.element.outerHeight()\n\t\t};\n\t\tthis.elementOffset = this.element.offset();\n\n\t\tposition = { x: event.pageX, y: event.pageY };\n\t\tnormValue = this._normValueFromMouse( position );\n\t\tdistance = this._valueMax() - this._valueMin() + 1;\n\t\tthis.handles.each(function( i ) {\n\t\t\tvar thisDistance = Math.abs( normValue - that.values(i) );\n\t\t\tif (( distance > thisDistance ) ||\n\t\t\t\t( distance === thisDistance &&\n\t\t\t\t\t(i === that._lastChangedValue || that.values(i) === o.min ))) {\n\t\t\t\tdistance = thisDistance;\n\t\t\t\tclosestHandle = $( this );\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t});\n\n\t\tallowed = this._start( event, index );\n\t\tif ( allowed === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tthis._mouseSliding = true;\n\n\t\tthis._handleIndex = index;\n\n\t\tclosestHandle\n\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t.focus();\n\n\t\toffset = closestHandle.offset();\n\t\tmouseOverHandle = !$( event.target ).parents().addBack().is( \".ui-slider-handle\" );\n\t\tthis._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {\n\t\t\tleft: event.pageX - offset.left - ( closestHandle.width() / 2 ),\n\t\t\ttop: event.pageY - offset.top -\n\t\t\t\t( closestHandle.height() / 2 ) -\n\t\t\t\t( parseInt( closestHandle.css(\"borderTopWidth\"), 10 ) || 0 ) -\n\t\t\t\t( parseInt( closestHandle.css(\"borderBottomWidth\"), 10 ) || 0) +\n\t\t\t\t( parseInt( closestHandle.css(\"marginTop\"), 10 ) || 0)\n\t\t};\n\n\t\tif ( !this.handles.hasClass( \"ui-state-hover\" ) ) {\n\t\t\tthis._slide( event, index, normValue );\n\t\t}\n\t\tthis._animateOff = true;\n\t\treturn true;\n\t},\n\n\t_mouseStart: function() {\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\t\tvar position = { x: event.pageX, y: event.pageY },\n\t\t\tnormValue = this._normValueFromMouse( position );\n\n\t\tthis._slide( event, this._handleIndex, normValue );\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\t\tthis.handles.removeClass( \"ui-state-active\" );\n\t\tthis._mouseSliding = false;\n\n\t\tthis._stop( event, this._handleIndex );\n\t\tthis._change( event, this._handleIndex );\n\n\t\tthis._handleIndex = null;\n\t\tthis._clickOffset = null;\n\t\tthis._animateOff = false;\n\n\t\treturn false;\n\t},\n\n\t_detectOrientation: function() {\n\t\tthis.orientation = ( this.options.orientation === \"vertical\" ) ? \"vertical\" : \"horizontal\";\n\t},\n\n\t_normValueFromMouse: function( position ) {\n\t\tvar pixelTotal,\n\t\t\tpixelMouse,\n\t\t\tpercentMouse,\n\t\t\tvalueTotal,\n\t\t\tvalueMouse;\n\n\t\tif ( this.orientation === \"horizontal\" ) {\n\t\t\tpixelTotal = this.elementSize.width;\n\t\t\tpixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );\n\t\t} else {\n\t\t\tpixelTotal = this.elementSize.height;\n\t\t\tpixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );\n\t\t}\n\n\t\tpercentMouse = ( pixelMouse / pixelTotal );\n\t\tif ( percentMouse > 1 ) {\n\t\t\tpercentMouse = 1;\n\t\t}\n\t\tif ( percentMouse < 0 ) {\n\t\t\tpercentMouse = 0;\n\t\t}\n\t\tif ( this.orientation === \"vertical\" ) {\n\t\t\tpercentMouse = 1 - percentMouse;\n\t\t}\n\n\t\tvalueTotal = this._valueMax() - this._valueMin();\n\t\tvalueMouse = this._valueMin() + percentMouse * valueTotal;\n\n\t\treturn this._trimAlignValue( valueMouse );\n\t},\n\n\t_start: function( event, index ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\tvalue: this.value()\n\t\t};\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tuiHash.value = this.values( index );\n\t\t\tuiHash.values = this.values();\n\t\t}\n\t\treturn this._trigger( \"start\", event, uiHash );\n\t},\n\n\t_slide: function( event, index, newVal ) {\n\t\tvar otherVal,\n\t\t\tnewValues,\n\t\t\tallowed;\n\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\totherVal = this.values( index ? 0 : 1 );\n\n\t\t\tif ( ( this.options.values.length === 2 && this.options.range === true ) &&\n\t\t\t\t\t( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )\n\t\t\t\t) {\n\t\t\t\tnewVal = otherVal;\n\t\t\t}\n\n\t\t\tif ( newVal !== this.values( index ) ) {\n\t\t\t\tnewValues = this.values();\n\t\t\t\tnewValues[ index ] = newVal;\n\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: newVal,\n\t\t\t\t\tvalues: newValues\n\t\t\t\t} );\n\t\t\t\totherVal = this.values( index ? 0 : 1 );\n\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\tthis.values( index, newVal );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif ( newVal !== this.value() ) {\n\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: newVal\n\t\t\t\t} );\n\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\tthis.value( newVal );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_stop: function( event, index ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\tvalue: this.value()\n\t\t};\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tuiHash.value = this.values( index );\n\t\t\tuiHash.values = this.values();\n\t\t}\n\n\t\tthis._trigger( \"stop\", event, uiHash );\n\t},\n\n\t_change: function( event, index ) {\n\t\tif ( !this._keySliding && !this._mouseSliding ) {\n\t\t\tvar uiHash = {\n\t\t\t\thandle: this.handles[ index ],\n\t\t\t\tvalue: this.value()\n\t\t\t};\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tuiHash.value = this.values( index );\n\t\t\t\tuiHash.values = this.values();\n\t\t\t}\n\n\t\t\t//store the last changed value index for reference when handles overlap\n\t\t\tthis._lastChangedValue = index;\n\n\t\t\tthis._trigger( \"change\", event, uiHash );\n\t\t}\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( arguments.length ) {\n\t\t\tthis.options.value = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, 0 );\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._value();\n\t},\n\n\tvalues: function( index, newValue ) {\n\t\tvar vals,\n\t\t\tnewValues,\n\t\t\ti;\n\n\t\tif ( arguments.length > 1 ) {\n\t\t\tthis.options.values[ index ] = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, index );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( arguments.length ) {\n\t\t\tif ( $.isArray( arguments[ 0 ] ) ) {\n\t\t\t\tvals = this.options.values;\n\t\t\t\tnewValues = arguments[ 0 ];\n\t\t\t\tfor ( i = 0; i < vals.length; i += 1 ) {\n\t\t\t\t\tvals[ i ] = this._trimAlignValue( newValues[ i ] );\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._refreshValue();\n\t\t\t} else {\n\t\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\t\treturn this._values( index );\n\t\t\t\t} else {\n\t\t\t\t\treturn this.value();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._values();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar i,\n\t\t\tvalsLength = 0;\n\n\t\tif ( key === \"range\" && this.options.range === true ) {\n\t\t\tif ( value === \"min\" ) {\n\t\t\t\tthis.options.value = this._values( 0 );\n\t\t\t\tthis.options.values = null;\n\t\t\t} else if ( value === \"max\" ) {\n\t\t\t\tthis.options.value = this._values( this.options.values.length-1 );\n\t\t\t\tthis.options.values = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( $.isArray( this.options.values ) ) {\n\t\t\tvalsLength = this.options.values.length;\n\t\t}\n\n\t\t$.Widget.prototype._setOption.apply( this, arguments );\n\n\t\tswitch ( key ) {\n\t\t\tcase \"orientation\":\n\t\t\t\tthis._detectOrientation();\n\t\t\t\tthis.element\n\t\t\t\t\t.removeClass( \"ui-slider-horizontal ui-slider-vertical\" )\n\t\t\t\t\t.addClass( \"ui-slider-\" + this.orientation );\n\t\t\t\tthis._refreshValue();\n\t\t\t\tbreak;\n\t\t\tcase \"value\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._change( null, 0 );\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"values\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tfor ( i = 0; i < valsLength; i += 1 ) {\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"min\":\n\t\t\tcase \"max\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"range\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refresh();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\t//internal value getter\n\t// _value() returns value trimmed by min and max, aligned by step\n\t_value: function() {\n\t\tvar val = this.options.value;\n\t\tval = this._trimAlignValue( val );\n\n\t\treturn val;\n\t},\n\n\t//internal values getter\n\t// _values() returns array of values trimmed by min and max, aligned by step\n\t// _values( index ) returns single value trimmed by min and max, aligned by step\n\t_values: function( index ) {\n\t\tvar val,\n\t\t\tvals,\n\t\t\ti;\n\n\t\tif ( arguments.length ) {\n\t\t\tval = this.options.values[ index ];\n\t\t\tval = this._trimAlignValue( val );\n\n\t\t\treturn val;\n\t\t} else if ( this.options.values && this.options.values.length ) {\n\t\t\t// .slice() creates a copy of the array\n\t\t\t// this copy gets trimmed by min and max and then returned\n\t\t\tvals = this.options.values.slice();\n\t\t\tfor ( i = 0; i < vals.length; i+= 1) {\n\t\t\t\tvals[ i ] = this._trimAlignValue( vals[ i ] );\n\t\t\t}\n\n\t\t\treturn vals;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t},\n\n\t// returns the step-aligned value that val is closest to, between (inclusive) min and max\n\t_trimAlignValue: function( val ) {\n\t\tif ( val <= this._valueMin() ) {\n\t\t\treturn this._valueMin();\n\t\t}\n\t\tif ( val >= this._valueMax() ) {\n\t\t\treturn this._valueMax();\n\t\t}\n\t\tvar step = ( this.options.step > 0 ) ? this.options.step : 1,\n\t\t\tvalModStep = (val - this._valueMin()) % step,\n\t\t\talignValue = val - valModStep;\n\n\t\tif ( Math.abs(valModStep) * 2 >= step ) {\n\t\t\talignValue += ( valModStep > 0 ) ? step : ( -step );\n\t\t}\n\n\t\t// Since JavaScript has problems with large floats, round\n\t\t// the final value to 5 digits after the decimal point (see #4124)\n\t\treturn parseFloat( alignValue.toFixed(5) );\n\t},\n\n\t_valueMin: function() {\n\t\treturn this.options.min;\n\t},\n\n\t_valueMax: function() {\n\t\treturn this.options.max;\n\t},\n\n\t_refreshValue: function() {\n\t\tvar lastValPercent, valPercent, value, valueMin, valueMax,\n\t\t\toRange = this.options.range,\n\t\t\to = this.options,\n\t\t\tthat = this,\n\t\t\tanimate = ( !this._animateOff ) ? o.animate : false,\n\t\t\t_set = {};\n\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tthis.handles.each(function( i ) {\n\t\t\t\tvalPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;\n\t\t\t\t_set[ that.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\t\t$( this ).stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\t\t\t\tif ( that.options.range === true ) {\n\t\t\t\t\tif ( that.orientation === \"horizontal\" ) {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { left: valPercent + \"%\" }, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( { width: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { bottom: ( valPercent ) + \"%\" }, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( { height: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlastValPercent = valPercent;\n\t\t\t});\n\t\t} else {\n\t\t\tvalue = this.value();\n\t\t\tvalueMin = this._valueMin();\n\t\t\tvalueMax = this._valueMax();\n\t\t\tvalPercent = ( valueMax !== valueMin ) ?\n\t\t\t\t\t( value - valueMin ) / ( valueMax - valueMin ) * 100 :\n\t\t\t\t\t0;\n\t\t\t_set[ this.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\tthis.handle.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\n\t\t\tif ( oRange === \"min\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { width: valPercent + \"%\" }, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { width: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t}\n\t\t\tif ( oRange === \"min\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { height: valPercent + \"%\" }, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { height: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t}\n\t\t}\n\t},\n\n\t_handleEvents: {\n\t\tkeydown: function( event ) {\n\t\t\tvar allowed, curVal, newVal, step,\n\t\t\t\tindex = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( !this._keySliding ) {\n\t\t\t\t\t\tthis._keySliding = true;\n\t\t\t\t\t\t$( event.target ).addClass( \"ui-state-active\" );\n\t\t\t\t\t\tallowed = this._start( event, index );\n\t\t\t\t\t\tif ( allowed === false ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tstep = this.options.step;\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tcurVal = newVal = this.values( index );\n\t\t\t} else {\n\t\t\t\tcurVal = newVal = this.value();\n\t\t\t}\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\tnewVal = this._valueMin();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\tnewVal = this._valueMax();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\tif ( curVal === this._valueMax() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal + step );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tif ( curVal === this._valueMin() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal - step );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tthis._slide( event, index, newVal );\n\t\t},\n\t\tclick: function( event ) {\n\t\t\tevent.preventDefault();\n\t\t},\n\t\tkeyup: function( event ) {\n\t\t\tvar index = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tif ( this._keySliding ) {\n\t\t\t\tthis._keySliding = false;\n\t\t\t\tthis._stop( event, index );\n\t\t\t\tthis._change( event, index );\n\t\t\t\t$( event.target ).removeClass( \"ui-state-active\" );\n\t\t\t}\n\t\t}\n\t}\n\n});\n\n}(jQuery));\n","var jQuery = require('jquery');\nrequire('./core');\nrequire('./mouse');\nrequire('./widget');\n\n/*!\n * jQuery UI Sortable 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/sortable/\n *\n * Depends:\n *\tjquery.ui.core.js\n *\tjquery.ui.mouse.js\n *\tjquery.ui.widget.js\n */\n(function( $, undefined ) {\n\nfunction isOverAxis( x, reference, size ) {\n\treturn ( x > reference ) && ( x < ( reference + size ) );\n}\n\nfunction isFloating(item) {\n\treturn (/left|right/).test(item.css(\"float\")) || (/inline|table-cell/).test(item.css(\"display\"));\n}\n\n$.widget(\"ui.sortable\", $.ui.mouse, {\n\tversion: \"1.10.4\",\n\twidgetEventPrefix: \"sort\",\n\tready: false,\n\toptions: {\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectWith: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tdropOnEmpty: true,\n\t\tforcePlaceholderSize: false,\n\t\tforceHelperSize: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\titems: \"> *\",\n\t\topacity: false,\n\t\tplaceholder: false,\n\t\trevert: false,\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\t\tzIndex: 1000,\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tbeforeStop: null,\n\t\tchange: null,\n\t\tdeactivate: null,\n\t\tout: null,\n\t\tover: null,\n\t\treceive: null,\n\t\tremove: null,\n\t\tsort: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tupdate: null\n\t},\n\t_create: function() {\n\n\t\tvar o = this.options;\n\t\tthis.containerCache = {};\n\t\tthis.element.addClass(\"ui-sortable\");\n\n\t\t//Get the items\n\t\tthis.refresh();\n\n\t\t//Let's determine if the items are being displayed horizontally\n\t\tthis.floating = this.items.length ? o.axis === \"x\" || isFloating(this.items[0].item) : false;\n\n\t\t//Let's determine the parent's offset\n\t\tthis.offset = this.element.offset();\n\n\t\t//Initialize mouse events for interaction\n\t\tthis._mouseInit();\n\n\t\t//We're ready to go\n\t\tthis.ready = true;\n\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass(\"ui-sortable ui-sortable-disabled\");\n\t\tthis._mouseDestroy();\n\n\t\tfor ( var i = this.items.length - 1; i >= 0; i-- ) {\n\t\t\tthis.items[i].item.removeData(this.widgetName + \"-item\");\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOption: function(key, value){\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.options[ key ] = value;\n\n\t\t\tthis.widget().toggleClass( \"ui-sortable-disabled\", !!value );\n\t\t} else {\n\t\t\t// Don't call widget base _setOption for disable as it adds ui-state-disabled class\n\t\t\t$.Widget.prototype._setOption.apply(this, arguments);\n\t\t}\n\t},\n\n\t_mouseCapture: function(event, overrideHandle) {\n\t\tvar currentItem = null,\n\t\t\tvalidHandle = false,\n\t\t\tthat = this;\n\n\t\tif (this.reverting) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif(this.options.disabled || this.options.type === \"static\") {\n\t\t\treturn false;\n\t\t}\n\n\t\t//We have to refresh the items data once first\n\t\tthis._refreshItems(event);\n\n\t\t//Find out if the clicked node (or one of its parents) is a actual item in this.items\n\t\t$(event.target).parents().each(function() {\n\t\t\tif($.data(this, that.widgetName + \"-item\") === that) {\n\t\t\t\tcurrentItem = $(this);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tif($.data(event.target, that.widgetName + \"-item\") === that) {\n\t\t\tcurrentItem = $(event.target);\n\t\t}\n\n\t\tif(!currentItem) {\n\t\t\treturn false;\n\t\t}\n\t\tif(this.options.handle && !overrideHandle) {\n\t\t\t$(this.options.handle, currentItem).find(\"*\").addBack().each(function() {\n\t\t\t\tif(this === event.target) {\n\t\t\t\t\tvalidHandle = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif(!validHandle) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tthis.currentItem = currentItem;\n\t\tthis._removeCurrentsFromItems();\n\t\treturn true;\n\n\t},\n\n\t_mouseStart: function(event, overrideHandle, noActivation) {\n\n\t\tvar i, body,\n\t\t\to = this.options;\n\n\t\tthis.currentContainer = this;\n\n\t\t//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture\n\t\tthis.refreshPositions();\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper(event);\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Get the next scrolling parent\n\t\tthis.scrollParent = this.helper.scrollParent();\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.offset = this.currentItem.offset();\n\t\tthis.offset = {\n\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\tleft: this.offset.left - this.margins.left\n\t\t};\n\n\t\t$.extend(this.offset, {\n\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t},\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper\n\t\t});\n\n\t\t// Only after we got the offset, we can change the helper's position to absolute\n\t\t// TODO: Still need to figure out a way to make relative sorting possible\n\t\tthis.helper.css(\"position\", \"absolute\");\n\t\tthis.cssPosition = this.helper.css(\"position\");\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this._generatePosition(event);\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\t(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));\n\n\t\t//Cache the former DOM position\n\t\tthis.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };\n\n\t\t//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way\n\t\tif(this.helper[0] !== this.currentItem[0]) {\n\t\t\tthis.currentItem.hide();\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthis._createPlaceholder();\n\n\t\t//Set a containment if given in the options\n\t\tif(o.containment) {\n\t\t\tthis._setContainment();\n\t\t}\n\n\t\tif( o.cursor && o.cursor !== \"auto\" ) { // cursor option\n\t\t\tbody = this.document.find( \"body\" );\n\n\t\t\t// support: IE\n\t\t\tthis.storedCursor = body.css( \"cursor\" );\n\t\t\tbody.css( \"cursor\", o.cursor );\n\n\t\t\tthis.storedStylesheet = $( \"<style>*{ cursor: \"+o.cursor+\" !important; }</style>\" ).appendTo( body );\n\t\t}\n\n\t\tif(o.opacity) { // opacity option\n\t\t\tif (this.helper.css(\"opacity\")) {\n\t\t\t\tthis._storedOpacity = this.helper.css(\"opacity\");\n\t\t\t}\n\t\t\tthis.helper.css(\"opacity\", o.opacity);\n\t\t}\n\n\t\tif(o.zIndex) { // zIndex option\n\t\t\tif (this.helper.css(\"zIndex\")) {\n\t\t\t\tthis._storedZIndex = this.helper.css(\"zIndex\");\n\t\t\t}\n\t\t\tthis.helper.css(\"zIndex\", o.zIndex);\n\t\t}\n\n\t\t//Prepare scrolling\n\t\tif(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== \"HTML\") {\n\t\t\tthis.overflowOffset = this.scrollParent.offset();\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger(\"start\", event, this._uiHash());\n\n\t\t//Recache the helper size\n\t\tif(!this._preserveHelperProportions) {\n\t\t\tthis._cacheHelperProportions();\n\t\t}\n\n\n\t\t//Post \"activate\" events to possible containers\n\t\tif( !noActivation ) {\n\t\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tthis.containers[ i ]._trigger( \"activate\", event, this._uiHash( this ) );\n\t\t\t}\n\t\t}\n\n\t\t//Prepare possible droppables\n\t\tif($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\tif ($.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t}\n\n\t\tthis.dragging = true;\n\n\t\tthis.helper.addClass(\"ui-sortable-helper\");\n\t\tthis._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n\t\treturn true;\n\n\t},\n\n\t_mouseDrag: function(event) {\n\t\tvar i, item, itemElement, intersection,\n\t\t\to = this.options,\n\t\t\tscrolled = false;\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition(event);\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\tif (!this.lastPositionAbs) {\n\t\t\tthis.lastPositionAbs = this.positionAbs;\n\t\t}\n\n\t\t//Do scrolling\n\t\tif(this.options.scroll) {\n\t\t\tif(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== \"HTML\") {\n\n\t\t\t\tif((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;\n\t\t\t\t} else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\n\t\t\t\tif((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);\n\t\t\t\t} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);\n\t\t\t\t}\n\n\t\t\t\tif(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);\n\t\t\t\t} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t\t}\n\t\t}\n\n\t\t//Regenerate the absolute position used for position checks\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\t//Set the helper position\n\t\tif(!this.options.axis || this.options.axis !== \"y\") {\n\t\t\tthis.helper[0].style.left = this.position.left+\"px\";\n\t\t}\n\t\tif(!this.options.axis || this.options.axis !== \"x\") {\n\t\t\tthis.helper[0].style.top = this.position.top+\"px\";\n\t\t}\n\n\t\t//Rearrange\n\t\tfor (i = this.items.length - 1; i >= 0; i--) {\n\n\t\t\t//Cache variables and intersection, continue if no intersection\n\t\t\titem = this.items[i];\n\t\t\titemElement = item.item[0];\n\t\t\tintersection = this._intersectsWithPointer(item);\n\t\t\tif (!intersection) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Only put the placeholder inside the current Container, skip all\n\t\t\t// items from other containers. This works because when moving\n\t\t\t// an item from one container to another the\n\t\t\t// currentContainer is switched before the placeholder is moved.\n\t\t\t//\n\t\t\t// Without this, moving items in \"sub-sortables\" can cause\n\t\t\t// the placeholder to jitter beetween the outer and inner container.\n\t\t\tif (item.instance !== this.currentContainer) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// cannot intersect with itself\n\t\t\t// no useless actions that have been done before\n\t\t\t// no action if the item moved is the parent of the item checked\n\t\t\tif (itemElement !== this.currentItem[0] &&\n\t\t\t\tthis.placeholder[intersection === 1 ? \"next\" : \"prev\"]()[0] !== itemElement &&\n\t\t\t\t!$.contains(this.placeholder[0], itemElement) &&\n\t\t\t\t(this.options.type === \"semi-dynamic\" ? !$.contains(this.element[0], itemElement) : true)\n\t\t\t) {\n\n\t\t\t\tthis.direction = intersection === 1 ? \"down\" : \"up\";\n\n\t\t\t\tif (this.options.tolerance === \"pointer\" || this._intersectsWithSides(item)) {\n\t\t\t\t\tthis._rearrange(event, item);\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis._trigger(\"change\", event, this._uiHash());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t//Post events to containers\n\t\tthis._contactContainers(event);\n\n\t\t//Interconnect with droppables\n\t\tif($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.drag(this, event);\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger(\"sort\", event, this._uiHash());\n\n\t\tthis.lastPositionAbs = this.positionAbs;\n\t\treturn false;\n\n\t},\n\n\t_mouseStop: function(event, noPropagation) {\n\n\t\tif(!event) {\n\t\t\treturn;\n\t\t}\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tif ($.ui.ddmanager && !this.options.dropBehaviour) {\n\t\t\t$.ui.ddmanager.drop(this, event);\n\t\t}\n\n\t\tif(this.options.revert) {\n\t\t\tvar that = this,\n\t\t\t\tcur = this.placeholder.offset(),\n\t\t\t\taxis = this.options.axis,\n\t\t\t\tanimation = {};\n\n\t\t\tif ( !axis || axis === \"x\" ) {\n\t\t\t\tanimation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);\n\t\t\t}\n\t\t\tif ( !axis || axis === \"y\" ) {\n\t\t\t\tanimation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);\n\t\t\t}\n\t\t\tthis.reverting = true;\n\t\t\t$(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {\n\t\t\t\tthat._clear(event);\n\t\t\t});\n\t\t} else {\n\t\t\tthis._clear(event, noPropagation);\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tcancel: function() {\n\n\t\tif(this.dragging) {\n\n\t\t\tthis._mouseUp({ target: null });\n\n\t\t\tif(this.options.helper === \"original\") {\n\t\t\t\tthis.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\");\n\t\t\t} else {\n\t\t\t\tthis.currentItem.show();\n\t\t\t}\n\n\t\t\t//Post deactivating events to containers\n\t\t\tfor (var i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\tthis.containers[i]._trigger(\"deactivate\", null, this._uiHash(this));\n\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\tthis.containers[i]._trigger(\"out\", null, this._uiHash(this));\n\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (this.placeholder) {\n\t\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n\t\t\tif(this.placeholder[0].parentNode) {\n\t\t\t\tthis.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\t\t\t}\n\t\t\tif(this.options.helper !== \"original\" && this.helper && this.helper[0].parentNode) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\n\t\t\t$.extend(this, {\n\t\t\t\thelper: null,\n\t\t\t\tdragging: false,\n\t\t\t\treverting: false,\n\t\t\t\t_noFinalSort: null\n\t\t\t});\n\n\t\t\tif(this.domPosition.prev) {\n\t\t\t\t$(this.domPosition.prev).after(this.currentItem);\n\t\t\t} else {\n\t\t\t\t$(this.domPosition.parent).prepend(this.currentItem);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\tserialize: function(o) {\n\n\t\tvar items = this._getItemsAsjQuery(o && o.connected),\n\t\t\tstr = [];\n\t\to = o || {};\n\n\t\t$(items).each(function() {\n\t\t\tvar res = ($(o.item || this).attr(o.attribute || \"id\") || \"\").match(o.expression || (/(.+)[\\-=_](.+)/));\n\t\t\tif (res) {\n\t\t\t\tstr.push((o.key || res[1]+\"[]\")+\"=\"+(o.key && o.expression ? res[1] : res[2]));\n\t\t\t}\n\t\t});\n\n\t\tif(!str.length && o.key) {\n\t\t\tstr.push(o.key + \"=\");\n\t\t}\n\n\t\treturn str.join(\"&\");\n\n\t},\n\n\ttoArray: function(o) {\n\n\t\tvar items = this._getItemsAsjQuery(o && o.connected),\n\t\t\tret = [];\n\n\t\to = o || {};\n\n\t\titems.each(function() { ret.push($(o.item || this).attr(o.attribute || \"id\") || \"\"); });\n\t\treturn ret;\n\n\t},\n\n\t/* Be careful with the following core functions */\n\t_intersectsWith: function(item) {\n\n\t\tvar x1 = this.positionAbs.left,\n\t\t\tx2 = x1 + this.helperProportions.width,\n\t\t\ty1 = this.positionAbs.top,\n\t\t\ty2 = y1 + this.helperProportions.height,\n\t\t\tl = item.left,\n\t\t\tr = l + item.width,\n\t\t\tt = item.top,\n\t\t\tb = t + item.height,\n\t\t\tdyClick = this.offset.click.top,\n\t\t\tdxClick = this.offset.click.left,\n\t\t\tisOverElementHeight = ( this.options.axis === \"x\" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),\n\t\t\tisOverElementWidth = ( this.options.axis === \"y\" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth;\n\n\t\tif ( this.options.tolerance === \"pointer\" ||\n\t\t\tthis.options.forcePointerForContainers ||\n\t\t\t(this.options.tolerance !== \"pointer\" && this.helperProportions[this.floating ? \"width\" : \"height\"] > item[this.floating ? \"width\" : \"height\"])\n\t\t) {\n\t\t\treturn isOverElement;\n\t\t} else {\n\n\t\t\treturn (l < x1 + (this.helperProportions.width / 2) && // Right Half\n\t\t\t\tx2 - (this.helperProportions.width / 2) < r && // Left Half\n\t\t\t\tt < y1 + (this.helperProportions.height / 2) && // Bottom Half\n\t\t\t\ty2 - (this.helperProportions.height / 2) < b ); // Top Half\n\n\t\t}\n\t},\n\n\t_intersectsWithPointer: function(item) {\n\n\t\tvar isOverElementHeight = (this.options.axis === \"x\") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),\n\t\t\tisOverElementWidth = (this.options.axis === \"y\") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth,\n\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\n\t\tif (!isOverElement) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.floating ?\n\t\t\t( ((horizontalDirection && horizontalDirection === \"right\") || verticalDirection === \"down\") ? 2 : 1 )\n\t\t\t: ( verticalDirection && (verticalDirection === \"down\" ? 2 : 1) );\n\n\t},\n\n\t_intersectsWithSides: function(item) {\n\n\t\tvar isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),\n\t\t\tisOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),\n\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\n\t\tif (this.floating && horizontalDirection) {\n\t\t\treturn ((horizontalDirection === \"right\" && isOverRightHalf) || (horizontalDirection === \"left\" && !isOverRightHalf));\n\t\t} else {\n\t\t\treturn verticalDirection && ((verticalDirection === \"down\" && isOverBottomHalf) || (verticalDirection === \"up\" && !isOverBottomHalf));\n\t\t}\n\n\t},\n\n\t_getDragVerticalDirection: function() {\n\t\tvar delta = this.positionAbs.top - this.lastPositionAbs.top;\n\t\treturn delta !== 0 && (delta > 0 ? \"down\" : \"up\");\n\t},\n\n\t_getDragHorizontalDirection: function() {\n\t\tvar delta = this.positionAbs.left - this.lastPositionAbs.left;\n\t\treturn delta !== 0 && (delta > 0 ? \"right\" : \"left\");\n\t},\n\n\trefresh: function(event) {\n\t\tthis._refreshItems(event);\n\t\tthis.refreshPositions();\n\t\treturn this;\n\t},\n\n\t_connectWith: function() {\n\t\tvar options = this.options;\n\t\treturn options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;\n\t},\n\n\t_getItemsAsjQuery: function(connected) {\n\n\t\tvar i, j, cur, inst,\n\t\t\titems = [],\n\t\t\tqueries = [],\n\t\t\tconnectWith = this._connectWith();\n\n\t\tif(connectWith && connected) {\n\t\t\tfor (i = connectWith.length - 1; i >= 0; i--){\n\t\t\t\tcur = $(connectWith[i]);\n\t\t\t\tfor ( j = cur.length - 1; j >= 0; j--){\n\t\t\t\t\tinst = $.data(cur[j], this.widgetFullName);\n\t\t\t\t\tif(inst && inst !== this && !inst.options.disabled) {\n\t\t\t\t\t\tqueries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), inst]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tqueries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), this]);\n\n\t\tfunction addItems() {\n\t\t\titems.push( this );\n\t\t}\n\t\tfor (i = queries.length - 1; i >= 0; i--){\n\t\t\tqueries[i][0].each( addItems );\n\t\t}\n\n\t\treturn $(items);\n\n\t},\n\n\t_removeCurrentsFromItems: function() {\n\n\t\tvar list = this.currentItem.find(\":data(\" + this.widgetName + \"-item)\");\n\n\t\tthis.items = $.grep(this.items, function (item) {\n\t\t\tfor (var j=0; j < list.length; j++) {\n\t\t\t\tif(list[j] === item.item[0]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\n\t},\n\n\t_refreshItems: function(event) {\n\n\t\tthis.items = [];\n\t\tthis.containers = [this];\n\n\t\tvar i, j, cur, inst, targetData, _queries, item, queriesLength,\n\t\t\titems = this.items,\n\t\t\tqueries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],\n\t\t\tconnectWith = this._connectWith();\n\n\t\tif(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down\n\t\t\tfor (i = connectWith.length - 1; i >= 0; i--){\n\t\t\t\tcur = $(connectWith[i]);\n\t\t\t\tfor (j = cur.length - 1; j >= 0; j--){\n\t\t\t\t\tinst = $.data(cur[j], this.widgetFullName);\n\t\t\t\t\tif(inst && inst !== this && !inst.options.disabled) {\n\t\t\t\t\t\tqueries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);\n\t\t\t\t\t\tthis.containers.push(inst);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (i = queries.length - 1; i >= 0; i--) {\n\t\t\ttargetData = queries[i][1];\n\t\t\t_queries = queries[i][0];\n\n\t\t\tfor (j=0, queriesLength = _queries.length; j < queriesLength; j++) {\n\t\t\t\titem = $(_queries[j]);\n\n\t\t\t\titem.data(this.widgetName + \"-item\", targetData); // Data for target checking (mouse manager)\n\n\t\t\t\titems.push({\n\t\t\t\t\titem: item,\n\t\t\t\t\tinstance: targetData,\n\t\t\t\t\twidth: 0, height: 0,\n\t\t\t\t\tleft: 0, top: 0\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t},\n\n\trefreshPositions: function(fast) {\n\n\t\t//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change\n\t\tif(this.offsetParent && this.helper) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\tvar i, item, t, p;\n\n\t\tfor (i = this.items.length - 1; i >= 0; i--){\n\t\t\titem = this.items[i];\n\n\t\t\t//We ignore calculating positions of all connected containers when we're not over them\n\t\t\tif(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tt = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;\n\n\t\t\tif (!fast) {\n\t\t\t\titem.width = t.outerWidth();\n\t\t\t\titem.height = t.outerHeight();\n\t\t\t}\n\n\t\t\tp = t.offset();\n\t\t\titem.left = p.left;\n\t\t\titem.top = p.top;\n\t\t}\n\n\t\tif(this.options.custom && this.options.custom.refreshContainers) {\n\t\t\tthis.options.custom.refreshContainers.call(this);\n\t\t} else {\n\t\t\tfor (i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\tp = this.containers[i].element.offset();\n\t\t\t\tthis.containers[i].containerCache.left = p.left;\n\t\t\t\tthis.containers[i].containerCache.top = p.top;\n\t\t\t\tthis.containers[i].containerCache.width\t= this.containers[i].element.outerWidth();\n\t\t\t\tthis.containers[i].containerCache.height = this.containers[i].element.outerHeight();\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_createPlaceholder: function(that) {\n\t\tthat = that || this;\n\t\tvar className,\n\t\t\to = that.options;\n\n\t\tif(!o.placeholder || o.placeholder.constructor === String) {\n\t\t\tclassName = o.placeholder;\n\t\t\to.placeholder = {\n\t\t\t\telement: function() {\n\n\t\t\t\t\tvar nodeName = that.currentItem[0].nodeName.toLowerCase(),\n\t\t\t\t\t\telement = $( \"<\" + nodeName + \">\", that.document[0] )\n\t\t\t\t\t\t\t.addClass(className || that.currentItem[0].className+\" ui-sortable-placeholder\")\n\t\t\t\t\t\t\t.removeClass(\"ui-sortable-helper\");\n\n\t\t\t\t\tif ( nodeName === \"tr\" ) {\n\t\t\t\t\t\tthat.currentItem.children().each(function() {\n\t\t\t\t\t\t\t$( \"<td> </td>\", that.document[0] )\n\t\t\t\t\t\t\t\t.attr( \"colspan\", $( this ).attr( \"colspan\" ) || 1 )\n\t\t\t\t\t\t\t\t.appendTo( element );\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if ( nodeName === \"img\" ) {\n\t\t\t\t\t\telement.attr( \"src\", that.currentItem.attr( \"src\" ) );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !className ) {\n\t\t\t\t\t\telement.css( \"visibility\", \"hidden\" );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn element;\n\t\t\t\t},\n\t\t\t\tupdate: function(container, p) {\n\n\t\t\t\t\t// 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that\n\t\t\t\t\t// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified\n\t\t\t\t\tif(className && !o.forcePlaceholderSize) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item\n\t\t\t\t\tif(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css(\"paddingTop\")||0, 10) - parseInt(that.currentItem.css(\"paddingBottom\")||0, 10)); }\n\t\t\t\t\tif(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css(\"paddingLeft\")||0, 10) - parseInt(that.currentItem.css(\"paddingRight\")||0, 10)); }\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthat.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));\n\n\t\t//Append it after the actual current item\n\t\tthat.currentItem.after(that.placeholder);\n\n\t\t//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)\n\t\to.placeholder.update(that, that.placeholder);\n\n\t},\n\n\t_contactContainers: function(event) {\n\t\tvar i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,\n\t\t\tinnermostContainer = null,\n\t\t\tinnermostIndex = null;\n\n\t\t// get innermost container that intersects with item\n\t\tfor (i = this.containers.length - 1; i >= 0; i--) {\n\n\t\t\t// never consider a container that's located within the item itself\n\t\t\tif($.contains(this.currentItem[0], this.containers[i].element[0])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(this._intersectsWith(this.containers[i].containerCache)) {\n\n\t\t\t\t// if we've already found a container and it's more \"inner\" than this, then continue\n\t\t\t\tif(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tinnermostContainer = this.containers[i];\n\t\t\t\tinnermostIndex = i;\n\n\t\t\t} else {\n\t\t\t\t// container doesn't intersect. trigger \"out\" event if necessary\n\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\tthis.containers[i]._trigger(\"out\", event, this._uiHash(this));\n\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// if no intersecting containers found, return\n\t\tif(!innermostContainer) {\n\t\t\treturn;\n\t\t}\n\n\t\t// move the item into the container if it's not there already\n\t\tif(this.containers.length === 1) {\n\t\t\tif (!this.containers[innermostIndex].containerCache.over) {\n\t\t\t\tthis.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\t\t\t\tthis.containers[innermostIndex].containerCache.over = 1;\n\t\t\t}\n\t\t} else {\n\n\t\t\t//When entering a new container, we will find the item with the least distance and append our item near it\n\t\t\tdist = 10000;\n\t\t\titemWithLeastDistance = null;\n\t\t\tfloating = innermostContainer.floating || isFloating(this.currentItem);\n\t\t\tposProperty = floating ? \"left\" : \"top\";\n\t\t\tsizeProperty = floating ? \"width\" : \"height\";\n\t\t\tbase = this.positionAbs[posProperty] + this.offset.click[posProperty];\n\t\t\tfor (j = this.items.length - 1; j >= 0; j--) {\n\t\t\t\tif(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(this.items[j].item[0] === this.currentItem[0]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcur = this.items[j].item.offset()[posProperty];\n\t\t\t\tnearBottom = false;\n\t\t\t\tif(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){\n\t\t\t\t\tnearBottom = true;\n\t\t\t\t\tcur += this.items[j][sizeProperty];\n\t\t\t\t}\n\n\t\t\t\tif(Math.abs(cur - base) < dist) {\n\t\t\t\t\tdist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];\n\t\t\t\t\tthis.direction = nearBottom ? \"up\": \"down\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Check if dropOnEmpty is enabled\n\t\t\tif(!itemWithLeastDistance && !this.options.dropOnEmpty) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(this.currentContainer === this.containers[innermostIndex]) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);\n\t\t\tthis._trigger(\"change\", event, this._uiHash());\n\t\t\tthis.containers[innermostIndex]._trigger(\"change\", event, this._uiHash(this));\n\t\t\tthis.currentContainer = this.containers[innermostIndex];\n\n\t\t\t//Update the placeholder\n\t\t\tthis.options.placeholder.update(this.currentContainer, this.placeholder);\n\n\t\t\tthis.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\t\t\tthis.containers[innermostIndex].containerCache.over = 1;\n\t\t}\n\n\n\t},\n\n\t_createHelper: function(event) {\n\n\t\tvar o = this.options,\n\t\t\thelper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === \"clone\" ? this.currentItem.clone() : this.currentItem);\n\n\t\t//Add the helper to the DOM if that didn't happen already\n\t\tif(!helper.parents(\"body\").length) {\n\t\t\t$(o.appendTo !== \"parent\" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);\n\t\t}\n\n\t\tif(helper[0] === this.currentItem[0]) {\n\t\t\tthis._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css(\"position\"), top: this.currentItem.css(\"top\"), left: this.currentItem.css(\"left\") };\n\t\t}\n\n\t\tif(!helper[0].style.width || o.forceHelperSize) {\n\t\t\thelper.width(this.currentItem.width());\n\t\t}\n\t\tif(!helper[0].style.height || o.forceHelperSize) {\n\t\t\thelper.height(this.currentItem.height());\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_adjustOffsetFromHelper: function(obj) {\n\t\tif (typeof obj === \"string\") {\n\t\t\tobj = obj.split(\" \");\n\t\t}\n\t\tif ($.isArray(obj)) {\n\t\t\tobj = {left: +obj[0], top: +obj[1] || 0};\n\t\t}\n\t\tif (\"left\" in obj) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif (\"right\" in obj) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif (\"top\" in obj) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif (\"bottom\" in obj) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_getParentOffset: function() {\n\n\n\t\t//Get the offsetParent and cache its position\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tvar po = this.offsetParent.offset();\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that\n\t\t// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag\n\t\tif(this.cssPosition === \"absolute\" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\t// This needs to be actually done for all browsers, since pageX/pageY includes this information\n\t\t// with an ugly IE fix\n\t\tif( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === \"html\" && $.ui.ie)) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"),10) || 0),\n\t\t\tleft: po.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"),10) || 0)\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\n\t\tif(this.cssPosition === \"relative\") {\n\t\t\tvar p = this.currentItem.position();\n\t\t\treturn {\n\t\t\t\ttop: p.top - (parseInt(this.helper.css(\"top\"),10) || 0) + this.scrollParent.scrollTop(),\n\t\t\t\tleft: p.left - (parseInt(this.helper.css(\"left\"),10) || 0) + this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t} else {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: (parseInt(this.currentItem.css(\"marginLeft\"),10) || 0),\n\t\t\ttop: (parseInt(this.currentItem.css(\"marginTop\"),10) || 0)\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar ce, co, over,\n\t\t\to = this.options;\n\t\tif(o.containment === \"parent\") {\n\t\t\to.containment = this.helper[0].parentNode;\n\t\t}\n\t\tif(o.containment === \"document\" || o.containment === \"window\") {\n\t\t\tthis.containment = [\n\t\t\t\t0 - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t0 - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t$(o.containment === \"document\" ? document : window).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t($(o.containment === \"document\" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t\tif(!(/^(document|window|parent)$/).test(o.containment)) {\n\t\t\tce = $(o.containment)[0];\n\t\t\tco = $(o.containment).offset();\n\t\t\tover = ($(ce).css(\"overflow\") !== \"hidden\");\n\n\t\t\tthis.containment = [\n\t\t\t\tco.left + (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingLeft\"),10) || 0) - this.margins.left,\n\t\t\t\tco.top + (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingTop\"),10) || 0) - this.margins.top,\n\t\t\t\tco.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingRight\"),10) || 0) - this.helperProportions.width - this.margins.left,\n\t\t\t\tco.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingBottom\"),10) || 0) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t},\n\n\t_convertPositionTo: function(d, pos) {\n\n\t\tif(!pos) {\n\t\t\tpos = this.position;\n\t\t}\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscroll = this.cssPosition === \"absolute\" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,\n\t\t\tscrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpos.top\t+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.relative.top * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.top * mod -\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpos.left +\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.relative.left * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.left * mod\t-\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function(event) {\n\n\t\tvar top, left,\n\t\t\to = this.options,\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY,\n\t\t\tscroll = this.cssPosition === \"absolute\" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n\t\t// This is another very weird special case that only happens for relative elements:\n\t\t// 1. If the css position is relative\n\t\t// 2. and the scroll parent is the document or similar to the offset parent\n\t\t// we have to refresh the relative offset during the scroll so there are no jumps\n\t\tif(this.cssPosition === \"relative\" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {\n\t\t\tthis.offset.relative = this._getRelativeOffset();\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\tif(this.originalPosition) { //If we are not dragging yet, we won't check for options\n\n\t\t\tif(this.containment) {\n\t\t\t\tif(event.pageX - this.offset.click.left < this.containment[0]) {\n\t\t\t\t\tpageX = this.containment[0] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif(event.pageY - this.offset.click.top < this.containment[1]) {\n\t\t\t\t\tpageY = this.containment[1] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif(event.pageX - this.offset.click.left > this.containment[2]) {\n\t\t\t\t\tpageX = this.containment[2] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif(event.pageY - this.offset.click.top > this.containment[3]) {\n\t\t\t\t\tpageY = this.containment[3] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(o.grid) {\n\t\t\t\ttop = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];\n\t\t\t\tpageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\n\t\t\t\tleft = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];\n\t\t\t\tpageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpageY -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.click.top -\t\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.relative.top\t-\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.top +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpageX -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.click.left -\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.relative.left\t-\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.left +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_rearrange: function(event, i, a, hardRefresh) {\n\n\t\ta ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === \"down\" ? i.item[0] : i.item[0].nextSibling));\n\n\t\t//Various things done here to improve the performance:\n\t\t// 1. we create a setTimeout, that calls refreshPositions\n\t\t// 2. on the instance, we have a counter variable, that get's higher after every append\n\t\t// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same\n\t\t// 4. this lets only the last addition to the timeout stack through\n\t\tthis.counter = this.counter ? ++this.counter : 1;\n\t\tvar counter = this.counter;\n\n\t\tthis._delay(function() {\n\t\t\tif(counter === this.counter) {\n\t\t\t\tthis.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove\n\t\t\t}\n\t\t});\n\n\t},\n\n\t_clear: function(event, noPropagation) {\n\n\t\tthis.reverting = false;\n\t\t// We delay all events that have to be triggered to after the point where the placeholder has been removed and\n\t\t// everything else normalized again\n\t\tvar i,\n\t\t\tdelayedTriggers = [];\n\n\t\t// We first have to update the dom position of the actual currentItem\n\t\t// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)\n\t\tif(!this._noFinalSort && this.currentItem.parent().length) {\n\t\t\tthis.placeholder.before(this.currentItem);\n\t\t}\n\t\tthis._noFinalSort = null;\n\n\t\tif(this.helper[0] === this.currentItem[0]) {\n\t\t\tfor(i in this._storedCSS) {\n\t\t\t\tif(this._storedCSS[i] === \"auto\" || this._storedCSS[i] === \"static\") {\n\t\t\t\t\tthis._storedCSS[i] = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\");\n\t\t} else {\n\t\t\tthis.currentItem.show();\n\t\t}\n\n\t\tif(this.fromOutside && !noPropagation) {\n\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"receive\", event, this._uiHash(this.fromOutside)); });\n\t\t}\n\t\tif((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(\".ui-sortable-helper\")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {\n\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"update\", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed\n\t\t}\n\n\t\t// Check if the items Container has Changed and trigger appropriate\n\t\t// events.\n\t\tif (this !== this.currentContainer) {\n\t\t\tif(!noPropagation) {\n\t\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"remove\", event, this._uiHash()); });\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"receive\", event, this._uiHash(this)); }; }).call(this, this.currentContainer));\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"update\", event, this._uiHash(this)); }; }).call(this, this.currentContainer));\n\t\t\t}\n\t\t}\n\n\n\t\t//Post events to containers\n\t\tfunction delayEvent( type, instance, container ) {\n\t\t\treturn function( event ) {\n\t\t\t\tcontainer._trigger( type, event, instance._uiHash( instance ) );\n\t\t\t};\n\t\t}\n\t\tfor (i = this.containers.length - 1; i >= 0; i--){\n\t\t\tif (!noPropagation) {\n\t\t\t\tdelayedTriggers.push( delayEvent( \"deactivate\", this, this.containers[ i ] ) );\n\t\t\t}\n\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\tdelayedTriggers.push( delayEvent( \"out\", this, this.containers[ i ] ) );\n\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t}\n\t\t}\n\n\t\t//Do what was originally in plugins\n\t\tif ( this.storedCursor ) {\n\t\t\tthis.document.find( \"body\" ).css( \"cursor\", this.storedCursor );\n\t\t\tthis.storedStylesheet.remove();\n\t\t}\n\t\tif(this._storedOpacity) {\n\t\t\tthis.helper.css(\"opacity\", this._storedOpacity);\n\t\t}\n\t\tif(this._storedZIndex) {\n\t\t\tthis.helper.css(\"zIndex\", this._storedZIndex === \"auto\" ? \"\" : this._storedZIndex);\n\t\t}\n\n\t\tthis.dragging = false;\n\t\tif(this.cancelHelperRemoval) {\n\t\t\tif(!noPropagation) {\n\t\t\t\tthis._trigger(\"beforeStop\", event, this._uiHash());\n\t\t\t\tfor (i=0; i < delayedTriggers.length; i++) {\n\t\t\t\t\tdelayedTriggers[i].call(this, event);\n\t\t\t\t} //Trigger all delayed events\n\t\t\t\tthis._trigger(\"stop\", event, this._uiHash());\n\t\t\t}\n\n\t\t\tthis.fromOutside = false;\n\t\t\treturn false;\n\t\t}\n\n\t\tif(!noPropagation) {\n\t\t\tthis._trigger(\"beforeStop\", event, this._uiHash());\n\t\t}\n\n\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n\t\tthis.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\n\t\tif(this.helper[0] !== this.currentItem[0]) {\n\t\t\tthis.helper.remove();\n\t\t}\n\t\tthis.helper = null;\n\n\t\tif(!noPropagation) {\n\t\t\tfor (i=0; i < delayedTriggers.length; i++) {\n\t\t\t\tdelayedTriggers[i].call(this, event);\n\t\t\t} //Trigger all delayed events\n\t\t\tthis._trigger(\"stop\", event, this._uiHash());\n\t\t}\n\n\t\tthis.fromOutside = false;\n\t\treturn true;\n\n\t},\n\n\t_trigger: function() {\n\t\tif ($.Widget.prototype._trigger.apply(this, arguments) === false) {\n\t\t\tthis.cancel();\n\t\t}\n\t},\n\n\t_uiHash: function(_inst) {\n\t\tvar inst = _inst || this;\n\t\treturn {\n\t\t\thelper: inst.helper,\n\t\t\tplaceholder: inst.placeholder || $([]),\n\t\t\tposition: inst.position,\n\t\t\toriginalPosition: inst.originalPosition,\n\t\t\toffset: inst.positionAbs,\n\t\t\titem: inst.currentItem,\n\t\t\tsender: _inst ? _inst.element : null\n\t\t};\n\t}\n\n});\n\n})(jQuery);\n","var jQuery = require('jquery');\nrequire('./core');\nrequire('./widget');\nrequire('./button');\n\n/*!\n * jQuery UI Spinner 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/spinner/\n *\n * Depends:\n * jquery.ui.core.js\n * jquery.ui.widget.js\n * jquery.ui.button.js\n */\n(function( $ ) {\n\nfunction modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}\n\n$.widget( \"ui.spinner\", {\n\tversion: \"1.10.4\",\n\tdefaultElement: \"<input>\",\n\twidgetEventPrefix: \"spin\",\n\toptions: {\n\t\tculture: null,\n\t\ticons: {\n\t\t\tdown: \"ui-icon-triangle-1-s\",\n\t\t\tup: \"ui-icon-triangle-1-n\"\n\t\t},\n\t\tincremental: true,\n\t\tmax: null,\n\t\tmin: null,\n\t\tnumberFormat: null,\n\t\tpage: 10,\n\t\tstep: 1,\n\n\t\tchange: null,\n\t\tspin: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_create: function() {\n\t\t// handle string values that need to be parsed\n\t\tthis._setOption( \"max\", this.options.max );\n\t\tthis._setOption( \"min\", this.options.min );\n\t\tthis._setOption( \"step\", this.options.step );\n\n\t\t// Only format if there is a value, prevents the field from being marked\n\t\t// as invalid in Firefox, see #9573.\n\t\tif ( this.value() !== \"\" ) {\n\t\t\t// Format the value, but don't constrain.\n\t\t\tthis._value( this.element.val(), true );\n\t\t}\n\n\t\tthis._draw();\n\t\tthis._on( this._events );\n\t\tthis._refresh();\n\n\t\t// turning off autocomplete prevents the browser from remembering the\n\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\tthis._on( this.window, {\n\t\t\tbeforeunload: function() {\n\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar options = {},\n\t\t\telement = this.element;\n\n\t\t$.each( [ \"min\", \"max\", \"step\" ], function( i, option ) {\n\t\t\tvar value = element.attr( option );\n\t\t\tif ( value !== undefined && value.length ) {\n\t\t\t\toptions[ option ] = value;\n\t\t\t}\n\t\t});\n\n\t\treturn options;\n\t},\n\n\t_events: {\n\t\tkeydown: function( event ) {\n\t\t\tif ( this._start( event ) && this._keydown( event ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\tkeyup: \"_stop\",\n\t\tfocus: function() {\n\t\t\tthis.previous = this.element.val();\n\t\t},\n\t\tblur: function( event ) {\n\t\t\tif ( this.cancelBlur ) {\n\t\t\t\tdelete this.cancelBlur;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._stop();\n\t\t\tthis._refresh();\n\t\t\tif ( this.previous !== this.element.val() ) {\n\t\t\t\tthis._trigger( \"change\", event );\n\t\t\t}\n\t\t},\n\t\tmousewheel: function( event, delta ) {\n\t\t\tif ( !delta ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !this.spinning && !this._start( event ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis._spin( (delta > 0 ? 1 : -1) * this.options.step, event );\n\t\t\tclearTimeout( this.mousewheelTimer );\n\t\t\tthis.mousewheelTimer = this._delay(function() {\n\t\t\t\tif ( this.spinning ) {\n\t\t\t\t\tthis._stop( event );\n\t\t\t\t}\n\t\t\t}, 100 );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t\"mousedown .ui-spinner-button\": function( event ) {\n\t\t\tvar previous;\n\n\t\t\t// We never want the buttons to have focus; whenever the user is\n\t\t\t// interacting with the spinner, the focus should be on the input.\n\t\t\t// If the input is focused then this.previous is properly set from\n\t\t\t// when the input first received focus. If the input is not focused\n\t\t\t// then we need to set this.previous based on the value before spinning.\n\t\t\tprevious = this.element[0] === this.document[0].activeElement ?\n\t\t\t\tthis.previous : this.element.val();\n\t\t\tfunction checkFocus() {\n\t\t\t\tvar isActive = this.element[0] === this.document[0].activeElement;\n\t\t\t\tif ( !isActive ) {\n\t\t\t\t\tthis.element.focus();\n\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t// support: IE\n\t\t\t\t\t// IE sets focus asynchronously, so we need to check if focus\n\t\t\t\t\t// moved off of the input because the user clicked on the button.\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ensure focus is on (or stays on) the text field\n\t\t\tevent.preventDefault();\n\t\t\tcheckFocus.call( this );\n\n\t\t\t// support: IE\n\t\t\t// IE doesn't prevent moving focus even with event.preventDefault()\n\t\t\t// so we set a flag to know when we should ignore the blur event\n\t\t\t// and check (again) if focus moved off of the input.\n\t\t\tthis.cancelBlur = true;\n\t\t\tthis._delay(function() {\n\t\t\t\tdelete this.cancelBlur;\n\t\t\t\tcheckFocus.call( this );\n\t\t\t});\n\n\t\t\tif ( this._start( event ) === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._repeat( null, $( event.currentTarget ).hasClass( \"ui-spinner-up\" ) ? 1 : -1, event );\n\t\t},\n\t\t\"mouseup .ui-spinner-button\": \"_stop\",\n\t\t\"mouseenter .ui-spinner-button\": function( event ) {\n\t\t\t// button will add ui-state-active if mouse was down while mouseleave and kept down\n\t\t\tif ( !$( event.currentTarget ).hasClass( \"ui-state-active\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this._start( event ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis._repeat( null, $( event.currentTarget ).hasClass( \"ui-spinner-up\" ) ? 1 : -1, event );\n\t\t},\n\t\t// TODO: do we really want to consider this a stop?\n\t\t// shouldn't we just stop the repeater and wait until mouseup before\n\t\t// we trigger the stop event?\n\t\t\"mouseleave .ui-spinner-button\": \"_stop\"\n\t},\n\n\t_draw: function() {\n\t\tvar uiSpinner = this.uiSpinner = this.element\n\t\t\t.addClass( \"ui-spinner-input\" )\n\t\t\t.attr( \"autocomplete\", \"off\" )\n\t\t\t.wrap( this._uiSpinnerHtml() )\n\t\t\t.parent()\n\t\t\t\t// add buttons\n\t\t\t\t.append( this._buttonHtml() );\n\n\t\tthis.element.attr( \"role\", \"spinbutton\" );\n\n\t\t// button bindings\n\t\tthis.buttons = uiSpinner.find( \".ui-spinner-button\" )\n\t\t\t.attr( \"tabIndex\", -1 )\n\t\t\t.button()\n\t\t\t.removeClass( \"ui-corner-all\" );\n\n\t\t// IE 6 doesn't understand height: 50% for the buttons\n\t\t// unless the wrapper has an explicit height\n\t\tif ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&\n\t\t\t\tuiSpinner.height() > 0 ) {\n\t\t\tuiSpinner.height( uiSpinner.height() );\n\t\t}\n\n\t\t// disable spinner if element was already disabled\n\t\tif ( this.options.disabled ) {\n\t\t\tthis.disable();\n\t\t}\n\t},\n\n\t_keydown: function( event ) {\n\t\tvar options = this.options,\n\t\t\tkeyCode = $.ui.keyCode;\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase keyCode.UP:\n\t\t\tthis._repeat( null, 1, event );\n\t\t\treturn true;\n\t\tcase keyCode.DOWN:\n\t\t\tthis._repeat( null, -1, event );\n\t\t\treturn true;\n\t\tcase keyCode.PAGE_UP:\n\t\t\tthis._repeat( null, options.page, event );\n\t\t\treturn true;\n\t\tcase keyCode.PAGE_DOWN:\n\t\t\tthis._repeat( null, -options.page, event );\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_uiSpinnerHtml: function() {\n\t\treturn \"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>\";\n\t},\n\n\t_buttonHtml: function() {\n\t\treturn \"\" +\n\t\t\t\"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>\" +\n\t\t\t\t\"<span class='ui-icon \" + this.options.icons.up + \"'>▲</span>\" +\n\t\t\t\"</a>\" +\n\t\t\t\"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>\" +\n\t\t\t\t\"<span class='ui-icon \" + this.options.icons.down + \"'>▼</span>\" +\n\t\t\t\"</a>\";\n\t},\n\n\t_start: function( event ) {\n\t\tif ( !this.spinning && this._trigger( \"start\", event ) === false ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !this.counter ) {\n\t\t\tthis.counter = 1;\n\t\t}\n\t\tthis.spinning = true;\n\t\treturn true;\n\t},\n\n\t_repeat: function( i, steps, event ) {\n\t\ti = i || 500;\n\n\t\tclearTimeout( this.timer );\n\t\tthis.timer = this._delay(function() {\n\t\t\tthis._repeat( 40, steps, event );\n\t\t}, i );\n\n\t\tthis._spin( steps * this.options.step, event );\n\t},\n\n\t_spin: function( step, event ) {\n\t\tvar value = this.value() || 0;\n\n\t\tif ( !this.counter ) {\n\t\t\tthis.counter = 1;\n\t\t}\n\n\t\tvalue = this._adjustValue( value + step * this._increment( this.counter ) );\n\n\t\tif ( !this.spinning || this._trigger( \"spin\", event, { value: value } ) !== false) {\n\t\t\tthis._value( value );\n\t\t\tthis.counter++;\n\t\t}\n\t},\n\n\t_increment: function( i ) {\n\t\tvar incremental = this.options.incremental;\n\n\t\tif ( incremental ) {\n\t\t\treturn $.isFunction( incremental ) ?\n\t\t\t\tincremental( i ) :\n\t\t\t\tMath.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );\n\t\t}\n\n\t\treturn 1;\n\t},\n\n\t_precision: function() {\n\t\tvar precision = this._precisionOf( this.options.step );\n\t\tif ( this.options.min !== null ) {\n\t\t\tprecision = Math.max( precision, this._precisionOf( this.options.min ) );\n\t\t}\n\t\treturn precision;\n\t},\n\n\t_precisionOf: function( num ) {\n\t\tvar str = num.toString(),\n\t\t\tdecimal = str.indexOf( \".\" );\n\t\treturn decimal === -1 ? 0 : str.length - decimal - 1;\n\t},\n\n\t_adjustValue: function( value ) {\n\t\tvar base, aboveMin,\n\t\t\toptions = this.options;\n\n\t\t// make sure we're at a valid step\n\t\t// - find out where we are relative to the base (min or 0)\n\t\tbase = options.min !== null ? options.min : 0;\n\t\taboveMin = value - base;\n\t\t// - round to the nearest step\n\t\taboveMin = Math.round(aboveMin / options.step) * options.step;\n\t\t// - rounding is based on 0, so adjust back to our base\n\t\tvalue = base + aboveMin;\n\n\t\t// fix precision from bad JS floating point math\n\t\tvalue = parseFloat( value.toFixed( this._precision() ) );\n\n\t\t// clamp the value\n\t\tif ( options.max !== null && value > options.max) {\n\t\t\treturn options.max;\n\t\t}\n\t\tif ( options.min !== null && value < options.min ) {\n\t\t\treturn options.min;\n\t\t}\n\n\t\treturn value;\n\t},\n\n\t_stop: function( event ) {\n\t\tif ( !this.spinning ) {\n\t\t\treturn;\n\t\t}\n\n\t\tclearTimeout( this.timer );\n\t\tclearTimeout( this.mousewheelTimer );\n\t\tthis.counter = 0;\n\t\tthis.spinning = false;\n\t\tthis._trigger( \"stop\", event );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"culture\" || key === \"numberFormat\" ) {\n\t\t\tvar prevValue = this._parse( this.element.val() );\n\t\t\tthis.options[ key ] = value;\n\t\t\tthis.element.val( this._format( prevValue ) );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"max\" || key === \"min\" || key === \"step\" ) {\n\t\t\tif ( typeof value === \"string\" ) {\n\t\t\t\tvalue = this._parse( value );\n\t\t\t}\n\t\t}\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis.buttons.first().find( \".ui-icon\" )\n\t\t\t\t.removeClass( this.options.icons.up )\n\t\t\t\t.addClass( value.up );\n\t\t\tthis.buttons.last().find( \".ui-icon\" )\n\t\t\t\t.removeClass( this.options.icons.down )\n\t\t\t\t.addClass( value.down );\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tif ( value ) {\n\t\t\t\tthis.element.prop( \"disabled\", true );\n\t\t\t\tthis.buttons.button( \"disable\" );\n\t\t\t} else {\n\t\t\t\tthis.element.prop( \"disabled\", false );\n\t\t\t\tthis.buttons.button( \"enable\" );\n\t\t\t}\n\t\t}\n\t},\n\n\t_setOptions: modifier(function( options ) {\n\t\tthis._super( options );\n\t\tthis._value( this.element.val() );\n\t}),\n\n\t_parse: function( val ) {\n\t\tif ( typeof val === \"string\" && val !== \"\" ) {\n\t\t\tval = window.Globalize && this.options.numberFormat ?\n\t\t\t\tGlobalize.parseFloat( val, 10, this.options.culture ) : +val;\n\t\t}\n\t\treturn val === \"\" || isNaN( val ) ? null : val;\n\t},\n\n\t_format: function( value ) {\n\t\tif ( value === \"\" ) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn window.Globalize && this.options.numberFormat ?\n\t\t\tGlobalize.format( value, this.options.numberFormat, this.options.culture ) :\n\t\t\tvalue;\n\t},\n\n\t_refresh: function() {\n\t\tthis.element.attr({\n\t\t\t\"aria-valuemin\": this.options.min,\n\t\t\t\"aria-valuemax\": this.options.max,\n\t\t\t// TODO: what should we do with values that can't be parsed?\n\t\t\t\"aria-valuenow\": this._parse( this.element.val() )\n\t\t});\n\t},\n\n\t// update the value without triggering change\n\t_value: function( value, allowAny ) {\n\t\tvar parsed;\n\t\tif ( value !== \"\" ) {\n\t\t\tparsed = this._parse( value );\n\t\t\tif ( parsed !== null ) {\n\t\t\t\tif ( !allowAny ) {\n\t\t\t\t\tparsed = this._adjustValue( parsed );\n\t\t\t\t}\n\t\t\t\tvalue = this._format( parsed );\n\t\t\t}\n\t\t}\n\t\tthis.element.val( value );\n\t\tthis._refresh();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-spinner-input\" )\n\t\t\t.prop( \"disabled\", false )\n\t\t\t.removeAttr( \"autocomplete\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-valuemin\" )\n\t\t\t.removeAttr( \"aria-valuemax\" )\n\t\t\t.removeAttr( \"aria-valuenow\" );\n\t\tthis.uiSpinner.replaceWith( this.element );\n\t},\n\n\tstepUp: modifier(function( steps ) {\n\t\tthis._stepUp( steps );\n\t}),\n\t_stepUp: function( steps ) {\n\t\tif ( this._start() ) {\n\t\t\tthis._spin( (steps || 1) * this.options.step );\n\t\t\tthis._stop();\n\t\t}\n\t},\n\n\tstepDown: modifier(function( steps ) {\n\t\tthis._stepDown( steps );\n\t}),\n\t_stepDown: function( steps ) {\n\t\tif ( this._start() ) {\n\t\t\tthis._spin( (steps || 1) * -this.options.step );\n\t\t\tthis._stop();\n\t\t}\n\t},\n\n\tpageUp: modifier(function( pages ) {\n\t\tthis._stepUp( (pages || 1) * this.options.page );\n\t}),\n\n\tpageDown: modifier(function( pages ) {\n\t\tthis._stepDown( (pages || 1) * this.options.page );\n\t}),\n\n\tvalue: function( newVal ) {\n\t\tif ( !arguments.length ) {\n\t\t\treturn this._parse( this.element.val() );\n\t\t}\n\t\tmodifier( this._value ).call( this, newVal );\n\t},\n\n\twidget: function() {\n\t\treturn this.uiSpinner;\n\t}\n});\n\n}( jQuery ) );\n","var jQuery = require('jquery');\n\n/*!\n * jQuery UI Widget 1.10.4\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/jQuery.widget/\n */\n(function( $, undefined ) {\n\nvar uuid = 0,\n\tslice = Array.prototype.slice,\n\t_cleanData = $.cleanData;\n$.cleanData = function( elems ) {\n\tfor ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n\t\ttry {\n\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t// http://bugs.jquery.com/ticket/8235\n\t\t} catch( e ) {}\n\t}\n\t_cleanData( elems );\n};\n\n$.widget = function( name, base, prototype ) {\n\tvar fullName, existingConstructor, constructor, basePrototype,\n\t\t// proxiedPrototype allows the provided prototype to remain unmodified\n\t\t// so that it can be used as a mixin for multiple widgets (#8876)\n\t\tproxiedPrototype = {},\n\t\tnamespace = name.split( \".\" )[ 0 ];\n\n\tname = name.split( \".\" )[ 1 ];\n\tfullName = namespace + \"-\" + name;\n\n\tif ( !prototype ) {\n\t\tprototype = base;\n\t\tbase = $.Widget;\n\t}\n\n\t// create selector for plugin\n\t$.expr[ \":\" ][ fullName.toLowerCase() ] = function( elem ) {\n\t\treturn !!$.data( elem, fullName );\n\t};\n\n\t$[ namespace ] = $[ namespace ] || {};\n\texistingConstructor = $[ namespace ][ name ];\n\tconstructor = $[ namespace ][ name ] = function( options, element ) {\n\t\t// allow instantiation without \"new\" keyword\n\t\tif ( !this._createWidget ) {\n\t\t\treturn new constructor( options, element );\n\t\t}\n\n\t\t// allow instantiation without initializing for simple inheritance\n\t\t// must use \"new\" keyword (the code above always passes args)\n\t\tif ( arguments.length ) {\n\t\t\tthis._createWidget( options, element );\n\t\t}\n\t};\n\t// extend with the existing constructor to carry over any static properties\n\t$.extend( constructor, existingConstructor, {\n\t\tversion: prototype.version,\n\t\t// copy the object used to create the prototype in case we need to\n\t\t// redefine the widget later\n\t\t_proto: $.extend( {}, prototype ),\n\t\t// track widgets that inherit from this widget in case this widget is\n\t\t// redefined after a widget inherits from it\n\t\t_childConstructors: []\n\t});\n\n\tbasePrototype = new base();\n\t// we need to make the options hash a property directly on the new instance\n\t// otherwise we'll modify the options hash on the prototype that we're\n\t// inheriting from\n\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\n\t$.each( prototype, function( prop, value ) {\n\t\tif ( !$.isFunction( value ) ) {\n\t\t\tproxiedPrototype[ prop ] = value;\n\t\t\treturn;\n\t\t}\n\t\tproxiedPrototype[ prop ] = (function() {\n\t\t\tvar _super = function() {\n\t\t\t\t\treturn base.prototype[ prop ].apply( this, arguments );\n\t\t\t\t},\n\t\t\t\t_superApply = function( args ) {\n\t\t\t\t\treturn base.prototype[ prop ].apply( this, args );\n\t\t\t\t};\n\t\t\treturn function() {\n\t\t\t\tvar __super = this._super,\n\t\t\t\t\t__superApply = this._superApply,\n\t\t\t\t\treturnValue;\n\n\t\t\t\tthis._super = _super;\n\t\t\t\tthis._superApply = _superApply;\n\n\t\t\t\treturnValue = value.apply( this, arguments );\n\n\t\t\t\tthis._super = __super;\n\t\t\t\tthis._superApply = __superApply;\n\n\t\t\t\treturn returnValue;\n\t\t\t};\n\t\t})();\n\t});\n\tconstructor.prototype = $.widget.extend( basePrototype, {\n\t\t// TODO: remove support for widgetEventPrefix\n\t\t// always use the name + a colon as the prefix, e.g., draggable:start\n\t\t// don't prefix for widgets that aren't DOM-based\n\t\twidgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name\n\t}, proxiedPrototype, {\n\t\tconstructor: constructor,\n\t\tnamespace: namespace,\n\t\twidgetName: name,\n\t\twidgetFullName: fullName\n\t});\n\n\t// If this widget is being redefined then we need to find all widgets that\n\t// are inheriting from it and redefine all of them so that they inherit from\n\t// the new version of this widget. We're essentially trying to replace one\n\t// level in the prototype chain.\n\tif ( existingConstructor ) {\n\t\t$.each( existingConstructor._childConstructors, function( i, child ) {\n\t\t\tvar childPrototype = child.prototype;\n\n\t\t\t// redefine the child widget using the same prototype that was\n\t\t\t// originally used, but inherit from the new version of the base\n\t\t\t$.widget( childPrototype.namespace + \".\" + childPrototype.widgetName, constructor, child._proto );\n\t\t});\n\t\t// remove the list of existing child constructors from the old constructor\n\t\t// so the old child constructors can be garbage collected\n\t\tdelete existingConstructor._childConstructors;\n\t} else {\n\t\tbase._childConstructors.push( constructor );\n\t}\n\n\t$.widget.bridge( name, constructor );\n};\n\n$.widget.extend = function( target ) {\n\tvar input = slice.call( arguments, 1 ),\n\t\tinputIndex = 0,\n\t\tinputLength = input.length,\n\t\tkey,\n\t\tvalue;\n\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\n\t\tfor ( key in input[ inputIndex ] ) {\n\t\t\tvalue = input[ inputIndex ][ key ];\n\t\t\tif ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {\n\t\t\t\t// Clone objects\n\t\t\t\tif ( $.isPlainObject( value ) ) {\n\t\t\t\t\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\n\t\t\t\t\t\t$.widget.extend( {}, target[ key ], value ) :\n\t\t\t\t\t\t// Don't extend strings, arrays, etc. with objects\n\t\t\t\t\t\t$.widget.extend( {}, value );\n\t\t\t\t// Copy everything else by reference\n\t\t\t\t} else {\n\t\t\t\t\ttarget[ key ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn target;\n};\n\n$.widget.bridge = function( name, object ) {\n\tvar fullName = object.prototype.widgetFullName || name;\n\t$.fn[ name ] = function( options ) {\n\t\tvar isMethodCall = typeof options === \"string\",\n\t\t\targs = slice.call( arguments, 1 ),\n\t\t\treturnValue = this;\n\n\t\t// allow multiple hashes to be passed on init\n\t\toptions = !isMethodCall && args.length ?\n\t\t\t$.widget.extend.apply( null, [ options ].concat(args) ) :\n\t\t\toptions;\n\n\t\tif ( isMethodCall ) {\n\t\t\tthis.each(function() {\n\t\t\t\tvar methodValue,\n\t\t\t\t\tinstance = $.data( this, fullName );\n\t\t\t\tif ( !instance ) {\n\t\t\t\t\treturn $.error( \"cannot call methods on \" + name + \" prior to initialization; \" +\n\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t}\n\t\t\t\tif ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for \" + name + \" widget instance\" );\n\t\t\t\t}\n\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\tmethodValue;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthis.each(function() {\n\t\t\t\tvar instance = $.data( this, fullName );\n\t\t\t\tif ( instance ) {\n\t\t\t\t\tinstance.option( options || {} )._init();\n\t\t\t\t} else {\n\t\t\t\t\t$.data( this, fullName, new object( options, this ) );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn returnValue;\n\t};\n};\n\n$.Widget = function( /* options, element */ ) {};\n$.Widget._childConstructors = [];\n\n$.Widget.prototype = {\n\twidgetName: \"widget\",\n\twidgetEventPrefix: \"\",\n\tdefaultElement: \"<div>\",\n\toptions: {\n\t\tdisabled: false,\n\n\t\t// callbacks\n\t\tcreate: null\n\t},\n\t_createWidget: function( options, element ) {\n\t\telement = $( element || this.defaultElement || this )[ 0 ];\n\t\tthis.element = $( element );\n\t\tthis.uuid = uuid++;\n\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\n\t\tthis.options = $.widget.extend( {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\n\n\t\tthis.bindings = $();\n\t\tthis.hoverable = $();\n\t\tthis.focusable = $();\n\n\t\tif ( element !== this ) {\n\t\t\t$.data( element, this.widgetFullName, this );\n\t\t\tthis._on( true, this.element, {\n\t\t\t\tremove: function( event ) {\n\t\t\t\t\tif ( event.target === element ) {\n\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.document = $( element.style ?\n\t\t\t\t// element within the document\n\t\t\t\telement.ownerDocument :\n\t\t\t\t// element is window or document\n\t\t\t\telement.document || element );\n\t\t\tthis.window = $( this.document[0].defaultView || this.document[0].parentWindow );\n\t\t}\n\n\t\tthis._create();\n\t\tthis._trigger( \"create\", null, this._getCreateEventData() );\n\t\tthis._init();\n\t},\n\t_getCreateOptions: $.noop,\n\t_getCreateEventData: $.noop,\n\t_create: $.noop,\n\t_init: $.noop,\n\n\tdestroy: function() {\n\t\tthis._destroy();\n\t\t// we can probably remove the unbind calls in 2.0\n\t\t// all event bindings should go through this._on()\n\t\tthis.element\n\t\t\t.unbind( this.eventNamespace )\n\t\t\t// 1.9 BC for #7810\n\t\t\t// TODO remove dual storage\n\t\t\t.removeData( this.widgetName )\n\t\t\t.removeData( this.widgetFullName )\n\t\t\t// support: jquery <1.6.3\n\t\t\t// http://bugs.jquery.com/ticket/9413\n\t\t\t.removeData( $.camelCase( this.widgetFullName ) );\n\t\tthis.widget()\n\t\t\t.unbind( this.eventNamespace )\n\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t.removeClass(\n\t\t\t\tthis.widgetFullName + \"-disabled \" +\n\t\t\t\t\"ui-state-disabled\" );\n\n\t\t// clean up events and states\n\t\tthis.bindings.unbind( this.eventNamespace );\n\t\tthis.hoverable.removeClass( \"ui-state-hover\" );\n\t\tthis.focusable.removeClass( \"ui-state-focus\" );\n\t},\n\t_destroy: $.noop,\n\n\twidget: function() {\n\t\treturn this.element;\n\t},\n\n\toption: function( key, value ) {\n\t\tvar options = key,\n\t\t\tparts,\n\t\t\tcurOption,\n\t\t\ti;\n\n\t\tif ( arguments.length === 0 ) {\n\t\t\t// don't return a reference to the internal hash\n\t\t\treturn $.widget.extend( {}, this.options );\n\t\t}\n\n\t\tif ( typeof key === \"string\" ) {\n\t\t\t// handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n\t\t\toptions = {};\n\t\t\tparts = key.split( \".\" );\n\t\t\tkey = parts.shift();\n\t\t\tif ( parts.length ) {\n\t\t\t\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\n\t\t\t\tfor ( i = 0; i < parts.length - 1; i++ ) {\n\t\t\t\t\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\n\t\t\t\t\tcurOption = curOption[ parts[ i ] ];\n\t\t\t\t}\n\t\t\t\tkey = parts.pop();\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn curOption[ key ] === undefined ? null : curOption[ key ];\n\t\t\t\t}\n\t\t\t\tcurOption[ key ] = value;\n\t\t\t} else {\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn this.options[ key ] === undefined ? null : this.options[ key ];\n\t\t\t\t}\n\t\t\t\toptions[ key ] = value;\n\t\t\t}\n\t\t}\n\n\t\tthis._setOptions( options );\n\n\t\treturn this;\n\t},\n\t_setOptions: function( options ) {\n\t\tvar key;\n\n\t\tfor ( key in options ) {\n\t\t\tthis._setOption( key, options[ key ] );\n\t\t}\n\n\t\treturn this;\n\t},\n\t_setOption: function( key, value ) {\n\t\tthis.options[ key ] = value;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.widget()\n\t\t\t\t.toggleClass( this.widgetFullName + \"-disabled ui-state-disabled\", !!value )\n\t\t\t\t.attr( \"aria-disabled\", value );\n\t\t\tthis.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\tthis.focusable.removeClass( \"ui-state-focus\" );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tenable: function() {\n\t\treturn this._setOption( \"disabled\", false );\n\t},\n\tdisable: function() {\n\t\treturn this._setOption( \"disabled\", true );\n\t},\n\n\t_on: function( suppressDisabledCheck, element, handlers ) {\n\t\tvar delegateElement,\n\t\t\tinstance = this;\n\n\t\t// no suppressDisabledCheck flag, shuffle arguments\n\t\tif ( typeof suppressDisabledCheck !== \"boolean\" ) {\n\t\t\thandlers = element;\n\t\t\telement = suppressDisabledCheck;\n\t\t\tsuppressDisabledCheck = false;\n\t\t}\n\n\t\t// no element argument, shuffle and use this.element\n\t\tif ( !handlers ) {\n\t\t\thandlers = element;\n\t\t\telement = this.element;\n\t\t\tdelegateElement = this.widget();\n\t\t} else {\n\t\t\t// accept selectors, DOM elements\n\t\t\telement = delegateElement = $( element );\n\t\t\tthis.bindings = this.bindings.add( element );\n\t\t}\n\n\t\t$.each( handlers, function( event, handler ) {\n\t\t\tfunction handlerProxy() {\n\t\t\t\t// allow widgets to customize the disabled handling\n\t\t\t\t// - disabled as an array instead of boolean\n\t\t\t\t// - disabled class as method for disabling individual parts\n\t\t\t\tif ( !suppressDisabledCheck &&\n\t\t\t\t\t\t( instance.options.disabled === true ||\n\t\t\t\t\t\t\t$( this ).hasClass( \"ui-state-disabled\" ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t.apply( instance, arguments );\n\t\t\t}\n\n\t\t\t// copy the guid so direct unbinding works\n\t\t\tif ( typeof handler !== \"string\" ) {\n\t\t\t\thandlerProxy.guid = handler.guid =\n\t\t\t\t\thandler.guid || handlerProxy.guid || $.guid++;\n\t\t\t}\n\n\t\t\tvar match = event.match( /^(\\w+)\\s*(.*)$/ ),\n\t\t\t\teventName = match[1] + instance.eventNamespace,\n\t\t\t\tselector = match[2];\n\t\t\tif ( selector ) {\n\t\t\t\tdelegateElement.delegate( selector, eventName, handlerProxy );\n\t\t\t} else {\n\t\t\t\telement.bind( eventName, handlerProxy );\n\t\t\t}\n\t\t});\n\t},\n\n\t_off: function( element, eventName ) {\n\t\teventName = (eventName || \"\").split( \" \" ).join( this.eventNamespace + \" \" ) + this.eventNamespace;\n\t\telement.unbind( eventName ).undelegate( eventName );\n\t},\n\n\t_delay: function( handler, delay ) {\n\t\tfunction handlerProxy() {\n\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t.apply( instance, arguments );\n\t\t}\n\t\tvar instance = this;\n\t\treturn setTimeout( handlerProxy, delay || 0 );\n\t},\n\n\t_hoverable: function( element ) {\n\t\tthis.hoverable = this.hoverable.add( element );\n\t\tthis._on( element, {\n\t\t\tmouseenter: function( event ) {\n\t\t\t\t$( event.currentTarget ).addClass( \"ui-state-hover\" );\n\t\t\t},\n\t\t\tmouseleave: function( event ) {\n\t\t\t\t$( event.currentTarget ).removeClass( \"ui-state-hover\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_focusable: function( element ) {\n\t\tthis.focusable = this.focusable.add( element );\n\t\tthis._on( element, {\n\t\t\tfocusin: function( event ) {\n\t\t\t\t$( event.currentTarget ).addClass( \"ui-state-focus\" );\n\t\t\t},\n\t\t\tfocusout: function( event ) {\n\t\t\t\t$( event.currentTarget ).removeClass( \"ui-state-focus\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_trigger: function( type, event, data ) {\n\t\tvar prop, orig,\n\t\t\tcallback = this.options[ type ];\n\n\t\tdata = data || {};\n\t\tevent = $.Event( event );\n\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\ttype :\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\t\t// the original event may come from any element\n\t\t// so we need to reset the target on the new event\n\t\tevent.target = this.element[ 0 ];\n\n\t\t// copy original event properties over to the new event\n\t\torig = event.originalEvent;\n\t\tif ( orig ) {\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element.trigger( event, data );\n\t\treturn !( $.isFunction( callback ) &&\n\t\t\tcallback.apply( this.element[0], [ event ].concat( data ) ) === false ||\n\t\t\tevent.isDefaultPrevented() );\n\t}\n};\n\n$.each( { show: \"fadeIn\", hide: \"fadeOut\" }, function( method, defaultEffect ) {\n\t$.Widget.prototype[ \"_\" + method ] = function( element, options, callback ) {\n\t\tif ( typeof options === \"string\" ) {\n\t\t\toptions = { effect: options };\n\t\t}\n\t\tvar hasOptions,\n\t\t\teffectName = !options ?\n\t\t\t\tmethod :\n\t\t\t\toptions === true || typeof options === \"number\" ?\n\t\t\t\t\tdefaultEffect :\n\t\t\t\t\toptions.effect || defaultEffect;\n\t\toptions = options || {};\n\t\tif ( typeof options === \"number\" ) {\n\t\t\toptions = { duration: options };\n\t\t}\n\t\thasOptions = !$.isEmptyObject( options );\n\t\toptions.complete = callback;\n\t\tif ( options.delay ) {\n\t\t\telement.delay( options.delay );\n\t\t}\n\t\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\n\t\t\telement[ method ]( options );\n\t\t} else if ( effectName !== method && element[ effectName ] ) {\n\t\t\telement[ effectName ]( options.duration, options.easing, callback );\n\t\t} else {\n\t\t\telement.queue(function( next ) {\n\t\t\t\t$( this )[ method ]();\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback.call( element[ 0 ] );\n\t\t\t\t}\n\t\t\t\tnext();\n\t\t\t});\n\t\t}\n\t};\n});\n\n})( jQuery );\n","var $ = require(\"jquery\");\n/* ========================================================================\n* Bootstrap: button.js v3.1.1\n* http://getbootstrap.com/javascript/#buttons\n* ========================================================================\n* Copyright 2011-2014 Twitter, Inc.\n* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n* ======================================================================== */\n\n'use strict';\n\n// BUTTON PUBLIC CLASS DEFINITION\n// ==============================\n\nvar Button = function (element, options) {\n this.$element = $(element)\n this.options = $.extend({}, Button.DEFAULTS, options)\n this.isLoading = false\n}\n\nButton.DEFAULTS = {\n loadingText: 'loading...'\n}\n\nButton.prototype.setState = function (state) {\n var d = 'bk-bs-disabled'\n var $el = this.$element\n var val = $el.is('input') ? 'val' : 'html'\n var data = $el.data()\n\n state = state + 'Text'\n\n if (!data.resetText) $el.data('resetText', $el[val]())\n\n $el[val](data[state] || this.options[state])\n\n // push to event loop to allow forms to submit\n setTimeout($.proxy(function () {\n if (state == 'loadingText') {\n this.isLoading = true\n $el.addClass(d).attr(d, d)\n } else if (this.isLoading) {\n this.isLoading = false\n $el.removeClass(d).removeAttr(d)\n }\n }, this), 0)\n}\n\nButton.prototype.toggle = function () {\n var changed = true\n var $parent = this.$element.closest('[data-bk-bs-toggle=\"buttons\"]')\n\n if ($parent.length) {\n var $input = this.$element.find('input')\n if ($input.prop('type') == 'radio') {\n if ($input.prop('checked') && this.$element.hasClass('bk-bs-active')) changed = false\n else $parent.find('.bk-bs-active').removeClass('bk-bs-active')\n }\n if (changed) $input.prop('checked', !this.$element.hasClass('bk-bs-active')).trigger('change')\n }\n\n if (changed) this.$element.toggleClass('bk-bs-active')\n}\n\n\n// BUTTON PLUGIN DEFINITION\n// ========================\n\nvar old = $.fn.button\n\n$.fn.button = function (option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bk-bs.button')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bk-bs.button', (data = new Button(this, options)))\n\n if (option == 'toggle') data.toggle()\n else if (option) data.setState(option)\n })\n}\n\n$.fn.button.Constructor = Button\n\n\n// BUTTON NO CONFLICT\n// ==================\n\n$.fn.button.noConflict = function () {\n $.fn.button = old\n return this\n}\n\n\n// BUTTON DATA-API\n// ===============\n\n$(document).on('click.bk-bs.button.data-api', '[data-bk-bs-toggle^=button]', function (e) {\n var $btn = $(e.target)\n if (!$btn.hasClass('bk-bs-btn')) $btn = $btn.closest('.bk-bs-btn')\n $btn.button('toggle')\n e.preventDefault()\n})\n","var $ = require(\"jquery\");\n/* ========================================================================\n * Bootstrap: modal.js v3.1.1\n * http://getbootstrap.com/javascript/#modals\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n'use strict';\n\n// MODAL CLASS DEFINITION\n// ======================\n\nvar Modal = function (element, options) {\n this.options = options\n this.$element = $(element)\n this.$backdrop =\n this.isShown = null\n\n if (this.options.remote) {\n this.$element\n .find('.bk-bs-modal-content')\n .load(this.options.remote, $.proxy(function () {\n this.$element.trigger('loaded.bk-bs.modal')\n }, this))\n }\n}\n\nModal.DEFAULTS = {\n backdrop: true,\n keyboard: true,\n show: true\n}\n\nModal.prototype.toggle = function (_relatedTarget) {\n return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)\n}\n\nModal.prototype.show = function (_relatedTarget) {\n var that = this\n var e = $.Event('show.bk-bs.modal', { relatedTarget: _relatedTarget })\n\n this.$element.trigger(e)\n\n if (this.isShown || e.isDefaultPrevented()) return\n\n this.isShown = true\n\n this.escape()\n\n this.$element.on('click.dismiss.bk-bs.modal', '[data-bk-bs-dismiss=\"modal\"]', $.proxy(this.hide, this))\n\n this.backdrop(function () {\n var transition = $.support.transition && that.$element.hasClass('bk-bs-fade')\n\n if (!that.$element.parent().length) {\n that.$element.appendTo(document.body) // don't move modals dom position\n }\n\n that.$element\n .show()\n .scrollTop(0)\n\n if (transition) {\n that.$element[0].offsetWidth // force reflow\n }\n\n that.$element\n .addClass('bk-bs-in')\n .attr('aria-hidden', false)\n\n that.enforceFocus()\n\n var e = $.Event('shown.bk-bs.modal', { relatedTarget: _relatedTarget })\n\n transition ?\n that.$element.find('.bk-bs-modal-dialog') // wait for modal to slide in\n .one($.support.transition.end, function () {\n that.$element.focus().trigger(e)\n })\n .emulateTransitionEnd(300) :\n that.$element.focus().trigger(e)\n })\n}\n\nModal.prototype.hide = function (e) {\n if (e) e.preventDefault()\n\n e = $.Event('hide.bk-bs.modal')\n\n this.$element.trigger(e)\n\n if (!this.isShown || e.isDefaultPrevented()) return\n\n this.isShown = false\n\n this.escape()\n\n $(document).off('focusin.bk-bs.modal')\n\n this.$element\n .removeClass('bk-bs-in')\n .attr('aria-hidden', true)\n .off('click.dismiss.bk-bs.modal')\n\n $.support.transition && this.$element.hasClass('bk-bs-fade') ?\n this.$element\n .one($.support.transition.end, $.proxy(this.hideModal, this))\n .emulateTransitionEnd(300) :\n this.hideModal()\n}\n\nModal.prototype.enforceFocus = function () {\n $(document)\n .off('focusin.bk-bs.modal') // guard against infinite focus loop\n .on('focusin.bk-bs.modal', $.proxy(function (e) {\n if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {\n this.$element.focus()\n }\n }, this))\n}\n\nModal.prototype.escape = function () {\n if (this.isShown && this.options.keyboard) {\n this.$element.on('keyup.dismiss.bk-bs.modal', $.proxy(function (e) {\n e.which == 27 && this.hide()\n }, this))\n } else if (!this.isShown) {\n this.$element.off('keyup.dismiss.bk-bs.modal')\n }\n}\n\nModal.prototype.hideModal = function () {\n var that = this\n this.$element.hide()\n this.backdrop(function () {\n that.removeBackdrop()\n that.$element.trigger('hidden.bk-bs.modal')\n })\n}\n\nModal.prototype.removeBackdrop = function () {\n this.$backdrop && this.$backdrop.remove()\n this.$backdrop = null\n}\n\nModal.prototype.backdrop = function (callback) {\n var animate = this.$element.hasClass('bk-bs-fade') ? 'bk-bs-fade' : ''\n\n if (this.isShown && this.options.backdrop) {\n var doAnimate = $.support.transition && animate\n\n this.$backdrop = $('<div class=\"bk-bs-modal-backdrop ' + animate + '\" />')\n .appendTo(document.body)\n\n this.$element.on('click.dismiss.bk-bs.modal', $.proxy(function (e) {\n if (e.target !== e.currentTarget) return\n this.options.backdrop == 'static'\n ? this.$element[0].focus.call(this.$element[0])\n : this.hide.call(this)\n }, this))\n\n if (doAnimate) this.$backdrop[0].offsetWidth // force reflow\n\n this.$backdrop.addClass('bk-bs-in')\n\n if (!callback) return\n\n doAnimate ?\n this.$backdrop\n .one($.support.transition.end, callback)\n .emulateTransitionEnd(150) :\n callback()\n\n } else if (!this.isShown && this.$backdrop) {\n this.$backdrop.removeClass('bk-bs-in')\n\n $.support.transition && this.$element.hasClass('bk-bs-fade') ?\n this.$backdrop\n .one($.support.transition.end, callback)\n .emulateTransitionEnd(150) :\n callback()\n\n } else if (callback) {\n callback()\n }\n}\n\n\n// MODAL PLUGIN DEFINITION\n// =======================\n\nvar old = $.fn.modal\n\n$.fn.modal = function (option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bk-bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bk-bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n}\n\n$.fn.modal.Constructor = Modal\n\n\n// MODAL NO CONFLICT\n// =================\n\n$.fn.modal.noConflict = function () {\n $.fn.modal = old\n return this\n}\n\n\n// MODAL DATA-API\n// ==============\n\n$(document).on('click.bk-bs.modal.data-api', '[data-bk-bs-toggle=\"modal\"]', function (e) {\n var $this = $(this)\n var href = $this.attr('href')\n var $target = $($this.attr('data-bk-bs-target') || (href && href.replace(/.*(?=#[^\\s]+$)/, ''))) //strip for ie7\n var option = $target.data('bk-bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())\n\n if ($this.is('a')) e.preventDefault()\n\n $target\n .modal(option, this)\n .one('hide', function () {\n $this.is(':visible') && $this.focus()\n })\n})\n\n$(document)\n .on('show.bk-bs.modal', '.bk-bs-modal', function () { $(document.body).addClass('bk-bs-modal-open') })\n .on('hidden.bk-bs.modal', '.bk-bs-modal', function () { $(document.body).removeClass('bk-bs-modal-open') })\n","var $ = require(\"jquery\");\n/* ========================================================================\n * Bootstrap: tab.js v3.1.1\n * http://getbootstrap.com/javascript/#tabs\n * ========================================================================\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n'use strict';\n\n// TAB CLASS DEFINITION\n// ====================\n\nvar Tab = function (element) {\n this.element = $(element)\n}\n\nTab.prototype.show = function () {\n var $this = this.element\n var $ul = $this.closest('ul:not(.bk-bs-dropdown-menu)')\n var selector = $this.data('bk-bs-target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') //strip for ie7\n }\n\n if ($this.parent('li').hasClass('bk-bs-active')) return\n\n var previous = $ul.find('.bk-bs-active:last a')[0]\n var e = $.Event('show.bk-bs.tab', {\n relatedTarget: previous\n })\n\n $this.trigger(e)\n\n if (e.isDefaultPrevented()) return\n\n var $target = $(selector)\n\n this.activate($this.parent('li'), $ul)\n this.activate($target, $target.parent(), function () {\n $this.trigger({\n type: 'shown.bk-bs.tab',\n relatedTarget: previous\n })\n })\n}\n\nTab.prototype.activate = function (element, container, callback) {\n var $active = container.find('> .bk-bs-active')\n var transition = callback\n && $.support.transition\n && $active.hasClass('bk-bs-fade')\n\n function next() {\n $active\n .removeClass('bk-bs-active')\n .find('> .bk-bs-dropdown-menu > .bk-bs-active')\n .removeClass('bk-bs-active')\n\n element.addClass('bk-bs-active')\n\n if (transition) {\n element[0].offsetWidth // reflow for transition\n element.addClass('bk-bs-in')\n } else {\n element.removeClass('bk-bs-fade')\n }\n\n if (element.parent('.bk-bs-dropdown-menu')) {\n element.closest('li.bk-bs-dropdown').addClass('bk-bs-active')\n }\n\n callback && callback()\n }\n\n transition ?\n $active\n .one($.support.transition.end, next)\n .emulateTransitionEnd(150) :\n next()\n\n $active.removeClass('bk-bs-in')\n}\n\n\n// TAB PLUGIN DEFINITION\n// =====================\n\nvar old = $.fn.tab\n\n$.fn.tab = function ( option ) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bk-bs.tab')\n\n if (!data) $this.data('bk-bs.tab', (data = new Tab(this)))\n if (typeof option == 'string') data[option]()\n })\n}\n\n$.fn.tab.Constructor = Tab\n\n\n// TAB NO CONFLICT\n// ===============\n\n$.fn.tab.noConflict = function () {\n $.fn.tab = old\n return this\n}\n\n\n// TAB DATA-API\n// ============\n\n$(document).on('click.bk-bs.tab.data-api', '[data-bk-bs-toggle=\"tab\"], [data-bk-bs-toggle=\"pill\"]', function (e) {\n e.preventDefault()\n $(this).tab('show')\n})\n","/**\n * jQRangeSlider\n * A javascript slider selector that supports dates\n *\n * Copyright (C) Guillaume Gautreau 2012\n * Dual licensed under the MIT or GPL Version 2 licenses.\n *\n */\n\nvar $ = require(\"jquery\");\nrequire(\"./jQRangeSlider\");\n\"use strict\";\n\nmodule.exports = $.widget(\"ui.dateRangeSlider\", $.ui.rangeSlider, {\n\toptions: {\n\t\tbounds: {min: new Date(2010,0,1).valueOf(), max: new Date(2012,0,1).valueOf()},\n\t\tdefaultValues: {min: new Date(2010,1,11).valueOf(), max: new Date(2011,1,11).valueOf()}\n\t},\n\n\t_create: function(){\n\t\t$.ui.rangeSlider.prototype._create.apply(this);\n\n\t\tthis.element.addClass(\"bk-ui-dateRangeSlider\");\n\t},\n\n\tdestroy: function(){\n\t\tthis.element.removeClass(\"bk-ui-dateRangeSlider\");\n\t\t$.ui.rangeSlider.prototype.destroy.apply(this);\n\t},\n\n\t_setDefaultValues: function(){\n\t\tthis._values = {\n\t\t\tmin: this.options.defaultValues.min.valueOf(),\n\t\t\tmax: this.options.defaultValues.max.valueOf()\n\t\t};\n\t},\n\n\t_setRulerParameters: function(){\n\t\tthis.ruler.ruler({\n\t\t\tmin: new Date(this.options.bounds.min),\n\t\t\tmax: new Date(this.options.bounds.max),\n\t\t\tscales: this.options.scales\n\t\t});\n\t},\n\n\t_setOption: function(key, value){\n\t\tif ((key === \"defaultValues\" || key === \"bounds\") && typeof value !== \"undefined\" && value !== null && this._isValidDate(value.min) && this._isValidDate(value.max)){\n\t\t\t$.ui.rangeSlider.prototype._setOption.apply(this, [key, {min:value.min.valueOf(), max:value.max.valueOf()}]);\n\t\t}else{\n\t\t\t$.ui.rangeSlider.prototype._setOption.apply(this, this._toArray(arguments));\n\t\t}\n\t},\n\n\t_handleType: function(){\n\t\treturn \"dateRangeSliderHandle\";\n\t},\n\n\toption: function(key){\n\t\tif (key === \"bounds\" || key === \"defaultValues\"){\n\t\t\tvar result = $.ui.rangeSlider.prototype.option.apply(this, arguments);\n\n\t\t\treturn {min:new Date(result.min), max:new Date(result.max)};\n\t\t}\n\n\t\treturn $.ui.rangeSlider.prototype.option.apply(this, this._toArray(arguments));\n\t},\n\n\t_defaultFormatter: function(value){\n\t\tvar month = value.getMonth() + 1,\n\t\t\tday = value.getDate();\n\n\t\treturn \"\" + value.getFullYear() + \"-\" + (month < 10 ? \"0\" + month : month) + \"-\" + (day < 10 ? \"0\" + day : day);\n\t},\n\n\t_getFormatter: function(){\n\t\tvar formatter = this.options.formatter;\n\n\t\tif (this.options.formatter === false || this.options.formatter === null){\n\t\t\tformatter = this._defaultFormatter;\n\t\t}\n\n\t\treturn (function(formatter){\n\t\t\treturn function(value){\n\t\t\t\treturn formatter(new Date(value));\n\t\t\t}\n\t\t}(formatter));\n\t},\n\n\tvalues: function(min, max){\n\t\tvar values = null;\n\n\t\tif (this._isValidDate(min) && this._isValidDate(max))\n\t\t{\n\t\t\tvalues = $.ui.rangeSlider.prototype.values.apply(this, [min.valueOf(), max.valueOf()]);\n\t\t}else{\n\t\t\tvalues = $.ui.rangeSlider.prototype.values.apply(this, this._toArray(arguments));\n\t\t}\n\n\t\treturn {min: new Date(values.min), max: new Date(values.max)};\n\t},\n\n\tmin: function(min){\n\t\tif (this._isValidDate(min)){\n\t\t\treturn new Date($.ui.rangeSlider.prototype.min.apply(this, [min.valueOf()]));\n\t\t}\n\n\t\treturn new Date($.ui.rangeSlider.prototype.min.apply(this));\n\t},\n\n\tmax: function(max){\n\t\tif (this._isValidDate(max)){\n\t\t\treturn new Date($.ui.rangeSlider.prototype.max.apply(this, [max.valueOf()]));\n\t\t}\n\n\t\treturn new Date($.ui.rangeSlider.prototype.max.apply(this));\n\t},\n\n\tbounds: function(min, max){\n\t\tvar result;\n\n\t\tif (this._isValidDate(min) && this._isValidDate(max)) {\n\t\t\tresult = $.ui.rangeSlider.prototype.bounds.apply(this, [min.valueOf(), max.valueOf()]);\n\t\t} else {\n\t\t\tresult = $.ui.rangeSlider.prototype.bounds.apply(this, this._toArray(arguments));\n\t\t}\n\n\t\treturn {min: new Date(result.min), max: new Date(result.max)};\n\t},\n\n\t_isValidDate: function(value){\n\t\treturn typeof value !== \"undefined\" && value instanceof Date;\n\t},\n\n\t_toArray: function(argsObject){\n\t\treturn Array.prototype.slice.call(argsObject);\n\t}\n});\n","/**\n * jQRangeSlider\n * A javascript slider selector that supports dates\n *\n * Copyright (C) Guillaume Gautreau 2012\n * Dual licensed under the MIT or GPL Version 2 licenses.\n *\n */\n\nvar $ = require(\"jquery\");\nrequire(\"jquery-ui/core\");\nrequire(\"jquery-ui/widget\");\nrequire(\"jquery-ui/mouse\");\nrequire(\"jquery-mousewheel\");\n\"use strict\";\n\nmodule.exports = $.widget(\"ui.rangeSlider\", {\n\toptions: {\n\t\tbounds: {min:0, max:100},\n\t\tdefaultValues: {min:20, max:50},\n\t\twheelMode: null,\n\t\twheelSpeed: 4,\n\t\tarrows: true,\n\t\tvalueLabels: \"show\",\n\t\tformatter: null,\n\t\tdurationIn: 0,\n\t\tdurationOut: 400,\n\t\tdelayOut: 200,\n\t\trange: {min: false, max: false},\n\t\tstep: false,\n\t\tscales: false,\n\t\tenabled: true,\n\t\tsymmetricPositionning: false\n\t},\n\n\t_values: null,\n\t_valuesChanged: false,\n\t_initialized: false,\n\n\t// Created elements\n\tbar: null,\n\tleftHandle: null,\n\trightHandle: null,\n\tinnerBar: null,\n\tcontainer: null,\n\tarrows: null,\n\tlabels: null,\n\tchanging: {min:false, max:false},\n\tchanged: {min:false, max:false},\n\truler: null,\n\n\t_create: function(){\n\t\tthis._setDefaultValues();\n\n\t\tthis.labels = {left: null, right:null, leftDisplayed:true, rightDisplayed:true};\n\t\tthis.arrows = {left:null, right:null};\n\t\tthis.changing = {min:false, max:false};\n\t\tthis.changed = {min:false, max:false};\n\n\t\tthis._createElements();\n\n\t\tthis._bindResize();\n\n\t\tsetTimeout($.proxy(this.resize, this), 1);\n\t\tsetTimeout($.proxy(this._initValues, this), 1);\n\t},\n\n\t_setDefaultValues: function(){\n\t\tthis._values = {\n\t\t\tmin: this.options.defaultValues.min,\n\t\t\tmax: this.options.defaultValues.max\n\t\t};\n\t},\n\n\t_bindResize: function(){\n\t\tvar that = this;\n\n\t\tthis._resizeProxy = function(e){\n\t\t\tthat.resize(e);\n\t\t};\n\n\t\t$(window).resize(this._resizeProxy);\n\t},\n\n\t_initWidth: function(){\n\t\tthis.container.css(\"width\", this.element.width() - this.container.outerWidth(true) + this.container.width());\n\t\tthis.innerBar.css(\"width\", this.container.width() - this.innerBar.outerWidth(true) + this.innerBar.width());\n\t},\n\n\t_initValues: function(){\n\t\tthis._initialized = true;\n\t\tthis.values(this._values.min, this._values.max);\n\t},\n\n\t_setOption: function(key, value) {\n\t\tthis._setWheelOption(key, value);\n\t\tthis._setArrowsOption(key, value);\n\t\tthis._setLabelsOption(key, value);\n\t\tthis._setLabelsDurations(key, value);\n\t\tthis._setFormatterOption(key, value);\n\t\tthis._setBoundsOption(key, value);\n\t\tthis._setRangeOption(key, value);\n\t\tthis._setStepOption(key, value);\n\t\tthis._setScalesOption(key, value);\n\t\tthis._setEnabledOption(key, value);\n\t\tthis._setPositionningOption(key, value);\n\t},\n\n\t_validProperty: function(object, name, defaultValue){\n\t\tif (object === null || typeof object[name] === \"undefined\"){\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\treturn object[name];\n\t},\n\n\t_setStepOption: function(key, value){\n\t\tif (key === \"step\"){\n\t\t\tthis.options.step = value;\n\t\t\tthis._leftHandle(\"option\", \"step\", value);\n\t\t\tthis._rightHandle(\"option\", \"step\", value);\n\t\t\tthis._changed(true);\n\t\t}\n\t},\n\n\t_setScalesOption: function(key, value){\n\t\tif (key === \"scales\"){\n\t\t\tif (value === false || value === null){\n\t\t\t\tthis.options.scales = false;\n\t\t\t\tthis._destroyRuler();\n\t\t\t}else if (value instanceof Array){\n\t\t\t\tthis.options.scales = value;\n\t\t\t\tthis._updateRuler();\n\t\t\t}\n\t\t}\n\t},\n\n\t_setRangeOption: function(key, value){\n\t\tif (key === \"range\"){\n\t\t\tthis._bar(\"option\", \"range\", value);\n\t\t\tthis.options.range = this._bar(\"option\", \"range\");\n\t\t\tthis._changed(true);\n\t\t}\n\t},\n\n\t_setBoundsOption: function(key, value){\n\t\tif (key === \"bounds\" && typeof value.min !== \"undefined\" && typeof value.max !== \"undefined\"){\n\t\t\tthis.bounds(value.min, value.max);\n\t\t}\n\t},\n\n\t_setWheelOption: function(key, value){\n\t\tif (key === \"wheelMode\" || key === \"wheelSpeed\"){\n\t\t\tthis._bar(\"option\", key, value);\n\t\t\tthis.options[key] = this._bar(\"option\", key);\n\t\t}\n\t},\n\n\t_setLabelsOption: function(key, value){\n\t\tif (key === \"valueLabels\"){\n\t\t\tif (value !== \"hide\" && value !== \"show\" && value !== \"change\"){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.options.valueLabels = value;\n\n\t\t\tif (value !== \"hide\"){\n\t\t\t\tthis._createLabels();\n\t\t\t\tthis._leftLabel(\"update\");\n\t\t\t\tthis._rightLabel(\"update\");\n\t\t\t}else{\n\t\t\t\tthis._destroyLabels();\n\t\t\t}\n\t\t}\n\t},\n\n\t_setFormatterOption: function(key, value){\n\t\tif (key === \"formatter\" && value !== null && typeof value === \"function\"){\n\t\t\tif (this.options.valueLabels !== \"hide\"){\n\t\t\t\tthis._leftLabel(\"option\", \"formatter\", value);\n\t\t\t\tthis.options.formatter = this._rightLabel(\"option\", \"formatter\", value);\n\t\t\t}\n\t\t}\n\t},\n\n\t_setArrowsOption: function(key, value){\n\t\tif (key === \"arrows\" && (value === true || value === false) && value !== this.options.arrows){\n\t\t\tif (value === true){\n\t\t\t\tthis.element\n\t\t\t\t\t.removeClass(\"bk-ui-rangeSlider-noArrow\")\n\t\t\t\t\t.addClass(\"bk-ui-rangeSlider-withArrows\");\n\t\t\t\tthis.arrows.left.css(\"display\", \"block\");\n\t\t\t\tthis.arrows.right.css(\"display\", \"block\");\n\t\t\t\tthis.options.arrows = true;\n\t\t\t}else if (value === false){\n\t\t\t\tthis.element\n\t\t\t\t\t.addClass(\"bk-ui-rangeSlider-noArrow\")\n\t\t\t\t\t.removeClass(\"bk-ui-rangeSlider-withArrows\");\n\t\t\t\tthis.arrows.left.css(\"display\", \"none\");\n\t\t\t\tthis.arrows.right.css(\"display\", \"none\");\n\t\t\t\tthis.options.arrows = false;\n\t\t\t}\n\n\t\t\tthis._initWidth();\n\t\t}\n\t},\n\n\t_setLabelsDurations: function(key, value){\n\t\tif (key === \"durationIn\" || key === \"durationOut\" || key === \"delayOut\"){\n\t\t\tif (parseInt(value, 10) !== value) return;\n\n\t\t\tif (this.labels.left !== null){\n\t\t\t\tthis._leftLabel(\"option\", key, value);\n\t\t\t}\n\n\t\t\tif (this.labels.right !== null){\n\t\t\t\tthis._rightLabel(\"option\", key, value);\n\t\t\t}\n\n\t\t\tthis.options[key] = value;\n\t\t}\n\t},\n\n\t_setEnabledOption: function(key, value){\n\t\tif (key === \"enabled\"){\n\t\t\tthis.toggle(value);\n\t\t}\n\t},\n\n\t_setPositionningOption: function(key, value){\n\t\tif (key === \"symmetricPositionning\"){\n\t\t\tthis._rightHandle(\"option\", key, value);\n\t\t\tthis.options[key] = this._leftHandle(\"option\", key, value);\n\t\t}\n\t},\n\n\t_createElements: function(){\n\t\tif (this.element.css(\"position\") !== \"absolute\"){\n\t\t\tthis.element.css(\"position\", \"relative\");\n\t\t}\n\n\t\tthis.element.addClass(\"bk-ui-rangeSlider\");\n\n\t\tthis.container = $(\"<div class='bk-ui-rangeSlider-container' />\")\n\t\t\t.css(\"position\", \"absolute\")\n\t\t\t.appendTo(this.element);\n\n\t\tthis.innerBar = $(\"<div class='bk-ui-rangeSlider-innerBar' />\")\n\t\t\t.css(\"position\", \"absolute\")\n\t\t\t.css(\"top\", 0)\n\t\t\t.css(\"left\", 0);\n\n\t\tthis._createHandles();\n\t\tthis._createBar();\n\t\tthis.container.prepend(this.innerBar);\n\t\tthis._createArrows();\n\n\t\tif (this.options.valueLabels !== \"hide\"){\n\t\t\tthis._createLabels();\n\t\t}else{\n\t\t\tthis._destroyLabels();\n\t\t}\n\n\t\tthis._updateRuler();\n\n\t\tif (!this.options.enabled) this._toggle(this.options.enabled);\n\t},\n\n\t_createHandle: function(options){\n\t\treturn $(\"<div />\")\n\t\t\t[this._handleType()](options)\n\t\t\t.bind(\"sliderDrag\", $.proxy(this._changing, this))\n\t\t\t.bind(\"stop\", $.proxy(this._changed, this));\n\t},\n\n\t_createHandles: function(){\n\t\tthis.leftHandle = this._createHandle({\n\t\t\t\tisLeft: true,\n\t\t\t\tbounds: this.options.bounds,\n\t\t\t\tvalue: this._values.min,\n\t\t\t\tstep: this.options.step,\n\t\t\t\tsymmetricPositionning: this.options.symmetricPositionning\n\t\t}).appendTo(this.container);\n\n\t\tthis.rightHandle = this._createHandle({\n\t\t\tisLeft: false,\n\t\t\tbounds: this.options.bounds,\n\t\t\tvalue: this._values.max,\n\t\t\tstep: this.options.step,\n\t\t\tsymmetricPositionning: this.options.symmetricPositionning\n\t\t}).appendTo(this.container);\n\t},\n\n\t_createBar: function(){\n\t\tthis.bar = $(\"<div />\")\n\t\t\t.prependTo(this.container)\n\t\t\t.bind(\"sliderDrag scroll zoom\", $.proxy(this._changing, this))\n\t\t\t.bind(\"stop\", $.proxy(this._changed, this));\n\n\t\tthis._bar({\n\t\t\t\tleftHandle: this.leftHandle,\n\t\t\t\trightHandle: this.rightHandle,\n\t\t\t\tvalues: {min: this._values.min, max: this._values.max},\n\t\t\t\ttype: this._handleType(),\n\t\t\t\trange: this.options.range,\n\t\t\t\twheelMode: this.options.wheelMode,\n\t\t\t\twheelSpeed: this.options.wheelSpeed\n\t\t\t});\n\n\t\tthis.options.range = this._bar(\"option\", \"range\");\n\t\tthis.options.wheelMode = this._bar(\"option\", \"wheelMode\");\n\t\tthis.options.wheelSpeed = this._bar(\"option\", \"wheelSpeed\");\n\t},\n\n\t_createArrows: function(){\n\t\tthis.arrows.left = this._createArrow(\"left\");\n\t\tthis.arrows.right = this._createArrow(\"right\");\n\n\t\tif (!this.options.arrows){\n\t\t\tthis.arrows.left.css(\"display\", \"none\");\n\t\t\tthis.arrows.right.css(\"display\", \"none\");\n\t\t\tthis.element.addClass(\"bk-ui-rangeSlider-noArrow\");\n\t\t}else{\n\t\t\tthis.element.addClass(\"bk-ui-rangeSlider-withArrows\");\n\t\t}\n\t},\n\n\t_createArrow: function(whichOne){\n\t\tvar arrow = $(\"<div class='bk-ui-rangeSlider-arrow' />\")\n\t\t\t.append(\"<div class='bk-ui-rangeSlider-arrow-inner' />\")\n\t\t\t.addClass(\"bk-ui-rangeSlider-\" + whichOne + \"Arrow\")\n\t\t\t.css(\"position\", \"absolute\")\n\t\t\t.css(whichOne, 0)\n\t\t\t.appendTo(this.element),\n\t\t\ttarget;\n\n\t\tif (whichOne === \"right\"){\n\t\t\ttarget = $.proxy(this._scrollRightClick, this);\n\t\t}else{\n\t\t\ttarget = $.proxy(this._scrollLeftClick, this);\n\t\t}\n\n\t\tarrow.bind(\"mousedown touchstart\", target);\n\n\t\treturn arrow;\n\t},\n\n\t_proxy: function(element, type, args){\n\t\tvar array = Array.prototype.slice.call(args);\n\n\t\tif (element && element[type]){\n\t\t\treturn element[type].apply(element, array);\n\t\t}\n\n\t\treturn null;\n\t},\n\n\t_handleType: function(){\n\t\treturn \"rangeSliderHandle\";\n\t},\n\n\t_barType: function(){\n\t\treturn \"rangeSliderBar\";\n\t},\n\n\t_bar: function(){\n\t\treturn this._proxy(this.bar, this._barType(), arguments);\n\t},\n\n\t_labelType: function(){\n\t\treturn \"rangeSliderLabel\";\n\t},\n\n\t_leftLabel: function(){\n\t\treturn this._proxy(this.labels.left, this._labelType(), arguments);\n\t},\n\n\t_rightLabel: function(){\n\t\treturn this._proxy(this.labels.right, this._labelType(), arguments);\n\t},\n\n\t_leftHandle: function(){\n\t\treturn this._proxy(this.leftHandle, this._handleType(), arguments);\n\t},\n\n\t_rightHandle: function(){\n\t\treturn this._proxy(this.rightHandle, this._handleType(), arguments);\n\t},\n\n\t_getValue: function(position, handle){\n\t\tif (handle === this.rightHandle){\n\t\t\tposition = position - handle.outerWidth();\n\t\t}\n\n\t\treturn position * (this.options.bounds.max - this.options.bounds.min) / (this.container.innerWidth() - handle.outerWidth(true)) + this.options.bounds.min;\n\t},\n\n\t_trigger: function(eventName){\n\t\tvar that = this;\n\n\t\tsetTimeout(function(){\n\t\t\tthat.element.trigger(eventName, {\n\t\t\t\t\tlabel: that.element,\n\t\t\t\t\tvalues: that.values()\n\t\t\t\t});\n\t\t}, 1);\n\t},\n\n\t_changing: function(){\n\t\tif(this._updateValues()){\n\t\t\tthis._trigger(\"valuesChanging\");\n\t\t\tthis._valuesChanged = true;\n\t\t}\n\t},\n\n\t_deactivateLabels: function(){\n\t\tif (this.options.valueLabels === \"change\"){\n\t\t\tthis._leftLabel(\"option\", \"show\", \"hide\");\n\t\t\tthis._rightLabel(\"option\", \"show\", \"hide\");\n\t\t}\n\t},\n\n\t_reactivateLabels: function(){\n\t\tif (this.options.valueLabels === \"change\"){\n\t\t\tthis._leftLabel(\"option\", \"show\", \"change\");\n\t\t\tthis._rightLabel(\"option\", \"show\", \"change\");\n\t\t}\n\t},\n\n\t_changed: function(isAutomatic){\n\t\tif (isAutomatic === true){\n\t\t\tthis._deactivateLabels();\n\t\t}\n\n\t\tif (this._updateValues() || this._valuesChanged){\n\t\t\tthis._trigger(\"valuesChanged\");\n\n\t\t\tif (isAutomatic !== true){\n\t\t\t\tthis._trigger(\"userValuesChanged\");\n\t\t\t}\n\n\t\t\tthis._valuesChanged = false;\n\t\t}\n\n\t\tif (isAutomatic === true){\n\t\t\tthis._reactivateLabels();\n\t\t}\n\t},\n\n\t_updateValues: function(){\n\t\tvar left = this._leftHandle(\"value\"),\n\t\t\tright = this._rightHandle(\"value\"),\n\t\t\tmin = this._min(left, right),\n\t\t\tmax = this._max(left, right),\n\t\t\tchanging = (min !== this._values.min || max !== this._values.max);\n\n\t\tthis._values.min = this._min(left, right);\n\t\tthis._values.max = this._max(left, right);\n\n\t\treturn changing;\n\t},\n\n\t_min: function(value1, value2){\n\t\treturn Math.min(value1, value2);\n\t},\n\n\t_max: function(value1, value2){\n\t\treturn Math.max(value1, value2);\n\t},\n\n\t/*\n\t * Value labels\n\t */\n\t_createLabel: function(label, handle){\n\t\tvar params;\n\n\t\tif (label === null){\n\t\t\tparams = this._getLabelConstructorParameters(label, handle);\n\t\t\tlabel = $(\"<div />\")\n\t\t\t\t.appendTo(this.element)\n\t\t\t\t[this._labelType()](params);\n\t\t}else{\n\t\t\tparams = this._getLabelRefreshParameters(label, handle);\n\n\t\t\tlabel[this._labelType()](params);\n\t\t}\n\n\t\treturn label;\n\t},\n\n\t_getLabelConstructorParameters: function(label, handle){\n\t\treturn {\n\t\t\thandle: handle,\n\t\t\thandleType: this._handleType(),\n\t\t\tformatter: this._getFormatter(),\n\t\t\tshow: this.options.valueLabels,\n\t\t\tdurationIn: this.options.durationIn,\n\t\t\tdurationOut: this.options.durationOut,\n\t\t\tdelayOut: this.options.delayOut\n\t\t};\n\t},\n\n\t_getLabelRefreshParameters: function(){\n\t\treturn {\n\t\t\tformatter: this._getFormatter(),\n\t\t\tshow: this.options.valueLabels,\n\t\t\tdurationIn: this.options.durationIn,\n\t\t\tdurationOut: this.options.durationOut,\n\t\t\tdelayOut: this.options.delayOut\n\t\t};\n\t},\n\n\t_getFormatter: function(){\n\t\tif (this.options.formatter === false || this.options.formatter === null){\n\t\t\treturn this._defaultFormatter;\n\t\t}\n\n\t\treturn this.options.formatter;\n\t},\n\n\t_defaultFormatter: function(value){\n\t\treturn Math.round(value);\n\t},\n\n\t_destroyLabel: function(label){\n\t\tif (label !== null){\n\t\t\tlabel[this._labelType()](\"destroy\");\n\t\t\tlabel.remove();\n\t\t\tlabel = null;\n\t\t}\n\n\t\treturn label;\n\t},\n\n\t_createLabels: function(){\n\t\tthis.labels.left = this._createLabel(this.labels.left, this.leftHandle);\n\t\tthis.labels.right = this._createLabel(this.labels.right, this.rightHandle);\n\n\t\tthis._leftLabel(\"pair\", this.labels.right);\n\t},\n\n\t_destroyLabels: function(){\n\t\tthis.labels.left = this._destroyLabel(this.labels.left);\n\t\tthis.labels.right = this._destroyLabel(this.labels.right);\n\t},\n\n\t/*\n\t * Scrolling\n\t */\n\t_stepRatio: function(){\n\t\treturn this._leftHandle(\"stepRatio\");\n\t},\n\n\t_scrollRightClick: function(e){\n\t\tif (!this.options.enabled) return false;\n\n\t\te.preventDefault();\n\t\tthis._bar(\"startScroll\");\n\t\tthis._bindStopScroll();\n\n\t\tthis._continueScrolling(\"scrollRight\", 4 * this._stepRatio(), 1);\n\t},\n\n\t_continueScrolling: function(action, timeout, quantity, timesBeforeSpeedingUp){\n\t\tif (!this.options.enabled) return false;\n\n\t\tthis._bar(action, quantity);\n\t\ttimesBeforeSpeedingUp = timesBeforeSpeedingUp || 5;\n\t\ttimesBeforeSpeedingUp--;\n\n\t\tvar that = this,\n\t\t\tminTimeout = 16,\n\t\t\tmaxQuantity = Math.max(1, 4 / this._stepRatio());\n\n\t\tthis._scrollTimeout = setTimeout(function(){\n\t\t\tif (timesBeforeSpeedingUp === 0){\n\t\t\t\tif (timeout > minTimeout){\n\t\t\t\t\ttimeout = Math.max(minTimeout, timeout / 1.5);\n\t\t\t\t} else {\n\t\t\t\t\tquantity = Math.min(maxQuantity, quantity * 2);\n\t\t\t\t}\n\n\t\t\t\ttimesBeforeSpeedingUp = 5;\n\t\t\t}\n\n\t\t\tthat._continueScrolling(action, timeout, quantity, timesBeforeSpeedingUp);\n\t\t}, timeout);\n\t},\n\n\t_scrollLeftClick: function(e){\n\t\tif (!this.options.enabled) return false;\n\n\t\te.preventDefault();\n\n\t\tthis._bar(\"startScroll\");\n\t\tthis._bindStopScroll();\n\n\t\tthis._continueScrolling(\"scrollLeft\", 4 * this._stepRatio(), 1);\n\t},\n\n\t_bindStopScroll: function(){\n\t\tvar that = this;\n\t\tthis._stopScrollHandle = function(e){\n\t\t\te.preventDefault();\n\t\t\tthat._stopScroll();\n\t\t};\n\n\t\t$(document).bind(\"mouseup touchend\", this._stopScrollHandle);\n\t},\n\n\t_stopScroll: function(){\n\t\t$(document).unbind(\"mouseup touchend\", this._stopScrollHandle);\n\t\tthis._stopScrollHandle = null;\n\t\tthis._bar(\"stopScroll\");\n\t\tclearTimeout(this._scrollTimeout);\n\t},\n\n\t/*\n\t * Ruler\n\t */\n\t_createRuler: function(){\n\t\tthis.ruler = $(\"<div class='bk-ui-rangeSlider-ruler' />\").appendTo(this.innerBar);\n\t},\n\n\t_setRulerParameters: function(){\n\t\tthis.ruler.ruler({\n\t\t\tmin: this.options.bounds.min,\n\t\t\tmax: this.options.bounds.max,\n\t\t\tscales: this.options.scales\n\t\t});\n\t},\n\n\t_destroyRuler: function(){\n\t\tif (this.ruler !== null && $.fn.ruler){\n\t\t\tthis.ruler.ruler(\"destroy\");\n\t\t\tthis.ruler.remove();\n\t\t\tthis.ruler = null;\n\t\t}\n\t},\n\n\t_updateRuler: function(){\n\t\tthis._destroyRuler();\n\n\t\tif (this.options.scales === false || !$.fn.ruler){\n\t\t\treturn;\n\t\t}\n\n\t\tthis._createRuler();\n\t\tthis._setRulerParameters();\n\t},\n\n\t/*\n\t * Public methods\n\t */\n\tvalues: function(min, max){\n\t\tvar val;\n\n\t\tif (typeof min !== \"undefined\" && typeof max !== \"undefined\"){\n\t\t\tif (!this._initialized){\n\t\t\t\tthis._values.min = min;\n\t\t\t\tthis._values.max = max;\n\t\t\t\treturn this._values;\n\t\t\t}\n\n\t\t\tthis._deactivateLabels();\n\t\t\tval = this._bar(\"values\", min, max);\n\t\t\tthis._changed(true);\n\t\t\tthis._reactivateLabels();\n\t\t}else{\n\t\t\tval = this._bar(\"values\", min, max);\n\t\t}\n\n\t\treturn val;\n\t},\n\n\tmin: function(min){\n\t\tthis._values.min = this.values(min, this._values.max).min;\n\n\t\treturn this._values.min;\n\t},\n\n\tmax: function(max){\n\t\tthis._values.max = this.values(this._values.min, max).max;\n\n\t\treturn this._values.max;\n\t},\n\n\tbounds: function(min, max){\n\t\tif (this._isValidValue(min) && this._isValidValue(max) && min < max){\n\n\t\t\tthis._setBounds(min, max);\n\t\t\tthis._updateRuler();\n\t\t\tthis._changed(true);\n\t\t}\n\n\t\treturn this.options.bounds;\n\t},\n\n\t_isValidValue: function(value){\n\t\treturn typeof value !== \"undefined\" && parseFloat(value) === value;\n\t},\n\n\t_setBounds: function(min, max){\n\t\tthis.options.bounds = {min: min, max: max};\n\t\tthis._leftHandle(\"option\", \"bounds\", this.options.bounds);\n\t\tthis._rightHandle(\"option\", \"bounds\", this.options.bounds);\n\t\tthis._bar(\"option\", \"bounds\", this.options.bounds);\n\t},\n\n\tzoomIn: function(quantity){\n\t\tthis._bar(\"zoomIn\", quantity)\n\t},\n\n\tzoomOut: function(quantity){\n\t\tthis._bar(\"zoomOut\", quantity);\n\t},\n\n\tscrollLeft: function(quantity){\n\t\tthis._bar(\"startScroll\");\n\t\tthis._bar(\"scrollLeft\", quantity);\n\t\tthis._bar(\"stopScroll\");\n\t},\n\n\tscrollRight: function(quantity){\n\t\tthis._bar(\"startScroll\");\n\t\tthis._bar(\"scrollRight\", quantity);\n\t\tthis._bar(\"stopScroll\");\n\t},\n\n\t/**\n\t * Resize\n\t */\n\tresize: function(){\n\t\tthis._initWidth();\n\t\tthis._leftHandle(\"update\");\n\t\tthis._rightHandle(\"update\");\n\t\tthis._bar(\"update\");\n\t},\n\n\t/*\n\t * Enable / disable\n\t */\n\tenable: function(){\n\t\tthis.toggle(true);\n\t},\n\n\tdisable: function(){\n\t\tthis.toggle(false);\n\t},\n\n\ttoggle: function(enabled){\n\t\tif (enabled === undefined) enabled = !this.options.enabled;\n\n\t\tif (this.options.enabled !== enabled){\n\t\t\tthis._toggle(enabled);\n\t\t}\n\t},\n\n\t_toggle: function(enabled){\n\t\tthis.options.enabled = enabled;\n\t\tthis.element.toggleClass(\"bk-ui-rangeSlider-disabled\", !enabled);\n\n\t\tvar action = enabled ? \"enable\" : \"disable\";\n\n\t\tthis._bar(action);\n\t\tthis._leftHandle(action);\n\t\tthis._rightHandle(action);\n\t\tthis._leftLabel(action);\n\t\tthis._rightLabel(action);\n\t},\n\n\t/*\n\t * Destroy\n\t */\n\tdestroy: function(){\n\t\tthis.element.removeClass(\"bk-ui-rangeSlider-withArrows bk-ui-rangeSlider-noArrow bk-ui-rangeSlider-disabled\");\n\n\t\tthis._destroyWidgets();\n\t\tthis._destroyElements();\n\n\t\tthis.element.removeClass(\"bk-ui-rangeSlider\");\n\t\tthis.options = null;\n\n\t\t$(window).unbind(\"resize\", this._resizeProxy);\n\t\tthis._resizeProxy = null;\n\t\tthis._bindResize = null;\n\n\t\t$.Widget.prototype.destroy.apply(this, arguments);\n\t},\n\n\t_destroyWidget: function(name){\n\t\tthis[\"_\" + name](\"destroy\");\n\t\tthis[name].remove();\n\t\tthis[name] = null;\n\t},\n\n\t_destroyWidgets: function(){\n\t\tthis._destroyWidget(\"bar\");\n\t\tthis._destroyWidget(\"leftHandle\");\n\t\tthis._destroyWidget(\"rightHandle\");\n\n\t\tthis._destroyRuler();\n\t\tthis._destroyLabels();\n\t},\n\n\t_destroyElements: function(){\n\t\tthis.container.remove();\n\t\tthis.container = null;\n\n\t\tthis.innerBar.remove();\n\t\tthis.innerBar = null;\n\n\t\tthis.arrows.left.remove();\n\t\tthis.arrows.right.remove();\n\t\tthis.arrows = null;\n\t}\n});\n","/*!\n * jquery.event.drag - v 2.2\n * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com\n * Open Source MIT License - http://threedubmedia.com/code/license\n */\n// Created: 2008-06-04\n// Updated: 2012-05-21\n// REQUIRES: jquery 1.7.x\n\nvar $ = require(\"jquery\");\n\n// add the jquery instance method\n$.fn.drag = function( str, arg, opts ){\n\t// figure out the event type\n\tvar type = typeof str == \"string\" ? str : \"\",\n\t// figure out the event handler...\n\tfn = $.isFunction( str ) ? str : $.isFunction( arg ) ? arg : null;\n\t// fix the event type\n\tif ( type.indexOf(\"drag\") !== 0 )\n\t\ttype = \"drag\"+ type;\n\t// were options passed\n\topts = ( str == fn ? arg : opts ) || {};\n\t// trigger or bind event handler\n\treturn fn ? this.bind( type, opts, fn ) : this.trigger( type );\n};\n\n// local refs (increase compression)\nvar $event = $.event,\n$special = $event.special,\n// configure the drag special event\ndrag = $special.drag = {\n\n\t// these are the default settings\n\tdefaults: {\n\t\twhich: 1, // mouse button pressed to start drag sequence\n\t\tdistance: 0, // distance dragged before dragstart\n\t\tnot: ':input', // selector to suppress dragging on target elements\n\t\thandle: null, // selector to match handle target elements\n\t\trelative: false, // true to use \"position\", false to use \"offset\"\n\t\tdrop: true, // false to suppress drop events, true or selector to allow\n\t\tclick: false // false to suppress click events after dragend (no proxy)\n\t},\n\n\t// the key name for stored drag data\n\tdatakey: \"dragdata\",\n\n\t// prevent bubbling for better performance\n\tnoBubble: true,\n\n\t// count bound related events\n\tadd: function( obj ){\n\t\t// read the interaction data\n\t\tvar data = $.data( this, drag.datakey ),\n\t\t// read any passed options\n\t\topts = obj.data || {};\n\t\t// count another realted event\n\t\tdata.related += 1;\n\t\t// extend data options bound with this event\n\t\t// don't iterate \"opts\" in case it is a node\n\t\t$.each( drag.defaults, function( key, def ){\n\t\t\tif ( opts[ key ] !== undefined )\n\t\t\t\tdata[ key ] = opts[ key ];\n\t\t});\n\t},\n\n\t// forget unbound related events\n\tremove: function(){\n\t\t$.data( this, drag.datakey ).related -= 1;\n\t},\n\n\t// configure interaction, capture settings\n\tsetup: function(){\n\t\t// check for related events\n\t\tif ( $.data( this, drag.datakey ) )\n\t\t\treturn;\n\t\t// initialize the drag data with copied defaults\n\t\tvar data = $.extend({ related:0 }, drag.defaults );\n\t\t// store the interaction data\n\t\t$.data( this, drag.datakey, data );\n\t\t// bind the mousedown event, which starts drag interactions\n\t\t$event.add( this, \"touchstart mousedown\", drag.init, data );\n\t\t// prevent image dragging in IE...\n\t\tif ( this.attachEvent )\n\t\t\tthis.attachEvent(\"ondragstart\", drag.dontstart );\n\t},\n\n\t// destroy configured interaction\n\tteardown: function(){\n\t\tvar data = $.data( this, drag.datakey ) || {};\n\t\t// check for related events\n\t\tif ( data.related )\n\t\t\treturn;\n\t\t// remove the stored data\n\t\t$.removeData( this, drag.datakey );\n\t\t// remove the mousedown event\n\t\t$event.remove( this, \"touchstart mousedown\", drag.init );\n\t\t// enable text selection\n\t\tdrag.textselect( true );\n\t\t// un-prevent image dragging in IE...\n\t\tif ( this.detachEvent )\n\t\t\tthis.detachEvent(\"ondragstart\", drag.dontstart );\n\t},\n\n\t// initialize the interaction\n\tinit: function( event ){\n\t\t// sorry, only one touch at a time\n\t\tif ( drag.touched )\n\t\t\treturn;\n\t\t// the drag/drop interaction data\n\t\tvar dd = event.data, results;\n\t\t// check the which directive\n\t\tif ( event.which != 0 && dd.which > 0 && event.which != dd.which )\n\t\t\treturn;\n\t\t// check for suppressed selector\n\t\tif ( $( event.target ).is( dd.not ) )\n\t\t\treturn;\n\t\t// check for handle selector\n\t\tif ( dd.handle && !$( event.target ).closest( dd.handle, event.currentTarget ).length )\n\t\t\treturn;\n\n\t\tdrag.touched = event.type == 'touchstart' ? this : null;\n\t\tdd.propagates = 1;\n\t\tdd.mousedown = this;\n\t\tdd.interactions = [ drag.interaction( this, dd ) ];\n\t\tdd.target = event.target;\n\t\tdd.pageX = event.pageX;\n\t\tdd.pageY = event.pageY;\n\t\tdd.dragging = null;\n\t\t// handle draginit event...\n\t\tresults = drag.hijack( event, \"draginit\", dd );\n\t\t// early cancel\n\t\tif ( !dd.propagates )\n\t\t\treturn;\n\t\t// flatten the result set\n\t\tresults = drag.flatten( results );\n\t\t// insert new interaction elements\n\t\tif ( results && results.length ){\n\t\t\tdd.interactions = [];\n\t\t\t$.each( results, function(){\n\t\t\t\tdd.interactions.push( drag.interaction( this, dd ) );\n\t\t\t});\n\t\t}\n\t\t// remember how many interactions are propagating\n\t\tdd.propagates = dd.interactions.length;\n\t\t// locate and init the drop targets\n\t\tif ( dd.drop !== false && $special.drop )\n\t\t\t$special.drop.handler( event, dd );\n\t\t// disable text selection\n\t\tdrag.textselect( false );\n\t\t// bind additional events...\n\t\tif ( drag.touched )\n\t\t\t$event.add( drag.touched, \"touchmove touchend\", drag.handler, dd );\n\t\telse\n\t\t\t$event.add( document, \"mousemove mouseup\", drag.handler, dd );\n\t\t// helps prevent text selection or scrolling\n\t\tif ( !drag.touched || dd.live )\n\t\t\treturn false;\n\t},\n\n\t// returns an interaction object\n\tinteraction: function( elem, dd ){\n\t\tvar offset = $( elem )[ dd.relative ? \"position\" : \"offset\" ]() || { top:0, left:0 };\n\t\treturn {\n\t\t\tdrag: elem,\n\t\t\tcallback: new drag.callback(),\n\t\t\tdroppable: [],\n\t\t\toffset: offset\n\t\t};\n\t},\n\n\t// handle drag-releatd DOM events\n\thandler: function( event ){\n\t\t// read the data before hijacking anything\n\t\tvar dd = event.data;\n\t\t// handle various events\n\t\tswitch ( event.type ){\n\t\t\t// mousemove, check distance, start dragging\n\t\t\tcase !dd.dragging && 'touchmove':\n\t\t\t\tevent.preventDefault();\n\t\t\tcase !dd.dragging && 'mousemove':\n\t\t\t\t// drag tolerance, x≤ + y≤ = distance≤\n\t\t\t\tif ( Math.pow( event.pageX-dd.pageX, 2 ) + Math.pow( event.pageY-dd.pageY, 2 ) < Math.pow( dd.distance, 2 ) )\n\t\t\t\t\tbreak; // distance tolerance not reached\n\t\t\t\tevent.target = dd.target; // force target from \"mousedown\" event (fix distance issue)\n\t\t\t\tdrag.hijack( event, \"dragstart\", dd ); // trigger \"dragstart\"\n\t\t\t\tif ( dd.propagates ) // \"dragstart\" not rejected\n\t\t\t\t\tdd.dragging = true; // activate interaction\n\t\t\t// mousemove, dragging\n\t\t\tcase 'touchmove':\n\t\t\t\tevent.preventDefault();\n\t\t\tcase 'mousemove':\n\t\t\t\tif ( dd.dragging ){\n\t\t\t\t\t// trigger \"drag\"\n\t\t\t\t\tdrag.hijack( event, \"drag\", dd );\n\t\t\t\t\tif ( dd.propagates ){\n\t\t\t\t\t\t// manage drop events\n\t\t\t\t\t\tif ( dd.drop !== false && $special.drop )\n\t\t\t\t\t\t\t$special.drop.handler( event, dd ); // \"dropstart\", \"dropend\"\n\t\t\t\t\t\tbreak; // \"drag\" not rejected, stop\n\t\t\t\t\t}\n\t\t\t\t\tevent.type = \"mouseup\"; // helps \"drop\" handler behave\n\t\t\t\t}\n\t\t\t// mouseup, stop dragging\n\t\t\tcase 'touchend':\n\t\t\tcase 'mouseup':\n\t\t\tdefault:\n\t\t\t\tif ( drag.touched )\n\t\t\t\t\t$event.remove( drag.touched, \"touchmove touchend\", drag.handler ); // remove touch events\n\t\t\t\telse\n\t\t\t\t\t$event.remove( document, \"mousemove mouseup\", drag.handler ); // remove page events\n\t\t\t\tif ( dd.dragging ){\n\t\t\t\t\tif ( dd.drop !== false && $special.drop )\n\t\t\t\t\t\t$special.drop.handler( event, dd ); // \"drop\"\n\t\t\t\t\tdrag.hijack( event, \"dragend\", dd ); // trigger \"dragend\"\n\t\t\t\t}\n\t\t\t\tdrag.textselect( true ); // enable text selection\n\t\t\t\t// if suppressing click events...\n\t\t\t\tif ( dd.click === false && dd.dragging )\n\t\t\t\t\t$.data( dd.mousedown, \"suppress.click\", new Date().getTime() + 5 );\n\t\t\t\tdd.dragging = drag.touched = false; // deactivate element\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\t// re-use event object for custom events\n\thijack: function( event, type, dd, x, elem ){\n\t\t// not configured\n\t\tif ( !dd )\n\t\t\treturn;\n\t\t// remember the original event and type\n\t\tvar orig = { event:event.originalEvent, type:event.type },\n\t\t// is the event drag related or drog related?\n\t\tmode = type.indexOf(\"drop\") ? \"drag\" : \"drop\",\n\t\t// iteration vars\n\t\tresult, i = x || 0, ia, $elems, callback,\n\t\tlen = !isNaN( x ) ? x : dd.interactions.length;\n\t\t// modify the event type\n\t\tevent.type = type;\n\t\t// remove the original event\n\t\tevent.originalEvent = null;\n\t\t// initialize the results\n\t\tdd.results = [];\n\t\t// handle each interacted element\n\t\tdo if ( ia = dd.interactions[ i ] ){\n\t\t\t// validate the interaction\n\t\t\tif ( type !== \"dragend\" && ia.cancelled )\n\t\t\t\tcontinue;\n\t\t\t// set the dragdrop properties on the event object\n\t\t\tcallback = drag.properties( event, dd, ia );\n\t\t\t// prepare for more results\n\t\t\tia.results = [];\n\t\t\t// handle each element\n\t\t\t$( elem || ia[ mode ] || dd.droppable ).each(function( p, subject ){\n\t\t\t\t// identify drag or drop targets individually\n\t\t\t\tcallback.target = subject;\n\t\t\t\t// force propagtion of the custom event\n\t\t\t\tevent.isPropagationStopped = function(){ return false; };\n\t\t\t\t// handle the event\n\t\t\t\tresult = subject ? $event.dispatch.call( subject, event, callback ) : null;\n\t\t\t\t// stop the drag interaction for this element\n\t\t\t\tif ( result === false ){\n\t\t\t\t\tif ( mode == \"drag\" ){\n\t\t\t\t\t\tia.cancelled = true;\n\t\t\t\t\t\tdd.propagates -= 1;\n\t\t\t\t\t}\n\t\t\t\t\tif ( type == \"drop\" ){\n\t\t\t\t\t\tia[ mode ][p] = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// assign any dropinit elements\n\t\t\t\telse if ( type == \"dropinit\" )\n\t\t\t\t\tia.droppable.push( drag.element( result ) || subject );\n\t\t\t\t// accept a returned proxy element\n\t\t\t\tif ( type == \"dragstart\" )\n\t\t\t\t\tia.proxy = $( drag.element( result ) || ia.drag )[0];\n\t\t\t\t// remember this result\n\t\t\t\tia.results.push( result );\n\t\t\t\t// forget the event result, for recycling\n\t\t\t\tdelete event.result;\n\t\t\t\t// break on cancelled handler\n\t\t\t\tif ( type !== \"dropinit\" )\n\t\t\t\t\treturn result;\n\t\t\t});\n\t\t\t// flatten the results\n\t\t\tdd.results[ i ] = drag.flatten( ia.results );\n\t\t\t// accept a set of valid drop targets\n\t\t\tif ( type == \"dropinit\" )\n\t\t\t\tia.droppable = drag.flatten( ia.droppable );\n\t\t\t// locate drop targets\n\t\t\tif ( type == \"dragstart\" && !ia.cancelled )\n\t\t\t\tcallback.update();\n\t\t}\n\t\twhile ( ++i < len )\n\t\t// restore the original event & type\n\t\tevent.type = orig.type;\n\t\tevent.originalEvent = orig.event;\n\t\t// return all handler results\n\t\treturn drag.flatten( dd.results );\n\t},\n\n\t// extend the callback object with drag/drop properties...\n\tproperties: function( event, dd, ia ){\n\t\tvar obj = ia.callback;\n\t\t// elements\n\t\tobj.drag = ia.drag;\n\t\tobj.proxy = ia.proxy || ia.drag;\n\t\t// starting mouse position\n\t\tobj.startX = dd.pageX;\n\t\tobj.startY = dd.pageY;\n\t\t// current distance dragged\n\t\tobj.deltaX = event.pageX - dd.pageX;\n\t\tobj.deltaY = event.pageY - dd.pageY;\n\t\t// original element position\n\t\tobj.originalX = ia.offset.left;\n\t\tobj.originalY = ia.offset.top;\n\t\t// adjusted element position\n\t\tobj.offsetX = obj.originalX + obj.deltaX;\n\t\tobj.offsetY = obj.originalY + obj.deltaY;\n\t\t// assign the drop targets information\n\t\tobj.drop = drag.flatten( ( ia.drop || [] ).slice() );\n\t\tobj.available = drag.flatten( ( ia.droppable || [] ).slice() );\n\t\treturn obj;\n\t},\n\n\t// determine is the argument is an element or jquery instance\n\telement: function( arg ){\n\t\tif ( arg && ( arg.jquery || arg.nodeType == 1 ) )\n\t\t\treturn arg;\n\t},\n\n\t// flatten nested jquery objects and arrays into a single dimension array\n\tflatten: function( arr ){\n\t\treturn $.map( arr, function( member ){\n\t\t\treturn member && member.jquery ? $.makeArray( member ) :\n\t\t\t\tmember && member.length ? drag.flatten( member ) : member;\n\t\t});\n\t},\n\n\t// toggles text selection attributes ON (true) or OFF (false)\n\ttextselect: function( bool ){\n\t\t$( document )[ bool ? \"unbind\" : \"bind\" ](\"selectstart\", drag.dontstart )\n\t\t\t.css(\"MozUserSelect\", bool ? \"\" : \"none\" );\n\t\t// .attr(\"unselectable\", bool ? \"off\" : \"on\" )\n\t\tdocument.unselectable = bool ? \"off\" : \"on\";\n\t},\n\n\t// suppress \"selectstart\" and \"ondragstart\" events\n\tdontstart: function(){\n\t\treturn false;\n\t},\n\n\t// a callback instance contructor\n\tcallback: function(){}\n\n};\n\n// callback methods\ndrag.callback.prototype = {\n\tupdate: function(){\n\t\tif ( $special.drop && this.available.length )\n\t\t\t$.each( this.available, function( i ){\n\t\t\t\t$special.drop.locate( this, i );\n\t\t\t});\n\t}\n};\n\n// patch $.event.$dispatch to allow suppressing clicks\nvar $dispatch = $event.dispatch;\n$event.dispatch = function( event ){\n\tif ( $.data( this, \"suppress.\"+ event.type ) - new Date().getTime() > 0 ){\n\t\t$.removeData( this, \"suppress.\"+ event.type );\n\t\treturn;\n\t}\n\treturn $dispatch.apply( this, arguments );\n};\n\n// event fix hooks for touch events...\nvar touchHooks =\n$event.fixHooks.touchstart =\n$event.fixHooks.touchmove =\n$event.fixHooks.touchend =\n$event.fixHooks.touchcancel = {\n\tprops: \"clientX clientY pageX pageY screenX screenY\".split( \" \" ),\n\tfilter: function( event, orig ) {\n\t\tif ( orig ){\n\t\t\tvar touched = ( orig.touches && orig.touches[0] )\n\t\t\t\t|| ( orig.changedTouches && orig.changedTouches[0] )\n\t\t\t\t|| null;\n\t\t\t// iOS webkit: touchstart, touchmove, touchend\n\t\t\tif ( touched )\n\t\t\t\t$.each( touchHooks.props, function( i, prop ){\n\t\t\t\t\tevent[ prop ] = touched[ prop ];\n\t\t\t\t});\n\t\t}\n\t\treturn event;\n\t}\n};\n\n// share the same special event configuration with related events...\n$special.draginit = $special.dragstart = $special.dragend = drag;\n","/*!\n * jquery.event.drop - v 2.2\n * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com\n * Open Source MIT License - http://threedubmedia.com/code/license\n */\n// Created: 2008-06-04\n// Updated: 2012-05-21\n// REQUIRES: jquery 1.7.x, event.drag 2.2\n\nvar $ = require(\"jquery\");\nvar $1 = require(\"jquery_event_drag\");\n\n// Events: drop, dropstart, dropend\n\n// add the jquery instance method\n$.fn.drop = function( str, arg, opts ){\n\t// figure out the event type\n\tvar type = typeof str == \"string\" ? str : \"\",\n\t// figure out the event handler...\n\tfn = $.isFunction( str ) ? str : $.isFunction( arg ) ? arg : null;\n\t// fix the event type\n\tif ( type.indexOf(\"drop\") !== 0 )\n\t\ttype = \"drop\"+ type;\n\t// were options passed\n\topts = ( str == fn ? arg : opts ) || {};\n\t// trigger or bind event handler\n\treturn fn ? this.bind( type, opts, fn ) : this.trigger( type );\n};\n\n// DROP MANAGEMENT UTILITY\n// returns filtered drop target elements, caches their positions\n$.drop = function( opts ){\n\topts = opts || {};\n\t// safely set new options...\n\tdrop.multi = opts.multi === true ? Infinity :\n\t\topts.multi === false ? 1 : !isNaN( opts.multi ) ? opts.multi : drop.multi;\n\tdrop.delay = opts.delay || drop.delay;\n\tdrop.tolerance = $.isFunction( opts.tolerance ) ? opts.tolerance :\n\t\topts.tolerance === null ? null : drop.tolerance;\n\tdrop.mode = opts.mode || drop.mode || 'intersect';\n};\n\n// local refs (increase compression)\nvar $event = $.event,\n$special = $event.special,\n// configure the drop special event\ndrop = $.event.special.drop = {\n\n\t// these are the default settings\n\tmulti: 1, // allow multiple drop winners per dragged element\n\tdelay: 20, // async timeout delay\n\tmode: 'overlap', // drop tolerance mode\n\n\t// internal cache\n\ttargets: [],\n\n\t// the key name for stored drop data\n\tdatakey: \"dropdata\",\n\n\t// prevent bubbling for better performance\n\tnoBubble: true,\n\n\t// count bound related events\n\tadd: function( obj ){\n\t\t// read the interaction data\n\t\tvar data = $.data( this, drop.datakey );\n\t\t// count another realted event\n\t\tdata.related += 1;\n\t},\n\n\t// forget unbound related events\n\tremove: function(){\n\t\t$.data( this, drop.datakey ).related -= 1;\n\t},\n\n\t// configure the interactions\n\tsetup: function(){\n\t\t// check for related events\n\t\tif ( $.data( this, drop.datakey ) )\n\t\t\treturn;\n\t\t// initialize the drop element data\n\t\tvar data = {\n\t\t\trelated: 0,\n\t\t\tactive: [],\n\t\t\tanyactive: 0,\n\t\t\twinner: 0,\n\t\t\tlocation: {}\n\t\t};\n\t\t// store the drop data on the element\n\t\t$.data( this, drop.datakey, data );\n\t\t// store the drop target in internal cache\n\t\tdrop.targets.push( this );\n\t},\n\n\t// destroy the configure interaction\n\tteardown: function(){\n\t\tvar data = $.data( this, drop.datakey ) || {};\n\t\t// check for related events\n\t\tif ( data.related )\n\t\t\treturn;\n\t\t// remove the stored data\n\t\t$.removeData( this, drop.datakey );\n\t\t// reference the targeted element\n\t\tvar element = this;\n\t\t// remove from the internal cache\n\t\tdrop.targets = $.grep( drop.targets, function( target ){\n\t\t\treturn ( target !== element );\n\t\t});\n\t},\n\n\t// shared event handler\n\thandler: function( event, dd ){\n\t\t// local vars\n\t\tvar results, $targets;\n\t\t// make sure the right data is available\n\t\tif ( !dd )\n\t\t\treturn;\n\t\t// handle various events\n\t\tswitch ( event.type ){\n\t\t\t// draginit, from $.event.special.drag\n\t\t\tcase 'mousedown': // DROPINIT >>\n\t\t\tcase 'touchstart': // DROPINIT >>\n\t\t\t\t// collect and assign the drop targets\n\t\t\t\t$targets = $( drop.targets );\n\t\t\t\tif ( typeof dd.drop == \"string\" )\n\t\t\t\t\t$targets = $targets.filter( dd.drop );\n\t\t\t\t// reset drop data winner properties\n\t\t\t\t$targets.each(function(){\n\t\t\t\t\tvar data = $.data( this, drop.datakey );\n\t\t\t\t\tdata.active = [];\n\t\t\t\t\tdata.anyactive = 0;\n\t\t\t\t\tdata.winner = 0;\n\t\t\t\t});\n\t\t\t\t// set available target elements\n\t\t\t\tdd.droppable = $targets;\n\t\t\t\t// activate drop targets for the initial element being dragged\n\t\t\t\t$special.drag.hijack( event, \"dropinit\", dd );\n\t\t\t\tbreak;\n\t\t\t// drag, from $.event.special.drag\n\t\t\tcase 'mousemove': // TOLERATE >>\n\t\t\tcase 'touchmove': // TOLERATE >>\n\t\t\t\tdrop.event = event; // store the mousemove event\n\t\t\t\tif ( !drop.timer )\n\t\t\t\t\t// monitor drop targets\n\t\t\t\t\tdrop.tolerate( dd );\n\t\t\t\tbreak;\n\t\t\t// dragend, from $.event.special.drag\n\t\t\tcase 'mouseup': // DROP >> DROPEND >>\n\t\t\tcase 'touchend': // DROP >> DROPEND >>\n\t\t\t\tdrop.timer = clearTimeout( drop.timer ); // delete timer\n\t\t\t\tif ( dd.propagates ){\n\t\t\t\t\t$special.drag.hijack( event, \"drop\", dd );\n\t\t\t\t\t$special.drag.hijack( event, \"dropend\", dd );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t}\n\t},\n\n\t// returns the location positions of an element\n\tlocate: function( elem, index ){\n\t\tvar data = $.data( elem, drop.datakey ),\n\t\t$elem = $( elem ),\n\t\tposi = $elem.offset() || {},\n\t\theight = $elem.outerHeight(),\n\t\twidth = $elem.outerWidth(),\n\t\tlocation = {\n\t\t\telem: elem,\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\ttop: posi.top,\n\t\t\tleft: posi.left,\n\t\t\tright: posi.left + width,\n\t\t\tbottom: posi.top + height\n\t\t};\n\t\t// drag elements might not have dropdata\n\t\tif ( data ){\n\t\t\tdata.location = location;\n\t\t\tdata.index = index;\n\t\t\tdata.elem = elem;\n\t\t}\n\t\treturn location;\n\t},\n\n\t// test the location positions of an element against another OR an X,Y coord\n\tcontains: function( target, test ){ // target { location } contains test [x,y] or { location }\n\t\treturn ( ( test[0] || test.left ) >= target.left && ( test[0] || test.right ) <= target.right\n\t\t\t&& ( test[1] || test.top ) >= target.top && ( test[1] || test.bottom ) <= target.bottom );\n\t},\n\n\t// stored tolerance modes\n\tmodes: { // fn scope: \"$.event.special.drop\" object\n\t\t// target with mouse wins, else target with most overlap wins\n\t\t'intersect': function( event, proxy, target ){\n\t\t\treturn this.contains( target, [ event.pageX, event.pageY ] ) ? // check cursor\n\t\t\t\t1e9 : this.modes.overlap.apply( this, arguments ); // check overlap\n\t\t},\n\t\t// target with most overlap wins\n\t\t'overlap': function( event, proxy, target ){\n\t\t\t// calculate the area of overlap...\n\t\t\treturn Math.max( 0, Math.min( target.bottom, proxy.bottom ) - Math.max( target.top, proxy.top ) )\n\t\t\t\t* Math.max( 0, Math.min( target.right, proxy.right ) - Math.max( target.left, proxy.left ) );\n\t\t},\n\t\t// proxy is completely contained within target bounds\n\t\t'fit': function( event, proxy, target ){\n\t\t\treturn this.contains( target, proxy ) ? 1 : 0;\n\t\t},\n\t\t// center of the proxy is contained within target bounds\n\t\t'middle': function( event, proxy, target ){\n\t\t\treturn this.contains( target, [ proxy.left + proxy.width * .5, proxy.top + proxy.height * .5 ] ) ? 1 : 0;\n\t\t}\n\t},\n\n\t// sort drop target cache by by winner (dsc), then index (asc)\n\tsort: function( a, b ){\n\t\treturn ( b.winner - a.winner ) || ( a.index - b.index );\n\t},\n\n\t// async, recursive tolerance execution\n\ttolerate: function( dd ){\n\t\t// declare local refs\n\t\tvar i, drp, drg, data, arr, len, elem,\n\t\t// interaction iteration variables\n\t\tx = 0, ia, end = dd.interactions.length,\n\t\t// determine the mouse coords\n\t\txy = [ drop.event.pageX, drop.event.pageY ],\n\t\t// custom or stored tolerance fn\n\t\ttolerance = drop.tolerance || drop.modes[ drop.mode ];\n\t\t// go through each passed interaction...\n\t\tdo if ( ia = dd.interactions[x] ){\n\t\t\t// check valid interaction\n\t\t\tif ( !ia )\n\t\t\t\treturn;\n\t\t\t// initialize or clear the drop data\n\t\t\tia.drop = [];\n\t\t\t// holds the drop elements\n\t\t\tarr = [];\n\t\t\tlen = ia.droppable.length;\n\t\t\t// determine the proxy location, if needed\n\t\t\tif ( tolerance )\n\t\t\t\tdrg = drop.locate( ia.proxy );\n\t\t\t// reset the loop\n\t\t\ti = 0;\n\t\t\t// loop each stored drop target\n\t\t\tdo if ( elem = ia.droppable[i] ){\n\t\t\t\tdata = $.data( elem, drop.datakey );\n\t\t\t\tdrp = data.location;\n\t\t\t\tif ( !drp ) continue;\n\t\t\t\t// find a winner: tolerance function is defined, call it\n\t\t\t\tdata.winner = tolerance ? tolerance.call( drop, drop.event, drg, drp )\n\t\t\t\t\t// mouse position is always the fallback\n\t\t\t\t\t: drop.contains( drp, xy ) ? 1 : 0;\n\t\t\t\tarr.push( data );\n\t\t\t} while ( ++i < len ); // loop\n\t\t\t// sort the drop targets\n\t\t\tarr.sort( drop.sort );\n\t\t\t// reset the loop\n\t\t\ti = 0;\n\t\t\t// loop through all of the targets again\n\t\t\tdo if ( data = arr[ i ] ){\n\t\t\t\t// winners...\n\t\t\t\tif ( data.winner && ia.drop.length < drop.multi ){\n\t\t\t\t\t// new winner... dropstart\n\t\t\t\t\tif ( !data.active[x] && !data.anyactive ){\n\t\t\t\t\t\t// check to make sure that this is not prevented\n\t\t\t\t\t\tif ( $special.drag.hijack( drop.event, \"dropstart\", dd, x, data.elem )[0] !== false ){\n\t\t\t\t\t\t\tdata.active[x] = 1;\n\t\t\t\t\t\t\tdata.anyactive += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if false, it is not a winner\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdata.winner = 0;\n\t\t\t\t\t}\n\t\t\t\t\t// if it is still a winner\n\t\t\t\t\tif ( data.winner )\n\t\t\t\t\t\tia.drop.push( data.elem );\n\t\t\t\t}\n\t\t\t\t// losers...\n\t\t\t\telse if ( data.active[x] && data.anyactive == 1 ){\n\t\t\t\t\t// former winner... dropend\n\t\t\t\t\t$special.drag.hijack( drop.event, \"dropend\", dd, x, data.elem );\n\t\t\t\t\tdata.active[x] = 0;\n\t\t\t\t\tdata.anyactive -= 1;\n\t\t\t\t}\n\t\t\t} while ( ++i < len ); // loop\n\t\t} while ( ++x < end ) // loop\n\t\t// check if the mouse is still moving or is idle\n\t\tif ( drop.last && xy[0] == drop.last.pageX && xy[1] == drop.last.pageY )\n\t\t\tdelete drop.timer; // idle, don't recurse\n\t\telse // recurse\n\t\t\tdrop.timer = setTimeout(function(){\n\t\t\t\tdrop.tolerate( dd );\n\t\t\t}, drop.delay );\n\t\t// remember event, to compare idleness\n\t\tdrop.last = drop.event;\n\t}\n\n};\n\n// share the same special event configuration with related events...\n$special.dropinit = $special.dropstart = $special.dropend = drop;\n","var $ = require(\"jquery\");\nvar Slick = require(\"../slick.core\");\n\nfunction CheckboxSelectColumn(options) {\n var _grid;\n var _self = this;\n var _handler = new Slick.EventHandler();\n var _selectedRowsLookup = {};\n var _defaults = {\n columnId: \"_checkbox_selector\",\n cssClass: null,\n toolTip: \"Select/Deselect All\",\n width: 30\n };\n\n var _options = $.extend(true, {}, _defaults, options);\n\n function init(grid) {\n _grid = grid;\n _handler\n .subscribe(_grid.onSelectedRowsChanged, handleSelectedRowsChanged)\n .subscribe(_grid.onClick, handleClick)\n .subscribe(_grid.onHeaderClick, handleHeaderClick)\n .subscribe(_grid.onKeyDown, handleKeyDown);\n }\n\n function destroy() {\n _handler.unsubscribeAll();\n }\n\n function handleSelectedRowsChanged(e, args) {\n var selectedRows = _grid.getSelectedRows();\n var lookup = {}, row, i;\n for (i = 0; i < selectedRows.length; i++) {\n row = selectedRows[i];\n lookup[row] = true;\n if (lookup[row] !== _selectedRowsLookup[row]) {\n _grid.invalidateRow(row);\n delete _selectedRowsLookup[row];\n }\n }\n for (i in _selectedRowsLookup) {\n _grid.invalidateRow(i);\n }\n _selectedRowsLookup = lookup;\n _grid.render();\n\n if (selectedRows.length && selectedRows.length == _grid.getDataLength()) {\n _grid.updateColumnHeader(_options.columnId, \"<input type='checkbox' checked='checked'>\", _options.toolTip);\n } else {\n _grid.updateColumnHeader(_options.columnId, \"<input type='checkbox'>\", _options.toolTip);\n }\n }\n\n function handleKeyDown(e, args) {\n if (e.which == 32) {\n if (_grid.getColumns()[args.cell].id === _options.columnId) {\n // if editing, try to commit\n if (!_grid.getEditorLock().isActive() || _grid.getEditorLock().commitCurrentEdit()) {\n toggleRowSelection(args.row);\n }\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n }\n }\n\n function handleClick(e, args) {\n // clicking on a row select checkbox\n if (_grid.getColumns()[args.cell].id === _options.columnId && $(e.target).is(\":checkbox\")) {\n // if editing, try to commit\n if (_grid.getEditorLock().isActive() && !_grid.getEditorLock().commitCurrentEdit()) {\n e.preventDefault();\n e.stopImmediatePropagation();\n return;\n }\n\n toggleRowSelection(args.row);\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n\n function toggleRowSelection(row) {\n if (_selectedRowsLookup[row]) {\n _grid.setSelectedRows($.grep(_grid.getSelectedRows(), function (n) {\n return n != row\n }));\n } else {\n _grid.setSelectedRows(_grid.getSelectedRows().concat(row));\n }\n }\n\n function handleHeaderClick(e, args) {\n if (args.column.id == _options.columnId && $(e.target).is(\":checkbox\")) {\n // if editing, try to commit\n if (_grid.getEditorLock().isActive() && !_grid.getEditorLock().commitCurrentEdit()) {\n e.preventDefault();\n e.stopImmediatePropagation();\n return;\n }\n\n if ($(e.target).is(\":checked\")) {\n var rows = [];\n for (var i = 0; i < _grid.getDataLength(); i++) {\n rows.push(i);\n }\n _grid.setSelectedRows(rows);\n } else {\n _grid.setSelectedRows([]);\n }\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n\n function getColumnDefinition() {\n return {\n id: _options.columnId,\n name: \"<input type='checkbox'>\",\n toolTip: _options.toolTip,\n field: \"sel\",\n width: _options.width,\n resizable: false,\n sortable: false,\n cssClass: _options.cssClass,\n formatter: checkboxSelectionFormatter\n };\n }\n\n function checkboxSelectionFormatter(row, cell, value, columnDef, dataContext) {\n if (dataContext) {\n return _selectedRowsLookup[row]\n ? \"<input type='checkbox' checked='checked'>\"\n : \"<input type='checkbox'>\";\n }\n return null;\n }\n\n $.extend(this, {\n \"init\": init,\n \"destroy\": destroy,\n\n \"getColumnDefinition\": getColumnDefinition\n });\n}\n\nmodule.exports = CheckboxSelectColumn;\n","var $ = require(\"jquery\");\nvar Slick = require(\"../slick.core\");\n\nfunction RowSelectionModel(options) {\n var _grid;\n var _ranges = [];\n var _self = this;\n var _handler = new Slick.EventHandler();\n var _inHandler;\n var _options;\n var _defaults = {\n selectActiveRow: true\n };\n\n function init(grid) {\n _options = $.extend(true, {}, _defaults, options);\n _grid = grid;\n _handler.subscribe(_grid.onActiveCellChanged,\n wrapHandler(handleActiveCellChange));\n _handler.subscribe(_grid.onKeyDown,\n wrapHandler(handleKeyDown));\n _handler.subscribe(_grid.onClick,\n wrapHandler(handleClick));\n }\n\n function destroy() {\n _handler.unsubscribeAll();\n }\n\n function wrapHandler(handler) {\n return function () {\n if (!_inHandler) {\n _inHandler = true;\n handler.apply(this, arguments);\n _inHandler = false;\n }\n };\n }\n\n function rangesToRows(ranges) {\n var rows = [];\n for (var i = 0; i < ranges.length; i++) {\n for (var j = ranges[i].fromRow; j <= ranges[i].toRow; j++) {\n rows.push(j);\n }\n }\n return rows;\n }\n\n function rowsToRanges(rows) {\n var ranges = [];\n var lastCell = _grid.getColumns().length - 1;\n for (var i = 0; i < rows.length; i++) {\n ranges.push(new Slick.Range(rows[i], 0, rows[i], lastCell));\n }\n return ranges;\n }\n\n function getRowsRange(from, to) {\n var i, rows = [];\n for (i = from; i <= to; i++) {\n rows.push(i);\n }\n for (i = to; i < from; i++) {\n rows.push(i);\n }\n return rows;\n }\n\n function getSelectedRows() {\n return rangesToRows(_ranges);\n }\n\n function setSelectedRows(rows) {\n setSelectedRanges(rowsToRanges(rows));\n }\n\n function setSelectedRanges(ranges) {\n _ranges = ranges;\n _self.onSelectedRangesChanged.notify(_ranges);\n }\n\n function getSelectedRanges() {\n return _ranges;\n }\n\n function handleActiveCellChange(e, data) {\n if (_options.selectActiveRow && data.row != null) {\n setSelectedRanges([new Slick.Range(data.row, 0, data.row, _grid.getColumns().length - 1)]);\n }\n }\n\n function handleKeyDown(e) {\n var activeRow = _grid.getActiveCell();\n if (activeRow && e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey && (e.which == 38 || e.which == 40)) {\n var selectedRows = getSelectedRows();\n selectedRows.sort(function (x, y) {\n return x - y\n });\n\n if (!selectedRows.length) {\n selectedRows = [activeRow.row];\n }\n\n var top = selectedRows[0];\n var bottom = selectedRows[selectedRows.length - 1];\n var active;\n\n if (e.which == 40) {\n active = activeRow.row < bottom || top == bottom ? ++bottom : ++top;\n } else {\n active = activeRow.row < bottom ? --bottom : --top;\n }\n\n if (active >= 0 && active < _grid.getDataLength()) {\n _grid.scrollRowIntoView(active);\n _ranges = rowsToRanges(getRowsRange(top, bottom));\n setSelectedRanges(_ranges);\n }\n\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n function handleClick(e) {\n var cell = _grid.getCellFromEvent(e);\n if (!cell || !_grid.canCellBeActive(cell.row, cell.cell)) {\n return false;\n }\n\n if (!_grid.getOptions().multiSelect || (\n !e.ctrlKey && !e.shiftKey && !e.metaKey)) {\n return false;\n }\n\n var selection = rangesToRows(_ranges);\n var idx = $.inArray(cell.row, selection);\n\n if (idx === -1 && (e.ctrlKey || e.metaKey)) {\n selection.push(cell.row);\n _grid.setActiveCell(cell.row, cell.cell);\n } else if (idx !== -1 && (e.ctrlKey || e.metaKey)) {\n selection = $.grep(selection, function (o, i) {\n return (o !== cell.row);\n });\n _grid.setActiveCell(cell.row, cell.cell);\n } else if (selection.length && e.shiftKey) {\n var last = selection.pop();\n var from = Math.min(cell.row, last);\n var to = Math.max(cell.row, last);\n selection = [];\n for (var i = from; i <= to; i++) {\n if (i !== last) {\n selection.push(i);\n }\n }\n selection.push(last);\n _grid.setActiveCell(cell.row, cell.cell);\n }\n\n _ranges = rowsToRanges(selection);\n setSelectedRanges(_ranges);\n e.stopImmediatePropagation();\n\n return true;\n }\n\n $.extend(this, {\n \"getSelectedRows\": getSelectedRows,\n \"setSelectedRows\": setSelectedRows,\n\n \"getSelectedRanges\": getSelectedRanges,\n \"setSelectedRanges\": setSelectedRanges,\n\n \"init\": init,\n \"destroy\": destroy,\n\n \"onSelectedRangesChanged\": new Slick.Event()\n });\n}\n\nmodule.exports = RowSelectionModel;\n","/***\n * Contains core SlickGrid classes.\n * @module Core\n * @namespace Slick\n */\n\nvar $ = require(\"jquery\");\n\n// register namespace\nvar Slick = {\n Event: Event,\n EventData: EventData,\n EventHandler: EventHandler,\n Range: Range,\n NonDataRow: NonDataItem,\n Group: Group,\n GroupTotals: GroupTotals,\n EditorLock: EditorLock,\n\n /***\n * A global singleton editor lock.\n * @class GlobalEditorLock\n * @static\n * @constructor\n */\n GlobalEditorLock: new EditorLock()\n};\n\n/***\n * An event object for passing data to event handlers and letting them control propagation.\n * <p>This is pretty much identical to how W3C and jQuery implement events.</p>\n * @class EventData\n * @constructor\n */\nfunction EventData() {\n var isPropagationStopped = false;\n var isImmediatePropagationStopped = false;\n\n /***\n * Stops event from propagating up the DOM tree.\n * @method stopPropagation\n */\n this.stopPropagation = function () {\n isPropagationStopped = true;\n };\n\n /***\n * Returns whether stopPropagation was called on this event object.\n * @method isPropagationStopped\n * @return {Boolean}\n */\n this.isPropagationStopped = function () {\n return isPropagationStopped;\n };\n\n /***\n * Prevents the rest of the handlers from being executed.\n * @method stopImmediatePropagation\n */\n this.stopImmediatePropagation = function () {\n isImmediatePropagationStopped = true;\n };\n\n /***\n * Returns whether stopImmediatePropagation was called on this event object.\\\n * @method isImmediatePropagationStopped\n * @return {Boolean}\n */\n this.isImmediatePropagationStopped = function () {\n return isImmediatePropagationStopped;\n }\n}\n\n/***\n * A simple publisher-subscriber implementation.\n * @class Event\n * @constructor\n */\nfunction Event() {\n var handlers = [];\n\n /***\n * Adds an event handler to be called when the event is fired.\n * <p>Event handler will receive two arguments - an <code>EventData</code> and the <code>data</code>\n * object the event was fired with.<p>\n * @method subscribe\n * @param fn {Function} Event handler.\n */\n this.subscribe = function (fn) {\n handlers.push(fn);\n };\n\n /***\n * Removes an event handler added with <code>subscribe(fn)</code>.\n * @method unsubscribe\n * @param fn {Function} Event handler to be removed.\n */\n this.unsubscribe = function (fn) {\n for (var i = handlers.length - 1; i >= 0; i--) {\n if (handlers[i] === fn) {\n handlers.splice(i, 1);\n }\n }\n };\n\n /***\n * Fires an event notifying all subscribers.\n * @method notify\n * @param args {Object} Additional data object to be passed to all handlers.\n * @param e {EventData}\n * Optional.\n * An <code>EventData</code> object to be passed to all handlers.\n * For DOM events, an existing W3C/jQuery event object can be passed in.\n * @param scope {Object}\n * Optional.\n * The scope (\"this\") within which the handler will be executed.\n * If not specified, the scope will be set to the <code>Event</code> instance.\n */\n this.notify = function (args, e, scope) {\n e = e || new EventData();\n scope = scope || this;\n\n var returnValue;\n for (var i = 0; i < handlers.length && !(e.isPropagationStopped() || e.isImmediatePropagationStopped()); i++) {\n returnValue = handlers[i].call(scope, e, args);\n }\n\n return returnValue;\n };\n}\n\nfunction EventHandler() {\n var handlers = [];\n\n this.subscribe = function (event, handler) {\n handlers.push({\n event: event,\n handler: handler\n });\n event.subscribe(handler);\n\n return this; // allow chaining\n };\n\n this.unsubscribe = function (event, handler) {\n var i = handlers.length;\n while (i--) {\n if (handlers[i].event === event &&\n handlers[i].handler === handler) {\n handlers.splice(i, 1);\n event.unsubscribe(handler);\n return;\n }\n }\n\n return this; // allow chaining\n };\n\n this.unsubscribeAll = function () {\n var i = handlers.length;\n while (i--) {\n handlers[i].event.unsubscribe(handlers[i].handler);\n }\n handlers = [];\n\n return this; // allow chaining\n }\n}\n\n/***\n * A structure containing a range of cells.\n * @class Range\n * @constructor\n * @param fromRow {Integer} Starting row.\n * @param fromCell {Integer} Starting cell.\n * @param toRow {Integer} Optional. Ending row. Defaults to <code>fromRow</code>.\n * @param toCell {Integer} Optional. Ending cell. Defaults to <code>fromCell</code>.\n */\nfunction Range(fromRow, fromCell, toRow, toCell) {\n if (toRow === undefined && toCell === undefined) {\n toRow = fromRow;\n toCell = fromCell;\n }\n\n /***\n * @property fromRow\n * @type {Integer}\n */\n this.fromRow = Math.min(fromRow, toRow);\n\n /***\n * @property fromCell\n * @type {Integer}\n */\n this.fromCell = Math.min(fromCell, toCell);\n\n /***\n * @property toRow\n * @type {Integer}\n */\n this.toRow = Math.max(fromRow, toRow);\n\n /***\n * @property toCell\n * @type {Integer}\n */\n this.toCell = Math.max(fromCell, toCell);\n\n /***\n * Returns whether a range represents a single row.\n * @method isSingleRow\n * @return {Boolean}\n */\n this.isSingleRow = function () {\n return this.fromRow == this.toRow;\n };\n\n /***\n * Returns whether a range represents a single cell.\n * @method isSingleCell\n * @return {Boolean}\n */\n this.isSingleCell = function () {\n return this.fromRow == this.toRow && this.fromCell == this.toCell;\n };\n\n /***\n * Returns whether a range contains a given cell.\n * @method contains\n * @param row {Integer}\n * @param cell {Integer}\n * @return {Boolean}\n */\n this.contains = function (row, cell) {\n return row >= this.fromRow && row <= this.toRow &&\n cell >= this.fromCell && cell <= this.toCell;\n };\n\n /***\n * Returns a readable representation of a range.\n * @method toString\n * @return {String}\n */\n this.toString = function () {\n if (this.isSingleCell()) {\n return \"(\" + this.fromRow + \":\" + this.fromCell + \")\";\n }\n else {\n return \"(\" + this.fromRow + \":\" + this.fromCell + \" - \" + this.toRow + \":\" + this.toCell + \")\";\n }\n }\n}\n\n\n/***\n * A base class that all special / non-data rows (like Group and GroupTotals) derive from.\n * @class NonDataItem\n * @constructor\n */\nfunction NonDataItem() {\n this.__nonDataRow = true;\n}\n\n\n/***\n * Information about a group of rows.\n * @class Group\n * @extends Slick.NonDataItem\n * @constructor\n */\nfunction Group() {\n this.__group = true;\n\n /**\n * Grouping level, starting with 0.\n * @property level\n * @type {Number}\n */\n this.level = 0;\n\n /***\n * Number of rows in the group.\n * @property count\n * @type {Integer}\n */\n this.count = 0;\n\n /***\n * Grouping value.\n * @property value\n * @type {Object}\n */\n this.value = null;\n\n /***\n * Formatted display value of the group.\n * @property title\n * @type {String}\n */\n this.title = null;\n\n /***\n * Whether a group is collapsed.\n * @property collapsed\n * @type {Boolean}\n */\n this.collapsed = false;\n\n /***\n * GroupTotals, if any.\n * @property totals\n * @type {GroupTotals}\n */\n this.totals = null;\n\n /**\n * Rows that are part of the group.\n * @property rows\n * @type {Array}\n */\n this.rows = [];\n\n /**\n * Sub-groups that are part of the group.\n * @property groups\n * @type {Array}\n */\n this.groups = null;\n\n /**\n * A unique key used to identify the group. This key can be used in calls to DataView\n * collapseGroup() or expandGroup().\n * @property groupingKey\n * @type {Object}\n */\n this.groupingKey = null;\n}\n\nGroup.prototype = new NonDataItem();\n\n/***\n * Compares two Group instances.\n * @method equals\n * @return {Boolean}\n * @param group {Group} Group instance to compare to.\n */\nGroup.prototype.equals = function (group) {\n return this.value === group.value &&\n this.count === group.count &&\n this.collapsed === group.collapsed &&\n this.title === group.title;\n};\n\n/***\n * Information about group totals.\n * An instance of GroupTotals will be created for each totals row and passed to the aggregators\n * so that they can store arbitrary data in it. That data can later be accessed by group totals\n * formatters during the display.\n * @class GroupTotals\n * @extends Slick.NonDataItem\n * @constructor\n */\nfunction GroupTotals() {\n this.__groupTotals = true;\n\n /***\n * Parent Group.\n * @param group\n * @type {Group}\n */\n this.group = null;\n\n /***\n * Whether the totals have been fully initialized / calculated.\n * Will be set to false for lazy-calculated group totals.\n * @param initialized\n * @type {Boolean}\n */\n this.initialized = false;\n}\n\nGroupTotals.prototype = new NonDataItem();\n\n/***\n * A locking helper to track the active edit controller and ensure that only a single controller\n * can be active at a time. This prevents a whole class of state and validation synchronization\n * issues. An edit controller (such as SlickGrid) can query if an active edit is in progress\n * and attempt a commit or cancel before proceeding.\n * @class EditorLock\n * @constructor\n */\nfunction EditorLock() {\n var activeEditController = null;\n\n /***\n * Returns true if a specified edit controller is active (has the edit lock).\n * If the parameter is not specified, returns true if any edit controller is active.\n * @method isActive\n * @param editController {EditController}\n * @return {Boolean}\n */\n this.isActive = function (editController) {\n return (editController ? activeEditController === editController : activeEditController !== null);\n };\n\n /***\n * Sets the specified edit controller as the active edit controller (acquire edit lock).\n * If another edit controller is already active, and exception will be thrown.\n * @method activate\n * @param editController {EditController} edit controller acquiring the lock\n */\n this.activate = function (editController) {\n if (editController === activeEditController) { // already activated?\n return;\n }\n if (activeEditController !== null) {\n throw \"SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController\";\n }\n if (!editController.commitCurrentEdit) {\n throw \"SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()\";\n }\n if (!editController.cancelCurrentEdit) {\n throw \"SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()\";\n }\n activeEditController = editController;\n };\n\n /***\n * Unsets the specified edit controller as the active edit controller (release edit lock).\n * If the specified edit controller is not the active one, an exception will be thrown.\n * @method deactivate\n * @param editController {EditController} edit controller releasing the lock\n */\n this.deactivate = function (editController) {\n if (activeEditController !== editController) {\n throw \"SlickGrid.EditorLock.deactivate: specified editController is not the currently active one\";\n }\n activeEditController = null;\n };\n\n /***\n * Attempts to commit the current edit by calling \"commitCurrentEdit\" method on the active edit\n * controller and returns whether the commit attempt was successful (commit may fail due to validation\n * errors, etc.). Edit controller's \"commitCurrentEdit\" must return true if the commit has succeeded\n * and false otherwise. If no edit controller is active, returns true.\n * @method commitCurrentEdit\n * @return {Boolean}\n */\n this.commitCurrentEdit = function () {\n return (activeEditController ? activeEditController.commitCurrentEdit() : true);\n };\n\n /***\n * Attempts to cancel the current edit by calling \"cancelCurrentEdit\" method on the active edit\n * controller and returns whether the edit was successfully cancelled. If no edit controller is\n * active, returns true.\n * @method cancelCurrentEdit\n * @return {Boolean}\n */\n this.cancelCurrentEdit = function cancelCurrentEdit() {\n return (activeEditController ? activeEditController.cancelCurrentEdit() : true);\n };\n}\n\nmodule.exports = Slick;\n","/**\n * @license\n * (c) 2009-2013 Michael Leibman\n * michael{dot}leibman{at}gmail{dot}com\n * http://github.com/mleibman/slickgrid\n *\n * Distributed under MIT license.\n * All rights reserved.\n *\n * SlickGrid v2.2\n *\n * NOTES:\n * Cell/row DOM manipulations are done directly bypassing jQuery's DOM manipulation methods.\n * This increases the speed dramatically, but can only be done safely because there are no event handlers\n * or data associated with any cell/row DOM nodes. Cell editors must make sure they implement .destroy()\n * and do proper cleanup.\n */\n\nvar $ = require(\"jquery\");\nvar $1 = require(\"jquery_event_drag\");\nvar $2 = require(\"jquery_event_drop\");\nvar Slick = require(\"./slick.core\");\n\n\n// shared across all grids on the page\nvar scrollbarDimensions;\nvar maxSupportedCssHeight; // browser's breaking point\n\n//////////////////////////////////////////////////////////////////////////////////////////////\n// SlickGrid class implementation (available as Slick.Grid)\n\n/**\n * Creates a new instance of the grid.\n * @class SlickGrid\n * @constructor\n * @param {Node} container Container node to create the grid in.\n * @param {Array,Object} data An array of objects for databinding.\n * @param {Array} columns An array of column definitions.\n * @param {Object} options Grid options.\n **/\nfunction SlickGrid(container, data, columns, options) {\n // settings\n var defaults = {\n explicitInitialization: false,\n rowHeight: 25,\n defaultColumnWidth: 80,\n enableAddRow: false,\n leaveSpaceForNewRows: false,\n editable: false,\n autoEdit: true,\n enableCellNavigation: true,\n enableColumnReorder: true,\n asyncEditorLoading: false,\n asyncEditorLoadDelay: 100,\n forceFitColumns: false,\n enableAsyncPostRender: false,\n asyncPostRenderDelay: 50,\n autoHeight: false,\n editorLock: Slick.GlobalEditorLock,\n showHeaderRow: false,\n headerRowHeight: 25,\n showTopPanel: false,\n topPanelHeight: 25,\n formatterFactory: null,\n editorFactory: null,\n cellFlashingCssClass: \"flashing\",\n selectedCellCssClass: \"selected\",\n multiSelect: true,\n enableTextSelectionOnCells: false,\n dataItemColumnValueExtractor: null,\n fullWidthRows: false,\n multiColumnSort: false,\n defaultFormatter: defaultFormatter,\n forceSyncScrolling: false,\n addNewRowCssClass: \"new-row\"\n };\n\n var columnDefaults = {\n name: \"\",\n resizable: true,\n sortable: false,\n minWidth: 30,\n rerenderOnResize: false,\n headerCssClass: null,\n defaultSortAsc: true,\n focusable: true,\n selectable: true\n };\n\n // scroller\n var th; // virtual height\n var h; // real scrollable height\n var ph; // page height\n var n; // number of pages\n var cj; // \"jumpiness\" coefficient\n\n var page = 0; // current page\n var offset = 0; // current page offset\n var vScrollDir = 1;\n\n // private\n var initialized = false;\n var $container;\n var uid = \"slickgrid_\" + Math.round(1000000 * Math.random());\n var self = this;\n var $focusSink, $focusSink2;\n var $headerScroller;\n var $headers;\n var $headerRow, $headerRowScroller, $headerRowSpacer;\n var $topPanelScroller;\n var $topPanel;\n var $viewport;\n var $canvas;\n var $style;\n var $boundAncestors;\n var stylesheet, columnCssRulesL, columnCssRulesR;\n var viewportH, viewportW;\n var canvasWidth;\n var viewportHasHScroll, viewportHasVScroll;\n var headerColumnWidthDiff = 0, headerColumnHeightDiff = 0, // border+padding\n cellWidthDiff = 0, cellHeightDiff = 0;\n var absoluteColumnMinWidth;\n\n var tabbingDirection = 1;\n var activePosX;\n var activeRow, activeCell;\n var activeCellNode = null;\n var currentEditor = null;\n var serializedEditorValue;\n var editController;\n\n var rowsCache = {};\n var renderedRows = 0;\n var numVisibleRows;\n var prevScrollTop = 0;\n var scrollTop = 0;\n var lastRenderedScrollTop = 0;\n var lastRenderedScrollLeft = 0;\n var prevScrollLeft = 0;\n var scrollLeft = 0;\n\n var selectionModel;\n var selectedRows = [];\n\n var plugins = [];\n var cellCssClasses = {};\n\n var columnsById = {};\n var sortColumns = [];\n var columnPosLeft = [];\n var columnPosRight = [];\n\n\n // async call handles\n var h_editorLoader = null;\n var h_render = null;\n var h_postrender = null;\n var postProcessedRows = {};\n var postProcessToRow = null;\n var postProcessFromRow = null;\n\n // perf counters\n var counter_rows_rendered = 0;\n var counter_rows_removed = 0;\n\n // These two variables work around a bug with inertial scrolling in Webkit/Blink on Mac.\n // See http://crbug.com/312427.\n var rowNodeFromLastMouseWheelEvent; // this node must not be deleted while inertial scrolling\n var zombieRowNodeFromLastMouseWheelEvent; // node that was hidden instead of getting deleted\n\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n // Initialization\n\n function init() {\n $container = $(container);\n if ($container.length < 1) {\n throw new Error(\"SlickGrid requires a valid container, \" + container + \" does not exist in the DOM.\");\n }\n\n // calculate these only once and share between grid instances\n maxSupportedCssHeight = maxSupportedCssHeight || getMaxSupportedCssHeight();\n scrollbarDimensions = scrollbarDimensions || measureScrollbar();\n\n options = $.extend({}, defaults, options);\n validateAndEnforceOptions();\n columnDefaults.width = options.defaultColumnWidth;\n\n columnsById = {};\n for (var i = 0; i < columns.length; i++) {\n var m = columns[i] = $.extend({}, columnDefaults, columns[i]);\n columnsById[m.id] = i;\n if (m.minWidth && m.width < m.minWidth) {\n m.width = m.minWidth;\n }\n if (m.maxWidth && m.width > m.maxWidth) {\n m.width = m.maxWidth;\n }\n }\n\n // validate loaded JavaScript modules against requested options\n if (options.enableColumnReorder && !$.fn.sortable) {\n throw new Error(\"SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded\");\n }\n\n editController = {\n \"commitCurrentEdit\": commitCurrentEdit,\n \"cancelCurrentEdit\": cancelCurrentEdit\n };\n\n $container\n .empty()\n .css(\"overflow\", \"hidden\")\n .css(\"outline\", 0)\n .addClass(uid)\n .addClass(\"bk-ui-widget\");\n\n // set up a positioning container if needed\n if (!/relative|absolute|fixed/.test($container.css(\"position\"))) {\n $container.css(\"position\", \"relative\");\n }\n\n $focusSink = $(\"<div tabIndex='0' hideFocus style='position:fixed;width:0;height:0;top:0;left:0;outline:0;'></div>\").appendTo($container);\n\n $headerScroller = $(\"<div class='bk-slick-header bk-ui-state-default' style='overflow:hidden;position:relative;' />\").appendTo($container);\n $headers = $(\"<div class='bk-slick-header-columns' style='left:-1000px' />\").appendTo($headerScroller);\n $headers.width(getHeadersWidth());\n\n $headerRowScroller = $(\"<div class='bk-slick-headerrow bk-ui-state-default' style='overflow:hidden;position:relative;' />\").appendTo($container);\n $headerRow = $(\"<div class='bk-slick-headerrow-columns' />\").appendTo($headerRowScroller);\n $headerRowSpacer = $(\"<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>\")\n .css(\"width\", getCanvasWidth() + scrollbarDimensions.width + \"px\")\n .appendTo($headerRowScroller);\n\n $topPanelScroller = $(\"<div class='bk-slick-top-panel-scroller bk-ui-state-default' style='overflow:hidden;position:relative;' />\").appendTo($container);\n $topPanel = $(\"<div class='bk-slick-top-panel' style='width:10000px' />\").appendTo($topPanelScroller);\n\n if (!options.showTopPanel) {\n $topPanelScroller.hide();\n }\n\n if (!options.showHeaderRow) {\n $headerRowScroller.hide();\n }\n\n $viewport = $(\"<div class='bk-slick-viewport' style='width:100%;overflow:auto;outline:0;position:relative;;'>\").appendTo($container);\n $viewport.css(\"overflow-y\", options.autoHeight ? \"hidden\" : \"auto\");\n\n $canvas = $(\"<div class='grid-canvas' />\").appendTo($viewport);\n\n $focusSink2 = $focusSink.clone().appendTo($container);\n\n if (!options.explicitInitialization) {\n finishInitialization();\n }\n }\n\n function finishInitialization() {\n if (!initialized) {\n initialized = true;\n\n viewportW = parseFloat($.css($container[0], \"width\", true));\n\n // header columns and cells may have different padding/border skewing width calculations (box-sizing, hello?)\n // calculate the diff so we can set consistent sizes\n measureCellPaddingAndBorder();\n\n // for usability reasons, all text selection in SlickGrid is disabled\n // with the exception of input and textarea elements (selection must\n // be enabled there so that editors work as expected); note that\n // selection in grid cells (grid body) is already unavailable in\n // all browsers except IE\n disableSelection($headers); // disable all text selection in header (including input and textarea)\n\n if (!options.enableTextSelectionOnCells) {\n // disable text selection in grid cells except in input and textarea elements\n // (this is IE-specific, because selectstart event will only fire in IE)\n $viewport.bind(\"selectstart.ui\", function (event) {\n return $(event.target).is(\"input,textarea\");\n });\n }\n\n updateColumnCaches();\n createColumnHeaders();\n setupColumnSort();\n createCssRules();\n resizeCanvas();\n bindAncestorScrollEvents();\n\n $container\n .bind(\"resize.bk-slickgrid\", resizeCanvas);\n $viewport\n //.bind(\"click\", handleClick)\n .bind(\"scroll\", handleScroll);\n $headerScroller\n .bind(\"contextmenu\", handleHeaderContextMenu)\n .bind(\"click\", handleHeaderClick)\n .delegate(\".bk-slick-header-column\", \"mouseenter\", handleHeaderMouseEnter)\n .delegate(\".bk-slick-header-column\", \"mouseleave\", handleHeaderMouseLeave);\n $headerRowScroller\n .bind(\"scroll\", handleHeaderRowScroll);\n $focusSink.add($focusSink2)\n .bind(\"keydown\", handleKeyDown);\n $canvas\n .bind(\"keydown\", handleKeyDown)\n .bind(\"click\", handleClick)\n .bind(\"dblclick\", handleDblClick)\n .bind(\"contextmenu\", handleContextMenu)\n .bind(\"draginit\", handleDragInit)\n .bind(\"dragstart\", {distance: 3}, handleDragStart)\n .bind(\"drag\", handleDrag)\n .bind(\"dragend\", handleDragEnd)\n .delegate(\".bk-slick-cell\", \"mouseenter\", handleMouseEnter)\n .delegate(\".bk-slick-cell\", \"mouseleave\", handleMouseLeave);\n\n // Work around http://crbug.com/312427.\n if (navigator.userAgent.toLowerCase().match(/webkit/) &&\n navigator.userAgent.toLowerCase().match(/macintosh/)) {\n $canvas.bind(\"mousewheel\", handleMouseWheel);\n }\n }\n }\n\n function registerPlugin(plugin) {\n plugins.unshift(plugin);\n plugin.init(self);\n }\n\n function unregisterPlugin(plugin) {\n for (var i = plugins.length; i >= 0; i--) {\n if (plugins[i] === plugin) {\n if (plugins[i].destroy) {\n plugins[i].destroy();\n }\n plugins.splice(i, 1);\n break;\n }\n }\n }\n\n function setSelectionModel(model) {\n if (selectionModel) {\n selectionModel.onSelectedRangesChanged.unsubscribe(handleSelectedRangesChanged);\n if (selectionModel.destroy) {\n selectionModel.destroy();\n }\n }\n\n selectionModel = model;\n if (selectionModel) {\n selectionModel.init(self);\n selectionModel.onSelectedRangesChanged.subscribe(handleSelectedRangesChanged);\n }\n }\n\n function getSelectionModel() {\n return selectionModel;\n }\n\n function getCanvasNode() {\n return $canvas[0];\n }\n\n function measureScrollbar() {\n var $c = $(\"<div style='position:absolute; top:-10000px; left:-10000px; width:100px; height:100px; overflow:scroll;'></div>\").appendTo(\"body\");\n var dim = {\n width: $c.width() - $c[0].clientWidth,\n height: $c.height() - $c[0].clientHeight\n };\n $c.remove();\n return dim;\n }\n\n function getHeadersWidth() {\n var headersWidth = 0;\n for (var i = 0, ii = columns.length; i < ii; i++) {\n var width = columns[i].width;\n headersWidth += width;\n }\n headersWidth += scrollbarDimensions.width;\n return Math.max(headersWidth, viewportW) + 1000;\n }\n\n function getCanvasWidth() {\n var availableWidth = viewportHasVScroll ? viewportW - scrollbarDimensions.width : viewportW;\n var rowWidth = 0;\n var i = columns.length;\n while (i--) {\n rowWidth += columns[i].width;\n }\n return options.fullWidthRows ? Math.max(rowWidth, availableWidth) : rowWidth;\n }\n\n function updateCanvasWidth(forceColumnWidthsUpdate) {\n var oldCanvasWidth = canvasWidth;\n canvasWidth = getCanvasWidth();\n\n if (canvasWidth != oldCanvasWidth) {\n $canvas.width(canvasWidth);\n $headerRow.width(canvasWidth);\n $headers.width(getHeadersWidth());\n viewportHasHScroll = (canvasWidth > viewportW - scrollbarDimensions.width);\n }\n\n $headerRowSpacer.width(canvasWidth + (viewportHasVScroll ? scrollbarDimensions.width : 0));\n\n if (canvasWidth != oldCanvasWidth || forceColumnWidthsUpdate) {\n applyColumnWidths();\n }\n }\n\n function disableSelection($target) {\n if ($target && $target.jquery) {\n $target\n .attr(\"unselectable\", \"on\")\n .css(\"MozUserSelect\", \"none\")\n .bind(\"selectstart.ui\", function () {\n return false;\n }); // from jquery:ui.core.js 1.7.2\n }\n }\n\n function getMaxSupportedCssHeight() {\n var supportedHeight = 1000000;\n // FF reports the height back but still renders blank after ~6M px\n var testUpTo = navigator.userAgent.toLowerCase().match(/firefox/) ? 6000000 : 1000000000;\n var div = $(\"<div style='display:none' />\").appendTo(document.body);\n\n while (true) {\n var test = supportedHeight * 2;\n div.css(\"height\", test);\n if (test > testUpTo || div.height() !== test) {\n break;\n } else {\n supportedHeight = test;\n }\n }\n\n div.remove();\n return supportedHeight;\n }\n\n // TODO: this is static. need to handle page mutation.\n function bindAncestorScrollEvents() {\n var elem = $canvas[0];\n while ((elem = elem.parentNode) != document.body && elem != null) {\n // bind to scroll containers only\n if (elem == $viewport[0] || elem.scrollWidth != elem.clientWidth || elem.scrollHeight != elem.clientHeight) {\n var $elem = $(elem);\n if (!$boundAncestors) {\n $boundAncestors = $elem;\n } else {\n $boundAncestors = $boundAncestors.add($elem);\n }\n $elem.bind(\"scroll.\" + uid, handleActiveCellPositionChange);\n }\n }\n }\n\n function unbindAncestorScrollEvents() {\n if (!$boundAncestors) {\n return;\n }\n $boundAncestors.unbind(\"scroll.\" + uid);\n $boundAncestors = null;\n }\n\n function updateColumnHeader(columnId, title, toolTip) {\n if (!initialized) { return; }\n var idx = getColumnIndex(columnId);\n if (idx == null) {\n return;\n }\n\n var columnDef = columns[idx];\n var $header = $headers.children().eq(idx);\n if ($header) {\n if (title !== undefined) {\n columns[idx].name = title;\n }\n if (toolTip !== undefined) {\n columns[idx].toolTip = toolTip;\n }\n\n trigger(self.onBeforeHeaderCellDestroy, {\n \"node\": $header[0],\n \"column\": columnDef\n });\n\n $header\n .attr(\"title\", toolTip || \"\")\n .children().eq(0).html(title);\n\n trigger(self.onHeaderCellRendered, {\n \"node\": $header[0],\n \"column\": columnDef\n });\n }\n }\n\n function getHeaderRow() {\n return $headerRow[0];\n }\n\n function getHeaderRowColumn(columnId) {\n var idx = getColumnIndex(columnId);\n var $header = $headerRow.children().eq(idx);\n return $header && $header[0];\n }\n\n function createColumnHeaders() {\n function onMouseEnter() {\n $(this).addClass(\"bk-ui-state-hover\");\n }\n\n function onMouseLeave() {\n $(this).removeClass(\"bk-ui-state-hover\");\n }\n\n $headers.find(\".bk-slick-header-column\")\n .each(function() {\n var columnDef = $(this).data(\"column\");\n if (columnDef) {\n trigger(self.onBeforeHeaderCellDestroy, {\n \"node\": this,\n \"column\": columnDef\n });\n }\n });\n $headers.empty();\n $headers.width(getHeadersWidth());\n\n $headerRow.find(\".bk-slick-headerrow-column\")\n .each(function() {\n var columnDef = $(this).data(\"column\");\n if (columnDef) {\n trigger(self.onBeforeHeaderRowCellDestroy, {\n \"node\": this,\n \"column\": columnDef\n });\n }\n });\n $headerRow.empty();\n\n for (var i = 0; i < columns.length; i++) {\n var m = columns[i];\n\n var header = $(\"<div class='bk-ui-state-default bk-slick-header-column' />\")\n .html(\"<span class='bk-slick-column-name'>\" + m.name + \"</span>\")\n .width(m.width - headerColumnWidthDiff)\n .attr(\"id\", \"\" + uid + m.id)\n .attr(\"title\", m.toolTip || \"\")\n .data(\"column\", m)\n .addClass(m.headerCssClass || \"\")\n .appendTo($headers);\n\n if (options.enableColumnReorder || m.sortable) {\n header\n .on('mouseenter', onMouseEnter)\n .on('mouseleave', onMouseLeave);\n }\n\n if (m.sortable) {\n header.addClass(\"bk-slick-header-sortable\");\n header.append(\"<span class='bk-slick-sort-indicator' />\");\n }\n\n trigger(self.onHeaderCellRendered, {\n \"node\": header[0],\n \"column\": m\n });\n\n if (options.showHeaderRow) {\n var headerRowCell = $(\"<div class='bk-ui-state-default bk-slick-headerrow-column l\" + i + \" r\" + i + \"'></div>\")\n .data(\"column\", m)\n .appendTo($headerRow);\n\n trigger(self.onHeaderRowCellRendered, {\n \"node\": headerRowCell[0],\n \"column\": m\n });\n }\n }\n\n setSortColumns(sortColumns);\n setupColumnResize();\n if (options.enableColumnReorder) {\n setupColumnReorder();\n }\n }\n\n function setupColumnSort() {\n $headers.click(function (e) {\n // temporary workaround for a bug in jQuery 1.7.1 (http://bugs.jquery.com/ticket/11328)\n e.metaKey = e.metaKey || e.ctrlKey;\n\n if ($(e.target).hasClass(\"bk-slick-resizable-handle\")) {\n return;\n }\n\n var $col = $(e.target).closest(\".bk-slick-header-column\");\n if (!$col.length) {\n return;\n }\n\n var column = $col.data(\"column\");\n if (column.sortable) {\n if (!getEditorLock().commitCurrentEdit()) {\n return;\n }\n\n var sortOpts = null;\n var i = 0;\n for (; i < sortColumns.length; i++) {\n if (sortColumns[i].columnId == column.id) {\n sortOpts = sortColumns[i];\n sortOpts.sortAsc = !sortOpts.sortAsc;\n break;\n }\n }\n\n if (e.metaKey && options.multiColumnSort) {\n if (sortOpts) {\n sortColumns.splice(i, 1);\n }\n }\n else {\n if ((!e.shiftKey && !e.metaKey) || !options.multiColumnSort) {\n sortColumns = [];\n }\n\n if (!sortOpts) {\n sortOpts = { columnId: column.id, sortAsc: column.defaultSortAsc };\n sortColumns.push(sortOpts);\n } else if (sortColumns.length == 0) {\n sortColumns.push(sortOpts);\n }\n }\n\n setSortColumns(sortColumns);\n\n if (!options.multiColumnSort) {\n trigger(self.onSort, {\n multiColumnSort: false,\n sortCol: column,\n sortAsc: sortOpts.sortAsc}, e);\n } else {\n trigger(self.onSort, {\n multiColumnSort: true,\n sortCols: $.map(sortColumns, function(col) {\n return {sortCol: columns[getColumnIndex(col.columnId)], sortAsc: col.sortAsc };\n })}, e);\n }\n }\n });\n }\n\n function setupColumnReorder() {\n $headers.filter(\":ui-sortable\").sortable(\"destroy\");\n $headers.sortable({\n containment: \"parent\",\n distance: 3,\n axis: \"x\",\n cursor: \"default\",\n tolerance: \"intersection\",\n helper: \"clone\",\n placeholder: \"bk-slick-sortable-placeholder bk-ui-state-default bk-slick-header-column\",\n start: function (e, ui) {\n ui.placeholder.width(ui.helper.outerWidth() - headerColumnWidthDiff);\n $(ui.helper).addClass(\"bk-slick-header-column-active\");\n },\n beforeStop: function (e, ui) {\n $(ui.helper).removeClass(\"bk-slick-header-column-active\");\n },\n stop: function (e) {\n if (!getEditorLock().commitCurrentEdit()) {\n $(this).sortable(\"cancel\");\n return;\n }\n\n var reorderedIds = $headers.sortable(\"toArray\");\n var reorderedColumns = [];\n for (var i = 0; i < reorderedIds.length; i++) {\n reorderedColumns.push(columns[getColumnIndex(reorderedIds[i].replace(uid, \"\"))]);\n }\n setColumns(reorderedColumns);\n\n trigger(self.onColumnsReordered, {});\n e.stopPropagation();\n setupColumnResize();\n }\n });\n }\n\n function setupColumnResize() {\n var $col, j, c, pageX, columnElements, minPageX, maxPageX, firstResizable, lastResizable;\n columnElements = $headers.children();\n columnElements.find(\".bk-slick-resizable-handle\").remove();\n columnElements.each(function (i, e) {\n if (columns[i].resizable) {\n if (firstResizable === undefined) {\n firstResizable = i;\n }\n lastResizable = i;\n }\n });\n if (firstResizable === undefined) {\n return;\n }\n columnElements.each(function (i, e) {\n if (i < firstResizable || (options.forceFitColumns && i >= lastResizable)) {\n return;\n }\n $col = $(e);\n $(\"<div class='bk-slick-resizable-handle' />\")\n .appendTo(e)\n .bind(\"dragstart\", function (e, dd) {\n if (!getEditorLock().commitCurrentEdit()) {\n return false;\n }\n pageX = e.pageX;\n $(this).parent().addClass(\"bk-slick-header-column-active\");\n var shrinkLeewayOnRight = null, stretchLeewayOnRight = null;\n // lock each column's width option to current width\n columnElements.each(function (i, e) {\n columns[i].previousWidth = $(e).outerWidth();\n });\n if (options.forceFitColumns) {\n shrinkLeewayOnRight = 0;\n stretchLeewayOnRight = 0;\n // colums on right affect maxPageX/minPageX\n for (j = i + 1; j < columnElements.length; j++) {\n c = columns[j];\n if (c.resizable) {\n if (stretchLeewayOnRight !== null) {\n if (c.maxWidth) {\n stretchLeewayOnRight += c.maxWidth - c.previousWidth;\n } else {\n stretchLeewayOnRight = null;\n }\n }\n shrinkLeewayOnRight += c.previousWidth - Math.max(c.minWidth || 0, absoluteColumnMinWidth);\n }\n }\n }\n var shrinkLeewayOnLeft = 0, stretchLeewayOnLeft = 0;\n for (j = 0; j <= i; j++) {\n // columns on left only affect minPageX\n c = columns[j];\n if (c.resizable) {\n if (stretchLeewayOnLeft !== null) {\n if (c.maxWidth) {\n stretchLeewayOnLeft += c.maxWidth - c.previousWidth;\n } else {\n stretchLeewayOnLeft = null;\n }\n }\n shrinkLeewayOnLeft += c.previousWidth - Math.max(c.minWidth || 0, absoluteColumnMinWidth);\n }\n }\n if (shrinkLeewayOnRight === null) {\n shrinkLeewayOnRight = 100000;\n }\n if (shrinkLeewayOnLeft === null) {\n shrinkLeewayOnLeft = 100000;\n }\n if (stretchLeewayOnRight === null) {\n stretchLeewayOnRight = 100000;\n }\n if (stretchLeewayOnLeft === null) {\n stretchLeewayOnLeft = 100000;\n }\n maxPageX = pageX + Math.min(shrinkLeewayOnRight, stretchLeewayOnLeft);\n minPageX = pageX - Math.min(shrinkLeewayOnLeft, stretchLeewayOnRight);\n })\n .bind(\"drag\", function (e, dd) {\n var actualMinWidth, d = Math.min(maxPageX, Math.max(minPageX, e.pageX)) - pageX, x;\n if (d < 0) { // shrink column\n x = d;\n for (j = i; j >= 0; j--) {\n c = columns[j];\n if (c.resizable) {\n actualMinWidth = Math.max(c.minWidth || 0, absoluteColumnMinWidth);\n if (x && c.previousWidth + x < actualMinWidth) {\n x += c.previousWidth - actualMinWidth;\n c.width = actualMinWidth;\n } else {\n c.width = c.previousWidth + x;\n x = 0;\n }\n }\n }\n\n if (options.forceFitColumns) {\n x = -d;\n for (j = i + 1; j < columnElements.length; j++) {\n c = columns[j];\n if (c.resizable) {\n if (x && c.maxWidth && (c.maxWidth - c.previousWidth < x)) {\n x -= c.maxWidth - c.previousWidth;\n c.width = c.maxWidth;\n } else {\n c.width = c.previousWidth + x;\n x = 0;\n }\n }\n }\n }\n } else { // stretch column\n x = d;\n for (j = i; j >= 0; j--) {\n c = columns[j];\n if (c.resizable) {\n if (x && c.maxWidth && (c.maxWidth - c.previousWidth < x)) {\n x -= c.maxWidth - c.previousWidth;\n c.width = c.maxWidth;\n } else {\n c.width = c.previousWidth + x;\n x = 0;\n }\n }\n }\n\n if (options.forceFitColumns) {\n x = -d;\n for (j = i + 1; j < columnElements.length; j++) {\n c = columns[j];\n if (c.resizable) {\n actualMinWidth = Math.max(c.minWidth || 0, absoluteColumnMinWidth);\n if (x && c.previousWidth + x < actualMinWidth) {\n x += c.previousWidth - actualMinWidth;\n c.width = actualMinWidth;\n } else {\n c.width = c.previousWidth + x;\n x = 0;\n }\n }\n }\n }\n }\n applyColumnHeaderWidths();\n if (options.syncColumnCellResize) {\n applyColumnWidths();\n }\n })\n .bind(\"dragend\", function (e, dd) {\n var newWidth;\n $(this).parent().removeClass(\"bk-slick-header-column-active\");\n for (j = 0; j < columnElements.length; j++) {\n c = columns[j];\n newWidth = $(columnElements[j]).outerWidth();\n\n if (c.previousWidth !== newWidth && c.rerenderOnResize) {\n invalidateAllRows();\n }\n }\n updateCanvasWidth(true);\n render();\n trigger(self.onColumnsResized, {});\n });\n });\n }\n\n function getVBoxDelta($el) {\n var p = [\"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\"];\n var delta = 0;\n $.each(p, function (n, val) {\n delta += parseFloat($el.css(val)) || 0;\n });\n return delta;\n }\n\n function measureCellPaddingAndBorder() {\n var el;\n var h = [\"borderLeftWidth\", \"borderRightWidth\", \"paddingLeft\", \"paddingRight\"];\n var v = [\"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\"];\n\n el = $(\"<div class='bk-ui-state-default bk-slick-header-column' style='visibility:hidden'>-</div>\").appendTo($headers);\n headerColumnWidthDiff = headerColumnHeightDiff = 0;\n if (el.css(\"box-sizing\") != \"border-box\" && el.css(\"-moz-box-sizing\") != \"border-box\" && el.css(\"-webkit-box-sizing\") != \"border-box\") {\n $.each(h, function (n, val) {\n headerColumnWidthDiff += parseFloat(el.css(val)) || 0;\n });\n $.each(v, function (n, val) {\n headerColumnHeightDiff += parseFloat(el.css(val)) || 0;\n });\n }\n el.remove();\n\n var r = $(\"<div class='bk-slick-row' />\").appendTo($canvas);\n el = $(\"<div class='bk-slick-cell' id='' style='visibility:hidden'>-</div>\").appendTo(r);\n cellWidthDiff = cellHeightDiff = 0;\n if (el.css(\"box-sizing\") != \"border-box\" && el.css(\"-moz-box-sizing\") != \"border-box\" && el.css(\"-webkit-box-sizing\") != \"border-box\") {\n $.each(h, function (n, val) {\n cellWidthDiff += parseFloat(el.css(val)) || 0;\n });\n $.each(v, function (n, val) {\n cellHeightDiff += parseFloat(el.css(val)) || 0;\n });\n }\n r.remove();\n\n absoluteColumnMinWidth = Math.max(headerColumnWidthDiff, cellWidthDiff);\n }\n\n function createCssRules() {\n $style = $(\"<style type='text/css' rel='stylesheet' />\").appendTo($(\"head\"));\n var rowHeight = (options.rowHeight - cellHeightDiff);\n var rules = [\n \".\" + uid + \" .bk-slick-header-column { left: 1000px; }\",\n \".\" + uid + \" .bk-slick-top-panel { height:\" + options.topPanelHeight + \"px; }\",\n \".\" + uid + \" .bk-slick-headerrow-columns { height:\" + options.headerRowHeight + \"px; }\",\n \".\" + uid + \" .bk-slick-cell { height:\" + rowHeight + \"px; }\",\n \".\" + uid + \" .bk-slick-row { height:\" + options.rowHeight + \"px; }\"\n ];\n\n for (var i = 0; i < columns.length; i++) {\n rules.push(\".\" + uid + \" .l\" + i + \" { }\");\n rules.push(\".\" + uid + \" .r\" + i + \" { }\");\n }\n\n if ($style[0].styleSheet) { // IE\n $style[0].styleSheet.cssText = rules.join(\" \");\n } else {\n $style[0].appendChild(document.createTextNode(rules.join(\" \")));\n }\n }\n\n function getColumnCssRules(idx) {\n if (!stylesheet) {\n var sheets = document.styleSheets;\n for (var i = 0; i < sheets.length; i++) {\n if ((sheets[i].ownerNode || sheets[i].owningElement) == $style[0]) {\n stylesheet = sheets[i];\n break;\n }\n }\n\n if (!stylesheet) {\n throw new Error(\"Cannot find stylesheet.\");\n }\n\n // find and cache column CSS rules\n columnCssRulesL = [];\n columnCssRulesR = [];\n var cssRules = (stylesheet.cssRules || stylesheet.rules);\n var matches, columnIdx;\n for (var i = 0; i < cssRules.length; i++) {\n var selector = cssRules[i].selectorText;\n if (matches = /\\.l\\d+/.exec(selector)) {\n columnIdx = parseInt(matches[0].substr(2, matches[0].length - 2), 10);\n columnCssRulesL[columnIdx] = cssRules[i];\n } else if (matches = /\\.r\\d+/.exec(selector)) {\n columnIdx = parseInt(matches[0].substr(2, matches[0].length - 2), 10);\n columnCssRulesR[columnIdx] = cssRules[i];\n }\n }\n }\n\n return {\n \"left\": columnCssRulesL[idx],\n \"right\": columnCssRulesR[idx]\n };\n }\n\n function removeCssRules() {\n $style.remove();\n stylesheet = null;\n }\n\n function destroy() {\n getEditorLock().cancelCurrentEdit();\n\n trigger(self.onBeforeDestroy, {});\n\n var i = plugins.length;\n while(i--) {\n unregisterPlugin(plugins[i]);\n }\n\n if (options.enableColumnReorder) {\n $headers.filter(\":ui-sortable\").sortable(\"destroy\");\n }\n\n unbindAncestorScrollEvents();\n $container.unbind(\".bk-slickgrid\");\n removeCssRules();\n\n $canvas.unbind(\"draginit dragstart dragend drag\");\n $container.empty().removeClass(uid);\n }\n\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n // General\n\n function trigger(evt, args, e) {\n e = e || new Slick.EventData();\n args = args || {};\n args.grid = self;\n return evt.notify(args, e, self);\n }\n\n function getEditorLock() {\n return options.editorLock;\n }\n\n function getEditController() {\n return editController;\n }\n\n function getColumnIndex(id) {\n return columnsById[id];\n }\n\n function autosizeColumns() {\n var i, c,\n widths = [],\n shrinkLeeway = 0,\n total = 0,\n prevTotal,\n availWidth = viewportHasVScroll ? viewportW - scrollbarDimensions.width : viewportW;\n\n for (i = 0; i < columns.length; i++) {\n c = columns[i];\n widths.push(c.width);\n total += c.width;\n if (c.resizable) {\n shrinkLeeway += c.width - Math.max(c.minWidth, absoluteColumnMinWidth);\n }\n }\n\n // shrink\n prevTotal = total;\n while (total > availWidth && shrinkLeeway) {\n var shrinkProportion = (total - availWidth) / shrinkLeeway;\n for (i = 0; i < columns.length && total > availWidth; i++) {\n c = columns[i];\n var width = widths[i];\n if (!c.resizable || width <= c.minWidth || width <= absoluteColumnMinWidth) {\n continue;\n }\n var absMinWidth = Math.max(c.minWidth, absoluteColumnMinWidth);\n var shrinkSize = Math.floor(shrinkProportion * (width - absMinWidth)) || 1;\n shrinkSize = Math.min(shrinkSize, width - absMinWidth);\n total -= shrinkSize;\n shrinkLeeway -= shrinkSize;\n widths[i] -= shrinkSize;\n }\n if (prevTotal <= total) { // avoid infinite loop\n break;\n }\n prevTotal = total;\n }\n\n // grow\n prevTotal = total;\n while (total < availWidth) {\n var growProportion = availWidth / total;\n for (i = 0; i < columns.length && total < availWidth; i++) {\n c = columns[i];\n var currentWidth = widths[i];\n var growSize;\n\n if (!c.resizable || c.maxWidth <= currentWidth) {\n growSize = 0;\n } else {\n growSize = Math.min(Math.floor(growProportion * currentWidth) - currentWidth, (c.maxWidth - currentWidth) || 1000000) || 1;\n }\n total += growSize;\n widths[i] += growSize;\n }\n if (prevTotal >= total) { // avoid infinite loop\n break;\n }\n prevTotal = total;\n }\n\n var reRender = false;\n for (i = 0; i < columns.length; i++) {\n if (columns[i].rerenderOnResize && columns[i].width != widths[i]) {\n reRender = true;\n }\n columns[i].width = widths[i];\n }\n\n applyColumnHeaderWidths();\n updateCanvasWidth(true);\n if (reRender) {\n invalidateAllRows();\n render();\n }\n }\n\n function applyColumnHeaderWidths() {\n if (!initialized) { return; }\n var h;\n for (var i = 0, headers = $headers.children(), ii = headers.length; i < ii; i++) {\n h = $(headers[i]);\n if (h.width() !== columns[i].width - headerColumnWidthDiff) {\n h.width(columns[i].width - headerColumnWidthDiff);\n }\n }\n\n updateColumnCaches();\n }\n\n function applyColumnWidths() {\n var x = 0, w, rule;\n for (var i = 0; i < columns.length; i++) {\n w = columns[i].width;\n\n rule = getColumnCssRules(i);\n rule.left.style.left = x + \"px\";\n rule.right.style.right = (canvasWidth - x - w) + \"px\";\n\n x += columns[i].width;\n }\n }\n\n function setSortColumn(columnId, ascending) {\n setSortColumns([{ columnId: columnId, sortAsc: ascending}]);\n }\n\n function setSortColumns(cols) {\n sortColumns = cols;\n\n var headerColumnEls = $headers.children();\n headerColumnEls\n .removeClass(\"bk-slick-header-column-sorted\")\n .find(\".bk-slick-sort-indicator\")\n .removeClass(\"bk-slick-sort-indicator-asc bk-slick-sort-indicator-desc\");\n\n $.each(sortColumns, function(i, col) {\n if (col.sortAsc == null) {\n col.sortAsc = true;\n }\n var columnIndex = getColumnIndex(col.columnId);\n if (columnIndex != null) {\n headerColumnEls.eq(columnIndex)\n .addClass(\"bk-slick-header-column-sorted\")\n .find(\".bk-slick-sort-indicator\")\n .addClass(col.sortAsc ? \"bk-slick-sort-indicator-asc\" : \"bk-slick-sort-indicator-desc\");\n }\n });\n }\n\n function getSortColumns() {\n return sortColumns;\n }\n\n function handleSelectedRangesChanged(e, ranges) {\n selectedRows = [];\n var hash = {};\n for (var i = 0; i < ranges.length; i++) {\n for (var j = ranges[i].fromRow; j <= ranges[i].toRow; j++) {\n if (!hash[j]) { // prevent duplicates\n selectedRows.push(j);\n hash[j] = {};\n }\n for (var k = ranges[i].fromCell; k <= ranges[i].toCell; k++) {\n if (canCellBeSelected(j, k)) {\n hash[j][columns[k].id] = options.selectedCellCssClass;\n }\n }\n }\n }\n\n setCellCssStyles(options.selectedCellCssClass, hash);\n\n trigger(self.onSelectedRowsChanged, {rows: getSelectedRows()}, e);\n }\n\n function getColumns() {\n return columns;\n }\n\n function updateColumnCaches() {\n // Pre-calculate cell boundaries.\n columnPosLeft = [];\n columnPosRight = [];\n var x = 0;\n for (var i = 0, ii = columns.length; i < ii; i++) {\n columnPosLeft[i] = x;\n columnPosRight[i] = x + columns[i].width;\n x += columns[i].width;\n }\n }\n\n function setColumns(columnDefinitions) {\n columns = columnDefinitions;\n\n columnsById = {};\n for (var i = 0; i < columns.length; i++) {\n var m = columns[i] = $.extend({}, columnDefaults, columns[i]);\n columnsById[m.id] = i;\n if (m.minWidth && m.width < m.minWidth) {\n m.width = m.minWidth;\n }\n if (m.maxWidth && m.width > m.maxWidth) {\n m.width = m.maxWidth;\n }\n }\n\n updateColumnCaches();\n\n if (initialized) {\n invalidateAllRows();\n createColumnHeaders();\n removeCssRules();\n createCssRules();\n resizeCanvas();\n applyColumnWidths();\n handleScroll();\n }\n }\n\n function getOptions() {\n return options;\n }\n\n function setOptions(args) {\n if (!getEditorLock().commitCurrentEdit()) {\n return;\n }\n\n makeActiveCellNormal();\n\n if (options.enableAddRow !== args.enableAddRow) {\n invalidateRow(getDataLength());\n }\n\n options = $.extend(options, args);\n validateAndEnforceOptions();\n\n $viewport.css(\"overflow-y\", options.autoHeight ? \"hidden\" : \"auto\");\n render();\n }\n\n function validateAndEnforceOptions() {\n if (options.autoHeight) {\n options.leaveSpaceForNewRows = false;\n }\n }\n\n function setData(newData, scrollToTop) {\n data = newData;\n invalidateAllRows();\n updateRowCount();\n if (scrollToTop) {\n scrollTo(0);\n }\n }\n\n function getData() {\n return data;\n }\n\n function getDataLength() {\n if (data.getLength) {\n return data.getLength();\n } else {\n return data.length;\n }\n }\n\n function getDataLengthIncludingAddNew() {\n return getDataLength() + (options.enableAddRow ? 1 : 0);\n }\n\n function getDataItem(i) {\n if (data.getItem) {\n return data.getItem(i);\n } else {\n return data[i];\n }\n }\n\n function getTopPanel() {\n return $topPanel[0];\n }\n\n function setTopPanelVisibility(visible) {\n if (options.showTopPanel != visible) {\n options.showTopPanel = visible;\n if (visible) {\n $topPanelScroller.slideDown(\"fast\", resizeCanvas);\n } else {\n $topPanelScroller.slideUp(\"fast\", resizeCanvas);\n }\n }\n }\n\n function setHeaderRowVisibility(visible) {\n if (options.showHeaderRow != visible) {\n options.showHeaderRow = visible;\n if (visible) {\n $headerRowScroller.slideDown(\"fast\", resizeCanvas);\n } else {\n $headerRowScroller.slideUp(\"fast\", resizeCanvas);\n }\n }\n }\n\n function getContainerNode() {\n return $container.get(0);\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n // Rendering / Scrolling\n\n function getRowTop(row) {\n return options.rowHeight * row - offset;\n }\n\n function getRowFromPosition(y) {\n return Math.floor((y + offset) / options.rowHeight);\n }\n\n function scrollTo(y) {\n y = Math.max(y, 0);\n y = Math.min(y, th - viewportH + (viewportHasHScroll ? scrollbarDimensions.height : 0));\n\n var oldOffset = offset;\n\n page = Math.min(n - 1, Math.floor(y / ph));\n offset = Math.round(page * cj);\n var newScrollTop = y - offset;\n\n if (offset != oldOffset) {\n var range = getVisibleRange(newScrollTop);\n cleanupRows(range);\n updateRowPositions();\n }\n\n if (prevScrollTop != newScrollTop) {\n vScrollDir = (prevScrollTop + oldOffset < newScrollTop + offset) ? 1 : -1;\n $viewport[0].scrollTop = (lastRenderedScrollTop = scrollTop = prevScrollTop = newScrollTop);\n\n trigger(self.onViewportChanged, {});\n }\n }\n\n function defaultFormatter(row, cell, value, columnDef, dataContext) {\n if (value == null) {\n return \"\";\n } else {\n return (value + \"\").replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\");\n }\n }\n\n function getFormatter(row, column) {\n var rowMetadata = data.getItemMetadata && data.getItemMetadata(row);\n\n // look up by id, then index\n var columnOverrides = rowMetadata &&\n rowMetadata.columns &&\n (rowMetadata.columns[column.id] || rowMetadata.columns[getColumnIndex(column.id)]);\n\n var formatter =\n (columnOverrides && columnOverrides.formatter) ||\n (rowMetadata && rowMetadata.formatter) ||\n column.formatter ||\n (options.formatterFactory && options.formatterFactory.getFormatter(column)) ||\n options.defaultFormatter;\n\n if (formatter.format !== undefined) {\n var model = formatter;\n var format = function foo(row, cell, value, columnDef, dataContext) {\n return model.format(row, cell, value, columnDef, dataContext);\n }\n formatter = format\n }\n\n return formatter;\n }\n\n function getEditor(row, cell) {\n var editor;\n var column = columns[cell];\n var rowMetadata = data.getItemMetadata && data.getItemMetadata(row);\n var columnMetadata = rowMetadata && rowMetadata.columns;\n\n if (columnMetadata && columnMetadata[column.id] && columnMetadata[column.id].editor !== undefined) {\n editor = columnMetadata[column.id].editor;\n } else if (columnMetadata && columnMetadata[cell] && columnMetadata[cell].editor !== undefined) {\n editor = columnMetadata[cell].editor;\n } else {\n editor = column.editor || (options.editorFactory && options.editorFactory.getEditor(column));\n }\n\n if (editor.default_view !== undefined) {\n editor = editor.default_view;\n }\n\n return editor;\n }\n\n function getDataItemValueForColumn(item, columnDef) {\n if (options.dataItemColumnValueExtractor) {\n return options.dataItemColumnValueExtractor(item, columnDef);\n }\n return item[columnDef.field];\n }\n\n function appendRowHtml(stringArray, row, range, dataLength) {\n var d = getDataItem(row);\n var dataLoading = row < dataLength && !d;\n var rowCss = \"bk-slick-row\" +\n (dataLoading ? \" loading\" : \"\") +\n (row === activeRow ? \" active\" : \"\") +\n (row % 2 == 1 ? \" odd\" : \" even\");\n\n if (!d) {\n rowCss += \" \" + options.addNewRowCssClass;\n }\n\n var metadata = data.getItemMetadata && data.getItemMetadata(row);\n\n if (metadata && metadata.cssClasses) {\n rowCss += \" \" + metadata.cssClasses;\n }\n\n stringArray.push(\"<div class='bk-ui-widget-content \" + rowCss + \"' style='top:\" + getRowTop(row) + \"px'>\");\n\n var colspan, m;\n for (var i = 0, ii = columns.length; i < ii; i++) {\n m = columns[i];\n colspan = 1;\n if (metadata && metadata.columns) {\n var columnData = metadata.columns[m.id] || metadata.columns[i];\n colspan = (columnData && columnData.colspan) || 1;\n if (colspan === \"*\") {\n colspan = ii - i;\n }\n }\n\n // Do not render cells outside of the viewport.\n if (columnPosRight[Math.min(ii - 1, i + colspan - 1)] > range.leftPx) {\n if (columnPosLeft[i] > range.rightPx) {\n // All columns to the right are outside the range.\n break;\n }\n\n appendCellHtml(stringArray, row, i, colspan, d);\n }\n\n if (colspan > 1) {\n i += (colspan - 1);\n }\n }\n\n stringArray.push(\"</div>\");\n }\n\n function appendCellHtml(stringArray, row, cell, colspan, item) {\n var m = columns[cell];\n var cellCss = \"bk-slick-cell l\" + cell + \" r\" + Math.min(columns.length - 1, cell + colspan - 1) +\n (m.cssClass ? \" \" + m.cssClass : \"\");\n if (row === activeRow && cell === activeCell) {\n cellCss += (\" active\");\n }\n\n // TODO: merge them together in the setter\n for (var key in cellCssClasses) {\n if (cellCssClasses[key][row] && cellCssClasses[key][row][m.id]) {\n cellCss += (\" \" + cellCssClasses[key][row][m.id]);\n }\n }\n\n stringArray.push(\"<div class='\" + cellCss + \"'>\");\n\n // if there is a corresponding row (if not, this is the Add New row or this data hasn't been loaded yet)\n if (item) {\n var value = getDataItemValueForColumn(item, m);\n stringArray.push(getFormatter(row, m)(row, cell, value, m, item));\n }\n\n stringArray.push(\"</div>\");\n\n rowsCache[row].cellRenderQueue.push(cell);\n rowsCache[row].cellColSpans[cell] = colspan;\n }\n\n\n function cleanupRows(rangeToKeep) {\n for (var i in rowsCache) {\n if (((i = parseInt(i, 10)) !== activeRow) && (i < rangeToKeep.top || i > rangeToKeep.bottom)) {\n removeRowFromCache(i);\n }\n }\n }\n\n function invalidate() {\n updateRowCount();\n invalidateAllRows();\n render();\n }\n\n function invalidateAllRows() {\n if (currentEditor) {\n makeActiveCellNormal();\n }\n for (var row in rowsCache) {\n removeRowFromCache(row);\n }\n }\n\n function removeRowFromCache(row) {\n var cacheEntry = rowsCache[row];\n if (!cacheEntry) {\n return;\n }\n\n if (rowNodeFromLastMouseWheelEvent == cacheEntry.rowNode) {\n cacheEntry.rowNode.style.display = 'none';\n zombieRowNodeFromLastMouseWheelEvent = rowNodeFromLastMouseWheelEvent;\n } else {\n $canvas[0].removeChild(cacheEntry.rowNode);\n }\n\n delete rowsCache[row];\n delete postProcessedRows[row];\n renderedRows--;\n counter_rows_removed++;\n }\n\n function invalidateRows(rows) {\n var i, rl;\n if (!rows || !rows.length) {\n return;\n }\n vScrollDir = 0;\n for (i = 0, rl = rows.length; i < rl; i++) {\n if (currentEditor && activeRow === rows[i]) {\n makeActiveCellNormal();\n }\n if (rowsCache[rows[i]]) {\n removeRowFromCache(rows[i]);\n }\n }\n }\n\n function invalidateRow(row) {\n invalidateRows([row]);\n }\n\n function updateCell(row, cell) {\n var cellNode = getCellNode(row, cell);\n if (!cellNode) {\n return;\n }\n\n var m = columns[cell], d = getDataItem(row);\n if (currentEditor && activeRow === row && activeCell === cell) {\n currentEditor.loadValue(d);\n } else {\n cellNode.innerHTML = d ? getFormatter(row, m)(row, cell, getDataItemValueForColumn(d, m), m, d) : \"\";\n invalidatePostProcessingResults(row);\n }\n }\n\n function updateRow(row) {\n var cacheEntry = rowsCache[row];\n if (!cacheEntry) {\n return;\n }\n\n ensureCellNodesInRowsCache(row);\n\n var d = getDataItem(row);\n\n for (var columnIdx in cacheEntry.cellNodesByColumnIdx) {\n if (!cacheEntry.cellNodesByColumnIdx.hasOwnProperty(columnIdx)) {\n continue;\n }\n\n columnIdx = columnIdx | 0;\n var m = columns[columnIdx],\n node = cacheEntry.cellNodesByColumnIdx[columnIdx];\n\n if (row === activeRow && columnIdx === activeCell && currentEditor) {\n currentEditor.loadValue(d);\n } else if (d) {\n node.innerHTML = getFormatter(row, m)(row, columnIdx, getDataItemValueForColumn(d, m), m, d);\n } else {\n node.innerHTML = \"\";\n }\n }\n\n invalidatePostProcessingResults(row);\n }\n\n function getViewportHeight() {\n return parseFloat($.css($container[0], \"height\", true)) -\n parseFloat($.css($container[0], \"paddingTop\", true)) -\n parseFloat($.css($container[0], \"paddingBottom\", true)) -\n parseFloat($.css($headerScroller[0], \"height\")) - getVBoxDelta($headerScroller) -\n (options.showTopPanel ? options.topPanelHeight + getVBoxDelta($topPanelScroller) : 0) -\n (options.showHeaderRow ? options.headerRowHeight + getVBoxDelta($headerRowScroller) : 0);\n }\n\n function resizeCanvas() {\n if (!initialized) { return; }\n if (options.autoHeight) {\n viewportH = options.rowHeight * getDataLengthIncludingAddNew();\n } else {\n viewportH = getViewportHeight();\n }\n\n numVisibleRows = Math.ceil(viewportH / options.rowHeight);\n viewportW = parseFloat($.css($container[0], \"width\", true));\n if (!options.autoHeight) {\n $viewport.height(viewportH);\n }\n\n if (options.forceFitColumns) {\n autosizeColumns();\n }\n\n updateRowCount();\n handleScroll();\n // Since the width has changed, force the render() to reevaluate virtually rendered cells.\n lastRenderedScrollLeft = -1;\n render();\n }\n\n function updateRowCount() {\n if (!initialized) { return; }\n\n var dataLengthIncludingAddNew = getDataLengthIncludingAddNew();\n var numberOfRows = dataLengthIncludingAddNew +\n (options.leaveSpaceForNewRows ? numVisibleRows - 1 : 0);\n\n var oldViewportHasVScroll = viewportHasVScroll;\n // with autoHeight, we do not need to accommodate the vertical scroll bar\n viewportHasVScroll = !options.autoHeight && (numberOfRows * options.rowHeight > viewportH);\n\n makeActiveCellNormal();\n\n // remove the rows that are now outside of the data range\n // this helps avoid redundant calls to .removeRow() when the size of the data decreased by thousands of rows\n var l = dataLengthIncludingAddNew - 1;\n for (var i in rowsCache) {\n if (i >= l) {\n removeRowFromCache(i);\n }\n }\n\n if (activeCellNode && activeRow > l) {\n resetActiveCell();\n }\n\n var oldH = h;\n th = Math.max(options.rowHeight * numberOfRows, viewportH - scrollbarDimensions.height);\n if (th < maxSupportedCssHeight) {\n // just one page\n h = ph = th;\n n = 1;\n cj = 0;\n } else {\n // break into pages\n h = maxSupportedCssHeight;\n ph = h / 100;\n n = Math.floor(th / ph);\n cj = (th - h) / (n - 1);\n }\n\n if (h !== oldH) {\n $canvas.css(\"height\", h);\n scrollTop = $viewport[0].scrollTop;\n }\n\n var oldScrollTopInRange = (scrollTop + offset <= th - viewportH);\n\n if (th == 0 || scrollTop == 0) {\n page = offset = 0;\n } else if (oldScrollTopInRange) {\n // maintain virtual position\n scrollTo(scrollTop + offset);\n } else {\n // scroll to bottom\n scrollTo(th - viewportH);\n }\n\n if (h != oldH && options.autoHeight) {\n resizeCanvas();\n }\n\n if (options.forceFitColumns && oldViewportHasVScroll != viewportHasVScroll) {\n autosizeColumns();\n }\n updateCanvasWidth(false);\n }\n\n function getVisibleRange(viewportTop, viewportLeft) {\n if (viewportTop == null) {\n viewportTop = scrollTop;\n }\n if (viewportLeft == null) {\n viewportLeft = scrollLeft;\n }\n\n return {\n top: getRowFromPosition(viewportTop),\n bottom: getRowFromPosition(viewportTop + viewportH) + 1,\n leftPx: viewportLeft,\n rightPx: viewportLeft + viewportW\n };\n }\n\n function getRenderedRange(viewportTop, viewportLeft) {\n var range = getVisibleRange(viewportTop, viewportLeft);\n var buffer = Math.round(viewportH / options.rowHeight);\n var minBuffer = 3;\n\n if (vScrollDir == -1) {\n range.top -= buffer;\n range.bottom += minBuffer;\n } else if (vScrollDir == 1) {\n range.top -= minBuffer;\n range.bottom += buffer;\n } else {\n range.top -= minBuffer;\n range.bottom += minBuffer;\n }\n\n range.top = Math.max(0, range.top);\n range.bottom = Math.min(getDataLengthIncludingAddNew() - 1, range.bottom);\n\n range.leftPx -= viewportW;\n range.rightPx += viewportW;\n\n range.leftPx = Math.max(0, range.leftPx);\n range.rightPx = Math.min(canvasWidth, range.rightPx);\n\n return range;\n }\n\n function ensureCellNodesInRowsCache(row) {\n var cacheEntry = rowsCache[row];\n if (cacheEntry) {\n if (cacheEntry.cellRenderQueue.length) {\n var lastChild = cacheEntry.rowNode.lastChild;\n while (cacheEntry.cellRenderQueue.length) {\n var columnIdx = cacheEntry.cellRenderQueue.pop();\n cacheEntry.cellNodesByColumnIdx[columnIdx] = lastChild;\n lastChild = lastChild.previousSibling;\n }\n }\n }\n }\n\n function cleanUpCells(range, row) {\n var totalCellsRemoved = 0;\n var cacheEntry = rowsCache[row];\n\n // Remove cells outside the range.\n var cellsToRemove = [];\n for (var i in cacheEntry.cellNodesByColumnIdx) {\n // I really hate it when people mess with Array.prototype.\n if (!cacheEntry.cellNodesByColumnIdx.hasOwnProperty(i)) {\n continue;\n }\n\n // This is a string, so it needs to be cast back to a number.\n i = i | 0;\n\n var colspan = cacheEntry.cellColSpans[i];\n if (columnPosLeft[i] > range.rightPx ||\n columnPosRight[Math.min(columns.length - 1, i + colspan - 1)] < range.leftPx) {\n if (!(row == activeRow && i == activeCell)) {\n cellsToRemove.push(i);\n }\n }\n }\n\n var cellToRemove;\n while ((cellToRemove = cellsToRemove.pop()) != null) {\n cacheEntry.rowNode.removeChild(cacheEntry.cellNodesByColumnIdx[cellToRemove]);\n delete cacheEntry.cellColSpans[cellToRemove];\n delete cacheEntry.cellNodesByColumnIdx[cellToRemove];\n if (postProcessedRows[row]) {\n delete postProcessedRows[row][cellToRemove];\n }\n totalCellsRemoved++;\n }\n }\n\n function cleanUpAndRenderCells(range) {\n var cacheEntry;\n var stringArray = [];\n var processedRows = [];\n var cellsAdded;\n var totalCellsAdded = 0;\n var colspan;\n\n for (var row = range.top, btm = range.bottom; row <= btm; row++) {\n cacheEntry = rowsCache[row];\n if (!cacheEntry) {\n continue;\n }\n\n // cellRenderQueue populated in renderRows() needs to be cleared first\n ensureCellNodesInRowsCache(row);\n\n cleanUpCells(range, row);\n\n // Render missing cells.\n cellsAdded = 0;\n\n var metadata = data.getItemMetadata && data.getItemMetadata(row);\n metadata = metadata && metadata.columns;\n\n var d = getDataItem(row);\n\n // TODO: shorten this loop (index? heuristics? binary search?)\n for (var i = 0, ii = columns.length; i < ii; i++) {\n // Cells to the right are outside the range.\n if (columnPosLeft[i] > range.rightPx) {\n break;\n }\n\n // Already rendered.\n if ((colspan = cacheEntry.cellColSpans[i]) != null) {\n i += (colspan > 1 ? colspan - 1 : 0);\n continue;\n }\n\n colspan = 1;\n if (metadata) {\n var columnData = metadata[columns[i].id] || metadata[i];\n colspan = (columnData && columnData.colspan) || 1;\n if (colspan === \"*\") {\n colspan = ii - i;\n }\n }\n\n if (columnPosRight[Math.min(ii - 1, i + colspan - 1)] > range.leftPx) {\n appendCellHtml(stringArray, row, i, colspan, d);\n cellsAdded++;\n }\n\n i += (colspan > 1 ? colspan - 1 : 0);\n }\n\n if (cellsAdded) {\n totalCellsAdded += cellsAdded;\n processedRows.push(row);\n }\n }\n\n if (!stringArray.length) {\n return;\n }\n\n var x = document.createElement(\"div\");\n x.innerHTML = stringArray.join(\"\");\n\n var processedRow;\n var node;\n while ((processedRow = processedRows.pop()) != null) {\n cacheEntry = rowsCache[processedRow];\n var columnIdx;\n while ((columnIdx = cacheEntry.cellRenderQueue.pop()) != null) {\n node = x.lastChild;\n cacheEntry.rowNode.appendChild(node);\n cacheEntry.cellNodesByColumnIdx[columnIdx] = node;\n }\n }\n }\n\n function renderRows(range) {\n var parentNode = $canvas[0],\n stringArray = [],\n rows = [],\n needToReselectCell = false,\n dataLength = getDataLength();\n\n for (var i = range.top, ii = range.bottom; i <= ii; i++) {\n if (rowsCache[i]) {\n continue;\n }\n renderedRows++;\n rows.push(i);\n\n // Create an entry right away so that appendRowHtml() can\n // start populatating it.\n rowsCache[i] = {\n \"rowNode\": null,\n\n // ColSpans of rendered cells (by column idx).\n // Can also be used for checking whether a cell has been rendered.\n \"cellColSpans\": [],\n\n // Cell nodes (by column idx). Lazy-populated by ensureCellNodesInRowsCache().\n \"cellNodesByColumnIdx\": [],\n\n // Column indices of cell nodes that have been rendered, but not yet indexed in\n // cellNodesByColumnIdx. These are in the same order as cell nodes added at the\n // end of the row.\n \"cellRenderQueue\": []\n };\n\n appendRowHtml(stringArray, i, range, dataLength);\n if (activeCellNode && activeRow === i) {\n needToReselectCell = true;\n }\n counter_rows_rendered++;\n }\n\n if (!rows.length) { return; }\n\n var x = document.createElement(\"div\");\n x.innerHTML = stringArray.join(\"\");\n\n for (var i = 0, ii = rows.length; i < ii; i++) {\n rowsCache[rows[i]].rowNode = parentNode.appendChild(x.firstChild);\n }\n\n if (needToReselectCell) {\n activeCellNode = getCellNode(activeRow, activeCell);\n }\n }\n\n function startPostProcessing() {\n if (!options.enableAsyncPostRender) {\n return;\n }\n clearTimeout(h_postrender);\n h_postrender = setTimeout(asyncPostProcessRows, options.asyncPostRenderDelay);\n }\n\n function invalidatePostProcessingResults(row) {\n delete postProcessedRows[row];\n postProcessFromRow = Math.min(postProcessFromRow, row);\n postProcessToRow = Math.max(postProcessToRow, row);\n startPostProcessing();\n }\n\n function updateRowPositions() {\n for (var row in rowsCache) {\n rowsCache[row].rowNode.style.top = getRowTop(row) + \"px\";\n }\n }\n\n function render() {\n if (!initialized) { return; }\n var visible = getVisibleRange();\n var rendered = getRenderedRange();\n\n // remove rows no longer in the viewport\n cleanupRows(rendered);\n\n // add new rows & missing cells in existing rows\n if (lastRenderedScrollLeft != scrollLeft) {\n cleanUpAndRenderCells(rendered);\n }\n\n // render missing rows\n renderRows(rendered);\n\n postProcessFromRow = visible.top;\n postProcessToRow = Math.min(getDataLengthIncludingAddNew() - 1, visible.bottom);\n startPostProcessing();\n\n lastRenderedScrollTop = scrollTop;\n lastRenderedScrollLeft = scrollLeft;\n h_render = null;\n }\n\n function handleHeaderRowScroll() {\n var scrollLeft = $headerRowScroller[0].scrollLeft;\n if (scrollLeft != $viewport[0].scrollLeft) {\n $viewport[0].scrollLeft = scrollLeft;\n }\n }\n\n function handleScroll() {\n scrollTop = $viewport[0].scrollTop;\n scrollLeft = $viewport[0].scrollLeft;\n var vScrollDist = Math.abs(scrollTop - prevScrollTop);\n var hScrollDist = Math.abs(scrollLeft - prevScrollLeft);\n\n if (hScrollDist) {\n prevScrollLeft = scrollLeft;\n $headerScroller[0].scrollLeft = scrollLeft;\n $topPanelScroller[0].scrollLeft = scrollLeft;\n $headerRowScroller[0].scrollLeft = scrollLeft;\n }\n\n if (vScrollDist) {\n vScrollDir = prevScrollTop < scrollTop ? 1 : -1;\n prevScrollTop = scrollTop;\n\n // switch virtual pages if needed\n if (vScrollDist < viewportH) {\n scrollTo(scrollTop + offset);\n } else {\n var oldOffset = offset;\n if (h == viewportH) {\n page = 0;\n } else {\n page = Math.min(n - 1, Math.floor(scrollTop * ((th - viewportH) / (h - viewportH)) * (1 / ph)));\n }\n offset = Math.round(page * cj);\n if (oldOffset != offset) {\n invalidateAllRows();\n }\n }\n }\n\n if (hScrollDist || vScrollDist) {\n if (h_render) {\n clearTimeout(h_render);\n }\n\n if (Math.abs(lastRenderedScrollTop - scrollTop) > 20 ||\n Math.abs(lastRenderedScrollLeft - scrollLeft) > 20) {\n if (options.forceSyncScrolling || (\n Math.abs(lastRenderedScrollTop - scrollTop) < viewportH &&\n Math.abs(lastRenderedScrollLeft - scrollLeft) < viewportW)) {\n render();\n } else {\n h_render = setTimeout(render, 50);\n }\n\n trigger(self.onViewportChanged, {});\n }\n }\n\n trigger(self.onScroll, {scrollLeft: scrollLeft, scrollTop: scrollTop});\n }\n\n function asyncPostProcessRows() {\n var dataLength = getDataLength();\n while (postProcessFromRow <= postProcessToRow) {\n var row = (vScrollDir >= 0) ? postProcessFromRow++ : postProcessToRow--;\n var cacheEntry = rowsCache[row];\n if (!cacheEntry || row >= dataLength) {\n continue;\n }\n\n if (!postProcessedRows[row]) {\n postProcessedRows[row] = {};\n }\n\n ensureCellNodesInRowsCache(row);\n for (var columnIdx in cacheEntry.cellNodesByColumnIdx) {\n if (!cacheEntry.cellNodesByColumnIdx.hasOwnProperty(columnIdx)) {\n continue;\n }\n\n columnIdx = columnIdx | 0;\n\n var m = columns[columnIdx];\n if (m.asyncPostRender && !postProcessedRows[row][columnIdx]) {\n var node = cacheEntry.cellNodesByColumnIdx[columnIdx];\n if (node) {\n m.asyncPostRender(node, row, getDataItem(row), m);\n }\n postProcessedRows[row][columnIdx] = true;\n }\n }\n\n h_postrender = setTimeout(asyncPostProcessRows, options.asyncPostRenderDelay);\n return;\n }\n }\n\n function updateCellCssStylesOnRenderedRows(addedHash, removedHash) {\n var node, columnId, addedRowHash, removedRowHash;\n for (var row in rowsCache) {\n removedRowHash = removedHash && removedHash[row];\n addedRowHash = addedHash && addedHash[row];\n\n if (removedRowHash) {\n for (columnId in removedRowHash) {\n if (!addedRowHash || removedRowHash[columnId] != addedRowHash[columnId]) {\n node = getCellNode(row, getColumnIndex(columnId));\n if (node) {\n $(node).removeClass(removedRowHash[columnId]);\n }\n }\n }\n }\n\n if (addedRowHash) {\n for (columnId in addedRowHash) {\n if (!removedRowHash || removedRowHash[columnId] != addedRowHash[columnId]) {\n node = getCellNode(row, getColumnIndex(columnId));\n if (node) {\n $(node).addClass(addedRowHash[columnId]);\n }\n }\n }\n }\n }\n }\n\n function addCellCssStyles(key, hash) {\n if (cellCssClasses[key]) {\n throw \"addCellCssStyles: cell CSS hash with key '\" + key + \"' already exists.\";\n }\n\n cellCssClasses[key] = hash;\n updateCellCssStylesOnRenderedRows(hash, null);\n\n trigger(self.onCellCssStylesChanged, { \"key\": key, \"hash\": hash });\n }\n\n function removeCellCssStyles(key) {\n if (!cellCssClasses[key]) {\n return;\n }\n\n updateCellCssStylesOnRenderedRows(null, cellCssClasses[key]);\n delete cellCssClasses[key];\n\n trigger(self.onCellCssStylesChanged, { \"key\": key, \"hash\": null });\n }\n\n function setCellCssStyles(key, hash) {\n var prevHash = cellCssClasses[key];\n\n cellCssClasses[key] = hash;\n updateCellCssStylesOnRenderedRows(hash, prevHash);\n\n trigger(self.onCellCssStylesChanged, { \"key\": key, \"hash\": hash });\n }\n\n function getCellCssStyles(key) {\n return cellCssClasses[key];\n }\n\n function flashCell(row, cell, speed) {\n speed = speed || 100;\n if (rowsCache[row]) {\n var $cell = $(getCellNode(row, cell));\n\n var toggleCellClass = function foo(times) {\n if (!times) {\n return;\n }\n setTimeout(function () {\n $cell.queue(function () {\n $cell.toggleClass(options.cellFlashingCssClass).dequeue();\n toggleCellClass(times - 1);\n });\n },\n speed);\n }\n\n toggleCellClass(4);\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n // Interactivity\n\n function handleMouseWheel(e) {\n var rowNode = $(e.target).closest(\".bk-slick-row\")[0];\n if (rowNode != rowNodeFromLastMouseWheelEvent) {\n if (zombieRowNodeFromLastMouseWheelEvent && zombieRowNodeFromLastMouseWheelEvent != rowNode) {\n $canvas[0].removeChild(zombieRowNodeFromLastMouseWheelEvent);\n zombieRowNodeFromLastMouseWheelEvent = null;\n }\n rowNodeFromLastMouseWheelEvent = rowNode;\n }\n }\n\n function handleDragInit(e, dd) {\n var cell = getCellFromEvent(e);\n if (!cell || !cellExists(cell.row, cell.cell)) {\n return false;\n }\n\n var retval = trigger(self.onDragInit, dd, e);\n if (e.isImmediatePropagationStopped()) {\n return retval;\n }\n\n // if nobody claims to be handling drag'n'drop by stopping immediate propagation,\n // cancel out of it\n return false;\n }\n\n function handleDragStart(e, dd) {\n var cell = getCellFromEvent(e);\n if (!cell || !cellExists(cell.row, cell.cell)) {\n return false;\n }\n\n var retval = trigger(self.onDragStart, dd, e);\n if (e.isImmediatePropagationStopped()) {\n return retval;\n }\n\n return false;\n }\n\n function handleDrag(e, dd) {\n return trigger(self.onDrag, dd, e);\n }\n\n function handleDragEnd(e, dd) {\n trigger(self.onDragEnd, dd, e);\n }\n\n function handleKeyDown(e) {\n trigger(self.onKeyDown, {row: activeRow, cell: activeCell}, e);\n var handled = e.isImmediatePropagationStopped();\n\n if (!handled) {\n if (!e.shiftKey && !e.altKey && !e.ctrlKey) {\n if (e.which == 27) {\n if (!getEditorLock().isActive()) {\n return; // no editing mode to cancel, allow bubbling and default processing (exit without cancelling the event)\n }\n cancelEditAndSetFocus();\n } else if (e.which == 34) {\n navigatePageDown();\n handled = true;\n } else if (e.which == 33) {\n navigatePageUp();\n handled = true;\n } else if (e.which == 37) {\n handled = navigateLeft();\n } else if (e.which == 39) {\n handled = navigateRight();\n } else if (e.which == 38) {\n handled = navigateUp();\n } else if (e.which == 40) {\n handled = navigateDown();\n } else if (e.which == 9) {\n handled = navigateNext();\n } else if (e.which == 13) {\n if (options.editable) {\n if (currentEditor) {\n // adding new row\n if (activeRow === getDataLength()) {\n navigateDown();\n } else {\n commitEditAndSetFocus();\n }\n } else {\n if (getEditorLock().commitCurrentEdit()) {\n makeActiveCellEditable();\n }\n }\n }\n handled = true;\n }\n } else if (e.which == 9 && e.shiftKey && !e.ctrlKey && !e.altKey) {\n handled = navigatePrev();\n }\n }\n\n if (handled) {\n // the event has been handled so don't let parent element (bubbling/propagation) or browser (default) handle it\n e.stopPropagation();\n e.preventDefault();\n try {\n e.originalEvent.keyCode = 0; // prevent default behaviour for special keys in IE browsers (F3, F5, etc.)\n }\n // ignore exceptions - setting the original event's keycode throws access denied exception for \"Ctrl\"\n // (hitting control key only, nothing else), \"Shift\" (maybe others)\n catch (error) {\n }\n }\n }\n\n function handleClick(e) {\n if (!currentEditor) {\n // if this click resulted in some cell child node getting focus,\n // don't steal it back - keyboard events will still bubble up\n // IE9+ seems to default DIVs to tabIndex=0 instead of -1, so check for cell clicks directly.\n if (e.target != document.activeElement || $(e.target).hasClass(\"bk-slick-cell\")) {\n setFocus();\n }\n }\n\n var cell = getCellFromEvent(e);\n if (!cell || (currentEditor !== null && activeRow == cell.row && activeCell == cell.cell)) {\n return;\n }\n\n trigger(self.onClick, {row: cell.row, cell: cell.cell}, e);\n if (e.isImmediatePropagationStopped()) {\n return;\n }\n\n if ((activeCell != cell.cell || activeRow != cell.row) && canCellBeActive(cell.row, cell.cell)) {\n if (!getEditorLock().isActive() || getEditorLock().commitCurrentEdit()) {\n scrollRowIntoView(cell.row, false);\n setActiveCellInternal(getCellNode(cell.row, cell.cell));\n }\n }\n }\n\n function handleContextMenu(e) {\n var $cell = $(e.target).closest(\".bk-slick-cell\", $canvas);\n if ($cell.length === 0) {\n return;\n }\n\n // are we editing this cell?\n if (activeCellNode === $cell[0] && currentEditor !== null) {\n return;\n }\n\n trigger(self.onContextMenu, {}, e);\n }\n\n function handleDblClick(e) {\n var cell = getCellFromEvent(e);\n if (!cell || (currentEditor !== null && activeRow == cell.row && activeCell == cell.cell)) {\n return;\n }\n\n trigger(self.onDblClick, {row: cell.row, cell: cell.cell}, e);\n if (e.isImmediatePropagationStopped()) {\n return;\n }\n\n if (options.editable) {\n gotoCell(cell.row, cell.cell, true);\n }\n }\n\n function handleHeaderMouseEnter(e) {\n trigger(self.onHeaderMouseEnter, {\n \"column\": $(this).data(\"column\")\n }, e);\n }\n\n function handleHeaderMouseLeave(e) {\n trigger(self.onHeaderMouseLeave, {\n \"column\": $(this).data(\"column\")\n }, e);\n }\n\n function handleHeaderContextMenu(e) {\n var $header = $(e.target).closest(\".bk-slick-header-column\", \".bk-slick-header-columns\");\n var column = $header && $header.data(\"column\");\n trigger(self.onHeaderContextMenu, {column: column}, e);\n }\n\n function handleHeaderClick(e) {\n var $header = $(e.target).closest(\".bk-slick-header-column\", \".bk-slick-header-columns\");\n var column = $header && $header.data(\"column\");\n if (column) {\n trigger(self.onHeaderClick, {column: column}, e);\n }\n }\n\n function handleMouseEnter(e) {\n trigger(self.onMouseEnter, {}, e);\n }\n\n function handleMouseLeave(e) {\n trigger(self.onMouseLeave, {}, e);\n }\n\n function cellExists(row, cell) {\n return !(row < 0 || row >= getDataLength() || cell < 0 || cell >= columns.length);\n }\n\n function getCellFromPoint(x, y) {\n var row = getRowFromPosition(y);\n var cell = 0;\n\n var w = 0;\n for (var i = 0; i < columns.length && w < x; i++) {\n w += columns[i].width;\n cell++;\n }\n\n if (cell < 0) {\n cell = 0;\n }\n\n return {row: row, cell: cell - 1};\n }\n\n function getCellFromNode(cellNode) {\n // read column number from .l<columnNumber> CSS class\n var cls = /l\\d+/.exec(cellNode.className);\n if (!cls) {\n throw \"getCellFromNode: cannot get cell - \" + cellNode.className;\n }\n return parseInt(cls[0].substr(1, cls[0].length - 1), 10);\n }\n\n function getRowFromNode(rowNode) {\n for (var row in rowsCache) {\n if (rowsCache[row].rowNode === rowNode) {\n return row | 0;\n }\n }\n\n return null;\n }\n\n function getCellFromEvent(e) {\n var $cell = $(e.target).closest(\".bk-slick-cell\", $canvas);\n if (!$cell.length) {\n return null;\n }\n\n var row = getRowFromNode($cell[0].parentNode);\n var cell = getCellFromNode($cell[0]);\n\n if (row == null || cell == null) {\n return null;\n } else {\n return {\n \"row\": row,\n \"cell\": cell\n };\n }\n }\n\n function getCellNodeBox(row, cell) {\n if (!cellExists(row, cell)) {\n return null;\n }\n\n var y1 = getRowTop(row);\n var y2 = y1 + options.rowHeight - 1;\n var x1 = 0;\n for (var i = 0; i < cell; i++) {\n x1 += columns[i].width;\n }\n var x2 = x1 + columns[cell].width;\n\n return {\n top: y1,\n left: x1,\n bottom: y2,\n right: x2\n };\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n // Cell switching\n\n function resetActiveCell() {\n setActiveCellInternal(null, false);\n }\n\n function setFocus() {\n if (tabbingDirection == -1) {\n $focusSink[0].focus();\n } else {\n $focusSink2[0].focus();\n }\n }\n\n function scrollCellIntoView(row, cell, doPaging) {\n scrollRowIntoView(row, doPaging);\n\n var colspan = getColspan(row, cell);\n var left = columnPosLeft[cell],\n right = columnPosRight[cell + (colspan > 1 ? colspan - 1 : 0)],\n scrollRight = scrollLeft + viewportW;\n\n if (left < scrollLeft) {\n $viewport.scrollLeft(left);\n handleScroll();\n render();\n } else if (right > scrollRight) {\n $viewport.scrollLeft(Math.min(left, right - $viewport[0].clientWidth));\n handleScroll();\n render();\n }\n }\n\n function setActiveCellInternal(newCell, opt_editMode) {\n if (activeCellNode !== null) {\n makeActiveCellNormal();\n $(activeCellNode).removeClass(\"active\");\n if (rowsCache[activeRow]) {\n $(rowsCache[activeRow].rowNode).removeClass(\"active\");\n }\n }\n\n var activeCellChanged = (activeCellNode !== newCell);\n activeCellNode = newCell;\n\n if (activeCellNode != null) {\n activeRow = getRowFromNode(activeCellNode.parentNode);\n activeCell = activePosX = getCellFromNode(activeCellNode);\n\n if (opt_editMode == null) {\n opt_editMode = (activeRow == getDataLength()) || options.autoEdit;\n }\n\n $(activeCellNode).addClass(\"active\");\n $(rowsCache[activeRow].rowNode).addClass(\"active\");\n\n if (options.editable && opt_editMode && isCellPotentiallyEditable(activeRow, activeCell)) {\n clearTimeout(h_editorLoader);\n\n if (options.asyncEditorLoading) {\n h_editorLoader = setTimeout(function () {\n makeActiveCellEditable();\n }, options.asyncEditorLoadDelay);\n } else {\n makeActiveCellEditable();\n }\n }\n } else {\n activeRow = activeCell = null;\n }\n\n if (activeCellChanged) {\n trigger(self.onActiveCellChanged, getActiveCell());\n }\n }\n\n function clearTextSelection() {\n if (document.selection && document.selection.empty) {\n try {\n //IE fails here if selected element is not in dom\n document.selection.empty();\n } catch (e) { }\n } else if (window.getSelection) {\n var sel = window.getSelection();\n if (sel && sel.removeAllRanges) {\n sel.removeAllRanges();\n }\n }\n }\n\n function isCellPotentiallyEditable(row, cell) {\n var dataLength = getDataLength();\n // is the data for this row loaded?\n if (row < dataLength && !getDataItem(row)) {\n return false;\n }\n\n // are we in the Add New row? can we create new from this cell?\n if (columns[cell].cannotTriggerInsert && row >= dataLength) {\n return false;\n }\n\n // does this cell have an editor?\n if (!getEditor(row, cell)) {\n return false;\n }\n\n return true;\n }\n\n function makeActiveCellNormal() {\n if (!currentEditor) {\n return;\n }\n trigger(self.onBeforeCellEditorDestroy, {editor: currentEditor});\n currentEditor.destroy();\n currentEditor = null;\n\n if (activeCellNode) {\n var d = getDataItem(activeRow);\n $(activeCellNode).removeClass(\"editable invalid\");\n if (d) {\n var column = columns[activeCell];\n var formatter = getFormatter(activeRow, column);\n activeCellNode.innerHTML = formatter(activeRow, activeCell, getDataItemValueForColumn(d, column), column, d);\n invalidatePostProcessingResults(activeRow);\n }\n }\n\n // if there previously was text selected on a page (such as selected text in the edit cell just removed),\n // IE can't set focus to anything else correctly\n if (navigator.userAgent.toLowerCase().match(/msie/)) {\n clearTextSelection();\n }\n\n getEditorLock().deactivate(editController);\n }\n\n function makeActiveCellEditable(editor) {\n if (!activeCellNode) {\n return;\n }\n if (!options.editable) {\n throw \"Grid : makeActiveCellEditable : should never get called when options.editable is false\";\n }\n\n // cancel pending async call if there is one\n clearTimeout(h_editorLoader);\n\n if (!isCellPotentiallyEditable(activeRow, activeCell)) {\n return;\n }\n\n var columnDef = columns[activeCell];\n var item = getDataItem(activeRow);\n\n if (trigger(self.onBeforeEditCell, {row: activeRow, cell: activeCell, item: item, column: columnDef}) === false) {\n setFocus();\n return;\n }\n\n getEditorLock().activate(editController);\n $(activeCellNode).addClass(\"editable\");\n\n // don't clear the cell if a custom editor is passed through\n if (!editor) {\n activeCellNode.innerHTML = \"\";\n }\n\n currentEditor = new (editor || getEditor(activeRow, activeCell))({\n grid: self,\n gridPosition: absBox($container[0]),\n position: absBox(activeCellNode),\n container: activeCellNode,\n column: columnDef,\n item: item || {},\n commitChanges: commitEditAndSetFocus,\n cancelChanges: cancelEditAndSetFocus\n });\n\n if (item) {\n currentEditor.loadValue(item);\n }\n\n serializedEditorValue = currentEditor.serializeValue();\n\n if (currentEditor.position) {\n handleActiveCellPositionChange();\n }\n }\n\n function commitEditAndSetFocus() {\n // if the commit fails, it would do so due to a validation error\n // if so, do not steal the focus from the editor\n if (getEditorLock().commitCurrentEdit()) {\n setFocus();\n if (options.autoEdit) {\n navigateDown();\n }\n }\n }\n\n function cancelEditAndSetFocus() {\n if (getEditorLock().cancelCurrentEdit()) {\n setFocus();\n }\n }\n\n function absBox(elem) {\n var box = {\n top: elem.offsetTop,\n left: elem.offsetLeft,\n bottom: 0,\n right: 0,\n width: $(elem).outerWidth(),\n height: $(elem).outerHeight(),\n visible: true};\n box.bottom = box.top + box.height;\n box.right = box.left + box.width;\n\n // walk up the tree\n var offsetParent = elem.offsetParent;\n while ((elem = elem.parentNode) != document.body) {\n if (box.visible && elem.scrollHeight != elem.offsetHeight && $(elem).css(\"overflowY\") != \"visible\") {\n box.visible = box.bottom > elem.scrollTop && box.top < elem.scrollTop + elem.clientHeight;\n }\n\n if (box.visible && elem.scrollWidth != elem.offsetWidth && $(elem).css(\"overflowX\") != \"visible\") {\n box.visible = box.right > elem.scrollLeft && box.left < elem.scrollLeft + elem.clientWidth;\n }\n\n box.left -= elem.scrollLeft;\n box.top -= elem.scrollTop;\n\n if (elem === offsetParent) {\n box.left += elem.offsetLeft;\n box.top += elem.offsetTop;\n offsetParent = elem.offsetParent;\n }\n\n box.bottom = box.top + box.height;\n box.right = box.left + box.width;\n }\n\n return box;\n }\n\n function getActiveCellPosition() {\n return absBox(activeCellNode);\n }\n\n function getGridPosition() {\n return absBox($container[0])\n }\n\n function handleActiveCellPositionChange() {\n if (!activeCellNode) {\n return;\n }\n\n trigger(self.onActiveCellPositionChanged, {});\n\n if (currentEditor) {\n var cellBox = getActiveCellPosition();\n if (currentEditor.show && currentEditor.hide) {\n if (!cellBox.visible) {\n currentEditor.hide();\n } else {\n currentEditor.show();\n }\n }\n\n if (currentEditor.position) {\n currentEditor.position(cellBox);\n }\n }\n }\n\n function getCellEditor() {\n return currentEditor;\n }\n\n function getActiveCell() {\n if (!activeCellNode) {\n return null;\n } else {\n return {row: activeRow, cell: activeCell};\n }\n }\n\n function getActiveCellNode() {\n return activeCellNode;\n }\n\n function scrollRowIntoView(row, doPaging) {\n var rowAtTop = row * options.rowHeight;\n var rowAtBottom = (row + 1) * options.rowHeight - viewportH + (viewportHasHScroll ? scrollbarDimensions.height : 0);\n\n // need to page down?\n if ((row + 1) * options.rowHeight > scrollTop + viewportH + offset) {\n scrollTo(doPaging ? rowAtTop : rowAtBottom);\n render();\n }\n // or page up?\n else if (row * options.rowHeight < scrollTop + offset) {\n scrollTo(doPaging ? rowAtBottom : rowAtTop);\n render();\n }\n }\n\n function scrollRowToTop(row) {\n scrollTo(row * options.rowHeight);\n render();\n }\n\n function scrollPage(dir) {\n var deltaRows = dir * numVisibleRows;\n scrollTo((getRowFromPosition(scrollTop) + deltaRows) * options.rowHeight);\n render();\n\n if (options.enableCellNavigation && activeRow != null) {\n var row = activeRow + deltaRows;\n var dataLengthIncludingAddNew = getDataLengthIncludingAddNew();\n if (row >= dataLengthIncludingAddNew) {\n row = dataLengthIncludingAddNew - 1;\n }\n if (row < 0) {\n row = 0;\n }\n\n var cell = 0, prevCell = null;\n var prevActivePosX = activePosX;\n while (cell <= activePosX) {\n if (canCellBeActive(row, cell)) {\n prevCell = cell;\n }\n cell += getColspan(row, cell);\n }\n\n if (prevCell !== null) {\n setActiveCellInternal(getCellNode(row, prevCell));\n activePosX = prevActivePosX;\n } else {\n resetActiveCell();\n }\n }\n }\n\n function navigatePageDown() {\n scrollPage(1);\n }\n\n function navigatePageUp() {\n scrollPage(-1);\n }\n\n function getColspan(row, cell) {\n var metadata = data.getItemMetadata && data.getItemMetadata(row);\n if (!metadata || !metadata.columns) {\n return 1;\n }\n\n var columnData = metadata.columns[columns[cell].id] || metadata.columns[cell];\n var colspan = (columnData && columnData.colspan);\n if (colspan === \"*\") {\n colspan = columns.length - cell;\n } else {\n colspan = colspan || 1;\n }\n\n return colspan;\n }\n\n function findFirstFocusableCell(row) {\n var cell = 0;\n while (cell < columns.length) {\n if (canCellBeActive(row, cell)) {\n return cell;\n }\n cell += getColspan(row, cell);\n }\n return null;\n }\n\n function findLastFocusableCell(row) {\n var cell = 0;\n var lastFocusableCell = null;\n while (cell < columns.length) {\n if (canCellBeActive(row, cell)) {\n lastFocusableCell = cell;\n }\n cell += getColspan(row, cell);\n }\n return lastFocusableCell;\n }\n\n function gotoRight(row, cell, posX) {\n if (cell >= columns.length) {\n return null;\n }\n\n do {\n cell += getColspan(row, cell);\n }\n while (cell < columns.length && !canCellBeActive(row, cell));\n\n if (cell < columns.length) {\n return {\n \"row\": row,\n \"cell\": cell,\n \"posX\": cell\n };\n }\n return null;\n }\n\n function gotoLeft(row, cell, posX) {\n if (cell <= 0) {\n return null;\n }\n\n var firstFocusableCell = findFirstFocusableCell(row);\n if (firstFocusableCell === null || firstFocusableCell >= cell) {\n return null;\n }\n\n var prev = {\n \"row\": row,\n \"cell\": firstFocusableCell,\n \"posX\": firstFocusableCell\n };\n var pos;\n while (true) {\n pos = gotoRight(prev.row, prev.cell, prev.posX);\n if (!pos) {\n return null;\n }\n if (pos.cell >= cell) {\n return prev;\n }\n prev = pos;\n }\n }\n\n function gotoDown(row, cell, posX) {\n var prevCell;\n var dataLengthIncludingAddNew = getDataLengthIncludingAddNew();\n while (true) {\n if (++row >= dataLengthIncludingAddNew) {\n return null;\n }\n\n prevCell = cell = 0;\n while (cell <= posX) {\n prevCell = cell;\n cell += getColspan(row, cell);\n }\n\n if (canCellBeActive(row, prevCell)) {\n return {\n \"row\": row,\n \"cell\": prevCell,\n \"posX\": posX\n };\n }\n }\n }\n\n function gotoUp(row, cell, posX) {\n var prevCell;\n while (true) {\n if (--row < 0) {\n return null;\n }\n\n prevCell = cell = 0;\n while (cell <= posX) {\n prevCell = cell;\n cell += getColspan(row, cell);\n }\n\n if (canCellBeActive(row, prevCell)) {\n return {\n \"row\": row,\n \"cell\": prevCell,\n \"posX\": posX\n };\n }\n }\n }\n\n function gotoNext(row, cell, posX) {\n if (row == null && cell == null) {\n row = cell = posX = 0;\n if (canCellBeActive(row, cell)) {\n return {\n \"row\": row,\n \"cell\": cell,\n \"posX\": cell\n };\n }\n }\n\n var pos = gotoRight(row, cell, posX);\n if (pos) {\n return pos;\n }\n\n var firstFocusableCell = null;\n var dataLengthIncludingAddNew = getDataLengthIncludingAddNew();\n while (++row < dataLengthIncludingAddNew) {\n firstFocusableCell = findFirstFocusableCell(row);\n if (firstFocusableCell !== null) {\n return {\n \"row\": row,\n \"cell\": firstFocusableCell,\n \"posX\": firstFocusableCell\n };\n }\n }\n return null;\n }\n\n function gotoPrev(row, cell, posX) {\n if (row == null && cell == null) {\n row = getDataLengthIncludingAddNew() - 1;\n cell = posX = columns.length - 1;\n if (canCellBeActive(row, cell)) {\n return {\n \"row\": row,\n \"cell\": cell,\n \"posX\": cell\n };\n }\n }\n\n var pos;\n var lastSelectableCell;\n while (!pos) {\n pos = gotoLeft(row, cell, posX);\n if (pos) {\n break;\n }\n if (--row < 0) {\n return null;\n }\n\n cell = 0;\n lastSelectableCell = findLastFocusableCell(row);\n if (lastSelectableCell !== null) {\n pos = {\n \"row\": row,\n \"cell\": lastSelectableCell,\n \"posX\": lastSelectableCell\n };\n }\n }\n return pos;\n }\n\n function navigateRight() {\n return navigate(\"right\");\n }\n\n function navigateLeft() {\n return navigate(\"left\");\n }\n\n function navigateDown() {\n return navigate(\"down\");\n }\n\n function navigateUp() {\n return navigate(\"up\");\n }\n\n function navigateNext() {\n return navigate(\"next\");\n }\n\n function navigatePrev() {\n return navigate(\"prev\");\n }\n\n /**\n * @param {string} dir Navigation direction.\n * @return {boolean} Whether navigation resulted in a change of active cell.\n */\n function navigate(dir) {\n if (!options.enableCellNavigation) {\n return false;\n }\n\n if (!activeCellNode && dir != \"prev\" && dir != \"next\") {\n return false;\n }\n\n if (!getEditorLock().commitCurrentEdit()) {\n return true;\n }\n setFocus();\n\n var tabbingDirections = {\n \"up\": -1,\n \"down\": 1,\n \"left\": -1,\n \"right\": 1,\n \"prev\": -1,\n \"next\": 1\n };\n tabbingDirection = tabbingDirections[dir];\n\n var stepFunctions = {\n \"up\": gotoUp,\n \"down\": gotoDown,\n \"left\": gotoLeft,\n \"right\": gotoRight,\n \"prev\": gotoPrev,\n \"next\": gotoNext\n };\n var stepFn = stepFunctions[dir];\n var pos = stepFn(activeRow, activeCell, activePosX);\n if (pos) {\n var isAddNewRow = (pos.row == getDataLength());\n scrollCellIntoView(pos.row, pos.cell, !isAddNewRow);\n setActiveCellInternal(getCellNode(pos.row, pos.cell));\n activePosX = pos.posX;\n return true;\n } else {\n setActiveCellInternal(getCellNode(activeRow, activeCell));\n return false;\n }\n }\n\n function getCellNode(row, cell) {\n if (rowsCache[row]) {\n ensureCellNodesInRowsCache(row);\n return rowsCache[row].cellNodesByColumnIdx[cell];\n }\n return null;\n }\n\n function setActiveCell(row, cell) {\n if (!initialized) { return; }\n if (row > getDataLength() || row < 0 || cell >= columns.length || cell < 0) {\n return;\n }\n\n if (!options.enableCellNavigation) {\n return;\n }\n\n scrollCellIntoView(row, cell, false);\n setActiveCellInternal(getCellNode(row, cell), false);\n }\n\n function canCellBeActive(row, cell) {\n if (!options.enableCellNavigation || row >= getDataLengthIncludingAddNew() ||\n row < 0 || cell >= columns.length || cell < 0) {\n return false;\n }\n\n var rowMetadata = data.getItemMetadata && data.getItemMetadata(row);\n if (rowMetadata && typeof rowMetadata.focusable === \"boolean\") {\n return rowMetadata.focusable;\n }\n\n var columnMetadata = rowMetadata && rowMetadata.columns;\n if (columnMetadata && columnMetadata[columns[cell].id] && typeof columnMetadata[columns[cell].id].focusable === \"boolean\") {\n return columnMetadata[columns[cell].id].focusable;\n }\n if (columnMetadata && columnMetadata[cell] && typeof columnMetadata[cell].focusable === \"boolean\") {\n return columnMetadata[cell].focusable;\n }\n\n return columns[cell].focusable;\n }\n\n function canCellBeSelected(row, cell) {\n if (row >= getDataLength() || row < 0 || cell >= columns.length || cell < 0) {\n return false;\n }\n\n var rowMetadata = data.getItemMetadata && data.getItemMetadata(row);\n if (rowMetadata && typeof rowMetadata.selectable === \"boolean\") {\n return rowMetadata.selectable;\n }\n\n var columnMetadata = rowMetadata && rowMetadata.columns && (rowMetadata.columns[columns[cell].id] || rowMetadata.columns[cell]);\n if (columnMetadata && typeof columnMetadata.selectable === \"boolean\") {\n return columnMetadata.selectable;\n }\n\n return columns[cell].selectable;\n }\n\n function gotoCell(row, cell, forceEdit) {\n if (!initialized) { return; }\n if (!canCellBeActive(row, cell)) {\n return;\n }\n\n if (!getEditorLock().commitCurrentEdit()) {\n return;\n }\n\n scrollCellIntoView(row, cell, false);\n\n var newCell = getCellNode(row, cell);\n\n // if selecting the 'add new' row, start editing right away\n setActiveCellInternal(newCell, forceEdit || (row === getDataLength()) || options.autoEdit);\n\n // if no editor was created, set the focus back on the grid\n if (!currentEditor) {\n setFocus();\n }\n }\n\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n // IEditor implementation for the editor lock\n\n function commitCurrentEdit() {\n var item = getDataItem(activeRow);\n var column = columns[activeCell];\n\n if (currentEditor) {\n if (currentEditor.isValueChanged()) {\n var validationResults = currentEditor.validate();\n\n if (validationResults.valid) {\n if (activeRow < getDataLength()) {\n var editCommand = {\n row: activeRow,\n cell: activeCell,\n editor: currentEditor,\n serializedValue: currentEditor.serializeValue(),\n prevSerializedValue: serializedEditorValue,\n execute: function () {\n this.editor.applyValue(item, this.serializedValue);\n updateRow(this.row);\n trigger(self.onCellChange, {\n row: activeRow,\n cell: activeCell,\n item: item\n });\n },\n undo: function () {\n this.editor.applyValue(item, this.prevSerializedValue);\n updateRow(this.row);\n trigger(self.onCellChange, {\n row: activeRow,\n cell: activeCell,\n item: item\n });\n }\n };\n\n if (options.editCommandHandler) {\n makeActiveCellNormal();\n options.editCommandHandler(item, column, editCommand);\n } else {\n editCommand.execute();\n makeActiveCellNormal();\n }\n\n } else {\n var newItem = {};\n currentEditor.applyValue(newItem, currentEditor.serializeValue());\n makeActiveCellNormal();\n trigger(self.onAddNewRow, {item: newItem, column: column});\n }\n\n // check whether the lock has been re-acquired by event handlers\n return !getEditorLock().isActive();\n } else {\n // Re-add the CSS class to trigger transitions, if any.\n $(activeCellNode).removeClass(\"invalid\");\n $(activeCellNode).width(); // force layout\n $(activeCellNode).addClass(\"invalid\");\n\n trigger(self.onValidationError, {\n editor: currentEditor,\n cellNode: activeCellNode,\n validationResults: validationResults,\n row: activeRow,\n cell: activeCell,\n column: column\n });\n\n currentEditor.focus();\n return false;\n }\n }\n\n makeActiveCellNormal();\n }\n return true;\n }\n\n function cancelCurrentEdit() {\n makeActiveCellNormal();\n return true;\n }\n\n function rowsToRanges(rows) {\n var ranges = [];\n var lastCell = columns.length - 1;\n for (var i = 0; i < rows.length; i++) {\n ranges.push(new Slick.Range(rows[i], 0, rows[i], lastCell));\n }\n return ranges;\n }\n\n function getSelectedRows() {\n if (!selectionModel) {\n throw \"Selection model is not set\";\n }\n return selectedRows;\n }\n\n function setSelectedRows(rows) {\n if (!selectionModel) {\n throw \"Selection model is not set\";\n }\n selectionModel.setSelectedRanges(rowsToRanges(rows));\n }\n\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n // Debug\n\n this.debug = function () {\n var s = \"\";\n\n s += (\"\\n\" + \"counter_rows_rendered: \" + counter_rows_rendered);\n s += (\"\\n\" + \"counter_rows_removed: \" + counter_rows_removed);\n s += (\"\\n\" + \"renderedRows: \" + renderedRows);\n s += (\"\\n\" + \"numVisibleRows: \" + numVisibleRows);\n s += (\"\\n\" + \"maxSupportedCssHeight: \" + maxSupportedCssHeight);\n s += (\"\\n\" + \"n(umber of pages): \" + n);\n s += (\"\\n\" + \"(current) page: \" + page);\n s += (\"\\n\" + \"page height (ph): \" + ph);\n s += (\"\\n\" + \"vScrollDir: \" + vScrollDir);\n\n alert(s);\n };\n\n // a debug helper to be able to access private members\n this.eval = function (expr) {\n return eval(expr);\n };\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n // Public API\n\n $.extend(this, {\n \"slickGridVersion\": \"2.1\",\n\n // Events\n \"onScroll\": new Slick.Event(),\n \"onSort\": new Slick.Event(),\n \"onHeaderMouseEnter\": new Slick.Event(),\n \"onHeaderMouseLeave\": new Slick.Event(),\n \"onHeaderContextMenu\": new Slick.Event(),\n \"onHeaderClick\": new Slick.Event(),\n \"onHeaderCellRendered\": new Slick.Event(),\n \"onBeforeHeaderCellDestroy\": new Slick.Event(),\n \"onHeaderRowCellRendered\": new Slick.Event(),\n \"onBeforeHeaderRowCellDestroy\": new Slick.Event(),\n \"onMouseEnter\": new Slick.Event(),\n \"onMouseLeave\": new Slick.Event(),\n \"onClick\": new Slick.Event(),\n \"onDblClick\": new Slick.Event(),\n \"onContextMenu\": new Slick.Event(),\n \"onKeyDown\": new Slick.Event(),\n \"onAddNewRow\": new Slick.Event(),\n \"onValidationError\": new Slick.Event(),\n \"onViewportChanged\": new Slick.Event(),\n \"onColumnsReordered\": new Slick.Event(),\n \"onColumnsResized\": new Slick.Event(),\n \"onCellChange\": new Slick.Event(),\n \"onBeforeEditCell\": new Slick.Event(),\n \"onBeforeCellEditorDestroy\": new Slick.Event(),\n \"onBeforeDestroy\": new Slick.Event(),\n \"onActiveCellChanged\": new Slick.Event(),\n \"onActiveCellPositionChanged\": new Slick.Event(),\n \"onDragInit\": new Slick.Event(),\n \"onDragStart\": new Slick.Event(),\n \"onDrag\": new Slick.Event(),\n \"onDragEnd\": new Slick.Event(),\n \"onSelectedRowsChanged\": new Slick.Event(),\n \"onCellCssStylesChanged\": new Slick.Event(),\n\n // Methods\n \"registerPlugin\": registerPlugin,\n \"unregisterPlugin\": unregisterPlugin,\n \"getColumns\": getColumns,\n \"setColumns\": setColumns,\n \"getColumnIndex\": getColumnIndex,\n \"updateColumnHeader\": updateColumnHeader,\n \"setSortColumn\": setSortColumn,\n \"setSortColumns\": setSortColumns,\n \"getSortColumns\": getSortColumns,\n \"autosizeColumns\": autosizeColumns,\n \"getOptions\": getOptions,\n \"setOptions\": setOptions,\n \"getData\": getData,\n \"getDataLength\": getDataLength,\n \"getDataItem\": getDataItem,\n \"setData\": setData,\n \"getSelectionModel\": getSelectionModel,\n \"setSelectionModel\": setSelectionModel,\n \"getSelectedRows\": getSelectedRows,\n \"setSelectedRows\": setSelectedRows,\n \"getContainerNode\": getContainerNode,\n\n \"render\": render,\n \"invalidate\": invalidate,\n \"invalidateRow\": invalidateRow,\n \"invalidateRows\": invalidateRows,\n \"invalidateAllRows\": invalidateAllRows,\n \"updateCell\": updateCell,\n \"updateRow\": updateRow,\n \"getViewport\": getVisibleRange,\n \"getRenderedRange\": getRenderedRange,\n \"resizeCanvas\": resizeCanvas,\n \"updateRowCount\": updateRowCount,\n \"scrollRowIntoView\": scrollRowIntoView,\n \"scrollRowToTop\": scrollRowToTop,\n \"scrollCellIntoView\": scrollCellIntoView,\n \"getCanvasNode\": getCanvasNode,\n \"focus\": setFocus,\n\n \"getCellFromPoint\": getCellFromPoint,\n \"getCellFromEvent\": getCellFromEvent,\n \"getActiveCell\": getActiveCell,\n \"setActiveCell\": setActiveCell,\n \"getActiveCellNode\": getActiveCellNode,\n \"getActiveCellPosition\": getActiveCellPosition,\n \"resetActiveCell\": resetActiveCell,\n \"editActiveCell\": makeActiveCellEditable,\n \"getCellEditor\": getCellEditor,\n \"getCellNode\": getCellNode,\n \"getCellNodeBox\": getCellNodeBox,\n \"canCellBeSelected\": canCellBeSelected,\n \"canCellBeActive\": canCellBeActive,\n \"navigatePrev\": navigatePrev,\n \"navigateNext\": navigateNext,\n \"navigateUp\": navigateUp,\n \"navigateDown\": navigateDown,\n \"navigateLeft\": navigateLeft,\n \"navigateRight\": navigateRight,\n \"navigatePageUp\": navigatePageUp,\n \"navigatePageDown\": navigatePageDown,\n \"gotoCell\": gotoCell,\n \"getTopPanel\": getTopPanel,\n \"setTopPanelVisibility\": setTopPanelVisibility,\n \"setHeaderRowVisibility\": setHeaderRowVisibility,\n \"getHeaderRow\": getHeaderRow,\n \"getHeaderRowColumn\": getHeaderRowColumn,\n \"getGridPosition\": getGridPosition,\n \"flashCell\": flashCell,\n \"addCellCssStyles\": addCellCssStyles,\n \"setCellCssStyles\": setCellCssStyles,\n \"removeCellCssStyles\": removeCellCssStyles,\n \"getCellCssStyles\": getCellCssStyles,\n\n \"init\": finishInitialization,\n \"destroy\": destroy,\n\n // IEditor implementation\n \"getEditorLock\": getEditorLock,\n \"getEditController\": getEditController\n });\n\n init();\n}\n\nmodule.exports = SlickGrid;\n"]} |