{"version":3,"sources":["bower_components/underscore/underscore.js","bower_components/backbone/backbone.js","bower_components/jquery/dist/jquery.js","bower_components/moment/moment.js","bower_components/backbone.paginator/lib/backbone.paginator.js","bower_components/backgrid/lib/backgrid.js","bower_components/bootstrap/dist/js/bootstrap.js","bower_components/es6-promise/es6-promise.js","bower_components/jquery-validation/dist/jquery.validate.js","bower_components/moment-timezone/builds/moment-timezone-with-data-2010-2020.js","bower_components/requirejs/require.js","bower_components/Chart-js/Chart.js","bower_components/Croppie/croppie.js","bower_components/autoNumeric/autoNumeric.js","bower_components/backgrid-paginator/backgrid-paginator.js","bower_components/backgrid-select-all/backgrid-select-all.js","bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.js","bower_components/bootstrap-select/dist/js/bootstrap-select.js","bower_components/bootstrap-treeview/dist/bootstrap-treeview.min.js","bower_components/bootstrap-wizard/jquery.bootstrap.wizard.js","bower_components/bootstrap.growl/bootstrap-notify.js","bower_components/bootstrapcolorpicker/dist/js/bootstrap-colorpicker.js","bower_components/chart.js/dist/Chart.js","bower_components/ckeditor/ckeditor.js","bower_components/cropper/dist/cropper.js","bower_components/cryptojs/cryptojs.js","bower_components/datatables/media/js/jquery.dataTables.js","bower_components/dropzone/dist/min/dropzone.min.js","bower_components/easy-pie-chart/dist/jquery.easypiechart.js","bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js","bower_components/fullcalendar/dist/fullcalendar.js","bower_components/gmaps/gmaps.js","bower_components/infinity/build/infinity.js","bower_components/ion-range-slider/js/ion.rangeSlider.js","bower_components/jquery-countTo/jquery.countTo.js","bower_components/jquery-flot/jquery.flot.js","bower_components/jquery-placeholder/jquery.placeholder.js","bower_components/jquery-raty/lib/jquery.raty.js","bower_components/jquery-scrollLock/jquery-scrollLock.js","bower_components/jquery-scrollto/src/documents/lib/jquery-scrollto.js","bower_components/jquery-slimscroll/jquery.slimscroll.js","bower_components/jquery-tags-input/src/jquery.tagsinput.js","bower_components/jquery-ui/jquery-ui.js","bower_components/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js","bower_components/jquery.appear/jquery.appear.js","bower_components/jquery.countdown/dist/jquery.countdown.js","bower_components/jquery.idle/jquery.idle.js","bower_components/jquery.maskedinput/dist/jquery.maskedinput.js","bower_components/js-cookie/src/js.cookie.js","bower_components/jvectormap/jquery-jvectormap.js","bower_components/lodash/dist/lodash.js","bower_components/magnific-popup/dist/jquery.magnific-popup.js","bower_components/numbro/numbro.js","bower_components/q/q.js","bower_components/select2/dist/js/select2.js","bower_components/skrollr/src/skrollr.js","bower_components/slick-carousel/slick/slick.min.js","bower_components/summernote/dist/summernote.js","bower_components/sweetalert2/dist/sweetalert2.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5gDA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAt2DA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhwVA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7sIA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA/1CA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAj4FA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3zEA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApoCA;AAAA;CCAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAr3CA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhrCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjlEA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAp5GA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAniDA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA/9CA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjcA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlRA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAh4DA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAv2DA;AAAA;ACAA;AAAA;AAAA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA/PA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7VA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvjCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5+XA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAn+BA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxhGA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA52dA;AAAA;ACAA;AAAA;AACA;AADA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxWA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzuWA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnrEA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAh8BA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnwEA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlIA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhmGA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzRA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxvBA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1EA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApQA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1dA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtYA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxugBA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA/ZA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvJA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1OA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAtGA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArLA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3IA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5CA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA9lcA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA7gEA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvsCA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAh3DA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAl8KA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApvDA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjBA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvmNA;AAAA;ACAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlgDA;AAAA","file":"public\\js\\libs.js","sourcesContent":["// Underscore.js 1.8.3\n// http://underscorejs.org\n// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` in the browser, or `exports` on the server.\n var root = this;\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var\n push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for the old `require()` API. If we're in\n // the browser, add `_` as a global object.\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.8.3';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n case 2: return function(value, other) {\n return func.call(context, value, other);\n };\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n // A mostly-internal function to generate callbacks that can be applied\n // to each element in a collection, returning the desired result — either\n // identity, an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value)) return _.matcher(value);\n return _.property(value);\n };\n _.iteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, undefinedOnly) {\n return function(obj) {\n var length = arguments.length;\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var property = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = property('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n function createReduce(dir) {\n // Optimized iterator function as using arguments.length\n // in the main function will deoptimize the, see #1991.\n function iterator(obj, iteratee, memo, keys, index, length) {\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n }\n\n return function(obj, iteratee, memo, context) {\n iteratee = optimizeCb(iteratee, context, 4);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n // Determine the initial value if none is provided.\n if (arguments.length < 3) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n return iterator(obj, iteratee, memo, keys, index, length);\n };\n }\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var key;\n if (isArrayLike(obj)) {\n key = _.findIndex(obj, predicate, context);\n } else {\n key = _.findKey(obj, predicate, context);\n }\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = function(obj, method) {\n var args = slice.call(arguments, 2);\n var isFunc = _.isFunction(method);\n return _.map(obj, function(value) {\n var func = isFunc ? method : value[method];\n return func == null ? func : func.apply(value, args);\n });\n };\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection, using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n _.shuffle = function(obj) {\n var set = isArrayLike(obj) ? obj : _.values(obj);\n var length = set.length;\n var shuffled = Array(length);\n for (var index = 0, rand; index < length; index++) {\n rand = _.random(0, index);\n if (rand !== index) shuffled[index] = shuffled[rand];\n shuffled[rand] = set[index];\n }\n return shuffled;\n };\n\n // Sample **n** random values from a collection.\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n return _.shuffle(obj).slice(0, Math.max(0, n));\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, index, list) {\n return {\n value: value,\n index: index,\n criteria: iteratee(value, index, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior) {\n return function(obj, iteratee, context) {\n var result = {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key]++; else result[key] = 1;\n });\n\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var pass = [], fail = [];\n _.each(obj, function(value, key, obj) {\n (predicate(value, key, obj) ? pass : fail).push(value);\n });\n return [pass, fail];\n };\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, _.identity);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, startIndex) {\n var output = [], idx = 0;\n for (var i = startIndex || 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n //flatten current level of array or arguments object\n if (!shallow) value = flatten(value, shallow, strict);\n var j = 0, len = value.length;\n output.length += len;\n while (j < len) {\n output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = function(array) {\n return _.difference(array, slice.call(arguments, 1));\n };\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = function() {\n return _.uniq(flatten(arguments, true, true));\n };\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n for (var j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = function(array) {\n var rest = flatten(arguments, true, true, 1);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = function() {\n return _.unzip(arguments);\n };\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions\n function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n }\n\n // Returns the first index on an array-like that passes a predicate test\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions\n function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n }\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n step = step || 1;\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = function(func, context) {\n if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var args = slice.call(arguments, 2);\n var bound = function() {\n return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));\n };\n return bound;\n };\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder, allowing any combination of arguments to be pre-filled.\n _.partial = function(func) {\n var boundArgs = slice.call(arguments, 1);\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n };\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = function(obj) {\n var i, length = arguments.length, key;\n if (length <= 1) throw new Error('bindAll must be passed function names');\n for (i = 1; i < length; i++) {\n key = arguments[i];\n obj[key] = _.bind(obj[key], obj);\n }\n return obj;\n };\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){\n return func.apply(null, args);\n }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n\n var later = function() {\n var last = _.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function() {\n context = this;\n args = arguments;\n timestamp = _.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n function collectNonEnumProps(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n }\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object\n // In contrast to _.map it returns an object\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {},\n currentKey;\n for (var index = 0; index < length; index++) {\n currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s)\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = function(object, oiteratee, context) {\n var result = {}, obj = object, iteratee, keys;\n if (obj == null) return result;\n if (_.isFunction(oiteratee)) {\n keys = _.allKeys(obj);\n iteratee = optimizeCb(oiteratee, context);\n } else {\n keys = flatten(arguments, false, false, 1);\n iteratee = function(value, key, obj) { return key in obj; };\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n };\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = function(obj, iteratee, context) {\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n } else {\n var keys = _.map(flatten(arguments, false, false, 1), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n };\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return _.has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), and in Safari 8 (#1929).\n if (typeof /./ != 'function' && typeof Int8Array != 'object') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n _.isNaN = function(obj) {\n return _.isNumber(obj) && obj !== +obj;\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n _.property = property;\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n return obj == null ? function(){} : function(key) {\n return obj[key];\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // If the value of the named `property` is a function then invoke it with the\n // `object` as context; otherwise, return it.\n _.result = function(object, property, fallback) {\n var value = object == null ? void 0 : object[property];\n if (value === void 0) {\n value = fallback;\n }\n return _.isFunction(value) ? value.call(object) : value;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escaper = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escaper, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offest.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n try {\n var render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var result = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return result(this, func.apply(_, args));\n };\n });\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return result(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return result(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return '' + this._wrapped;\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (typeof define === 'function' && define.amd) {\n define('underscore', [], function() {\n return _;\n });\n }\n}.call(this));\n","// Backbone.js 1.2.3\n\n// (c) 2010-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Backbone may be freely distributed under the MIT license.\n// For all details and documentation:\n// http://backbonejs.org\n\n(function(factory) {\n\n // Establish the root object, `window` (`self`) in the browser, or `global` on the server.\n // We use `self` instead of `window` for `WebWorker` support.\n var root = (typeof self == 'object' && self.self == self && self) ||\n (typeof global == 'object' && global.global == global && global);\n\n // Set up Backbone appropriately for the environment. Start with AMD.\n if (typeof define === 'function' && define.amd) {\n define(['underscore', 'jquery', 'exports'], function(_, $, exports) {\n // Export global even in AMD case in case this script is loaded with\n // others that may still expect a global Backbone.\n root.Backbone = factory(root, exports, _, $);\n });\n\n // Next for Node.js or CommonJS. jQuery may not be needed as a module.\n } else if (typeof exports !== 'undefined') {\n var _ = require('underscore'), $;\n try { $ = require('jquery'); } catch(e) {}\n factory(root, exports, _, $);\n\n // Finally, as a browser global.\n } else {\n root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));\n }\n\n}(function(root, Backbone, _, $) {\n\n // Initial Setup\n // -------------\n\n // Save the previous value of the `Backbone` variable, so that it can be\n // restored later on, if `noConflict` is used.\n var previousBackbone = root.Backbone;\n\n // Create a local reference to a common array method we'll want to use later.\n var slice = Array.prototype.slice;\n\n // Current version of the library. Keep in sync with `package.json`.\n Backbone.VERSION = '1.2.3';\n\n // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns\n // the `$` variable.\n Backbone.$ = $;\n\n // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable\n // to its previous owner. Returns a reference to this Backbone object.\n Backbone.noConflict = function() {\n root.Backbone = previousBackbone;\n return this;\n };\n\n // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option\n // will fake `\"PATCH\"`, `\"PUT\"` and `\"DELETE\"` requests via the `_method` parameter and\n // set a `X-Http-Method-Override` header.\n Backbone.emulateHTTP = false;\n\n // Turn on `emulateJSON` to support legacy servers that can't deal with direct\n // `application/json` requests ... this will encode the body as\n // `application/x-www-form-urlencoded` instead and will send the model in a\n // form param named `model`.\n Backbone.emulateJSON = false;\n\n // Proxy Backbone class methods to Underscore functions, wrapping the model's\n // `attributes` object or collection's `models` array behind the scenes.\n //\n // collection.filter(function(model) { return model.get('age') > 10 });\n // collection.each(this.addView);\n //\n // `Function#apply` can be slow so we use the method's arg count, if we know it.\n var addMethod = function(length, method, attribute) {\n switch (length) {\n case 1: return function() {\n return _[method](this[attribute]);\n };\n case 2: return function(value) {\n return _[method](this[attribute], value);\n };\n case 3: return function(iteratee, context) {\n return _[method](this[attribute], cb(iteratee, this), context);\n };\n case 4: return function(iteratee, defaultVal, context) {\n return _[method](this[attribute], cb(iteratee, this), defaultVal, context);\n };\n default: return function() {\n var args = slice.call(arguments);\n args.unshift(this[attribute]);\n return _[method].apply(_, args);\n };\n }\n };\n var addUnderscoreMethods = function(Class, methods, attribute) {\n _.each(methods, function(length, method) {\n if (_[method]) Class.prototype[method] = addMethod(length, method, attribute);\n });\n };\n\n // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`.\n var cb = function(iteratee, instance) {\n if (_.isFunction(iteratee)) return iteratee;\n if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee);\n if (_.isString(iteratee)) return function(model) { return model.get(iteratee); };\n return iteratee;\n };\n var modelMatcher = function(attrs) {\n var matcher = _.matches(attrs);\n return function(model) {\n return matcher(model.attributes);\n };\n };\n\n // Backbone.Events\n // ---------------\n\n // A module that can be mixed in to *any object* in order to provide it with\n // a custom event channel. You may bind a callback to an event with `on` or\n // remove with `off`; `trigger`-ing an event fires all callbacks in\n // succession.\n //\n // var object = {};\n // _.extend(object, Backbone.Events);\n // object.on('expand', function(){ alert('expanded'); });\n // object.trigger('expand');\n //\n var Events = Backbone.Events = {};\n\n // Regular expression used to split event strings.\n var eventSplitter = /\\s+/;\n\n // Iterates over the standard `event, callback` (as well as the fancy multiple\n // space-separated events `\"change blur\", callback` and jQuery-style event\n // maps `{event: callback}`).\n var eventsApi = function(iteratee, events, name, callback, opts) {\n var i = 0, names;\n if (name && typeof name === 'object') {\n // Handle event maps.\n if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback;\n for (names = _.keys(name); i < names.length ; i++) {\n events = eventsApi(iteratee, events, names[i], name[names[i]], opts);\n }\n } else if (name && eventSplitter.test(name)) {\n // Handle space separated event names by delegating them individually.\n for (names = name.split(eventSplitter); i < names.length; i++) {\n events = iteratee(events, names[i], callback, opts);\n }\n } else {\n // Finally, standard events.\n events = iteratee(events, name, callback, opts);\n }\n return events;\n };\n\n // Bind an event to a `callback` function. Passing `\"all\"` will bind\n // the callback to all events fired.\n Events.on = function(name, callback, context) {\n return internalOn(this, name, callback, context);\n };\n\n // Guard the `listening` argument from the public API.\n var internalOn = function(obj, name, callback, context, listening) {\n obj._events = eventsApi(onApi, obj._events || {}, name, callback, {\n context: context,\n ctx: obj,\n listening: listening\n });\n\n if (listening) {\n var listeners = obj._listeners || (obj._listeners = {});\n listeners[listening.id] = listening;\n }\n\n return obj;\n };\n\n // Inversion-of-control versions of `on`. Tell *this* object to listen to\n // an event in another object... keeping track of what it's listening to\n // for easier unbinding later.\n Events.listenTo = function(obj, name, callback) {\n if (!obj) return this;\n var id = obj._listenId || (obj._listenId = _.uniqueId('l'));\n var listeningTo = this._listeningTo || (this._listeningTo = {});\n var listening = listeningTo[id];\n\n // This object is not listening to any other events on `obj` yet.\n // Setup the necessary references to track the listening callbacks.\n if (!listening) {\n var thisId = this._listenId || (this._listenId = _.uniqueId('l'));\n listening = listeningTo[id] = {obj: obj, objId: id, id: thisId, listeningTo: listeningTo, count: 0};\n }\n\n // Bind callbacks on obj, and keep track of them on listening.\n internalOn(obj, name, callback, this, listening);\n return this;\n };\n\n // The reducing API that adds a callback to the `events` object.\n var onApi = function(events, name, callback, options) {\n if (callback) {\n var handlers = events[name] || (events[name] = []);\n var context = options.context, ctx = options.ctx, listening = options.listening;\n if (listening) listening.count++;\n\n handlers.push({ callback: callback, context: context, ctx: context || ctx, listening: listening });\n }\n return events;\n };\n\n // Remove one or many callbacks. If `context` is null, removes all\n // callbacks with that function. If `callback` is null, removes all\n // callbacks for the event. If `name` is null, removes all bound\n // callbacks for all events.\n Events.off = function(name, callback, context) {\n if (!this._events) return this;\n this._events = eventsApi(offApi, this._events, name, callback, {\n context: context,\n listeners: this._listeners\n });\n return this;\n };\n\n // Tell this object to stop listening to either specific events ... or\n // to every object it's currently listening to.\n Events.stopListening = function(obj, name, callback) {\n var listeningTo = this._listeningTo;\n if (!listeningTo) return this;\n\n var ids = obj ? [obj._listenId] : _.keys(listeningTo);\n\n for (var i = 0; i < ids.length; i++) {\n var listening = listeningTo[ids[i]];\n\n // If listening doesn't exist, this object is not currently\n // listening to obj. Break out early.\n if (!listening) break;\n\n listening.obj.off(name, callback, this);\n }\n if (_.isEmpty(listeningTo)) this._listeningTo = void 0;\n\n return this;\n };\n\n // The reducing API that removes a callback from the `events` object.\n var offApi = function(events, name, callback, options) {\n if (!events) return;\n\n var i = 0, listening;\n var context = options.context, listeners = options.listeners;\n\n // Delete all events listeners and \"drop\" events.\n if (!name && !callback && !context) {\n var ids = _.keys(listeners);\n for (; i < ids.length; i++) {\n listening = listeners[ids[i]];\n delete listeners[listening.id];\n delete listening.listeningTo[listening.objId];\n }\n return;\n }\n\n var names = name ? [name] : _.keys(events);\n for (; i < names.length; i++) {\n name = names[i];\n var handlers = events[name];\n\n // Bail out if there are no events stored.\n if (!handlers) break;\n\n // Replace events if there are any remaining. Otherwise, clean up.\n var remaining = [];\n for (var j = 0; j < handlers.length; j++) {\n var handler = handlers[j];\n if (\n callback && callback !== handler.callback &&\n callback !== handler.callback._callback ||\n context && context !== handler.context\n ) {\n remaining.push(handler);\n } else {\n listening = handler.listening;\n if (listening && --listening.count === 0) {\n delete listeners[listening.id];\n delete listening.listeningTo[listening.objId];\n }\n }\n }\n\n // Update tail event if the list has any events. Otherwise, clean up.\n if (remaining.length) {\n events[name] = remaining;\n } else {\n delete events[name];\n }\n }\n if (_.size(events)) return events;\n };\n\n // Bind an event to only be triggered a single time. After the first time\n // the callback is invoked, its listener will be removed. If multiple events\n // are passed in using the space-separated syntax, the handler will fire\n // once for each event, not once for a combination of all events.\n Events.once = function(name, callback, context) {\n // Map the event into a `{event: once}` object.\n var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this));\n return this.on(events, void 0, context);\n };\n\n // Inversion-of-control versions of `once`.\n Events.listenToOnce = function(obj, name, callback) {\n // Map the event into a `{event: once}` object.\n var events = eventsApi(onceMap, {}, name, callback, _.bind(this.stopListening, this, obj));\n return this.listenTo(obj, events);\n };\n\n // Reduces the event callbacks into a map of `{event: onceWrapper}`.\n // `offer` unbinds the `onceWrapper` after it has been called.\n var onceMap = function(map, name, callback, offer) {\n if (callback) {\n var once = map[name] = _.once(function() {\n offer(name, once);\n callback.apply(this, arguments);\n });\n once._callback = callback;\n }\n return map;\n };\n\n // Trigger one or many events, firing all bound callbacks. Callbacks are\n // passed the same arguments as `trigger` is, apart from the event name\n // (unless you're listening on `\"all\"`, which will cause your callback to\n // receive the true name of the event as the first argument).\n Events.trigger = function(name) {\n if (!this._events) return this;\n\n var length = Math.max(0, arguments.length - 1);\n var args = Array(length);\n for (var i = 0; i < length; i++) args[i] = arguments[i + 1];\n\n eventsApi(triggerApi, this._events, name, void 0, args);\n return this;\n };\n\n // Handles triggering the appropriate event callbacks.\n var triggerApi = function(objEvents, name, cb, args) {\n if (objEvents) {\n var events = objEvents[name];\n var allEvents = objEvents.all;\n if (events && allEvents) allEvents = allEvents.slice();\n if (events) triggerEvents(events, args);\n if (allEvents) triggerEvents(allEvents, [name].concat(args));\n }\n return objEvents;\n };\n\n // A difficult-to-believe, but optimized internal dispatch function for\n // triggering events. Tries to keep the usual cases speedy (most internal\n // Backbone events have 3 arguments).\n var triggerEvents = function(events, args) {\n var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];\n switch (args.length) {\n case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;\n case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;\n case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;\n case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;\n default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;\n }\n };\n\n // Aliases for backwards compatibility.\n Events.bind = Events.on;\n Events.unbind = Events.off;\n\n // Allow the `Backbone` object to serve as a global event bus, for folks who\n // want global \"pubsub\" in a convenient place.\n _.extend(Backbone, Events);\n\n // Backbone.Model\n // --------------\n\n // Backbone **Models** are the basic data object in the framework --\n // frequently representing a row in a table in a database on your server.\n // A discrete chunk of data and a bunch of useful, related methods for\n // performing computations and transformations on that data.\n\n // Create a new model with the specified attributes. A client id (`cid`)\n // is automatically generated and assigned for you.\n var Model = Backbone.Model = function(attributes, options) {\n var attrs = attributes || {};\n options || (options = {});\n this.cid = _.uniqueId(this.cidPrefix);\n this.attributes = {};\n if (options.collection) this.collection = options.collection;\n if (options.parse) attrs = this.parse(attrs, options) || {};\n attrs = _.defaults({}, attrs, _.result(this, 'defaults'));\n this.set(attrs, options);\n this.changed = {};\n this.initialize.apply(this, arguments);\n };\n\n // Attach all inheritable methods to the Model prototype.\n _.extend(Model.prototype, Events, {\n\n // A hash of attributes whose current and previous value differ.\n changed: null,\n\n // The value returned during the last failed validation.\n validationError: null,\n\n // The default name for the JSON `id` attribute is `\"id\"`. MongoDB and\n // CouchDB users may want to set this to `\"_id\"`.\n idAttribute: 'id',\n\n // The prefix is used to create the client id which is used to identify models locally.\n // You may want to override this if you're experiencing name clashes with model ids.\n cidPrefix: 'c',\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // Return a copy of the model's `attributes` object.\n toJSON: function(options) {\n return _.clone(this.attributes);\n },\n\n // Proxy `Backbone.sync` by default -- but override this if you need\n // custom syncing semantics for *this* particular model.\n sync: function() {\n return Backbone.sync.apply(this, arguments);\n },\n\n // Get the value of an attribute.\n get: function(attr) {\n return this.attributes[attr];\n },\n\n // Get the HTML-escaped value of an attribute.\n escape: function(attr) {\n return _.escape(this.get(attr));\n },\n\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.get(attr) != null;\n },\n\n // Special-cased proxy to underscore's `_.matches` method.\n matches: function(attrs) {\n return !!_.iteratee(attrs, this)(this.attributes);\n },\n\n // Set a hash of model attributes on the object, firing `\"change\"`. This is\n // the core primitive operation of a model, updating the data and notifying\n // anyone who needs to know about the change in state. The heart of the beast.\n set: function(key, val, options) {\n if (key == null) return this;\n\n // Handle both `\"key\", value` and `{key: value}` -style arguments.\n var attrs;\n if (typeof key === 'object') {\n attrs = key;\n options = val;\n } else {\n (attrs = {})[key] = val;\n }\n\n options || (options = {});\n\n // Run validation.\n if (!this._validate(attrs, options)) return false;\n\n // Extract attributes and options.\n var unset = options.unset;\n var silent = options.silent;\n var changes = [];\n var changing = this._changing;\n this._changing = true;\n\n if (!changing) {\n this._previousAttributes = _.clone(this.attributes);\n this.changed = {};\n }\n\n var current = this.attributes;\n var changed = this.changed;\n var prev = this._previousAttributes;\n\n // For each `set` attribute, update or delete the current value.\n for (var attr in attrs) {\n val = attrs[attr];\n if (!_.isEqual(current[attr], val)) changes.push(attr);\n if (!_.isEqual(prev[attr], val)) {\n changed[attr] = val;\n } else {\n delete changed[attr];\n }\n unset ? delete current[attr] : current[attr] = val;\n }\n\n // Update the `id`.\n this.id = this.get(this.idAttribute);\n\n // Trigger all relevant attribute changes.\n if (!silent) {\n if (changes.length) this._pending = options;\n for (var i = 0; i < changes.length; i++) {\n this.trigger('change:' + changes[i], this, current[changes[i]], options);\n }\n }\n\n // You might be wondering why there's a `while` loop here. Changes can\n // be recursively nested within `\"change\"` events.\n if (changing) return this;\n if (!silent) {\n while (this._pending) {\n options = this._pending;\n this._pending = false;\n this.trigger('change', this, options);\n }\n }\n this._pending = false;\n this._changing = false;\n return this;\n },\n\n // Remove an attribute from the model, firing `\"change\"`. `unset` is a noop\n // if the attribute doesn't exist.\n unset: function(attr, options) {\n return this.set(attr, void 0, _.extend({}, options, {unset: true}));\n },\n\n // Clear all attributes on the model, firing `\"change\"`.\n clear: function(options) {\n var attrs = {};\n for (var key in this.attributes) attrs[key] = void 0;\n return this.set(attrs, _.extend({}, options, {unset: true}));\n },\n\n // Determine if the model has changed since the last `\"change\"` event.\n // If you specify an attribute name, determine if that attribute has changed.\n hasChanged: function(attr) {\n if (attr == null) return !_.isEmpty(this.changed);\n return _.has(this.changed, attr);\n },\n\n // Return an object containing all the attributes that have changed, or\n // false if there are no changed attributes. Useful for determining what\n // parts of a view need to be updated and/or what attributes need to be\n // persisted to the server. Unset attributes will be set to undefined.\n // You can also pass an attributes object to diff against the model,\n // determining if there *would be* a change.\n changedAttributes: function(diff) {\n if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;\n var old = this._changing ? this._previousAttributes : this.attributes;\n var changed = {};\n for (var attr in diff) {\n var val = diff[attr];\n if (_.isEqual(old[attr], val)) continue;\n changed[attr] = val;\n }\n return _.size(changed) ? changed : false;\n },\n\n // Get the previous value of an attribute, recorded at the time the last\n // `\"change\"` event was fired.\n previous: function(attr) {\n if (attr == null || !this._previousAttributes) return null;\n return this._previousAttributes[attr];\n },\n\n // Get all of the attributes of the model at the time of the previous\n // `\"change\"` event.\n previousAttributes: function() {\n return _.clone(this._previousAttributes);\n },\n\n // Fetch the model from the server, merging the response with the model's\n // local attributes. Any changed attributes will trigger a \"change\" event.\n fetch: function(options) {\n options = _.extend({parse: true}, options);\n var model = this;\n var success = options.success;\n options.success = function(resp) {\n var serverAttrs = options.parse ? model.parse(resp, options) : resp;\n if (!model.set(serverAttrs, options)) return false;\n if (success) success.call(options.context, model, resp, options);\n model.trigger('sync', model, resp, options);\n };\n wrapError(this, options);\n return this.sync('read', this, options);\n },\n\n // Set a hash of model attributes, and sync the model to the server.\n // If the server returns an attributes hash that differs, the model's\n // state will be `set` again.\n save: function(key, val, options) {\n // Handle both `\"key\", value` and `{key: value}` -style arguments.\n var attrs;\n if (key == null || typeof key === 'object') {\n attrs = key;\n options = val;\n } else {\n (attrs = {})[key] = val;\n }\n\n options = _.extend({validate: true, parse: true}, options);\n var wait = options.wait;\n\n // If we're not waiting and attributes exist, save acts as\n // `set(attr).save(null, opts)` with validation. Otherwise, check if\n // the model will be valid when the attributes, if any, are set.\n if (attrs && !wait) {\n if (!this.set(attrs, options)) return false;\n } else {\n if (!this._validate(attrs, options)) return false;\n }\n\n // After a successful server-side save, the client is (optionally)\n // updated with the server-side state.\n var model = this;\n var success = options.success;\n var attributes = this.attributes;\n options.success = function(resp) {\n // Ensure attributes are restored during synchronous saves.\n model.attributes = attributes;\n var serverAttrs = options.parse ? model.parse(resp, options) : resp;\n if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);\n if (serverAttrs && !model.set(serverAttrs, options)) return false;\n if (success) success.call(options.context, model, resp, options);\n model.trigger('sync', model, resp, options);\n };\n wrapError(this, options);\n\n // Set temporary attributes if `{wait: true}` to properly find new ids.\n if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);\n\n var method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');\n if (method === 'patch' && !options.attrs) options.attrs = attrs;\n var xhr = this.sync(method, this, options);\n\n // Restore attributes.\n this.attributes = attributes;\n\n return xhr;\n },\n\n // Destroy this model on the server if it was already persisted.\n // Optimistically removes the model from its collection, if it has one.\n // If `wait: true` is passed, waits for the server to respond before removal.\n destroy: function(options) {\n options = options ? _.clone(options) : {};\n var model = this;\n var success = options.success;\n var wait = options.wait;\n\n var destroy = function() {\n model.stopListening();\n model.trigger('destroy', model, model.collection, options);\n };\n\n options.success = function(resp) {\n if (wait) destroy();\n if (success) success.call(options.context, model, resp, options);\n if (!model.isNew()) model.trigger('sync', model, resp, options);\n };\n\n var xhr = false;\n if (this.isNew()) {\n _.defer(options.success);\n } else {\n wrapError(this, options);\n xhr = this.sync('delete', this, options);\n }\n if (!wait) destroy();\n return xhr;\n },\n\n // Default URL for the model's representation on the server -- if you're\n // using Backbone's restful methods, override this to change the endpoint\n // that will be called.\n url: function() {\n var base =\n _.result(this, 'urlRoot') ||\n _.result(this.collection, 'url') ||\n urlError();\n if (this.isNew()) return base;\n var id = this.get(this.idAttribute);\n return base.replace(/[^\\/]$/, '$&/') + encodeURIComponent(id);\n },\n\n // **parse** converts a response into the hash of attributes to be `set` on\n // the model. The default implementation is just to pass the response along.\n parse: function(resp, options) {\n return resp;\n },\n\n // Create a new model with identical attributes to this one.\n clone: function() {\n return new this.constructor(this.attributes);\n },\n\n // A model is new if it has never been saved to the server, and lacks an id.\n isNew: function() {\n return !this.has(this.idAttribute);\n },\n\n // Check if the model is currently in a valid state.\n isValid: function(options) {\n return this._validate({}, _.defaults({validate: true}, options));\n },\n\n // Run validation against the next complete set of model attributes,\n // returning `true` if all is well. Otherwise, fire an `\"invalid\"` event.\n _validate: function(attrs, options) {\n if (!options.validate || !this.validate) return true;\n attrs = _.extend({}, this.attributes, attrs);\n var error = this.validationError = this.validate(attrs, options) || null;\n if (!error) return true;\n this.trigger('invalid', this, error, _.extend(options, {validationError: error}));\n return false;\n }\n\n });\n\n // Underscore methods that we want to implement on the Model, mapped to the\n // number of arguments they take.\n var modelMethods = { keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,\n omit: 0, chain: 1, isEmpty: 1 };\n\n // Mix in each Underscore method as a proxy to `Model#attributes`.\n addUnderscoreMethods(Model, modelMethods, 'attributes');\n\n // Backbone.Collection\n // -------------------\n\n // If models tend to represent a single row of data, a Backbone Collection is\n // more analogous to a table full of data ... or a small slice or page of that\n // table, or a collection of rows that belong together for a particular reason\n // -- all of the messages in this particular folder, all of the documents\n // belonging to this particular author, and so on. Collections maintain\n // indexes of their models, both in order, and for lookup by `id`.\n\n // Create a new **Collection**, perhaps to contain a specific type of `model`.\n // If a `comparator` is specified, the Collection will maintain\n // its models in sort order, as they're added and removed.\n var Collection = Backbone.Collection = function(models, options) {\n options || (options = {});\n if (options.model) this.model = options.model;\n if (options.comparator !== void 0) this.comparator = options.comparator;\n this._reset();\n this.initialize.apply(this, arguments);\n if (models) this.reset(models, _.extend({silent: true}, options));\n };\n\n // Default options for `Collection#set`.\n var setOptions = {add: true, remove: true, merge: true};\n var addOptions = {add: true, remove: false};\n\n // Splices `insert` into `array` at index `at`.\n var splice = function(array, insert, at) {\n at = Math.min(Math.max(at, 0), array.length);\n var tail = Array(array.length - at);\n var length = insert.length;\n for (var i = 0; i < tail.length; i++) tail[i] = array[i + at];\n for (i = 0; i < length; i++) array[i + at] = insert[i];\n for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];\n };\n\n // Define the Collection's inheritable methods.\n _.extend(Collection.prototype, Events, {\n\n // The default model for a collection is just a **Backbone.Model**.\n // This should be overridden in most cases.\n model: Model,\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // The JSON representation of a Collection is an array of the\n // models' attributes.\n toJSON: function(options) {\n return this.map(function(model) { return model.toJSON(options); });\n },\n\n // Proxy `Backbone.sync` by default.\n sync: function() {\n return Backbone.sync.apply(this, arguments);\n },\n\n // Add a model, or list of models to the set. `models` may be Backbone\n // Models or raw JavaScript objects to be converted to Models, or any\n // combination of the two.\n add: function(models, options) {\n return this.set(models, _.extend({merge: false}, options, addOptions));\n },\n\n // Remove a model, or a list of models from the set.\n remove: function(models, options) {\n options = _.extend({}, options);\n var singular = !_.isArray(models);\n models = singular ? [models] : _.clone(models);\n var removed = this._removeModels(models, options);\n if (!options.silent && removed) this.trigger('update', this, options);\n return singular ? removed[0] : removed;\n },\n\n // Update a collection by `set`-ing a new list of models, adding new ones,\n // removing models that are no longer present, and merging models that\n // already exist in the collection, as necessary. Similar to **Model#set**,\n // the core operation for updating the data contained by the collection.\n set: function(models, options) {\n if (models == null) return;\n\n options = _.defaults({}, options, setOptions);\n if (options.parse && !this._isModel(models)) models = this.parse(models, options);\n\n var singular = !_.isArray(models);\n models = singular ? [models] : models.slice();\n\n var at = options.at;\n if (at != null) at = +at;\n if (at < 0) at += this.length + 1;\n\n var set = [];\n var toAdd = [];\n var toRemove = [];\n var modelMap = {};\n\n var add = options.add;\n var merge = options.merge;\n var remove = options.remove;\n\n var sort = false;\n var sortable = this.comparator && (at == null) && options.sort !== false;\n var sortAttr = _.isString(this.comparator) ? this.comparator : null;\n\n // Turn bare objects into model references, and prevent invalid models\n // from being added.\n var model;\n for (var i = 0; i < models.length; i++) {\n model = models[i];\n\n // If a duplicate is found, prevent it from being added and\n // optionally merge it into the existing model.\n var existing = this.get(model);\n if (existing) {\n if (merge && model !== existing) {\n var attrs = this._isModel(model) ? model.attributes : model;\n if (options.parse) attrs = existing.parse(attrs, options);\n existing.set(attrs, options);\n if (sortable && !sort) sort = existing.hasChanged(sortAttr);\n }\n if (!modelMap[existing.cid]) {\n modelMap[existing.cid] = true;\n set.push(existing);\n }\n models[i] = existing;\n\n // If this is a new, valid model, push it to the `toAdd` list.\n } else if (add) {\n model = models[i] = this._prepareModel(model, options);\n if (model) {\n toAdd.push(model);\n this._addReference(model, options);\n modelMap[model.cid] = true;\n set.push(model);\n }\n }\n }\n\n // Remove stale models.\n if (remove) {\n for (i = 0; i < this.length; i++) {\n model = this.models[i];\n if (!modelMap[model.cid]) toRemove.push(model);\n }\n if (toRemove.length) this._removeModels(toRemove, options);\n }\n\n // See if sorting is needed, update `length` and splice in new models.\n var orderChanged = false;\n var replace = !sortable && add && remove;\n if (set.length && replace) {\n orderChanged = this.length != set.length || _.some(this.models, function(model, index) {\n return model !== set[index];\n });\n this.models.length = 0;\n splice(this.models, set, 0);\n this.length = this.models.length;\n } else if (toAdd.length) {\n if (sortable) sort = true;\n splice(this.models, toAdd, at == null ? this.length : at);\n this.length = this.models.length;\n }\n\n // Silently sort the collection if appropriate.\n if (sort) this.sort({silent: true});\n\n // Unless silenced, it's time to fire all appropriate add/sort events.\n if (!options.silent) {\n for (i = 0; i < toAdd.length; i++) {\n if (at != null) options.index = at + i;\n model = toAdd[i];\n model.trigger('add', model, this, options);\n }\n if (sort || orderChanged) this.trigger('sort', this, options);\n if (toAdd.length || toRemove.length) this.trigger('update', this, options);\n }\n\n // Return the added (or merged) model (or models).\n return singular ? models[0] : models;\n },\n\n // When you have more items than you want to add or remove individually,\n // you can reset the entire set with a new list of models, without firing\n // any granular `add` or `remove` events. Fires `reset` when finished.\n // Useful for bulk operations and optimizations.\n reset: function(models, options) {\n options = options ? _.clone(options) : {};\n for (var i = 0; i < this.models.length; i++) {\n this._removeReference(this.models[i], options);\n }\n options.previousModels = this.models;\n this._reset();\n models = this.add(models, _.extend({silent: true}, options));\n if (!options.silent) this.trigger('reset', this, options);\n return models;\n },\n\n // Add a model to the end of the collection.\n push: function(model, options) {\n return this.add(model, _.extend({at: this.length}, options));\n },\n\n // Remove a model from the end of the collection.\n pop: function(options) {\n var model = this.at(this.length - 1);\n return this.remove(model, options);\n },\n\n // Add a model to the beginning of the collection.\n unshift: function(model, options) {\n return this.add(model, _.extend({at: 0}, options));\n },\n\n // Remove a model from the beginning of the collection.\n shift: function(options) {\n var model = this.at(0);\n return this.remove(model, options);\n },\n\n // Slice out a sub-array of models from the collection.\n slice: function() {\n return slice.apply(this.models, arguments);\n },\n\n // Get a model from the set by id.\n get: function(obj) {\n if (obj == null) return void 0;\n var id = this.modelId(this._isModel(obj) ? obj.attributes : obj);\n return this._byId[obj] || this._byId[id] || this._byId[obj.cid];\n },\n\n // Get the model at the given index.\n at: function(index) {\n if (index < 0) index += this.length;\n return this.models[index];\n },\n\n // Return models with matching attributes. Useful for simple cases of\n // `filter`.\n where: function(attrs, first) {\n return this[first ? 'find' : 'filter'](attrs);\n },\n\n // Return the first model with matching attributes. Useful for simple cases\n // of `find`.\n findWhere: function(attrs) {\n return this.where(attrs, true);\n },\n\n // Force the collection to re-sort itself. You don't need to call this under\n // normal circumstances, as the set will maintain sort order as each item\n // is added.\n sort: function(options) {\n var comparator = this.comparator;\n if (!comparator) throw new Error('Cannot sort a set without a comparator');\n options || (options = {});\n\n var length = comparator.length;\n if (_.isFunction(comparator)) comparator = _.bind(comparator, this);\n\n // Run sort based on type of `comparator`.\n if (length === 1 || _.isString(comparator)) {\n this.models = this.sortBy(comparator);\n } else {\n this.models.sort(comparator);\n }\n if (!options.silent) this.trigger('sort', this, options);\n return this;\n },\n\n // Pluck an attribute from each model in the collection.\n pluck: function(attr) {\n return _.invoke(this.models, 'get', attr);\n },\n\n // Fetch the default set of models for this collection, resetting the\n // collection when they arrive. If `reset: true` is passed, the response\n // data will be passed through the `reset` method instead of `set`.\n fetch: function(options) {\n options = _.extend({parse: true}, options);\n var success = options.success;\n var collection = this;\n options.success = function(resp) {\n var method = options.reset ? 'reset' : 'set';\n collection[method](resp, options);\n if (success) success.call(options.context, collection, resp, options);\n collection.trigger('sync', collection, resp, options);\n };\n wrapError(this, options);\n return this.sync('read', this, options);\n },\n\n // Create a new instance of a model in this collection. Add the model to the\n // collection immediately, unless `wait: true` is passed, in which case we\n // wait for the server to agree.\n create: function(model, options) {\n options = options ? _.clone(options) : {};\n var wait = options.wait;\n model = this._prepareModel(model, options);\n if (!model) return false;\n if (!wait) this.add(model, options);\n var collection = this;\n var success = options.success;\n options.success = function(model, resp, callbackOpts) {\n if (wait) collection.add(model, callbackOpts);\n if (success) success.call(callbackOpts.context, model, resp, callbackOpts);\n };\n model.save(null, options);\n return model;\n },\n\n // **parse** converts a response into a list of models to be added to the\n // collection. The default implementation is just to pass it through.\n parse: function(resp, options) {\n return resp;\n },\n\n // Create a new collection with an identical list of models as this one.\n clone: function() {\n return new this.constructor(this.models, {\n model: this.model,\n comparator: this.comparator\n });\n },\n\n // Define how to uniquely identify models in the collection.\n modelId: function (attrs) {\n return attrs[this.model.prototype.idAttribute || 'id'];\n },\n\n // Private method to reset all internal state. Called when the collection\n // is first initialized or reset.\n _reset: function() {\n this.length = 0;\n this.models = [];\n this._byId = {};\n },\n\n // Prepare a hash of attributes (or other model) to be added to this\n // collection.\n _prepareModel: function(attrs, options) {\n if (this._isModel(attrs)) {\n if (!attrs.collection) attrs.collection = this;\n return attrs;\n }\n options = options ? _.clone(options) : {};\n options.collection = this;\n var model = new this.model(attrs, options);\n if (!model.validationError) return model;\n this.trigger('invalid', this, model.validationError, options);\n return false;\n },\n\n // Internal method called by both remove and set.\n _removeModels: function(models, options) {\n var removed = [];\n for (var i = 0; i < models.length; i++) {\n var model = this.get(models[i]);\n if (!model) continue;\n\n var index = this.indexOf(model);\n this.models.splice(index, 1);\n this.length--;\n\n if (!options.silent) {\n options.index = index;\n model.trigger('remove', model, this, options);\n }\n\n removed.push(model);\n this._removeReference(model, options);\n }\n return removed.length ? removed : false;\n },\n\n // Method for checking whether an object should be considered a model for\n // the purposes of adding to the collection.\n _isModel: function (model) {\n return model instanceof Model;\n },\n\n // Internal method to create a model's ties to a collection.\n _addReference: function(model, options) {\n this._byId[model.cid] = model;\n var id = this.modelId(model.attributes);\n if (id != null) this._byId[id] = model;\n model.on('all', this._onModelEvent, this);\n },\n\n // Internal method to sever a model's ties to a collection.\n _removeReference: function(model, options) {\n delete this._byId[model.cid];\n var id = this.modelId(model.attributes);\n if (id != null) delete this._byId[id];\n if (this === model.collection) delete model.collection;\n model.off('all', this._onModelEvent, this);\n },\n\n // Internal method called every time a model in the set fires an event.\n // Sets need to update their indexes when models change ids. All other\n // events simply proxy through. \"add\" and \"remove\" events that originate\n // in other collections are ignored.\n _onModelEvent: function(event, model, collection, options) {\n if ((event === 'add' || event === 'remove') && collection !== this) return;\n if (event === 'destroy') this.remove(model, options);\n if (event === 'change') {\n var prevId = this.modelId(model.previousAttributes());\n var id = this.modelId(model.attributes);\n if (prevId !== id) {\n if (prevId != null) delete this._byId[prevId];\n if (id != null) this._byId[id] = model;\n }\n }\n this.trigger.apply(this, arguments);\n }\n\n });\n\n // Underscore methods that we want to implement on the Collection.\n // 90% of the core usefulness of Backbone Collections is actually implemented\n // right here:\n var collectionMethods = { forEach: 3, each: 3, map: 3, collect: 3, reduce: 4,\n foldl: 4, inject: 4, reduceRight: 4, foldr: 4, find: 3, detect: 3, filter: 3,\n select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,\n contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,\n head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,\n without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,\n isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,\n sortBy: 3, indexBy: 3};\n\n // Mix in each Underscore method as a proxy to `Collection#models`.\n addUnderscoreMethods(Collection, collectionMethods, 'models');\n\n // Backbone.View\n // -------------\n\n // Backbone Views are almost more convention than they are actual code. A View\n // is simply a JavaScript object that represents a logical chunk of UI in the\n // DOM. This might be a single item, an entire list, a sidebar or panel, or\n // even the surrounding frame which wraps your whole app. Defining a chunk of\n // UI as a **View** allows you to define your DOM events declaratively, without\n // having to worry about render order ... and makes it easy for the view to\n // react to specific changes in the state of your models.\n\n // Creating a Backbone.View creates its initial element outside of the DOM,\n // if an existing element is not provided...\n var View = Backbone.View = function(options) {\n this.cid = _.uniqueId('view');\n _.extend(this, _.pick(options, viewOptions));\n this._ensureElement();\n this.initialize.apply(this, arguments);\n };\n\n // Cached regex to split keys for `delegate`.\n var delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n // List of view options to be set as properties.\n var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];\n\n // Set up all inheritable **Backbone.View** properties and methods.\n _.extend(View.prototype, Events, {\n\n // The default `tagName` of a View's element is `\"div\"`.\n tagName: 'div',\n\n // jQuery delegate for element lookup, scoped to DOM elements within the\n // current view. This should be preferred to global lookups where possible.\n $: function(selector) {\n return this.$el.find(selector);\n },\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // **render** is the core function that your view should override, in order\n // to populate its element (`this.el`), with the appropriate HTML. The\n // convention is for **render** to always return `this`.\n render: function() {\n return this;\n },\n\n // Remove this view by taking the element out of the DOM, and removing any\n // applicable Backbone.Events listeners.\n remove: function() {\n this._removeElement();\n this.stopListening();\n return this;\n },\n\n // Remove this view's element from the document and all event listeners\n // attached to it. Exposed for subclasses using an alternative DOM\n // manipulation API.\n _removeElement: function() {\n this.$el.remove();\n },\n\n // Change the view's element (`this.el` property) and re-delegate the\n // view's events on the new element.\n setElement: function(element) {\n this.undelegateEvents();\n this._setElement(element);\n this.delegateEvents();\n return this;\n },\n\n // Creates the `this.el` and `this.$el` references for this view using the\n // given `el`. `el` can be a CSS selector or an HTML string, a jQuery\n // context or an element. Subclasses can override this to utilize an\n // alternative DOM manipulation API and are only required to set the\n // `this.el` property.\n _setElement: function(el) {\n this.$el = el instanceof Backbone.$ ? el : Backbone.$(el);\n this.el = this.$el[0];\n },\n\n // Set callbacks, where `this.events` is a hash of\n //\n // *{\"event selector\": \"callback\"}*\n //\n // {\n // 'mousedown .title': 'edit',\n // 'click .button': 'save',\n // 'click .open': function(e) { ... }\n // }\n //\n // pairs. Callbacks will be bound to the view, with `this` set properly.\n // Uses event delegation for efficiency.\n // Omitting the selector binds the event to `this.el`.\n delegateEvents: function(events) {\n events || (events = _.result(this, 'events'));\n if (!events) return this;\n this.undelegateEvents();\n for (var key in events) {\n var method = events[key];\n if (!_.isFunction(method)) method = this[method];\n if (!method) continue;\n var match = key.match(delegateEventSplitter);\n this.delegate(match[1], match[2], _.bind(method, this));\n }\n return this;\n },\n\n // Add a single event listener to the view's element (or a child element\n // using `selector`). This only works for delegate-able events: not `focus`,\n // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer.\n delegate: function(eventName, selector, listener) {\n this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener);\n return this;\n },\n\n // Clears all callbacks previously bound to the view by `delegateEvents`.\n // You usually don't need to use this, but may wish to if you have multiple\n // Backbone views attached to the same DOM element.\n undelegateEvents: function() {\n if (this.$el) this.$el.off('.delegateEvents' + this.cid);\n return this;\n },\n\n // A finer-grained `undelegateEvents` for removing a single delegated event.\n // `selector` and `listener` are both optional.\n undelegate: function(eventName, selector, listener) {\n this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener);\n return this;\n },\n\n // Produces a DOM element to be assigned to your view. Exposed for\n // subclasses using an alternative DOM manipulation API.\n _createElement: function(tagName) {\n return document.createElement(tagName);\n },\n\n // Ensure that the View has a DOM element to render into.\n // If `this.el` is a string, pass it through `$()`, take the first\n // matching element, and re-assign it to `el`. Otherwise, create\n // an element from the `id`, `className` and `tagName` properties.\n _ensureElement: function() {\n if (!this.el) {\n var attrs = _.extend({}, _.result(this, 'attributes'));\n if (this.id) attrs.id = _.result(this, 'id');\n if (this.className) attrs['class'] = _.result(this, 'className');\n this.setElement(this._createElement(_.result(this, 'tagName')));\n this._setAttributes(attrs);\n } else {\n this.setElement(_.result(this, 'el'));\n }\n },\n\n // Set attributes from a hash on this view's element. Exposed for\n // subclasses using an alternative DOM manipulation API.\n _setAttributes: function(attributes) {\n this.$el.attr(attributes);\n }\n\n });\n\n // Backbone.sync\n // -------------\n\n // Override this function to change the manner in which Backbone persists\n // models to the server. You will be passed the type of request, and the\n // model in question. By default, makes a RESTful Ajax request\n // to the model's `url()`. Some possible customizations could be:\n //\n // * Use `setTimeout` to batch rapid-fire updates into a single request.\n // * Send up the models as XML instead of JSON.\n // * Persist models via WebSockets instead of Ajax.\n //\n // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests\n // as `POST`, with a `_method` parameter containing the true HTTP method,\n // as well as all requests with the body as `application/x-www-form-urlencoded`\n // instead of `application/json` with the model in a param named `model`.\n // Useful when interfacing with server-side languages like **PHP** that make\n // it difficult to read the body of `PUT` requests.\n Backbone.sync = function(method, model, options) {\n var type = methodMap[method];\n\n // Default options, unless specified.\n _.defaults(options || (options = {}), {\n emulateHTTP: Backbone.emulateHTTP,\n emulateJSON: Backbone.emulateJSON\n });\n\n // Default JSON-request options.\n var params = {type: type, dataType: 'json'};\n\n // Ensure that we have a URL.\n if (!options.url) {\n params.url = _.result(model, 'url') || urlError();\n }\n\n // Ensure that we have the appropriate request data.\n if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {\n params.contentType = 'application/json';\n params.data = JSON.stringify(options.attrs || model.toJSON(options));\n }\n\n // For older servers, emulate JSON by encoding the request into an HTML-form.\n if (options.emulateJSON) {\n params.contentType = 'application/x-www-form-urlencoded';\n params.data = params.data ? {model: params.data} : {};\n }\n\n // For older servers, emulate HTTP by mimicking the HTTP method with `_method`\n // And an `X-HTTP-Method-Override` header.\n if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {\n params.type = 'POST';\n if (options.emulateJSON) params.data._method = type;\n var beforeSend = options.beforeSend;\n options.beforeSend = function(xhr) {\n xhr.setRequestHeader('X-HTTP-Method-Override', type);\n if (beforeSend) return beforeSend.apply(this, arguments);\n };\n }\n\n // Don't process data on a non-GET request.\n if (params.type !== 'GET' && !options.emulateJSON) {\n params.processData = false;\n }\n\n // Pass along `textStatus` and `errorThrown` from jQuery.\n var error = options.error;\n options.error = function(xhr, textStatus, errorThrown) {\n options.textStatus = textStatus;\n options.errorThrown = errorThrown;\n if (error) error.call(options.context, xhr, textStatus, errorThrown);\n };\n\n // Make the request, allowing the user to override any Ajax options.\n var xhr = options.xhr = Backbone.ajax(_.extend(params, options));\n model.trigger('request', model, xhr, options);\n return xhr;\n };\n\n // Map from CRUD to HTTP for our default `Backbone.sync` implementation.\n var methodMap = {\n 'create': 'POST',\n 'update': 'PUT',\n 'patch': 'PATCH',\n 'delete': 'DELETE',\n 'read': 'GET'\n };\n\n // Set the default implementation of `Backbone.ajax` to proxy through to `$`.\n // Override this if you'd like to use a different library.\n Backbone.ajax = function() {\n return Backbone.$.ajax.apply(Backbone.$, arguments);\n };\n\n // Backbone.Router\n // ---------------\n\n // Routers map faux-URLs to actions, and fire events when routes are\n // matched. Creating a new one sets its `routes` hash, if not set statically.\n var Router = Backbone.Router = function(options) {\n options || (options = {});\n if (options.routes) this.routes = options.routes;\n this._bindRoutes();\n this.initialize.apply(this, arguments);\n };\n\n // Cached regular expressions for matching named param parts and splatted\n // parts of route strings.\n var optionalParam = /\\((.*?)\\)/g;\n var namedParam = /(\\(\\?)?:\\w+/g;\n var splatParam = /\\*\\w+/g;\n var escapeRegExp = /[\\-{}\\[\\]+?.,\\\\\\^$|#\\s]/g;\n\n // Set up all inheritable **Backbone.Router** properties and methods.\n _.extend(Router.prototype, Events, {\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // Manually bind a single named route to a callback. For example:\n //\n // this.route('search/:query/p:num', 'search', function(query, num) {\n // ...\n // });\n //\n route: function(route, name, callback) {\n if (!_.isRegExp(route)) route = this._routeToRegExp(route);\n if (_.isFunction(name)) {\n callback = name;\n name = '';\n }\n if (!callback) callback = this[name];\n var router = this;\n Backbone.history.route(route, function(fragment) {\n var args = router._extractParameters(route, fragment);\n if (router.execute(callback, args, name) !== false) {\n router.trigger.apply(router, ['route:' + name].concat(args));\n router.trigger('route', name, args);\n Backbone.history.trigger('route', router, name, args);\n }\n });\n return this;\n },\n\n // Execute a route handler with the provided parameters. This is an\n // excellent place to do pre-route setup or post-route cleanup.\n execute: function(callback, args, name) {\n if (callback) callback.apply(this, args);\n },\n\n // Simple proxy to `Backbone.history` to save a fragment into the history.\n navigate: function(fragment, options) {\n Backbone.history.navigate(fragment, options);\n return this;\n },\n\n // Bind all defined routes to `Backbone.history`. We have to reverse the\n // order of the routes here to support behavior where the most general\n // routes can be defined at the bottom of the route map.\n _bindRoutes: function() {\n if (!this.routes) return;\n this.routes = _.result(this, 'routes');\n var route, routes = _.keys(this.routes);\n while ((route = routes.pop()) != null) {\n this.route(route, this.routes[route]);\n }\n },\n\n // Convert a route string into a regular expression, suitable for matching\n // against the current location hash.\n _routeToRegExp: function(route) {\n route = route.replace(escapeRegExp, '\\\\$&')\n .replace(optionalParam, '(?:$1)?')\n .replace(namedParam, function(match, optional) {\n return optional ? match : '([^/?]+)';\n })\n .replace(splatParam, '([^?]*?)');\n return new RegExp('^' + route + '(?:\\\\?([\\\\s\\\\S]*))?$');\n },\n\n // Given a route, and a URL fragment that it matches, return the array of\n // extracted decoded parameters. Empty or unmatched parameters will be\n // treated as `null` to normalize cross-browser behavior.\n _extractParameters: function(route, fragment) {\n var params = route.exec(fragment).slice(1);\n return _.map(params, function(param, i) {\n // Don't decode the search params.\n if (i === params.length - 1) return param || null;\n return param ? decodeURIComponent(param) : null;\n });\n }\n\n });\n\n // Backbone.History\n // ----------------\n\n // Handles cross-browser history management, based on either\n // [pushState](http://diveintohtml5.info/history.html) and real URLs, or\n // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)\n // and URL fragments. If the browser supports neither (old IE, natch),\n // falls back to polling.\n var History = Backbone.History = function() {\n this.handlers = [];\n this.checkUrl = _.bind(this.checkUrl, this);\n\n // Ensure that `History` can be used outside of the browser.\n if (typeof window !== 'undefined') {\n this.location = window.location;\n this.history = window.history;\n }\n };\n\n // Cached regex for stripping a leading hash/slash and trailing space.\n var routeStripper = /^[#\\/]|\\s+$/g;\n\n // Cached regex for stripping leading and trailing slashes.\n var rootStripper = /^\\/+|\\/+$/g;\n\n // Cached regex for stripping urls of hash.\n var pathStripper = /#.*$/;\n\n // Has the history handling already been started?\n History.started = false;\n\n // Set up all inheritable **Backbone.History** properties and methods.\n _.extend(History.prototype, Events, {\n\n // The default interval to poll for hash changes, if necessary, is\n // twenty times a second.\n interval: 50,\n\n // Are we at the app root?\n atRoot: function() {\n var path = this.location.pathname.replace(/[^\\/]$/, '$&/');\n return path === this.root && !this.getSearch();\n },\n\n // Does the pathname match the root?\n matchRoot: function() {\n var path = this.decodeFragment(this.location.pathname);\n var root = path.slice(0, this.root.length - 1) + '/';\n return root === this.root;\n },\n\n // Unicode characters in `location.pathname` are percent encoded so they're\n // decoded for comparison. `%25` should not be decoded since it may be part\n // of an encoded parameter.\n decodeFragment: function(fragment) {\n return decodeURI(fragment.replace(/%25/g, '%2525'));\n },\n\n // In IE6, the hash fragment and search params are incorrect if the\n // fragment contains `?`.\n getSearch: function() {\n var match = this.location.href.replace(/#.*/, '').match(/\\?.+/);\n return match ? match[0] : '';\n },\n\n // Gets the true hash value. Cannot use location.hash directly due to bug\n // in Firefox where location.hash will always be decoded.\n getHash: function(window) {\n var match = (window || this).location.href.match(/#(.*)$/);\n return match ? match[1] : '';\n },\n\n // Get the pathname and search params, without the root.\n getPath: function() {\n var path = this.decodeFragment(\n this.location.pathname + this.getSearch()\n ).slice(this.root.length - 1);\n return path.charAt(0) === '/' ? path.slice(1) : path;\n },\n\n // Get the cross-browser normalized URL fragment from the path or hash.\n getFragment: function(fragment) {\n if (fragment == null) {\n if (this._usePushState || !this._wantsHashChange) {\n fragment = this.getPath();\n } else {\n fragment = this.getHash();\n }\n }\n return fragment.replace(routeStripper, '');\n },\n\n // Start the hash change handling, returning `true` if the current URL matches\n // an existing route, and `false` otherwise.\n start: function(options) {\n if (History.started) throw new Error('Backbone.history has already been started');\n History.started = true;\n\n // Figure out the initial configuration. Do we need an iframe?\n // Is pushState desired ... is it available?\n this.options = _.extend({root: '/'}, this.options, options);\n this.root = this.options.root;\n this._wantsHashChange = this.options.hashChange !== false;\n this._hasHashChange = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7);\n this._useHashChange = this._wantsHashChange && this._hasHashChange;\n this._wantsPushState = !!this.options.pushState;\n this._hasPushState = !!(this.history && this.history.pushState);\n this._usePushState = this._wantsPushState && this._hasPushState;\n this.fragment = this.getFragment();\n\n // Normalize root to always include a leading and trailing slash.\n this.root = ('/' + this.root + '/').replace(rootStripper, '/');\n\n // Transition from hashChange to pushState or vice versa if both are\n // requested.\n if (this._wantsHashChange && this._wantsPushState) {\n\n // If we've started off with a route from a `pushState`-enabled\n // browser, but we're currently in a browser that doesn't support it...\n if (!this._hasPushState && !this.atRoot()) {\n var root = this.root.slice(0, -1) || '/';\n this.location.replace(root + '#' + this.getPath());\n // Return immediately as browser will do redirect to new url\n return true;\n\n // Or if we've started out with a hash-based route, but we're currently\n // in a browser where it could be `pushState`-based instead...\n } else if (this._hasPushState && this.atRoot()) {\n this.navigate(this.getHash(), {replace: true});\n }\n\n }\n\n // Proxy an iframe to handle location events if the browser doesn't\n // support the `hashchange` event, HTML5 history, or the user wants\n // `hashChange` but not `pushState`.\n if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {\n this.iframe = document.createElement('iframe');\n this.iframe.src = 'javascript:0';\n this.iframe.style.display = 'none';\n this.iframe.tabIndex = -1;\n var body = document.body;\n // Using `appendChild` will throw on IE < 9 if the document is not ready.\n var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow;\n iWindow.document.open();\n iWindow.document.close();\n iWindow.location.hash = '#' + this.fragment;\n }\n\n // Add a cross-platform `addEventListener` shim for older browsers.\n var addEventListener = window.addEventListener || function (eventName, listener) {\n return attachEvent('on' + eventName, listener);\n };\n\n // Depending on whether we're using pushState or hashes, and whether\n // 'onhashchange' is supported, determine how we check the URL state.\n if (this._usePushState) {\n addEventListener('popstate', this.checkUrl, false);\n } else if (this._useHashChange && !this.iframe) {\n addEventListener('hashchange', this.checkUrl, false);\n } else if (this._wantsHashChange) {\n this._checkUrlInterval = setInterval(this.checkUrl, this.interval);\n }\n\n if (!this.options.silent) return this.loadUrl();\n },\n\n // Disable Backbone.history, perhaps temporarily. Not useful in a real app,\n // but possibly useful for unit testing Routers.\n stop: function() {\n // Add a cross-platform `removeEventListener` shim for older browsers.\n var removeEventListener = window.removeEventListener || function (eventName, listener) {\n return detachEvent('on' + eventName, listener);\n };\n\n // Remove window listeners.\n if (this._usePushState) {\n removeEventListener('popstate', this.checkUrl, false);\n } else if (this._useHashChange && !this.iframe) {\n removeEventListener('hashchange', this.checkUrl, false);\n }\n\n // Clean up the iframe if necessary.\n if (this.iframe) {\n document.body.removeChild(this.iframe);\n this.iframe = null;\n }\n\n // Some environments will throw when clearing an undefined interval.\n if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);\n History.started = false;\n },\n\n // Add a route to be tested when the fragment changes. Routes added later\n // may override previous routes.\n route: function(route, callback) {\n this.handlers.unshift({route: route, callback: callback});\n },\n\n // Checks the current URL to see if it has changed, and if it has,\n // calls `loadUrl`, normalizing across the hidden iframe.\n checkUrl: function(e) {\n var current = this.getFragment();\n\n // If the user pressed the back button, the iframe's hash will have\n // changed and we should use that for comparison.\n if (current === this.fragment && this.iframe) {\n current = this.getHash(this.iframe.contentWindow);\n }\n\n if (current === this.fragment) return false;\n if (this.iframe) this.navigate(current);\n this.loadUrl();\n },\n\n // Attempt to load the current URL fragment. If a route succeeds with a\n // match, returns `true`. If no defined routes matches the fragment,\n // returns `false`.\n loadUrl: function(fragment) {\n // If the root doesn't match, no routes can match either.\n if (!this.matchRoot()) return false;\n fragment = this.fragment = this.getFragment(fragment);\n return _.some(this.handlers, function(handler) {\n if (handler.route.test(fragment)) {\n handler.callback(fragment);\n return true;\n }\n });\n },\n\n // Save a fragment into the hash history, or replace the URL state if the\n // 'replace' option is passed. You are responsible for properly URL-encoding\n // the fragment in advance.\n //\n // The options object can contain `trigger: true` if you wish to have the\n // route callback be fired (not usually desirable), or `replace: true`, if\n // you wish to modify the current URL without adding an entry to the history.\n navigate: function(fragment, options) {\n if (!History.started) return false;\n if (!options || options === true) options = {trigger: !!options};\n\n // Normalize the fragment.\n fragment = this.getFragment(fragment || '');\n\n // Don't include a trailing slash on the root.\n var root = this.root;\n if (fragment === '' || fragment.charAt(0) === '?') {\n root = root.slice(0, -1) || '/';\n }\n var url = root + fragment;\n\n // Strip the hash and decode for matching.\n fragment = this.decodeFragment(fragment.replace(pathStripper, ''));\n\n if (this.fragment === fragment) return;\n this.fragment = fragment;\n\n // If pushState is available, we use it to set the fragment as a real URL.\n if (this._usePushState) {\n this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);\n\n // If hash changes haven't been explicitly disabled, update the hash\n // fragment to store history.\n } else if (this._wantsHashChange) {\n this._updateHash(this.location, fragment, options.replace);\n if (this.iframe && (fragment !== this.getHash(this.iframe.contentWindow))) {\n var iWindow = this.iframe.contentWindow;\n\n // Opening and closing the iframe tricks IE7 and earlier to push a\n // history entry on hash-tag change. When replace is true, we don't\n // want this.\n if (!options.replace) {\n iWindow.document.open();\n iWindow.document.close();\n }\n\n this._updateHash(iWindow.location, fragment, options.replace);\n }\n\n // If you've told us that you explicitly don't want fallback hashchange-\n // based history, then `navigate` becomes a page refresh.\n } else {\n return this.location.assign(url);\n }\n if (options.trigger) return this.loadUrl(fragment);\n },\n\n // Update the hash location, either replacing the current entry, or adding\n // a new one to the browser history.\n _updateHash: function(location, fragment, replace) {\n if (replace) {\n var href = location.href.replace(/(javascript:|#).*$/, '');\n location.replace(href + '#' + fragment);\n } else {\n // Some browsers require that `hash` contains a leading #.\n location.hash = '#' + fragment;\n }\n }\n\n });\n\n // Create the default Backbone.history.\n Backbone.history = new History;\n\n // Helpers\n // -------\n\n // Helper function to correctly set up the prototype chain for subclasses.\n // Similar to `goog.inherits`, but uses a hash of prototype properties and\n // class properties to be extended.\n var extend = function(protoProps, staticProps) {\n var parent = this;\n var child;\n\n // The constructor function for the new subclass is either defined by you\n // (the \"constructor\" property in your `extend` definition), or defaulted\n // by us to simply call the parent constructor.\n if (protoProps && _.has(protoProps, 'constructor')) {\n child = protoProps.constructor;\n } else {\n child = function(){ return parent.apply(this, arguments); };\n }\n\n // Add static properties to the constructor function, if supplied.\n _.extend(child, parent, staticProps);\n\n // Set the prototype chain to inherit from `parent`, without calling\n // `parent` constructor function.\n var Surrogate = function(){ this.constructor = child; };\n Surrogate.prototype = parent.prototype;\n child.prototype = new Surrogate;\n\n // Add prototype properties (instance properties) to the subclass,\n // if supplied.\n if (protoProps) _.extend(child.prototype, protoProps);\n\n // Set a convenience property in case the parent's prototype is needed\n // later.\n child.__super__ = parent.prototype;\n\n return child;\n };\n\n // Set up inheritance for the model, collection, router, view and history.\n Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;\n\n // Throw an error when a URL is needed, and none is supplied.\n var urlError = function() {\n throw new Error('A \"url\" property or function must be specified');\n };\n\n // Wrap an optional error callback with a fallback error event.\n var wrapError = function(model, options) {\n var error = options.error;\n options.error = function(resp) {\n if (error) error.call(options.context, model, resp, options);\n model.trigger('error', model, resp, options);\n };\n };\n\n return Backbone;\n\n}));\n","/*!\n * jQuery JavaScript Library v1.12.4\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-05-20T17:17Z\n */\n\n(function( global, factory ) {\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n}(typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can't be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n//\"use strict\";\nvar deletedIds = [];\n\nvar document = window.document;\n\nvar slice = deletedIds.slice;\n\nvar concat = deletedIds.concat;\n\nvar push = deletedIds.push;\n\nvar indexOf = deletedIds.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n\tversion = \"1.12.4\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android<4.1, IE<9\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: deletedIds.sort,\n\tsplice: deletedIds.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar src, copyIsArray, copy, name, options, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type( obj ) === \"function\";\n\t},\n\n\tisArray: Array.isArray || function( obj ) {\n\t\treturn jQuery.type( obj ) === \"array\";\n\t},\n\n\tisWindow: function( obj ) {\n\t\t/* jshint eqeqeq: false */\n\t\treturn obj != null && obj == obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\n\t\tvar realStringObj = obj && obj.toString();\n\t\treturn !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar key;\n\n\t\t// Must be an Object.\n\t\t// Because of IE, we also have to check the presence of the constructor property.\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\n\t\tif ( !obj || jQuery.type( obj ) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Not own constructor property must be Object\n\t\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call( obj, \"constructor\" ) &&\n\t\t\t\t!hasOwn.call( obj.constructor.prototype, \"isPrototypeOf\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch ( e ) {\n\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\n\t\t\treturn false;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Handle iteration over inherited properties before own properties.\n\t\tif ( !support.ownFirst ) {\n\t\t\tfor ( key in obj ) {\n\t\t\t\treturn hasOwn.call( obj, key );\n\t\t\t}\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own.\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || hasOwn.call( obj, key );\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + \"\";\n\t\t}\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Workarounds based on findings by Jim Driscoll\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\n\tglobalEval: function( data ) {\n\t\tif ( data && jQuery.trim( data ) ) {\n\n\t\t\t// We use execScript on Internet Explorer\n\t\t\t// We use an anonymous function so that context is window\n\t\t\t// rather than jQuery in Firefox\n\t\t\t( window.execScript || function( data ) {\n\t\t\t\twindow[ \"eval\" ].call( window, data ); // jscs:ignore requireDotNotation\n\t\t\t} )( data );\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android<4.1, IE<9\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\tvar len;\n\n\t\tif ( arr ) {\n\t\t\tif ( indexOf ) {\n\t\t\t\treturn indexOf.call( arr, elem, i );\n\t\t\t}\n\n\t\t\tlen = arr.length;\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\n\n\t\t\tfor ( ; i < len; i++ ) {\n\n\t\t\t\t// Skip accessing in sparse arrays\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\twhile ( j < len ) {\n\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)\n\t\tif ( len !== len ) {\n\t\t\twhile ( second[ j ] !== undefined ) {\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t\t}\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar args, proxy, tmp;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: function() {\n\t\treturn +( new Date() );\n\t},\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\n// JSHint would error on this code due to the Symbol not being defined in ES5.\n// Defining this global in .jshintrc would create a danger of using the global\n// unguarded in another place, it seems safer to just disable JSHint for these\n// three lines.\n/* jshint ignore: start */\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ];\n}\n/* jshint ignore: end */\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: iOS 8.2 (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.1\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-10-17\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// http://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, nidselect, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rescape, \"\\\\$&\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\tnidselect = ridentifier.test( nid ) ? \"#\" + nid : \"[id='\" + nid + \"']\";\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = nidselect + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\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}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, parent,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( (parent = document.defaultView) && parent.top !== parent ) {\n\t\t// Support: IE 11\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( document.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\treturn m ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( div ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !div.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\n\t\t\tif ( !div.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\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\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( (oldCache = uniqueCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\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};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\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\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"<input/>\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/ );\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( jQuery.inArray( elem, qualifier ) > -1 ) !== not;\n\t} );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tret = [],\n\t\t\tself = this,\n\t\t\tlen = self.length;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// init accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector.charAt( 0 ) === \"<\" &&\n\t\t\t\tselector.charAt( selector.length - 1 ) === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id !== match[ 2 ] ) {\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn typeof root.ready !== \"undefined\" ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar i,\n\t\t\ttargets = jQuery( target, this ),\n\t\t\tlen = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && ( pos ?\n\t\t\t\t\tpos.index( cur ) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn jQuery.inArray( this[ 0 ], jQuery( elem ) );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem, this );\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: 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\nfunction sibling( cur, dir ) {\n\tdo {\n\t\tcur = cur[ dir ];\n\t} while ( cur && cur.nodeType !== 1 );\n\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\n\t\t\telem.contentDocument || elem.contentWindow.document :\n\t\t\tjQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar ret = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tret = jQuery.filter( selector, ret );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tret = jQuery.uniqueSort( ret );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tret = ret.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnotwhite = ( /\\S+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = true;\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ) ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis === promise ? newDefer.promise() : this,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add( function() {\n\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 ||\n\t\t\t\t( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred.\n\t\t\t// If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) )\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n} );\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n\n\t// Add the callback\n\tjQuery.ready.promise().done( fn );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\tjQuery( document ).triggerHandler( \"ready\" );\n\t\t\tjQuery( document ).off( \"ready\" );\n\t\t}\n\t}\n} );\n\n/**\n * Clean-up method for dom ready events\n */\nfunction detach() {\n\tif ( document.addEventListener ) {\n\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\t\twindow.removeEventListener( \"load\", completed );\n\n\t} else {\n\t\tdocument.detachEvent( \"onreadystatechange\", completed );\n\t\twindow.detachEvent( \"onload\", completed );\n\t}\n}\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called\n\t\t// after the browser event has already occurred.\n\t\t// Support: IE6-10\n\t\t// Older IE sometimes signals \"interactive\" too soon\n\t\tif ( document.readyState === \"complete\" ||\n\t\t\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\twindow.setTimeout( jQuery.ready );\n\n\t\t// Standards-based browsers support DOMContentLoaded\n\t\t} else if ( document.addEventListener ) {\n\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed );\n\n\t\t// If IE event model is used\n\t\t} else {\n\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.attachEvent( \"onload\", completed );\n\n\t\t\t// If IE and not a frame\n\t\t\t// continually check to see if the document is ready\n\t\t\tvar top = false;\n\n\t\t\ttry {\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\n\t\t\t} catch ( e ) {}\n\n\t\t\tif ( top && top.doScroll ) {\n\t\t\t\t( function doScrollCheck() {\n\t\t\t\t\tif ( !jQuery.isReady ) {\n\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\t\t\t\t\ttop.doScroll( \"left\" );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn window.setTimeout( doScrollCheck, 50 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// detach all dom ready events\n\t\t\t\t\t\tdetach();\n\n\t\t\t\t\t\t// and execute any waiting functions\n\t\t\t\t\t\tjQuery.ready();\n\t\t\t\t\t}\n\t\t\t\t} )();\n\t\t\t}\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Support: IE<9\n// Iteration over object's inherited properties before its own\nvar i;\nfor ( i in jQuery( support ) ) {\n\tbreak;\n}\nsupport.ownFirst = i === \"0\";\n\n// Note: most support tests are defined in their respective modules.\n// false until the test is run\nsupport.inlineBlockNeedsLayout = false;\n\n// Execute ASAP in case we need to set body.style.zoom\njQuery( function() {\n\n\t// Minified: var a,b,c,d\n\tvar val, div, body, container;\n\n\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\n\tif ( !body || !body.style ) {\n\n\t\t// Return for frameset docs that don't have a body\n\t\treturn;\n\t}\n\n\t// Setup\n\tdiv = document.createElement( \"div\" );\n\tcontainer = document.createElement( \"div\" );\n\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n\tbody.appendChild( container ).appendChild( div );\n\n\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\n\t\t// Support: IE<8\n\t\t// Check if natively block-level elements act like inline-block\n\t\t// elements when setting their display to 'inline' and giving\n\t\t// them layout\n\t\tdiv.style.cssText = \"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\";\n\n\t\tsupport.inlineBlockNeedsLayout = val = div.offsetWidth === 3;\n\t\tif ( val ) {\n\n\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\n\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\n\t\t\t// Support: IE<8\n\t\t\tbody.style.zoom = 1;\n\t\t}\n\t}\n\n\tbody.removeChild( container );\n} );\n\n\n( function() {\n\tvar div = document.createElement( \"div\" );\n\n\t// Support: IE<9\n\tsupport.deleteExpando = true;\n\ttry {\n\t\tdelete div.test;\n\t} catch ( e ) {\n\t\tsupport.deleteExpando = false;\n\t}\n\n\t// Null elements to avoid leaks in IE.\n\tdiv = null;\n} )();\nvar acceptData = function( elem ) {\n\tvar noData = jQuery.noData[ ( elem.nodeName + \" \" ).toLowerCase() ],\n\t\tnodeType = +elem.nodeType || 1;\n\n\t// Do not set data on non-element DOM nodes because it will not be cleared (#8335).\n\treturn nodeType !== 1 && nodeType !== 9 ?\n\t\tfalse :\n\n\t\t// Nodes accept data unless otherwise specified; rejection can be conditional\n\t\t!noData || noData !== true && elem.getAttribute( \"classid\" ) === noData;\n};\n\n\n\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /([A-Z])/g;\n\nfunction dataAttr( elem, key, data ) {\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tjQuery.data( elem, key, data );\n\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\n\treturn data;\n}\n\n// checks a cache object for emptiness\nfunction isEmptyDataObject( obj ) {\n\tvar name;\n\tfor ( name in obj ) {\n\n\t\t// if the public data object is empty, the private is still empty\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[ name ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( name !== \"toJSON\" ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ) {\n\tif ( !acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar ret, thisCache,\n\t\tinternalKey = jQuery.expando,\n\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\n\t\t// can't GC object references properly across the DOM-JS boundary\n\t\tisNode = elem.nodeType,\n\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\n\t\t// attached directly to the object so GC can occur automatically\n\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t// Only defining an ID for JS objects if its cache already exists allows\n\t\t// the code to shortcut on the same path as a DOM node with no cache\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\n\n\t// Avoid doing any more work than we need to when trying to get data on an\n\t// object that has no data at all\n\tif ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&\n\t\tdata === undefined && typeof name === \"string\" ) {\n\t\treturn;\n\t}\n\n\tif ( !id ) {\n\n\t\t// Only DOM nodes need a new unique ID for each element since their data\n\t\t// ends up in the global cache\n\t\tif ( isNode ) {\n\t\t\tid = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;\n\t\t} else {\n\t\t\tid = internalKey;\n\t\t}\n\t}\n\n\tif ( !cache[ id ] ) {\n\n\t\t// Avoid exposing jQuery metadata on plain JS objects when the object\n\t\t// is serialized using JSON.stringify\n\t\tcache[ id ] = isNode ? {} : { toJSON: jQuery.noop };\n\t}\n\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\n\t// shallow copied over onto the existing cache\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\n\t\tif ( pvt ) {\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\n\t\t} else {\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\n\t\t}\n\t}\n\n\tthisCache = cache[ id ];\n\n\t// jQuery data() is stored in a separate object inside the object's internal data\n\t// cache in order to avoid key collisions between internal data and user-defined\n\t// data.\n\tif ( !pvt ) {\n\t\tif ( !thisCache.data ) {\n\t\t\tthisCache.data = {};\n\t\t}\n\n\t\tthisCache = thisCache.data;\n\t}\n\n\tif ( data !== undefined ) {\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\n\t}\n\n\t// Check for both converted-to-camel and non-converted data property names\n\t// If a data property was specified\n\tif ( typeof name === \"string\" ) {\n\n\t\t// First Try to find as-is property data\n\t\tret = thisCache[ name ];\n\n\t\t// Test for null|undefined property data\n\t\tif ( ret == null ) {\n\n\t\t\t// Try to find the camelCased property\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\n\t\t}\n\t} else {\n\t\tret = thisCache;\n\t}\n\n\treturn ret;\n}\n\nfunction internalRemoveData( elem, name, pvt ) {\n\tif ( !acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar thisCache, i,\n\t\tisNode = elem.nodeType,\n\n\t\t// See jQuery.data for more information\n\t\tcache = isNode ? jQuery.cache : elem,\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\n\n\t// If there is already no cache entry for this object, there is no\n\t// purpose in continuing\n\tif ( !cache[ id ] ) {\n\t\treturn;\n\t}\n\n\tif ( name ) {\n\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\n\n\t\tif ( thisCache ) {\n\n\t\t\t// Support array or space separated string names for data keys\n\t\t\tif ( !jQuery.isArray( name ) ) {\n\n\t\t\t\t// try the string as a key before any manipulation\n\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\tname = [ name ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\n\t\t\t\t\tname = jQuery.camelCase( name );\n\t\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\t\tname = [ name ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tname = name.split( \" \" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\n\t\t\t}\n\n\t\t\ti = name.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete thisCache[ name[ i ] ];\n\t\t\t}\n\n\t\t\t// If there is no data left in the cache, we want to continue\n\t\t\t// and let the cache object itself get destroyed\n\t\t\tif ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// See jQuery.data for more information\n\tif ( !pvt ) {\n\t\tdelete cache[ id ].data;\n\n\t\t// Don't destroy the parent cache unless the internal data object\n\t\t// had been the only thing left in it\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Destroy the cache\n\tif ( isNode ) {\n\t\tjQuery.cleanData( [ elem ], true );\n\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\n\t/* jshint eqeqeq: false */\n\t} else if ( support.deleteExpando || cache != cache.window ) {\n\t\t/* jshint eqeqeq: true */\n\t\tdelete cache[ id ];\n\n\t// When all else fails, undefined\n\t} else {\n\t\tcache[ id ] = undefined;\n\t}\n}\n\njQuery.extend( {\n\tcache: {},\n\n\t// The following elements (space-suffixed to avoid Object.prototype collisions)\n\t// throw uncatchable exceptions if you attempt to set expando properties\n\tnoData: {\n\t\t\"applet \": true,\n\t\t\"embed \": true,\n\n\t\t// ...but Flash objects (which have this classid) *can* handle expandos\n\t\t\"object \": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t},\n\n\thasData: function( elem ) {\n\t\telem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ];\n\t\treturn !!elem && !isEmptyDataObject( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name );\n\t},\n\n\t// For internal use only.\n\t_data: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data, true );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name, true );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Special expections of .data basically thwart jQuery.access,\n\t\t// so implement the relevant behavior ourselves\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = jQuery.data( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE11+\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\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\tjQuery._data( elem, \"parsedAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tjQuery.data( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn arguments.length > 1 ?\n\n\t\t\t// Sets one value\n\t\t\tthis.each( function() {\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t} ) :\n\n\t\t\t// Gets one value\n\t\t\t// Try to fetch any internally stored data first\n\t\t\telem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeData( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = jQuery._data( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// not intended for public consumption - generates a queueHooks object,\n\t// or returns the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\n\t\t\t\tjQuery._removeData( elem, key );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\n\n\n( function() {\n\tvar shrinkWrapBlocksVal;\n\n\tsupport.shrinkWrapBlocks = function() {\n\t\tif ( shrinkWrapBlocksVal != null ) {\n\t\t\treturn shrinkWrapBlocksVal;\n\t\t}\n\n\t\t// Will be changed later if needed.\n\t\tshrinkWrapBlocksVal = false;\n\n\t\t// Minified: var b,c,d\n\t\tvar div, body, container;\n\n\t\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\n\t\tif ( !body || !body.style ) {\n\n\t\t\t// Test fired too early or in an unsupported environment, exit.\n\t\t\treturn;\n\t\t}\n\n\t\t// Setup\n\t\tdiv = document.createElement( \"div\" );\n\t\tcontainer = document.createElement( \"div\" );\n\t\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n\t\tbody.appendChild( container ).appendChild( div );\n\n\t\t// Support: IE6\n\t\t// Check if elements with layout shrink-wrap their children\n\t\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border\n\t\t\tdiv.style.cssText =\n\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\n\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;\" +\n\t\t\t\t\"padding:1px;width:1px;zoom:1\";\n\t\t\tdiv.appendChild( document.createElement( \"div\" ) ).style.width = \"5px\";\n\t\t\tshrinkWrapBlocksVal = div.offsetWidth !== 3;\n\t\t}\n\n\t\tbody.removeChild( container );\n\n\t\treturn shrinkWrapBlocksVal;\n\t};\n\n} )();\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHidden = function( elem, el ) {\n\n\t\t// isHidden might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\t\treturn jQuery.css( elem, \"display\" ) === \"none\" ||\n\t\t\t!jQuery.contains( elem.ownerDocument, elem );\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted,\n\t\tscale = 1,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() { return tween.cur(); } :\n\t\t\tfunction() { return jQuery.css( elem, prop, \"\" ); },\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\tdo {\n\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\n\t\t\tscale = scale || \".5\";\n\n\t\t\t// Adjust and apply\n\t\t\tinitialInUnit = initialInUnit / scale;\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\n\t\t} while (\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\n\t\t);\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlength = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ],\n\t\t\t\t\tkey,\n\t\t\t\t\traw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlength ? fn( elems[ 0 ], key ) : emptyGet;\n};\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([\\w:-]+)/ );\n\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\n\nvar rleadingWhitespace = ( /^\\s+/ );\n\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|\" +\n\t\t\"details|dialog|figcaption|figure|footer|header|hgroup|main|\" +\n\t\t\"mark|meter|nav|output|picture|progress|section|summary|template|time|video\";\n\n\n\nfunction createSafeFragment( document ) {\n\tvar list = nodeNames.split( \"|\" ),\n\t\tsafeFrag = document.createDocumentFragment();\n\n\tif ( safeFrag.createElement ) {\n\t\twhile ( list.length ) {\n\t\t\tsafeFrag.createElement(\n\t\t\t\tlist.pop()\n\t\t\t);\n\t\t}\n\t}\n\treturn safeFrag;\n}\n\n\n( function() {\n\tvar div = document.createElement( \"div\" ),\n\t\tfragment = document.createDocumentFragment(),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Setup\n\tdiv.innerHTML = \" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\n\n\t// IE strips leading whitespace when .innerHTML is used\n\tsupport.leadingWhitespace = div.firstChild.nodeType === 3;\n\n\t// Make sure that tbody elements aren't automatically inserted\n\t// IE will insert them into empty tables\n\tsupport.tbody = !div.getElementsByTagName( \"tbody\" ).length;\n\n\t// Make sure that link elements get serialized correctly by innerHTML\n\t// This requires a wrapper element in IE\n\tsupport.htmlSerialize = !!div.getElementsByTagName( \"link\" ).length;\n\n\t// Makes sure cloning an html5 element does not cause problems\n\t// Where outerHTML is undefined, this still works\n\tsupport.html5Clone =\n\t\tdocument.createElement( \"nav\" ).cloneNode( true ).outerHTML !== \"<:nav></:nav>\";\n\n\t// Check if a disconnected checkbox will retain its checked\n\t// value of true after appended to the DOM (IE6/7)\n\tinput.type = \"checkbox\";\n\tinput.checked = true;\n\tfragment.appendChild( input );\n\tsupport.appendChecked = input.checked;\n\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\t// Support: IE6-IE11+\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// #11217 - WebKit loses check when the name is after the checked attribute\n\tfragment.appendChild( div );\n\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput = document.createElement( \"input\" );\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3\n\t// old WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<9\n\t// Cloned elements keep attachEvent handlers, we use addEventListener on IE9+\n\tsupport.noCloneEvent = !!div.addEventListener;\n\n\t// Support: IE<9\n\t// Since attributes and properties are the same in IE,\n\t// cleanData must set properties to undefined rather than use removeAttribute\n\tdiv[ jQuery.expando ] = 1;\n\tsupport.attributes = !div.getAttribute( jQuery.expando );\n} )();\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\n\tarea: [ 1, \"<map>\", \"</map>\" ],\n\n\t// Support: IE8\n\tparam: [ 1, \"<object>\", \"</object>\" ],\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t// unless wrapped in a div with non-breaking characters in front of it.\n\t_default: support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X<div>\", \"</div>\" ]\n};\n\n// Support: IE8-IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\tvar elems, elem,\n\t\ti = 0,\n\t\tfound = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== \"undefined\" ?\n\t\t\t\tcontext.querySelectorAll( tag || \"*\" ) :\n\t\t\t\tundefined;\n\n\tif ( !found ) {\n\t\tfor ( found = [], elems = context.childNodes || context;\n\t\t\t( elem = elems[ i ] ) != null;\n\t\t\ti++\n\t\t) {\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\n\t\t\t\tfound.push( elem );\n\t\t\t} else {\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], found ) :\n\t\tfound;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\n\t\tjQuery._data(\n\t\t\telem,\n\t\t\t\"globalEval\",\n\t\t\t!refElements || jQuery._data( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/,\n\trtbody = /<tbody/i;\n\nfunction fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar j, elem, contains,\n\t\ttmp, tag, tbody, wrap,\n\t\tl = elems.length,\n\n\t\t// Ensure a safe fragment\n\t\tsafe = createSafeFragment( context ),\n\n\t\tnodes = [],\n\t\ti = 0;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || safe.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Manually add leading whitespace removed by IE\n\t\t\t\tif ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\n\t\t\t\t\tnodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );\n\t\t\t\t}\n\n\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\n\t\t\t\tif ( !support.tbody ) {\n\n\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\n\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\ttmp.firstChild :\n\n\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\n\t\t\t\t\t\twrap[ 1 ] === \"<table>\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\t\ttmp :\n\t\t\t\t\t\t\t0;\n\n\t\t\t\t\tj = elem && elem.childNodes.length;\n\t\t\t\t\twhile ( j-- ) {\n\t\t\t\t\t\tif ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), \"tbody\" ) &&\n\t\t\t\t\t\t\t!tbody.childNodes.length ) {\n\n\t\t\t\t\t\t\telem.removeChild( tbody );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Fix #12392 for WebKit and IE > 9\n\t\t\t\ttmp.textContent = \"\";\n\n\t\t\t\t// Fix #12392 for oldIE\n\t\t\t\twhile ( tmp.firstChild ) {\n\t\t\t\t\ttmp.removeChild( tmp.firstChild );\n\t\t\t\t}\n\n\t\t\t\t// Remember the top-level container for proper cleanup\n\t\t\t\ttmp = safe.lastChild;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fix #11356: Clear elements from fragment\n\tif ( tmp ) {\n\t\tsafe.removeChild( tmp );\n\t}\n\n\t// Reset defaultChecked for any radios and checkboxes\n\t// about to be appended to the DOM in IE 6/7 (#8060)\n\tif ( !support.appendChecked ) {\n\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\n\t}\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\ttmp = null;\n\n\treturn safe;\n}\n\n\n( function() {\n\tvar i, eventName,\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)\n\tfor ( i in { submit: true, change: true, focusin: true } ) {\n\t\teventName = \"on\" + i;\n\n\t\tif ( !( support[ i ] = eventName in window ) ) {\n\n\t\t\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)\n\t\t\tdiv.setAttribute( eventName, \"t\" );\n\t\t\tsupport[ i ] = div.attributes[ eventName ].expando === false;\n\t\t}\n\t}\n\n\t// Null elements to avoid leaks in IE.\n\tdiv = null;\n} )();\n\n\nvar rformElems = /^(?:input|select|textarea)$/i,\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE9\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\t\tvar tmp, events, t, handleObjIn,\n\t\t\tspecial, eventHandle, handleObj,\n\t\t\thandlers, type, namespaces, origType,\n\t\t\telemData = jQuery._data( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" &&\n\t\t\t\t\t( !e || jQuery.event.triggered !== e.type ) ?\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\n\t\t\t\t\tundefined;\n\t\t\t};\n\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak\n\t\t\t// with IE non-native events\n\t\t\teventHandle.elem = elem;\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\n\n\t\t\t\t\t} else if ( elem.attachEvent ) {\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\t\tvar j, handleObj, tmp,\n\t\t\torigCount, t, events,\n\t\t\tspecial, handlers, type,\n\t\t\tnamespaces, origType,\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdelete elemData.handle;\n\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\n\t\t\t// so use it instead of delete\n\t\t\tjQuery._removeData( elem, \"events\" );\n\t\t}\n\t},\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\t\tvar handle, ontype, cur,\n\t\t\tbubbleType, special, tmp, i,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tjQuery._data( cur, \"handle\" );\n\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif (\n\t\t\t\t( !special._default ||\n\t\t\t\t special._default.apply( eventPath.pop(), data ) === false\n\t\t\t\t) && acceptData( elem )\n\t\t\t) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\ttry {\n\t\t\t\t\t\telem[ type ]();\n\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\n\t\t\t\t\t}\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, j, ret, matched, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\targs = slice.call( arguments ),\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\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}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Support (at least): Chrome, IE9\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG <use> instance trees (#13180)\n\t\t//\n\t\t// Support: Firefox<=42+\n\t\t// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\n\t\tif ( delegateCount && cur.nodeType &&\n\t\t\t( event.type !== \"click\" || isNaN( event.button ) || event.button < 1 ) ) {\n\n\t\t\t/* jshint eqeqeq: false */\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\n\t\t\t\t/* jshint eqeqeq: true */\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== \"click\" ) ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Fix target property (#1925)\n\t\tif ( !event.target ) {\n\t\t\tevent.target = originalEvent.srcElement || document;\n\t\t}\n\n\t\t// Support: Safari 6-8+\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\n\t\tevent.metaKey = !!event.metaKey;\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: ( \"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase \" +\n\t\t\"metaKey relatedTarget shiftKey target timeStamp view which\" ).split( \" \" ),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split( \" \" ),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: ( \"button buttons clientX clientY fromElement offsetX offsetY \" +\n\t\t\t\"pageX pageY screenX screenY toElement\" ).split( \" \" ),\n\t\tfilter: function( event, original ) {\n\t\t\tvar body, eventDoc, doc,\n\t\t\t\tbutton = original.button,\n\t\t\t\tfromElement = original.fromElement;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX +\n\t\t\t\t\t( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\n\t\t\t\t\t( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY +\n\t\t\t\t\t( doc && doc.scrollTop || body && body.scrollTop || 0 ) -\n\t\t\t\t\t( doc && doc.clientTop || body && body.clientTop || 0 );\n\t\t\t}\n\n\t\t\t// Add relatedTarget, if necessary\n\t\t\tif ( !event.relatedTarget && fromElement ) {\n\t\t\t\tevent.relatedTarget = fromElement === event.target ?\n\t\t\t\t\toriginal.toElement :\n\t\t\t\t\tfromElement;\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\n\t\t\t\t\t\t// let .trigger() run the handlers\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\n\t\t\t\t// Previously, `originalEvent: {}` was set here, so stopPropagation call\n\t\t\t\t// would not be triggered on donor event, since in our own\n\t\t\t\t// jQuery.event.stopPropagation function we had a check for existence of\n\t\t\t\t// originalEvent.stopPropagation method, so, consequently it would be a noop.\n\t\t\t\t//\n\t\t\t\t// Guard for simulated events was moved to jQuery.event.stopPropagation function\n\t\t\t\t// since `originalEvent` should point to the original event for the\n\t\t\t\t// constancy with other events and for more focused logic\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\n\t\tif ( e.isDefaultPrevented() ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\njQuery.removeEvent = document.removeEventListener ?\n\tfunction( elem, type, handle ) {\n\n\t\t// This \"if\" is needed for plain objects\n\t\tif ( elem.removeEventListener ) {\n\t\t\telem.removeEventListener( type, handle );\n\t\t}\n\t} :\n\tfunction( elem, type, handle ) {\n\t\tvar name = \"on\" + type;\n\n\t\tif ( elem.detachEvent ) {\n\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\n\t\t\t// detachEvent needed property on element, by name of that event,\n\t\t\t// to properly expose it to GC\n\t\t\tif ( typeof elem[ name ] === \"undefined\" ) {\n\t\t\t\telem[ name ] = null;\n\t\t\t}\n\n\t\t\telem.detachEvent( name, handle );\n\t\t}\n\t};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: IE < 9, Android < 4.0\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If preventDefault exists, run it on the original event\n\t\tif ( e.preventDefault ) {\n\t\t\te.preventDefault();\n\n\t\t// Support: IE\n\t\t// Otherwise set the returnValue property of the original event to false\n\t\t} else {\n\t\t\te.returnValue = false;\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( !e || this.isSimulated ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If stopPropagation exists, run it on the original event\n\t\tif ( e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\t// Support: IE\n\t\t// Set the cancelBubble property of the original event to true\n\t\te.cancelBubble = true;\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && e.stopImmediatePropagation ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://code.google.com/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\n// IE submit delegation\nif ( !support.submit ) {\n\n\tjQuery.event.special.submit = {\n\t\tsetup: function() {\n\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\n\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\n\t\t\t\tvar elem = e.target,\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ?\n\n\t\t\t\t\t\t// Support: IE <=8\n\t\t\t\t\t\t// We use jQuery.prop instead of elem.form\n\t\t\t\t\t\t// to allow fixing the IE8 delegated submit issue (gh-2332)\n\t\t\t\t\t\t// by 3rd party polyfills/workarounds.\n\t\t\t\t\t\tjQuery.prop( elem, \"form\" ) :\n\t\t\t\t\t\tundefined;\n\n\t\t\t\tif ( form && !jQuery._data( form, \"submit\" ) ) {\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\n\t\t\t\t\t\tevent._submitBubble = true;\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery._data( form, \"submit\", true );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// return undefined since we don't need an event listener\n\t\t},\n\n\t\tpostDispatch: function( event ) {\n\n\t\t\t// If form was submitted by the user, bubble the event up the tree\n\t\t\tif ( event._submitBubble ) {\n\t\t\t\tdelete event._submitBubble;\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\n\t\t\tjQuery.event.remove( this, \"._submit\" );\n\t\t}\n\t};\n}\n\n// IE change delegation and checkbox/radio fix\nif ( !support.change ) {\n\n\tjQuery.event.special.change = {\n\n\t\tsetup: function() {\n\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\n\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\n\t\t\t\t\t\t\tthis._justChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\n\t\t\t\t\t\tif ( this._justChanged && !event.isTrigger ) {\n\t\t\t\t\t\t\tthis._justChanged = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\n\t\t\t\tvar elem = e.target;\n\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"change\" ) ) {\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery._data( elem, \"change\", true );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\n\t\thandle: function( event ) {\n\t\t\tvar elem = event.target;\n\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger ||\n\t\t\t\t( elem.type !== \"radio\" && elem.type !== \"checkbox\" ) ) {\n\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tjQuery.event.remove( this, \"._change\" );\n\n\t\t\treturn !rformElems.test( this.nodeName );\n\t\t}\n\t};\n}\n\n// Support: Firefox\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome, Safari\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = jQuery._data( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tjQuery._data( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = jQuery._data( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tjQuery._removeData( doc, fix );\n\t\t\t\t} else {\n\t\t\t\t\tjQuery._data( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t},\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar rinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\n\trnoshimcache = new RegExp( \"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\" ),\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\n\n\t// Support: IE 10-11, Edge 10240+\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptTypeMasked = /^true\\/(.*)/,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\n\tsafeFragment = createSafeFragment( document ),\n\tfragmentDiv = safeFragment.appendChild( document.createElement( \"div\" ) );\n\n// Support: IE<8\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName( \"tbody\" )[ 0 ] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement( \"tbody\" ) ) :\n\t\telem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\tif ( match ) {\n\t\telem.type = match[ 1 ];\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\n\t\treturn;\n\t}\n\n\tvar type, i, l,\n\t\toldData = jQuery._data( src ),\n\t\tcurData = jQuery._data( dest, oldData ),\n\t\tevents = oldData.events;\n\n\tif ( events ) {\n\t\tdelete curData.handle;\n\t\tcurData.events = {};\n\n\t\tfor ( type in events ) {\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t// make the cloned public data object a copy from the original\n\tif ( curData.data ) {\n\t\tcurData.data = jQuery.extend( {}, curData.data );\n\t}\n}\n\nfunction fixCloneNodeIssues( src, dest ) {\n\tvar nodeName, e, data;\n\n\t// We do not need to do anything for non-Elements\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\tnodeName = dest.nodeName.toLowerCase();\n\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\n\tif ( !support.noCloneEvent && dest[ jQuery.expando ] ) {\n\t\tdata = jQuery._data( dest );\n\n\t\tfor ( e in data.events ) {\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\n\t\t}\n\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\n\t\tdest.removeAttribute( jQuery.expando );\n\t}\n\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\n\t\tdisableScript( dest ).text = src.text;\n\t\trestoreScript( dest );\n\n\t// IE6-10 improperly clones children of object elements using classid.\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\n\t} else if ( nodeName === \"object\" ) {\n\t\tif ( dest.parentNode ) {\n\t\t\tdest.outerHTML = src.outerHTML;\n\t\t}\n\n\t\t// This path appears unavoidable for IE9. When cloning an object\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\n\t\t// If the src has innerHTML and the destination does not,\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\n\t\tif ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {\n\t\t\tdest.innerHTML = src.innerHTML;\n\t\t}\n\n\t} else if ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\n\t\t// a checked appearance if the defaultChecked value isn't also set\n\n\t\tdest.defaultChecked = dest.checked = src.checked;\n\n\t\t// IE6-7 get confused and end up setting the value of a cloned\n\t\t// checkbox/radio button to an empty string instead of \"on\"\n\t\tif ( dest.value !== src.value ) {\n\t\t\tdest.value = src.value;\n\t\t}\n\n\t// IE6-8 fails to return the selected option to the default selected\n\t// state when cloning options\n\t} else if ( nodeName === \"option\" ) {\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\n\n\t// IE6-8 fails to set the defaultValue to the correct value when\n\t// cloning other types of input fields\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar first, node, hasScripts,\n\t\tscripts, doc, fragment,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tisFunction = jQuery.isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( isFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( isFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery.globalEval(\n\t\t\t\t\t\t\t\t( node.text || node.textContent || node.innerHTML || \"\" )\n\t\t\t\t\t\t\t\t\t.replace( rcleanScript, \"\" )\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\n\t\t\t// Fix #11809: Avoid leaking memory\n\t\t\tfragment = first = null;\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\telems = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = elems[ i ] ) != null; i++ ) {\n\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1></$2>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar destElements, node, clone, i, srcElements,\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\tif ( support.html5Clone || jQuery.isXMLDoc( elem ) ||\n\t\t\t!rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\n\n\t\t\tclone = elem.cloneNode( true );\n\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\n\t\t} else {\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\n\t\t}\n\n\t\tif ( ( !support.noCloneEvent || !support.noCloneChecked ) &&\n\t\t\t\t( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\t// Fix all IE cloning issues\n\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) {\n\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\n\t\t\t\tif ( destElements[ i ] ) {\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) {\n\t\t\t\t\tcloneCopyEvent( node, destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\tdestElements = srcElements = node = null;\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems, /* internal */ forceAcceptData ) {\n\t\tvar elem, type, id, data,\n\t\t\ti = 0,\n\t\t\tinternalKey = jQuery.expando,\n\t\t\tcache = jQuery.cache,\n\t\t\tattributes = support.attributes,\n\t\t\tspecial = jQuery.event.special;\n\n\t\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\tif ( forceAcceptData || acceptData( elem ) ) {\n\n\t\t\t\tid = elem[ internalKey ];\n\t\t\t\tdata = id && cache[ id ];\n\n\t\t\t\tif ( data ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\n\t\t\t\t\tif ( cache[ id ] ) {\n\n\t\t\t\t\t\tdelete cache[ id ];\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes\n\t\t\t\t\t\t// IE creates expando attributes along with the property\n\t\t\t\t\t\t// IE does not have a removeAttribute function on Document nodes\n\t\t\t\t\t\tif ( !attributes && typeof elem.removeAttribute !== \"undefined\" ) {\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\n\n\t\t\t\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t\t\t\t// https://code.google.com/p/chromium/issues/detail?id=378607\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telem[ internalKey ] = undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeletedIds.push( id );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\n\t// Keep domManip exposed until 3.0 (gh-2225)\n\tdomManip: domManip,\n\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().append(\n\t\t\t\t\t( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value )\n\t\t\t\t);\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\n\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t}\n\n\t\t\t// Remove any remaining nodes\n\t\t\twhile ( elem.firstChild ) {\n\t\t\t\telem.removeChild( elem.firstChild );\n\t\t\t}\n\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\n\t\t\t// Support: IE<9\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\telem.options.length = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn elem.nodeType === 1 ?\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\n\t\t\t\t\tundefined;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t( support.htmlSerialize || !rnoshimcache.test( value ) ) &&\n\t\t\t\t( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\telem = this[ i ] || {};\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\ti = 0,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\n\n\nvar iframe,\n\telemdisplay = {\n\n\t\t// Support: Firefox\n\t\t// We have to pre-define these values for FF (#10227)\n\t\tHTML: \"block\",\n\t\tBODY: \"block\"\n\t};\n\n/**\n * Retrieve the actual display of a element\n * @param {String} name nodeName of the element\n * @param {Object} doc Document object\n */\n\n// Called only from within defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\n\t\tdisplay = jQuery.css( elem[ 0 ], \"display\" );\n\n\t// We don't have any data stored on the element,\n\t// so use \"detach\" method as fast way to get rid of the element\n\telem.detach();\n\n\treturn display;\n}\n\n/**\n * Try to determine the default display value of an element\n * @param {String} nodeName\n */\nfunction defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === \"none\" || !display ) {\n\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = ( iframe || jQuery( \"<iframe frameborder='0' width='0' height='0'/>\" ) )\n\t\t\t\t.appendTo( doc.documentElement );\n\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\n\t\t\tdoc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;\n\n\t\t\t// Support: IE\n\t\t\tdoc.write();\n\t\t\tdoc.close();\n\n\t\t\tdisplay = actualDisplay( nodeName, doc );\n\t\t\tiframe.detach();\n\t\t}\n\n\t\t// Store the correct default display\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn display;\n}\nvar rmargin = ( /^margin/ );\n\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar documentElement = document.documentElement;\n\n\n\n( function() {\n\tvar pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal,\n\t\treliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\tdiv.style.cssText = \"float:left;opacity:.5\";\n\n\t// Support: IE<9\n\t// Make sure that element opacity exists (as opposed to filter)\n\tsupport.opacity = div.style.opacity === \"0.5\";\n\n\t// Verify style float existence\n\t// (IE uses styleFloat instead of cssFloat)\n\tsupport.cssFloat = !!div.style.cssFloat;\n\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tcontainer = document.createElement( \"div\" );\n\tcontainer.style.cssText = \"border:0;width:8px;height:0;top:0;left:-9999px;\" +\n\t\t\"padding:0;margin-top:1px;position:absolute\";\n\tdiv.innerHTML = \"\";\n\tcontainer.appendChild( div );\n\n\t// Support: Firefox<29, Android 2.3\n\t// Vendor-prefix box-sizing\n\tsupport.boxSizing = div.style.boxSizing === \"\" || div.style.MozBoxSizing === \"\" ||\n\t\tdiv.style.WebkitBoxSizing === \"\";\n\n\tjQuery.extend( support, {\n\t\treliableHiddenOffsets: function() {\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableHiddenOffsetsVal;\n\t\t},\n\n\t\tboxSizingReliable: function() {\n\n\t\t\t// We're checking for pixelPositionVal here instead of boxSizingReliableVal\n\t\t\t// since that compresses better and they're computed together anyway.\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\n\t\tpixelMarginRight: function() {\n\n\t\t\t// Support: Android 4.0-4.3\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn pixelMarginRightVal;\n\t\t},\n\n\t\tpixelPosition: function() {\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn pixelPositionVal;\n\t\t},\n\n\t\treliableMarginRight: function() {\n\n\t\t\t// Support: Android 2.3\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableMarginRightVal;\n\t\t},\n\n\t\treliableMarginLeft: function() {\n\n\t\t\t// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableMarginLeftVal;\n\t\t}\n\t} );\n\n\tfunction computeStyleTests() {\n\t\tvar contents, divStyle,\n\t\t\tdocumentElement = document.documentElement;\n\n\t\t// Setup\n\t\tdocumentElement.appendChild( container );\n\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\n\t\t// Support: IE<9\n\t\t// Assume reasonable values in the absence of getComputedStyle\n\t\tpixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false;\n\t\tpixelMarginRightVal = reliableMarginRightVal = true;\n\n\t\t// Check for getComputedStyle so that this code is not run in IE<9.\n\t\tif ( window.getComputedStyle ) {\n\t\t\tdivStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = ( divStyle || {} ).top !== \"1%\";\n\t\t\treliableMarginLeftVal = ( divStyle || {} ).marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = ( divStyle || { width: \"4px\" } ).width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = ( divStyle || { marginRight: \"4px\" } ).marginRight === \"4px\";\n\n\t\t\t// Support: Android 2.3 only\n\t\t\t// Div with explicit width and no margin-right incorrectly\n\t\t\t// gets computed margin-right based on width of container (#3333)\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\tcontents = div.appendChild( document.createElement( \"div\" ) );\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border; padding\n\t\t\tcontents.style.cssText = div.style.cssText =\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\n\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;padding:0\";\n\t\t\tcontents.style.marginRight = contents.style.width = \"0\";\n\t\t\tdiv.style.width = \"1px\";\n\n\t\t\treliableMarginRightVal =\n\t\t\t\t!parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );\n\n\t\t\tdiv.removeChild( contents );\n\t\t}\n\n\t\t// Support: IE6-8\n\t\t// First check that getClientRects works as expected\n\t\t// Check if table cells still have offsetWidth/Height when they are set\n\t\t// to display:none and there are still other visible table cells in a\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\n\t\t// determining if an element has been hidden directly using\n\t\t// display:none (it is still safe to use offsets if a parent element is\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\n\t\tdiv.style.display = \"none\";\n\t\treliableHiddenOffsetsVal = div.getClientRects().length === 0;\n\t\tif ( reliableHiddenOffsetsVal ) {\n\t\t\tdiv.style.display = \"\";\n\t\t\tdiv.innerHTML = \"<table><tr><td></td><td>t</td></tr></table>\";\n\t\t\tdiv.childNodes[ 0 ].style.borderCollapse = \"separate\";\n\t\t\tcontents = div.getElementsByTagName( \"td\" );\n\t\t\tcontents[ 0 ].style.cssText = \"margin:0;border:0;padding:0;display:none\";\n\t\t\treliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;\n\t\t\tif ( reliableHiddenOffsetsVal ) {\n\t\t\t\tcontents[ 0 ].style.display = \"\";\n\t\t\t\tcontents[ 1 ].style.display = \"none\";\n\t\t\t\treliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;\n\t\t\t}\n\t\t}\n\n\t\t// Teardown\n\t\tdocumentElement.removeChild( container );\n\t}\n\n} )();\n\n\nvar getStyles, curCSS,\n\trposition = /^(top|right|bottom|left)$/;\n\nif ( window.getComputedStyle ) {\n\tgetStyles = function( elem ) {\n\n\t\t// Support: IE<=11+, Firefox<=30+ (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\n\tcurCSS = function( elem, name, computed ) {\n\t\tvar width, minWidth, maxWidth, ret,\n\t\t\tstyle = elem.style;\n\n\t\tcomputed = computed || getStyles( elem );\n\n\t\t// getPropertyValue is only needed for .css('filter') in IE9, see #12537\n\t\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;\n\n\t\t// Support: Opera 12.1x only\n\t\t// Fall back to style even without computed\n\t\t// computed is undefined for elems on document fragments\n\t\tif ( ( ret === \"\" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\tif ( computed ) {\n\n\t\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t\t// Chrome < 17 and Safari 5.0 uses \"computed value\"\n\t\t\t// instead of \"used value\" for margin-right\n\t\t\t// Safari 5.1.7 (at least) returns percentage for a larger set of values,\n\t\t\t// but width seems to be reliably pixels\n\t\t\t// this is against the CSSOM draft spec:\n\t\t\t// http://dev.w3.org/csswg/cssom/#resolved-values\n\t\t\tif ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {\n\n\t\t\t\t// Remember the original values\n\t\t\t\twidth = style.width;\n\t\t\t\tminWidth = style.minWidth;\n\t\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t\t// Put in the new values to get a computed value out\n\t\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\t\tret = computed.width;\n\n\t\t\t\t// Revert the changed values\n\t\t\t\tstyle.width = width;\n\t\t\t\tstyle.minWidth = minWidth;\n\t\t\t\tstyle.maxWidth = maxWidth;\n\t\t\t}\n\t\t}\n\n\t\t// Support: IE\n\t\t// IE returns zIndex value as an integer.\n\t\treturn ret === undefined ?\n\t\t\tret :\n\t\t\tret + \"\";\n\t};\n} else if ( documentElement.currentStyle ) {\n\tgetStyles = function( elem ) {\n\t\treturn elem.currentStyle;\n\t};\n\n\tcurCSS = function( elem, name, computed ) {\n\t\tvar left, rs, rsLeft, ret,\n\t\t\tstyle = elem.style;\n\n\t\tcomputed = computed || getStyles( elem );\n\t\tret = computed ? computed[ name ] : undefined;\n\n\t\t// Avoid setting ret to empty string here\n\t\t// so we don't default to auto\n\t\tif ( ret == null && style && style[ name ] ) {\n\t\t\tret = style[ name ];\n\t\t}\n\n\t\t// From the awesome hack by Dean Edwards\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t// If we're not dealing with a regular pixel number\n\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\t// but not position css attributes, as those are\n\t\t// proportional to the parent element instead\n\t\t// and we can't measure the parent instead because it\n\t\t// might trigger a \"stacking dolls\" problem\n\t\tif ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\tleft = style.left;\n\t\t\trs = elem.runtimeStyle;\n\t\t\trsLeft = rs && rs.left;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tif ( rsLeft ) {\n\t\t\t\trs.left = elem.currentStyle.left;\n\t\t\t}\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ret;\n\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.left = left;\n\t\t\tif ( rsLeft ) {\n\t\t\t\trs.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\t// Support: IE\n\t\t// IE returns zIndex value as an integer.\n\t\treturn ret === undefined ?\n\t\t\tret :\n\t\t\tret + \"\" || \"auto\";\n\t};\n}\n\n\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar\n\n\t\tralpha = /alpha\\([^)]*\\)/i,\n\tropacity = /opacity\\s*=\\s*([^)]*)/i,\n\n\t// swappable if display is none or starts with table except\n\t// \"table\", \"table-cell\", or \"table-caption\"\n\t// see here for display values:\n\t// https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trnumsplit = new RegExp( \"^(\" + pnum + \")(.*)$\", \"i\" ),\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t},\n\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style;\n\n\n// return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem, hidden,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\" );\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t// being hidden by cascaded rules or not\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\n\t\t\t\telem.style.display = \"\";\n\t\t\t}\n\n\t\t\t// Set elements which have been overridden with display: none\n\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t// for such an element\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\n\t\t\t\tvalues[ index ] =\n\t\t\t\t\tjQuery._data( elem, \"olddisplay\", defaultDisplay( elem.nodeName ) );\n\t\t\t}\n\t\t} else {\n\t\t\thidden = isHidden( elem );\n\n\t\t\tif ( display && display !== \"none\" || !hidden ) {\n\t\t\t\tjQuery._data(\n\t\t\t\t\telem,\n\t\t\t\t\t\"olddisplay\",\n\t\t\t\t\thidden ? display : jQuery.css( elem, \"display\" )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of most of the elements in a second loop\n\t// to avoid the constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\n\t\t}\n\t}\n\n\treturn elements;\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\tvar matches = rnumsplit.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\n\n\t\t// If we already have the right measurement, avoid augmentation\n\t\t4 :\n\n\t\t// Otherwise initialize for horizontal or vertical properties\n\t\tname === \"width\" ? 1 : 0,\n\n\t\tval = 0;\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// both box models exclude margin, so add it if we want it\n\t\tif ( extra === \"margin\" ) {\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\tif ( isBorderBox ) {\n\n\t\t\t// border-box includes padding, so remove it if we want content\n\t\t\tif ( extra === \"content\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// at this point, extra isn't border nor margin, so remove border\n\t\t\tif ( extra !== \"margin\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// at this point, extra isn't content, so add padding\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// at this point, extra isn't content nor padding, so add border\n\t\t\tif ( extra !== \"padding\" ) {\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val;\n}\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n\t// Start with offset property, which is equivalent to the border-box value\n\tvar valueIsBorderBox = true,\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = support.boxSizing &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t// some non-html elements return undefined for offsetWidth, so check for null/undefined\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\n\tif ( val <= 0 || val == null ) {\n\n\t\t// Fall back to computed then uncomputed css if necessary\n\t\tval = curCSS( elem, name, styles );\n\t\tif ( val < 0 || val == null ) {\n\t\t\tval = elem.style[ name ];\n\t\t}\n\n\t\t// Computed unit is not pixels. Stop here and return.\n\t\tif ( rnumnonpx.test( val ) ) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// we need the check for style in case a browser which returns unreliable values\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\n\t\tvalueIsBorderBox = isBorderBox &&\n\t\t\t( support.boxSizingReliable() || val === elem.style[ name ] );\n\n\t\t// Normalize \"\", auto, and prepare for extra\n\t\tval = parseFloat( val ) || 0;\n\t}\n\n\t// use the active box-sizing model to add/subtract irrelevant styles\n\treturn ( val +\n\t\taugmentWidthOrHeight(\n\t\t\telem,\n\t\t\tname,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\n\t\t// normalize float css property\n\t\t\"float\": support.cssFloat ? \"cssFloat\" : \"styleFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style;\n\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// gets hook for the prefixed version\n\t\t// followed by the unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set. See: #7116\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\tif ( type === \"number\" ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,\n\t\t\t// but it would mean to define eight\n\t\t\t// (for every problematic property) identical functions\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\t// Support: IE\n\t\t\t\t// Swallow errors from 'invalid' CSS values (#5509)\n\t\t\t\ttry {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar num, val, hooks,\n\t\t\torigName = jQuery.camelCase( name );\n\n\t\t// Make sure that we're working with the right name\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// gets hook for the prefixed version\n\t\t// followed by the unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t//convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Return, converting to number if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// certain elements can have dimension info if we invisibly show them\n\t\t\t\t// however, it must have a current display style that would benefit from this\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\t\t\t\t\telem.offsetWidth === 0 ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar styles = extra && getStyles( elem );\n\t\t\treturn setPositiveNumber( elem, value, extra ?\n\t\t\t\taugmentWidthOrHeight(\n\t\t\t\t\telem,\n\t\t\t\t\tname,\n\t\t\t\t\textra,\n\t\t\t\t\tsupport.boxSizing &&\n\t\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\t\tstyles\n\t\t\t\t) : 0\n\t\t\t);\n\t\t}\n\t};\n} );\n\nif ( !support.opacity ) {\n\tjQuery.cssHooks.opacity = {\n\t\tget: function( elem, computed ) {\n\n\t\t\t// IE uses filters for opacity\n\t\t\treturn ropacity.test( ( computed && elem.currentStyle ?\n\t\t\t\telem.currentStyle.filter :\n\t\t\t\telem.style.filter ) || \"\" ) ?\n\t\t\t\t\t( 0.01 * parseFloat( RegExp.$1 ) ) + \"\" :\n\t\t\t\t\tcomputed ? \"1\" : \"\";\n\t\t},\n\n\t\tset: function( elem, value ) {\n\t\t\tvar style = elem.style,\n\t\t\t\tcurrentStyle = elem.currentStyle,\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\n\n\t\t\t// IE has trouble with opacity if it does not have layout\n\t\t\t// Force it by setting the zoom level\n\t\t\tstyle.zoom = 1;\n\n\t\t\t// if setting opacity to 1, and no other filters exist -\n\t\t\t// attempt to remove filter attribute #6652\n\t\t\t// if value === \"\", then remove inline opacity #12685\n\t\t\tif ( ( value >= 1 || value === \"\" ) &&\n\t\t\t\t\tjQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" &&\n\t\t\t\t\tstyle.removeAttribute ) {\n\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\n\t\t\t\tstyle.removeAttribute( \"filter\" );\n\n\t\t\t\t// if there is no filter style applied in a css rule\n\t\t\t\t// or unset inline opacity, we are done\n\t\t\t\tif ( value === \"\" || currentStyle && !currentStyle.filter ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// otherwise, set new filter values\n\t\t\tstyle.filter = ralpha.test( filter ) ?\n\t\t\t\tfilter.replace( ralpha, opacity ) :\n\t\t\t\tfilter + \" \" + opacity;\n\t\t}\n\t};\n}\n\njQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn swap( elem, { \"display\": \"inline-block\" },\n\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\n\t\t}\n\t}\n);\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn (\n\t\t\t\tparseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\n\t\t\t\t// Support: IE<=11+\n\t\t\t\t// Running getBoundingClientRect on a disconnected node in IE throws an error\n\t\t\t\t// Support: IE8 only\n\t\t\t\t// getClientRects() errors on disconnected elems\n\t\t\t\t( jQuery.contains( elem.ownerDocument, elem ) ?\n\t\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t0\n\t\t\t\t)\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( !rmargin.test( prefix ) ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( jQuery.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t},\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHidden( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails\n\t\t\t// so, simple values such as \"10px\" are parsed to Float.\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// use step hook for back compat - use cssHook if its there - use .style if its\n\t\t\t// available and use plain properties where available\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 &&\n\t\t\t\t( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9\n// Panic based approach to setting things on disconnected nodes\n\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back Compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, timerId,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = jQuery.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\tattrs = { height: type },\n\t\ti = 0;\n\n\t// if we include width, step value is 1 to do all cssExpand values,\n\t// if we don't include width, step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4 ; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// we're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\t/* jshint validthis: true */\n\tvar prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHidden( elem ),\n\t\tdataShow = jQuery._data( elem, \"fxshow\" );\n\n\t// handle queue: false promises\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// doing this makes sure that the complete handler will be called\n\t\t\t// before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// height/width overflow pass\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\n\n\t\t// Make sure that nothing sneaks out\n\t\t// Record all 3 overflow attributes because IE does not\n\t\t// change the overflow attribute when overflowX and\n\t\t// overflowY are set to the same value\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Set display property to inline-block for height/width\n\t\t// animations on inline elements that are having width/height animated\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\n\t\t// Test default display if display is currently \"none\"\n\t\tcheckDisplay = display === \"none\" ?\n\t\t\tjQuery._data( elem, \"olddisplay\" ) || defaultDisplay( elem.nodeName ) : display;\n\n\t\tif ( checkDisplay === \"inline\" && jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t// inline-level elements accept inline-block;\n\t\t\t// block-level elements need to be inline with layout\n\t\t\tif ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === \"inline\" ) {\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t} else {\n\t\t\t\tstyle.zoom = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tif ( !support.shrinkWrapBlocks() ) {\n\t\t\tanim.always( function() {\n\t\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t\t} );\n\t\t}\n\t}\n\n\t// show/hide pass\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.exec( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// If there is dataShow left over from a stopped hide or show\n\t\t\t\t// and we are going to proceed with show, we should pretend to be hidden\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\n\t\t// Any non-fx value stops us from restoring the original display value\n\t\t} else {\n\t\t\tdisplay = undefined;\n\t\t}\n\t}\n\n\tif ( !jQuery.isEmptyObject( orig ) ) {\n\t\tif ( dataShow ) {\n\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\thidden = dataShow.hidden;\n\t\t\t}\n\t\t} else {\n\t\t\tdataShow = jQuery._data( elem, \"fxshow\", {} );\n\t\t}\n\n\t\t// store state if its toggle - enables .stop().toggle() to \"reverse\"\n\t\tif ( toggle ) {\n\t\t\tdataShow.hidden = !hidden;\n\t\t}\n\t\tif ( hidden ) {\n\t\t\tjQuery( elem ).show();\n\t\t} else {\n\t\t\tanim.done( function() {\n\t\t\t\tjQuery( elem ).hide();\n\t\t\t} );\n\t\t}\n\t\tanim.done( function() {\n\t\t\tvar prop;\n\t\t\tjQuery._removeData( elem, \"fxshow\" );\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t}\n\t\t} );\n\t\tfor ( prop in orig ) {\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\n\t\t\tif ( !( prop in dataShow ) ) {\n\t\t\t\tdataShow[ prop ] = tween.start;\n\t\t\t\tif ( hidden ) {\n\t\t\t\t\ttween.end = tween.start;\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t// If this is a noop like .hide().hide(), restore an overwritten display value\n\t} else if ( ( display === \"none\" ? defaultDisplay( elem.nodeName ) : display ) === \"inline\" ) {\n\t\tstyle.display = display;\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = jQuery.camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( jQuery.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// not quite $.extend, this wont overwrite keys already present.\n\t\t\t// also - reusing 'index' from above because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t} else {\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// if we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// resolve when we played the last frame\n\t\t\t\t// otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length ; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( jQuery.isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tjQuery.proxy( result.stop, result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\t// attach callbacks from options\n\treturn animation.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( jQuery.isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnotwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length ; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tjQuery.isFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t};\n\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\n\t\topt.duration in jQuery.fx.speeds ?\n\t\t\tjQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n\t// normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\n\n\t\t\t// animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || jQuery._data( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = jQuery._data( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// start the next in the queue if the last step wasn't forced\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\n\t\t\t// but only if they were gotoEnd\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = jQuery._data( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ttimers = jQuery.timers,\n\t\ti = 0;\n\n\tfxNow = jQuery.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Checks the timer has not already been removed\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tif ( timer() ) {\n\t\tjQuery.fx.start();\n\t} else {\n\t\tjQuery.timers.pop();\n\t}\n};\n\njQuery.fx.interval = 13;\n\njQuery.fx.start = function() {\n\tif ( !timerId ) {\n\t\ttimerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\twindow.clearInterval( timerId );\n\ttimerId = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar a,\n\t\tinput = document.createElement( \"input\" ),\n\t\tdiv = document.createElement( \"div\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\t// Setup\n\tdiv = document.createElement( \"div\" );\n\tdiv.setAttribute( \"className\", \"t\" );\n\tdiv.innerHTML = \" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\n\ta = div.getElementsByTagName( \"a\" )[ 0 ];\n\n\t// Support: Windows Web Apps (WWA)\n\t// `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"checkbox\" );\n\tdiv.appendChild( input );\n\n\ta = div.getElementsByTagName( \"a\" )[ 0 ];\n\n\t// First batch of tests.\n\ta.style.cssText = \"top:1px\";\n\n\t// Test setAttribute on camelCase class.\n\t// If it works, we need attrFixes when doing get/setAttribute (ie6/7)\n\tsupport.getSetAttribute = div.className !== \"t\";\n\n\t// Get the style information from getAttribute\n\t// (IE uses .cssText instead)\n\tsupport.style = /top/.test( a.getAttribute( \"style\" ) );\n\n\t// Make sure that URLs aren't manipulated\n\t// (IE normalizes it by default)\n\tsupport.hrefNormalized = a.getAttribute( \"href\" ) === \"/a\";\n\n\t// Check the default checkbox/radio value (\"\" on WebKit; \"on\" elsewhere)\n\tsupport.checkOn = !!input.value;\n\n\t// Make sure that a selected-by-default option has a working selected property.\n\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\n\tsupport.optSelected = opt.selected;\n\n\t// Tests for enctype support on a form (#6743)\n\tsupport.enctype = !!document.createElement( \"form\" ).enctype;\n\n\t// Make sure that the options inside disabled selects aren't marked as disabled\n\t// (WebKit marks them as disabled)\n\tselect.disabled = true;\n\tsupport.optDisabled = !opt.disabled;\n\n\t// Support: IE8 only\n\t// Check if we can trust getAttribute(\"value\")\n\tinput = document.createElement( \"input\" );\n\tinput.setAttribute( \"value\", \"\" );\n\tsupport.input = input.getAttribute( \"value\" ) === \"\";\n\n\t// Check if an input maintains its value after becoming a radio\n\tinput.value = \"t\";\n\tinput.setAttribute( \"type\", \"radio\" );\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar rreturn = /\\r/g,\n\trspaces = /[\\x20\\t\\r\\n\\f]+/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, isFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif (\n\t\t\t\t\thooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === \"string\" ?\n\n\t\t\t\t\t// handle most common string cases\n\t\t\t\t\tret.replace( rreturn, \"\" ) :\n\n\t\t\t\t\t// handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE10-11+\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tjQuery.trim( jQuery.text( elem ) ).replace( rspaces, \" \" );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length,\n\t\t\t\t\ti = index < 0 ?\n\t\t\t\t\t\tmax :\n\t\t\t\t\t\tone ? index : 0;\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// oldIE doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t( support.optDisabled ?\n\t\t\t\t\t\t\t\t!option.disabled :\n\t\t\t\t\t\t\t\toption.getAttribute( \"disabled\" ) === null ) &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\tif ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) {\n\n\t\t\t\t\t\t// Support: IE6\n\t\t\t\t\t\t// When new option element is added to select box we need to\n\t\t\t\t\t\t// force reflow of newly added node in order to workaround delay\n\t\t\t\t\t\t// of initialization properties\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\toption.selected = optionSet = true;\n\n\t\t\t\t\t\t} catch ( _ ) {\n\n\t\t\t\t\t\t\t// Will be executed only in IE6\n\t\t\t\t\t\t\toption.scrollHeight;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\toption.selected = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\n\t\t\t\treturn options;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\nvar nodeHook, boolHook,\n\tattrHandle = jQuery.expr.attrHandle,\n\truseDefault = /^(?:checked|selected)$/i,\n\tgetSetAttribute = support.getSetAttribute,\n\tgetSetInput = support.input;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// All attributes are lowercase\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\tname = name.toLowerCase();\n\t\t\thooks = jQuery.attrHooks[ name ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tjQuery.nodeName( elem, \"input\" ) ) {\n\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE8-9\n\t\t\t\t\t// Reset value to default in case type is set after value during creation\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name, propName,\n\t\t\ti = 0,\n\t\t\tattrNames = value && value.match( rnotwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\n\n\t\t\t\t// Boolean attributes get special treatment (#10870)\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\n\n\t\t\t\t\t// Set corresponding property to false\n\t\t\t\t\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\t\t\t\t\t\telem[ propName ] = false;\n\n\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t// Also clear defaultChecked/defaultSelected (if appropriate)\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] =\n\t\t\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t\t}\n\n\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\n\t\t\t\t} else {\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\n\t\t\t\t}\n\n\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\n\t\t\t// IE<8 needs the *property* name\n\t\t\telem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );\n\n\t\t} else {\n\n\t\t\t// Support: IE<9\n\t\t\t// Use defaultChecked and defaultSelected for oldIE\n\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] = elem[ name ] = true;\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\t\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\t\tvar ret, handle;\n\t\t\tif ( !isXML ) {\n\n\t\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\t\thandle = attrHandle[ name ];\n\t\t\t\tattrHandle[ name ] = ret;\n\t\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\t\tname.toLowerCase() :\n\t\t\t\t\tnull;\n\t\t\t\tattrHandle[ name ] = handle;\n\t\t\t}\n\t\t\treturn ret;\n\t\t};\n\t} else {\n\t\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\t\tif ( !isXML ) {\n\t\t\t\treturn elem[ jQuery.camelCase( \"default-\" + name ) ] ?\n\t\t\t\t\tname.toLowerCase() :\n\t\t\t\t\tnull;\n\t\t\t}\n\t\t};\n\t}\n} );\n\n// fix oldIE attroperties\nif ( !getSetInput || !getSetAttribute ) {\n\tjQuery.attrHooks.value = {\n\t\tset: function( elem, value, name ) {\n\t\t\tif ( jQuery.nodeName( elem, \"input\" ) ) {\n\n\t\t\t\t// Does not return so that setAttribute is also used\n\t\t\t\telem.defaultValue = value;\n\t\t\t} else {\n\n\t\t\t\t// Use nodeHook if defined (#1954); otherwise setAttribute is fine\n\t\t\t\treturn nodeHook && nodeHook.set( elem, value, name );\n\t\t\t}\n\t\t}\n\t};\n}\n\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\nif ( !getSetAttribute ) {\n\n\t// Use this for any attribute in IE6/7\n\t// This fixes almost every IE6/7 issue\n\tnodeHook = {\n\t\tset: function( elem, value, name ) {\n\n\t\t\t// Set the existing or create a new attribute node\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\tif ( !ret ) {\n\t\t\t\telem.setAttributeNode(\n\t\t\t\t\t( ret = elem.ownerDocument.createAttribute( name ) )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tret.value = value += \"\";\n\n\t\t\t// Break association with cloned elements by also using setAttribute (#9646)\n\t\t\tif ( name === \"value\" || value === elem.getAttribute( name ) ) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t};\n\n\t// Some attributes are constructed with empty-string values when not defined\n\tattrHandle.id = attrHandle.name = attrHandle.coords =\n\t\tfunction( elem, name, isXML ) {\n\t\t\tvar ret;\n\t\t\tif ( !isXML ) {\n\t\t\t\treturn ( ret = elem.getAttributeNode( name ) ) && ret.value !== \"\" ?\n\t\t\t\t\tret.value :\n\t\t\t\t\tnull;\n\t\t\t}\n\t\t};\n\n\t// Fixing value retrieval on a button requires this module\n\tjQuery.valHooks.button = {\n\t\tget: function( elem, name ) {\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\tif ( ret && ret.specified ) {\n\t\t\t\treturn ret.value;\n\t\t\t}\n\t\t},\n\t\tset: nodeHook.set\n\t};\n\n\t// Set contenteditable to false on removals(#10429)\n\t// Setting to empty string throws an error as an invalid value\n\tjQuery.attrHooks.contenteditable = {\n\t\tset: function( elem, value, name ) {\n\t\t\tnodeHook.set( elem, value === \"\" ? false : value, name );\n\t\t}\n\t};\n\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\n\t// This is for removals\n\tjQuery.each( [ \"width\", \"height\" ], function( i, name ) {\n\t\tjQuery.attrHooks[ name ] = {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\n\nif ( !support.style ) {\n\tjQuery.attrHooks.style = {\n\t\tget: function( elem ) {\n\n\t\t\t// Return undefined in the case of empty string\n\t\t\t// Note: IE uppercases css property names, but if we were to .toLowerCase()\n\t\t\t// .cssText, that would destroy case sensitivity in URL's, like in \"background\"\n\t\t\treturn elem.style.cssText || undefined;\n\t\t},\n\t\tset: function( elem, value ) {\n\t\t\treturn ( elem.style.cssText = value + \"\" );\n\t\t}\n\t};\n}\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button|object)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\tname = jQuery.propFix[ name ] || name;\n\t\treturn this.each( function() {\n\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\n\t\t\ttry {\n\t\t\t\tthis[ name ] = undefined;\n\t\t\t\tdelete this[ name ];\n\t\t\t} catch ( e ) {}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\treturn tabindex ?\n\t\t\t\t\tparseInt( tabindex, 10 ) :\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\t\trclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t\t0 :\n\t\t\t\t\t\t\t-1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Some attributes require a special call on IE\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !support.hrefNormalized ) {\n\n\t// href/src property should get the full normalized URL (#10299/#12915)\n\tjQuery.each( [ \"href\", \"src\" ], function( i, name ) {\n\t\tjQuery.propHooks[ name ] = {\n\t\t\tget: function( elem ) {\n\t\t\t\treturn elem.getAttribute( name, 4 );\n\t\t\t}\n\t\t};\n\t} );\n}\n\n// Support: Safari, IE9+\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n// IE6/7 call enctype encoding\nif ( !support.enctype ) {\n\tjQuery.propFix.enctype = \"encoding\";\n}\n\n\n\n\nvar rclass = /[\\t\\r\\n\\f]/g;\n\nfunction getClass( elem ) {\n\treturn jQuery.attr( elem, \"class\" ) || \"\";\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tjQuery.attr( elem, \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tjQuery.attr( elem, \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value;\n\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( type === \"string\" ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = value.match( rnotwhite ) || [];\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// store className if set\n\t\t\t\t\tjQuery._data( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed \"false\",\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tjQuery.attr( this, \"class\",\n\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\"\" :\n\t\t\t\t\tjQuery._data( this, \"__className__\" ) || \"\"\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + getClass( elem ) + \" \" ).replace( rclass, \" \" )\n\t\t\t\t\t.indexOf( className ) > -1\n\t\t\t) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\njQuery.each( ( \"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error contextmenu\" ).split( \" \" ),\n\tfunction( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n} );\n\njQuery.fn.extend( {\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\n\nvar location = window.location;\n\nvar nonce = jQuery.now();\n\nvar rquery = ( /\\?/ );\n\n\n\nvar rvalidtokens = /(,)|(\\[|{)|(}|])|\"(?:[^\"\\\\\\r\\n]|\\\\[\"\\\\\\/bfnrt]|\\\\u[\\da-fA-F]{4})*\"\\s*:?|true|false|null|-?(?!0\\d)\\d+(?:\\.\\d+|)(?:[eE][+-]?\\d+|)/g;\n\njQuery.parseJSON = function( data ) {\n\n\t// Attempt to parse using the native JSON parser first\n\tif ( window.JSON && window.JSON.parse ) {\n\n\t\t// Support: Android 2.3\n\t\t// Workaround failure to string-cast null input\n\t\treturn window.JSON.parse( data + \"\" );\n\t}\n\n\tvar requireNonComma,\n\t\tdepth = null,\n\t\tstr = jQuery.trim( data + \"\" );\n\n\t// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains\n\t// after removing valid tokens\n\treturn str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {\n\n\t\t// Force termination if we see a misplaced comma\n\t\tif ( requireNonComma && comma ) {\n\t\t\tdepth = 0;\n\t\t}\n\n\t\t// Perform no more replacements after returning to outermost depth\n\t\tif ( depth === 0 ) {\n\t\t\treturn token;\n\t\t}\n\n\t\t// Commas must not follow \"[\", \"{\", or \",\"\n\t\trequireNonComma = open || comma;\n\n\t\t// Determine new depth\n\t\t// array/object open (\"[\" or \"{\"): depth += true - false (increment)\n\t\t// array/object close (\"]\" or \"}\"): depth += false - true (decrement)\n\t\t// other cases (\",\" or primitive): depth += true - true (numeric cast)\n\t\tdepth += !close - !open;\n\n\t\t// Remove this token\n\t\treturn \"\";\n\t} ) ) ?\n\t\t( Function( \"return \" + str ) )() :\n\t\tjQuery.error( \"Invalid JSON: \" + data );\n};\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, tmp;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\ttry {\n\t\tif ( window.DOMParser ) { // Standard\n\t\t\ttmp = new window.DOMParser();\n\t\t\txml = tmp.parseFromString( data, \"text/xml\" );\n\t\t} else { // IE\n\t\t\txml = new window.ActiveXObject( \"Microsoft.XMLDOM\" );\n\t\t\txml.async = \"false\";\n\t\t\txml.loadXML( data );\n\t\t}\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trhash = /#.*$/,\n\trts = /([?&])_=[^&]*/,\n\n\t// IE leaves an \\r character at EOL\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\trurl = /^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Document location\n\tajaxLocation = location.href,\n\n\t// Segment location into parts\n\tajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType.charAt( 0 ) === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar deep, key,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) { // jscs:ignore requireDotNotation\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\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}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: ajaxLocation,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar\n\n\t\t\t// Cross-domain detection vars\n\t\t\tparts,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers as string\n\t\t\tresponseHeadersString,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\ttransport,\n\n\t\t\t// Response headers\n\t\t\tresponseHeaders,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tvar lname = name.toLowerCase();\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\t\t\tfor ( code in map ) {\n\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" )\n\t\t\t.replace( rhash, \"\" )\n\t\t\t.replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( rnotwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\n\t\tif ( s.crossDomain == null ) {\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\n\t\t\ts.crossDomain = !!( parts &&\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) !==\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) )\n\t\t\t);\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\tcacheURL = s.url;\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL = ( s.url += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\ts.url = rts.test( cacheURL ) ?\n\n\t\t\t\t\t// If there is already a '_' parameter, set its value\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + nonce++ ) :\n\n\t\t\t\t\t// Otherwise add one to the end\n\t\t\t\t\tcacheURL + ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + nonce++;\n\t\t\t}\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\n\njQuery._evalUrl = function( url ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\t\t\"throws\": true\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapAll( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( this[ 0 ] ) {\n\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\n\t\t\t\t\telem = elem.firstChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each( function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t} ).end();\n\t}\n} );\n\n\nfunction getDisplay( elem ) {\n\treturn elem.style && elem.style.display || jQuery.css( elem, \"display\" );\n}\n\nfunction filterHidden( elem ) {\n\n\t// Disconnected elements are considered hidden\n\tif ( !jQuery.contains( elem.ownerDocument || document, elem ) ) {\n\t\treturn true;\n\t}\n\twhile ( elem && elem.nodeType === 1 ) {\n\t\tif ( getDisplay( elem ) === \"none\" || elem.type === \"hidden\" ) {\n\t\t\treturn true;\n\t\t}\n\t\telem = elem.parentNode;\n\t}\n\treturn false;\n}\n\njQuery.expr.filters.hidden = function( elem ) {\n\n\t// Support: Opera <= 12.12\n\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\n\treturn support.reliableHiddenOffsets() ?\n\t\t( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&\n\t\t\t!elem.getClientRects().length ) :\n\t\t\tfilterHidden( elem );\n};\n\njQuery.expr.filters.visible = function( elem ) {\n\treturn !jQuery.expr.filters.hidden( elem );\n};\n\n\n\n\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( jQuery.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, value ) {\n\n\t\t\t// If value is a function, invoke it and return its value\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n\t\t};\n\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\tif ( traditional === undefined ) {\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is(\":disabled\") so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val ) {\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t} ) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\n// Create the request object\n// (This is still attached to ajaxSettings for backward compatibility)\njQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?\n\n\t// Support: IE6-IE8\n\tfunction() {\n\n\t\t// XHR cannot access local files, always use ActiveX for that case\n\t\tif ( this.isLocal ) {\n\t\t\treturn createActiveXHR();\n\t\t}\n\n\t\t// Support: IE 9-11\n\t\t// IE seems to error on cross-domain PATCH requests when ActiveX XHR\n\t\t// is used. In IE 9+ always use the native XHR.\n\t\t// Note: this condition won't catch Edge as it doesn't define\n\t\t// document.documentMode but it also doesn't support ActiveX so it won't\n\t\t// reach this code.\n\t\tif ( document.documentMode > 8 ) {\n\t\t\treturn createStandardXHR();\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// oldIE XHR does not support non-RFC2616 methods (#13240)\n\t\t// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx\n\t\t// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9\n\t\t// Although this check for six methods instead of eight\n\t\t// since IE also does not support \"trace\" and \"connect\"\n\t\treturn /^(get|post|head|put|delete|options)$/i.test( this.type ) &&\n\t\t\tcreateStandardXHR() || createActiveXHR();\n\t} :\n\n\t// For all other browsers, use the standard XMLHttpRequest object\n\tcreateStandardXHR;\n\nvar xhrId = 0,\n\txhrCallbacks = {},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\n// Support: IE<10\n// Open requests must be manually aborted on unload (#5280)\n// See https://support.microsoft.com/kb/2856746 for more info\nif ( window.attachEvent ) {\n\twindow.attachEvent( \"onunload\", function() {\n\t\tfor ( var key in xhrCallbacks ) {\n\t\t\txhrCallbacks[ key ]( undefined, true );\n\t\t}\n\t} );\n}\n\n// Determine support properties\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nxhrSupported = support.ajax = !!xhrSupported;\n\n// Create transport if the browser can provide an xhr\nif ( xhrSupported ) {\n\n\tjQuery.ajaxTransport( function( options ) {\n\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\n\t\tif ( !options.crossDomain || support.cors ) {\n\n\t\t\tvar callback;\n\n\t\t\treturn {\n\t\t\t\tsend: function( headers, complete ) {\n\t\t\t\t\tvar i,\n\t\t\t\t\t\txhr = options.xhr(),\n\t\t\t\t\t\tid = ++xhrId;\n\n\t\t\t\t\t// Open the socket\n\t\t\t\t\txhr.open(\n\t\t\t\t\t\toptions.type,\n\t\t\t\t\t\toptions.url,\n\t\t\t\t\t\toptions.async,\n\t\t\t\t\t\toptions.username,\n\t\t\t\t\t\toptions.password\n\t\t\t\t\t);\n\n\t\t\t\t\t// Apply custom fields if provided\n\t\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Override mime type if needed\n\t\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t\t}\n\n\t\t\t\t\t// X-Requested-With header\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set headers\n\t\t\t\t\tfor ( i in headers ) {\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// IE's ActiveXObject throws a 'Type Mismatch' exception when setting\n\t\t\t\t\t\t// request header to a null-value.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// To keep consistent with other XHR implementations, cast the value\n\t\t\t\t\t\t// to string and ignore `undefined`.\n\t\t\t\t\t\tif ( headers[ i ] !== undefined ) {\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] + \"\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Do send the request\n\t\t\t\t\t// This may raise an exception which is actually\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\n\t\t\t\t\txhr.send( ( options.hasContent && options.data ) || null );\n\n\t\t\t\t\t// Listener\n\t\t\t\t\tcallback = function( _, isAbort ) {\n\t\t\t\t\t\tvar status, statusText, responses;\n\n\t\t\t\t\t\t// Was never called and is aborted or complete\n\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\n\n\t\t\t\t\t\t\t// Clean up\n\t\t\t\t\t\t\tdelete xhrCallbacks[ id ];\n\t\t\t\t\t\t\tcallback = undefined;\n\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\n\n\t\t\t\t\t\t\t// Abort manually if needed\n\t\t\t\t\t\t\tif ( isAbort ) {\n\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\n\t\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresponses = {};\n\t\t\t\t\t\t\t\tstatus = xhr.status;\n\n\t\t\t\t\t\t\t\t// Support: IE<10\n\t\t\t\t\t\t\t\t// Accessing binary-data responseText throws an exception\n\t\t\t\t\t\t\t\t// (#11426)\n\t\t\t\t\t\t\t\tif ( typeof xhr.responseText === \"string\" ) {\n\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\n\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\n\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\n\t\t\t\t\t\t\t\t\tstatusText = \"\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\n\n\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\n\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\n\t\t\t\t\t\t\t\t// can do given current implementations)\n\t\t\t\t\t\t\t\tif ( !status && options.isLocal && !options.crossDomain ) {\n\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\n\n\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\n\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\n\t\t\t\t\t\t\t\t\tstatus = 204;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Call complete if needed\n\t\t\t\t\t\tif ( responses ) {\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, xhr.getAllResponseHeaders() );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t// Do send the request\n\t\t\t\t\t// `xhr.send` may raise an exception, but it will be\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\n\t\t\t\t\tif ( !options.async ) {\n\n\t\t\t\t\t\t// If we're in sync mode we fire the callback\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else if ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t// (IE6 & IE7) if it's in cache and has been\n\t\t\t\t\t\t// retrieved directly we need to fire the callback\n\t\t\t\t\t\twindow.setTimeout( callback );\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Register the callback, but delay it in case `xhr.send` throws\n\t\t\t\t\t\t// Add to the list of active xhr callbacks\n\t\t\t\t\t\txhr.onreadystatechange = xhrCallbacks[ id ] = callback;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tabort: function() {\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tcallback( undefined, true );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} );\n}\n\n// Functions to create xhrs\nfunction createStandardXHR() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n}\n\nfunction createActiveXHR() {\n\ttry {\n\t\treturn new window.ActiveXObject( \"Microsoft.XMLHTTP\" );\n\t} catch ( e ) {}\n}\n\n\n\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and global\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t\ts.global = false;\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\n\t\tvar script,\n\t\t\thead = document.head || jQuery( \"head\" )[ 0 ] || document.documentElement;\n\n\t\treturn {\n\n\t\t\tsend: function( _, callback ) {\n\n\t\t\t\tscript = document.createElement( \"script\" );\n\n\t\t\t\tscript.async = true;\n\n\t\t\t\tif ( s.scriptCharset ) {\n\t\t\t\t\tscript.charset = s.scriptCharset;\n\t\t\t\t}\n\n\t\t\t\tscript.src = s.url;\n\n\t\t\t\t// Attach handlers for all browsers\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\n\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\n\n\t\t\t\t\t\t// Handle memory leak in IE\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\n\n\t\t\t\t\t\t// Remove the script\n\t\t\t\t\t\tif ( script.parentNode ) {\n\t\t\t\t\t\t\tscript.parentNode.removeChild( script );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Dereference the script\n\t\t\t\t\t\tscript = null;\n\n\t\t\t\t\t\t// Callback if not abort\n\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( script ) {\n\t\t\t\t\tscript.onload( undefined, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// data: string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\tcontext = context || document;\n\n\tvar parsed = rsingleTag.exec( data ),\n\t\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n// Keep a copy of the old load method\nvar _load = jQuery.fn.load;\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tif ( typeof url !== \"string\" && _load ) {\n\t\treturn _load.apply( this, arguments );\n\t}\n\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = jQuery.trim( url.slice( off, url.length ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( jQuery.isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.expr.filters.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\n\n/**\n * Gets a window from an element\n */\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ?\n\t\telem :\n\t\telem.nodeType === 9 ?\n\t\t\telem.defaultView || elem.parentWindow :\n\t\t\tfalse;\n}\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\tjQuery.inArray( \"auto\", [ curCSSTop, curCSSLeft ] ) > -1;\n\n\t\t// need to be able to calculate position if either top or left\n\t\t// is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\toffset: function( options ) {\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar docElem, win,\n\t\t\tbox = { top: 0, left: 0 },\n\t\t\telem = this[ 0 ],\n\t\t\tdoc = elem && elem.ownerDocument;\n\n\t\tif ( !doc ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocElem = doc.documentElement;\n\n\t\t// Make sure it's not a disconnected DOM node\n\t\tif ( !jQuery.contains( docElem, elem ) ) {\n\t\t\treturn box;\n\t\t}\n\n\t\t// If we don't have gBCR, just use 0,0 rather than error\n\t\t// BlackBerry 5, iOS 3 (original iPhone)\n\t\tif ( typeof elem.getBoundingClientRect !== \"undefined\" ) {\n\t\t\tbox = elem.getBoundingClientRect();\n\t\t}\n\t\twin = getWindow( doc );\n\t\treturn {\n\t\t\ttop: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),\n\t\t\tleft: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\n\t\t};\n\t},\n\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset,\n\t\t\tparentOffset = { top: 0, left: 0 },\n\t\t\telem = this[ 0 ];\n\n\t\t// Fixed elements are offset from window (parentOffset = {top:0, left: 0},\n\t\t// because it is its only offset parent\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// we assume that getBoundingClientRect is available when computed position is fixed\n\t\t\toffset = elem.getBoundingClientRect();\n\t\t} else {\n\n\t\t\t// Get *real* offsetParent\n\t\t\toffsetParent = this.offsetParent();\n\n\t\t\t// Get correct offsets\n\t\t\toffset = this.offset();\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\n\t\t\t\tparentOffset = offsetParent.offset();\n\t\t\t}\n\n\t\t\t// Add offsetParent borders\n\t\t\tparentOffset.top += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = /Y/.test( prop );\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\t\t\tvar win = getWindow( elem );\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? ( prop in win ) ? win[ prop ] :\n\t\t\t\t\twin.document.documentElement[ method ] :\n\t\t\t\t\telem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : jQuery( win ).scrollLeft(),\n\t\t\t\t\ttop ? val : jQuery( win ).scrollTop()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length, null );\n\t};\n} );\n\n// Support: Safari<7-8+, Chrome<37-44+\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// getComputedStyle returns percent when specified for top/left/bottom/right\n// rather than make the css module depend on the offset module, we just check for it here\njQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// if curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name },\n\tfunction( defaultExtra, funcName ) {\n\n\t\t// margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\t// unfortunately, this causes bug #3838 in IE6/8 only,\n\t\t\t\t\t// but there is currently no good, small way to fix it.\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\n\t\t};\n\t} );\n} );\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t}\n} );\n\n// The number of elements contained in the matched element set\njQuery.fn.size = function() {\n\treturn this.length;\n};\n\njQuery.fn.andSelf = jQuery.fn.addBack;\n\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in\n// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( !noGlobal ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\nreturn jQuery;\n}));\n","//! moment.js\n//! version : 2.17.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\nvar hookCallback;\n\nfunction hooks () {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback (callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n}\n\nfunction isObjectEmpty(obj) {\n var k;\n for (k in obj) {\n // even if its not own property I'd still call it non-empty\n return false;\n }\n return true;\n}\n\nfunction isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n}\n\nfunction isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n}\n\nfunction map(arr, fn) {\n var res = [], i;\n for (i = 0; i < arr.length; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty : false,\n unusedTokens : [],\n unusedInput : [],\n overflow : -2,\n charsLeftOver : 0,\n nullInput : false,\n invalidMonth : null,\n invalidFormat : false,\n userInvalidated : false,\n iso : false,\n parsedDateParts : [],\n meridiem : null\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this);\n var len = t.length >>> 0;\n\n for (var i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nvar some$1 = some;\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m);\n var parsedParts = some$1.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n var isNowValid = !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid = isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n }\n else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid (flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n }\n else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = hooks.momentProperties = [];\n\nfunction copyConfig(to, from) {\n var i, prop, val;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentProperties.length > 0) {\n for (i in momentProperties) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\nvar updateInProgress = false;\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment (obj) {\n return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n}\n\nfunction absFloor (number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\nfunction warn(msg) {\n if (hooks.suppressDeprecationWarnings === false &&\n (typeof console !== 'undefined') && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [];\n var arg;\n for (var i = 0; i < arguments.length; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (var key in arguments[0]) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + (new Error()).stack);\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n}\n\nfunction set (config) {\n var prop, i;\n for (i in config) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _ordinalParseLenient.\n this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\\d{1,2}/).source);\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig), prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i, res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar keys$1 = keys;\n\nvar defaultCalendar = {\n sameDay : '[Today at] LT',\n nextDay : '[Tomorrow at] LT',\n nextWeek : 'dddd [at] LT',\n lastDay : '[Yesterday at] LT',\n lastWeek : '[Last] dddd [at] LT',\n sameElse : 'L'\n};\n\nfunction calendar (key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nvar defaultLongDateFormat = {\n LTS : 'h:mm:ss A',\n LT : 'h:mm A',\n L : 'MM/DD/YYYY',\n LL : 'MMMM D, YYYY',\n LLL : 'MMMM D, YYYY h:mm A',\n LLLL : 'dddd, MMMM D, YYYY h:mm A'\n};\n\nfunction longDateFormat (key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n return val.slice(1);\n });\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate () {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d';\nvar defaultOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal (number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future : 'in %s',\n past : '%s ago',\n s : 'a few seconds',\n m : 'a minute',\n mm : '%d minutes',\n h : 'an hour',\n hh : '%d hours',\n d : 'a day',\n dd : '%d days',\n M : 'a month',\n MM : '%d months',\n y : 'a year',\n yy : '%d years'\n};\n\nfunction relativeTime (number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return (isFunction(output)) ?\n output(number, withoutSuffix, string, isFuture) :\n output.replace(/%d/i, number);\n}\n\nfunction pastFuture (diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias (unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [];\n for (var u in unitsObj) {\n units.push({unit: u, priority: priorities[u]});\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction makeGetSet (unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get (mom, unit) {\n return mom.isValid() ?\n mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n}\n\nfunction set$1 (mom, unit, value) {\n if (mom.isValid()) {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n}\n\n// MOMENTS\n\nfunction stringGet (units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\n\nfunction stringSet (units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units);\n for (var i = 0; i < prioritized.length; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n}\n\nvar formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\nvar localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\nvar formatFunctions = {};\n\nvar formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken (token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens), i, length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '', i;\n for (i = 0; i < length; i++) {\n output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar match1 = /\\d/; // 0 - 9\nvar match2 = /\\d\\d/; // 00 - 99\nvar match3 = /\\d{3}/; // 000 - 999\nvar match4 = /\\d{4}/; // 0000 - 9999\nvar match6 = /[+-]?\\d{6}/; // -999999 - 999999\nvar match1to2 = /\\d\\d?/; // 0 - 99\nvar match3to4 = /\\d\\d\\d\\d?/; // 999 - 9999\nvar match5to6 = /\\d\\d\\d\\d\\d\\d?/; // 99999 - 999999\nvar match1to3 = /\\d{1,3}/; // 0 - 999\nvar match1to4 = /\\d{1,4}/; // 0 - 9999\nvar match1to6 = /[+-]?\\d{1,6}/; // -999999 - 999999\n\nvar matchUnsigned = /\\d+/; // 0 - inf\nvar matchSigned = /[+-]?\\d+/; // -inf - inf\n\nvar matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\nvar matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n\nvar matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n// any word (or two) characters or numbers including two/three word month in arabic.\n// includes scottish gaelic two word and hyphenated months\nvar matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n\n\nvar regexes = {};\n\nfunction addRegexToken (token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return (isStrict && strictRegex) ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken (token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken (token, callback) {\n var i, func = callback;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n for (i = 0; i < token.length; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken (token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0;\nvar MONTH = 1;\nvar DATE = 2;\nvar HOUR = 3;\nvar MINUTE = 4;\nvar SECOND = 5;\nvar MILLISECOND = 6;\nvar WEEK = 7;\nvar WEEKDAY = 8;\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nvar indexOf$1 = indexOf;\n\nfunction daysInMonth(year, month) {\n return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/;\nvar defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\nfunction localeMonths (m, format) {\n if (!m) {\n return this._months;\n }\n return isArray(this._months) ? this._months[m.month()] :\n this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n}\n\nvar defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\nfunction localeMonthsShort (m, format) {\n if (!m) {\n return this._monthsShort;\n }\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] :\n this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i, ii, mom, llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse (monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth (mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth (value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth () {\n return daysInMonth(this.year(), this.month());\n}\n\nvar defaultMonthsShortRegex = matchWord;\nfunction monthsShortRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict ?\n this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n}\n\nvar defaultMonthsRegex = matchWord;\nfunction monthsRegex (isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict ?\n this._monthsStrictRegex : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? '' + y : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear () {\n return isLeapYear(this.year());\n}\n\nfunction createDate (y, m, d, h, M, s, ms) {\n //can't just apply() to create a date:\n //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply\n var date = new Date(y, m, d, h, M, s, ms);\n\n //the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n return date;\n}\n\nfunction createUTCDate (y) {\n var date = new Date(Date.UTC.apply(null, arguments));\n\n //the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear, resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek, resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n});\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek (mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow : 0, // Sunday is the first day of the week.\n doy : 6 // The week that contains Jan 1st is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek () {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear () {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek (input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek (input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\n\nvar defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\nfunction localeWeekdays (m, format) {\n if (!m) {\n return this._weekdays;\n }\n return isArray(this._weekdays) ? this._weekdays[m.day()] :\n this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];\n}\n\nvar defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\nfunction localeWeekdaysShort (m) {\n return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n}\n\nvar defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\nfunction localeWeekdaysMin (m) {\n return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i, ii, mom, llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf$1.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf$1.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf$1.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse (weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');\n }\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek (input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nvar defaultWeekdaysRegex = matchWord;\nfunction weekdaysRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict ?\n this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n}\n\nvar defaultWeekdaysShortRegex = matchWord;\nfunction weekdaysShortRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict ?\n this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n}\n\nvar defaultWeekdaysMinRegex = matchWord;\nfunction weekdaysMinRegex (isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict ?\n this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n}\n\n\nfunction computeWeekdaysParse () {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],\n i, mom, minp, shortp, longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = this.weekdaysMin(mom, '');\n shortp = this.weekdaysShort(mom, '');\n longp = this.weekdays(mom, '');\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 7; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2);\n});\n\nfunction meridiem (token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem (isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4;\n var pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM (input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return ((input + '').toLowerCase().charAt(0) === 'p');\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\nfunction localeMeridiem (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\n\n// MOMENTS\n\n// Setting the hour should keep the time, because the user explicitly\n// specified which hour he wants. So trying to maintain the same hour (in\n// a new timezone) makes sense. Adding/subtracting hours does not follow\n// this rule.\nvar getSetHour = makeGetSet('Hours', true);\n\n// months\n// week\n// weekdays\n// meridiem\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n ordinalParse: defaultOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse\n};\n\n// internal storage for locale config files\nvar locales = {};\nvar localeFamilies = {};\nvar globalLocale;\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null;\n // TODO: Find a better way to register and load all the locales in Node\n if (!locales[name] && (typeof module !== 'undefined') &&\n module && module.exports) {\n try {\n oldLocale = globalLocale._abbr;\n require('./locale/' + name);\n // because defineLocale currently also sets the global locale, we\n // want to undo that for lazy loaded locales\n getSetGlobalLocale(oldLocale);\n } catch (e) { }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale (name, config) {\n if (config !== null) {\n var parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale, parentConfig = baseConfig;\n // MERGE\n if (locales[name] != null) {\n parentConfig = locales[name]._config;\n }\n config = mergeConfigs(parentConfig, config);\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale (key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys$1(locales);\n}\n\nfunction checkOverflow (m) {\n var overflow;\n var a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :\n a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :\n a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :\n a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\nvar basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\nvar tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/;\n\nvar isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n // YYYYMM is NOT allowed by the standard\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/]\n];\n\n// iso time formats and regexes\nvar isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/]\n];\n\nvar aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n// date from iso format\nfunction configFromISO(config) {\n var i, l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime, dateFormat, timeFormat, tzFormat;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\n// date from iso format or fallback\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non ISO date formats are ' +\n 'discouraged and will be removed in an upcoming major release. Please refer to ' +\n 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n var curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from begining of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to begining of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n // console.log('token', token, 'parsedInput', parsedInput,\n // 'regex', getParseRegexForToken(token, config));\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n }\n else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n configFromArray(config);\n checkOverflow(config);\n}\n\n\nfunction meridiemFixWrap (locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i);\n config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n\n configFromArray(config);\n}\n\nfunction createFromConfig (config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig (config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({nullInput: true});\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (input === undefined) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (typeof(input) === 'object') {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC (input, format, locale, strict, isUTC) {\n var c = {};\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if ((isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal (input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n);\n\nvar prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n);\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max () {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +(new Date());\n};\n\nfunction Duration (duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n // representation for dateAddRemove\n this._milliseconds = +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days +\n weeks * 7;\n // It is impossible translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months +\n quarters * 3 +\n years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration (obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound (number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// FORMATTING\n\nfunction offset (token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset();\n var sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher);\n\n if (matches === null) {\n return null;\n }\n\n var chunk = matches[matches.length - 1] || [];\n var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ?\n 0 :\n parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset (m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone (input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC (keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal (keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset () {\n if (this._tzm != null) {\n this.utcOffset(this._tzm);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n }\n else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset (input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime () {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted () {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {};\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() &&\n compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal () {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset () {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc () {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(\\-)?(?:(\\d*)[. ])?(\\d+)\\:(\\d+)(?:\\:(\\d+)(\\.\\d*)?)?$/;\n\n// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n// and further modified to allow for strings containing both week and day\nvar isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;\n\nfunction createDuration (input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms : input._milliseconds,\n d : input._days,\n M : input._months\n };\n } else if (isNumber(input)) {\n duration = {};\n if (key) {\n duration[key] = input;\n } else {\n duration.milliseconds = input;\n }\n } else if (!!(match = aspNetRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : 0,\n d : toInt(match[DATE]) * sign,\n h : toInt(match[HOUR]) * sign,\n m : toInt(match[MINUTE]) * sign,\n s : toInt(match[SECOND]) * sign,\n ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n };\n } else if (!!(match = isoRegex.exec(input))) {\n sign = (match[1] === '-') ? -1 : 1;\n duration = {\n y : parseIso(match[2], sign),\n M : parseIso(match[3], sign),\n w : parseIso(match[4], sign),\n d : parseIso(match[5], sign),\n h : parseIso(match[6], sign),\n m : parseIso(match[7], sign),\n s : parseIso(match[8], sign)\n };\n } else if (duration == null) {// checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\n\nfunction parseIso (inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {milliseconds: 0, months: 0};\n\n res.months = other.month() - base.month() +\n (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return {milliseconds: 0, months: 0};\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract (mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add');\nvar subtract = createAdder(-1, 'subtract');\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' :\n diff < -1 ? 'lastWeek' :\n diff < 0 ? 'lastDay' :\n diff < 1 ? 'sameDay' :\n diff < 2 ? 'nextDay' :\n diff < 7 ? 'nextWeek' : 'sameElse';\n}\n\nfunction calendar$1 (time, formats) {\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse';\n\n var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n}\n\nfunction clone () {\n return new Moment(this);\n}\n\nfunction isAfter (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween (from, to, units, inclusivity) {\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&\n (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));\n}\n\nfunction isSame (input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units || 'millisecond');\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n}\n\nfunction isSameOrAfter (input, units) {\n return this.isSame(input, units) || this.isAfter(input,units);\n}\n\nfunction isSameOrBefore (input, units) {\n return this.isSame(input, units) || this.isBefore(input,units);\n}\n\nfunction diff (input, units, asFloat) {\n var that,\n zoneDelta,\n delta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n if (units === 'year' || units === 'month' || units === 'quarter') {\n output = monthDiff(this, that);\n if (units === 'quarter') {\n output = output / 3;\n } else if (units === 'year') {\n output = output / 12;\n }\n } else {\n delta = this - that;\n output = units === 'second' ? delta / 1e3 : // 1000\n units === 'minute' ? delta / 6e4 : // 1000 * 60\n units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n delta;\n }\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff (a, b) {\n // difference in months\n var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2, adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString () {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString () {\n var m = this.clone().utc();\n if (0 < m.year() && m.year() <= 9999) {\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n return this.toDate().toISOString();\n } else {\n return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n } else {\n return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n }\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format (inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow (withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to (time, withoutSuffix) {\n if (this.isValid() &&\n ((isMoment(time) && time.isValid()) ||\n createLocal(time).isValid())) {\n return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow (withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData () {\n return this._locale;\n}\n\nfunction startOf (units) {\n units = normalizeUnits(units);\n // the following switch intentionally omits break keywords\n // to utilize falling through the cases.\n switch (units) {\n case 'year':\n this.month(0);\n /* falls through */\n case 'quarter':\n case 'month':\n this.date(1);\n /* falls through */\n case 'week':\n case 'isoWeek':\n case 'day':\n case 'date':\n this.hours(0);\n /* falls through */\n case 'hour':\n this.minutes(0);\n /* falls through */\n case 'minute':\n this.seconds(0);\n /* falls through */\n case 'second':\n this.milliseconds(0);\n }\n\n // weeks are a special case\n if (units === 'week') {\n this.weekday(0);\n }\n if (units === 'isoWeek') {\n this.isoWeekday(1);\n }\n\n // quarters are also special\n if (units === 'quarter') {\n this.month(Math.floor(this.month() / 3) * 3);\n }\n\n return this;\n}\n\nfunction endOf (units) {\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond') {\n return this;\n }\n\n // 'date' is an alias for 'day', so it should be considered as such.\n if (units === 'date') {\n units = 'day';\n }\n\n return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n}\n\nfunction valueOf () {\n return this._d.valueOf() - ((this._offset || 0) * 60000);\n}\n\nfunction unix () {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate () {\n return new Date(this.valueOf());\n}\n\nfunction toArray () {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n}\n\nfunction toObject () {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n}\n\nfunction toJSON () {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$1 () {\n return isValid(this);\n}\n\nfunction parsingFlags () {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt () {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken (token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n});\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy);\n}\n\nfunction getSetISOWeekYear (input) {\n return getSetWeekYearHelper.call(this,\n input, this.isoWeek(), this.isoWeekday(), 1, 4);\n}\n\nfunction getISOWeeksInYear () {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getWeeksInYear () {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter (input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIOROITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0], 10);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear (input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n// MOMENTS\n\nvar getSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr () {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName () {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$1;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\n\n// Year\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\n\n// Week Year\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\n\n// Quarter\nproto.quarter = proto.quarters = getSetQuarter;\n\n// Month\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\n\n// Week\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\n\n// Day\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\n\n// Hour\nproto.hour = proto.hours = getSetHour;\n\n// Minute\nproto.minute = proto.minutes = getSetMinute;\n\n// Second\nproto.second = proto.seconds = getSetSecond;\n\n// Millisecond\nproto.millisecond = proto.milliseconds = getSetMillisecond;\n\n// Offset\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\n\n// Timezone\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\n\n// Deprecations\nproto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\nproto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\nproto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\nproto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\nproto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\nfunction createUnix (input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone () {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat (string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\n\n// Month\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\n\n// Week\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n// Day of Week\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n// Hours\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1 (format, index, field, setter) {\n var locale = getLocale();\n var utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl (format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl (localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0;\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n var i;\n var out = [];\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths (format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort (format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin (localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n ordinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal : function (number) {\n var b = number % 10,\n output = (toInt(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n return number + output;\n }\n});\n\n// Side effect imports\nhooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\nhooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n\nvar mathAbs = Math.abs;\n\nfunction abs () {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1 (duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1 (input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1 (input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil (number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble () {\n var milliseconds = this._milliseconds;\n var days = this._days;\n var months = this._months;\n var data = this._data;\n var seconds, minutes, hours, years, monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0))) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths (days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n}\n\nfunction monthsToDays (months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n}\n\nfunction as (units) {\n var days;\n var months;\n var milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n return units === 'month' ? months : months / 12;\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week' : return days / 7 + milliseconds / 6048e5;\n case 'day' : return days + milliseconds / 864e5;\n case 'hour' : return days * 24 + milliseconds / 36e5;\n case 'minute' : return days * 1440 + milliseconds / 6e4;\n case 'second' : return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n default: throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1 () {\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs (alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms');\nvar asSeconds = makeAs('s');\nvar asMinutes = makeAs('m');\nvar asHours = makeAs('h');\nvar asDays = makeAs('d');\nvar asWeeks = makeAs('w');\nvar asMonths = makeAs('M');\nvar asYears = makeAs('y');\n\nfunction get$2 (units) {\n units = normalizeUnits(units);\n return this[units + 's']();\n}\n\nfunction makeGetter(name) {\n return function () {\n return this._data[name];\n };\n}\n\nvar milliseconds = makeGetter('milliseconds');\nvar seconds = makeGetter('seconds');\nvar minutes = makeGetter('minutes');\nvar hours = makeGetter('hours');\nvar days = makeGetter('days');\nvar months = makeGetter('months');\nvar years = makeGetter('years');\n\nfunction weeks () {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round;\nvar thresholds = {\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month\n M: 11 // months to year\n};\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1 (posNegDuration, withoutSuffix, locale) {\n var duration = createDuration(posNegDuration).abs();\n var seconds = round(duration.as('s'));\n var minutes = round(duration.as('m'));\n var hours = round(duration.as('h'));\n var days = round(duration.as('d'));\n var months = round(duration.as('M'));\n var years = round(duration.as('y'));\n\n var a = seconds < thresholds.s && ['s', seconds] ||\n minutes <= 1 && ['m'] ||\n minutes < thresholds.m && ['mm', minutes] ||\n hours <= 1 && ['h'] ||\n hours < thresholds.h && ['hh', hours] ||\n days <= 1 && ['d'] ||\n days < thresholds.d && ['dd', days] ||\n months <= 1 && ['M'] ||\n months < thresholds.M && ['MM', months] ||\n years <= 1 && ['y'] || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n return true;\n}\n\nfunction humanize (withSuffix) {\n var locale = this.localeData();\n var output = relativeTime$1(this, !withSuffix, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n var seconds = abs$1(this._milliseconds) / 1000;\n var days = abs$1(this._days);\n var months = abs$1(this._months);\n var minutes, hours, years;\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n var Y = years;\n var M = months;\n var D = days;\n var h = hours;\n var m = minutes;\n var s = seconds;\n var total = this.asSeconds();\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n return (total < 0 ? '-' : '') +\n 'P' +\n (Y ? Y + 'Y' : '') +\n (M ? M + 'M' : '') +\n (D ? D + 'D' : '') +\n ((h || m || s) ? 'T' : '') +\n (h ? h + 'H' : '') +\n (m ? m + 'M' : '') +\n (s ? s + 'S' : '');\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\n// Deprecations\nproto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\nproto$2.lang = lang;\n\n// Side effect imports\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input, 10) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n// Side effect imports\n\n\nhooks.version = '2.17.1';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\nreturn hooks;\n\n})));\n","/*\n backbone.paginator\n http://github.com/backbone-paginator/backbone.paginator\n\n Copyright (c) 2016 Jimmy Yuen Ho Wong and contributors\n\n @module\n @license MIT\n*/\n\n(function (factory) {\n\n // CommonJS\n if (typeof exports == \"object\" && typeof require == \"function\") {\n module.exports = factory(require(\"underscore\"), require(\"backbone\"));\n }\n // AMD\n else if (typeof define == \"function\" && define.amd) {\n define([\"underscore\", \"backbone\"], factory);\n }\n // Browser\n else if (typeof _ !== \"undefined\" && typeof Backbone !== \"undefined\") {\n var oldPageableCollection = Backbone.PageableCollection;\n var PageableCollection = factory(_, Backbone);\n\n /**\n __BROWSER ONLY__\n\n If you already have an object named `PageableCollection` attached to the\n `Backbone` module, you can use this to return a local reference to this\n PageableCollection class and reset the name PageableCollection to its\n previous definition.\n\n // The left hand side gives you a reference to this\n // PageableCollection implementation, the right hand side\n // resets PageableCollection to your other PageableCollection.\n var PageableCollection = PageableCollection.noConflict();\n\n @static\n @return {PageableCollection}\n */\n Backbone.PageableCollection.noConflict = function () {\n Backbone.PageableCollection = oldPageableCollection;\n return PageableCollection;\n };\n }\n\n}(function (_, Backbone) {\n\n \"use strict\";\n\n var _extend = _.extend;\n var _omit = _.omit;\n var _clone = _.clone;\n var _each = _.each;\n var _pick = _.pick;\n var _contains = _.includes;\n var _isEmpty = _.isEmpty;\n var _pairs = _.pairs || _.toPairs;\n var _invert = _.invert;\n var _isArray = _.isArray;\n var _isFunction = _.isFunction;\n var _isObject = _.isObject;\n var _keys = _.keys;\n var _isUndefined = _.isUndefined;\n var ceil = Math.ceil;\n var floor = Math.floor;\n var max = Math.max;\n\n var BBColProto = Backbone.Collection.prototype;\n\n function finiteInt (val, name) {\n if (!_.isNumber(val) || _.isNaN(val) || !_.isFinite(val) || ~~val !== val) {\n throw new TypeError(\"`\" + name + \"` must be a finite integer\");\n }\n return val;\n }\n\n function queryStringToParams (qs) {\n var kvp, k, v, ls, params = {}, decode = decodeURIComponent;\n var kvps = qs.split('&');\n for (var i = 0, l = kvps.length; i < l; i++) {\n var param = kvps[i];\n kvp = param.split('='), k = kvp[0], v = kvp[1];\n if (v == null) v = true;\n k = decode(k), v = decode(v), ls = params[k];\n if (_isArray(ls)) ls.push(v);\n else if (ls) params[k] = [ls, v];\n else params[k] = v;\n }\n return params;\n }\n\n // hack to make sure the whatever event handlers for this event is run\n // before func is, and the event handlers that func will trigger.\n function runOnceAtLastHandler (col, event, func) {\n var eventHandlers = col._events[event];\n if (eventHandlers && eventHandlers.length) {\n var lastHandler = eventHandlers[eventHandlers.length - 1];\n var oldCallback = lastHandler.callback;\n lastHandler.callback = function () {\n try {\n oldCallback.apply(this, arguments);\n func();\n }\n catch (e) {\n throw e;\n }\n finally {\n lastHandler.callback = oldCallback;\n }\n };\n }\n else func();\n }\n\n var PARAM_TRIM_RE = /[\\s'\"]/g;\n var URL_TRIM_RE = /[<>\\s'\"]/g;\n\n\n /**\n * State change event. Fired when PageableCollection#state gets updated\n *\n * @event pageable:state:change\n * @type {object} The PageableCollection#state object of this\n * PageableCollection instance\n */\n\n\n /**\n Drop-in replacement for Backbone.Collection. Supports server-side and\n client-side pagination and sorting. Client-side mode also support fully\n multi-directional synchronization of changes between pages.\n\n @class PageableCollection\n @extends Backbone.Collection\n */\n var PageableCollection = Backbone.PageableCollection = Backbone.Collection.extend({\n\n /**\n The container object to store all pagination states.\n\n You can override the default state by extending this class or specifying\n them in an `options` hash to the constructor.\n\n @property {number} firstPage = 1 - The first page index. Set to 0 if\n your server API uses 0-based indices. You should only override this value\n during extension, initialization or reset by the server after\n fetching. This value should be read only at other times.\n\n @property {number} lastPage = null - The last page index. This value\n is __read only__ and it's calculated based on whether `firstPage` is 0 or\n 1, during bootstrapping, fetching and resetting. Please don't change this\n value under any circumstances.\n\n @property {number} currentPage = null - The current page index. You\n should only override this value during extension, initialization or reset\n by the server after fetching. This value should be read only at other\n times. Can be a 0-based or 1-based index, depending on whether\n `firstPage` is 0 or 1. If left as default, it will be set to `firstPage`\n on initialization.\n\n @property {number} pageSize = 25 - How many records to show per\n page. This value is __read only__ after initialization, if you want to\n change the page size after initialization, you must call\n PageableCollection#setPageSize.\n\n @property {number} totalPages = null - How many pages there are. This\n value is __read only__ and it is calculated from `totalRecords`.\n\n @property {number} totalRecords = null - How many records there\n are. This value is __required__ under server mode. This value is optional\n for client mode as the number will be the same as the number of models\n during bootstrapping and during fetching, either supplied by the server\n in the metadata, or calculated from the size of the response.\n\n @property {string} sortKey = null - The model attribute to use for\n sorting.\n\n @property {number} order = -1 - The order to use for sorting. Specify\n -1 for ascending order or 1 for descending order. If 0, no client side\n sorting will be done and the order query parameter will not be sent to\n the server during a fetch.\n */\n state: {\n firstPage: 1,\n lastPage: null,\n currentPage: null,\n pageSize: 25,\n totalPages: null,\n totalRecords: null,\n sortKey: null,\n order: -1\n },\n\n /**\n @property {string} mode = \"server\" The mode of operations for this\n collection. `\"server\"` paginates on the server-side, `\"client\"` paginates\n on the client-side and `\"infinite\"` paginates on the server-side for APIs\n that do not support `totalRecords`.\n */\n mode: \"server\",\n\n /**\n A translation map to convert PageableCollection state attributes\n to the query parameters accepted by your server API.\n\n You can override the default state by extending this class or specifying\n them in `options.queryParams` object hash to the constructor.\n\n @property {string|function():string} currentPage = \"page\"\n @property {string|function():string} pageSize = \"per_page\"\n @property {string|function():string} totalPages = \"total_pages\"\n @property {string|function():string} totalRecords = \"total_entries\"\n @property {string|function():string} sortKey = \"sort_by\"\n @property {string|function():string} order = \"order\"\n @property {Object} directions = {\"-1\": \"asc\", \"1\": \"desc\"} - A map for\n translating a PageableCollection#state.order constant to the ones your\n server API accepts.\n */\n queryParams: {\n currentPage: \"page\",\n pageSize: \"per_page\",\n totalPages: \"total_pages\",\n totalRecords: \"total_entries\",\n sortKey: \"sort_by\",\n order: \"order\",\n directions: {\n \"-1\": \"asc\",\n \"1\": \"desc\"\n }\n },\n\n /**\n Given a list of models or model attributues, bootstraps the full\n collection in client mode or infinite mode, or just the page you want in\n server mode.\n\n If you want to initialize a collection to a different state than the\n default, you can specify them in `options.state`. Any state parameters\n supplied will be merged with the default. If you want to change the\n default mapping from PageableCollection#state keys to your server API's\n query parameter names, you can specifiy an object hash in\n `option.queryParams`. Likewise, any mapping provided will be merged with\n the default. Lastly, all Backbone.Collection constructor options are also\n accepted.\n\n See:\n\n - PageableCollection#state\n - PageableCollection#queryParams\n - [Backbone.Collection#initialize](http://backbonejs.org/#Collection-constructor)\n\n @constructor\n\n @property {Backbone.Collection} fullCollection - __CLIENT MODE ONLY__\n This collection is the internal storage for the bootstrapped or fetched\n models. You can use this if you want to operate on all the pages.\n\n @param {Array.<Object>} models\n\n @param {Object} options\n\n @param {function(*, *): number} options.comparator - If specified, this\n comparator is set to the current page under server mode, or the\n PageableCollection#fullCollection otherwise.\n\n @param {boolean} options.full 0 If `false` and either a\n `options.comparator` or `sortKey` is defined, the comparator is attached\n to the current page. Default is `true` under client or infinite mode and\n the comparator will be attached to the PageableCollection#fullCollection.\n\n @param {Object} options.state - The state attributes overriding the defaults.\n\n @param {string} options.state.sortKey - The model attribute to use for\n sorting. If specified instead of `options.comparator`, a comparator will\n be automatically created using this value, and optionally a sorting order\n specified in `options.state.order`. The comparator is then attached to\n the new collection instance.\n\n @param {number} options.state.order - The order to use for sorting. Specify\n -1 for ascending order and 1 for descending order.\n\n @param {Object} options.queryParam\n */\n constructor: function (models, options) {\n\n BBColProto.constructor.apply(this, arguments);\n\n options = options || {};\n\n var mode = this.mode = options.mode || this.mode || PageableProto.mode;\n\n var queryParams = _extend({}, PageableProto.queryParams, this.queryParams,\n options.queryParams || {});\n\n queryParams.directions = _extend({},\n PageableProto.queryParams.directions,\n this.queryParams.directions,\n queryParams.directions);\n\n this.queryParams = queryParams;\n\n var state = this.state = _extend({}, PageableProto.state, this.state,\n options.state);\n\n state.currentPage = state.currentPage == null ?\n state.firstPage :\n state.currentPage;\n\n if (!_isArray(models)) models = models ? [models] : [];\n models = models.slice();\n\n if (mode != \"server\" && state.totalRecords == null && !_isEmpty(models)) {\n // Can't use models.length naively here because Backbone.Collection will\n // dedupe by `idAttribute`\n state.totalRecords = this.length;\n }\n\n this.switchMode(mode, _extend({fetch: false,\n resetState: false,\n models: models}, options));\n\n var comparator = options.comparator;\n\n if (state.sortKey && !comparator) {\n this.setSorting(state.sortKey, state.order, options);\n }\n\n if (mode != \"server\") {\n var fullCollection = this.fullCollection;\n\n if (comparator && options.full) {\n this.comparator = null;\n fullCollection.comparator = comparator;\n }\n\n if (options.full) fullCollection.sort();\n\n // make sure the models in the current page and full collection have the\n // same references\n if (!_isEmpty(models)) {\n this.getPage(state.currentPage);\n }\n }\n\n this._initState = _clone(this.state);\n },\n\n /**\n Makes a Backbone.Collection that contains all the pages.\n\n @private\n @param {Array.<Object|Backbone.Model>} models\n @param {Object} options Options for Backbone.Collection constructor.\n @return {Backbone.Collection}\n */\n _makeFullCollection: function (models, options) {\n\n var properties = [\"url\", \"model\", \"sync\", \"comparator\"];\n var thisProto = this.constructor.prototype;\n var i, length, prop;\n\n var proto = {};\n for (i = 0, length = properties.length; i < length; i++) {\n prop = properties[i];\n if (!_isUndefined(thisProto[prop])) {\n proto[prop] = thisProto[prop];\n }\n }\n\n var fullCollection = new (Backbone.Collection.extend(proto))(models, options);\n\n for (i = 0, length = properties.length; i < length; i++) {\n prop = properties[i];\n if (this[prop] !== thisProto[prop]) {\n fullCollection[prop] = this[prop];\n }\n }\n\n return fullCollection;\n },\n\n /**\n Factory method that returns a Backbone event handler that responses to\n the `add`, `remove`, `reset`, and the `sort` events. The returned event\n handler will synchronize the current page collection and the full\n collection's models.\n\n @private\n\n @fires PageableCollection#pageable:state:change when handling an\n `add`, `remove`, or `reset` event\n\n @param {PageableCollection} pageCol\n @param {Backbone.Collection} fullCol\n\n @return {function(string, Backbone.Model, Backbone.Collection, Object)}\n Collection event handler\n */\n _makeCollectionEventHandler: function (pageCol, fullCol) {\n\n return function collectionEventHandler (event, model, collection, options) {\n\n var handlers = pageCol._handlers;\n _each(_keys(handlers), function (event) {\n var handler = handlers[event];\n pageCol.off(event, handler);\n fullCol.off(event, handler);\n });\n\n var state = _clone(pageCol.state);\n var firstPage = state.firstPage;\n var currentPage = firstPage === 0 ?\n state.currentPage :\n state.currentPage - 1;\n var pageSize = state.pageSize;\n var pageStart = currentPage * pageSize, pageEnd = pageStart + pageSize;\n\n if (event == \"add\") {\n var pageIndex, fullIndex, addAt, colToAdd, options = options || {};\n if (collection == fullCol) {\n fullIndex = fullCol.indexOf(model);\n if (fullIndex >= pageStart && fullIndex < pageEnd) {\n colToAdd = pageCol;\n pageIndex = addAt = fullIndex - pageStart;\n }\n }\n else {\n pageIndex = pageCol.indexOf(model);\n fullIndex = pageStart + pageIndex;\n colToAdd = fullCol;\n var addAt = !_isUndefined(options.at) ?\n options.at + pageStart :\n fullIndex;\n }\n\n if (!options.onRemove) {\n ++state.totalRecords;\n delete options.onRemove;\n }\n\n pageCol.state = pageCol._checkState(state);\n\n if (colToAdd) {\n colToAdd.add(model, _extend({}, options, {at: addAt}));\n var modelToRemove = pageIndex >= pageSize ?\n model :\n !_isUndefined(options.at) && addAt < pageEnd && pageCol.length > pageSize ?\n pageCol.at(pageSize) :\n null;\n if (modelToRemove) {\n runOnceAtLastHandler(collection, event, function () {\n pageCol.remove(modelToRemove, {onAdd: true});\n });\n }\n }\n\n if (!options.silent) pageCol.trigger(\"pageable:state:change\", pageCol.state);\n }\n\n // remove the model from the other collection as well\n if (event == \"remove\") {\n if (!options.onAdd) {\n // decrement totalRecords and update totalPages and lastPage\n if (!--state.totalRecords) {\n state.totalRecords = null;\n state.totalPages = null;\n }\n else {\n var totalPages = state.totalPages = ceil(state.totalRecords / pageSize);\n state.lastPage = firstPage === 0 ? totalPages - 1 : totalPages || firstPage;\n if (state.currentPage > totalPages) state.currentPage = state.lastPage;\n }\n pageCol.state = pageCol._checkState(state);\n\n var nextModel, removedIndex = options.index;\n if (collection == pageCol) {\n if (nextModel = fullCol.at(pageEnd)) {\n runOnceAtLastHandler(pageCol, event, function () {\n pageCol.push(nextModel, {onRemove: true});\n });\n }\n else if (!pageCol.length && state.totalRecords) {\n pageCol.reset(fullCol.models.slice(pageStart - pageSize, pageEnd - pageSize),\n _extend({}, options, {parse: false}));\n }\n fullCol.remove(model);\n }\n else if (removedIndex >= pageStart && removedIndex < pageEnd) {\n if (nextModel = fullCol.at(pageEnd - 1)) {\n runOnceAtLastHandler(pageCol, event, function() {\n pageCol.push(nextModel, {onRemove: true});\n });\n }\n pageCol.remove(model);\n if (!pageCol.length && state.totalRecords) {\n pageCol.reset(fullCol.models.slice(pageStart - pageSize, pageEnd - pageSize),\n _extend({}, options, {parse: false}));\n }\n }\n }\n else delete options.onAdd;\n\n if (!options.silent) pageCol.trigger(\"pageable:state:change\", pageCol.state);\n }\n\n if (event == \"reset\") {\n options = collection;\n collection = model;\n\n // Reset that's not a result of getPage\n if (collection == pageCol && options.from == null &&\n options.to == null) {\n var head = fullCol.models.slice(0, pageStart);\n var tail = fullCol.models.slice(pageStart + pageCol.models.length);\n fullCol.reset(head.concat(pageCol.models).concat(tail), options);\n }\n else if (collection == fullCol) {\n if (!(state.totalRecords = fullCol.models.length)) {\n state.totalRecords = null;\n state.totalPages = null;\n }\n if (pageCol.mode == \"client\") {\n firstPage = state.lastPage = state.currentPage = state.firstPage;\n currentPage = firstPage === 0 ? state.currentPage : state.currentPage - 1;\n pageStart = currentPage * pageSize;\n pageEnd = pageStart + pageSize;\n }\n pageCol.state = pageCol._checkState(state);\n pageCol.reset(fullCol.models.slice(pageStart, pageEnd),\n _extend({}, options, {parse: false}));\n }\n\n if (!options.silent) pageCol.trigger(\"pageable:state:change\", pageCol.state);\n }\n\n if (event == \"sort\") {\n options = collection;\n collection = model;\n if (collection === fullCol) {\n pageCol.reset(fullCol.models.slice(pageStart, pageEnd),\n _extend({}, options, {parse: false}));\n }\n }\n\n _each(_keys(handlers), function (event) {\n var handler = handlers[event];\n _each([pageCol, fullCol], function (col) {\n col.on(event, handler);\n var callbacks = col._events[event] || [];\n callbacks.unshift(callbacks.pop());\n });\n });\n };\n },\n\n /**\n Sanity check this collection's pagination states. Only perform checks\n when all the required pagination state values are defined and not null.\n If `totalPages` is undefined or null, it is set to `totalRecords` /\n `pageSize`. `lastPage` is set according to whether `firstPage` is 0 or 1\n when no error occurs.\n\n @private\n\n @throws {TypeError} If `totalRecords`, `pageSize`, `currentPage` or\n `firstPage` is not a finite integer.\n\n @throws {RangeError} If `pageSize`, `currentPage` or `firstPage` is out\n of bounds.\n\n @return {Object} Returns the `state` object if no error was found.\n */\n _checkState: function (state) {\n var mode = this.mode;\n var links = this.links;\n var totalRecords = state.totalRecords;\n var pageSize = state.pageSize;\n var currentPage = state.currentPage;\n var firstPage = state.firstPage;\n var totalPages = state.totalPages;\n\n if (totalRecords != null && pageSize != null && currentPage != null &&\n firstPage != null && (mode == \"infinite\" ? links : true)) {\n\n totalRecords = finiteInt(totalRecords, \"totalRecords\");\n pageSize = finiteInt(pageSize, \"pageSize\");\n currentPage = finiteInt(currentPage, \"currentPage\");\n firstPage = finiteInt(firstPage, \"firstPage\");\n\n if (pageSize < 1) {\n throw new RangeError(\"`pageSize` must be >= 1\");\n }\n\n totalPages = state.totalPages = ceil(totalRecords / pageSize);\n\n if (firstPage < 0 || firstPage > 1) {\n throw new RangeError(\"`firstPage must be 0 or 1`\");\n }\n\n state.lastPage = firstPage === 0 ? max(0, totalPages - 1) : totalPages || firstPage;\n\n if (mode == \"infinite\") {\n if (!links[currentPage]) {\n throw new RangeError(\"No link found for page \" + currentPage);\n }\n }\n else if (currentPage < firstPage ||\n (totalPages > 0 &&\n (firstPage ? currentPage > totalPages : currentPage >= totalPages))) {\n throw new RangeError(\"`currentPage` must be firstPage <= currentPage \" +\n (firstPage ? \"<\" : \"<=\") +\n \" totalPages if \" + firstPage + \"-based. Got \" +\n currentPage + '.');\n }\n }\n\n return state;\n },\n\n /**\n Change the page size of this collection.\n\n Under most if not all circumstances, you should call this method to\n change the page size of a pageable collection because it will keep the\n pagination state sane. By default, the method will recalculate the\n current page number to one that will retain the current page's models\n when increasing the page size. When decreasing the page size, this method\n will retain the last models to the current page that will fit into the\n smaller page size.\n\n If `options.first` is true, changing the page size will also reset the\n current page back to the first page instead of trying to be smart.\n\n For server mode operations, changing the page size will trigger a\n PageableCollection#fetch and subsequently a `reset` event.\n\n For client mode operations, changing the page size will `reset` the\n current page by recalculating the current page boundary on the client\n side.\n\n If `options.fetch` is true, a fetch can be forced if the collection is in\n client mode.\n\n @param {number} pageSize - The new page size to set to PageableCollection#state.\n @param {Object} options - {@link PageableCollection#fetch} options.\n @param {boolean} options.first = false 0 Reset the current page number to\n the first page if `true`.\n @param {boolean} options.fetch - If `true`, force a fetch in client mode.\n\n @throws {TypeError} If `pageSize` is not a finite integer.\n @throws {RangeError} If `pageSize` is less than 1.\n\n @chainable\n @return {XMLHttpRequest|PageableCollection} The XMLHttpRequest\n from fetch or this.\n */\n setPageSize: function (pageSize, options) {\n pageSize = finiteInt(pageSize, \"pageSize\");\n\n options = options || {first: false};\n\n var state = this.state;\n var totalPages = ceil(state.totalRecords / pageSize);\n var currentPage = totalPages ?\n max(state.firstPage, floor(totalPages * state.currentPage / state.totalPages)) :\n state.firstPage;\n\n state = this.state = this._checkState(_extend({}, state, {\n pageSize: pageSize,\n currentPage: options.first ? state.firstPage : currentPage,\n totalPages: totalPages\n }));\n\n return this.getPage(state.currentPage, _omit(options, [\"first\"]));\n },\n\n /**\n Switching between client, server and infinite mode.\n\n If switching from client to server mode, the #fullCollection is emptied\n first and then deleted and a fetch is immediately issued for the current\n page from the server. Pass `false` to `options.fetch` to skip fetching.\n\n If switching to infinite mode, and if `options.models` is given for an\n array of models,PageableCollection#links will be populated with a URL per\n page, using the default URL for this collection.\n\n If switching from server to client mode, all of the pages are immediately\n refetched. If you have too many pages, you can pass `false` to\n `options.fetch` to skip fetching.\n\n If switching to any mode from infinite mode, thePageableCollection#links\n will be deleted.\n\n @fires PageableCollection#pageable:state:change\n\n @param {\"server\"|\"client\"|\"infinite\"} mode - The mode to switch to.\n\n @param {Object} options\n\n @param {boolean} options.fetch = true - If `false`, no fetching is done.\n\n @param {boolean} options.resetState = true - If 'false', the state is not\n reset, but checked for sanity instead.\n\n @chainable\n @return {XMLHttpRequest|PageableCollection} The XMLHttpRequest\n from fetch or this if `options.fetch` is `false`.\n */\n switchMode: function (mode, options) {\n\n if (!_contains([\"server\", \"client\", \"infinite\"], mode)) {\n throw new TypeError('`mode` must be one of \"server\", \"client\" or \"infinite\"');\n }\n\n options = options || {fetch: true, resetState: true};\n\n var state = this.state = options.resetState ?\n _clone(this._initState) :\n this._checkState(_extend({}, this.state));\n\n this.mode = mode;\n\n var self = this;\n var fullCollection = this.fullCollection;\n var handlers = this._handlers = this._handlers || {}, handler;\n if (mode != \"server\" && !fullCollection) {\n fullCollection = this._makeFullCollection(options.models || [], options);\n fullCollection.pageableCollection = this;\n this.fullCollection = fullCollection;\n var allHandler = this._makeCollectionEventHandler(this, fullCollection);\n _each([\"add\", \"remove\", \"reset\", \"sort\"], function (event) {\n handlers[event] = handler = _.bind(allHandler, {}, event);\n self.on(event, handler);\n fullCollection.on(event, handler);\n });\n fullCollection.comparator = this._fullComparator;\n }\n else if (mode == \"server\" && fullCollection) {\n _each(_keys(handlers), function (event) {\n handler = handlers[event];\n self.off(event, handler);\n fullCollection.off(event, handler);\n });\n delete this._handlers;\n this._fullComparator = fullCollection.comparator;\n delete this.fullCollection;\n }\n\n if (mode == \"infinite\") {\n var links = this.links = {};\n var firstPage = state.firstPage;\n var totalPages = ceil(state.totalRecords / state.pageSize);\n var lastPage = firstPage === 0 ? max(0, totalPages - 1) : totalPages || firstPage;\n for (var i = state.firstPage; i <= lastPage; i++) {\n links[i] = this.url;\n }\n }\n else if (this.links) delete this.links;\n\n if (!options.silent) this.trigger(\"pageable:state:change\", state);\n\n return options.fetch ?\n this.fetch(_omit(options, \"fetch\", \"resetState\")) :\n this;\n },\n\n /**\n @return {boolean} `true` if this collection can page backward, `false`\n otherwise.\n */\n hasPreviousPage: function () {\n var state = this.state;\n var currentPage = state.currentPage;\n if (this.mode != \"infinite\") return currentPage > state.firstPage;\n return !!this.links[currentPage - 1];\n },\n\n /**\n @return {boolean} `true` if this collection can page forward, `false`\n otherwise.\n */\n hasNextPage: function () {\n var state = this.state;\n var currentPage = this.state.currentPage;\n if (this.mode != \"infinite\") return currentPage < state.lastPage;\n return !!this.links[currentPage + 1];\n },\n\n /**\n Fetch the first page in server mode, or reset the current page of this\n collection to the first page in client or infinite mode.\n\n @param {Object} options {@linkPageableCollection#getPage} options.\n\n @chainable\n @return {XMLHttpRequest|PageableCollection} The XMLHttpRequest\n from fetch or this.\n */\n getFirstPage: function (options) {\n return this.getPage(\"first\", options);\n },\n\n /**\n Fetch the previous page in server mode, or reset the current page of this\n collection to the previous page in client or infinite mode.\n\n @param {Object} options {@linkPageableCollection#getPage} options.\n\n @chainable\n @return {XMLHttpRequest|PageableCollection} The XMLHttpRequest\n from fetch or this.\n */\n getPreviousPage: function (options) {\n return this.getPage(\"prev\", options);\n },\n\n /**\n Fetch the next page in server mode, or reset the current page of this\n collection to the next page in client mode.\n\n @param {Object} options {@linkPageableCollection#getPage} options.\n\n @chainable\n @return {XMLHttpRequest|PageableCollection} The XMLHttpRequest\n from fetch or this.\n */\n getNextPage: function (options) {\n return this.getPage(\"next\", options);\n },\n\n /**\n Fetch the last page in server mode, or reset the current page of this\n collection to the last page in client mode.\n\n @param {Object} options {@linkPageableCollection#getPage} options.\n\n @chainable\n @return {XMLHttpRequest|PageableCollection} The XMLHttpRequest\n from fetch or this.\n */\n getLastPage: function (options) {\n return this.getPage(\"last\", options);\n },\n\n /**\n Given a page index, set PageableCollection#state.currentPage to that\n index. If this collection is in server mode, fetch the page using the\n updated state, otherwise, reset the current page of this collection to\n the page specified by `index` in client mode. If `options.fetch` is true,\n a fetch can be forced in client mode before resetting the current\n page. Under infinite mode, if the index is less than the current page, a\n reset is done as in client mode. If the index is greater than the current\n page number, a fetch is made with the results **appended**\n toPageableCollection#fullCollection. The current page will then be reset\n after fetching.\n\n @fires PageableCollection#pageable:state:change\n\n @param {number|string} index - The page index to go to, or the page name to\n look up fromPageableCollection#links in infinite mode.\n @param {Object} options - {@linkPageableCollection#fetch} options or\n [reset](http://backbonejs.org/#Collection-reset) options for client mode\n when `options.fetch` is `false`.\n @param {boolean} options.fetch = false - If true, force a\n {@linkPageableCollection#fetch} in client mode.\n\n @throws {TypeError} If `index` is not a finite integer under server or\n client mode, or does not yield a URL fromPageableCollection#links under\n infinite mode.\n\n @throws {RangeError} If `index` is out of bounds.\n\n @chainable\n @return {XMLHttpRequest|PageableCollection} The XMLHttpRequest\n from fetch or this.\n */\n getPage: function (index, options) {\n\n var mode = this.mode, fullCollection = this.fullCollection;\n\n options = options || {fetch: false};\n\n var state = this.state,\n firstPage = state.firstPage,\n currentPage = state.currentPage,\n lastPage = state.lastPage,\n pageSize = state.pageSize;\n\n var pageNum = index;\n switch (index) {\n case \"first\": pageNum = firstPage; break;\n case \"prev\": pageNum = currentPage - 1; break;\n case \"next\": pageNum = currentPage + 1; break;\n case \"last\": pageNum = lastPage; break;\n default: pageNum = finiteInt(index, \"index\");\n }\n\n this.state = this._checkState(_extend({}, state, {currentPage: pageNum}));\n if (!options.silent) this.trigger(\"pageable:state:change\", this.state);\n\n options.from = currentPage, options.to = pageNum;\n\n var pageStart = (firstPage === 0 ? pageNum : pageNum - 1) * pageSize;\n var pageModels = fullCollection && fullCollection.length ?\n fullCollection.models.slice(pageStart, pageStart + pageSize) :\n [];\n if ((mode == \"client\" || (mode == \"infinite\" && !_isEmpty(pageModels))) &&\n !options.fetch) {\n this.reset(pageModels, _omit(options, \"fetch\"));\n return this;\n }\n\n if (mode == \"infinite\") options.url = this.links[pageNum];\n\n return this.fetch(_omit(options, \"fetch\"));\n },\n\n /**\n Fetch the page for the provided item offset in server mode, or reset the\n current page of this collection to the page for the provided item offset\n in client mode.\n\n @param {Object} options {@linkPageableCollection#getPage} options.\n\n @chainable\n @return {XMLHttpRequest|PageableCollection} The XMLHttpRequest\n from fetch or this.\n */\n getPageByOffset: function (offset, options) {\n if (offset < 0) {\n throw new RangeError(\"`offset must be > 0`\");\n }\n offset = finiteInt(offset, \"offset\");\n\n var page = floor(offset / this.state.pageSize);\n if (this.state.firstPage !== 0) page++;\n if (page > this.state.lastPage) page = this.state.lastPage;\n return this.getPage(page, options);\n },\n\n /**\n Overidden to make `getPage` compatible with Zepto.\n\n @param {string} method\n @param {Backbone.Model|Backbone.Collection} model\n @param {Object} options\n\n @return {XMLHttpRequest}\n */\n sync: function (method, model, options) {\n var self = this;\n if (self.mode == \"infinite\") {\n var success = options.success;\n var currentPage = self.state.currentPage;\n options.success = function (resp, status, xhr) {\n var links = self.links;\n var newLinks = self.parseLinks(resp, _extend({xhr: xhr}, options));\n if (newLinks.first) links[self.state.firstPage] = newLinks.first;\n if (newLinks.prev) links[currentPage - 1] = newLinks.prev;\n if (newLinks.next) links[currentPage + 1] = newLinks.next;\n if (success) success(resp, status, xhr);\n };\n }\n\n return (BBColProto.sync || Backbone.sync).call(self, method, model, options);\n },\n\n /**\n Parse pagination links from the server response. Only valid under\n infinite mode.\n\n Given a response body and a XMLHttpRequest object, extract pagination\n links from them for infinite paging.\n\n This default implementation parses the RFC 5988 `Link` header and extract\n 3 links from it - `first`, `prev`, `next`. Any subclasses overriding this\n method __must__ return an object hash having only the keys\n above. However, simply returning a `next` link or an empty hash if there\n are no more links should be enough for most implementations.\n\n @param {*} resp The deserialized response body.\n @param {Object} options\n @param {XMLHttpRequest} options.xhr - The XMLHttpRequest object for this\n response.\n @return {Object}\n */\n parseLinks: function (resp, options) {\n var links = {};\n var linkHeader = options.xhr.getResponseHeader(\"Link\");\n if (linkHeader) {\n var relations = [\"first\", \"prev\", \"next\"];\n _each(linkHeader.split(\",\"), function (linkValue) {\n var linkParts = linkValue.split(\";\");\n var url = linkParts[0].replace(URL_TRIM_RE, '');\n var params = linkParts.slice(1);\n _each(params, function (param) {\n var paramParts = param.split(\"=\");\n var key = paramParts[0].replace(PARAM_TRIM_RE, '');\n var value = paramParts[1].replace(PARAM_TRIM_RE, '');\n if (key == \"rel\" && _contains(relations, value)) links[value] = url;\n });\n });\n }\n\n return links;\n },\n\n /**\n Parse server response data.\n\n This default implementation assumes the response data is in one of two\n structures:\n\n [\n {}, // Your new pagination state\n [{}, ...] // An array of JSON objects\n ]\n\n Or,\n\n [{}] // An array of JSON objects\n\n The first structure is the preferred form because the pagination states\n may have been updated on the server side, sending them down again allows\n this collection to update its states. If the response has a pagination\n state object, it is checked for errors.\n\n The second structure is the\n [Backbone.Collection#parse](http://backbonejs.org/#Collection-parse)\n default.\n\n **Note:** this method has been further simplified since 1.1.7. While\n existingPageableCollection#parse implementations will continue to work,\n new code is encouraged to overridePageableCollection#parseState\n andPageableCollection#parseRecords instead.\n\n @fires PageableCollection#pageable:state:change\n\n @param {Object} resp The deserialized response data from the server.\n @param {Object} the options for the ajax request\n\n @return {Array.<Object>} An array of model objects\n */\n parse: function (resp, options) {\n var newState = this.parseState(resp, _clone(this.queryParams), _clone(this.state), options);\n if (newState) {\n this.state = this._checkState(_extend({}, this.state, newState));\n if (!(options || {}).silent) this.trigger(\"pageable:state:change\", this.state);\n }\n return this.parseRecords(resp, options);\n },\n\n /**\n Parse server response for server pagination state updates. Not applicable\n under infinite mode.\n\n This default implementation first checks whether the response has any\n state object as documented inPageableCollection#parse. If it exists, a\n state object is returned by mapping the server state keys to this\n pageable collection instance's query parameter keys using `queryParams`.\n\n It is __NOT__ neccessary to return a full state object complete with all\n the mappings defined inPageableCollection#queryParams. Any state object\n resulted is merged with a copy of the current pageable collection state\n and checked for sanity before actually updating. Most of the time, simply\n providing a new `totalRecords` value is enough to trigger a full\n pagination state recalculation.\n\n parseState: function (resp, queryParams, state, options) {\n return {totalRecords: resp.total_entries};\n }\n\n If you want to use header fields use:\n\n parseState: function (resp, queryParams, state, options) {\n return {totalRecords: options.xhr.getResponseHeader(\"X-total\")};\n }\n\n This method __MUST__ return a new state object instead of directly\n modifying the PageableCollection#state object. The behavior of directly\n modifying PageableCollection#state is undefined.\n\n @param {Object} resp - The deserialized response data from the server.\n @param {Object} queryParams - A copy of PageableCollection#queryParams.\n @param {Object} state - A copy of PageableCollection#state.\n @param {Object} options - The options passed through from\n `parse`. (backbone >= 0.9.10 only)\n\n @return {Object} A new (partial) state object.\n */\n parseState: function (resp, queryParams, state, options) {\n if (resp && resp.length === 2 && _isObject(resp[0]) && _isArray(resp[1])) {\n\n var newState = _clone(state);\n var serverState = resp[0];\n\n _each(_pairs(_omit(queryParams, \"directions\")), function (kvp) {\n var k = kvp[0], v = kvp[1];\n var serverVal = serverState[v];\n if (!_isUndefined(serverVal) && !_.isNull(serverVal)) newState[k] = serverState[v];\n });\n\n if (serverState.order) {\n newState.order = _invert(queryParams.directions)[serverState.order] * 1;\n }\n\n return newState;\n }\n },\n\n /**\n Parse server response for an array of model objects.\n\n This default implementation first checks whether the response has any\n state object as documented inPageableCollection#parse. If it exists, the\n array of model objects is assumed to be the second element, otherwise the\n entire response is returned directly.\n\n @param {Object} resp - The deserialized response data from the server.\n @param {Object} options - The options passed through from the\n `parse`. (backbone >= 0.9.10 only)\n\n @return {Array.<Object>} An array of model objects\n */\n parseRecords: function (resp, options) {\n if (resp && resp.length === 2 && _isObject(resp[0]) && _isArray(resp[1])) {\n return resp[1];\n }\n\n return resp;\n },\n\n /**\n Fetch a page from the server in server mode, or all the pages in client\n mode. Under infinite mode, the current page is refetched by default and\n then reset.\n\n The query string is constructed by translating the current pagination\n state to your server API query parameter\n usingPageableCollection#queryParams. The current page will reset after\n fetch.\n\n @param {Object} options - Accepts all\n [Backbone.Collection#fetch](http://backbonejs.org/#Collection-fetch)\n options.\n\n @return {XMLHttpRequest}\n */\n fetch: function (options) {\n\n options = options || {};\n\n var state = this._checkState(this.state);\n\n var mode = this.mode;\n\n if (mode == \"infinite\" && !options.url) {\n options.url = this.links[state.currentPage];\n }\n\n var data = options.data || {};\n\n // dedup query params\n var url = options.url || this.url || \"\";\n if (_isFunction(url)) url = url.call(this);\n var qsi = url.indexOf('?');\n if (qsi != -1) {\n _extend(data, queryStringToParams(url.slice(qsi + 1)));\n url = url.slice(0, qsi);\n }\n\n options.url = url;\n options.data = data;\n\n // pick the appropriate query param keys to map according to the mode\n var queryParams = this.mode == \"client\" ?\n _pick(this.queryParams, \"sortKey\") :\n _omit(_pick(this.queryParams, _keys(PageableProto.queryParams)),\n \"order\", \"directions\", \"totalPages\", \"totalRecords\");\n\n // map the query params to the data object used by the underlying ajax lib\n // to construct the query string\n _each(queryParams, function (v, k) {\n v = _isFunction(v) ? v.call(this) : v;\n if (state[k] != null && v != null && _.isUndefined(data[v])) {\n data[v] = state[k];\n }\n }, this);\n\n var sortKey = _isFunction(this.queryParams.sortKey) ?\n this.queryParams.sortKey.call(this) :\n this.queryParams.sortKey;\n\n var order = _isFunction(this.queryParams.order) ?\n this.queryParams.order.call(this) :\n this.queryParams.order;\n\n if (sortKey != null && state.sortKey != null &&\n order != null && state.order != null) {\n if (_isArray(state.order)) {\n data[order] = [];\n for (var i = 0; i < state.order.length; i++) {\n data[order].push(this.queryParams.directions[state.order[i]]);\n }\n }\n else {\n data[order] = this.queryParams.directions[state.order + \"\"];\n }\n }\n\n // map extra query parameters\n var extraKvps = _pairs(_omit(this.queryParams,\n _keys(PageableProto.queryParams)));\n for (var i = 0; i < extraKvps.length; i++) {\n var kvp = extraKvps[i];\n var v = kvp[1];\n v = _isFunction(v) ? v.call(this) : v;\n if (v != null) data[kvp[0]] = v;\n }\n\n if (mode != \"server\") {\n var self = this, fullCol = this.fullCollection;\n var success = options.success;\n options.success = function (col, resp, opts) {\n\n // make sure the caller's intent is obeyed\n opts = opts || {};\n if (_isUndefined(options.silent)) delete opts.silent;\n else opts.silent = options.silent;\n\n var models = col.models;\n if (mode == \"client\") fullCol.reset(models, opts);\n else {\n fullCol.add(models, _extend({at: fullCol.length},\n _extend(opts, {parse: false})));\n self.trigger(\"reset\", self, opts);\n }\n\n if (success) success(col, resp, opts);\n };\n\n // silent the first reset from backbone\n return BBColProto.fetch.call(this, _extend({}, options, {silent: true}));\n }\n\n return BBColProto.fetch.call(this, options);\n },\n\n /**\n Convenient method for making a `comparator` sorted by a model attribute\n identified by `sortKey` and ordered by `order`.\n\n Like a Backbone.Collection, a PageableCollection will maintain the\n __current page__ in sorted order on the client side if a `comparator` is\n attached to it. If the collection is in client mode, you can attach a\n comparator toPageableCollection#fullCollection to have all the pages\n reflect the global sorting order by specifying an option `full` to\n `true`. You __must__ call `sort` manually\n orPageableCollection#fullCollection.sort after calling this method to\n force a resort.\n\n While you can use this method to sort the current page in server mode,\n the sorting order may not reflect the global sorting order due to the\n additions or removals of the records on the server since the last\n fetch. If you want the most updated page in a global sorting order, it is\n recommended that you set PageableCollection#state.sortKey and optionally\n PageableCollection#state.order, and then callPageableCollection#fetch.\n\n @protected\n\n @param {string} sortKey = this.state.sortKey - See `state.sortKey`.\n @param {number} order = this.state.order - See `state.order`.\n @param {(function(Backbone.Model, string): Object) | string} sortValue -\n See PageableCollection#setSorting.\n\n See [Backbone.Collection.comparator](http://backbonejs.org/#Collection-comparator).\n */\n _makeComparator: function (sortKey, order, sortValue) {\n var state = this.state;\n\n sortKey = sortKey || state.sortKey;\n order = order || state.order;\n\n if (!sortKey || !order) return;\n\n if (!sortValue) sortValue = function (model, attr) {\n return model.get(attr);\n };\n\n return function (left, right) {\n var l = sortValue(left, sortKey), r = sortValue(right, sortKey), t;\n if (order === 1) t = l, l = r, r = t;\n if (l === r) return 0;\n else if (l < r) return -1;\n return 1;\n };\n },\n\n /**\n Adjusts the sorting for this pageable collection.\n\n Given a `sortKey` and an `order`, sets `state.sortKey` and\n `state.order`. A comparator can be applied on the client side to sort in\n the order defined if `options.side` is `\"client\"`. By default the\n comparator is applied to thePageableCollection#fullCollection. Set\n `options.full` to `false` to apply a comparator to the current page under\n any mode. Setting `sortKey` to `null` removes the comparator from both\n the current page and the full collection.\n\n If a `sortValue` function is given, it will be passed the `(model,\n sortKey)` arguments and is used to extract a value from the model during\n comparison sorts. If `sortValue` is not given, `model.get(sortKey)` is\n used for sorting.\n\n @chainable\n\n @param {string} sortKey - See `state.sortKey`.\n @param {number} order=this.state.order - See `state.order`.\n @param {Object} options\n @param {string} options.side - By default, `\"client\"` if `mode` is\n `\"client\"`, `\"server\"` otherwise.\n @param {boolean} options.full = true\n @param {(function(Backbone.Model, string): Object) | string} options.sortValue\n */\n setSorting: function (sortKey, order, options) {\n\n var state = this.state;\n\n state.sortKey = sortKey;\n state.order = order = order || state.order;\n\n var fullCollection = this.fullCollection;\n\n var delComp = false, delFullComp = false;\n\n if (!sortKey) delComp = delFullComp = true;\n\n var mode = this.mode;\n options = _extend({side: mode == \"client\" ? mode : \"server\", full: true},\n options);\n\n var comparator = this._makeComparator(sortKey, order, options.sortValue);\n\n var full = options.full, side = options.side;\n\n if (side == \"client\") {\n if (full) {\n if (fullCollection) fullCollection.comparator = comparator;\n delComp = true;\n }\n else {\n this.comparator = comparator;\n delFullComp = true;\n }\n }\n else if (side == \"server\" && !full) {\n this.comparator = comparator;\n }\n\n if (delComp) this.comparator = null;\n if (delFullComp && fullCollection) fullCollection.comparator = null;\n\n return this;\n }\n\n });\n\n var PageableProto = PageableCollection.prototype;\n\n return PageableCollection;\n\n}));\n","/*!\n backgrid 0.3.8\n http://github.com/cloudflare/backgrid\n\n Copyright (c) 2017 Cloudflare, Inc. and contributors <jwong@cloudflare.com>\n Licensed under the MIT license.\n*/\n\n(function (root, factory) {\n\n if (typeof define === \"function\" && define.amd) {\n // AMD (+ global for extensions)\n define([\"underscore\", \"backbone\"], function (_, Backbone) {\n return (root.Backgrid = factory(_, Backbone));\n });\n } else if (typeof exports === \"object\") {\n // CommonJS\n module.exports = factory(require(\"underscore\"), require(\"backbone\"));\n } else {\n // Browser\n root.Backgrid = factory(root._, root.Backbone);\n }}(this, function (_, Backbone) {\n\n \"use strict\";\n\n/*\n backgrid\n http://github.com/cloudflare/backgrid\n\n Copyright (c) 2013-present Cloudflare, Inc. and contributors\n Licensed under the MIT license.\n*/\n\n// Copyright 2009, 2010 Kristopher Michael Kowal\n// https://github.com/kriskowal/es5-shim\n// ES5 15.5.4.20\n// http://es5.github.com/#x15.5.4.20\nvar ws = \"\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\" +\n \"\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\" +\n \"\\u2029\\uFEFF\";\nif (!String.prototype.trim || ws.trim()) {\n // http://blog.stevenlevithan.com/archives/faster-trim-javascript\n // http://perfectionkills.com/whitespace-deviations/\n ws = \"[\" + ws + \"]\";\n var trimBeginRegexp = new RegExp(\"^\" + ws + ws + \"*\"),\n trimEndRegexp = new RegExp(ws + ws + \"*$\");\n String.prototype.trim = function trim() {\n if (this === undefined || this === null) {\n throw new TypeError(\"can't convert \" + this + \" to object\");\n }\n return String(this)\n .replace(trimBeginRegexp, \"\")\n .replace(trimEndRegexp, \"\");\n };\n}\n\nfunction lpad(str, length, padstr) {\n var paddingLen = length - (str + '').length;\n paddingLen = paddingLen < 0 ? 0 : paddingLen;\n var padding = '';\n for (var i = 0; i < paddingLen; i++) {\n padding = padding + padstr;\n }\n return padding + str;\n}\n\nvar $ = Backbone.$;\n\nvar Backgrid = {\n\n Extension: {},\n\n resolveNameToClass: function (name, suffix) {\n if (_.isString(name)) {\n var key = _.map(name.split('-'), function (e) {\n return e.slice(0, 1).toUpperCase() + e.slice(1);\n }).join('') + suffix;\n var klass = Backgrid[key] || Backgrid.Extension[key];\n if (_.isUndefined(klass)) {\n throw new ReferenceError(\"Class '\" + key + \"' not found\");\n }\n return klass;\n }\n\n return name;\n },\n\n callByNeed: function () {\n var value = arguments[0];\n if (!_.isFunction(value)) return value;\n\n var context = arguments[1];\n var args = [].slice.call(arguments, 2);\n return value.apply(context, !!(args + '') ? args : []);\n }\n\n};\n_.extend(Backgrid, Backbone.Events);\n\n/**\n Command translates a DOM Event into commands that Backgrid\n recognizes. Interested parties can listen on selected Backgrid events that\n come with an instance of this class and act on the commands.\n\n It is also possible to globally rebind the keyboard shortcuts by replacing\n the methods in this class' prototype.\n\n @class Backgrid.Command\n @constructor\n */\nvar Command = Backgrid.Command = function (evt) {\n _.extend(this, {\n altKey: !!evt.altKey,\n \"char\": evt[\"char\"],\n charCode: evt.charCode,\n ctrlKey: !!evt.ctrlKey,\n key: evt.key,\n keyCode: evt.keyCode,\n locale: evt.locale,\n location: evt.location,\n metaKey: !!evt.metaKey,\n repeat: !!evt.repeat,\n shiftKey: !!evt.shiftKey,\n which: evt.which\n });\n};\n_.extend(Command.prototype, {\n /**\n Up Arrow\n\n @member Backgrid.Command\n */\n moveUp: function () { return this.keyCode == 38; },\n /**\n Down Arrow\n\n @member Backgrid.Command\n */\n moveDown: function () { return this.keyCode === 40; },\n /**\n Shift Tab\n\n @member Backgrid.Command\n */\n moveLeft: function () { return this.shiftKey && this.keyCode === 9; },\n /**\n Tab\n\n @member Backgrid.Command\n */\n moveRight: function () { return !this.shiftKey && this.keyCode === 9; },\n /**\n Enter\n\n @member Backgrid.Command\n */\n save: function () { return this.keyCode === 13; },\n /**\n Esc\n\n @member Backgrid.Command\n */\n cancel: function () { return this.keyCode === 27; },\n /**\n None of the above.\n\n @member Backgrid.Command\n */\n passThru: function () {\n return !(this.moveUp() || this.moveDown() || this.moveLeft() ||\n this.moveRight() || this.save() || this.cancel());\n }\n});\n\n/*\n backgrid\n http://github.com/cloudflare/backgrid\n\n Copyright (c) 2013-present Cloudflare, Inc. and contributors\n Licensed under the MIT license.\n*/\n\n/**\n Just a convenient class for interested parties to subclass.\n\n The default Cell classes don't require the formatter to be a subclass of\n Formatter as long as the fromRaw(rawData) and toRaw(formattedData) methods\n are defined.\n\n @abstract\n @class Backgrid.CellFormatter\n @constructor\n*/\nvar CellFormatter = Backgrid.CellFormatter = function () {};\n_.extend(CellFormatter.prototype, {\n\n /**\n Takes a raw value from a model and returns an optionally formatted string\n for display. The default implementation simply returns the supplied value\n as is without any type conversion.\n\n @member Backgrid.CellFormatter\n @param {*} rawData\n @param {Backbone.Model} model Used for more complicated formatting\n @return {*}\n */\n fromRaw: function (rawData, model) {\n return rawData;\n },\n\n /**\n Takes a formatted string, usually from user input, and returns a\n appropriately typed value for persistence in the model.\n\n If the user input is invalid or unable to be converted to a raw value\n suitable for persistence in the model, toRaw must return `undefined`.\n\n @member Backgrid.CellFormatter\n @param {string} formattedData\n @param {Backbone.Model} model Used for more complicated formatting\n @return {*|undefined}\n */\n toRaw: function (formattedData, model) {\n return formattedData;\n }\n\n});\n\n/**\n A floating point number formatter. Doesn't understand scientific notation at\n the moment.\n\n @class Backgrid.NumberFormatter\n @extends Backgrid.CellFormatter\n @constructor\n @throws {RangeError} If decimals < 0 or > 20.\n*/\nvar NumberFormatter = Backgrid.NumberFormatter = function (options) {\n _.extend(this, this.defaults, options || {});\n\n if (this.decimals < 0 || this.decimals > 20) {\n throw new RangeError(\"decimals must be between 0 and 20\");\n }\n};\nNumberFormatter.prototype = new CellFormatter();\n_.extend(NumberFormatter.prototype, {\n\n /**\n @member Backgrid.NumberFormatter\n @cfg {Object} options\n\n @cfg {number} [options.decimals=2] Number of decimals to display. Must be an integer.\n\n @cfg {string} [options.decimalSeparator='.'] The separator to use when\n displaying decimals.\n\n @cfg {string} [options.orderSeparator=','] The separator to use to\n separator thousands. May be an empty string.\n */\n defaults: {\n decimals: 2,\n decimalSeparator: '.',\n orderSeparator: ','\n },\n\n HUMANIZED_NUM_RE: /(\\d)(?=(?:\\d{3})+$)/g,\n\n /**\n Takes a floating point number and convert it to a formatted string where\n every thousand is separated by `orderSeparator`, with a `decimal` number of\n decimals separated by `decimalSeparator`. The number returned is rounded\n the usual way.\n\n @member Backgrid.NumberFormatter\n @param {number} number\n @param {Backbone.Model} model Used for more complicated formatting\n @return {string}\n */\n fromRaw: function (number, model) {\n if (_.isNull(number) || _.isUndefined(number)) return '';\n\n number = parseFloat(number).toFixed(~~this.decimals);\n\n var parts = number.split('.');\n var integerPart = parts[0];\n var decimalPart = parts[1] ? (this.decimalSeparator || '.') + parts[1] : '';\n\n return integerPart.replace(this.HUMANIZED_NUM_RE, '$1' + this.orderSeparator) + decimalPart;\n },\n\n /**\n Takes a string, possibly formatted with `orderSeparator` and/or\n `decimalSeparator`, and convert it back to a number.\n\n @member Backgrid.NumberFormatter\n @param {string} formattedData\n @param {Backbone.Model} model Used for more complicated formatting\n @return {number|undefined} Undefined if the string cannot be converted to\n a number.\n */\n toRaw: function (formattedData, model) {\n formattedData = formattedData.trim();\n\n if (formattedData === '') return null;\n\n var rawData = '';\n\n var thousands = formattedData.split(this.orderSeparator);\n for (var i = 0; i < thousands.length; i++) {\n rawData += thousands[i];\n }\n\n var decimalParts = rawData.split(this.decimalSeparator);\n rawData = '';\n for (var i = 0; i < decimalParts.length; i++) {\n rawData = rawData + decimalParts[i] + '.';\n }\n\n if (rawData[rawData.length - 1] === '.') {\n rawData = rawData.slice(0, rawData.length - 1);\n }\n\n var result = (rawData * 1).toFixed(~~this.decimals) * 1;\n if (_.isNumber(result) && !_.isNaN(result)) return result;\n }\n\n});\n\n/**\n A number formatter that converts a floating point number, optionally\n multiplied by a multiplier, to a percentage string and vice versa.\n\n @class Backgrid.PercentFormatter\n @extends Backgrid.NumberFormatter\n @constructor\n @throws {RangeError} If decimals < 0 or > 20.\n */\nvar PercentFormatter = Backgrid.PercentFormatter = function () {\n Backgrid.NumberFormatter.apply(this, arguments);\n};\n\nPercentFormatter.prototype = new Backgrid.NumberFormatter(),\n\n_.extend(PercentFormatter.prototype, {\n\n /**\n @member Backgrid.PercentFormatter\n @cfg {Object} options\n\n @cfg {number} [options.multiplier=1] The number used to multiply the model\n value for display.\n\n @cfg {string} [options.symbol='%'] The symbol to append to the percentage\n string.\n */\n defaults: _.extend({}, NumberFormatter.prototype.defaults, {\n multiplier: 1,\n symbol: \"%\"\n }),\n\n /**\n Takes a floating point number, where the number is first multiplied by\n `multiplier`, then converted to a formatted string like\n NumberFormatter#fromRaw, then finally append `symbol` to the end.\n\n @member Backgrid.PercentFormatter\n @param {number} rawValue\n @param {Backbone.Model} model Used for more complicated formatting\n @return {string}\n */\n fromRaw: function (number, model) {\n var args = [].slice.call(arguments, 1);\n args.unshift(number * this.multiplier);\n return (NumberFormatter.prototype.fromRaw.apply(this, args) || \"0\") + this.symbol;\n },\n\n /**\n Takes a string, possibly appended with `symbol` and/or `decimalSeparator`,\n and convert it back to a number for the model like NumberFormatter#toRaw,\n and then dividing it by `multiplier`.\n\n @member Backgrid.PercentFormatter\n @param {string} formattedData\n @param {Backbone.Model} model Used for more complicated formatting\n @return {number|undefined} Undefined if the string cannot be converted to\n a number.\n */\n toRaw: function (formattedValue, model) {\n var tokens = formattedValue.split(this.symbol);\n if (tokens && tokens[0] && tokens[1] === \"\" || tokens[1] == null) {\n var rawValue = NumberFormatter.prototype.toRaw.call(this, tokens[0]);\n if (_.isUndefined(rawValue)) return rawValue;\n return rawValue / this.multiplier;\n }\n }\n\n});\n\n/**\n Formatter to converts between various datetime formats.\n\n This class only understands ISO-8601 formatted datetime strings and UNIX\n offset (number of milliseconds since UNIX Epoch). See\n Backgrid.Extension.MomentFormatter if you need a much more flexible datetime\n formatter.\n\n @class Backgrid.DatetimeFormatter\n @extends Backgrid.CellFormatter\n @constructor\n @throws {Error} If both `includeDate` and `includeTime` are false.\n*/\nvar DatetimeFormatter = Backgrid.DatetimeFormatter = function (options) {\n _.extend(this, this.defaults, options || {});\n\n if (!this.includeDate && !this.includeTime) {\n throw new Error(\"Either includeDate or includeTime must be true\");\n }\n};\nDatetimeFormatter.prototype = new CellFormatter();\n_.extend(DatetimeFormatter.prototype, {\n\n /**\n @member Backgrid.DatetimeFormatter\n\n @cfg {Object} options\n\n @cfg {boolean} [options.includeDate=true] Whether the values include the\n date part.\n\n @cfg {boolean} [options.includeTime=true] Whether the values include the\n time part.\n\n @cfg {boolean} [options.includeMilli=false] If `includeTime` is true,\n whether to include the millisecond part, if it exists.\n */\n defaults: {\n includeDate: true,\n includeTime: true,\n includeMilli: false\n },\n\n DATE_RE: /^([+\\-]?\\d{4})-(\\d{2})-(\\d{2})$/,\n TIME_RE: /^(\\d{2}):(\\d{2}):(\\d{2})(\\.(\\d{3}))?$/,\n ISO_SPLITTER_RE: /T|Z| +/,\n\n _convert: function (data, validate) {\n if ((data + '').trim() === '') return null;\n\n var date, time = null;\n if (_.isNumber(data)) {\n var jsDate = new Date(data);\n date = lpad(jsDate.getUTCFullYear(), 4, 0) + '-' + lpad(jsDate.getUTCMonth() + 1, 2, 0) + '-' + lpad(jsDate.getUTCDate(), 2, 0);\n time = lpad(jsDate.getUTCHours(), 2, 0) + ':' + lpad(jsDate.getUTCMinutes(), 2, 0) + ':' + lpad(jsDate.getUTCSeconds(), 2, 0);\n }\n else {\n data = data.trim();\n var parts = data.split(this.ISO_SPLITTER_RE) || [];\n date = this.DATE_RE.test(parts[0]) ? parts[0] : '';\n time = date && parts[1] ? parts[1] : this.TIME_RE.test(parts[0]) ? parts[0] : '';\n }\n\n var YYYYMMDD = this.DATE_RE.exec(date) || [];\n var HHmmssSSS = this.TIME_RE.exec(time) || [];\n\n if (validate) {\n if (this.includeDate && _.isUndefined(YYYYMMDD[0])) return;\n if (this.includeTime && _.isUndefined(HHmmssSSS[0])) return;\n if (!this.includeDate && date) return;\n if (!this.includeTime && time) return;\n }\n\n var jsDate = new Date(Date.UTC(YYYYMMDD[1] * 1 || 0,\n YYYYMMDD[2] * 1 - 1 || 0,\n YYYYMMDD[3] * 1 || 0,\n HHmmssSSS[1] * 1 || null,\n HHmmssSSS[2] * 1 || null,\n HHmmssSSS[3] * 1 || null,\n HHmmssSSS[5] * 1 || null));\n\n var result = '';\n\n if (this.includeDate) {\n result = lpad(jsDate.getUTCFullYear(), 4, 0) + '-' + lpad(jsDate.getUTCMonth() + 1, 2, 0) + '-' + lpad(jsDate.getUTCDate(), 2, 0);\n }\n\n if (this.includeTime) {\n result = result + (this.includeDate ? 'T' : '') + lpad(jsDate.getUTCHours(), 2, 0) + ':' + lpad(jsDate.getUTCMinutes(), 2, 0) + ':' + lpad(jsDate.getUTCSeconds(), 2, 0);\n\n if (this.includeMilli) {\n result = result + '.' + lpad(jsDate.getUTCMilliseconds(), 3, 0);\n }\n }\n\n if (this.includeDate && this.includeTime) {\n result += \"Z\";\n }\n\n return result;\n },\n\n /**\n Converts an ISO-8601 formatted datetime string to a datetime string, date\n string or a time string. The timezone is ignored if supplied.\n\n @member Backgrid.DatetimeFormatter\n @param {string} rawData\n @param {Backbone.Model} model Used for more complicated formatting\n @return {string|null|undefined} ISO-8601 string in UTC. Null and undefined\n values are returned as is.\n */\n fromRaw: function (rawData, model) {\n if (_.isNull(rawData) || _.isUndefined(rawData)) return '';\n return this._convert(rawData);\n },\n\n /**\n Converts an ISO-8601 formatted datetime string to a datetime string, date\n string or a time string. The timezone is ignored if supplied. This method\n parses the input values exactly the same way as\n Backgrid.Extension.MomentFormatter#fromRaw(), in addition to doing some\n sanity checks.\n\n @member Backgrid.DatetimeFormatter\n @param {string} formattedData\n @param {Backbone.Model} model Used for more complicated formatting\n @return {string|undefined} ISO-8601 string in UTC. Undefined if a date is\n found when `includeDate` is false, or a time is found when `includeTime` is\n false, or if `includeDate` is true and a date is not found, or if\n `includeTime` is true and a time is not found.\n */\n toRaw: function (formattedData, model) {\n return this._convert(formattedData, true);\n }\n\n});\n\n/**\n Formatter to convert any value to string.\n\n @class Backgrid.StringFormatter\n @extends Backgrid.CellFormatter\n @constructor\n */\nvar StringFormatter = Backgrid.StringFormatter = function () {};\nStringFormatter.prototype = new CellFormatter();\n_.extend(StringFormatter.prototype, {\n /**\n Converts any value to a string using Ecmascript's implicit type\n conversion. If the given value is `null` or `undefined`, an empty string is\n returned instead.\n\n @member Backgrid.StringFormatter\n @param {*} rawValue\n @param {Backbone.Model} model Used for more complicated formatting\n @return {string}\n */\n fromRaw: function (rawValue, model) {\n if (_.isUndefined(rawValue) || _.isNull(rawValue)) return '';\n return rawValue + '';\n }\n});\n\n/**\n Simple email validation formatter.\n\n @class Backgrid.EmailFormatter\n @extends Backgrid.CellFormatter\n @constructor\n */\nvar EmailFormatter = Backgrid.EmailFormatter = function () {};\nEmailFormatter.prototype = new CellFormatter();\n_.extend(EmailFormatter.prototype, {\n /**\n Return the input if it is a string that contains an '@' character and if\n the strings before and after '@' are non-empty. If the input does not\n validate, `undefined` is returned.\n\n @member Backgrid.EmailFormatter\n @param {*} formattedData\n @param {Backbone.Model} model Used for more complicated formatting\n @return {string|undefined}\n */\n toRaw: function (formattedData, model) {\n var parts = formattedData.trim().split(\"@\");\n if (parts.length === 2 && _.all(parts)) {\n return formattedData;\n }\n }\n});\n\n/**\n Formatter for SelectCell.\n\n If the type of a model value is not a string, it is expected that a subclass\n of this formatter is provided to the SelectCell, with #toRaw overridden to\n convert the string value returned from the DOM back to whatever value is\n expected in the model.\n\n @class Backgrid.SelectFormatter\n @extends Backgrid.CellFormatter\n @constructor\n*/\nvar SelectFormatter = Backgrid.SelectFormatter = function () {};\nSelectFormatter.prototype = new CellFormatter();\n_.extend(SelectFormatter.prototype, {\n\n /**\n Normalizes raw scalar or array values to an array.\n\n @member Backgrid.SelectFormatter\n @param {*} rawValue\n @param {Backbone.Model} model Used for more complicated formatting\n @return {Array.<*>}\n */\n fromRaw: function (rawValue, model) {\n return _.isArray(rawValue) ? rawValue : rawValue != null ? [rawValue] : [];\n }\n});\n\n/*\n backgrid\n http://github.com/cloudflare/backgrid\n\n Copyright (c) 2013-present Cloudflare, Inc. and contributors\n Licensed under the MIT license.\n*/\n\n/**\n Generic cell editor base class. Only defines an initializer for a number of\n required parameters.\n\n @abstract\n @class Backgrid.CellEditor\n @extends Backbone.View\n*/\nvar CellEditor = Backgrid.CellEditor = Backbone.View.extend({\n\n /**\n Initializer.\n\n @param {Object} options\n @param {Backgrid.CellFormatter} options.formatter\n @param {Backgrid.Column} options.column\n @param {Backbone.Model} options.model\n\n @throws {TypeError} If `formatter` is not a formatter instance, or when\n `model` or `column` are undefined.\n */\n initialize: function (options) {\n this.formatter = options.formatter;\n this.column = options.column;\n if (!(this.column instanceof Column)) {\n this.column = new Column(this.column);\n }\n\n this.listenTo(this.model, \"backgrid:editing\", this.postRender);\n },\n\n /**\n Post-rendering setup and initialization. Focuses the cell editor's `el` in\n this default implementation. **Should** be called by Cell classes after\n calling Backgrid.CellEditor#render.\n */\n postRender: function (model, column) {\n if (column == null || column.get(\"name\") == this.column.get(\"name\")) {\n this.$el.focus();\n }\n return this;\n }\n\n});\n\n/**\n InputCellEditor the cell editor type used by most core cell types. This cell\n editor renders a text input box as its editor. The input will render a\n placeholder if the value is empty on supported browsers.\n\n @class Backgrid.InputCellEditor\n @extends Backgrid.CellEditor\n*/\nvar InputCellEditor = Backgrid.InputCellEditor = CellEditor.extend({\n\n /** @property */\n tagName: \"input\",\n\n /** @property */\n attributes: {\n type: \"text\"\n },\n\n /** @property */\n events: {\n \"blur\": \"saveOrCancel\",\n \"keydown\": \"saveOrCancel\"\n },\n\n /**\n Initializer. Removes this `el` from the DOM when a `done` event is\n triggered.\n\n @param {Object} options\n @param {Backgrid.CellFormatter} options.formatter\n @param {Backgrid.Column} options.column\n @param {Backbone.Model} options.model\n @param {string} [options.placeholder]\n */\n initialize: function (options) {\n InputCellEditor.__super__.initialize.apply(this, arguments);\n\n if (options.placeholder) {\n this.$el.attr(\"placeholder\", options.placeholder);\n }\n },\n\n /**\n Renders a text input with the cell value formatted for display, if it\n exists.\n */\n render: function () {\n var model = this.model;\n this.$el.val(this.formatter.fromRaw(model.get(this.column.get(\"name\")), model));\n return this;\n },\n\n /**\n If the key pressed is `enter`, `tab`, `up`, or `down`, converts the value\n in the editor to a raw value for saving into the model using the formatter.\n\n If the key pressed is `esc` the changes are undone.\n\n If the editor goes out of focus (`blur`) but the value is invalid, the\n event is intercepted and cancelled so the cell remains in focus pending for\n further action. The changes are saved otherwise.\n\n Triggers a Backbone `backgrid:edited` event from the model when successful,\n and `backgrid:error` if the value cannot be converted. Classes listening to\n the `error` event, usually the Cell classes, should respond appropriately,\n usually by rendering some kind of error feedback.\n\n @param {Event} e\n */\n saveOrCancel: function (e) {\n\n var formatter = this.formatter;\n var model = this.model;\n var column = this.column;\n\n var command = new Command(e);\n var blurred = e.type === \"blur\";\n\n if (command.moveUp() || command.moveDown() || command.moveLeft() || command.moveRight() ||\n command.save() || blurred) {\n\n e.preventDefault();\n e.stopPropagation();\n\n var val = this.$el.val();\n var newValue = formatter.toRaw(val, model);\n if (_.isUndefined(newValue)) {\n model.trigger(\"backgrid:error\", model, column, val);\n }\n else {\n model.set(column.get(\"name\"), newValue);\n model.trigger(\"backgrid:edited\", model, column, command);\n }\n }\n // esc\n else if (command.cancel()) {\n // undo\n e.stopPropagation();\n model.trigger(\"backgrid:edited\", model, column, command);\n }\n },\n\n postRender: function (model, column) {\n if (column == null || column.get(\"name\") == this.column.get(\"name\")) {\n // move the cursor to the end on firefox if text is right aligned\n if (this.$el.css(\"text-align\") === \"right\") {\n var val = this.$el.val();\n this.$el.focus().val(null).val(val);\n }\n else this.$el.focus();\n }\n return this;\n }\n\n});\n\n/**\n The super-class for all Cell types. By default, this class renders a plain\n table cell with the model value converted to a string using the\n formatter. The table cell is clickable, upon which the cell will go into\n editor mode, which is rendered by a Backgrid.InputCellEditor instance by\n default. Upon encountering any formatting errors, this class will add an\n `error` CSS class to the table cell.\n\n @abstract\n @class Backgrid.Cell\n @extends Backbone.View\n*/\nvar Cell = Backgrid.Cell = Backbone.View.extend({\n\n /** @property */\n tagName: \"td\",\n\n /**\n @property {Backgrid.CellFormatter|Object|string} [formatter=CellFormatter]\n */\n formatter: CellFormatter,\n\n /**\n @property {Backgrid.CellEditor} [editor=Backgrid.InputCellEditor] The\n default editor for all cell instances of this class. This value must be a\n class, it will be automatically instantiated upon entering edit mode.\n\n See Backgrid.CellEditor\n */\n editor: InputCellEditor,\n\n /** @property */\n events: {\n \"click\": \"enterEditMode\"\n },\n\n /**\n Initializer.\n\n @param {Object} options\n @param {Backbone.Model} options.model\n @param {Backgrid.Column} options.column\n\n @throws {ReferenceError} If formatter is a string but a formatter class of\n said name cannot be found in the Backgrid module.\n */\n initialize: function (options) {\n this.column = options.column;\n if (!(this.column instanceof Column)) {\n this.column = new Column(this.column);\n }\n\n var column = this.column, model = this.model, $el = this.$el;\n\n var formatter = Backgrid.resolveNameToClass(column.get(\"formatter\") ||\n this.formatter, \"Formatter\");\n\n if (!_.isFunction(formatter.fromRaw) && !_.isFunction(formatter.toRaw)) {\n formatter = new formatter();\n }\n\n this.formatter = formatter;\n\n this.editor = Backgrid.resolveNameToClass(this.editor, \"CellEditor\");\n\n this.listenTo(model, \"change:\" + column.get(\"name\"), function () {\n if (!$el.hasClass(\"editor\")) this.render();\n });\n\n this.listenTo(model, \"backgrid:error\", this.renderError);\n\n this.listenTo(column, \"change:editable change:sortable change:renderable\",\n function (column) {\n var changed = column.changedAttributes();\n for (var key in changed) {\n if (changed.hasOwnProperty(key)) {\n $el.toggleClass(key, changed[key]);\n }\n }\n });\n\n this.updateStateClassesMaybe();\n },\n\n updateStateClassesMaybe: function () {\n var model = this.model;\n var column = this.column;\n var $el = this.$el;\n $el.toggleClass(\"editable\", Backgrid.callByNeed(column.editable(), column, model));\n $el.toggleClass(\"sortable\", Backgrid.callByNeed(column.sortable(), column, model));\n $el.toggleClass(\"renderable\", Backgrid.callByNeed(column.renderable(), column, model));\n },\n\n /**\n Render a text string in a table cell. The text is converted from the\n model's raw value for this cell's column.\n */\n render: function () {\n var $el = this.$el;\n $el.empty();\n var model = this.model;\n var columnName = this.column.get(\"name\");\n $el.text(this.formatter.fromRaw(model.get(columnName), model));\n $el.addClass(columnName);\n this.updateStateClassesMaybe();\n this.delegateEvents();\n return this;\n },\n\n /**\n If this column is editable, a new CellEditor instance is instantiated with\n its required parameters. An `editor` CSS class is added to the cell upon\n entering edit mode.\n\n This method triggers a Backbone `backgrid:edit` event from the model when\n the cell is entering edit mode and an editor instance has been constructed,\n but before it is rendered and inserted into the DOM. The cell and the\n constructed cell editor instance are sent as event parameters when this\n event is triggered.\n\n When this cell has finished switching to edit mode, a Backbone\n `backgrid:editing` event is triggered from the model. The cell and the\n constructed cell instance are also sent as parameters in the event.\n\n When the model triggers a `backgrid:error` event, it means the editor is\n unable to convert the current user input to an apprpriate value for the\n model's column, and an `error` CSS class is added to the cell accordingly.\n */\n enterEditMode: function () {\n var model = this.model;\n var column = this.column;\n\n var editable = Backgrid.callByNeed(column.editable(), column, model);\n if (editable) {\n\n this.currentEditor = new this.editor({\n column: this.column,\n model: this.model,\n formatter: this.formatter\n });\n\n model.trigger(\"backgrid:edit\", model, column, this, this.currentEditor);\n\n // Need to redundantly undelegate events for Firefox\n this.undelegateEvents();\n this.$el.empty();\n this.$el.append(this.currentEditor.$el);\n this.currentEditor.render();\n this.$el.addClass(\"editor\");\n\n model.trigger(\"backgrid:editing\", model, column, this, this.currentEditor);\n }\n },\n\n /**\n Put an `error` CSS class on the table cell.\n */\n renderError: function (model, column) {\n if (column == null || column.get(\"name\") == this.column.get(\"name\")) {\n this.$el.addClass(\"error\");\n }\n },\n\n /**\n Removes the editor and re-render in display mode.\n */\n exitEditMode: function () {\n this.$el.removeClass(\"error\");\n this.currentEditor.remove();\n this.stopListening(this.currentEditor);\n delete this.currentEditor;\n this.$el.removeClass(\"editor\");\n this.render();\n },\n\n /**\n Clean up this cell.\n\n @chainable\n */\n remove: function () {\n if (this.currentEditor) {\n this.currentEditor.remove.apply(this.currentEditor, arguments);\n delete this.currentEditor;\n }\n return Cell.__super__.remove.apply(this, arguments);\n }\n\n});\n\n/**\n StringCell displays HTML escaped strings and accepts anything typed in.\n\n @class Backgrid.StringCell\n @extends Backgrid.Cell\n*/\nvar StringCell = Backgrid.StringCell = Cell.extend({\n\n /** @property */\n className: \"string-cell\",\n\n formatter: StringFormatter\n\n});\n\n/**\n UriCell renders an HTML `<a>` anchor for the value and accepts URIs as user\n input values. No type conversion or URL validation is done by the formatter\n of this cell. Users who need URL validation are encourage to subclass UriCell\n to take advantage of the parsing capabilities of the HTMLAnchorElement\n available on HTML5-capable browsers or using a third-party library like\n [URI.js](https://github.com/medialize/URI.js).\n\n @class Backgrid.UriCell\n @extends Backgrid.Cell\n*/\nvar UriCell = Backgrid.UriCell = Cell.extend({\n\n /** @property */\n className: \"uri-cell\",\n\n /**\n @property {string} [title] The title attribute of the generated anchor. It\n uses the display value formatted by the `formatter.fromRaw` by default.\n */\n title: null,\n\n /**\n @property {string} [target=\"_blank\"] The target attribute of the generated\n anchor.\n */\n target: \"_blank\",\n\n initialize: function (options) {\n UriCell.__super__.initialize.apply(this, arguments);\n this.title = options.title || this.title;\n this.target = options.target || this.target;\n },\n\n render: function () {\n this.$el.empty();\n var rawValue = this.model.get(this.column.get(\"name\"));\n var formattedValue = this.formatter.fromRaw(rawValue, this.model);\n this.$el.append($(\"<a>\", {\n tabIndex: -1,\n href: rawValue,\n title: this.title || formattedValue,\n target: this.target\n }).text(formattedValue));\n this.delegateEvents();\n return this;\n }\n\n});\n\n/**\n Like Backgrid.UriCell, EmailCell renders an HTML `<a>` anchor for the\n value. The `href` in the anchor is prefixed with `mailto:`. EmailCell will\n complain if the user enters a string that doesn't contain the `@` sign.\n\n @class Backgrid.EmailCell\n @extends Backgrid.StringCell\n*/\nvar EmailCell = Backgrid.EmailCell = StringCell.extend({\n\n /** @property */\n className: \"email-cell\",\n\n formatter: EmailFormatter,\n\n render: function () {\n this.$el.empty();\n var model = this.model;\n var formattedValue = this.formatter.fromRaw(model.get(this.column.get(\"name\")), model);\n this.$el.append($(\"<a>\", {\n tabIndex: -1,\n href: \"mailto:\" + formattedValue,\n title: formattedValue\n }).text(formattedValue));\n this.delegateEvents();\n return this;\n }\n\n});\n\n/**\n NumberCell is a generic cell that renders all numbers. Numbers are formatted\n using a Backgrid.NumberFormatter.\n\n @class Backgrid.NumberCell\n @extends Backgrid.Cell\n*/\nvar NumberCell = Backgrid.NumberCell = Cell.extend({\n\n /** @property */\n className: \"number-cell\",\n\n /**\n @property {number} [decimals=2] Must be an integer.\n */\n decimals: NumberFormatter.prototype.defaults.decimals,\n\n /** @property {string} [decimalSeparator='.'] */\n decimalSeparator: NumberFormatter.prototype.defaults.decimalSeparator,\n\n /** @property {string} [orderSeparator=','] */\n orderSeparator: NumberFormatter.prototype.defaults.orderSeparator,\n\n /** @property {Backgrid.CellFormatter} [formatter=Backgrid.NumberFormatter] */\n formatter: NumberFormatter,\n\n /**\n Initializes this cell and the number formatter.\n\n @param {Object} options\n @param {Backbone.Model} options.model\n @param {Backgrid.Column} options.column\n */\n initialize: function (options) {\n NumberCell.__super__.initialize.apply(this, arguments);\n var formatter = this.formatter;\n formatter.decimals = this.decimals;\n formatter.decimalSeparator = this.decimalSeparator;\n formatter.orderSeparator = this.orderSeparator;\n }\n\n});\n\n/**\n An IntegerCell is just a Backgrid.NumberCell with 0 decimals. If a floating\n point number is supplied, the number is simply rounded the usual way when\n displayed.\n\n @class Backgrid.IntegerCell\n @extends Backgrid.NumberCell\n*/\nvar IntegerCell = Backgrid.IntegerCell = NumberCell.extend({\n\n /** @property */\n className: \"integer-cell\",\n\n /**\n @property {number} decimals Must be an integer.\n */\n decimals: 0\n});\n\n/**\n A PercentCell is another Backgrid.NumberCell that takes a floating number,\n optionally multiplied by a multiplier and display it as a percentage.\n\n @class Backgrid.PercentCell\n @extends Backgrid.NumberCell\n */\nvar PercentCell = Backgrid.PercentCell = NumberCell.extend({\n\n /** @property */\n className: \"percent-cell\",\n\n /** @property {number} [multiplier=1] */\n multiplier: PercentFormatter.prototype.defaults.multiplier,\n\n /** @property {string} [symbol='%'] */\n symbol: PercentFormatter.prototype.defaults.symbol,\n\n /** @property {Backgrid.CellFormatter} [formatter=Backgrid.PercentFormatter] */\n formatter: PercentFormatter,\n\n /**\n Initializes this cell and the percent formatter.\n\n @param {Object} options\n @param {Backbone.Model} options.model\n @param {Backgrid.Column} options.column\n */\n initialize: function () {\n PercentCell.__super__.initialize.apply(this, arguments);\n var formatter = this.formatter;\n formatter.multiplier = this.multiplier;\n formatter.symbol = this.symbol;\n }\n\n});\n\n/**\n DatetimeCell is a basic cell that accepts datetime string values in RFC-2822\n or W3C's subset of ISO-8601 and displays them in ISO-8601 format. For a much\n more sophisticated date time cell with better datetime formatting, take a\n look at the Backgrid.Extension.MomentCell extension.\n\n @class Backgrid.DatetimeCell\n @extends Backgrid.Cell\n\n See:\n\n - Backgrid.Extension.MomentCell\n - Backgrid.DatetimeFormatter\n*/\nvar DatetimeCell = Backgrid.DatetimeCell = Cell.extend({\n\n /** @property */\n className: \"datetime-cell\",\n\n /**\n @property {boolean} [includeDate=true]\n */\n includeDate: DatetimeFormatter.prototype.defaults.includeDate,\n\n /**\n @property {boolean} [includeTime=true]\n */\n includeTime: DatetimeFormatter.prototype.defaults.includeTime,\n\n /**\n @property {boolean} [includeMilli=false]\n */\n includeMilli: DatetimeFormatter.prototype.defaults.includeMilli,\n\n /** @property {Backgrid.CellFormatter} [formatter=Backgrid.DatetimeFormatter] */\n formatter: DatetimeFormatter,\n\n /**\n Initializes this cell and the datetime formatter.\n\n @param {Object} options\n @param {Backbone.Model} options.model\n @param {Backgrid.Column} options.column\n */\n initialize: function (options) {\n DatetimeCell.__super__.initialize.apply(this, arguments);\n var formatter = this.formatter;\n formatter.includeDate = this.includeDate;\n formatter.includeTime = this.includeTime;\n formatter.includeMilli = this.includeMilli;\n\n var placeholder = this.includeDate ? \"YYYY-MM-DD\" : \"\";\n placeholder += (this.includeDate && this.includeTime) ? \"T\" : \"\";\n placeholder += this.includeTime ? \"HH:mm:ss\" : \"\";\n placeholder += (this.includeTime && this.includeMilli) ? \".SSS\" : \"\";\n\n this.editor = this.editor.extend({\n attributes: _.extend({}, this.editor.prototype.attributes, this.editor.attributes, {\n placeholder: placeholder\n })\n });\n }\n\n});\n\n/**\n DateCell is a Backgrid.DatetimeCell without the time part.\n\n @class Backgrid.DateCell\n @extends Backgrid.DatetimeCell\n*/\nvar DateCell = Backgrid.DateCell = DatetimeCell.extend({\n\n /** @property */\n className: \"date-cell\",\n\n /** @property */\n includeTime: false\n\n});\n\n/**\n TimeCell is a Backgrid.DatetimeCell without the date part.\n\n @class Backgrid.TimeCell\n @extends Backgrid.DatetimeCell\n*/\nvar TimeCell = Backgrid.TimeCell = DatetimeCell.extend({\n\n /** @property */\n className: \"time-cell\",\n\n /** @property */\n includeDate: false\n\n});\n\n/**\n BooleanCellEditor renders a checkbox as its editor.\n\n @class Backgrid.BooleanCellEditor\n @extends Backgrid.CellEditor\n*/\nvar BooleanCellEditor = Backgrid.BooleanCellEditor = CellEditor.extend({\n\n /** @property */\n tagName: \"input\",\n\n /** @property */\n attributes: {\n tabIndex: -1,\n type: \"checkbox\"\n },\n\n /** @property */\n events: {\n \"mousedown\": function () {\n this.mouseDown = true;\n },\n \"blur\": \"enterOrExitEditMode\",\n \"mouseup\": function () {\n this.mouseDown = false;\n },\n \"change\": \"saveOrCancel\",\n \"keydown\": \"saveOrCancel\"\n },\n\n /**\n Renders a checkbox and check it if the model value of this column is true,\n uncheck otherwise.\n */\n render: function () {\n var model = this.model;\n var val = this.formatter.fromRaw(model.get(this.column.get(\"name\")), model);\n this.$el.prop(\"checked\", val);\n return this;\n },\n\n /**\n Event handler. Hack to deal with the case where `blur` is fired before\n `change` and `click` on a checkbox.\n */\n enterOrExitEditMode: function (e) {\n if (!this.mouseDown) {\n var model = this.model;\n model.trigger(\"backgrid:edited\", model, this.column, new Command(e));\n }\n },\n\n /**\n Event handler. Save the value into the model if the event is `change` or\n one of the keyboard navigation key presses. Exit edit mode without saving\n if `escape` was pressed.\n */\n saveOrCancel: function (e) {\n var model = this.model;\n var column = this.column;\n var formatter = this.formatter;\n var command = new Command(e);\n // skip ahead to `change` when space is pressed\n if (command.passThru() && e.type != \"change\") return true;\n if (command.cancel()) {\n e.stopPropagation();\n model.trigger(\"backgrid:edited\", model, column, command);\n }\n\n var $el = this.$el;\n if (command.save() || command.moveLeft() || command.moveRight() || command.moveUp() ||\n command.moveDown()) {\n e.preventDefault();\n e.stopPropagation();\n var val = formatter.toRaw($el.prop(\"checked\"), model);\n model.set(column.get(\"name\"), val);\n model.trigger(\"backgrid:edited\", model, column, command);\n }\n else if (e.type == \"change\") {\n var val = formatter.toRaw($el.prop(\"checked\"), model);\n model.set(column.get(\"name\"), val);\n $el.focus();\n }\n }\n\n});\n\n/**\n BooleanCell renders a checkbox both during display mode and edit mode. The\n checkbox is checked if the model value is true, unchecked otherwise.\n\n @class Backgrid.BooleanCell\n @extends Backgrid.Cell\n*/\nvar BooleanCell = Backgrid.BooleanCell = Cell.extend({\n\n /** @property */\n className: \"boolean-cell\",\n\n /** @property */\n editor: BooleanCellEditor,\n\n /** @property */\n events: {\n \"click\": \"enterEditMode\"\n },\n\n /**\n Renders a checkbox and check it if the model value of this column is true,\n uncheck otherwise.\n */\n render: function () {\n this.$el.empty();\n var model = this.model, column = this.column;\n var editable = Backgrid.callByNeed(column.editable(), column, model);\n this.$el.append($(\"<input>\", {\n tabIndex: -1,\n type: \"checkbox\",\n checked: this.formatter.fromRaw(model.get(column.get(\"name\")), model),\n disabled: !editable\n }));\n this.delegateEvents();\n return this;\n }\n\n});\n\n/**\n SelectCellEditor renders an HTML `<select>` fragment as the editor.\n\n @class Backgrid.SelectCellEditor\n @extends Backgrid.CellEditor\n*/\nvar SelectCellEditor = Backgrid.SelectCellEditor = CellEditor.extend({\n\n /** @property */\n tagName: \"select\",\n\n /** @property */\n events: {\n \"change\": \"save\",\n \"blur\": \"close\",\n \"keydown\": \"close\"\n },\n\n /** @property {function(Object, ?Object=): string} template */\n template: _.template(\n '<option value=\"<%- value %>\" <%= selected ? \\'selected=\"selected\"\\' : \"\" %>><%- text %></option>',\n null,\n {\n variable : null,\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n }),\n\n setOptionValues: function (optionValues) {\n this.optionValues = optionValues;\n this.optionValues = _.result(this, \"optionValues\");\n },\n\n setMultiple: function (multiple) {\n this.multiple = multiple;\n this.$el.prop(\"multiple\", multiple);\n },\n\n _renderOptions: function (nvps, selectedValues) {\n var options = '';\n for (var i = 0; i < nvps.length; i++) {\n options = options + this.template({\n text: nvps[i][0],\n value: nvps[i][1],\n selected: _.indexOf(selectedValues, nvps[i][1]) > -1\n });\n }\n return options;\n },\n\n /**\n Renders the options if `optionValues` is a list of name-value pairs. The\n options are contained inside option groups if `optionValues` is a list of\n object hashes. The name is rendered at the option text and the value is the\n option value. If `optionValues` is a function, it is called without a\n parameter.\n */\n render: function () {\n this.$el.empty();\n\n var optionValues = _.result(this, \"optionValues\");\n var model = this.model;\n var selectedValues = this.formatter.fromRaw(model.get(this.column.get(\"name\")), model);\n\n if (!_.isArray(optionValues)) throw new TypeError(\"optionValues must be an array\");\n\n var optionValue = null;\n var optionText = null;\n var optionValue = null;\n var optgroupName = null;\n var optgroup = null;\n\n for (var i = 0; i < optionValues.length; i++) {\n var optionValue = optionValues[i];\n\n if (_.isArray(optionValue)) {\n optionText = optionValue[0];\n optionValue = optionValue[1];\n\n this.$el.append(this.template({\n text: optionText,\n value: optionValue,\n selected: _.indexOf(selectedValues, optionValue) > -1\n }));\n }\n else if (_.isObject(optionValue)) {\n optgroupName = optionValue.name;\n optgroup = $(\"<optgroup></optgroup>\", { label: optgroupName });\n optgroup.append(this._renderOptions.call(this, optionValue.values, selectedValues));\n this.$el.append(optgroup);\n }\n else {\n throw new TypeError(\"optionValues elements must be a name-value pair or an object hash of { name: 'optgroup label', value: [option name-value pairs] }\");\n }\n }\n\n this.delegateEvents();\n\n return this;\n },\n\n /**\n Saves the value of the selected option to the model attribute.\n */\n save: function (e) {\n var model = this.model;\n var column = this.column;\n model.set(column.get(\"name\"), this.formatter.toRaw(this.$el.val(), model));\n },\n\n /**\n Triggers a `backgrid:edited` event from the model so the body can close\n this editor.\n */\n close: function (e) {\n var model = this.model;\n var column = this.column;\n var command = new Command(e);\n if (command.cancel()) {\n e.stopPropagation();\n model.trigger(\"backgrid:edited\", model, column, new Command(e));\n }\n else if (command.save() || command.moveLeft() || command.moveRight() ||\n command.moveUp() || command.moveDown() || e.type == \"blur\") {\n e.preventDefault();\n e.stopPropagation();\n this.save(e);\n model.trigger(\"backgrid:edited\", model, column, new Command(e));\n }\n }\n\n});\n\n/**\n SelectCell is also a different kind of cell in that upon going into edit mode\n the cell renders a list of options to pick from, as opposed to an input box.\n\n SelectCell cannot be referenced by its string name when used in a column\n definition because it requires an `optionValues` class attribute to be\n defined. `optionValues` can either be a list of name-value pairs, to be\n rendered as options, or a list of object hashes which consist of a key *name*\n which is the option group name, and a key *values* which is a list of\n name-value pairs to be rendered as options under that option group.\n\n In addition, `optionValues` can also be a parameter-less function that\n returns one of the above. If the options are static, it is recommended the\n returned values to be memoized. `_.memoize()` is a good function to help with\n that.\n\n During display mode, the default formatter will normalize the raw model value\n to an array of values whether the raw model value is a scalar or an\n array. Each value is compared with the `optionValues` values using\n Ecmascript's implicit type conversion rules. When exiting edit mode, no type\n conversion is performed when saving into the model. This behavior is not\n always desirable when the value type is anything other than string. To\n control type conversion on the client-side, you should subclass SelectCell to\n provide a custom formatter or provide the formatter to your column\n definition.\n\n See:\n [$.fn.val()](http://api.jquery.com/val/)\n\n @class Backgrid.SelectCell\n @extends Backgrid.Cell\n*/\nvar SelectCell = Backgrid.SelectCell = Cell.extend({\n\n /** @property */\n className: \"select-cell\",\n\n /** @property */\n editor: SelectCellEditor,\n\n /** @property */\n multiple: false,\n\n /** @property */\n formatter: SelectFormatter,\n\n /**\n @property {Array.<Array>|Array.<{name: string, values: Array.<Array>}>} optionValues\n */\n optionValues: undefined,\n\n /** @property */\n delimiter: ', ',\n\n /**\n Initializer.\n\n @param {Object} options\n @param {Backbone.Model} options.model\n @param {Backgrid.Column} options.column\n\n @throws {TypeError} If `optionsValues` is undefined.\n */\n initialize: function (options) {\n SelectCell.__super__.initialize.apply(this, arguments);\n this.listenTo(this.model, \"backgrid:edit\", function (model, column, cell, editor) {\n if (column.get(\"name\") == this.column.get(\"name\")) {\n editor.setOptionValues(this.optionValues);\n editor.setMultiple(this.multiple);\n }\n });\n },\n\n /**\n Renders the label using the raw value as key to look up from `optionValues`.\n\n @throws {TypeError} If `optionValues` is malformed.\n */\n render: function () {\n this.$el.empty();\n\n var optionValues = _.result(this, \"optionValues\");\n var model = this.model;\n var rawData = this.formatter.fromRaw(model.get(this.column.get(\"name\")), model);\n\n var selectedText = [];\n\n try {\n if (!_.isArray(optionValues) || _.isEmpty(optionValues)) throw new TypeError;\n\n for (var k = 0; k < rawData.length; k++) {\n var rawDatum = rawData[k];\n\n for (var i = 0; i < optionValues.length; i++) {\n var optionValue = optionValues[i];\n\n if (_.isArray(optionValue)) {\n var optionText = optionValue[0];\n var optionValue = optionValue[1];\n\n if (optionValue == rawDatum) selectedText.push(optionText);\n }\n else if (_.isObject(optionValue)) {\n var optionGroupValues = optionValue.values;\n\n for (var j = 0; j < optionGroupValues.length; j++) {\n var optionGroupValue = optionGroupValues[j];\n if (optionGroupValue[1] == rawDatum) {\n selectedText.push(optionGroupValue[0]);\n }\n }\n }\n else {\n throw new TypeError;\n }\n }\n }\n\n this.$el.append(selectedText.join(this.delimiter));\n }\n catch (ex) {\n if (ex instanceof TypeError) {\n throw new TypeError(\"'optionValues' must be of type {Array.<Array>|Array.<{name: string, values: Array.<Array>}>}\");\n }\n throw ex;\n }\n\n this.delegateEvents();\n\n return this;\n }\n\n});\n\n/*\n backgrid\n http://github.com/cloudflare/backgrid\n\n Copyright (c) 2013-present Cloudflare, Inc. and contributors\n Licensed under the MIT license.\n*/\n\n/**\n A Column is a placeholder for column metadata.\n\n You usually don't need to create an instance of this class yourself as a\n collection of column instances will be created for you from a list of column\n attributes in the Backgrid.js view class constructors.\n\n @class Backgrid.Column\n @extends Backbone.Model\n*/\nvar Column = Backgrid.Column = Backbone.Model.extend({\n\n /**\n @cfg {Object} defaults Column defaults. To override any of these default\n values, you can either change the prototype directly to override\n Column.defaults globally or extend Column and supply the custom class to\n Backgrid.Grid:\n\n // Override Column defaults globally\n Column.prototype.defaults.sortable = false;\n\n // Override Column defaults locally\n var MyColumn = Column.extend({\n defaults: _.defaults({\n editable: false\n }, Column.prototype.defaults)\n });\n\n var grid = new Backgrid.Grid(columns: new Columns([{...}, {...}], {\n model: MyColumn\n }));\n\n @cfg {string} [defaults.name] The default name of the model attribute.\n\n @cfg {string} [defaults.label] The default label to show in the header.\n\n @cfg {string|Backgrid.Cell} [defaults.cell] The default cell type. If this\n is a string, the capitalized form will be used to look up a cell class in\n Backbone, i.e.: string => StringCell. If a Cell subclass is supplied, it is\n initialized with a hash of parameters. If a Cell instance is supplied, it\n is used directly.\n\n @cfg {string|Backgrid.HeaderCell} [defaults.headerCell] The default header\n cell type.\n\n @cfg {boolean|string|function(): boolean} [defaults.sortable=true] Whether\n this column is sortable. If the value is a string, a method will the same\n name will be looked up from the column instance to determine whether the\n column should be sortable. The method's signature must be `function\n (Backbone.Model): boolean`. The function's context is the column instance.\n\n @cfg {boolean|string|function(): boolean} [defaults.editable=true] Whether\n this column is editable. If the value is a string, a method will the same\n name will be looked up from the column instance to determine whether the\n column should be editable. The method's signature must be `function\n (Backbone.Model): boolean`. The function's context is the column instance.\n\n @cfg {boolean|string|function(): boolean} [defaults.renderable=true]\n Whether this column is renderable. If the value is a string, a method will\n the same name will be looked up from the column instance to determine\n whether the column should be renderable. The method's signature must be\n `function (Backbone.Model): boolean`. The function's context is the column\n instance.\n\n @cfg {Backgrid.CellFormatter | Object | string} [defaults.formatter] The\n formatter to use to convert between raw model values and user input.\n\n @cfg {\"toggle\"|\"cycle\"} [defaults.sortType=\"cycle\"] Whether sorting will\n toggle between ascending and descending order, or cycle between insertion\n order, ascending and descending order.\n\n @cfg {(function(Backbone.Model, string): *) | string} [defaults.sortValue]\n The function to use to extract a value from the model for comparison during\n sorting. If this value is a string, a method with the same name will be\n looked up from the column instance.\n\n @cfg {\"ascending\"|\"descending\"|null} [defaults.direction=null] The initial\n sorting direction for this column. The default is ordered by\n Backbone.Model.cid, which usually means the collection is ordered by\n insertion order.\n */\n defaults: {\n name: undefined,\n label: undefined,\n sortable: true,\n editable: true,\n renderable: true,\n formatter: undefined,\n sortType: \"cycle\",\n sortValue: undefined,\n direction: null,\n cell: undefined,\n headerCell: undefined\n },\n\n /**\n Initializes this Column instance.\n\n @param {Object} attrs\n\n @param {string} attrs.name The model attribute this column is responsible\n for.\n\n @param {string|Backgrid.Cell} attrs.cell The cell type to use to render\n this column.\n\n @param {string} [attrs.label]\n\n @param {string|Backgrid.HeaderCell} [attrs.headerCell]\n\n @param {boolean|string|function(): boolean} [attrs.sortable=true]\n\n @param {boolean|string|function(): boolean} [attrs.editable=true]\n\n @param {boolean|string|function(): boolean} [attrs.renderable=true]\n\n @param {Backgrid.CellFormatter | Object | string} [attrs.formatter]\n\n @param {\"toggle\"|\"cycle\"} [attrs.sortType=\"cycle\"]\n\n @param {(function(Backbone.Model, string): *) | string} [attrs.sortValue]\n\n @throws {TypeError} If attrs.cell or attrs.options are not supplied.\n\n @throws {ReferenceError} If formatter is a string but a formatter class of\n said name cannot be found in the Backgrid module.\n\n See:\n\n - Backgrid.Column.defaults\n - Backgrid.Cell\n - Backgrid.CellFormatter\n */\n initialize: function () {\n if (!this.has(\"label\")) {\n this.set({ label: this.get(\"name\") }, { silent: true });\n }\n\n var headerCell = Backgrid.resolveNameToClass(this.get(\"headerCell\"), \"HeaderCell\");\n\n var cell = Backgrid.resolveNameToClass(this.get(\"cell\"), \"Cell\");\n\n this.set({cell: cell, headerCell: headerCell}, { silent: true });\n },\n\n /**\n Returns an appropriate value extraction function from a model for sorting.\n\n If the column model contains an attribute `sortValue`, if it is a string, a\n method from the column instance identifified by the `sortValue` string is\n returned. If it is a function, it it returned as is. If `sortValue` isn't\n found from the column model's attributes, a default value extraction\n function is returned which will compare according to the natural order of\n the value's type.\n\n @return {function(Backbone.Model, string): *}\n */\n sortValue: function () {\n var sortValue = this.get(\"sortValue\");\n if (_.isString(sortValue)) return this[sortValue];\n else if (_.isFunction(sortValue)) return sortValue;\n\n return function (model, colName) {\n return model.get(colName);\n };\n }\n\n /**\n If you cannot always determine whether a column should be sortable before\n the grid get initialized, you can override this method.\n\n @member Backgrid.Column\n @protected\n @method sortable\n @return {function(Backbone.Model): boolean | boolean}\n */\n\n /**\n If you cannot always determine whether a column should be editable before\n the grid get initialized, you can override this method.\n\n @member Backgrid.Column\n @protected\n @method editable\n @return {function(Backbone.Model): boolean | boolean}\n */\n\n /**\n If you cannot always determine whether a column should be renderable before\n the grid get initialized, you can override this method.\n\n @member Backgrid.Column\n @protected\n @method renderable\n @return {function(Backbone.Model): boolean | boolean}\n */\n});\n\n_.each([\"sortable\", \"renderable\", \"editable\"], function (key) {\n Column.prototype[key] = function () {\n var value = this.get(key);\n if (_.isString(value)) return this[value];\n else if (_.isFunction(value)) return value;\n\n return !!value;\n };\n});\n\n/**\n A Backbone collection of Column instances.\n\n @class Backgrid.Columns\n @extends Backbone.Collection\n */\nvar Columns = Backgrid.Columns = Backbone.Collection.extend({\n\n /**\n @property {Backgrid.Column} model\n */\n model: Column\n});\n\n/*\n backgrid\n http://github.com/cloudflare/backgrid\n\n Copyright (c) 2013-present Cloudflare, Inc. and contributors\n Licensed under the MIT license.\n*/\n\n/**\n Row is a simple container view that takes a model instance and a list of\n column metadata describing how each of the model's attribute is to be\n rendered, and apply the appropriate cell to each attribute.\n\n @class Backgrid.Row\n @extends Backbone.View\n*/\nvar Row = Backgrid.Row = Backbone.View.extend({\n\n /** @property */\n tagName: \"tr\",\n\n /**\n Initializes a row view instance.\n\n @param {Object} options\n @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.\n @param {Backbone.Model} options.model The model instance to render.\n\n @throws {TypeError} If options.columns or options.model is undefined.\n */\n initialize: function (options) {\n\n var columns = this.columns = options.columns;\n if (!(columns instanceof Backbone.Collection)) {\n columns = this.columns = new Columns(columns);\n }\n\n var cells = this.cells = [];\n for (var i = 0; i < columns.length; i++) {\n cells.push(this.makeCell(columns.at(i), options));\n }\n\n this.listenTo(columns, \"add\", function (column, columns) {\n var i = columns.indexOf(column);\n var cell = this.makeCell(column, options);\n cells.splice(i, 0, cell);\n\n var $el = this.$el;\n if (i === 0) {\n $el.prepend(cell.render().$el);\n }\n else if (i === columns.length - 1) {\n $el.append(cell.render().$el);\n }\n else {\n $el.children().eq(i).before(cell.render().$el);\n }\n });\n\n this.listenTo(columns, \"remove\", function (column, columns, opts) {\n cells[opts.index].remove();\n cells.splice(opts.index, 1);\n });\n },\n\n /**\n Factory method for making a cell. Used by #initialize internally. Override\n this to provide an appropriate cell instance for a custom Row subclass.\n\n @protected\n\n @param {Backgrid.Column} column\n @param {Object} options The options passed to #initialize.\n\n @return {Backgrid.Cell}\n */\n makeCell: function (column) {\n return new (column.get(\"cell\"))({\n column: column,\n model: this.model\n });\n },\n\n /**\n Renders a row of cells for this row's model.\n */\n render: function () {\n this.$el.empty();\n\n var fragment = document.createDocumentFragment();\n for (var i = 0; i < this.cells.length; i++) {\n fragment.appendChild(this.cells[i].render().el);\n }\n\n this.el.appendChild(fragment);\n\n this.delegateEvents();\n\n return this;\n },\n\n /**\n Clean up this row and its cells.\n\n @chainable\n */\n remove: function () {\n for (var i = 0; i < this.cells.length; i++) {\n var cell = this.cells[i];\n cell.remove.apply(cell, arguments);\n }\n return Backbone.View.prototype.remove.apply(this, arguments);\n }\n\n});\n\n/**\n EmptyRow is a simple container view that takes a list of column and render a\n row with a single column.\n\n @class Backgrid.EmptyRow\n @extends Backbone.View\n*/\nvar EmptyRow = Backgrid.EmptyRow = Backbone.View.extend({\n\n /** @property */\n tagName: \"tr\",\n\n /** @property {string|function(): string} */\n emptyText: null,\n\n /**\n Initializer.\n\n @param {Object} options\n @param {string|function(): string} options.emptyText\n @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.\n */\n initialize: function (options) {\n this.emptyText = options.emptyText;\n this.columns = options.columns;\n },\n\n /**\n Renders an empty row.\n */\n render: function () {\n this.$el.empty();\n\n var td = document.createElement(\"td\");\n td.setAttribute(\"colspan\", this.columns.length);\n var span = document.createElement(\"span\");\n span.innerHTML = _.result(this, \"emptyText\");\n td.appendChild(span);\n\n this.el.className = \"empty\";\n this.el.appendChild(td);\n\n return this;\n }\n});\n\n/*\n backgrid\n http://github.com/cloudflare/backgrid\n\n Copyright (c) 2013-present Cloudflare, Inc. and contributors\n Licensed under the MIT license.\n*/\n\n/**\n HeaderCell is a special cell class that renders a column header cell. If the\n column is sortable, a sorter is also rendered and will trigger a table\n refresh after sorting.\n\n @class Backgrid.HeaderCell\n @extends Backbone.View\n */\nvar HeaderCell = Backgrid.HeaderCell = Backbone.View.extend({\n\n /** @property */\n tagName: \"th\",\n\n /** @property */\n events: {\n \"click button\": \"onClick\"\n },\n\n /**\n Initializer.\n\n @param {Object} options\n @param {Backgrid.Column|Object} options.column\n\n @throws {TypeError} If options.column or options.collection is undefined.\n */\n initialize: function (options) {\n this.column = options.column;\n if (!(this.column instanceof Column)) {\n this.column = new Column(this.column);\n }\n\n var column = this.column, collection = this.collection, $el = this.$el;\n\n this.listenTo(column, \"change:editable change:sortable change:renderable\",\n function (column) {\n var changed = column.changedAttributes();\n for (var key in changed) {\n if (changed.hasOwnProperty(key)) {\n $el.toggleClass(key, changed[key]);\n }\n }\n });\n this.listenTo(column, \"change:direction\", this.setCellDirection);\n this.listenTo(column, \"change:name change:label\", this.render);\n\n if (Backgrid.callByNeed(column.editable(), column, collection)) $el.addClass(\"editable\");\n if (Backgrid.callByNeed(column.sortable(), column, collection)) $el.addClass(\"sortable\");\n if (Backgrid.callByNeed(column.renderable(), column, collection)) $el.addClass(\"renderable\");\n\n this.listenTo(collection.fullCollection || collection, \"backgrid:sorted\", this.removeCellDirection);\n },\n\n /**\n Event handler for the collection's `backgrid:sorted` event. Removes\n all the CSS direction classes.\n */\n removeCellDirection: function () {\n this.$el.removeClass(\"ascending\").removeClass(\"descending\");\n this.column.set(\"direction\", null);\n },\n\n /**\n Event handler for the column's `change:direction` event. If this\n HeaderCell's column is being sorted on, it applies the direction given as a\n CSS class to the header cell. Removes all the CSS direction classes\n otherwise.\n */\n setCellDirection: function (column, direction) {\n this.$el.removeClass(\"ascending\").removeClass(\"descending\");\n if (column.cid == this.column.cid) this.$el.addClass(direction);\n },\n\n /**\n Event handler for the `click` event on the cell's anchor. If the column is\n sortable, clicking on the anchor will cycle through 3 sorting orderings -\n `ascending`, `descending`, and default.\n */\n onClick: function (e) {\n e.preventDefault();\n\n var column = this.column;\n var collection = this.collection;\n var event = \"backgrid:sort\";\n\n function cycleSort(header, col) {\n if (column.get(\"direction\") === \"ascending\") collection.trigger(event, col, \"descending\");\n else if (column.get(\"direction\") === \"descending\") collection.trigger(event, col, null);\n else collection.trigger(event, col, \"ascending\");\n }\n\n function toggleSort(header, col) {\n if (column.get(\"direction\") === \"ascending\") collection.trigger(event, col, \"descending\");\n else collection.trigger(event, col, \"ascending\");\n }\n\n var sortable = Backgrid.callByNeed(column.sortable(), column, this.collection);\n if (sortable) {\n var sortType = column.get(\"sortType\");\n if (sortType === \"toggle\") toggleSort(this, column);\n else cycleSort(this, column);\n }\n },\n\n /**\n Renders a header cell with a sorter, a label, and a class name for this\n column.\n */\n render: function () {\n this.$el.empty();\n var column = this.column;\n var sortable = Backgrid.callByNeed(column.sortable(), column, this.collection);\n var label;\n if(sortable){\n label = $(\"<button>\").text(column.get(\"label\")).append(\"<span class='sort-caret' aria-hidden='true'></span>\");\n } else {\n label = document.createTextNode(column.get(\"label\"));\n }\n\n this.$el.append(label);\n this.$el.addClass(column.get(\"name\"));\n this.$el.addClass(column.get(\"direction\"));\n this.delegateEvents();\n return this;\n }\n\n});\n\n/**\n HeaderRow is a controller for a row of header cells.\n\n @class Backgrid.HeaderRow\n @extends Backgrid.Row\n */\nvar HeaderRow = Backgrid.HeaderRow = Backgrid.Row.extend({\n\n /**\n Initializer.\n\n @param {Object} options\n @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns\n @param {Backgrid.HeaderCell} [options.headerCell] Customized default\n HeaderCell for all the columns. Supply a HeaderCell class or instance to a\n the `headerCell` key in a column definition for column-specific header\n rendering.\n\n @throws {TypeError} If options.columns or options.collection is undefined.\n */\n initialize: function () {\n Backgrid.Row.prototype.initialize.apply(this, arguments);\n },\n\n makeCell: function (column, options) {\n var headerCell = column.get(\"headerCell\") || options.headerCell || HeaderCell;\n headerCell = new headerCell({\n column: column,\n collection: this.collection\n });\n return headerCell;\n }\n\n});\n\n/**\n Header is a special structural view class that renders a table head with a\n single row of header cells.\n\n @class Backgrid.Header\n @extends Backbone.View\n */\nvar Header = Backgrid.Header = Backbone.View.extend({\n\n /** @property */\n tagName: \"thead\",\n\n /**\n Initializer. Initializes this table head view to contain a single header\n row view.\n\n @param {Object} options\n @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.\n @param {Backbone.Model} options.model The model instance to render.\n\n @throws {TypeError} If options.columns or options.model is undefined.\n */\n initialize: function (options) {\n this.columns = options.columns;\n if (!(this.columns instanceof Backbone.Collection)) {\n this.columns = new Columns(this.columns);\n }\n\n this.row = new Backgrid.HeaderRow({\n columns: this.columns,\n collection: this.collection\n });\n },\n\n /**\n Renders this table head with a single row of header cells.\n */\n render: function () {\n this.$el.append(this.row.render().$el);\n this.delegateEvents();\n return this;\n },\n\n /**\n Clean up this header and its row.\n\n @chainable\n */\n remove: function () {\n this.row.remove.apply(this.row, arguments);\n return Backbone.View.prototype.remove.apply(this, arguments);\n }\n\n});\n\n/*\n backgrid\n http://github.com/cloudflare/backgrid\n\n Copyright (c) 2013-present Cloudflare, Inc. and contributors\n Licensed under the MIT license.\n*/\n\n/**\n Body is the table body which contains the rows inside a table. Body is\n responsible for refreshing the rows after sorting, insertion and removal.\n\n @class Backgrid.Body\n @extends Backbone.View\n*/\nvar Body = Backgrid.Body = Backbone.View.extend({\n\n /** @property */\n tagName: \"tbody\",\n\n /**\n Initializer.\n\n @param {Object} options\n @param {Backbone.Collection} options.collection\n @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns\n Column metadata.\n @param {Backgrid.Row} [options.row=Backgrid.Row] The Row class to use.\n @param {string|function(): string} [options.emptyText] The text to display in the empty row.\n\n @throws {TypeError} If options.columns or options.collection is undefined.\n\n See Backgrid.Row.\n */\n initialize: function (options) {\n\n this.columns = options.columns;\n if (!(this.columns instanceof Backbone.Collection)) {\n this.columns = new Columns(this.columns);\n }\n\n this.row = options.row || this.row || Row;\n this.rows = this.collection.map(function (model) {\n var row = new this.row({\n columns: this.columns,\n model: model\n });\n\n return row;\n }, this);\n\n this.emptyText = options.emptyText;\n this._unshiftEmptyRowMayBe();\n\n var collection = this.collection;\n this.listenTo(collection, \"add\", this.insertRow);\n this.listenTo(collection, \"remove\", this.removeRow);\n this.listenTo(collection, \"sort\", this.refresh);\n this.listenTo(collection, \"reset\", this.refresh);\n this.listenTo(collection, \"backgrid:sort\", this.sort);\n this.listenTo(collection, \"backgrid:edited\", this.moveToNextCell);\n\n this.listenTo(this.columns, \"add remove\", this.updateEmptyRow);\n },\n\n _unshiftEmptyRowMayBe: function () {\n if (this.rows.length === 0 && this.emptyText != null) {\n this.emptyRow = new EmptyRow({\n emptyText: this.emptyText,\n columns: this.columns\n });\n\n this.rows.unshift(this.emptyRow);\n return true\n }\n },\n\n /**\n This method can be called either directly or as a callback to a\n [Backbone.Collecton#add](http://backbonejs.org/#Collection-add) event.\n\n When called directly, it accepts a model or an array of models and an\n option hash just like\n [Backbone.Collection#add](http://backbonejs.org/#Collection-add) and\n delegates to it. Once the model is added, a new row is inserted into the\n body and automatically rendered.\n\n When called as a callback of an `add` event, splices a new row into the\n body and renders it.\n\n @param {Backbone.Model} model The model to render as a row.\n @param {Backbone.Collection} collection When called directly, this\n parameter is actually the options to\n [Backbone.Collection#add](http://backbonejs.org/#Collection-add).\n @param {Object} options When called directly, this must be null.\n\n See:\n\n - [Backbone.Collection#add](http://backbonejs.org/#Collection-add)\n */\n insertRow: function (model, collection, options) {\n\n if (this.rows[0] instanceof EmptyRow) this.rows.pop().remove();\n\n // insertRow() is called directly\n if (!(collection instanceof Backbone.Collection) && !options) {\n this.collection.add(model, (options = collection));\n return;\n }\n\n var row = new this.row({\n columns: this.columns,\n model: model\n });\n\n var index = collection.indexOf(model);\n this.rows.splice(index, 0, row);\n\n var $el = this.$el;\n var $children = $el.children();\n var $rowEl = row.render().$el;\n\n if (index >= $children.length) {\n $el.append($rowEl);\n }\n else {\n $children.eq(index).before($rowEl);\n }\n\n return this;\n },\n\n /**\n The method can be called either directly or as a callback to a\n [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove)\n event.\n\n When called directly, it accepts a model or an array of models and an\n option hash just like\n [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove) and\n delegates to it. Once the model is removed, a corresponding row is removed\n from the body.\n\n When called as a callback of a `remove` event, splices into the rows and\n removes the row responsible for rendering the model.\n\n @param {Backbone.Model} model The model to remove from the body.\n @param {Backbone.Collection} collection When called directly, this\n parameter is actually the options to\n [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove).\n @param {Object} options When called directly, this must be null.\n\n See:\n\n - [Backbone.Collection#remove](http://backbonejs.org/#Collection-remove)\n */\n removeRow: function (model, collection, options) {\n\n // removeRow() is called directly\n if (!options) {\n this.collection.remove(model, (options = collection));\n if (this._unshiftEmptyRowMayBe()) {\n this.render();\n }\n return;\n }\n\n if (_.isUndefined(options.render) || options.render) {\n this.rows[options.index].remove();\n }\n\n this.rows.splice(options.index, 1);\n if (this._unshiftEmptyRowMayBe()) {\n this.render();\n }\n\n return this;\n },\n\n /**\n Rerender the EmptyRow which empties the DOM element, creates the td with the\n updated colspan, and appends it back into the DOM\n */\n\n updateEmptyRow: function () {\n if (this.emptyRow != null) {\n this.emptyRow.render();\n }\n },\n\n /**\n Reinitialize all the rows inside the body and re-render them. Triggers a\n Backbone `backgrid:refresh` event from the collection along with the body\n instance as its sole parameter when done.\n */\n refresh: function () {\n for (var i = 0; i < this.rows.length; i++) {\n this.rows[i].remove();\n }\n\n this.rows = this.collection.map(function (model) {\n var row = new this.row({\n columns: this.columns,\n model: model\n });\n\n return row;\n }, this);\n this._unshiftEmptyRowMayBe();\n\n this.render();\n\n this.collection.trigger(\"backgrid:refresh\", this);\n\n return this;\n },\n\n /**\n Renders all the rows inside this body. If the collection is empty and\n `options.emptyText` is defined and not null in the constructor, an empty\n row is rendered, otherwise no row is rendered.\n */\n render: function () {\n this.$el.empty();\n\n var fragment = document.createDocumentFragment();\n for (var i = 0; i < this.rows.length; i++) {\n var row = this.rows[i];\n fragment.appendChild(row.render().el);\n }\n\n this.el.appendChild(fragment);\n\n this.delegateEvents();\n\n return this;\n },\n\n /**\n Clean up this body and it's rows.\n\n @chainable\n */\n remove: function () {\n for (var i = 0; i < this.rows.length; i++) {\n var row = this.rows[i];\n row.remove.apply(row, arguments);\n }\n return Backbone.View.prototype.remove.apply(this, arguments);\n },\n\n /**\n If the underlying collection is a Backbone.PageableCollection in\n server-mode or infinite-mode, a page of models is fetched after sorting is\n done on the server.\n\n If the underlying collection is a Backbone.PageableCollection in\n client-mode, or any\n [Backbone.Collection](http://backbonejs.org/#Collection) instance, sorting\n is done on the client side. If the collection is an instance of a\n Backbone.PageableCollection, sorting will be done globally on all the pages\n and the current page will then be returned.\n\n Triggers a Backbone `backgrid:sorted` event from the collection when done\n with the column, direction and a reference to the collection.\n\n @param {Backgrid.Column|string} column\n @param {null|\"ascending\"|\"descending\"} direction\n\n See [Backbone.Collection#comparator](http://backbonejs.org/#Collection-comparator)\n */\n sort: function (column, direction) {\n\n if (!_.contains([\"ascending\", \"descending\", null], direction)) {\n throw new RangeError('direction must be one of \"ascending\", \"descending\" or `null`');\n }\n\n if (_.isString(column)) column = this.columns.findWhere({name: column});\n\n var collection = this.collection;\n\n var order;\n if (direction === \"ascending\") order = -1;\n else if (direction === \"descending\") order = 1;\n else order = null;\n\n var comparator = this.makeComparator(column.get(\"name\"), order,\n order ?\n column.sortValue() :\n function (model) {\n return model.cid.replace('c', '') * 1;\n });\n\n if (Backbone.PageableCollection &&\n collection instanceof Backbone.PageableCollection) {\n\n collection.setSorting(order && column.get(\"name\"), order,\n {sortValue: column.sortValue()});\n\n if (collection.fullCollection) {\n // If order is null, pageable will remove the comparator on both sides,\n // in this case the default insertion order comparator needs to be\n // attached to get back to the order before sorting.\n if (collection.fullCollection.comparator == null) {\n collection.fullCollection.comparator = comparator;\n }\n collection.fullCollection.sort();\n collection.trigger(\"backgrid:sorted\", column, direction, collection);\n column.set(\"direction\", direction);\n }\n else collection.fetch({reset: true, success: function () {\n collection.trigger(\"backgrid:sorted\", column, direction, collection);\n column.set(\"direction\", direction);\n }});\n }\n else {\n collection.comparator = comparator;\n collection.sort();\n collection.trigger(\"backgrid:sorted\", column, direction, collection);\n column.set(\"direction\", direction);\n }\n\n return this;\n },\n\n makeComparator: function (attr, order, func) {\n\n return function (left, right) {\n // extract the values from the models\n var l = func(left, attr), r = func(right, attr), t;\n\n // if descending order, swap left and right\n if (order === 1) t = l, l = r, r = t;\n\n // compare as usual\n if (l === r) return 0;\n else if (l < r) return -1;\n return 1;\n };\n },\n\n /**\n Moves focus to the next renderable and editable cell and return the\n currently editing cell to display mode.\n\n Triggers a `backgrid:next` event on the model with the indices of the row\n and column the user *intended* to move to, and whether the intended move\n was going to go out of bounds. Note that *out of bound* always means an\n attempt to go past the end of the last row.\n\n @param {Backbone.Model} model The originating model\n @param {Backgrid.Column} column The originating model column\n @param {Backgrid.Command} command The Command object constructed from a DOM\n event\n */\n moveToNextCell: function (model, column, command) {\n var i = this.collection.indexOf(model);\n var j = this.columns.indexOf(column);\n var cell, renderable, editable, m, n;\n\n // return if model being edited in a different grid\n if (j === -1) return this;\n\n this.rows[i].cells[j].exitEditMode();\n\n if (command.moveUp() || command.moveDown() || command.moveLeft() ||\n command.moveRight() || command.save()) {\n var l = this.columns.length;\n var maxOffset = l * this.collection.length;\n\n if (command.moveUp() || command.moveDown()) {\n m = i + (command.moveUp() ? -1 : 1);\n var row = this.rows[m];\n if (row) {\n cell = row.cells[j];\n if (Backgrid.callByNeed(cell.column.editable(), cell.column, model)) {\n cell.enterEditMode();\n model.trigger(\"backgrid:next\", m, j, false);\n }\n }\n else model.trigger(\"backgrid:next\", m, j, true);\n }\n else if (command.moveLeft() || command.moveRight()) {\n var right = command.moveRight();\n for (var offset = i * l + j + (right ? 1 : -1);\n offset >= 0 && offset < maxOffset;\n right ? offset++ : offset--) {\n m = ~~(offset / l);\n n = offset - m * l;\n cell = this.rows[m].cells[n];\n renderable = Backgrid.callByNeed(cell.column.renderable(), cell.column, cell.model);\n editable = Backgrid.callByNeed(cell.column.editable(), cell.column, model);\n if (renderable && editable) {\n cell.enterEditMode();\n model.trigger(\"backgrid:next\", m, n, false);\n break;\n }\n }\n\n if (offset == maxOffset) {\n model.trigger(\"backgrid:next\", ~~(offset / l), offset - m * l, true);\n }\n }\n }\n\n return this;\n }\n});\n\n/*\n backgrid\n http://github.com/cloudflare/backgrid\n\n Copyright (c) 2013-present Cloudflare, Inc. and contributors\n Licensed under the MIT license.\n*/\n\n/**\n A Footer is a generic class that only defines a default tag `tfoot` and\n number of required parameters in the initializer.\n\n @abstract\n @class Backgrid.Footer\n @extends Backbone.View\n */\nvar Footer = Backgrid.Footer = Backbone.View.extend({\n\n /** @property */\n tagName: \"tfoot\",\n\n /**\n Initializer.\n\n @param {Object} options\n @param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns\n Column metadata.\n @param {Backbone.Collection} options.collection\n\n @throws {TypeError} If options.columns or options.collection is undefined.\n */\n initialize: function (options) {\n this.columns = options.columns;\n if (!(this.columns instanceof Backbone.Collection)) {\n this.columns = new Backgrid.Columns(this.columns);\n }\n }\n\n});\n\n/*\n backgrid\n http://github.com/cloudflare/backgrid\n\n Copyright (c) 2013-present Cloudflare, Inc. and contributors\n Licensed under the MIT license.\n*/\n\n/**\n Grid represents a data grid that has a header, body and an optional footer.\n\n By default, a Grid treats each model in a collection as a row, and each\n attribute in a model as a column. To render a grid you must provide a list of\n column metadata and a collection to the Grid constructor. Just like any\n Backbone.View class, the grid is rendered as a DOM node fragment when you\n call render().\n\n var grid = Backgrid.Grid({\n columns: [{ name: \"id\", label: \"ID\", type: \"string\" },\n // ...\n ],\n collections: books\n });\n\n $(\"#table-container\").append(grid.render().el);\n\n Optionally, if you want to customize the rendering of the grid's header and\n footer, you may choose to extend Backgrid.Header and Backgrid.Footer, and\n then supply that class or an instance of that class to the Grid constructor.\n See the documentation for Header and Footer for further details.\n\n var grid = Backgrid.Grid({\n columns: [{ name: \"id\", label: \"ID\", type: \"string\" }],\n collections: books,\n header: Backgrid.Header.extend({\n //...\n }),\n footer: Backgrid.Paginator\n });\n\n Finally, if you want to override how the rows are rendered in the table body,\n you can supply a Body subclass as the `body` attribute that uses a different\n Row class.\n\n @class Backgrid.Grid\n @extends Backbone.View\n\n See:\n\n - Backgrid.Column\n - Backgrid.Header\n - Backgrid.Body\n - Backgrid.Row\n - Backgrid.Footer\n*/\nvar Grid = Backgrid.Grid = Backbone.View.extend({\n\n /** @property */\n tagName: \"table\",\n\n /** @property */\n className: \"backgrid\",\n\n /** @property */\n header: Header,\n\n /** @property */\n body: Body,\n\n /** @property */\n footer: null,\n\n /**\n Initializes a Grid instance.\n\n @param {Object} options\n @param {Backbone.Collection.<Backgrid.Columns>|Array.<Backgrid.Column>|Array.<Object>} options.columns Column metadata.\n @param {Backbone.Collection} options.collection The collection of tabular model data to display.\n @param {string} [options.caption=string] An optional caption to be added to the table.\n @param {Backgrid.Header} [options.header=Backgrid.Header] An optional Header class to override the default.\n @param {Backgrid.Body} [options.body=Backgrid.Body] An optional Body class to override the default.\n @param {Backgrid.Row} [options.row=Backgrid.Row] An optional Row class to override the default.\n @param {Backgrid.Footer} [options.footer=Backgrid.Footer] An optional Footer class.\n */\n initialize: function (options) {\n // Convert the list of column objects here first so the subviews don't have\n // to.\n if (!(options.columns instanceof Backbone.Collection)) {\n options.columns = new Columns(options.columns || this.columns);\n }\n this.columns = options.columns;\n \n this.caption = options.caption;\n\n var filteredOptions = _.omit(options, [\"el\", \"id\", \"attributes\",\n \"className\", \"tagName\", \"events\"]);\n\n // must construct body first so it listens to backgrid:sort first\n this.body = options.body || this.body;\n this.body = new this.body(filteredOptions);\n\n this.header = options.header || this.header;\n if (this.header) {\n this.header = new this.header(filteredOptions);\n }\n\n this.footer = options.footer || this.footer;\n if (this.footer) {\n this.footer = new this.footer(filteredOptions);\n }\n\n this.listenTo(this.columns, \"reset\", function () {\n if (this.header) {\n this.header = new (this.header.remove().constructor)(filteredOptions);\n }\n this.body = new (this.body.remove().constructor)(filteredOptions);\n if (this.footer) {\n this.footer = new (this.footer.remove().constructor)(filteredOptions);\n }\n this.render();\n });\n },\n\n /**\n Delegates to Backgrid.Body#insertRow.\n */\n insertRow: function () {\n this.body.insertRow.apply(this.body, arguments);\n return this;\n },\n\n /**\n Delegates to Backgrid.Body#removeRow.\n */\n removeRow: function () {\n this.body.removeRow.apply(this.body, arguments);\n return this;\n },\n\n /**\n Delegates to Backgrid.Columns#add for adding a column. Subviews can listen\n to the `add` event from their internal `columns` if rerendering needs to\n happen.\n\n @param {Object} [options] Options for `Backgrid.Columns#add`.\n */\n insertColumn: function () {\n this.columns.add.apply(this.columns, arguments);\n return this;\n },\n\n /**\n Delegates to Backgrid.Columns#remove for removing a column. Subviews can\n listen to the `remove` event from the internal `columns` if rerendering\n needs to happen.\n\n @param {Object} [options] Options for `Backgrid.Columns#remove`.\n */\n removeColumn: function () {\n this.columns.remove.apply(this.columns, arguments);\n return this;\n },\n\n /**\n Delegates to Backgrid.Body#sort.\n */\n sort: function () {\n this.body.sort.apply(this.body, arguments);\n return this;\n },\n\n /**\n Renders the grid's caption, then header, then footer, then finally the body. Triggers a\n Backbone `backgrid:rendered` event along with a reference to the grid when\n the it has successfully been rendered.\n */\n render: function () {\n this.$el.empty();\n \n if (this.caption) {\n this.$el.append($(\"<caption>\").text(this.caption));\n }\n\n if (this.header) {\n this.$el.append(this.header.render().$el);\n }\n\n if (this.footer) {\n this.$el.append(this.footer.render().$el);\n }\n\n this.$el.append(this.body.render().$el);\n\n this.delegateEvents();\n\n this.trigger(\"backgrid:rendered\", this);\n\n return this;\n },\n\n /**\n Clean up this grid and its subviews.\n\n @chainable\n */\n remove: function () {\n this.header && this.header.remove.apply(this.header, arguments);\n this.body.remove.apply(this.body, arguments);\n this.footer && this.footer.remove.apply(this.footer, arguments);\n return Backbone.View.prototype.remove.apply(this, arguments);\n }\n\n});\n return Backgrid;\n}));","/*!\n * Bootstrap v3.3.5 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under the MIT license\n */\n\nif (typeof jQuery === 'undefined') {\n throw new Error('Bootstrap\\'s JavaScript requires jQuery')\n}\n\n+function ($) {\n 'use strict';\n var version = $.fn.jquery.split(' ')[0].split('.')\n if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {\n throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher')\n }\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: transition.js v3.3.5\n * http://getbootstrap.com/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)\n // ============================================================\n\n function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition : 'webkitTransitionEnd',\n MozTransition : 'transitionend',\n OTransition : 'oTransitionEnd otransitionend',\n transition : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }\n\n // http://blog.alexmaccaw.com/css-transitions\n $.fn.emulateTransitionEnd = function (duration) {\n var called = false\n var $el = this\n $(this).one('bsTransitionEnd', function () { called = true })\n var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n setTimeout(callback, duration)\n return this\n }\n\n $(function () {\n $.support.transition = transitionEnd()\n\n if (!$.support.transition) return\n\n $.event.special.bsTransitionEnd = {\n bindType: $.support.transition.end,\n delegateType: $.support.transition.end,\n handle: function (e) {\n if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n }\n }\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: alert.js v3.3.5\n * http://getbootstrap.com/javascript/#alerts\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // ALERT CLASS DEFINITION\n // ======================\n\n var dismiss = '[data-dismiss=\"alert\"]'\n var Alert = function (el) {\n $(el).on('click', dismiss, this.close)\n }\n\n Alert.VERSION = '3.3.5'\n\n Alert.TRANSITION_DURATION = 150\n\n Alert.prototype.close = function (e) {\n var $this = $(this)\n var selector = $this.attr('data-target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n }\n\n var $parent = $(selector)\n\n if (e) e.preventDefault()\n\n if (!$parent.length) {\n $parent = $this.closest('.alert')\n }\n\n $parent.trigger(e = $.Event('close.bs.alert'))\n\n if (e.isDefaultPrevented()) return\n\n $parent.removeClass('in')\n\n function removeElement() {\n // detach from parent, fire event then clean up data\n $parent.detach().trigger('closed.bs.alert').remove()\n }\n\n $.support.transition && $parent.hasClass('fade') ?\n $parent\n .one('bsTransitionEnd', removeElement)\n .emulateTransitionEnd(Alert.TRANSITION_DURATION) :\n removeElement()\n }\n\n\n // ALERT PLUGIN DEFINITION\n // =======================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.alert')\n\n if (!data) $this.data('bs.alert', (data = new Alert(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.alert\n\n $.fn.alert = Plugin\n $.fn.alert.Constructor = Alert\n\n\n // ALERT NO CONFLICT\n // =================\n\n $.fn.alert.noConflict = function () {\n $.fn.alert = old\n return this\n }\n\n\n // ALERT DATA-API\n // ==============\n\n $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: button.js v3.3.5\n * http://getbootstrap.com/javascript/#buttons\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // BUTTON PUBLIC CLASS DEFINITION\n // ==============================\n\n var Button = function (element, options) {\n this.$element = $(element)\n this.options = $.extend({}, Button.DEFAULTS, options)\n this.isLoading = false\n }\n\n Button.VERSION = '3.3.5'\n\n Button.DEFAULTS = {\n loadingText: 'loading...'\n }\n\n Button.prototype.setState = function (state) {\n var d = 'disabled'\n var $el = this.$element\n var val = $el.is('input') ? 'val' : 'html'\n var data = $el.data()\n\n state += 'Text'\n\n if (data.resetText == null) $el.data('resetText', $el[val]())\n\n // push to event loop to allow forms to submit\n setTimeout($.proxy(function () {\n $el[val](data[state] == null ? this.options[state] : data[state])\n\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\n Button.prototype.toggle = function () {\n var changed = true\n var $parent = this.$element.closest('[data-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')) changed = false\n $parent.find('.active').removeClass('active')\n this.$element.addClass('active')\n } else if ($input.prop('type') == 'checkbox') {\n if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false\n this.$element.toggleClass('active')\n }\n $input.prop('checked', this.$element.hasClass('active'))\n if (changed) $input.trigger('change')\n } else {\n this.$element.attr('aria-pressed', !this.$element.hasClass('active'))\n this.$element.toggleClass('active')\n }\n }\n\n\n // BUTTON PLUGIN DEFINITION\n // ========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.button')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('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 var old = $.fn.button\n\n $.fn.button = Plugin\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)\n .on('click.bs.button.data-api', '[data-toggle^=\"button\"]', function (e) {\n var $btn = $(e.target)\n if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')\n Plugin.call($btn, 'toggle')\n if (!($(e.target).is('input[type=\"radio\"]') || $(e.target).is('input[type=\"checkbox\"]'))) e.preventDefault()\n })\n .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^=\"button\"]', function (e) {\n $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: carousel.js v3.3.5\n * http://getbootstrap.com/javascript/#carousel\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CAROUSEL CLASS DEFINITION\n // =========================\n\n var Carousel = function (element, options) {\n this.$element = $(element)\n this.$indicators = this.$element.find('.carousel-indicators')\n this.options = options\n this.paused = null\n this.sliding = null\n this.interval = null\n this.$active = null\n this.$items = null\n\n this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))\n\n this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element\n .on('mouseenter.bs.carousel', $.proxy(this.pause, this))\n .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))\n }\n\n Carousel.VERSION = '3.3.5'\n\n Carousel.TRANSITION_DURATION = 600\n\n Carousel.DEFAULTS = {\n interval: 5000,\n pause: 'hover',\n wrap: true,\n keyboard: true\n }\n\n Carousel.prototype.keydown = function (e) {\n if (/input|textarea/i.test(e.target.tagName)) return\n switch (e.which) {\n case 37: this.prev(); break\n case 39: this.next(); break\n default: return\n }\n\n e.preventDefault()\n }\n\n Carousel.prototype.cycle = function (e) {\n e || (this.paused = false)\n\n this.interval && clearInterval(this.interval)\n\n this.options.interval\n && !this.paused\n && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))\n\n return this\n }\n\n Carousel.prototype.getItemIndex = function (item) {\n this.$items = item.parent().children('.item')\n return this.$items.index(item || this.$active)\n }\n\n Carousel.prototype.getItemForDirection = function (direction, active) {\n var activeIndex = this.getItemIndex(active)\n var willWrap = (direction == 'prev' && activeIndex === 0)\n || (direction == 'next' && activeIndex == (this.$items.length - 1))\n if (willWrap && !this.options.wrap) return active\n var delta = direction == 'prev' ? -1 : 1\n var itemIndex = (activeIndex + delta) % this.$items.length\n return this.$items.eq(itemIndex)\n }\n\n Carousel.prototype.to = function (pos) {\n var that = this\n var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))\n\n if (pos > (this.$items.length - 1) || pos < 0) return\n\n if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, \"slid\"\n if (activeIndex == pos) return this.pause().cycle()\n\n return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))\n }\n\n Carousel.prototype.pause = function (e) {\n e || (this.paused = true)\n\n if (this.$element.find('.next, .prev').length && $.support.transition) {\n this.$element.trigger($.support.transition.end)\n this.cycle(true)\n }\n\n this.interval = clearInterval(this.interval)\n\n return this\n }\n\n Carousel.prototype.next = function () {\n if (this.sliding) return\n return this.slide('next')\n }\n\n Carousel.prototype.prev = function () {\n if (this.sliding) return\n return this.slide('prev')\n }\n\n Carousel.prototype.slide = function (type, next) {\n var $active = this.$element.find('.item.active')\n var $next = next || this.getItemForDirection(type, $active)\n var isCycling = this.interval\n var direction = type == 'next' ? 'left' : 'right'\n var that = this\n\n if ($next.hasClass('active')) return (this.sliding = false)\n\n var relatedTarget = $next[0]\n var slideEvent = $.Event('slide.bs.carousel', {\n relatedTarget: relatedTarget,\n direction: direction\n })\n this.$element.trigger(slideEvent)\n if (slideEvent.isDefaultPrevented()) return\n\n this.sliding = true\n\n isCycling && this.pause()\n\n if (this.$indicators.length) {\n this.$indicators.find('.active').removeClass('active')\n var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])\n $nextIndicator && $nextIndicator.addClass('active')\n }\n\n var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, \"slid\"\n if ($.support.transition && this.$element.hasClass('slide')) {\n $next.addClass(type)\n $next[0].offsetWidth // force reflow\n $active.addClass(direction)\n $next.addClass(direction)\n $active\n .one('bsTransitionEnd', function () {\n $next.removeClass([type, direction].join(' ')).addClass('active')\n $active.removeClass(['active', direction].join(' '))\n that.sliding = false\n setTimeout(function () {\n that.$element.trigger(slidEvent)\n }, 0)\n })\n .emulateTransitionEnd(Carousel.TRANSITION_DURATION)\n } else {\n $active.removeClass('active')\n $next.addClass('active')\n this.sliding = false\n this.$element.trigger(slidEvent)\n }\n\n isCycling && this.cycle()\n\n return this\n }\n\n\n // CAROUSEL PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.carousel')\n var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n var action = typeof option == 'string' ? option : options.slide\n\n if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n if (typeof option == 'number') data.to(option)\n else if (action) data[action]()\n else if (options.interval) data.pause().cycle()\n })\n }\n\n var old = $.fn.carousel\n\n $.fn.carousel = Plugin\n $.fn.carousel.Constructor = Carousel\n\n\n // CAROUSEL NO CONFLICT\n // ====================\n\n $.fn.carousel.noConflict = function () {\n $.fn.carousel = old\n return this\n }\n\n\n // CAROUSEL DATA-API\n // =================\n\n var clickHandler = function (e) {\n var href\n var $this = $(this)\n var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '')) // strip for ie7\n if (!$target.hasClass('carousel')) return\n var options = $.extend({}, $target.data(), $this.data())\n var slideIndex = $this.attr('data-slide-to')\n if (slideIndex) options.interval = false\n\n Plugin.call($target, options)\n\n if (slideIndex) {\n $target.data('bs.carousel').to(slideIndex)\n }\n\n e.preventDefault()\n }\n\n $(document)\n .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)\n .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)\n\n $(window).on('load', function () {\n $('[data-ride=\"carousel\"]').each(function () {\n var $carousel = $(this)\n Plugin.call($carousel, $carousel.data())\n })\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: collapse.js v3.3.5\n * http://getbootstrap.com/javascript/#collapse\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // COLLAPSE PUBLIC CLASS DEFINITION\n // ================================\n\n var Collapse = function (element, options) {\n this.$element = $(element)\n this.options = $.extend({}, Collapse.DEFAULTS, options)\n this.$trigger = $('[data-toggle=\"collapse\"][href=\"#' + element.id + '\"],' +\n '[data-toggle=\"collapse\"][data-target=\"#' + element.id + '\"]')\n this.transitioning = null\n\n if (this.options.parent) {\n this.$parent = this.getParent()\n } else {\n this.addAriaAndCollapsedClass(this.$element, this.$trigger)\n }\n\n if (this.options.toggle) this.toggle()\n }\n\n Collapse.VERSION = '3.3.5'\n\n Collapse.TRANSITION_DURATION = 350\n\n Collapse.DEFAULTS = {\n toggle: true\n }\n\n Collapse.prototype.dimension = function () {\n var hasWidth = this.$element.hasClass('width')\n return hasWidth ? 'width' : 'height'\n }\n\n Collapse.prototype.show = function () {\n if (this.transitioning || this.$element.hasClass('in')) return\n\n var activesData\n var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')\n\n if (actives && actives.length) {\n activesData = actives.data('bs.collapse')\n if (activesData && activesData.transitioning) return\n }\n\n var startEvent = $.Event('show.bs.collapse')\n this.$element.trigger(startEvent)\n if (startEvent.isDefaultPrevented()) return\n\n if (actives && actives.length) {\n Plugin.call(actives, 'hide')\n activesData || actives.data('bs.collapse', null)\n }\n\n var dimension = this.dimension()\n\n this.$element\n .removeClass('collapse')\n .addClass('collapsing')[dimension](0)\n .attr('aria-expanded', true)\n\n this.$trigger\n .removeClass('collapsed')\n .attr('aria-expanded', true)\n\n this.transitioning = 1\n\n var complete = function () {\n this.$element\n .removeClass('collapsing')\n .addClass('collapse in')[dimension]('')\n this.transitioning = 0\n this.$element\n .trigger('shown.bs.collapse')\n }\n\n if (!$.support.transition) return complete.call(this)\n\n var scrollSize = $.camelCase(['scroll', dimension].join('-'))\n\n this.$element\n .one('bsTransitionEnd', $.proxy(complete, this))\n .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])\n }\n\n Collapse.prototype.hide = function () {\n if (this.transitioning || !this.$element.hasClass('in')) return\n\n var startEvent = $.Event('hide.bs.collapse')\n this.$element.trigger(startEvent)\n if (startEvent.isDefaultPrevented()) return\n\n var dimension = this.dimension()\n\n this.$element[dimension](this.$element[dimension]())[0].offsetHeight\n\n this.$element\n .addClass('collapsing')\n .removeClass('collapse in')\n .attr('aria-expanded', false)\n\n this.$trigger\n .addClass('collapsed')\n .attr('aria-expanded', false)\n\n this.transitioning = 1\n\n var complete = function () {\n this.transitioning = 0\n this.$element\n .removeClass('collapsing')\n .addClass('collapse')\n .trigger('hidden.bs.collapse')\n }\n\n if (!$.support.transition) return complete.call(this)\n\n this.$element\n [dimension](0)\n .one('bsTransitionEnd', $.proxy(complete, this))\n .emulateTransitionEnd(Collapse.TRANSITION_DURATION)\n }\n\n Collapse.prototype.toggle = function () {\n this[this.$element.hasClass('in') ? 'hide' : 'show']()\n }\n\n Collapse.prototype.getParent = function () {\n return $(this.options.parent)\n .find('[data-toggle=\"collapse\"][data-parent=\"' + this.options.parent + '\"]')\n .each($.proxy(function (i, element) {\n var $element = $(element)\n this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)\n }, this))\n .end()\n }\n\n Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {\n var isOpen = $element.hasClass('in')\n\n $element.attr('aria-expanded', isOpen)\n $trigger\n .toggleClass('collapsed', !isOpen)\n .attr('aria-expanded', isOpen)\n }\n\n function getTargetFromTrigger($trigger) {\n var href\n var target = $trigger.attr('data-target')\n || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '') // strip for ie7\n\n return $(target)\n }\n\n\n // COLLAPSE PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.collapse\n\n $.fn.collapse = Plugin\n $.fn.collapse.Constructor = Collapse\n\n\n // COLLAPSE NO CONFLICT\n // ====================\n\n $.fn.collapse.noConflict = function () {\n $.fn.collapse = old\n return this\n }\n\n\n // COLLAPSE DATA-API\n // =================\n\n $(document).on('click.bs.collapse.data-api', '[data-toggle=\"collapse\"]', function (e) {\n var $this = $(this)\n\n if (!$this.attr('data-target')) e.preventDefault()\n\n var $target = getTargetFromTrigger($this)\n var data = $target.data('bs.collapse')\n var option = data ? 'toggle' : $this.data()\n\n Plugin.call($target, option)\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: dropdown.js v3.3.5\n * http://getbootstrap.com/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // DROPDOWN CLASS DEFINITION\n // =========================\n\n var backdrop = '.dropdown-backdrop'\n var toggle = '[data-toggle=\"dropdown\"]'\n var Dropdown = function (element) {\n $(element).on('click.bs.dropdown', this.toggle)\n }\n\n Dropdown.VERSION = '3.3.5'\n\n function getParent($this) {\n var selector = $this.attr('data-target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n }\n\n var $parent = selector && $(selector)\n\n return $parent && $parent.length ? $parent : $this.parent()\n }\n\n function clearMenus(e) {\n if (e && e.which === 3) return\n $(backdrop).remove()\n $(toggle).each(function () {\n var $this = $(this)\n var $parent = getParent($this)\n var relatedTarget = { relatedTarget: this }\n\n if (!$parent.hasClass('open')) return\n\n if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n if (e.isDefaultPrevented()) return\n\n $this.attr('aria-expanded', 'false')\n $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)\n })\n }\n\n Dropdown.prototype.toggle = function (e) {\n var $this = $(this)\n\n if ($this.is('.disabled, :disabled')) return\n\n var $parent = getParent($this)\n var isActive = $parent.hasClass('open')\n\n clearMenus()\n\n if (!isActive) {\n if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n // if mobile we use a backdrop because click events don't delegate\n $(document.createElement('div'))\n .addClass('dropdown-backdrop')\n .insertAfter($(this))\n .on('click', clearMenus)\n }\n\n var relatedTarget = { relatedTarget: this }\n $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n if (e.isDefaultPrevented()) return\n\n $this\n .trigger('focus')\n .attr('aria-expanded', 'true')\n\n $parent\n .toggleClass('open')\n .trigger('shown.bs.dropdown', relatedTarget)\n }\n\n return false\n }\n\n Dropdown.prototype.keydown = function (e) {\n if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n var $this = $(this)\n\n e.preventDefault()\n e.stopPropagation()\n\n if ($this.is('.disabled, :disabled')) return\n\n var $parent = getParent($this)\n var isActive = $parent.hasClass('open')\n\n if (!isActive && e.which != 27 || isActive && e.which == 27) {\n if (e.which == 27) $parent.find(toggle).trigger('focus')\n return $this.trigger('click')\n }\n\n var desc = ' li:not(.disabled):visible a'\n var $items = $parent.find('.dropdown-menu' + desc)\n\n if (!$items.length) return\n\n var index = $items.index(e.target)\n\n if (e.which == 38 && index > 0) index-- // up\n if (e.which == 40 && index < $items.length - 1) index++ // down\n if (!~index) index = 0\n\n $items.eq(index).trigger('focus')\n }\n\n\n // DROPDOWN PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.dropdown\n\n $.fn.dropdown = Plugin\n $.fn.dropdown.Constructor = Dropdown\n\n\n // DROPDOWN NO CONFLICT\n // ====================\n\n $.fn.dropdown.noConflict = function () {\n $.fn.dropdown = old\n return this\n }\n\n\n // APPLY TO STANDARD DROPDOWN ELEMENTS\n // ===================================\n\n $(document)\n .on('click.bs.dropdown.data-api', clearMenus)\n .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: modal.js v3.3.5\n * http://getbootstrap.com/javascript/#modals\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // MODAL CLASS DEFINITION\n // ======================\n\n var Modal = function (element, options) {\n this.options = options\n this.$body = $(document.body)\n this.$element = $(element)\n this.$dialog = this.$element.find('.modal-dialog')\n this.$backdrop = null\n this.isShown = null\n this.originalBodyPad = null\n this.scrollbarWidth = 0\n this.ignoreBackdropClick = false\n\n if (this.options.remote) {\n this.$element\n .find('.modal-content')\n .load(this.options.remote, $.proxy(function () {\n this.$element.trigger('loaded.bs.modal')\n }, this))\n }\n }\n\n Modal.VERSION = '3.3.5'\n\n Modal.TRANSITION_DURATION = 300\n Modal.BACKDROP_TRANSITION_DURATION = 150\n\n Modal.DEFAULTS = {\n backdrop: true,\n keyboard: true,\n show: true\n }\n\n Modal.prototype.toggle = function (_relatedTarget) {\n return this.isShown ? this.hide() : this.show(_relatedTarget)\n }\n\n Modal.prototype.show = function (_relatedTarget) {\n var that = this\n var e = $.Event('show.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.checkScrollbar()\n this.setScrollbar()\n this.$body.addClass('modal-open')\n\n this.escape()\n this.resize()\n\n this.$element.on('click.dismiss.bs.modal', '[data-dismiss=\"modal\"]', $.proxy(this.hide, this))\n\n this.$dialog.on('mousedown.dismiss.bs.modal', function () {\n that.$element.one('mouseup.dismiss.bs.modal', function (e) {\n if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true\n })\n })\n\n this.backdrop(function () {\n var transition = $.support.transition && that.$element.hasClass('fade')\n\n if (!that.$element.parent().length) {\n that.$element.appendTo(that.$body) // don't move modals dom position\n }\n\n that.$element\n .show()\n .scrollTop(0)\n\n that.adjustDialog()\n\n if (transition) {\n that.$element[0].offsetWidth // force reflow\n }\n\n that.$element.addClass('in')\n\n that.enforceFocus()\n\n var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })\n\n transition ?\n that.$dialog // wait for modal to slide in\n .one('bsTransitionEnd', function () {\n that.$element.trigger('focus').trigger(e)\n })\n .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n that.$element.trigger('focus').trigger(e)\n })\n }\n\n Modal.prototype.hide = function (e) {\n if (e) e.preventDefault()\n\n e = $.Event('hide.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 this.resize()\n\n $(document).off('focusin.bs.modal')\n\n this.$element\n .removeClass('in')\n .off('click.dismiss.bs.modal')\n .off('mouseup.dismiss.bs.modal')\n\n this.$dialog.off('mousedown.dismiss.bs.modal')\n\n $.support.transition && this.$element.hasClass('fade') ?\n this.$element\n .one('bsTransitionEnd', $.proxy(this.hideModal, this))\n .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n this.hideModal()\n }\n\n Modal.prototype.enforceFocus = function () {\n $(document)\n .off('focusin.bs.modal') // guard against infinite focus loop\n .on('focusin.bs.modal', $.proxy(function (e) {\n if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {\n this.$element.trigger('focus')\n }\n }, this))\n }\n\n Modal.prototype.escape = function () {\n if (this.isShown && this.options.keyboard) {\n this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {\n e.which == 27 && this.hide()\n }, this))\n } else if (!this.isShown) {\n this.$element.off('keydown.dismiss.bs.modal')\n }\n }\n\n Modal.prototype.resize = function () {\n if (this.isShown) {\n $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))\n } else {\n $(window).off('resize.bs.modal')\n }\n }\n\n Modal.prototype.hideModal = function () {\n var that = this\n this.$element.hide()\n this.backdrop(function () {\n that.$body.removeClass('modal-open')\n that.resetAdjustments()\n that.resetScrollbar()\n that.$element.trigger('hidden.bs.modal')\n })\n }\n\n Modal.prototype.removeBackdrop = function () {\n this.$backdrop && this.$backdrop.remove()\n this.$backdrop = null\n }\n\n Modal.prototype.backdrop = function (callback) {\n var that = this\n var animate = this.$element.hasClass('fade') ? 'fade' : ''\n\n if (this.isShown && this.options.backdrop) {\n var doAnimate = $.support.transition && animate\n\n this.$backdrop = $(document.createElement('div'))\n .addClass('modal-backdrop ' + animate)\n .appendTo(this.$body)\n\n this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {\n if (this.ignoreBackdropClick) {\n this.ignoreBackdropClick = false\n return\n }\n if (e.target !== e.currentTarget) return\n this.options.backdrop == 'static'\n ? this.$element[0].focus()\n : this.hide()\n }, this))\n\n if (doAnimate) this.$backdrop[0].offsetWidth // force reflow\n\n this.$backdrop.addClass('in')\n\n if (!callback) return\n\n doAnimate ?\n this.$backdrop\n .one('bsTransitionEnd', callback)\n .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n callback()\n\n } else if (!this.isShown && this.$backdrop) {\n this.$backdrop.removeClass('in')\n\n var callbackRemove = function () {\n that.removeBackdrop()\n callback && callback()\n }\n $.support.transition && this.$element.hasClass('fade') ?\n this.$backdrop\n .one('bsTransitionEnd', callbackRemove)\n .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n callbackRemove()\n\n } else if (callback) {\n callback()\n }\n }\n\n // these following methods are used to handle overflowing modals\n\n Modal.prototype.handleUpdate = function () {\n this.adjustDialog()\n }\n\n Modal.prototype.adjustDialog = function () {\n var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight\n\n this.$element.css({\n paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',\n paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''\n })\n }\n\n Modal.prototype.resetAdjustments = function () {\n this.$element.css({\n paddingLeft: '',\n paddingRight: ''\n })\n }\n\n Modal.prototype.checkScrollbar = function () {\n var fullWindowWidth = window.innerWidth\n if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\n var documentElementRect = document.documentElement.getBoundingClientRect()\n fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)\n }\n this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth\n this.scrollbarWidth = this.measureScrollbar()\n }\n\n Modal.prototype.setScrollbar = function () {\n var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)\n this.originalBodyPad = document.body.style.paddingRight || ''\n if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)\n }\n\n Modal.prototype.resetScrollbar = function () {\n this.$body.css('padding-right', this.originalBodyPad)\n }\n\n Modal.prototype.measureScrollbar = function () { // thx walsh\n var scrollDiv = document.createElement('div')\n scrollDiv.className = 'modal-scrollbar-measure'\n this.$body.append(scrollDiv)\n var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n this.$body[0].removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n\n // MODAL PLUGIN DEFINITION\n // =======================\n\n function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('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 var old = $.fn.modal\n\n $.fn.modal = Plugin\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.bs.modal.data-api', '[data-toggle=\"modal\"]', function (e) {\n var $this = $(this)\n var href = $this.attr('href')\n var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\\s]+$)/, ''))) // strip for ie7\n var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())\n\n if ($this.is('a')) e.preventDefault()\n\n $target.one('show.bs.modal', function (showEvent) {\n if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown\n $target.one('hidden.bs.modal', function () {\n $this.is(':visible') && $this.trigger('focus')\n })\n })\n Plugin.call($target, option, this)\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: tooltip.js v3.3.5\n * http://getbootstrap.com/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // TOOLTIP PUBLIC CLASS DEFINITION\n // ===============================\n\n var Tooltip = function (element, options) {\n this.type = null\n this.options = null\n this.enabled = null\n this.timeout = null\n this.hoverState = null\n this.$element = null\n this.inState = null\n\n this.init('tooltip', element, options)\n }\n\n Tooltip.VERSION = '3.3.5'\n\n Tooltip.TRANSITION_DURATION = 150\n\n Tooltip.DEFAULTS = {\n animation: true,\n placement: 'top',\n selector: false,\n template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n container: false,\n viewport: {\n selector: 'body',\n padding: 0\n }\n }\n\n Tooltip.prototype.init = function (type, element, options) {\n this.enabled = true\n this.type = type\n this.$element = $(element)\n this.options = this.getOptions(options)\n this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))\n this.inState = { click: false, hover: false, focus: false }\n\n if (this.$element[0] instanceof document.constructor && !this.options.selector) {\n throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\n }\n\n var triggers = this.options.trigger.split(' ')\n\n for (var i = triggers.length; i--;) {\n var trigger = triggers[i]\n\n if (trigger == 'click') {\n this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n } else if (trigger != 'manual') {\n var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'\n var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\n\n this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n }\n }\n\n this.options.selector ?\n (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n this.fixTitle()\n }\n\n Tooltip.prototype.getDefaults = function () {\n return Tooltip.DEFAULTS\n }\n\n Tooltip.prototype.getOptions = function (options) {\n options = $.extend({}, this.getDefaults(), this.$element.data(), options)\n\n if (options.delay && typeof options.delay == 'number') {\n options.delay = {\n show: options.delay,\n hide: options.delay\n }\n }\n\n return options\n }\n\n Tooltip.prototype.getDelegateOptions = function () {\n var options = {}\n var defaults = this.getDefaults()\n\n this._options && $.each(this._options, function (key, value) {\n if (defaults[key] != value) options[key] = value\n })\n\n return options\n }\n\n Tooltip.prototype.enter = function (obj) {\n var self = obj instanceof this.constructor ?\n obj : $(obj.currentTarget).data('bs.' + this.type)\n\n if (!self) {\n self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n $(obj.currentTarget).data('bs.' + this.type, self)\n }\n\n if (obj instanceof $.Event) {\n self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true\n }\n\n if (self.tip().hasClass('in') || self.hoverState == 'in') {\n self.hoverState = 'in'\n return\n }\n\n clearTimeout(self.timeout)\n\n self.hoverState = 'in'\n\n if (!self.options.delay || !self.options.delay.show) return self.show()\n\n self.timeout = setTimeout(function () {\n if (self.hoverState == 'in') self.show()\n }, self.options.delay.show)\n }\n\n Tooltip.prototype.isInStateTrue = function () {\n for (var key in this.inState) {\n if (this.inState[key]) return true\n }\n\n return false\n }\n\n Tooltip.prototype.leave = function (obj) {\n var self = obj instanceof this.constructor ?\n obj : $(obj.currentTarget).data('bs.' + this.type)\n\n if (!self) {\n self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n $(obj.currentTarget).data('bs.' + this.type, self)\n }\n\n if (obj instanceof $.Event) {\n self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false\n }\n\n if (self.isInStateTrue()) return\n\n clearTimeout(self.timeout)\n\n self.hoverState = 'out'\n\n if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n self.timeout = setTimeout(function () {\n if (self.hoverState == 'out') self.hide()\n }, self.options.delay.hide)\n }\n\n Tooltip.prototype.show = function () {\n var e = $.Event('show.bs.' + this.type)\n\n if (this.hasContent() && this.enabled) {\n this.$element.trigger(e)\n\n var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\n if (e.isDefaultPrevented() || !inDom) return\n var that = this\n\n var $tip = this.tip()\n\n var tipId = this.getUID(this.type)\n\n this.setContent()\n $tip.attr('id', tipId)\n this.$element.attr('aria-describedby', tipId)\n\n if (this.options.animation) $tip.addClass('fade')\n\n var placement = typeof this.options.placement == 'function' ?\n this.options.placement.call(this, $tip[0], this.$element[0]) :\n this.options.placement\n\n var autoToken = /\\s?auto?\\s?/i\n var autoPlace = autoToken.test(placement)\n if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n $tip\n .detach()\n .css({ top: 0, left: 0, display: 'block' })\n .addClass(placement)\n .data('bs.' + this.type, this)\n\n this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)\n this.$element.trigger('inserted.bs.' + this.type)\n\n var pos = this.getPosition()\n var actualWidth = $tip[0].offsetWidth\n var actualHeight = $tip[0].offsetHeight\n\n if (autoPlace) {\n var orgPlacement = placement\n var viewportDim = this.getPosition(this.$viewport)\n\n placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :\n placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :\n placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :\n placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :\n placement\n\n $tip\n .removeClass(orgPlacement)\n .addClass(placement)\n }\n\n var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n this.applyPlacement(calculatedOffset, placement)\n\n var complete = function () {\n var prevHoverState = that.hoverState\n that.$element.trigger('shown.bs.' + that.type)\n that.hoverState = null\n\n if (prevHoverState == 'out') that.leave(that)\n }\n\n $.support.transition && this.$tip.hasClass('fade') ?\n $tip\n .one('bsTransitionEnd', complete)\n .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n complete()\n }\n }\n\n Tooltip.prototype.applyPlacement = function (offset, placement) {\n var $tip = this.tip()\n var width = $tip[0].offsetWidth\n var height = $tip[0].offsetHeight\n\n // manually read margins because getBoundingClientRect includes difference\n var marginTop = parseInt($tip.css('margin-top'), 10)\n var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n // we must check for NaN for ie 8/9\n if (isNaN(marginTop)) marginTop = 0\n if (isNaN(marginLeft)) marginLeft = 0\n\n offset.top += marginTop\n offset.left += marginLeft\n\n // $.fn.offset doesn't round pixel values\n // so we use setOffset directly with our own function B-0\n $.offset.setOffset($tip[0], $.extend({\n using: function (props) {\n $tip.css({\n top: Math.round(props.top),\n left: Math.round(props.left)\n })\n }\n }, offset), 0)\n\n $tip.addClass('in')\n\n // check to see if placing tip in new offset caused the tip to resize itself\n var actualWidth = $tip[0].offsetWidth\n var actualHeight = $tip[0].offsetHeight\n\n if (placement == 'top' && actualHeight != height) {\n offset.top = offset.top + height - actualHeight\n }\n\n var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\n\n if (delta.left) offset.left += delta.left\n else offset.top += delta.top\n\n var isVertical = /top|bottom/.test(placement)\n var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\n var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\n\n $tip.offset(offset)\n this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\n }\n\n Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\n this.arrow()\n .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\n .css(isVertical ? 'top' : 'left', '')\n }\n\n Tooltip.prototype.setContent = function () {\n var $tip = this.tip()\n var title = this.getTitle()\n\n $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)\n $tip.removeClass('fade in top bottom left right')\n }\n\n Tooltip.prototype.hide = function (callback) {\n var that = this\n var $tip = $(this.$tip)\n var e = $.Event('hide.bs.' + this.type)\n\n function complete() {\n if (that.hoverState != 'in') $tip.detach()\n that.$element\n .removeAttr('aria-describedby')\n .trigger('hidden.bs.' + that.type)\n callback && callback()\n }\n\n this.$element.trigger(e)\n\n if (e.isDefaultPrevented()) return\n\n $tip.removeClass('in')\n\n $.support.transition && $tip.hasClass('fade') ?\n $tip\n .one('bsTransitionEnd', complete)\n .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n complete()\n\n this.hoverState = null\n\n return this\n }\n\n Tooltip.prototype.fixTitle = function () {\n var $e = this.$element\n if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {\n $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n }\n }\n\n Tooltip.prototype.hasContent = function () {\n return this.getTitle()\n }\n\n Tooltip.prototype.getPosition = function ($element) {\n $element = $element || this.$element\n\n var el = $element[0]\n var isBody = el.tagName == 'BODY'\n\n var elRect = el.getBoundingClientRect()\n if (elRect.width == null) {\n // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\n elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\n }\n var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()\n var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\n var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\n\n return $.extend({}, elRect, scroll, outerDims, elOffset)\n }\n\n Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\n\n }\n\n Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\n var delta = { top: 0, left: 0 }\n if (!this.$viewport) return delta\n\n var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\n var viewportDimensions = this.getPosition(this.$viewport)\n\n if (/right|left/.test(placement)) {\n var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll\n var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\n if (topEdgeOffset < viewportDimensions.top) { // top overflow\n delta.top = viewportDimensions.top - topEdgeOffset\n } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\n delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\n }\n } else {\n var leftEdgeOffset = pos.left - viewportPadding\n var rightEdgeOffset = pos.left + viewportPadding + actualWidth\n if (leftEdgeOffset < viewportDimensions.left) { // left overflow\n delta.left = viewportDimensions.left - leftEdgeOffset\n } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow\n delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\n }\n }\n\n return delta\n }\n\n Tooltip.prototype.getTitle = function () {\n var title\n var $e = this.$element\n var o = this.options\n\n title = $e.attr('data-original-title')\n || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)\n\n return title\n }\n\n Tooltip.prototype.getUID = function (prefix) {\n do prefix += ~~(Math.random() * 1000000)\n while (document.getElementById(prefix))\n return prefix\n }\n\n Tooltip.prototype.tip = function () {\n if (!this.$tip) {\n this.$tip = $(this.options.template)\n if (this.$tip.length != 1) {\n throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')\n }\n }\n return this.$tip\n }\n\n Tooltip.prototype.arrow = function () {\n return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\n }\n\n Tooltip.prototype.enable = function () {\n this.enabled = true\n }\n\n Tooltip.prototype.disable = function () {\n this.enabled = false\n }\n\n Tooltip.prototype.toggleEnabled = function () {\n this.enabled = !this.enabled\n }\n\n Tooltip.prototype.toggle = function (e) {\n var self = this\n if (e) {\n self = $(e.currentTarget).data('bs.' + this.type)\n if (!self) {\n self = new this.constructor(e.currentTarget, this.getDelegateOptions())\n $(e.currentTarget).data('bs.' + this.type, self)\n }\n }\n\n if (e) {\n self.inState.click = !self.inState.click\n if (self.isInStateTrue()) self.enter(self)\n else self.leave(self)\n } else {\n self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n }\n }\n\n Tooltip.prototype.destroy = function () {\n var that = this\n clearTimeout(this.timeout)\n this.hide(function () {\n that.$element.off('.' + that.type).removeData('bs.' + that.type)\n if (that.$tip) {\n that.$tip.detach()\n }\n that.$tip = null\n that.$arrow = null\n that.$viewport = null\n })\n }\n\n\n // TOOLTIP PLUGIN DEFINITION\n // =========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tooltip')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.tooltip\n\n $.fn.tooltip = Plugin\n $.fn.tooltip.Constructor = Tooltip\n\n\n // TOOLTIP NO CONFLICT\n // ===================\n\n $.fn.tooltip.noConflict = function () {\n $.fn.tooltip = old\n return this\n }\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: popover.js v3.3.5\n * http://getbootstrap.com/javascript/#popovers\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // POPOVER PUBLIC CLASS DEFINITION\n // ===============================\n\n var Popover = function (element, options) {\n this.init('popover', element, options)\n }\n\n if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')\n\n Popover.VERSION = '3.3.5'\n\n Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {\n placement: 'right',\n trigger: 'click',\n content: '',\n template: '<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'\n })\n\n\n // NOTE: POPOVER EXTENDS tooltip.js\n // ================================\n\n Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)\n\n Popover.prototype.constructor = Popover\n\n Popover.prototype.getDefaults = function () {\n return Popover.DEFAULTS\n }\n\n Popover.prototype.setContent = function () {\n var $tip = this.tip()\n var title = this.getTitle()\n var content = this.getContent()\n\n $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)\n $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events\n this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'\n ](content)\n\n $tip.removeClass('fade top bottom left right in')\n\n // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do\n // this manually by checking the contents.\n if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()\n }\n\n Popover.prototype.hasContent = function () {\n return this.getTitle() || this.getContent()\n }\n\n Popover.prototype.getContent = function () {\n var $e = this.$element\n var o = this.options\n\n return $e.attr('data-content')\n || (typeof o.content == 'function' ?\n o.content.call($e[0]) :\n o.content)\n }\n\n Popover.prototype.arrow = function () {\n return (this.$arrow = this.$arrow || this.tip().find('.arrow'))\n }\n\n\n // POPOVER PLUGIN DEFINITION\n // =========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.popover\n\n $.fn.popover = Plugin\n $.fn.popover.Constructor = Popover\n\n\n // POPOVER NO CONFLICT\n // ===================\n\n $.fn.popover.noConflict = function () {\n $.fn.popover = old\n return this\n }\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: scrollspy.js v3.3.5\n * http://getbootstrap.com/javascript/#scrollspy\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // SCROLLSPY CLASS DEFINITION\n // ==========================\n\n function ScrollSpy(element, options) {\n this.$body = $(document.body)\n this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n this.selector = (this.options.target || '') + ' .nav li > a'\n this.offsets = []\n this.targets = []\n this.activeTarget = null\n this.scrollHeight = 0\n\n this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n this.refresh()\n this.process()\n }\n\n ScrollSpy.VERSION = '3.3.5'\n\n ScrollSpy.DEFAULTS = {\n offset: 10\n }\n\n ScrollSpy.prototype.getScrollHeight = function () {\n return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)\n }\n\n ScrollSpy.prototype.refresh = function () {\n var that = this\n var offsetMethod = 'offset'\n var offsetBase = 0\n\n this.offsets = []\n this.targets = []\n this.scrollHeight = this.getScrollHeight()\n\n if (!$.isWindow(this.$scrollElement[0])) {\n offsetMethod = 'position'\n offsetBase = this.$scrollElement.scrollTop()\n }\n\n this.$body\n .find(this.selector)\n .map(function () {\n var $el = $(this)\n var href = $el.data('target') || $el.attr('href')\n var $href = /^#./.test(href) && $(href)\n\n return ($href\n && $href.length\n && $href.is(':visible')\n && [[$href[offsetMethod]().top + offsetBase, href]]) || null\n })\n .sort(function (a, b) { return a[0] - b[0] })\n .each(function () {\n that.offsets.push(this[0])\n that.targets.push(this[1])\n })\n }\n\n ScrollSpy.prototype.process = function () {\n var scrollTop = this.$scrollElement.scrollTop() + this.options.offset\n var scrollHeight = this.getScrollHeight()\n var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()\n var offsets = this.offsets\n var targets = this.targets\n var activeTarget = this.activeTarget\n var i\n\n if (this.scrollHeight != scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)\n }\n\n if (activeTarget && scrollTop < offsets[0]) {\n this.activeTarget = null\n return this.clear()\n }\n\n for (i = offsets.length; i--;) {\n activeTarget != targets[i]\n && scrollTop >= offsets[i]\n && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])\n && this.activate(targets[i])\n }\n }\n\n ScrollSpy.prototype.activate = function (target) {\n this.activeTarget = target\n\n this.clear()\n\n var selector = this.selector +\n '[data-target=\"' + target + '\"],' +\n this.selector + '[href=\"' + target + '\"]'\n\n var active = $(selector)\n .parents('li')\n .addClass('active')\n\n if (active.parent('.dropdown-menu').length) {\n active = active\n .closest('li.dropdown')\n .addClass('active')\n }\n\n active.trigger('activate.bs.scrollspy')\n }\n\n ScrollSpy.prototype.clear = function () {\n $(this.selector)\n .parentsUntil(this.options.target, '.active')\n .removeClass('active')\n }\n\n\n // SCROLLSPY PLUGIN DEFINITION\n // ===========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.scrollspy')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.scrollspy\n\n $.fn.scrollspy = Plugin\n $.fn.scrollspy.Constructor = ScrollSpy\n\n\n // SCROLLSPY NO CONFLICT\n // =====================\n\n $.fn.scrollspy.noConflict = function () {\n $.fn.scrollspy = old\n return this\n }\n\n\n // SCROLLSPY DATA-API\n // ==================\n\n $(window).on('load.bs.scrollspy.data-api', function () {\n $('[data-spy=\"scroll\"]').each(function () {\n var $spy = $(this)\n Plugin.call($spy, $spy.data())\n })\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: tab.js v3.3.5\n * http://getbootstrap.com/javascript/#tabs\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // TAB CLASS DEFINITION\n // ====================\n\n var Tab = function (element) {\n // jscs:disable requireDollarBeforejQueryAssignment\n this.element = $(element)\n // jscs:enable requireDollarBeforejQueryAssignment\n }\n\n Tab.VERSION = '3.3.5'\n\n Tab.TRANSITION_DURATION = 150\n\n Tab.prototype.show = function () {\n var $this = this.element\n var $ul = $this.closest('ul:not(.dropdown-menu)')\n var selector = $this.data('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('active')) return\n\n var $previous = $ul.find('.active:last a')\n var hideEvent = $.Event('hide.bs.tab', {\n relatedTarget: $this[0]\n })\n var showEvent = $.Event('show.bs.tab', {\n relatedTarget: $previous[0]\n })\n\n $previous.trigger(hideEvent)\n $this.trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return\n\n var $target = $(selector)\n\n this.activate($this.closest('li'), $ul)\n this.activate($target, $target.parent(), function () {\n $previous.trigger({\n type: 'hidden.bs.tab',\n relatedTarget: $this[0]\n })\n $this.trigger({\n type: 'shown.bs.tab',\n relatedTarget: $previous[0]\n })\n })\n }\n\n Tab.prototype.activate = function (element, container, callback) {\n var $active = container.find('> .active')\n var transition = callback\n && $.support.transition\n && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)\n\n function next() {\n $active\n .removeClass('active')\n .find('> .dropdown-menu > .active')\n .removeClass('active')\n .end()\n .find('[data-toggle=\"tab\"]')\n .attr('aria-expanded', false)\n\n element\n .addClass('active')\n .find('[data-toggle=\"tab\"]')\n .attr('aria-expanded', true)\n\n if (transition) {\n element[0].offsetWidth // reflow for transition\n element.addClass('in')\n } else {\n element.removeClass('fade')\n }\n\n if (element.parent('.dropdown-menu').length) {\n element\n .closest('li.dropdown')\n .addClass('active')\n .end()\n .find('[data-toggle=\"tab\"]')\n .attr('aria-expanded', true)\n }\n\n callback && callback()\n }\n\n $active.length && transition ?\n $active\n .one('bsTransitionEnd', next)\n .emulateTransitionEnd(Tab.TRANSITION_DURATION) :\n next()\n\n $active.removeClass('in')\n }\n\n\n // TAB PLUGIN DEFINITION\n // =====================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tab')\n\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.tab\n\n $.fn.tab = Plugin\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 var clickHandler = function (e) {\n e.preventDefault()\n Plugin.call($(this), 'show')\n }\n\n $(document)\n .on('click.bs.tab.data-api', '[data-toggle=\"tab\"]', clickHandler)\n .on('click.bs.tab.data-api', '[data-toggle=\"pill\"]', clickHandler)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: affix.js v3.3.5\n * http://getbootstrap.com/javascript/#affix\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // AFFIX CLASS DEFINITION\n // ======================\n\n var Affix = function (element, options) {\n this.options = $.extend({}, Affix.DEFAULTS, options)\n\n this.$target = $(this.options.target)\n .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))\n\n this.$element = $(element)\n this.affixed = null\n this.unpin = null\n this.pinnedOffset = null\n\n this.checkPosition()\n }\n\n Affix.VERSION = '3.3.5'\n\n Affix.RESET = 'affix affix-top affix-bottom'\n\n Affix.DEFAULTS = {\n offset: 0,\n target: window\n }\n\n Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\n var scrollTop = this.$target.scrollTop()\n var position = this.$element.offset()\n var targetHeight = this.$target.height()\n\n if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\n\n if (this.affixed == 'bottom') {\n if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\n return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\n }\n\n var initializing = this.affixed == null\n var colliderTop = initializing ? scrollTop : position.top\n var colliderHeight = initializing ? targetHeight : height\n\n if (offsetTop != null && scrollTop <= offsetTop) return 'top'\n if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\n\n return false\n }\n\n Affix.prototype.getPinnedOffset = function () {\n if (this.pinnedOffset) return this.pinnedOffset\n this.$element.removeClass(Affix.RESET).addClass('affix')\n var scrollTop = this.$target.scrollTop()\n var position = this.$element.offset()\n return (this.pinnedOffset = position.top - scrollTop)\n }\n\n Affix.prototype.checkPositionWithEventLoop = function () {\n setTimeout($.proxy(this.checkPosition, this), 1)\n }\n\n Affix.prototype.checkPosition = function () {\n if (!this.$element.is(':visible')) return\n\n var height = this.$element.height()\n var offset = this.options.offset\n var offsetTop = offset.top\n var offsetBottom = offset.bottom\n var scrollHeight = Math.max($(document).height(), $(document.body).height())\n\n if (typeof offset != 'object') offsetBottom = offsetTop = offset\n if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)\n if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\n\n if (this.affixed != affix) {\n if (this.unpin != null) this.$element.css('top', '')\n\n var affixType = 'affix' + (affix ? '-' + affix : '')\n var e = $.Event(affixType + '.bs.affix')\n\n this.$element.trigger(e)\n\n if (e.isDefaultPrevented()) return\n\n this.affixed = affix\n this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n this.$element\n .removeClass(Affix.RESET)\n .addClass(affixType)\n .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\n }\n\n if (affix == 'bottom') {\n this.$element.offset({\n top: scrollHeight - height - offsetBottom\n })\n }\n }\n\n\n // AFFIX PLUGIN DEFINITION\n // =======================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.affix')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.affix\n\n $.fn.affix = Plugin\n $.fn.affix.Constructor = Affix\n\n\n // AFFIX NO CONFLICT\n // =================\n\n $.fn.affix.noConflict = function () {\n $.fn.affix = old\n return this\n }\n\n\n // AFFIX DATA-API\n // ==============\n\n $(window).on('load', function () {\n $('[data-spy=\"affix\"]').each(function () {\n var $spy = $(this)\n var data = $spy.data()\n\n data.offset = data.offset || {}\n\n if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\n if (data.offsetTop != null) data.offset.top = data.offsetTop\n\n Plugin.call($spy, data)\n })\n })\n\n}(jQuery);\n","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.0.5\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n return typeof x === 'function' || typeof x === 'object' && x !== null;\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nvar _isArray = undefined;\nif (!Array.isArray) {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n} else {\n _isArray = Array.isArray;\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n _resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n try {\n then.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n _resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n _reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n _reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n _reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return _resolve(promise, value);\n }, function (reason) {\n return _reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$) {\n if (maybeThenable.constructor === promise.constructor && then$$ === then && maybeThenable.constructor.resolve === resolve) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$ === GET_THEN_ERROR) {\n _reject(promise, GET_THEN_ERROR.error);\n } else if (then$$ === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$)) {\n handleForeignThenable(promise, maybeThenable, then$$);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction _resolve(promise, value) {\n if (promise === value) {\n _reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction _reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n _reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n _resolve(promise, value);\n } else if (failed) {\n _reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n _reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n _resolve(promise, value);\n }, function rejectPromise(reason) {\n _reject(promise, reason);\n });\n } catch (e) {\n _reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this._input = input;\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate();\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n _reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n};\n\nEnumerator.prototype._enumerate = function () {\n var length = this.length;\n var _input = this._input;\n\n for (var i = 0; this._state === PENDING && i < length; i++) {\n this._eachEntry(_input[i], i);\n }\n};\n\nEnumerator.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve$$ = c.resolve;\n\n if (resolve$$ === resolve) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$) {\n return resolve$$(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$(entry), i);\n }\n};\n\nEnumerator.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n _reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n _reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise.all = all;\nPromise.race = race;\nPromise.resolve = resolve;\nPromise.reject = reject;\nPromise._setScheduler = setScheduler;\nPromise._setAsap = setAsap;\nPromise._asap = asap;\n\nPromise.prototype = {\n constructor: Promise,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\nfunction polyfill() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise;\n}\n\n// Strange compat..\nPromise.polyfill = polyfill;\nPromise.Promise = Promise;\n\nreturn Promise;\n\n})));\n//# sourceMappingURL=es6-promise.map","/*!\n * jQuery Validation Plugin v1.14.0\n *\n * http://jqueryvalidation.org/\n *\n * Copyright (c) 2015 Jörn Zaefferer\n * Released under the MIT license\n */\n(function( factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine( [\"jquery\"], factory );\n\t} else {\n\t\tfactory( jQuery );\n\t}\n}(function( $ ) {\n\n$.extend($.fn, {\n\t// http://jqueryvalidation.org/validate/\n\tvalidate: function( options ) {\n\n\t\t// if nothing is selected, return nothing; can't chain anyway\n\t\tif ( !this.length ) {\n\t\t\tif ( options && options.debug && window.console ) {\n\t\t\t\tconsole.warn( \"Nothing selected, can't validate, returning nothing.\" );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// check if a validator for this form was already created\n\t\tvar validator = $.data( this[ 0 ], \"validator\" );\n\t\tif ( validator ) {\n\t\t\treturn validator;\n\t\t}\n\n\t\t// Add novalidate tag if HTML5.\n\t\tthis.attr( \"novalidate\", \"novalidate\" );\n\n\t\tvalidator = new $.validator( options, this[ 0 ] );\n\t\t$.data( this[ 0 ], \"validator\", validator );\n\n\t\tif ( validator.settings.onsubmit ) {\n\n\t\t\tthis.on( \"click.validate\", \":submit\", function( event ) {\n\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\tvalidator.submitButton = event.target;\n\t\t\t\t}\n\n\t\t\t\t// allow suppressing validation by adding a cancel class to the submit button\n\t\t\t\tif ( $( this ).hasClass( \"cancel\" ) ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\n\t\t\t\t// allow suppressing validation by adding the html5 formnovalidate attribute to the submit button\n\t\t\t\tif ( $( this ).attr( \"formnovalidate\" ) !== undefined ) {\n\t\t\t\t\tvalidator.cancelSubmit = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// validate the form on submit\n\t\t\tthis.on( \"submit.validate\", function( event ) {\n\t\t\t\tif ( validator.settings.debug ) {\n\t\t\t\t\t// prevent form submit to be able to see console output\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t\tfunction handle() {\n\t\t\t\t\tvar hidden, result;\n\t\t\t\t\tif ( validator.settings.submitHandler ) {\n\t\t\t\t\t\tif ( validator.submitButton ) {\n\t\t\t\t\t\t\t// insert a hidden input as a replacement for the missing submit button\n\t\t\t\t\t\t\thidden = $( \"<input type='hidden'/>\" )\n\t\t\t\t\t\t\t\t.attr( \"name\", validator.submitButton.name )\n\t\t\t\t\t\t\t\t.val( $( validator.submitButton ).val() )\n\t\t\t\t\t\t\t\t.appendTo( validator.currentForm );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult = validator.settings.submitHandler.call( validator, validator.currentForm, event );\n\t\t\t\t\t\tif ( validator.submitButton ) {\n\t\t\t\t\t\t\t// and clean up afterwards; thanks to no-block-scope, hidden can be referenced\n\t\t\t\t\t\t\thidden.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( result !== undefined ) {\n\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t// prevent submit for invalid forms or custom submit handlers\n\t\t\t\tif ( validator.cancelSubmit ) {\n\t\t\t\t\tvalidator.cancelSubmit = false;\n\t\t\t\t\treturn handle();\n\t\t\t\t}\n\t\t\t\tif ( validator.form() ) {\n\t\t\t\t\tif ( validator.pendingRequest ) {\n\t\t\t\t\t\tvalidator.formSubmitted = true;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\treturn handle();\n\t\t\t\t} else {\n\t\t\t\t\tvalidator.focusInvalid();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn validator;\n\t},\n\t// http://jqueryvalidation.org/valid/\n\tvalid: function() {\n\t\tvar valid, validator, errorList;\n\n\t\tif ( $( this[ 0 ] ).is( \"form\" ) ) {\n\t\t\tvalid = this.validate().form();\n\t\t} else {\n\t\t\terrorList = [];\n\t\t\tvalid = true;\n\t\t\tvalidator = $( this[ 0 ].form ).validate();\n\t\t\tthis.each( function() {\n\t\t\t\tvalid = validator.element( this ) && valid;\n\t\t\t\terrorList = errorList.concat( validator.errorList );\n\t\t\t});\n\t\t\tvalidator.errorList = errorList;\n\t\t}\n\t\treturn valid;\n\t},\n\n\t// http://jqueryvalidation.org/rules/\n\trules: function( command, argument ) {\n\t\tvar element = this[ 0 ],\n\t\t\tsettings, staticRules, existingRules, data, param, filtered;\n\n\t\tif ( command ) {\n\t\t\tsettings = $.data( element.form, \"validator\" ).settings;\n\t\t\tstaticRules = settings.rules;\n\t\t\texistingRules = $.validator.staticRules( element );\n\t\t\tswitch ( command ) {\n\t\t\tcase \"add\":\n\t\t\t\t$.extend( existingRules, $.validator.normalizeRule( argument ) );\n\t\t\t\t// remove messages from rules, but allow them to be set separately\n\t\t\t\tdelete existingRules.messages;\n\t\t\t\tstaticRules[ element.name ] = existingRules;\n\t\t\t\tif ( argument.messages ) {\n\t\t\t\t\tsettings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"remove\":\n\t\t\t\tif ( !argument ) {\n\t\t\t\t\tdelete staticRules[ element.name ];\n\t\t\t\t\treturn existingRules;\n\t\t\t\t}\n\t\t\t\tfiltered = {};\n\t\t\t\t$.each( argument.split( /\\s/ ), function( index, method ) {\n\t\t\t\t\tfiltered[ method ] = existingRules[ method ];\n\t\t\t\t\tdelete existingRules[ method ];\n\t\t\t\t\tif ( method === \"required\" ) {\n\t\t\t\t\t\t$( element ).removeAttr( \"aria-required\" );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn filtered;\n\t\t\t}\n\t\t}\n\n\t\tdata = $.validator.normalizeRules(\n\t\t$.extend(\n\t\t\t{},\n\t\t\t$.validator.classRules( element ),\n\t\t\t$.validator.attributeRules( element ),\n\t\t\t$.validator.dataRules( element ),\n\t\t\t$.validator.staticRules( element )\n\t\t), element );\n\n\t\t// make sure required is at front\n\t\tif ( data.required ) {\n\t\t\tparam = data.required;\n\t\t\tdelete data.required;\n\t\t\tdata = $.extend( { required: param }, data );\n\t\t\t$( element ).attr( \"aria-required\", \"true\" );\n\t\t}\n\n\t\t// make sure remote is at back\n\t\tif ( data.remote ) {\n\t\t\tparam = data.remote;\n\t\t\tdelete data.remote;\n\t\t\tdata = $.extend( data, { remote: param });\n\t\t}\n\n\t\treturn data;\n\t}\n});\n\n// Custom selectors\n$.extend( $.expr[ \":\" ], {\n\t// http://jqueryvalidation.org/blank-selector/\n\tblank: function( a ) {\n\t\treturn !$.trim( \"\" + $( a ).val() );\n\t},\n\t// http://jqueryvalidation.org/filled-selector/\n\tfilled: function( a ) {\n\t\treturn !!$.trim( \"\" + $( a ).val() );\n\t},\n\t// http://jqueryvalidation.org/unchecked-selector/\n\tunchecked: function( a ) {\n\t\treturn !$( a ).prop( \"checked\" );\n\t}\n});\n\n// constructor for validator\n$.validator = function( options, form ) {\n\tthis.settings = $.extend( true, {}, $.validator.defaults, options );\n\tthis.currentForm = form;\n\tthis.init();\n};\n\n// http://jqueryvalidation.org/jQuery.validator.format/\n$.validator.format = function( source, params ) {\n\tif ( arguments.length === 1 ) {\n\t\treturn function() {\n\t\t\tvar args = $.makeArray( arguments );\n\t\t\targs.unshift( source );\n\t\t\treturn $.validator.format.apply( this, args );\n\t\t};\n\t}\n\tif ( arguments.length > 2 && params.constructor !== Array ) {\n\t\tparams = $.makeArray( arguments ).slice( 1 );\n\t}\n\tif ( params.constructor !== Array ) {\n\t\tparams = [ params ];\n\t}\n\t$.each( params, function( i, n ) {\n\t\tsource = source.replace( new RegExp( \"\\\\{\" + i + \"\\\\}\", \"g\" ), function() {\n\t\t\treturn n;\n\t\t});\n\t});\n\treturn source;\n};\n\n$.extend( $.validator, {\n\n\tdefaults: {\n\t\tmessages: {},\n\t\tgroups: {},\n\t\trules: {},\n\t\terrorClass: \"error\",\n\t\tvalidClass: \"valid\",\n\t\terrorElement: \"label\",\n\t\tfocusCleanup: false,\n\t\tfocusInvalid: true,\n\t\terrorContainer: $( [] ),\n\t\terrorLabelContainer: $( [] ),\n\t\tonsubmit: true,\n\t\tignore: \":hidden\",\n\t\tignoreTitle: false,\n\t\tonfocusin: function( element ) {\n\t\t\tthis.lastActive = element;\n\n\t\t\t// Hide error label and remove error class on focus if enabled\n\t\t\tif ( this.settings.focusCleanup ) {\n\t\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.hideThese( this.errorsFor( element ) );\n\t\t\t}\n\t\t},\n\t\tonfocusout: function( element ) {\n\t\t\tif ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) {\n\t\t\t\tthis.element( element );\n\t\t\t}\n\t\t},\n\t\tonkeyup: function( element, event ) {\n\t\t\t// Avoid revalidate the field when pressing one of the following keys\n\t\t\t// Shift => 16\n\t\t\t// Ctrl => 17\n\t\t\t// Alt => 18\n\t\t\t// Caps lock => 20\n\t\t\t// End => 35\n\t\t\t// Home => 36\n\t\t\t// Left arrow => 37\n\t\t\t// Up arrow => 38\n\t\t\t// Right arrow => 39\n\t\t\t// Down arrow => 40\n\t\t\t// Insert => 45\n\t\t\t// Num lock => 144\n\t\t\t// AltGr key => 225\n\t\t\tvar excludedKeys = [\n\t\t\t\t16, 17, 18, 20, 35, 36, 37,\n\t\t\t\t38, 39, 40, 45, 144, 225\n\t\t\t];\n\n\t\t\tif ( event.which === 9 && this.elementValue( element ) === \"\" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {\n\t\t\t\treturn;\n\t\t\t} else if ( element.name in this.submitted || element === this.lastElement ) {\n\t\t\t\tthis.element( element );\n\t\t\t}\n\t\t},\n\t\tonclick: function( element ) {\n\t\t\t// click on selects, radiobuttons and checkboxes\n\t\t\tif ( element.name in this.submitted ) {\n\t\t\t\tthis.element( element );\n\n\t\t\t// or option elements, check parent select in that case\n\t\t\t} else if ( element.parentNode.name in this.submitted ) {\n\t\t\t\tthis.element( element.parentNode );\n\t\t\t}\n\t\t},\n\t\thighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === \"radio\" ) {\n\t\t\t\tthis.findByName( element.name ).addClass( errorClass ).removeClass( validClass );\n\t\t\t} else {\n\t\t\t\t$( element ).addClass( errorClass ).removeClass( validClass );\n\t\t\t}\n\t\t},\n\t\tunhighlight: function( element, errorClass, validClass ) {\n\t\t\tif ( element.type === \"radio\" ) {\n\t\t\t\tthis.findByName( element.name ).removeClass( errorClass ).addClass( validClass );\n\t\t\t} else {\n\t\t\t\t$( element ).removeClass( errorClass ).addClass( validClass );\n\t\t\t}\n\t\t}\n\t},\n\n\t// http://jqueryvalidation.org/jQuery.validator.setDefaults/\n\tsetDefaults: function( settings ) {\n\t\t$.extend( $.validator.defaults, settings );\n\t},\n\n\tmessages: {\n\t\trequired: \"This field is required.\",\n\t\tremote: \"Please fix this field.\",\n\t\temail: \"Please enter a valid email address.\",\n\t\turl: \"Please enter a valid URL.\",\n\t\tdate: \"Please enter a valid date.\",\n\t\tdateISO: \"Please enter a valid date ( ISO ).\",\n\t\tnumber: \"Please enter a valid number.\",\n\t\tdigits: \"Please enter only digits.\",\n\t\tcreditcard: \"Please enter a valid credit card number.\",\n\t\tequalTo: \"Please enter the same value again.\",\n\t\tmaxlength: $.validator.format( \"Please enter no more than {0} characters.\" ),\n\t\tminlength: $.validator.format( \"Please enter at least {0} characters.\" ),\n\t\trangelength: $.validator.format( \"Please enter a value between {0} and {1} characters long.\" ),\n\t\trange: $.validator.format( \"Please enter a value between {0} and {1}.\" ),\n\t\tmax: $.validator.format( \"Please enter a value less than or equal to {0}.\" ),\n\t\tmin: $.validator.format( \"Please enter a value greater than or equal to {0}.\" )\n\t},\n\n\tautoCreateRanges: false,\n\n\tprototype: {\n\n\t\tinit: function() {\n\t\t\tthis.labelContainer = $( this.settings.errorLabelContainer );\n\t\t\tthis.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm );\n\t\t\tthis.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer );\n\t\t\tthis.submitted = {};\n\t\t\tthis.valueCache = {};\n\t\t\tthis.pendingRequest = 0;\n\t\t\tthis.pending = {};\n\t\t\tthis.invalid = {};\n\t\t\tthis.reset();\n\n\t\t\tvar groups = ( this.groups = {} ),\n\t\t\t\trules;\n\t\t\t$.each( this.settings.groups, function( key, value ) {\n\t\t\t\tif ( typeof value === \"string\" ) {\n\t\t\t\t\tvalue = value.split( /\\s/ );\n\t\t\t\t}\n\t\t\t\t$.each( value, function( index, name ) {\n\t\t\t\t\tgroups[ name ] = key;\n\t\t\t\t});\n\t\t\t});\n\t\t\trules = this.settings.rules;\n\t\t\t$.each( rules, function( key, value ) {\n\t\t\t\trules[ key ] = $.validator.normalizeRule( value );\n\t\t\t});\n\n\t\t\tfunction delegate( event ) {\n\t\t\t\tvar validator = $.data( this.form, \"validator\" ),\n\t\t\t\t\teventType = \"on\" + event.type.replace( /^validate/, \"\" ),\n\t\t\t\t\tsettings = validator.settings;\n\t\t\t\tif ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) {\n\t\t\t\t\tsettings[ eventType ].call( validator, this, event );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$( this.currentForm )\n\t\t\t\t.on( \"focusin.validate focusout.validate keyup.validate\",\n\t\t\t\t\t\":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], \" +\n\t\t\t\t\t\"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], \" +\n\t\t\t\t\t\"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], \" +\n\t\t\t\t\t\"[type='radio'], [type='checkbox']\", delegate)\n\t\t\t\t// Support: Chrome, oldIE\n\t\t\t\t// \"select\" is provided as event.target when clicking a option\n\t\t\t\t.on(\"click.validate\", \"select, option, [type='radio'], [type='checkbox']\", delegate);\n\n\t\t\tif ( this.settings.invalidHandler ) {\n\t\t\t\t$( this.currentForm ).on( \"invalid-form.validate\", this.settings.invalidHandler );\n\t\t\t}\n\n\t\t\t// Add aria-required to any Static/Data/Class required fields before first validation\n\t\t\t// Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html\n\t\t\t$( this.currentForm ).find( \"[required], [data-rule-required], .required\" ).attr( \"aria-required\", \"true\" );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/Validator.form/\n\t\tform: function() {\n\t\t\tthis.checkForm();\n\t\t\t$.extend( this.submitted, this.errorMap );\n\t\t\tthis.invalid = $.extend({}, this.errorMap );\n\t\t\tif ( !this.valid() ) {\n\t\t\t\t$( this.currentForm ).triggerHandler( \"invalid-form\", [ this ]);\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn this.valid();\n\t\t},\n\n\t\tcheckForm: function() {\n\t\t\tthis.prepareForm();\n\t\t\tfor ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) {\n\t\t\t\tthis.check( elements[ i ] );\n\t\t\t}\n\t\t\treturn this.valid();\n\t\t},\n\n\t\t// http://jqueryvalidation.org/Validator.element/\n\t\telement: function( element ) {\n\t\t\tvar cleanElement = this.clean( element ),\n\t\t\t\tcheckElement = this.validationTargetFor( cleanElement ),\n\t\t\t\tresult = true;\n\n\t\t\tthis.lastElement = checkElement;\n\n\t\t\tif ( checkElement === undefined ) {\n\t\t\t\tdelete this.invalid[ cleanElement.name ];\n\t\t\t} else {\n\t\t\t\tthis.prepareElement( checkElement );\n\t\t\t\tthis.currentElements = $( checkElement );\n\n\t\t\t\tresult = this.check( checkElement ) !== false;\n\t\t\t\tif ( result ) {\n\t\t\t\t\tdelete this.invalid[ checkElement.name ];\n\t\t\t\t} else {\n\t\t\t\t\tthis.invalid[ checkElement.name ] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Add aria-invalid status for screen readers\n\t\t\t$( element ).attr( \"aria-invalid\", !result );\n\n\t\t\tif ( !this.numberOfInvalids() ) {\n\t\t\t\t// Hide error containers on last error\n\t\t\t\tthis.toHide = this.toHide.add( this.containers );\n\t\t\t}\n\t\t\tthis.showErrors();\n\t\t\treturn result;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/Validator.showErrors/\n\t\tshowErrors: function( errors ) {\n\t\t\tif ( errors ) {\n\t\t\t\t// add items to error list and map\n\t\t\t\t$.extend( this.errorMap, errors );\n\t\t\t\tthis.errorList = [];\n\t\t\t\tfor ( var name in errors ) {\n\t\t\t\t\tthis.errorList.push({\n\t\t\t\t\t\tmessage: errors[ name ],\n\t\t\t\t\t\telement: this.findByName( name )[ 0 ]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// remove items from success list\n\t\t\t\tthis.successList = $.grep( this.successList, function( element ) {\n\t\t\t\t\treturn !( element.name in errors );\n\t\t\t\t});\n\t\t\t}\n\t\t\tif ( this.settings.showErrors ) {\n\t\t\t\tthis.settings.showErrors.call( this, this.errorMap, this.errorList );\n\t\t\t} else {\n\t\t\t\tthis.defaultShowErrors();\n\t\t\t}\n\t\t},\n\n\t\t// http://jqueryvalidation.org/Validator.resetForm/\n\t\tresetForm: function() {\n\t\t\tif ( $.fn.resetForm ) {\n\t\t\t\t$( this.currentForm ).resetForm();\n\t\t\t}\n\t\t\tthis.submitted = {};\n\t\t\tthis.lastElement = null;\n\t\t\tthis.prepareForm();\n\t\t\tthis.hideErrors();\n\t\t\tvar i, elements = this.elements()\n\t\t\t\t.removeData( \"previousValue\" )\n\t\t\t\t.removeAttr( \"aria-invalid\" );\n\n\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\tfor ( i = 0; elements[ i ]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[ i ],\n\t\t\t\t\t\tthis.settings.errorClass, \"\" );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\telements.removeClass( this.settings.errorClass );\n\t\t\t}\n\t\t},\n\n\t\tnumberOfInvalids: function() {\n\t\t\treturn this.objectLength( this.invalid );\n\t\t},\n\n\t\tobjectLength: function( obj ) {\n\t\t\t/* jshint unused: false */\n\t\t\tvar count = 0,\n\t\t\t\ti;\n\t\t\tfor ( i in obj ) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\treturn count;\n\t\t},\n\n\t\thideErrors: function() {\n\t\t\tthis.hideThese( this.toHide );\n\t\t},\n\n\t\thideThese: function( errors ) {\n\t\t\terrors.not( this.containers ).text( \"\" );\n\t\t\tthis.addWrapper( errors ).hide();\n\t\t},\n\n\t\tvalid: function() {\n\t\t\treturn this.size() === 0;\n\t\t},\n\n\t\tsize: function() {\n\t\t\treturn this.errorList.length;\n\t\t},\n\n\t\tfocusInvalid: function() {\n\t\t\tif ( this.settings.focusInvalid ) {\n\t\t\t\ttry {\n\t\t\t\t\t$( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])\n\t\t\t\t\t.filter( \":visible\" )\n\t\t\t\t\t.focus()\n\t\t\t\t\t// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find\n\t\t\t\t\t.trigger( \"focusin\" );\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\t// ignore IE throwing errors when focusing hidden elements\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tfindLastActive: function() {\n\t\t\tvar lastActive = this.lastActive;\n\t\t\treturn lastActive && $.grep( this.errorList, function( n ) {\n\t\t\t\treturn n.element.name === lastActive.name;\n\t\t\t}).length === 1 && lastActive;\n\t\t},\n\n\t\telements: function() {\n\t\t\tvar validator = this,\n\t\t\t\trulesCache = {};\n\n\t\t\t// select all valid inputs inside the form (no submit or reset buttons)\n\t\t\treturn $( this.currentForm )\n\t\t\t.find( \"input, select, textarea\" )\n\t\t\t.not( \":submit, :reset, :image, :disabled\" )\n\t\t\t.not( this.settings.ignore )\n\t\t\t.filter( function() {\n\t\t\t\tif ( !this.name && validator.settings.debug && window.console ) {\n\t\t\t\t\tconsole.error( \"%o has no name assigned\", this );\n\t\t\t\t}\n\n\t\t\t\t// select only the first element for each name, and only those with rules specified\n\t\t\t\tif ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\trulesCache[ this.name ] = true;\n\t\t\t\treturn true;\n\t\t\t});\n\t\t},\n\n\t\tclean: function( selector ) {\n\t\t\treturn $( selector )[ 0 ];\n\t\t},\n\n\t\terrors: function() {\n\t\t\tvar errorClass = this.settings.errorClass.split( \" \" ).join( \".\" );\n\t\t\treturn $( this.settings.errorElement + \".\" + errorClass, this.errorContext );\n\t\t},\n\n\t\treset: function() {\n\t\t\tthis.successList = [];\n\t\t\tthis.errorList = [];\n\t\t\tthis.errorMap = {};\n\t\t\tthis.toShow = $( [] );\n\t\t\tthis.toHide = $( [] );\n\t\t\tthis.currentElements = $( [] );\n\t\t},\n\n\t\tprepareForm: function() {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errors().add( this.containers );\n\t\t},\n\n\t\tprepareElement: function( element ) {\n\t\t\tthis.reset();\n\t\t\tthis.toHide = this.errorsFor( element );\n\t\t},\n\n\t\telementValue: function( element ) {\n\t\t\tvar val,\n\t\t\t\t$element = $( element ),\n\t\t\t\ttype = element.type;\n\n\t\t\tif ( type === \"radio\" || type === \"checkbox\" ) {\n\t\t\t\treturn this.findByName( element.name ).filter(\":checked\").val();\n\t\t\t} else if ( type === \"number\" && typeof element.validity !== \"undefined\" ) {\n\t\t\t\treturn element.validity.badInput ? false : $element.val();\n\t\t\t}\n\n\t\t\tval = $element.val();\n\t\t\tif ( typeof val === \"string\" ) {\n\t\t\t\treturn val.replace(/\\r/g, \"\" );\n\t\t\t}\n\t\t\treturn val;\n\t\t},\n\n\t\tcheck: function( element ) {\n\t\t\telement = this.validationTargetFor( this.clean( element ) );\n\n\t\t\tvar rules = $( element ).rules(),\n\t\t\t\trulesCount = $.map( rules, function( n, i ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}).length,\n\t\t\t\tdependencyMismatch = false,\n\t\t\t\tval = this.elementValue( element ),\n\t\t\t\tresult, method, rule;\n\n\t\t\tfor ( method in rules ) {\n\t\t\t\trule = { method: method, parameters: rules[ method ] };\n\t\t\t\ttry {\n\n\t\t\t\t\tresult = $.validator.methods[ method ].call( this, val, element, rule.parameters );\n\n\t\t\t\t\t// if a method indicates that the field is optional and therefore valid,\n\t\t\t\t\t// don't mark it as valid when there are no other rules\n\t\t\t\t\tif ( result === \"dependency-mismatch\" && rulesCount === 1 ) {\n\t\t\t\t\t\tdependencyMismatch = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdependencyMismatch = false;\n\n\t\t\t\t\tif ( result === \"pending\" ) {\n\t\t\t\t\t\tthis.toHide = this.toHide.not( this.errorsFor( element ) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !result ) {\n\t\t\t\t\t\tthis.formatAndAdd( element, rule );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\tif ( this.settings.debug && window.console ) {\n\t\t\t\t\t\tconsole.log( \"Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\", e );\n\t\t\t\t\t}\n\t\t\t\t\tif ( e instanceof TypeError ) {\n\t\t\t\t\t\te.message += \". Exception occurred when checking element \" + element.id + \", check the '\" + rule.method + \"' method.\";\n\t\t\t\t\t}\n\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( dependencyMismatch ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this.objectLength( rules ) ) {\n\t\t\t\tthis.successList.push( element );\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t// return the custom message for the given element and validation method\n\t\t// specified in the element's HTML5 data attribute\n\t\t// return the generic message if present and no method specific message is present\n\t\tcustomDataMessage: function( element, method ) {\n\t\t\treturn $( element ).data( \"msg\" + method.charAt( 0 ).toUpperCase() +\n\t\t\t\tmethod.substring( 1 ).toLowerCase() ) || $( element ).data( \"msg\" );\n\t\t},\n\n\t\t// return the custom message for the given element name and validation method\n\t\tcustomMessage: function( name, method ) {\n\t\t\tvar m = this.settings.messages[ name ];\n\t\t\treturn m && ( m.constructor === String ? m : m[ method ]);\n\t\t},\n\n\t\t// return the first defined argument, allowing empty strings\n\t\tfindDefined: function() {\n\t\t\tfor ( var i = 0; i < arguments.length; i++) {\n\t\t\t\tif ( arguments[ i ] !== undefined ) {\n\t\t\t\t\treturn arguments[ i ];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\n\t\tdefaultMessage: function( element, method ) {\n\t\t\treturn this.findDefined(\n\t\t\t\tthis.customMessage( element.name, method ),\n\t\t\t\tthis.customDataMessage( element, method ),\n\t\t\t\t// title is never undefined, so handle empty string as undefined\n\t\t\t\t!this.settings.ignoreTitle && element.title || undefined,\n\t\t\t\t$.validator.messages[ method ],\n\t\t\t\t\"<strong>Warning: No message defined for \" + element.name + \"</strong>\"\n\t\t\t);\n\t\t},\n\n\t\tformatAndAdd: function( element, rule ) {\n\t\t\tvar message = this.defaultMessage( element, rule.method ),\n\t\t\t\ttheregex = /\\$?\\{(\\d+)\\}/g;\n\t\t\tif ( typeof message === \"function\" ) {\n\t\t\t\tmessage = message.call( this, rule.parameters, element );\n\t\t\t} else if ( theregex.test( message ) ) {\n\t\t\t\tmessage = $.validator.format( message.replace( theregex, \"{$1}\" ), rule.parameters );\n\t\t\t}\n\t\t\tthis.errorList.push({\n\t\t\t\tmessage: message,\n\t\t\t\telement: element,\n\t\t\t\tmethod: rule.method\n\t\t\t});\n\n\t\t\tthis.errorMap[ element.name ] = message;\n\t\t\tthis.submitted[ element.name ] = message;\n\t\t},\n\n\t\taddWrapper: function( toToggle ) {\n\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\ttoToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );\n\t\t\t}\n\t\t\treturn toToggle;\n\t\t},\n\n\t\tdefaultShowErrors: function() {\n\t\t\tvar i, elements, error;\n\t\t\tfor ( i = 0; this.errorList[ i ]; i++ ) {\n\t\t\t\terror = this.errorList[ i ];\n\t\t\t\tif ( this.settings.highlight ) {\n\t\t\t\t\tthis.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t\tthis.showLabel( error.element, error.message );\n\t\t\t}\n\t\t\tif ( this.errorList.length ) {\n\t\t\t\tthis.toShow = this.toShow.add( this.containers );\n\t\t\t}\n\t\t\tif ( this.settings.success ) {\n\t\t\t\tfor ( i = 0; this.successList[ i ]; i++ ) {\n\t\t\t\t\tthis.showLabel( this.successList[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( this.settings.unhighlight ) {\n\t\t\t\tfor ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) {\n\t\t\t\t\tthis.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toHide = this.toHide.not( this.toShow );\n\t\t\tthis.hideErrors();\n\t\t\tthis.addWrapper( this.toShow ).show();\n\t\t},\n\n\t\tvalidElements: function() {\n\t\t\treturn this.currentElements.not( this.invalidElements() );\n\t\t},\n\n\t\tinvalidElements: function() {\n\t\t\treturn $( this.errorList ).map(function() {\n\t\t\t\treturn this.element;\n\t\t\t});\n\t\t},\n\n\t\tshowLabel: function( element, message ) {\n\t\t\tvar place, group, errorID,\n\t\t\t\terror = this.errorsFor( element ),\n\t\t\t\telementID = this.idOrName( element ),\n\t\t\t\tdescribedBy = $( element ).attr( \"aria-describedby\" );\n\t\t\tif ( error.length ) {\n\t\t\t\t// refresh error/success class\n\t\t\t\terror.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );\n\t\t\t\t// replace message on existing label\n\t\t\t\terror.html( message );\n\t\t\t} else {\n\t\t\t\t// create error element\n\t\t\t\terror = $( \"<\" + this.settings.errorElement + \">\" )\n\t\t\t\t\t.attr( \"id\", elementID + \"-error\" )\n\t\t\t\t\t.addClass( this.settings.errorClass )\n\t\t\t\t\t.html( message || \"\" );\n\n\t\t\t\t// Maintain reference to the element to be placed into the DOM\n\t\t\t\tplace = error;\n\t\t\t\tif ( this.settings.wrapper ) {\n\t\t\t\t\t// make sure the element is visible, even in IE\n\t\t\t\t\t// actually showing the wrapped element is handled elsewhere\n\t\t\t\t\tplace = error.hide().show().wrap( \"<\" + this.settings.wrapper + \"/>\" ).parent();\n\t\t\t\t}\n\t\t\t\tif ( this.labelContainer.length ) {\n\t\t\t\t\tthis.labelContainer.append( place );\n\t\t\t\t} else if ( this.settings.errorPlacement ) {\n\t\t\t\t\tthis.settings.errorPlacement( place, $( element ) );\n\t\t\t\t} else {\n\t\t\t\t\tplace.insertAfter( element );\n\t\t\t\t}\n\n\t\t\t\t// Link error back to the element\n\t\t\t\tif ( error.is( \"label\" ) ) {\n\t\t\t\t\t// If the error is a label, then associate using 'for'\n\t\t\t\t\terror.attr( \"for\", elementID );\n\t\t\t\t} else if ( error.parents( \"label[for='\" + elementID + \"']\" ).length === 0 ) {\n\t\t\t\t\t// If the element is not a child of an associated label, then it's necessary\n\t\t\t\t\t// to explicitly apply aria-describedby\n\n\t\t\t\t\terrorID = error.attr( \"id\" ).replace( /(:|\\.|\\[|\\]|\\$)/g, \"\\\\$1\");\n\t\t\t\t\t// Respect existing non-error aria-describedby\n\t\t\t\t\tif ( !describedBy ) {\n\t\t\t\t\t\tdescribedBy = errorID;\n\t\t\t\t\t} else if ( !describedBy.match( new RegExp( \"\\\\b\" + errorID + \"\\\\b\" ) ) ) {\n\t\t\t\t\t\t// Add to end of list if not already present\n\t\t\t\t\t\tdescribedBy += \" \" + errorID;\n\t\t\t\t\t}\n\t\t\t\t\t$( element ).attr( \"aria-describedby\", describedBy );\n\n\t\t\t\t\t// If this element is grouped, then assign to all elements in the same group\n\t\t\t\t\tgroup = this.groups[ element.name ];\n\t\t\t\t\tif ( group ) {\n\t\t\t\t\t\t$.each( this.groups, function( name, testgroup ) {\n\t\t\t\t\t\t\tif ( testgroup === group ) {\n\t\t\t\t\t\t\t\t$( \"[name='\" + name + \"']\", this.currentForm )\n\t\t\t\t\t\t\t\t\t.attr( \"aria-describedby\", error.attr( \"id\" ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !message && this.settings.success ) {\n\t\t\t\terror.text( \"\" );\n\t\t\t\tif ( typeof this.settings.success === \"string\" ) {\n\t\t\t\t\terror.addClass( this.settings.success );\n\t\t\t\t} else {\n\t\t\t\t\tthis.settings.success( error, element );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.toShow = this.toShow.add( error );\n\t\t},\n\n\t\terrorsFor: function( element ) {\n\t\t\tvar name = this.idOrName( element ),\n\t\t\t\tdescriber = $( element ).attr( \"aria-describedby\" ),\n\t\t\t\tselector = \"label[for='\" + name + \"'], label[for='\" + name + \"'] *\";\n\n\t\t\t// aria-describedby should directly reference the error element\n\t\t\tif ( describer ) {\n\t\t\t\tselector = selector + \", #\" + describer.replace( /\\s+/g, \", #\" );\n\t\t\t}\n\t\t\treturn this\n\t\t\t\t.errors()\n\t\t\t\t.filter( selector );\n\t\t},\n\n\t\tidOrName: function( element ) {\n\t\t\treturn this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );\n\t\t},\n\n\t\tvalidationTargetFor: function( element ) {\n\n\t\t\t// If radio/checkbox, validate first element in group instead\n\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\telement = this.findByName( element.name );\n\t\t\t}\n\n\t\t\t// Always apply ignore filter\n\t\t\treturn $( element ).not( this.settings.ignore )[ 0 ];\n\t\t},\n\n\t\tcheckable: function( element ) {\n\t\t\treturn ( /radio|checkbox/i ).test( element.type );\n\t\t},\n\n\t\tfindByName: function( name ) {\n\t\t\treturn $( this.currentForm ).find( \"[name='\" + name + \"']\" );\n\t\t},\n\n\t\tgetLength: function( value, element ) {\n\t\t\tswitch ( element.nodeName.toLowerCase() ) {\n\t\t\tcase \"select\":\n\t\t\t\treturn $( \"option:selected\", element ).length;\n\t\t\tcase \"input\":\n\t\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\t\treturn this.findByName( element.name ).filter( \":checked\" ).length;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value.length;\n\t\t},\n\n\t\tdepend: function( param, element ) {\n\t\t\treturn this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;\n\t\t},\n\n\t\tdependTypes: {\n\t\t\t\"boolean\": function( param ) {\n\t\t\t\treturn param;\n\t\t\t},\n\t\t\t\"string\": function( param, element ) {\n\t\t\t\treturn !!$( param, element.form ).length;\n\t\t\t},\n\t\t\t\"function\": function( param, element ) {\n\t\t\t\treturn param( element );\n\t\t\t}\n\t\t},\n\n\t\toptional: function( element ) {\n\t\t\tvar val = this.elementValue( element );\n\t\t\treturn !$.validator.methods.required.call( this, val, element ) && \"dependency-mismatch\";\n\t\t},\n\n\t\tstartRequest: function( element ) {\n\t\t\tif ( !this.pending[ element.name ] ) {\n\t\t\t\tthis.pendingRequest++;\n\t\t\t\tthis.pending[ element.name ] = true;\n\t\t\t}\n\t\t},\n\n\t\tstopRequest: function( element, valid ) {\n\t\t\tthis.pendingRequest--;\n\t\t\t// sometimes synchronization fails, make sure pendingRequest is never < 0\n\t\t\tif ( this.pendingRequest < 0 ) {\n\t\t\t\tthis.pendingRequest = 0;\n\t\t\t}\n\t\t\tdelete this.pending[ element.name ];\n\t\t\tif ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {\n\t\t\t\t$( this.currentForm ).submit();\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t} else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {\n\t\t\t\t$( this.currentForm ).triggerHandler( \"invalid-form\", [ this ]);\n\t\t\t\tthis.formSubmitted = false;\n\t\t\t}\n\t\t},\n\n\t\tpreviousValue: function( element ) {\n\t\t\treturn $.data( element, \"previousValue\" ) || $.data( element, \"previousValue\", {\n\t\t\t\told: null,\n\t\t\t\tvalid: true,\n\t\t\t\tmessage: this.defaultMessage( element, \"remote\" )\n\t\t\t});\n\t\t},\n\n\t\t// cleans up all forms and elements, removes validator-specific events\n\t\tdestroy: function() {\n\t\t\tthis.resetForm();\n\n\t\t\t$( this.currentForm )\n\t\t\t\t.off( \".validate\" )\n\t\t\t\t.removeData( \"validator\" );\n\t\t}\n\n\t},\n\n\tclassRuleSettings: {\n\t\trequired: { required: true },\n\t\temail: { email: true },\n\t\turl: { url: true },\n\t\tdate: { date: true },\n\t\tdateISO: { dateISO: true },\n\t\tnumber: { number: true },\n\t\tdigits: { digits: true },\n\t\tcreditcard: { creditcard: true }\n\t},\n\n\taddClassRules: function( className, rules ) {\n\t\tif ( className.constructor === String ) {\n\t\t\tthis.classRuleSettings[ className ] = rules;\n\t\t} else {\n\t\t\t$.extend( this.classRuleSettings, className );\n\t\t}\n\t},\n\n\tclassRules: function( element ) {\n\t\tvar rules = {},\n\t\t\tclasses = $( element ).attr( \"class\" );\n\n\t\tif ( classes ) {\n\t\t\t$.each( classes.split( \" \" ), function() {\n\t\t\t\tif ( this in $.validator.classRuleSettings ) {\n\t\t\t\t\t$.extend( rules, $.validator.classRuleSettings[ this ]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeAttributeRule: function( rules, type, method, value ) {\n\n\t\t// convert the value to a number for number inputs, and for text for backwards compability\n\t\t// allows type=\"date\" and others to be compared as strings\n\t\tif ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {\n\t\t\tvalue = Number( value );\n\n\t\t\t// Support Opera Mini, which returns NaN for undefined minlength\n\t\t\tif ( isNaN( value ) ) {\n\t\t\t\tvalue = undefined;\n\t\t\t}\n\t\t}\n\n\t\tif ( value || value === 0 ) {\n\t\t\trules[ method ] = value;\n\t\t} else if ( type === method && type !== \"range\" ) {\n\n\t\t\t// exception: the jquery validate 'range' method\n\t\t\t// does not test for the html5 'range' type\n\t\t\trules[ method ] = true;\n\t\t}\n\t},\n\n\tattributeRules: function( element ) {\n\t\tvar rules = {},\n\t\t\t$element = $( element ),\n\t\t\ttype = element.getAttribute( \"type\" ),\n\t\t\tmethod, value;\n\n\t\tfor ( method in $.validator.methods ) {\n\n\t\t\t// support for <input required> in both html5 and older browsers\n\t\t\tif ( method === \"required\" ) {\n\t\t\t\tvalue = element.getAttribute( method );\n\n\t\t\t\t// Some browsers return an empty string for the required attribute\n\t\t\t\t// and non-HTML5 browsers might have required=\"\" markup\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\tvalue = true;\n\t\t\t\t}\n\n\t\t\t\t// force non-HTML5 browsers to return bool\n\t\t\t\tvalue = !!value;\n\t\t\t} else {\n\t\t\t\tvalue = $element.attr( method );\n\t\t\t}\n\n\t\t\tthis.normalizeAttributeRule( rules, type, method, value );\n\t\t}\n\n\t\t// maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs\n\t\tif ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {\n\t\t\tdelete rules.maxlength;\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\tdataRules: function( element ) {\n\t\tvar rules = {},\n\t\t\t$element = $( element ),\n\t\t\ttype = element.getAttribute( \"type\" ),\n\t\t\tmethod, value;\n\n\t\tfor ( method in $.validator.methods ) {\n\t\t\tvalue = $element.data( \"rule\" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );\n\t\t\tthis.normalizeAttributeRule( rules, type, method, value );\n\t\t}\n\t\treturn rules;\n\t},\n\n\tstaticRules: function( element ) {\n\t\tvar rules = {},\n\t\t\tvalidator = $.data( element.form, \"validator\" );\n\n\t\tif ( validator.settings.rules ) {\n\t\t\trules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {};\n\t\t}\n\t\treturn rules;\n\t},\n\n\tnormalizeRules: function( rules, element ) {\n\t\t// handle dependency check\n\t\t$.each( rules, function( prop, val ) {\n\t\t\t// ignore rule when param is explicitly false, eg. required:false\n\t\t\tif ( val === false ) {\n\t\t\t\tdelete rules[ prop ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( val.param || val.depends ) {\n\t\t\t\tvar keepRule = true;\n\t\t\t\tswitch ( typeof val.depends ) {\n\t\t\t\tcase \"string\":\n\t\t\t\t\tkeepRule = !!$( val.depends, element.form ).length;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"function\":\n\t\t\t\t\tkeepRule = val.depends.call( element, element );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( keepRule ) {\n\t\t\t\t\trules[ prop ] = val.param !== undefined ? val.param : true;\n\t\t\t\t} else {\n\t\t\t\t\tdelete rules[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// evaluate parameters\n\t\t$.each( rules, function( rule, parameter ) {\n\t\t\trules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;\n\t\t});\n\n\t\t// clean number parameters\n\t\t$.each([ \"minlength\", \"maxlength\" ], function() {\n\t\t\tif ( rules[ this ] ) {\n\t\t\t\trules[ this ] = Number( rules[ this ] );\n\t\t\t}\n\t\t});\n\t\t$.each([ \"rangelength\", \"range\" ], function() {\n\t\t\tvar parts;\n\t\t\tif ( rules[ this ] ) {\n\t\t\t\tif ( $.isArray( rules[ this ] ) ) {\n\t\t\t\t\trules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];\n\t\t\t\t} else if ( typeof rules[ this ] === \"string\" ) {\n\t\t\t\t\tparts = rules[ this ].replace(/[\\[\\]]/g, \"\" ).split( /[\\s,]+/ );\n\t\t\t\t\trules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif ( $.validator.autoCreateRanges ) {\n\t\t\t// auto-create ranges\n\t\t\tif ( rules.min != null && rules.max != null ) {\n\t\t\t\trules.range = [ rules.min, rules.max ];\n\t\t\t\tdelete rules.min;\n\t\t\t\tdelete rules.max;\n\t\t\t}\n\t\t\tif ( rules.minlength != null && rules.maxlength != null ) {\n\t\t\t\trules.rangelength = [ rules.minlength, rules.maxlength ];\n\t\t\t\tdelete rules.minlength;\n\t\t\t\tdelete rules.maxlength;\n\t\t\t}\n\t\t}\n\n\t\treturn rules;\n\t},\n\n\t// Converts a simple string to a {string: true} rule, e.g., \"required\" to {required:true}\n\tnormalizeRule: function( data ) {\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tvar transformed = {};\n\t\t\t$.each( data.split( /\\s/ ), function() {\n\t\t\t\ttransformed[ this ] = true;\n\t\t\t});\n\t\t\tdata = transformed;\n\t\t}\n\t\treturn data;\n\t},\n\n\t// http://jqueryvalidation.org/jQuery.validator.addMethod/\n\taddMethod: function( name, method, message ) {\n\t\t$.validator.methods[ name ] = method;\n\t\t$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];\n\t\tif ( method.length < 3 ) {\n\t\t\t$.validator.addClassRules( name, $.validator.normalizeRule( name ) );\n\t\t}\n\t},\n\n\tmethods: {\n\n\t\t// http://jqueryvalidation.org/required-method/\n\t\trequired: function( value, element, param ) {\n\t\t\t// check if dependency is met\n\t\t\tif ( !this.depend( param, element ) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\t\t\tif ( element.nodeName.toLowerCase() === \"select\" ) {\n\t\t\t\t// could be an array for select-multiple or a string, both are fine this way\n\t\t\t\tvar val = $( element ).val();\n\t\t\t\treturn val && val.length > 0;\n\t\t\t}\n\t\t\tif ( this.checkable( element ) ) {\n\t\t\t\treturn this.getLength( value, element ) > 0;\n\t\t\t}\n\t\t\treturn value.length > 0;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/email-method/\n\t\temail: function( value, element ) {\n\t\t\t// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address\n\t\t\t// Retrieved 2014-01-14\n\t\t\t// If you have a problem with this implementation, report a bug against the above spec\n\t\t\t// Or use custom methods to implement your own email validation\n\t\t\treturn this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/url-method/\n\t\turl: function( value, element ) {\n\n\t\t\t// Copyright (c) 2010-2013 Diego Perini, MIT licensed\n\t\t\t// https://gist.github.com/dperini/729294\n\t\t\t// see also https://mathiasbynens.be/demo/url-regex\n\t\t\t// modified to allow protocol-relative URLs\n\t\t\treturn this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})).?)(?::\\d{2,5})?(?:[/?#]\\S*)?$/i.test( value );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/date-method/\n\t\tdate: function( value, element ) {\n\t\t\treturn this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/dateISO-method/\n\t\tdateISO: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^\\d{4}[\\/\\-](0?[1-9]|1[012])[\\/\\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/number-method/\n\t\tnumber: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^(?:-?\\d+|-?\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/.test( value );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/digits-method/\n\t\tdigits: function( value, element ) {\n\t\t\treturn this.optional( element ) || /^\\d+$/.test( value );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/creditcard-method/\n\t\t// based on http://en.wikipedia.org/wiki/Luhn_algorithm\n\t\tcreditcard: function( value, element ) {\n\t\t\tif ( this.optional( element ) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\t\t\t// accept only spaces, digits and dashes\n\t\t\tif ( /[^0-9 \\-]+/.test( value ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar nCheck = 0,\n\t\t\t\tnDigit = 0,\n\t\t\t\tbEven = false,\n\t\t\t\tn, cDigit;\n\n\t\t\tvalue = value.replace( /\\D/g, \"\" );\n\n\t\t\t// Basing min and max length on\n\t\t\t// http://developer.ean.com/general_info/Valid_Credit_Card_Types\n\t\t\tif ( value.length < 13 || value.length > 19 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor ( n = value.length - 1; n >= 0; n--) {\n\t\t\t\tcDigit = value.charAt( n );\n\t\t\t\tnDigit = parseInt( cDigit, 10 );\n\t\t\t\tif ( bEven ) {\n\t\t\t\t\tif ( ( nDigit *= 2 ) > 9 ) {\n\t\t\t\t\t\tnDigit -= 9;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnCheck += nDigit;\n\t\t\t\tbEven = !bEven;\n\t\t\t}\n\n\t\t\treturn ( nCheck % 10 ) === 0;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/minlength-method/\n\t\tminlength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || length >= param;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/maxlength-method/\n\t\tmaxlength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || length <= param;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/rangelength-method/\n\t\trangelength: function( value, element, param ) {\n\t\t\tvar length = $.isArray( value ) ? value.length : this.getLength( value, element );\n\t\t\treturn this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/min-method/\n\t\tmin: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || value >= param;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/max-method/\n\t\tmax: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || value <= param;\n\t\t},\n\n\t\t// http://jqueryvalidation.org/range-method/\n\t\trange: function( value, element, param ) {\n\t\t\treturn this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );\n\t\t},\n\n\t\t// http://jqueryvalidation.org/equalTo-method/\n\t\tequalTo: function( value, element, param ) {\n\t\t\t// bind to the blur event of the target in order to revalidate whenever the target field is updated\n\t\t\t// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead\n\t\t\tvar target = $( param );\n\t\t\tif ( this.settings.onfocusout ) {\n\t\t\t\ttarget.off( \".validate-equalTo\" ).on( \"blur.validate-equalTo\", function() {\n\t\t\t\t\t$( element ).valid();\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn value === target.val();\n\t\t},\n\n\t\t// http://jqueryvalidation.org/remote-method/\n\t\tremote: function( value, element, param ) {\n\t\t\tif ( this.optional( element ) ) {\n\t\t\t\treturn \"dependency-mismatch\";\n\t\t\t}\n\n\t\t\tvar previous = this.previousValue( element ),\n\t\t\t\tvalidator, data;\n\n\t\t\tif (!this.settings.messages[ element.name ] ) {\n\t\t\t\tthis.settings.messages[ element.name ] = {};\n\t\t\t}\n\t\t\tprevious.originalMessage = this.settings.messages[ element.name ].remote;\n\t\t\tthis.settings.messages[ element.name ].remote = previous.message;\n\n\t\t\tparam = typeof param === \"string\" && { url: param } || param;\n\n\t\t\tif ( previous.old === value ) {\n\t\t\t\treturn previous.valid;\n\t\t\t}\n\n\t\t\tprevious.old = value;\n\t\t\tvalidator = this;\n\t\t\tthis.startRequest( element );\n\t\t\tdata = {};\n\t\t\tdata[ element.name ] = value;\n\t\t\t$.ajax( $.extend( true, {\n\t\t\t\tmode: \"abort\",\n\t\t\t\tport: \"validate\" + element.name,\n\t\t\t\tdataType: \"json\",\n\t\t\t\tdata: data,\n\t\t\t\tcontext: validator.currentForm,\n\t\t\t\tsuccess: function( response ) {\n\t\t\t\t\tvar valid = response === true || response === \"true\",\n\t\t\t\t\t\terrors, message, submitted;\n\n\t\t\t\t\tvalidator.settings.messages[ element.name ].remote = previous.originalMessage;\n\t\t\t\t\tif ( valid ) {\n\t\t\t\t\t\tsubmitted = validator.formSubmitted;\n\t\t\t\t\t\tvalidator.prepareElement( element );\n\t\t\t\t\t\tvalidator.formSubmitted = submitted;\n\t\t\t\t\t\tvalidator.successList.push( element );\n\t\t\t\t\t\tdelete validator.invalid[ element.name ];\n\t\t\t\t\t\tvalidator.showErrors();\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrors = {};\n\t\t\t\t\t\tmessage = response || validator.defaultMessage( element, \"remote\" );\n\t\t\t\t\t\terrors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;\n\t\t\t\t\t\tvalidator.invalid[ element.name ] = true;\n\t\t\t\t\t\tvalidator.showErrors( errors );\n\t\t\t\t\t}\n\t\t\t\t\tprevious.valid = valid;\n\t\t\t\t\tvalidator.stopRequest( element, valid );\n\t\t\t\t}\n\t\t\t}, param ) );\n\t\t\treturn \"pending\";\n\t\t}\n\t}\n\n});\n\n// ajax mode: abort\n// usage: $.ajax({ mode: \"abort\"[, port: \"uniqueport\"]});\n// if mode:\"abort\" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()\n\nvar pendingRequests = {},\n\tajax;\n// Use a prefilter if available (1.5+)\nif ( $.ajaxPrefilter ) {\n\t$.ajaxPrefilter(function( settings, _, xhr ) {\n\t\tvar port = settings.port;\n\t\tif ( settings.mode === \"abort\" ) {\n\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\tpendingRequests[port].abort();\n\t\t\t}\n\t\t\tpendingRequests[port] = xhr;\n\t\t}\n\t});\n} else {\n\t// Proxy ajax\n\tajax = $.ajax;\n\t$.ajax = function( settings ) {\n\t\tvar mode = ( \"mode\" in settings ? settings : $.ajaxSettings ).mode,\n\t\t\tport = ( \"port\" in settings ? settings : $.ajaxSettings ).port;\n\t\tif ( mode === \"abort\" ) {\n\t\t\tif ( pendingRequests[port] ) {\n\t\t\t\tpendingRequests[port].abort();\n\t\t\t}\n\t\t\tpendingRequests[port] = ajax.apply(this, arguments);\n\t\t\treturn pendingRequests[port];\n\t\t}\n\t\treturn ajax.apply(this, arguments);\n\t};\n}\n\n}));","//! moment-timezone.js\n//! version : 0.5.11\n//! Copyright (c) JS Foundation and other contributors\n//! license : MIT\n//! github.com/moment/moment-timezone\n\n(function (root, factory) {\n\t\"use strict\";\n\n\t/*global define*/\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(['moment'], factory); // AMD\n\t} else if (typeof module === 'object' && module.exports) {\n\t\tmodule.exports = factory(require('moment')); // Node\n\t} else {\n\t\tfactory(root.moment); // Browser\n\t}\n}(this, function (moment) {\n\t\"use strict\";\n\n\t// Do not load moment-timezone a second time.\n\t// if (moment.tz !== undefined) {\n\t// \tlogError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);\n\t// \treturn moment;\n\t// }\n\n\tvar VERSION = \"0.5.11\",\n\t\tzones = {},\n\t\tlinks = {},\n\t\tnames = {},\n\t\tguesses = {},\n\t\tcachedGuess,\n\n\t\tmomentVersion = moment.version.split('.'),\n\t\tmajor = +momentVersion[0],\n\t\tminor = +momentVersion[1];\n\n\t// Moment.js version check\n\tif (major < 2 || (major === 2 && minor < 6)) {\n\t\tlogError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');\n\t}\n\n\t/************************************\n\t\tUnpacking\n\t************************************/\n\n\tfunction charCodeToInt(charCode) {\n\t\tif (charCode > 96) {\n\t\t\treturn charCode - 87;\n\t\t} else if (charCode > 64) {\n\t\t\treturn charCode - 29;\n\t\t}\n\t\treturn charCode - 48;\n\t}\n\n\tfunction unpackBase60(string) {\n\t\tvar i = 0,\n\t\t\tparts = string.split('.'),\n\t\t\twhole = parts[0],\n\t\t\tfractional = parts[1] || '',\n\t\t\tmultiplier = 1,\n\t\t\tnum,\n\t\t\tout = 0,\n\t\t\tsign = 1;\n\n\t\t// handle negative numbers\n\t\tif (string.charCodeAt(0) === 45) {\n\t\t\ti = 1;\n\t\t\tsign = -1;\n\t\t}\n\n\t\t// handle digits before the decimal\n\t\tfor (i; i < whole.length; i++) {\n\t\t\tnum = charCodeToInt(whole.charCodeAt(i));\n\t\t\tout = 60 * out + num;\n\t\t}\n\n\t\t// handle digits after the decimal\n\t\tfor (i = 0; i < fractional.length; i++) {\n\t\t\tmultiplier = multiplier / 60;\n\t\t\tnum = charCodeToInt(fractional.charCodeAt(i));\n\t\t\tout += num * multiplier;\n\t\t}\n\n\t\treturn out * sign;\n\t}\n\n\tfunction arrayToInt (array) {\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tarray[i] = unpackBase60(array[i]);\n\t\t}\n\t}\n\n\tfunction intToUntil (array, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tarray[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds\n\t\t}\n\n\t\tarray[length - 1] = Infinity;\n\t}\n\n\tfunction mapIndices (source, indices) {\n\t\tvar out = [], i;\n\n\t\tfor (i = 0; i < indices.length; i++) {\n\t\t\tout[i] = source[indices[i]];\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction unpack (string) {\n\t\tvar data = string.split('|'),\n\t\t\toffsets = data[2].split(' '),\n\t\t\tindices = data[3].split(''),\n\t\t\tuntils = data[4].split(' ');\n\n\t\tarrayToInt(offsets);\n\t\tarrayToInt(indices);\n\t\tarrayToInt(untils);\n\n\t\tintToUntil(untils, indices.length);\n\n\t\treturn {\n\t\t\tname : data[0],\n\t\t\tabbrs : mapIndices(data[1].split(' '), indices),\n\t\t\toffsets : mapIndices(offsets, indices),\n\t\t\tuntils : untils,\n\t\t\tpopulation : data[5] | 0\n\t\t};\n\t}\n\n\t/************************************\n\t\tZone object\n\t************************************/\n\n\tfunction Zone (packedString) {\n\t\tif (packedString) {\n\t\t\tthis._set(unpack(packedString));\n\t\t}\n\t}\n\n\tZone.prototype = {\n\t\t_set : function (unpacked) {\n\t\t\tthis.name = unpacked.name;\n\t\t\tthis.abbrs = unpacked.abbrs;\n\t\t\tthis.untils = unpacked.untils;\n\t\t\tthis.offsets = unpacked.offsets;\n\t\t\tthis.population = unpacked.population;\n\t\t},\n\n\t\t_index : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\tuntils = this.untils,\n\t\t\t\ti;\n\n\t\t\tfor (i = 0; i < untils.length; i++) {\n\t\t\t\tif (target < untils[i]) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tparse : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\toffsets = this.offsets,\n\t\t\t\tuntils = this.untils,\n\t\t\t\tmax = untils.length - 1,\n\t\t\t\toffset, offsetNext, offsetPrev, i;\n\n\t\t\tfor (i = 0; i < max; i++) {\n\t\t\t\toffset = offsets[i];\n\t\t\t\toffsetNext = offsets[i + 1];\n\t\t\t\toffsetPrev = offsets[i ? i - 1 : i];\n\n\t\t\t\tif (offset < offsetNext && tz.moveAmbiguousForward) {\n\t\t\t\t\toffset = offsetNext;\n\t\t\t\t} else if (offset > offsetPrev && tz.moveInvalidForward) {\n\t\t\t\t\toffset = offsetPrev;\n\t\t\t\t}\n\n\t\t\t\tif (target < untils[i] - (offset * 60000)) {\n\t\t\t\t\treturn offsets[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn offsets[max];\n\t\t},\n\n\t\tabbr : function (mom) {\n\t\t\treturn this.abbrs[this._index(mom)];\n\t\t},\n\n\t\toffset : function (mom) {\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t}\n\t};\n\n\t/************************************\n\t\tCurrent Timezone\n\t************************************/\n\n\tfunction OffsetAt(at) {\n\t\tvar timeString = at.toTimeString();\n\t\tvar abbr = timeString.match(/\\([a-z ]+\\)/i);\n\t\tif (abbr && abbr[0]) {\n\t\t\t// 17:56:31 GMT-0600 (CST)\n\t\t\t// 17:56:31 GMT-0600 (Central Standard Time)\n\t\t\tabbr = abbr[0].match(/[A-Z]/g);\n\t\t\tabbr = abbr ? abbr.join('') : undefined;\n\t\t} else {\n\t\t\t// 17:56:31 CST\n\t\t\t// 17:56:31 GMT+0800 (å°åŒ—標準時間)\n\t\t\tabbr = timeString.match(/[A-Z]{3,5}/g);\n\t\t\tabbr = abbr ? abbr[0] : undefined;\n\t\t}\n\n\t\tif (abbr === 'GMT') {\n\t\t\tabbr = undefined;\n\t\t}\n\n\t\tthis.at = +at;\n\t\tthis.abbr = abbr;\n\t\tthis.offset = at.getTimezoneOffset();\n\t}\n\n\tfunction ZoneScore(zone) {\n\t\tthis.zone = zone;\n\t\tthis.offsetScore = 0;\n\t\tthis.abbrScore = 0;\n\t}\n\n\tZoneScore.prototype.scoreOffsetAt = function (offsetAt) {\n\t\tthis.offsetScore += Math.abs(this.zone.offset(offsetAt.at) - offsetAt.offset);\n\t\tif (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {\n\t\t\tthis.abbrScore++;\n\t\t}\n\t};\n\n\tfunction findChange(low, high) {\n\t\tvar mid, diff;\n\n\t\twhile ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {\n\t\t\tmid = new OffsetAt(new Date(low.at + diff));\n\t\t\tif (mid.offset === low.offset) {\n\t\t\t\tlow = mid;\n\t\t\t} else {\n\t\t\t\thigh = mid;\n\t\t\t}\n\t\t}\n\n\t\treturn low;\n\t}\n\n\tfunction userOffsets() {\n\t\tvar startYear = new Date().getFullYear() - 2,\n\t\t\tlast = new OffsetAt(new Date(startYear, 0, 1)),\n\t\t\toffsets = [last],\n\t\t\tchange, next, i;\n\n\t\tfor (i = 1; i < 48; i++) {\n\t\t\tnext = new OffsetAt(new Date(startYear, i, 1));\n\t\t\tif (next.offset !== last.offset) {\n\t\t\t\tchange = findChange(last, next);\n\t\t\t\toffsets.push(change);\n\t\t\t\toffsets.push(new OffsetAt(new Date(change.at + 6e4)));\n\t\t\t}\n\t\t\tlast = next;\n\t\t}\n\n\t\tfor (i = 0; i < 4; i++) {\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));\n\t\t}\n\n\t\treturn offsets;\n\t}\n\n\tfunction sortZoneScores (a, b) {\n\t\tif (a.offsetScore !== b.offsetScore) {\n\t\t\treturn a.offsetScore - b.offsetScore;\n\t\t}\n\t\tif (a.abbrScore !== b.abbrScore) {\n\t\t\treturn a.abbrScore - b.abbrScore;\n\t\t}\n\t\treturn b.zone.population - a.zone.population;\n\t}\n\n\tfunction addToGuesses (name, offsets) {\n\t\tvar i, offset;\n\t\tarrayToInt(offsets);\n\t\tfor (i = 0; i < offsets.length; i++) {\n\t\t\toffset = offsets[i];\n\t\t\tguesses[offset] = guesses[offset] || {};\n\t\t\tguesses[offset][name] = true;\n\t\t}\n\t}\n\n\tfunction guessesForUserOffsets (offsets) {\n\t\tvar offsetsLength = offsets.length,\n\t\t\tfilteredGuesses = {},\n\t\t\tout = [],\n\t\t\ti, j, guessesOffset;\n\n\t\tfor (i = 0; i < offsetsLength; i++) {\n\t\t\tguessesOffset = guesses[offsets[i].offset] || {};\n\t\t\tfor (j in guessesOffset) {\n\t\t\t\tif (guessesOffset.hasOwnProperty(j)) {\n\t\t\t\t\tfilteredGuesses[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (i in filteredGuesses) {\n\t\t\tif (filteredGuesses.hasOwnProperty(i)) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction rebuildGuess () {\n\n\t\t// use Intl API when available and returning valid time zone\n\t\ttry {\n\t\t\tvar intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\t\t\tif (intlName){\n\t\t\t\tvar name = names[normalizeName(intlName)];\n\t\t\t\tif (name) {\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tlogError(\"Moment Timezone found \" + intlName + \" from the Intl api, but did not have that data loaded.\");\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// Intl unavailable, fall back to manual guessing.\n\t\t}\n\n\t\tvar offsets = userOffsets(),\n\t\t\toffsetsLength = offsets.length,\n\t\t\tguesses = guessesForUserOffsets(offsets),\n\t\t\tzoneScores = [],\n\t\t\tzoneScore, i, j;\n\n\t\tfor (i = 0; i < guesses.length; i++) {\n\t\t\tzoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);\n\t\t\tfor (j = 0; j < offsetsLength; j++) {\n\t\t\t\tzoneScore.scoreOffsetAt(offsets[j]);\n\t\t\t}\n\t\t\tzoneScores.push(zoneScore);\n\t\t}\n\n\t\tzoneScores.sort(sortZoneScores);\n\n\t\treturn zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;\n\t}\n\n\tfunction guess (ignoreCache) {\n\t\tif (!cachedGuess || ignoreCache) {\n\t\t\tcachedGuess = rebuildGuess();\n\t\t}\n\t\treturn cachedGuess;\n\t}\n\n\t/************************************\n\t\tGlobal Methods\n\t************************************/\n\n\tfunction normalizeName (name) {\n\t\treturn (name || '').toLowerCase().replace(/\\//g, '_');\n\t}\n\n\tfunction addZone (packed) {\n\t\tvar i, name, split, normalized;\n\n\t\tif (typeof packed === \"string\") {\n\t\t\tpacked = [packed];\n\t\t}\n\n\t\tfor (i = 0; i < packed.length; i++) {\n\t\t\tsplit = packed[i].split('|');\n\t\t\tname = split[0];\n\t\t\tnormalized = normalizeName(name);\n\t\t\tzones[normalized] = packed[i];\n\t\t\tnames[normalized] = name;\n\t\t\tif (split[5]) {\n\t\t\t\taddToGuesses(normalized, split[2].split(' '));\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getZone (name, caller) {\n\t\tname = normalizeName(name);\n\n\t\tvar zone = zones[name];\n\t\tvar link;\n\n\t\tif (zone instanceof Zone) {\n\t\t\treturn zone;\n\t\t}\n\n\t\tif (typeof zone === 'string') {\n\t\t\tzone = new Zone(zone);\n\t\t\tzones[name] = zone;\n\t\t\treturn zone;\n\t\t}\n\n\t\t// Pass getZone to prevent recursion more than 1 level deep\n\t\tif (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {\n\t\t\tzone = zones[name] = new Zone();\n\t\t\tzone._set(link);\n\t\t\tzone.name = names[name];\n\t\t\treturn zone;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getNames () {\n\t\tvar i, out = [];\n\n\t\tfor (i in names) {\n\t\t\tif (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out.sort();\n\t}\n\n\tfunction addLink (aliases) {\n\t\tvar i, alias, normal0, normal1;\n\n\t\tif (typeof aliases === \"string\") {\n\t\t\taliases = [aliases];\n\t\t}\n\n\t\tfor (i = 0; i < aliases.length; i++) {\n\t\t\talias = aliases[i].split('|');\n\n\t\t\tnormal0 = normalizeName(alias[0]);\n\t\t\tnormal1 = normalizeName(alias[1]);\n\n\t\t\tlinks[normal0] = normal1;\n\t\t\tnames[normal0] = alias[0];\n\n\t\t\tlinks[normal1] = normal0;\n\t\t\tnames[normal1] = alias[1];\n\t\t}\n\t}\n\n\tfunction loadData (data) {\n\t\taddZone(data.zones);\n\t\taddLink(data.links);\n\t\ttz.dataVersion = data.version;\n\t}\n\n\tfunction zoneExists (name) {\n\t\tif (!zoneExists.didShowError) {\n\t\t\tzoneExists.didShowError = true;\n\t\t\t\tlogError(\"moment.tz.zoneExists('\" + name + \"') has been deprecated in favor of !moment.tz.zone('\" + name + \"')\");\n\t\t}\n\t\treturn !!getZone(name);\n\t}\n\n\tfunction needsOffset (m) {\n\t\treturn !!(m._a && (m._tzm === undefined));\n\t}\n\n\tfunction logError (message) {\n\t\tif (typeof console !== 'undefined' && typeof console.error === 'function') {\n\t\t\tconsole.error(message);\n\t\t}\n\t}\n\n\t/************************************\n\t\tmoment.tz namespace\n\t************************************/\n\n\tfunction tz (input) {\n\t\tvar args = Array.prototype.slice.call(arguments, 0, -1),\n\t\t\tname = arguments[arguments.length - 1],\n\t\t\tzone = getZone(name),\n\t\t\tout = moment.utc.apply(null, args);\n\n\t\tif (zone && !moment.isMoment(input) && needsOffset(out)) {\n\t\t\tout.add(zone.parse(out), 'minutes');\n\t\t}\n\n\t\tout.tz(name);\n\n\t\treturn out;\n\t}\n\n\ttz.version = VERSION;\n\ttz.dataVersion = '';\n\ttz._zones = zones;\n\ttz._links = links;\n\ttz._names = names;\n\ttz.add = addZone;\n\ttz.link = addLink;\n\ttz.load = loadData;\n\ttz.zone = getZone;\n\ttz.zoneExists = zoneExists; // deprecated in 0.1.0\n\ttz.guess = guess;\n\ttz.names = getNames;\n\ttz.Zone = Zone;\n\ttz.unpack = unpack;\n\ttz.unpackBase60 = unpackBase60;\n\ttz.needsOffset = needsOffset;\n\ttz.moveInvalidForward = true;\n\ttz.moveAmbiguousForward = false;\n\n\t/************************************\n\t\tInterface with Moment.js\n\t************************************/\n\n\tvar fn = moment.fn;\n\n\tmoment.tz = tz;\n\n\tmoment.defaultZone = null;\n\n\tmoment.updateOffset = function (mom, keepTime) {\n\t\tvar zone = moment.defaultZone,\n\t\t\toffset;\n\n\t\tif (mom._z === undefined) {\n\t\t\tif (zone && needsOffset(mom) && !mom._isUTC) {\n\t\t\t\tmom._d = moment.utc(mom._a)._d;\n\t\t\t\tmom.utc().add(zone.parse(mom), 'minutes');\n\t\t\t}\n\t\t\tmom._z = zone;\n\t\t}\n\t\tif (mom._z) {\n\t\t\toffset = mom._z.offset(mom);\n\t\t\tif (Math.abs(offset) < 16) {\n\t\t\t\toffset = offset / 60;\n\t\t\t}\n\t\t\tif (mom.utcOffset !== undefined) {\n\t\t\t\tmom.utcOffset(-offset, keepTime);\n\t\t\t} else {\n\t\t\t\tmom.zone(offset, keepTime);\n\t\t\t}\n\t\t}\n\t};\n\n\tfn.tz = function (name) {\n\t\tif (name) {\n\t\t\tthis._z = getZone(name);\n\t\t\tif (this._z) {\n\t\t\t\tmoment.updateOffset(this);\n\t\t\t} else {\n\t\t\t\tlogError(\"Moment Timezone has no data for \" + name + \". See http://momentjs.com/timezone/docs/#/data-loading/.\");\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (this._z) { return this._z.name; }\n\t};\n\n\tfunction abbrWrap (old) {\n\t\treturn function () {\n\t\t\tif (this._z) { return this._z.abbr(this); }\n\t\t\treturn old.call(this);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap (old) {\n\t\treturn function () {\n\t\t\tthis._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfn.zoneName = abbrWrap(fn.zoneName);\n\tfn.zoneAbbr = abbrWrap(fn.zoneAbbr);\n\tfn.utc = resetZoneWrap(fn.utc);\n\n\tmoment.tz.setDefault = function(name) {\n\t\tif (major < 2 || (major === 2 && minor < 9)) {\n\t\t\tlogError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');\n\t\t}\n\t\tmoment.defaultZone = name ? getZone(name) : null;\n\t\treturn moment;\n\t};\n\n\t// Cloning a moment should include the _z property.\n\tvar momentProperties = moment.momentProperties;\n\tif (Object.prototype.toString.call(momentProperties) === '[object Array]') {\n\t\t// moment 2.8.1+\n\t\tmomentProperties.push('_z');\n\t\tmomentProperties.push('_a');\n\t} else if (momentProperties) {\n\t\t// moment 2.7.0\n\t\tmomentProperties._z = null;\n\t}\n\n\tloadData({\n\t\t\"version\": \"2016j\",\n\t\t\"zones\": [\n\t\t\t\"Africa/Abidjan|GMT|0|0||48e5\",\n\t\t\t\"Africa/Khartoum|EAT|-30|0||51e5\",\n\t\t\t\"Africa/Algiers|CET|-10|0||26e5\",\n\t\t\t\"Africa/Lagos|WAT|-10|0||17e6\",\n\t\t\t\"Africa/Maputo|CAT|-20|0||26e5\",\n\t\t\t\"Africa/Cairo|EET EEST|-20 -30|010101010|1Cby0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6\",\n\t\t\t\"Africa/Casablanca|WET WEST|0 -10|01010101010101010101010101010101010101010|1Cco0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0|32e5\",\n\t\t\t\"Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6\",\n\t\t\t\"Africa/Johannesburg|SAST|-20|0||84e5\",\n\t\t\t\"Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00|11e5\",\n\t\t\t\"Africa/Windhoek|WAST WAT|-20 -10|01010101010101010101010|1C1c0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|32e4\",\n\t\t\t\"America/Adak|HST HDT|a0 90|01010101010101010101010|1BR00 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326\",\n\t\t\t\"America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1BQX0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4\",\n\t\t\t\"America/Santo_Domingo|AST|40|0||29e5\",\n\t\t\t\"America/Araguaina|BRT BRST|30 20|010|1IdD0 Lz0|14e4\",\n\t\t\t\"America/Argentina/Buenos_Aires|ART|30|0|\",\n\t\t\t\"America/Asuncion|PYST PYT|30 40|01010101010101010101010|1C430 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0|28e5\",\n\t\t\t\"America/Panama|EST|50|0||15e5\",\n\t\t\t\"America/Bahia|BRT BRST|30 20|010|1FJf0 Rb0|27e5\",\n\t\t\t\"America/Bahia_Banderas|MST CDT CST|70 50 60|01212121212121212121212|1C1l0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|84e3\",\n\t\t\t\"America/Fortaleza|BRT|30|0||34e5\",\n\t\t\t\"America/Managua|CST|60|0||22e5\",\n\t\t\t\"America/Manaus|AMT|40|0||19e5\",\n\t\t\t\"America/Bogota|COT|50|0||90e5\",\n\t\t\t\"America/Denver|MST MDT|70 60|01010101010101010101010|1BQV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5\",\n\t\t\t\"America/Campo_Grande|AMST AMT|30 40|01010101010101010101010|1BIr0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10|77e4\",\n\t\t\t\"America/Cancun|CST CDT EST|60 50 50|010101010102|1C1k0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4\",\n\t\t\t\"America/Caracas|VET VET|4u 40|01|1QMT0|29e5\",\n\t\t\t\"America/Cayenne|GFT|30|0||58e3\",\n\t\t\t\"America/Chicago|CST CDT|60 50|01010101010101010101010|1BQU0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5\",\n\t\t\t\"America/Chihuahua|MST MDT|70 60|01010101010101010101010|1C1l0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4\",\n\t\t\t\"America/Phoenix|MST|70|0||42e5\",\n\t\t\t\"America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1BQW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6\",\n\t\t\t\"America/New_York|EST EDT|50 40|01010101010101010101010|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6\",\n\t\t\t\"America/Rio_Branco|AMT ACT|40 50|01|1KLE0|31e4\",\n\t\t\t\"America/Fort_Nelson|PST PDT MST|80 70 70|010101010102|1BQW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2\",\n\t\t\t\"America/Halifax|AST ADT|40 30|01010101010101010101010|1BQS0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4\",\n\t\t\t\"America/Godthab|WGT WGST|30 20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3\",\n\t\t\t\"America/Goose_Bay|AST ADT|40 30|01010101010101010101010|1BQQ1 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2\",\n\t\t\t\"America/Grand_Turk|EST EDT AST|50 40 40|0101010101012|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2\",\n\t\t\t\"America/Guayaquil|ECT|50|0||27e5\",\n\t\t\t\"America/Guyana|GYT|40|0||80e4\",\n\t\t\t\"America/Havana|CST CDT|50 40|01010101010101010101010|1BQR0 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5\",\n\t\t\t\"America/La_Paz|BOT|40|0||19e5\",\n\t\t\t\"America/Lima|PET|50|0||11e6\",\n\t\t\t\"America/Mexico_City|CST CDT|60 50|01010101010101010101010|1C1k0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6\",\n\t\t\t\"America/Metlakatla|PST AKST AKDT|80 90 80|012121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2\",\n\t\t\t\"America/Miquelon|PMST PMDT|30 20|01010101010101010101010|1BQR0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2\",\n\t\t\t\"America/Montevideo|UYST UYT|20 30|010101010101|1BQQ0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5\",\n\t\t\t\"America/Noronha|FNT|20|0||30e2\",\n\t\t\t\"America/North_Dakota/Beulah|MST MDT CST CDT|70 60 60 50|01232323232323232323232|1BQV0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0\",\n\t\t\t\"America/Paramaribo|SRT|30|0||24e4\",\n\t\t\t\"America/Port-au-Prince|EST EDT|50 40|010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5\",\n\t\t\t\"America/Santiago|CLST CLT|30 40|010101010101010101010|1C1f0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0|62e5\",\n\t\t\t\"America/Sao_Paulo|BRST BRT|20 30|01010101010101010101010|1BIq0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10|20e6\",\n\t\t\t\"America/Scoresbysund|EGT EGST|10 0|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|452\",\n\t\t\t\"America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1BQPv 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4\",\n\t\t\t\"Antarctica/Casey|+11 +08|-b0 -80|01010|1BN30 40P0 KL0 blz0|10\",\n\t\t\t\"Antarctica/Davis|+05 +07|-50 -70|0101|1BPw0 3Wn0 KN0|70\",\n\t\t\t\"Antarctica/DumontDUrville|+10|-a0|0||80\",\n\t\t\t\"Antarctica/Macquarie|AEDT MIST|-b0 -b0|01|1C140|1\",\n\t\t\t\"Asia/Tashkent|+05|-50|0||23e5\",\n\t\t\t\"Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1C120 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|14e5\",\n\t\t\t\"Antarctica/Rothera|-03|30|0||130\",\n\t\t\t\"Antarctica/Syowa|+03|-30|0||20\",\n\t\t\t\"Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40\",\n\t\t\t\"Asia/Almaty|+06|-60|0||15e5\",\n\t\t\t\"Asia/Baghdad|AST|-30|0||66e5\",\n\t\t\t\"Asia/Amman|EET EEST|-20 -30|010101010101010101010|1BVy0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|25e5\",\n\t\t\t\"Asia/Kamchatka|+12 +11|-c0 -b0|010|1Dp30 WM0|18e4\",\n\t\t\t\"Asia/Baku|+04 +05|-40 -50|0101010101010|1BWo0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5\",\n\t\t\t\"Asia/Bangkok|ICT|-70|0||15e6\",\n\t\t\t\"Asia/Barnaul|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 3rd0\",\n\t\t\t\"Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1BWm0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5\",\n\t\t\t\"Asia/Brunei|BNT|-80|0||42e4\",\n\t\t\t\"Asia/Kolkata|IST|-5u|0||15e6\",\n\t\t\t\"Asia/Chita|+09 +10 +08|-90 -a0 -80|010120|1BWh0 1qM0 WM0 8Hz0 3re0|33e4\",\n\t\t\t\"Asia/Choibalsan|CHOT CHOST|-80 -90|0101010101010|1O8G0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|38e3\",\n\t\t\t\"Asia/Shanghai|CST|-80|0||23e6\",\n\t\t\t\"Asia/Colombo|+0530|-5u|0||22e5\",\n\t\t\t\"Asia/Dhaka|BDT|-60|0||16e6\",\n\t\t\t\"Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1C0m0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0|26e5\",\n\t\t\t\"Asia/Dili|TLT|-90|0||19e4\",\n\t\t\t\"Asia/Dubai|GST|-40|0||39e5\",\n\t\t\t\"Asia/Famagusta|EET EEST +03|-20 -30 -30|010101010101012|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0\",\n\t\t\t\"Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1BVW1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0|18e5\",\n\t\t\t\"Asia/Hebron|EET EEST|-20 -30|0101010101010101010101010|1BVy0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0|25e4\",\n\t\t\t\"Asia/Hong_Kong|HKT|-80|0||73e5\",\n\t\t\t\"Asia/Hovd|HOVT HOVST|-70 -80|0101010101010|1O8H0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|81e3\",\n\t\t\t\"Asia/Irkutsk|+08 +09|-80 -90|01010|1BWi0 1qM0 WM0 8Hz0|60e4\",\n\t\t\t\"Europe/Istanbul|EET EEST +03|-20 -30 -30|010101010101012|1BWp0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6\",\n\t\t\t\"Asia/Jakarta|WIB|-70|0||31e6\",\n\t\t\t\"Asia/Jayapura|WIT|-90|0||26e4\",\n\t\t\t\"Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1BVA0 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4\",\n\t\t\t\"Asia/Kabul|AFT|-4u|0||46e5\",\n\t\t\t\"Asia/Karachi|PKT|-50|0||24e6\",\n\t\t\t\"Asia/Urumqi|XJT|-60|0||32e5\",\n\t\t\t\"Asia/Kathmandu|NPT|-5J|0||12e5\",\n\t\t\t\"Asia/Khandyga|+10 +11 +09|-a0 -b0 -90|010102|1BWg0 1qM0 WM0 17V0 7zD0|66e2\",\n\t\t\t\"Asia/Krasnoyarsk|+07 +08|-70 -80|01010|1BWj0 1qM0 WM0 8Hz0|10e5\",\n\t\t\t\"Asia/Kuala_Lumpur|MYT|-80|0||71e5\",\n\t\t\t\"Asia/Magadan|+11 +12 +10|-b0 -c0 -a0|010120|1BWf0 1qM0 WM0 8Hz0 3Cq0|95e3\",\n\t\t\t\"Asia/Makassar|WITA|-80|0||15e5\",\n\t\t\t\"Asia/Manila|PHT|-80|0||24e6\",\n\t\t\t\"Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5\",\n\t\t\t\"Asia/Novokuznetsk|+07 +06|-70 -60|010|1Dp80 WM0|55e4\",\n\t\t\t\"Asia/Novosibirsk|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 4eN0|15e5\",\n\t\t\t\"Asia/Omsk|+06 +07|-60 -70|01010|1BWk0 1qM0 WM0 8Hz0|12e5\",\n\t\t\t\"Asia/Pyongyang|KST KST|-90 -8u|01|1P4D0|29e5\",\n\t\t\t\"Asia/Rangoon|MMT|-6u|0||48e5\",\n\t\t\t\"Asia/Sakhalin|+10 +11|-a0 -b0|010101|1BWg0 1qM0 WM0 8Hz0 3rd0|58e4\",\n\t\t\t\"Asia/Seoul|KST|-90|0||23e6\",\n\t\t\t\"Asia/Singapore|SGT|-80|0||56e5\",\n\t\t\t\"Asia/Srednekolymsk|+11 +12|-b0 -c0|01010|1BWf0 1qM0 WM0 8Hz0|35e2\",\n\t\t\t\"Asia/Tbilisi|+04|-40|0||11e5\",\n\t\t\t\"Asia/Tehran|IRST IRDT|-3u -4u|01010101010101010101010|1BTUu 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6\",\n\t\t\t\"Asia/Thimphu|BTT|-60|0||79e3\",\n\t\t\t\"Asia/Tokyo|JST|-90|0||38e6\",\n\t\t\t\"Asia/Tomsk|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 3Qp0|10e5\",\n\t\t\t\"Asia/Ulaanbaatar|ULAT ULAST|-80 -90|0101010101010|1O8G0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|12e5\",\n\t\t\t\"Asia/Ust-Nera|+11 +12 +10|-b0 -c0 -a0|010102|1BWf0 1qM0 WM0 17V0 7zD0|65e2\",\n\t\t\t\"Asia/Vladivostok|+10 +11|-a0 -b0|01010|1BWg0 1qM0 WM0 8Hz0|60e4\",\n\t\t\t\"Asia/Yakutsk|+09 +10|-90 -a0|01010|1BWh0 1qM0 WM0 8Hz0|28e4\",\n\t\t\t\"Asia/Yekaterinburg|+05 +06|-50 -60|01010|1BWl0 1qM0 WM0 8Hz0|14e5\",\n\t\t\t\"Asia/Yerevan|+04 +05|-40 -50|01010|1BWm0 1qM0 WM0 1qM0|13e5\",\n\t\t\t\"Atlantic/Azores|AZOT AZOST|10 0|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4\",\n\t\t\t\"Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5\",\n\t\t\t\"Atlantic/Cape_Verde|CVT|10|0||50e4\",\n\t\t\t\"Atlantic/South_Georgia|GST|20|0||30\",\n\t\t\t\"Atlantic/Stanley|FKST FKT|30 40|010|1C6R0 U10|21e2\",\n\t\t\t\"Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1C140 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|40e5\",\n\t\t\t\"Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1C14u 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|11e5\",\n\t\t\t\"Australia/Brisbane|AEST|-a0|0||20e5\",\n\t\t\t\"Australia/Darwin|ACST|-9u|0||12e4\",\n\t\t\t\"Australia/Eucla|ACWST|-8J|0||368\",\n\t\t\t\"Australia/Lord_Howe|LHDT LHST|-b0 -au|01010101010101010101010|1C130 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu|347\",\n\t\t\t\"Australia/Perth|AWST|-80|0||18e5\",\n\t\t\t\"Pacific/Easter|EASST EAST|50 60|010101010101010101010|1C1f0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0|30e2\",\n\t\t\t\"Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5\",\n\t\t\t\"Etc/GMT+1|-01|10|0|\",\n\t\t\t\"Etc/GMT+10|-10|a0|0|\",\n\t\t\t\"Etc/GMT+11|-11|b0|0|\",\n\t\t\t\"Etc/GMT+12|-12|c0|0|\",\n\t\t\t\"Etc/GMT+2|-02|20|0|\",\n\t\t\t\"Etc/GMT+4|-04|40|0|\",\n\t\t\t\"Etc/GMT+5|-05|50|0|\",\n\t\t\t\"Etc/GMT+6|-06|60|0|\",\n\t\t\t\"Etc/GMT+7|-07|70|0|\",\n\t\t\t\"Etc/GMT+8|-08|80|0|\",\n\t\t\t\"Etc/GMT+9|-09|90|0|\",\n\t\t\t\"Etc/GMT-1|+01|-10|0|\",\n\t\t\t\"Etc/GMT-11|+11|-b0|0|\",\n\t\t\t\"Etc/GMT-12|+12|-c0|0|\",\n\t\t\t\"Etc/GMT-13|+13|-d0|0|\",\n\t\t\t\"Etc/GMT-14|+14|-e0|0|\",\n\t\t\t\"Etc/GMT-2|+02|-20|0|\",\n\t\t\t\"Etc/GMT-7|+07|-70|0|\",\n\t\t\t\"Etc/GMT-8|+08|-80|0|\",\n\t\t\t\"Etc/GMT-9|+09|-90|0|\",\n\t\t\t\"Etc/UCT|UCT|0|0|\",\n\t\t\t\"Etc/UTC|UTC|0|0|\",\n\t\t\t\"Europe/Astrakhan|+03 +04|-30 -40|010101|1BWn0 1qM0 WM0 8Hz0 3rd0\",\n\t\t\t\"Europe/London|GMT BST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6\",\n\t\t\t\"Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1BWo0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4\",\n\t\t\t\"Europe/Kaliningrad|EET EEST +03|-20 -30 -30|01020|1BWo0 1qM0 WM0 8Hz0|44e4\",\n\t\t\t\"Europe/Volgograd|+03 +04|-30 -40|01010|1BWn0 1qM0 WM0 8Hz0|10e5\",\n\t\t\t\"Europe/Minsk|EET EEST +03|-20 -30 -30|0102|1BWo0 1qM0 WM0|19e5\",\n\t\t\t\"Europe/Moscow|MSK MSD MSK|-30 -40 -40|01020|1BWn0 1qM0 WM0 8Hz0|16e6\",\n\t\t\t\"Europe/Samara|+04 +03|-40 -30|010|1Dpb0 WM0|12e5\",\n\t\t\t\"Europe/Saratov|+03 +04|-30 -40|010101|1BWn0 1qM0 WM0 8Hz0 5810\",\n\t\t\t\"Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|01010101023|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4\",\n\t\t\t\"Pacific/Honolulu|HST|a0|0||37e4\",\n\t\t\t\"Indian/Chagos|IOT|-60|0||30e2\",\n\t\t\t\"Indian/Christmas|CXT|-70|0||21e2\",\n\t\t\t\"Indian/Cocos|CCT|-6u|0||596\",\n\t\t\t\"Indian/Mahe|SCT|-40|0||79e3\",\n\t\t\t\"Indian/Maldives|MVT|-50|0||35e4\",\n\t\t\t\"Indian/Mauritius|MUT|-40|0||15e4\",\n\t\t\t\"Indian/Reunion|RET|-40|0||84e4\",\n\t\t\t\"Pacific/Majuro|MHT|-c0|0||28e3\",\n\t\t\t\"MET|MET MEST|-10 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00\",\n\t\t\t\"Pacific/Chatham|CHADT CHAST|-dJ -cJ|01010101010101010101010|1C120 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|600\",\n\t\t\t\"Pacific/Apia|SST SDT WSDT WSST|b0 a0 -e0 -d0|01012323232323232323232|1Dbn0 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|37e3\",\n\t\t\t\"Pacific/Bougainville|PGT BST|-a0 -b0|01|1NwE0|18e4\",\n\t\t\t\"Pacific/Chuuk|CHUT|-a0|0||49e3\",\n\t\t\t\"Pacific/Efate|VUT|-b0|0||66e3\",\n\t\t\t\"Pacific/Enderbury|PHOT|-d0|0||1\",\n\t\t\t\"Pacific/Fakaofo|TKT TKT|b0 -d0|01|1Gfn0|483\",\n\t\t\t\"Pacific/Fiji|FJST FJT|-d0 -c0|01010101010101010101010|1BWe0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0|88e4\",\n\t\t\t\"Pacific/Funafuti|TVT|-c0|0||45e2\",\n\t\t\t\"Pacific/Galapagos|GALT|60|0||25e3\",\n\t\t\t\"Pacific/Gambier|GAMT|90|0||125\",\n\t\t\t\"Pacific/Guadalcanal|SBT|-b0|0||11e4\",\n\t\t\t\"Pacific/Guam|ChST|-a0|0||17e4\",\n\t\t\t\"Pacific/Kiritimati|LINT|-e0|0||51e2\",\n\t\t\t\"Pacific/Kosrae|KOST|-b0|0||66e2\",\n\t\t\t\"Pacific/Marquesas|MART|9u|0||86e2\",\n\t\t\t\"Pacific/Pago_Pago|SST|b0|0||37e2\",\n\t\t\t\"Pacific/Nauru|NRT|-c0|0||10e3\",\n\t\t\t\"Pacific/Niue|NUT|b0|0||12e2\",\n\t\t\t\"Pacific/Norfolk|NFT NFT|-bu -b0|01|1PoCu|25e4\",\n\t\t\t\"Pacific/Noumea|NCT|-b0|0||98e3\",\n\t\t\t\"Pacific/Palau|PWT|-90|0||21e3\",\n\t\t\t\"Pacific/Pitcairn|PST|80|0||56\",\n\t\t\t\"Pacific/Pohnpei|PONT|-b0|0||34e3\",\n\t\t\t\"Pacific/Port_Moresby|PGT|-a0|0||25e4\",\n\t\t\t\"Pacific/Rarotonga|CKT|a0|0||13e3\",\n\t\t\t\"Pacific/Tahiti|TAHT|a0|0||18e4\",\n\t\t\t\"Pacific/Tarawa|GILT|-c0|0||29e3\",\n\t\t\t\"Pacific/Tongatapu|+13 +14|-d0 -e0|0101010101|1S4d0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0|75e3\",\n\t\t\t\"Pacific/Wake|WAKT|-c0|0||16e3\",\n\t\t\t\"Pacific/Wallis|WFT|-c0|0||94\"\n\t\t],\n\t\t\"links\": [\n\t\t\t\"Africa/Abidjan|Africa/Accra\",\n\t\t\t\"Africa/Abidjan|Africa/Bamako\",\n\t\t\t\"Africa/Abidjan|Africa/Banjul\",\n\t\t\t\"Africa/Abidjan|Africa/Bissau\",\n\t\t\t\"Africa/Abidjan|Africa/Conakry\",\n\t\t\t\"Africa/Abidjan|Africa/Dakar\",\n\t\t\t\"Africa/Abidjan|Africa/Freetown\",\n\t\t\t\"Africa/Abidjan|Africa/Lome\",\n\t\t\t\"Africa/Abidjan|Africa/Monrovia\",\n\t\t\t\"Africa/Abidjan|Africa/Nouakchott\",\n\t\t\t\"Africa/Abidjan|Africa/Ouagadougou\",\n\t\t\t\"Africa/Abidjan|Africa/Sao_Tome\",\n\t\t\t\"Africa/Abidjan|Africa/Timbuktu\",\n\t\t\t\"Africa/Abidjan|America/Danmarkshavn\",\n\t\t\t\"Africa/Abidjan|Atlantic/Reykjavik\",\n\t\t\t\"Africa/Abidjan|Atlantic/St_Helena\",\n\t\t\t\"Africa/Abidjan|Etc/GMT\",\n\t\t\t\"Africa/Abidjan|Etc/GMT+0\",\n\t\t\t\"Africa/Abidjan|Etc/GMT-0\",\n\t\t\t\"Africa/Abidjan|Etc/GMT0\",\n\t\t\t\"Africa/Abidjan|Etc/Greenwich\",\n\t\t\t\"Africa/Abidjan|GMT\",\n\t\t\t\"Africa/Abidjan|GMT+0\",\n\t\t\t\"Africa/Abidjan|GMT-0\",\n\t\t\t\"Africa/Abidjan|GMT0\",\n\t\t\t\"Africa/Abidjan|Greenwich\",\n\t\t\t\"Africa/Abidjan|Iceland\",\n\t\t\t\"Africa/Algiers|Africa/Tunis\",\n\t\t\t\"Africa/Cairo|Egypt\",\n\t\t\t\"Africa/Casablanca|Africa/El_Aaiun\",\n\t\t\t\"Africa/Johannesburg|Africa/Maseru\",\n\t\t\t\"Africa/Johannesburg|Africa/Mbabane\",\n\t\t\t\"Africa/Khartoum|Africa/Addis_Ababa\",\n\t\t\t\"Africa/Khartoum|Africa/Asmara\",\n\t\t\t\"Africa/Khartoum|Africa/Asmera\",\n\t\t\t\"Africa/Khartoum|Africa/Dar_es_Salaam\",\n\t\t\t\"Africa/Khartoum|Africa/Djibouti\",\n\t\t\t\"Africa/Khartoum|Africa/Juba\",\n\t\t\t\"Africa/Khartoum|Africa/Kampala\",\n\t\t\t\"Africa/Khartoum|Africa/Mogadishu\",\n\t\t\t\"Africa/Khartoum|Africa/Nairobi\",\n\t\t\t\"Africa/Khartoum|Indian/Antananarivo\",\n\t\t\t\"Africa/Khartoum|Indian/Comoro\",\n\t\t\t\"Africa/Khartoum|Indian/Mayotte\",\n\t\t\t\"Africa/Lagos|Africa/Bangui\",\n\t\t\t\"Africa/Lagos|Africa/Brazzaville\",\n\t\t\t\"Africa/Lagos|Africa/Douala\",\n\t\t\t\"Africa/Lagos|Africa/Kinshasa\",\n\t\t\t\"Africa/Lagos|Africa/Libreville\",\n\t\t\t\"Africa/Lagos|Africa/Luanda\",\n\t\t\t\"Africa/Lagos|Africa/Malabo\",\n\t\t\t\"Africa/Lagos|Africa/Ndjamena\",\n\t\t\t\"Africa/Lagos|Africa/Niamey\",\n\t\t\t\"Africa/Lagos|Africa/Porto-Novo\",\n\t\t\t\"Africa/Maputo|Africa/Blantyre\",\n\t\t\t\"Africa/Maputo|Africa/Bujumbura\",\n\t\t\t\"Africa/Maputo|Africa/Gaborone\",\n\t\t\t\"Africa/Maputo|Africa/Harare\",\n\t\t\t\"Africa/Maputo|Africa/Kigali\",\n\t\t\t\"Africa/Maputo|Africa/Lubumbashi\",\n\t\t\t\"Africa/Maputo|Africa/Lusaka\",\n\t\t\t\"Africa/Tripoli|Libya\",\n\t\t\t\"America/Adak|America/Atka\",\n\t\t\t\"America/Adak|US/Aleutian\",\n\t\t\t\"America/Anchorage|America/Juneau\",\n\t\t\t\"America/Anchorage|America/Nome\",\n\t\t\t\"America/Anchorage|America/Sitka\",\n\t\t\t\"America/Anchorage|America/Yakutat\",\n\t\t\t\"America/Anchorage|US/Alaska\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/Catamarca\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/ComodRivadavia\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/Cordoba\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/Jujuy\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/La_Rioja\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/Mendoza\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/Rio_Gallegos\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/Salta\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/San_Juan\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/San_Luis\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/Tucuman\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Argentina/Ushuaia\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Buenos_Aires\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Catamarca\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Cordoba\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Jujuy\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Mendoza\",\n\t\t\t\"America/Argentina/Buenos_Aires|America/Rosario\",\n\t\t\t\"America/Campo_Grande|America/Cuiaba\",\n\t\t\t\"America/Chicago|America/Indiana/Knox\",\n\t\t\t\"America/Chicago|America/Indiana/Tell_City\",\n\t\t\t\"America/Chicago|America/Knox_IN\",\n\t\t\t\"America/Chicago|America/Matamoros\",\n\t\t\t\"America/Chicago|America/Menominee\",\n\t\t\t\"America/Chicago|America/North_Dakota/Center\",\n\t\t\t\"America/Chicago|America/North_Dakota/New_Salem\",\n\t\t\t\"America/Chicago|America/Rainy_River\",\n\t\t\t\"America/Chicago|America/Rankin_Inlet\",\n\t\t\t\"America/Chicago|America/Resolute\",\n\t\t\t\"America/Chicago|America/Winnipeg\",\n\t\t\t\"America/Chicago|CST6CDT\",\n\t\t\t\"America/Chicago|Canada/Central\",\n\t\t\t\"America/Chicago|US/Central\",\n\t\t\t\"America/Chicago|US/Indiana-Starke\",\n\t\t\t\"America/Chihuahua|America/Mazatlan\",\n\t\t\t\"America/Chihuahua|Mexico/BajaSur\",\n\t\t\t\"America/Denver|America/Boise\",\n\t\t\t\"America/Denver|America/Cambridge_Bay\",\n\t\t\t\"America/Denver|America/Edmonton\",\n\t\t\t\"America/Denver|America/Inuvik\",\n\t\t\t\"America/Denver|America/Ojinaga\",\n\t\t\t\"America/Denver|America/Shiprock\",\n\t\t\t\"America/Denver|America/Yellowknife\",\n\t\t\t\"America/Denver|Canada/Mountain\",\n\t\t\t\"America/Denver|MST7MDT\",\n\t\t\t\"America/Denver|Navajo\",\n\t\t\t\"America/Denver|US/Mountain\",\n\t\t\t\"America/Fortaleza|America/Belem\",\n\t\t\t\"America/Fortaleza|America/Maceio\",\n\t\t\t\"America/Fortaleza|America/Recife\",\n\t\t\t\"America/Fortaleza|America/Santarem\",\n\t\t\t\"America/Halifax|America/Glace_Bay\",\n\t\t\t\"America/Halifax|America/Moncton\",\n\t\t\t\"America/Halifax|America/Thule\",\n\t\t\t\"America/Halifax|Atlantic/Bermuda\",\n\t\t\t\"America/Halifax|Canada/Atlantic\",\n\t\t\t\"America/Havana|Cuba\",\n\t\t\t\"America/Los_Angeles|America/Dawson\",\n\t\t\t\"America/Los_Angeles|America/Ensenada\",\n\t\t\t\"America/Los_Angeles|America/Santa_Isabel\",\n\t\t\t\"America/Los_Angeles|America/Tijuana\",\n\t\t\t\"America/Los_Angeles|America/Vancouver\",\n\t\t\t\"America/Los_Angeles|America/Whitehorse\",\n\t\t\t\"America/Los_Angeles|Canada/Pacific\",\n\t\t\t\"America/Los_Angeles|Canada/Yukon\",\n\t\t\t\"America/Los_Angeles|Mexico/BajaNorte\",\n\t\t\t\"America/Los_Angeles|PST8PDT\",\n\t\t\t\"America/Los_Angeles|US/Pacific\",\n\t\t\t\"America/Los_Angeles|US/Pacific-New\",\n\t\t\t\"America/Managua|America/Belize\",\n\t\t\t\"America/Managua|America/Costa_Rica\",\n\t\t\t\"America/Managua|America/El_Salvador\",\n\t\t\t\"America/Managua|America/Guatemala\",\n\t\t\t\"America/Managua|America/Regina\",\n\t\t\t\"America/Managua|America/Swift_Current\",\n\t\t\t\"America/Managua|America/Tegucigalpa\",\n\t\t\t\"America/Managua|Canada/East-Saskatchewan\",\n\t\t\t\"America/Managua|Canada/Saskatchewan\",\n\t\t\t\"America/Manaus|America/Boa_Vista\",\n\t\t\t\"America/Manaus|America/Porto_Velho\",\n\t\t\t\"America/Manaus|Brazil/West\",\n\t\t\t\"America/Mexico_City|America/Merida\",\n\t\t\t\"America/Mexico_City|America/Monterrey\",\n\t\t\t\"America/Mexico_City|Mexico/General\",\n\t\t\t\"America/New_York|America/Detroit\",\n\t\t\t\"America/New_York|America/Fort_Wayne\",\n\t\t\t\"America/New_York|America/Indiana/Indianapolis\",\n\t\t\t\"America/New_York|America/Indiana/Marengo\",\n\t\t\t\"America/New_York|America/Indiana/Petersburg\",\n\t\t\t\"America/New_York|America/Indiana/Vevay\",\n\t\t\t\"America/New_York|America/Indiana/Vincennes\",\n\t\t\t\"America/New_York|America/Indiana/Winamac\",\n\t\t\t\"America/New_York|America/Indianapolis\",\n\t\t\t\"America/New_York|America/Iqaluit\",\n\t\t\t\"America/New_York|America/Kentucky/Louisville\",\n\t\t\t\"America/New_York|America/Kentucky/Monticello\",\n\t\t\t\"America/New_York|America/Louisville\",\n\t\t\t\"America/New_York|America/Montreal\",\n\t\t\t\"America/New_York|America/Nassau\",\n\t\t\t\"America/New_York|America/Nipigon\",\n\t\t\t\"America/New_York|America/Pangnirtung\",\n\t\t\t\"America/New_York|America/Thunder_Bay\",\n\t\t\t\"America/New_York|America/Toronto\",\n\t\t\t\"America/New_York|Canada/Eastern\",\n\t\t\t\"America/New_York|EST5EDT\",\n\t\t\t\"America/New_York|US/East-Indiana\",\n\t\t\t\"America/New_York|US/Eastern\",\n\t\t\t\"America/New_York|US/Michigan\",\n\t\t\t\"America/Noronha|Brazil/DeNoronha\",\n\t\t\t\"America/Panama|America/Atikokan\",\n\t\t\t\"America/Panama|America/Cayman\",\n\t\t\t\"America/Panama|America/Coral_Harbour\",\n\t\t\t\"America/Panama|America/Jamaica\",\n\t\t\t\"America/Panama|EST\",\n\t\t\t\"America/Panama|Jamaica\",\n\t\t\t\"America/Phoenix|America/Creston\",\n\t\t\t\"America/Phoenix|America/Dawson_Creek\",\n\t\t\t\"America/Phoenix|America/Hermosillo\",\n\t\t\t\"America/Phoenix|MST\",\n\t\t\t\"America/Phoenix|US/Arizona\",\n\t\t\t\"America/Rio_Branco|America/Eirunepe\",\n\t\t\t\"America/Rio_Branco|America/Porto_Acre\",\n\t\t\t\"America/Rio_Branco|Brazil/Acre\",\n\t\t\t\"America/Santiago|Antarctica/Palmer\",\n\t\t\t\"America/Santiago|Chile/Continental\",\n\t\t\t\"America/Santo_Domingo|America/Anguilla\",\n\t\t\t\"America/Santo_Domingo|America/Antigua\",\n\t\t\t\"America/Santo_Domingo|America/Aruba\",\n\t\t\t\"America/Santo_Domingo|America/Barbados\",\n\t\t\t\"America/Santo_Domingo|America/Blanc-Sablon\",\n\t\t\t\"America/Santo_Domingo|America/Curacao\",\n\t\t\t\"America/Santo_Domingo|America/Dominica\",\n\t\t\t\"America/Santo_Domingo|America/Grenada\",\n\t\t\t\"America/Santo_Domingo|America/Guadeloupe\",\n\t\t\t\"America/Santo_Domingo|America/Kralendijk\",\n\t\t\t\"America/Santo_Domingo|America/Lower_Princes\",\n\t\t\t\"America/Santo_Domingo|America/Marigot\",\n\t\t\t\"America/Santo_Domingo|America/Martinique\",\n\t\t\t\"America/Santo_Domingo|America/Montserrat\",\n\t\t\t\"America/Santo_Domingo|America/Port_of_Spain\",\n\t\t\t\"America/Santo_Domingo|America/Puerto_Rico\",\n\t\t\t\"America/Santo_Domingo|America/St_Barthelemy\",\n\t\t\t\"America/Santo_Domingo|America/St_Kitts\",\n\t\t\t\"America/Santo_Domingo|America/St_Lucia\",\n\t\t\t\"America/Santo_Domingo|America/St_Thomas\",\n\t\t\t\"America/Santo_Domingo|America/St_Vincent\",\n\t\t\t\"America/Santo_Domingo|America/Tortola\",\n\t\t\t\"America/Santo_Domingo|America/Virgin\",\n\t\t\t\"America/Sao_Paulo|Brazil/East\",\n\t\t\t\"America/St_Johns|Canada/Newfoundland\",\n\t\t\t\"Antarctica/DumontDUrville|Etc/GMT-10\",\n\t\t\t\"Antarctica/Rothera|Etc/GMT+3\",\n\t\t\t\"Antarctica/Syowa|Etc/GMT-3\",\n\t\t\t\"Asia/Almaty|Antarctica/Vostok\",\n\t\t\t\"Asia/Almaty|Asia/Bishkek\",\n\t\t\t\"Asia/Almaty|Asia/Qyzylorda\",\n\t\t\t\"Asia/Almaty|Etc/GMT-6\",\n\t\t\t\"Asia/Baghdad|Asia/Aden\",\n\t\t\t\"Asia/Baghdad|Asia/Bahrain\",\n\t\t\t\"Asia/Baghdad|Asia/Kuwait\",\n\t\t\t\"Asia/Baghdad|Asia/Qatar\",\n\t\t\t\"Asia/Baghdad|Asia/Riyadh\",\n\t\t\t\"Asia/Bangkok|Asia/Ho_Chi_Minh\",\n\t\t\t\"Asia/Bangkok|Asia/Phnom_Penh\",\n\t\t\t\"Asia/Bangkok|Asia/Saigon\",\n\t\t\t\"Asia/Bangkok|Asia/Vientiane\",\n\t\t\t\"Asia/Dhaka|Asia/Dacca\",\n\t\t\t\"Asia/Dubai|Asia/Muscat\",\n\t\t\t\"Asia/Hong_Kong|Hongkong\",\n\t\t\t\"Asia/Jakarta|Asia/Pontianak\",\n\t\t\t\"Asia/Jerusalem|Asia/Tel_Aviv\",\n\t\t\t\"Asia/Jerusalem|Israel\",\n\t\t\t\"Asia/Kamchatka|Asia/Anadyr\",\n\t\t\t\"Asia/Kathmandu|Asia/Katmandu\",\n\t\t\t\"Asia/Kolkata|Asia/Calcutta\",\n\t\t\t\"Asia/Kuala_Lumpur|Asia/Kuching\",\n\t\t\t\"Asia/Makassar|Asia/Ujung_Pandang\",\n\t\t\t\"Asia/Rangoon|Asia/Yangon\",\n\t\t\t\"Asia/Seoul|ROK\",\n\t\t\t\"Asia/Shanghai|Asia/Chongqing\",\n\t\t\t\"Asia/Shanghai|Asia/Chungking\",\n\t\t\t\"Asia/Shanghai|Asia/Harbin\",\n\t\t\t\"Asia/Shanghai|Asia/Macao\",\n\t\t\t\"Asia/Shanghai|Asia/Macau\",\n\t\t\t\"Asia/Shanghai|Asia/Taipei\",\n\t\t\t\"Asia/Shanghai|PRC\",\n\t\t\t\"Asia/Shanghai|ROC\",\n\t\t\t\"Asia/Singapore|Singapore\",\n\t\t\t\"Asia/Tashkent|Antarctica/Mawson\",\n\t\t\t\"Asia/Tashkent|Asia/Aqtau\",\n\t\t\t\"Asia/Tashkent|Asia/Aqtobe\",\n\t\t\t\"Asia/Tashkent|Asia/Ashgabat\",\n\t\t\t\"Asia/Tashkent|Asia/Ashkhabad\",\n\t\t\t\"Asia/Tashkent|Asia/Atyrau\",\n\t\t\t\"Asia/Tashkent|Asia/Dushanbe\",\n\t\t\t\"Asia/Tashkent|Asia/Oral\",\n\t\t\t\"Asia/Tashkent|Asia/Samarkand\",\n\t\t\t\"Asia/Tashkent|Etc/GMT-5\",\n\t\t\t\"Asia/Tashkent|Indian/Kerguelen\",\n\t\t\t\"Asia/Tbilisi|Etc/GMT-4\",\n\t\t\t\"Asia/Tehran|Iran\",\n\t\t\t\"Asia/Thimphu|Asia/Thimbu\",\n\t\t\t\"Asia/Tokyo|Japan\",\n\t\t\t\"Asia/Ulaanbaatar|Asia/Ulan_Bator\",\n\t\t\t\"Asia/Urumqi|Asia/Kashgar\",\n\t\t\t\"Australia/Adelaide|Australia/Broken_Hill\",\n\t\t\t\"Australia/Adelaide|Australia/South\",\n\t\t\t\"Australia/Adelaide|Australia/Yancowinna\",\n\t\t\t\"Australia/Brisbane|Australia/Lindeman\",\n\t\t\t\"Australia/Brisbane|Australia/Queensland\",\n\t\t\t\"Australia/Darwin|Australia/North\",\n\t\t\t\"Australia/Lord_Howe|Australia/LHI\",\n\t\t\t\"Australia/Perth|Australia/West\",\n\t\t\t\"Australia/Sydney|Australia/ACT\",\n\t\t\t\"Australia/Sydney|Australia/Canberra\",\n\t\t\t\"Australia/Sydney|Australia/Currie\",\n\t\t\t\"Australia/Sydney|Australia/Hobart\",\n\t\t\t\"Australia/Sydney|Australia/Melbourne\",\n\t\t\t\"Australia/Sydney|Australia/NSW\",\n\t\t\t\"Australia/Sydney|Australia/Tasmania\",\n\t\t\t\"Australia/Sydney|Australia/Victoria\",\n\t\t\t\"Etc/UCT|UCT\",\n\t\t\t\"Etc/UTC|Etc/Universal\",\n\t\t\t\"Etc/UTC|Etc/Zulu\",\n\t\t\t\"Etc/UTC|UTC\",\n\t\t\t\"Etc/UTC|Universal\",\n\t\t\t\"Etc/UTC|Zulu\",\n\t\t\t\"Europe/Astrakhan|Europe/Ulyanovsk\",\n\t\t\t\"Europe/Athens|Asia/Nicosia\",\n\t\t\t\"Europe/Athens|EET\",\n\t\t\t\"Europe/Athens|Europe/Bucharest\",\n\t\t\t\"Europe/Athens|Europe/Helsinki\",\n\t\t\t\"Europe/Athens|Europe/Kiev\",\n\t\t\t\"Europe/Athens|Europe/Mariehamn\",\n\t\t\t\"Europe/Athens|Europe/Nicosia\",\n\t\t\t\"Europe/Athens|Europe/Riga\",\n\t\t\t\"Europe/Athens|Europe/Sofia\",\n\t\t\t\"Europe/Athens|Europe/Tallinn\",\n\t\t\t\"Europe/Athens|Europe/Uzhgorod\",\n\t\t\t\"Europe/Athens|Europe/Vilnius\",\n\t\t\t\"Europe/Athens|Europe/Zaporozhye\",\n\t\t\t\"Europe/Chisinau|Europe/Tiraspol\",\n\t\t\t\"Europe/Dublin|Eire\",\n\t\t\t\"Europe/Istanbul|Asia/Istanbul\",\n\t\t\t\"Europe/Istanbul|Turkey\",\n\t\t\t\"Europe/Lisbon|Atlantic/Canary\",\n\t\t\t\"Europe/Lisbon|Atlantic/Faeroe\",\n\t\t\t\"Europe/Lisbon|Atlantic/Faroe\",\n\t\t\t\"Europe/Lisbon|Atlantic/Madeira\",\n\t\t\t\"Europe/Lisbon|Portugal\",\n\t\t\t\"Europe/Lisbon|WET\",\n\t\t\t\"Europe/London|Europe/Belfast\",\n\t\t\t\"Europe/London|Europe/Guernsey\",\n\t\t\t\"Europe/London|Europe/Isle_of_Man\",\n\t\t\t\"Europe/London|Europe/Jersey\",\n\t\t\t\"Europe/London|GB\",\n\t\t\t\"Europe/London|GB-Eire\",\n\t\t\t\"Europe/Moscow|W-SU\",\n\t\t\t\"Europe/Paris|Africa/Ceuta\",\n\t\t\t\"Europe/Paris|Arctic/Longyearbyen\",\n\t\t\t\"Europe/Paris|Atlantic/Jan_Mayen\",\n\t\t\t\"Europe/Paris|CET\",\n\t\t\t\"Europe/Paris|Europe/Amsterdam\",\n\t\t\t\"Europe/Paris|Europe/Andorra\",\n\t\t\t\"Europe/Paris|Europe/Belgrade\",\n\t\t\t\"Europe/Paris|Europe/Berlin\",\n\t\t\t\"Europe/Paris|Europe/Bratislava\",\n\t\t\t\"Europe/Paris|Europe/Brussels\",\n\t\t\t\"Europe/Paris|Europe/Budapest\",\n\t\t\t\"Europe/Paris|Europe/Busingen\",\n\t\t\t\"Europe/Paris|Europe/Copenhagen\",\n\t\t\t\"Europe/Paris|Europe/Gibraltar\",\n\t\t\t\"Europe/Paris|Europe/Ljubljana\",\n\t\t\t\"Europe/Paris|Europe/Luxembourg\",\n\t\t\t\"Europe/Paris|Europe/Madrid\",\n\t\t\t\"Europe/Paris|Europe/Malta\",\n\t\t\t\"Europe/Paris|Europe/Monaco\",\n\t\t\t\"Europe/Paris|Europe/Oslo\",\n\t\t\t\"Europe/Paris|Europe/Podgorica\",\n\t\t\t\"Europe/Paris|Europe/Prague\",\n\t\t\t\"Europe/Paris|Europe/Rome\",\n\t\t\t\"Europe/Paris|Europe/San_Marino\",\n\t\t\t\"Europe/Paris|Europe/Sarajevo\",\n\t\t\t\"Europe/Paris|Europe/Skopje\",\n\t\t\t\"Europe/Paris|Europe/Stockholm\",\n\t\t\t\"Europe/Paris|Europe/Tirane\",\n\t\t\t\"Europe/Paris|Europe/Vaduz\",\n\t\t\t\"Europe/Paris|Europe/Vatican\",\n\t\t\t\"Europe/Paris|Europe/Vienna\",\n\t\t\t\"Europe/Paris|Europe/Warsaw\",\n\t\t\t\"Europe/Paris|Europe/Zagreb\",\n\t\t\t\"Europe/Paris|Europe/Zurich\",\n\t\t\t\"Europe/Paris|Poland\",\n\t\t\t\"Europe/Volgograd|Europe/Kirov\",\n\t\t\t\"Pacific/Auckland|Antarctica/McMurdo\",\n\t\t\t\"Pacific/Auckland|Antarctica/South_Pole\",\n\t\t\t\"Pacific/Auckland|NZ\",\n\t\t\t\"Pacific/Chatham|NZ-CHAT\",\n\t\t\t\"Pacific/Chuuk|Pacific/Truk\",\n\t\t\t\"Pacific/Chuuk|Pacific/Yap\",\n\t\t\t\"Pacific/Easter|Chile/EasterIsland\",\n\t\t\t\"Pacific/Guam|Pacific/Saipan\",\n\t\t\t\"Pacific/Honolulu|HST\",\n\t\t\t\"Pacific/Honolulu|Pacific/Johnston\",\n\t\t\t\"Pacific/Honolulu|US/Hawaii\",\n\t\t\t\"Pacific/Majuro|Kwajalein\",\n\t\t\t\"Pacific/Majuro|Pacific/Kwajalein\",\n\t\t\t\"Pacific/Pago_Pago|Pacific/Midway\",\n\t\t\t\"Pacific/Pago_Pago|Pacific/Samoa\",\n\t\t\t\"Pacific/Pago_Pago|US/Samoa\",\n\t\t\t\"Pacific/Pohnpei|Pacific/Ponape\"\n\t\t]\n\t});\n\n\n\treturn moment;\n}));\n","/** vim: et:ts=4:sw=4:sts=4\n * @license RequireJS 2.1.22 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/jrburke/requirejs for details\n */\n//Not using strict: uneven strict support in browsers, #392, and causes\n//problems with requirejs.exec()/transpiler plugins that may not be strict.\n/*jslint regexp: true, nomen: true, sloppy: true */\n/*global window, navigator, document, importScripts, setTimeout, opera */\n\nvar requirejs, require, define;\n(function (global) {\n var req, s, head, baseElement, dataMain, src,\n interactiveScript, currentlyAddingScript, mainScript, subPath,\n version = '2.1.22',\n commentRegExp = /(\\/\\*([\\s\\S]*?)\\*\\/|([^:]|^)\\/\\/(.*)$)/mg,\n cjsRequireRegExp = /[^.]\\s*require\\s*\\(\\s*[\"']([^'\"\\s]+)[\"']\\s*\\)/g,\n jsSuffixRegExp = /\\.js$/,\n currDirRegExp = /^\\.\\//,\n op = Object.prototype,\n ostring = op.toString,\n hasOwn = op.hasOwnProperty,\n ap = Array.prototype,\n isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),\n isWebWorker = !isBrowser && typeof importScripts !== 'undefined',\n //PS3 indicates loaded and complete, but need to wait for complete\n //specifically. Sequence is 'loading', 'loaded', execution,\n // then 'complete'. The UA check is unfortunate, but not sure how\n //to feature test w/o causing perf issues.\n readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?\n /^complete$/ : /^(complete|loaded)$/,\n defContextName = '_',\n //Oh the tragedy, detecting opera. See the usage of isOpera for reason.\n isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',\n contexts = {},\n cfg = {},\n globalDefQueue = [],\n useInteractive = false;\n\n function isFunction(it) {\n return ostring.call(it) === '[object Function]';\n }\n\n function isArray(it) {\n return ostring.call(it) === '[object Array]';\n }\n\n /**\n * Helper function for iterating over an array. If the func returns\n * a true value, it will break out of the loop.\n */\n function each(ary, func) {\n if (ary) {\n var i;\n for (i = 0; i < ary.length; i += 1) {\n if (ary[i] && func(ary[i], i, ary)) {\n break;\n }\n }\n }\n }\n\n /**\n * Helper function for iterating over an array backwards. If the func\n * returns a true value, it will break out of the loop.\n */\n function eachReverse(ary, func) {\n if (ary) {\n var i;\n for (i = ary.length - 1; i > -1; i -= 1) {\n if (ary[i] && func(ary[i], i, ary)) {\n break;\n }\n }\n }\n }\n\n function hasProp(obj, prop) {\n return hasOwn.call(obj, prop);\n }\n\n function getOwn(obj, prop) {\n return hasProp(obj, prop) && obj[prop];\n }\n\n /**\n * Cycles over properties in an object and calls a function for each\n * property value. If the function returns a truthy value, then the\n * iteration is stopped.\n */\n function eachProp(obj, func) {\n var prop;\n for (prop in obj) {\n if (hasProp(obj, prop)) {\n if (func(obj[prop], prop)) {\n break;\n }\n }\n }\n }\n\n /**\n * Simple function to mix in properties from source into target,\n * but only if target does not already have a property of the same name.\n */\n function mixin(target, source, force, deepStringMixin) {\n if (source) {\n eachProp(source, function (value, prop) {\n if (force || !hasProp(target, prop)) {\n if (deepStringMixin && typeof value === 'object' && value &&\n !isArray(value) && !isFunction(value) &&\n !(value instanceof RegExp)) {\n\n if (!target[prop]) {\n target[prop] = {};\n }\n mixin(target[prop], value, force, deepStringMixin);\n } else {\n target[prop] = value;\n }\n }\n });\n }\n return target;\n }\n\n //Similar to Function.prototype.bind, but the 'this' object is specified\n //first, since it is easier to read/figure out what 'this' will be.\n function bind(obj, fn) {\n return function () {\n return fn.apply(obj, arguments);\n };\n }\n\n function scripts() {\n return document.getElementsByTagName('script');\n }\n\n function defaultOnError(err) {\n throw err;\n }\n\n //Allow getting a global that is expressed in\n //dot notation, like 'a.b.c'.\n function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }\n\n /**\n * Constructs an error with a pointer to an URL with more information.\n * @param {String} id the error ID that maps to an ID on a web page.\n * @param {String} message human readable error.\n * @param {Error} [err] the original error, if there is one.\n *\n * @returns {Error}\n */\n function makeError(id, msg, err, requireModules) {\n var e = new Error(msg + '\\nhttp://requirejs.org/docs/errors.html#' + id);\n e.requireType = id;\n e.requireModules = requireModules;\n if (err) {\n e.originalError = err;\n }\n return e;\n }\n\n if (typeof define !== 'undefined') {\n //If a define is already in play via another AMD loader,\n //do not overwrite.\n return;\n }\n\n if (typeof requirejs !== 'undefined') {\n if (isFunction(requirejs)) {\n //Do not overwrite an existing requirejs instance.\n return;\n }\n cfg = requirejs;\n requirejs = undefined;\n }\n\n //Allow for a require config object\n if (typeof require !== 'undefined' && !isFunction(require)) {\n //assume it is a config object.\n cfg = require;\n require = undefined;\n }\n\n function newContext(contextName) {\n var inCheckLoaded, Module, context, handlers,\n checkLoadedTimeoutId,\n config = {\n //Defaults. Do not set a default for map\n //config to speed up normalize(), which\n //will run faster if there is no default.\n waitSeconds: 7,\n baseUrl: './',\n paths: {},\n bundles: {},\n pkgs: {},\n shim: {},\n config: {}\n },\n registry = {},\n //registry of just enabled modules, to speed\n //cycle breaking code when lots of modules\n //are registered, but not activated.\n enabledRegistry = {},\n undefEvents = {},\n defQueue = [],\n defined = {},\n urlFetched = {},\n bundlesMap = {},\n requireCounter = 1,\n unnormalizedCounter = 1;\n\n /**\n * Trims the . and .. from an array of path segments.\n * It will keep a leading path segment if a .. will become\n * the first path segment, to help with module name lookups,\n * which act like paths, but can be remapped. But the end result,\n * all paths that use this function should look normalized.\n * NOTE: this method MODIFIES the input array.\n * @param {Array} ary the array of path segments.\n */\n function trimDots(ary) {\n var i, part;\n for (i = 0; i < ary.length; i++) {\n part = ary[i];\n if (part === '.') {\n ary.splice(i, 1);\n i -= 1;\n } else if (part === '..') {\n // If at the start, or previous value is still ..,\n // keep them so that when converted to a path it may\n // still work when converted to a path, even though\n // as an ID it is less than ideal. In larger point\n // releases, may be better to just kick out an error.\n if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') {\n continue;\n } else if (i > 0) {\n ary.splice(i - 1, 2);\n i -= 2;\n }\n }\n }\n }\n\n /**\n * Given a relative module name, like ./something, normalize it to\n * a real name that can be mapped to a path.\n * @param {String} name the relative name\n * @param {String} baseName a real name that the name arg is relative\n * to.\n * @param {Boolean} applyMap apply the map config to the value. Should\n * only be done if this normalization is for a dependency ID.\n * @returns {String} normalized name\n */\n function normalize(name, baseName, applyMap) {\n var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,\n foundMap, foundI, foundStarMap, starI, normalizedBaseParts,\n baseParts = (baseName && baseName.split('/')),\n map = config.map,\n starMap = map && map['*'];\n\n //Adjust any relative paths.\n if (name) {\n name = name.split('/');\n lastIndex = name.length - 1;\n\n // If wanting node ID compatibility, strip .js from end\n // of IDs. Have to do this here, and not in nameToUrl\n // because node allows either .js or non .js to map\n // to same file.\n if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\n name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\n }\n\n // Starts with a '.' so need the baseName\n if (name[0].charAt(0) === '.' && baseParts) {\n //Convert baseName to array, and lop off the last part,\n //so that . matches that 'directory' and not name of the baseName's\n //module. For instance, baseName of 'one/two/three', maps to\n //'one/two/three.js', but we want the directory, 'one/two' for\n //this normalization.\n normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);\n name = normalizedBaseParts.concat(name);\n }\n\n trimDots(name);\n name = name.join('/');\n }\n\n //Apply map config if available.\n if (applyMap && map && (baseParts || starMap)) {\n nameParts = name.split('/');\n\n outerLoop: for (i = nameParts.length; i > 0; i -= 1) {\n nameSegment = nameParts.slice(0, i).join('/');\n\n if (baseParts) {\n //Find the longest baseName segment match in the config.\n //So, do joins on the biggest to smallest lengths of baseParts.\n for (j = baseParts.length; j > 0; j -= 1) {\n mapValue = getOwn(map, baseParts.slice(0, j).join('/'));\n\n //baseName segment has config, find if it has one for\n //this name.\n if (mapValue) {\n mapValue = getOwn(mapValue, nameSegment);\n if (mapValue) {\n //Match, update name to the new value.\n foundMap = mapValue;\n foundI = i;\n break outerLoop;\n }\n }\n }\n }\n\n //Check for a star map match, but just hold on to it,\n //if there is a shorter segment match later in a matching\n //config, then favor over this star map.\n if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {\n foundStarMap = getOwn(starMap, nameSegment);\n starI = i;\n }\n }\n\n if (!foundMap && foundStarMap) {\n foundMap = foundStarMap;\n foundI = starI;\n }\n\n if (foundMap) {\n nameParts.splice(0, foundI, foundMap);\n name = nameParts.join('/');\n }\n }\n\n // If the name points to a package's name, use\n // the package main instead.\n pkgMain = getOwn(config.pkgs, name);\n\n return pkgMain ? pkgMain : name;\n }\n\n function removeScript(name) {\n if (isBrowser) {\n each(scripts(), function (scriptNode) {\n if (scriptNode.getAttribute('data-requiremodule') === name &&\n scriptNode.getAttribute('data-requirecontext') === context.contextName) {\n scriptNode.parentNode.removeChild(scriptNode);\n return true;\n }\n });\n }\n }\n\n function hasPathFallback(id) {\n var pathConfig = getOwn(config.paths, id);\n if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {\n //Pop off the first array value, since it failed, and\n //retry\n pathConfig.shift();\n context.require.undef(id);\n\n //Custom require that does not do map translation, since\n //ID is \"absolute\", already mapped/resolved.\n context.makeRequire(null, {\n skipMap: true\n })([id]);\n\n return true;\n }\n }\n\n //Turns a plugin!resource to [plugin, resource]\n //with the plugin being undefined if the name\n //did not have a plugin prefix.\n function splitPrefix(name) {\n var prefix,\n index = name ? name.indexOf('!') : -1;\n if (index > -1) {\n prefix = name.substring(0, index);\n name = name.substring(index + 1, name.length);\n }\n return [prefix, name];\n }\n\n /**\n * Creates a module mapping that includes plugin prefix, module\n * name, and path. If parentModuleMap is provided it will\n * also normalize the name via require.normalize()\n *\n * @param {String} name the module name\n * @param {String} [parentModuleMap] parent module map\n * for the module name, used to resolve relative names.\n * @param {Boolean} isNormalized: is the ID already normalized.\n * This is true if this call is done for a define() module ID.\n * @param {Boolean} applyMap: apply the map config to the ID.\n * Should only be true if this map is for a dependency.\n *\n * @returns {Object}\n */\n function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {\n var url, pluginModule, suffix, nameParts,\n prefix = null,\n parentName = parentModuleMap ? parentModuleMap.name : null,\n originalName = name,\n isDefine = true,\n normalizedName = '';\n\n //If no name, then it means it is a require call, generate an\n //internal name.\n if (!name) {\n isDefine = false;\n name = '_@r' + (requireCounter += 1);\n }\n\n nameParts = splitPrefix(name);\n prefix = nameParts[0];\n name = nameParts[1];\n\n if (prefix) {\n prefix = normalize(prefix, parentName, applyMap);\n pluginModule = getOwn(defined, prefix);\n }\n\n //Account for relative paths if there is a base name.\n if (name) {\n if (prefix) {\n if (pluginModule && pluginModule.normalize) {\n //Plugin is loaded, use its normalize method.\n normalizedName = pluginModule.normalize(name, function (name) {\n return normalize(name, parentName, applyMap);\n });\n } else {\n // If nested plugin references, then do not try to\n // normalize, as it will not normalize correctly. This\n // places a restriction on resourceIds, and the longer\n // term solution is not to normalize until plugins are\n // loaded and all normalizations to allow for async\n // loading of a loader plugin. But for now, fixes the\n // common uses. Details in #1131\n normalizedName = name.indexOf('!') === -1 ?\n normalize(name, parentName, applyMap) :\n name;\n }\n } else {\n //A regular module.\n normalizedName = normalize(name, parentName, applyMap);\n\n //Normalized name may be a plugin ID due to map config\n //application in normalize. The map config values must\n //already be normalized, so do not need to redo that part.\n nameParts = splitPrefix(normalizedName);\n prefix = nameParts[0];\n normalizedName = nameParts[1];\n isNormalized = true;\n\n url = context.nameToUrl(normalizedName);\n }\n }\n\n //If the id is a plugin id that cannot be determined if it needs\n //normalization, stamp it with a unique ID so two matching relative\n //ids that may conflict can be separate.\n suffix = prefix && !pluginModule && !isNormalized ?\n '_unnormalized' + (unnormalizedCounter += 1) :\n '';\n\n return {\n prefix: prefix,\n name: normalizedName,\n parentMap: parentModuleMap,\n unnormalized: !!suffix,\n url: url,\n originalName: originalName,\n isDefine: isDefine,\n id: (prefix ?\n prefix + '!' + normalizedName :\n normalizedName) + suffix\n };\n }\n\n function getModule(depMap) {\n var id = depMap.id,\n mod = getOwn(registry, id);\n\n if (!mod) {\n mod = registry[id] = new context.Module(depMap);\n }\n\n return mod;\n }\n\n function on(depMap, name, fn) {\n var id = depMap.id,\n mod = getOwn(registry, id);\n\n if (hasProp(defined, id) &&\n (!mod || mod.defineEmitComplete)) {\n if (name === 'defined') {\n fn(defined[id]);\n }\n } else {\n mod = getModule(depMap);\n if (mod.error && name === 'error') {\n fn(mod.error);\n } else {\n mod.on(name, fn);\n }\n }\n }\n\n function onError(err, errback) {\n var ids = err.requireModules,\n notified = false;\n\n if (errback) {\n errback(err);\n } else {\n each(ids, function (id) {\n var mod = getOwn(registry, id);\n if (mod) {\n //Set error on module, so it skips timeout checks.\n mod.error = err;\n if (mod.events.error) {\n notified = true;\n mod.emit('error', err);\n }\n }\n });\n\n if (!notified) {\n req.onError(err);\n }\n }\n }\n\n /**\n * Internal method to transfer globalQueue items to this context's\n * defQueue.\n */\n function takeGlobalQueue() {\n //Push all the globalDefQueue items into the context's defQueue\n if (globalDefQueue.length) {\n each(globalDefQueue, function(queueItem) {\n var id = queueItem[0];\n if (typeof id === 'string') {\n context.defQueueMap[id] = true;\n }\n defQueue.push(queueItem);\n });\n globalDefQueue = [];\n }\n }\n\n handlers = {\n 'require': function (mod) {\n if (mod.require) {\n return mod.require;\n } else {\n return (mod.require = context.makeRequire(mod.map));\n }\n },\n 'exports': function (mod) {\n mod.usingExports = true;\n if (mod.map.isDefine) {\n if (mod.exports) {\n return (defined[mod.map.id] = mod.exports);\n } else {\n return (mod.exports = defined[mod.map.id] = {});\n }\n }\n },\n 'module': function (mod) {\n if (mod.module) {\n return mod.module;\n } else {\n return (mod.module = {\n id: mod.map.id,\n uri: mod.map.url,\n config: function () {\n return getOwn(config.config, mod.map.id) || {};\n },\n exports: mod.exports || (mod.exports = {})\n });\n }\n }\n };\n\n function cleanRegistry(id) {\n //Clean up machinery used for waiting modules.\n delete registry[id];\n delete enabledRegistry[id];\n }\n\n function breakCycle(mod, traced, processed) {\n var id = mod.map.id;\n\n if (mod.error) {\n mod.emit('error', mod.error);\n } else {\n traced[id] = true;\n each(mod.depMaps, function (depMap, i) {\n var depId = depMap.id,\n dep = getOwn(registry, depId);\n\n //Only force things that have not completed\n //being defined, so still in the registry,\n //and only if it has not been matched up\n //in the module already.\n if (dep && !mod.depMatched[i] && !processed[depId]) {\n if (getOwn(traced, depId)) {\n mod.defineDep(i, defined[depId]);\n mod.check(); //pass false?\n } else {\n breakCycle(dep, traced, processed);\n }\n }\n });\n processed[id] = true;\n }\n }\n\n function checkLoaded() {\n var err, usingPathFallback,\n waitInterval = config.waitSeconds * 1000,\n //It is possible to disable the wait interval by using waitSeconds of 0.\n expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),\n noLoads = [],\n reqCalls = [],\n stillLoading = false,\n needCycleCheck = true;\n\n //Do not bother if this call was a result of a cycle break.\n if (inCheckLoaded) {\n return;\n }\n\n inCheckLoaded = true;\n\n //Figure out the state of all the modules.\n eachProp(enabledRegistry, function (mod) {\n var map = mod.map,\n modId = map.id;\n\n //Skip things that are not enabled or in error state.\n if (!mod.enabled) {\n return;\n }\n\n if (!map.isDefine) {\n reqCalls.push(mod);\n }\n\n if (!mod.error) {\n //If the module should be executed, and it has not\n //been inited and time is up, remember it.\n if (!mod.inited && expired) {\n if (hasPathFallback(modId)) {\n usingPathFallback = true;\n stillLoading = true;\n } else {\n noLoads.push(modId);\n removeScript(modId);\n }\n } else if (!mod.inited && mod.fetched && map.isDefine) {\n stillLoading = true;\n if (!map.prefix) {\n //No reason to keep looking for unfinished\n //loading. If the only stillLoading is a\n //plugin resource though, keep going,\n //because it may be that a plugin resource\n //is waiting on a non-plugin cycle.\n return (needCycleCheck = false);\n }\n }\n }\n });\n\n if (expired && noLoads.length) {\n //If wait time expired, throw error of unloaded modules.\n err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);\n err.contextName = context.contextName;\n return onError(err);\n }\n\n //Not expired, check for a cycle.\n if (needCycleCheck) {\n each(reqCalls, function (mod) {\n breakCycle(mod, {}, {});\n });\n }\n\n //If still waiting on loads, and the waiting load is something\n //other than a plugin resource, or there are still outstanding\n //scripts, then just try back later.\n if ((!expired || usingPathFallback) && stillLoading) {\n //Something is still waiting to load. Wait for it, but only\n //if a timeout is not already in effect.\n if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {\n checkLoadedTimeoutId = setTimeout(function () {\n checkLoadedTimeoutId = 0;\n checkLoaded();\n }, 50);\n }\n }\n\n inCheckLoaded = false;\n }\n\n Module = function (map) {\n this.events = getOwn(undefEvents, map.id) || {};\n this.map = map;\n this.shim = getOwn(config.shim, map.id);\n this.depExports = [];\n this.depMaps = [];\n this.depMatched = [];\n this.pluginMaps = {};\n this.depCount = 0;\n\n /* this.exports this.factory\n this.depMaps = [],\n this.enabled, this.fetched\n */\n };\n\n Module.prototype = {\n init: function (depMaps, factory, errback, options) {\n options = options || {};\n\n //Do not do more inits if already done. Can happen if there\n //are multiple define calls for the same module. That is not\n //a normal, common case, but it is also not unexpected.\n if (this.inited) {\n return;\n }\n\n this.factory = factory;\n\n if (errback) {\n //Register for errors on this module.\n this.on('error', errback);\n } else if (this.events.error) {\n //If no errback already, but there are error listeners\n //on this module, set up an errback to pass to the deps.\n errback = bind(this, function (err) {\n this.emit('error', err);\n });\n }\n\n //Do a copy of the dependency array, so that\n //source inputs are not modified. For example\n //\"shim\" deps are passed in here directly, and\n //doing a direct modification of the depMaps array\n //would affect that config.\n this.depMaps = depMaps && depMaps.slice(0);\n\n this.errback = errback;\n\n //Indicate this module has be initialized\n this.inited = true;\n\n this.ignore = options.ignore;\n\n //Could have option to init this module in enabled mode,\n //or could have been previously marked as enabled. However,\n //the dependencies are not known until init is called. So\n //if enabled previously, now trigger dependencies as enabled.\n if (options.enabled || this.enabled) {\n //Enable this module and dependencies.\n //Will call this.check()\n this.enable();\n } else {\n this.check();\n }\n },\n\n defineDep: function (i, depExports) {\n //Because of cycles, defined callback for a given\n //export can be called more than once.\n if (!this.depMatched[i]) {\n this.depMatched[i] = true;\n this.depCount -= 1;\n this.depExports[i] = depExports;\n }\n },\n\n fetch: function () {\n if (this.fetched) {\n return;\n }\n this.fetched = true;\n\n context.startTime = (new Date()).getTime();\n\n var map = this.map;\n\n //If the manager is for a plugin managed resource,\n //ask the plugin to load it now.\n if (this.shim) {\n context.makeRequire(this.map, {\n enableBuildCallback: true\n })(this.shim.deps || [], bind(this, function () {\n return map.prefix ? this.callPlugin() : this.load();\n }));\n } else {\n //Regular dependency.\n return map.prefix ? this.callPlugin() : this.load();\n }\n },\n\n load: function () {\n var url = this.map.url;\n\n //Regular dependency.\n if (!urlFetched[url]) {\n urlFetched[url] = true;\n context.load(this.map.id, url);\n }\n },\n\n /**\n * Checks if the module is ready to define itself, and if so,\n * define it.\n */\n check: function () {\n if (!this.enabled || this.enabling) {\n return;\n }\n\n var err, cjsModule,\n id = this.map.id,\n depExports = this.depExports,\n exports = this.exports,\n factory = this.factory;\n\n if (!this.inited) {\n // Only fetch if not already in the defQueue.\n if (!hasProp(context.defQueueMap, id)) {\n this.fetch();\n }\n } else if (this.error) {\n this.emit('error', this.error);\n } else if (!this.defining) {\n //The factory could trigger another require call\n //that would result in checking this module to\n //define itself again. If already in the process\n //of doing that, skip this work.\n this.defining = true;\n\n if (this.depCount < 1 && !this.defined) {\n if (isFunction(factory)) {\n try {\n exports = context.execCb(id, factory, depExports, exports);\n } catch (e) {\n err = e;\n }\n\n // Favor return value over exports. If node/cjs in play,\n // then will not have a return value anyway. Favor\n // module.exports assignment over exports object.\n if (this.map.isDefine && exports === undefined) {\n cjsModule = this.module;\n if (cjsModule) {\n exports = cjsModule.exports;\n } else if (this.usingExports) {\n //exports already set the defined value.\n exports = this.exports;\n }\n }\n\n if (err) {\n // If there is an error listener, favor passing\n // to that instead of throwing an error. However,\n // only do it for define()'d modules. require\n // errbacks should not be called for failures in\n // their callbacks (#699). However if a global\n // onError is set, use that.\n if ((this.events.error && this.map.isDefine) ||\n req.onError !== defaultOnError) {\n err.requireMap = this.map;\n err.requireModules = this.map.isDefine ? [this.map.id] : null;\n err.requireType = this.map.isDefine ? 'define' : 'require';\n return onError((this.error = err));\n } else if (typeof console !== 'undefined' &&\n console.error) {\n // Log the error for debugging. If promises could be\n // used, this would be different, but making do.\n console.error(err);\n } else {\n // Do not want to completely lose the error. While this\n // will mess up processing and lead to similar results\n // as bug 1440, it at least surfaces the error.\n req.onError(err);\n }\n }\n } else {\n //Just a literal value\n exports = factory;\n }\n\n this.exports = exports;\n\n if (this.map.isDefine && !this.ignore) {\n defined[id] = exports;\n\n if (req.onResourceLoad) {\n var resLoadMaps = [];\n each(this.depMaps, function (depMap) {\n resLoadMaps.push(depMap.normalizedMap || depMap);\n });\n req.onResourceLoad(context, this.map, resLoadMaps);\n }\n }\n\n //Clean up\n cleanRegistry(id);\n\n this.defined = true;\n }\n\n //Finished the define stage. Allow calling check again\n //to allow define notifications below in the case of a\n //cycle.\n this.defining = false;\n\n if (this.defined && !this.defineEmitted) {\n this.defineEmitted = true;\n this.emit('defined', this.exports);\n this.defineEmitComplete = true;\n }\n\n }\n },\n\n callPlugin: function () {\n var map = this.map,\n id = map.id,\n //Map already normalized the prefix.\n pluginMap = makeModuleMap(map.prefix);\n\n //Mark this as a dependency for this plugin, so it\n //can be traced for cycles.\n this.depMaps.push(pluginMap);\n\n on(pluginMap, 'defined', bind(this, function (plugin) {\n var load, normalizedMap, normalizedMod,\n bundleId = getOwn(bundlesMap, this.map.id),\n name = this.map.name,\n parentName = this.map.parentMap ? this.map.parentMap.name : null,\n localRequire = context.makeRequire(map.parentMap, {\n enableBuildCallback: true\n });\n\n //If current map is not normalized, wait for that\n //normalized name to load instead of continuing.\n if (this.map.unnormalized) {\n //Normalize the ID if the plugin allows it.\n if (plugin.normalize) {\n name = plugin.normalize(name, function (name) {\n return normalize(name, parentName, true);\n }) || '';\n }\n\n //prefix and name should already be normalized, no need\n //for applying map config again either.\n normalizedMap = makeModuleMap(map.prefix + '!' + name,\n this.map.parentMap);\n on(normalizedMap,\n 'defined', bind(this, function (value) {\n this.map.normalizedMap = normalizedMap;\n this.init([], function () { return value; }, null, {\n enabled: true,\n ignore: true\n });\n }));\n\n normalizedMod = getOwn(registry, normalizedMap.id);\n if (normalizedMod) {\n //Mark this as a dependency for this plugin, so it\n //can be traced for cycles.\n this.depMaps.push(normalizedMap);\n\n if (this.events.error) {\n normalizedMod.on('error', bind(this, function (err) {\n this.emit('error', err);\n }));\n }\n normalizedMod.enable();\n }\n\n return;\n }\n\n //If a paths config, then just load that file instead to\n //resolve the plugin, as it is built into that paths layer.\n if (bundleId) {\n this.map.url = context.nameToUrl(bundleId);\n this.load();\n return;\n }\n\n load = bind(this, function (value) {\n this.init([], function () { return value; }, null, {\n enabled: true\n });\n });\n\n load.error = bind(this, function (err) {\n this.inited = true;\n this.error = err;\n err.requireModules = [id];\n\n //Remove temp unnormalized modules for this module,\n //since they will never be resolved otherwise now.\n eachProp(registry, function (mod) {\n if (mod.map.id.indexOf(id + '_unnormalized') === 0) {\n cleanRegistry(mod.map.id);\n }\n });\n\n onError(err);\n });\n\n //Allow plugins to load other code without having to know the\n //context or how to 'complete' the load.\n load.fromText = bind(this, function (text, textAlt) {\n /*jslint evil: true */\n var moduleName = map.name,\n moduleMap = makeModuleMap(moduleName),\n hasInteractive = useInteractive;\n\n //As of 2.1.0, support just passing the text, to reinforce\n //fromText only being called once per resource. Still\n //support old style of passing moduleName but discard\n //that moduleName in favor of the internal ref.\n if (textAlt) {\n text = textAlt;\n }\n\n //Turn off interactive script matching for IE for any define\n //calls in the text, then turn it back on at the end.\n if (hasInteractive) {\n useInteractive = false;\n }\n\n //Prime the system by creating a module instance for\n //it.\n getModule(moduleMap);\n\n //Transfer any config to this other module.\n if (hasProp(config.config, id)) {\n config.config[moduleName] = config.config[id];\n }\n\n try {\n req.exec(text);\n } catch (e) {\n return onError(makeError('fromtexteval',\n 'fromText eval for ' + id +\n ' failed: ' + e,\n e,\n [id]));\n }\n\n if (hasInteractive) {\n useInteractive = true;\n }\n\n //Mark this as a dependency for the plugin\n //resource\n this.depMaps.push(moduleMap);\n\n //Support anonymous modules.\n context.completeLoad(moduleName);\n\n //Bind the value of that module to the value for this\n //resource ID.\n localRequire([moduleName], load);\n });\n\n //Use parentName here since the plugin's name is not reliable,\n //could be some weird string with no path that actually wants to\n //reference the parentName's path.\n plugin.load(map.name, localRequire, load, config);\n }));\n\n context.enable(pluginMap, this);\n this.pluginMaps[pluginMap.id] = pluginMap;\n },\n\n enable: function () {\n enabledRegistry[this.map.id] = this;\n this.enabled = true;\n\n //Set flag mentioning that the module is enabling,\n //so that immediate calls to the defined callbacks\n //for dependencies do not trigger inadvertent load\n //with the depCount still being zero.\n this.enabling = true;\n\n //Enable each dependency\n each(this.depMaps, bind(this, function (depMap, i) {\n var id, mod, handler;\n\n if (typeof depMap === 'string') {\n //Dependency needs to be converted to a depMap\n //and wired up to this module.\n depMap = makeModuleMap(depMap,\n (this.map.isDefine ? this.map : this.map.parentMap),\n false,\n !this.skipMap);\n this.depMaps[i] = depMap;\n\n handler = getOwn(handlers, depMap.id);\n\n if (handler) {\n this.depExports[i] = handler(this);\n return;\n }\n\n this.depCount += 1;\n\n on(depMap, 'defined', bind(this, function (depExports) {\n if (this.undefed) {\n return;\n }\n this.defineDep(i, depExports);\n this.check();\n }));\n\n if (this.errback) {\n on(depMap, 'error', bind(this, this.errback));\n } else if (this.events.error) {\n // No direct errback on this module, but something\n // else is listening for errors, so be sure to\n // propagate the error correctly.\n on(depMap, 'error', bind(this, function(err) {\n this.emit('error', err);\n }));\n }\n }\n\n id = depMap.id;\n mod = registry[id];\n\n //Skip special modules like 'require', 'exports', 'module'\n //Also, don't call enable if it is already enabled,\n //important in circular dependency cases.\n if (!hasProp(handlers, id) && mod && !mod.enabled) {\n context.enable(depMap, this);\n }\n }));\n\n //Enable each plugin that is used in\n //a dependency\n eachProp(this.pluginMaps, bind(this, function (pluginMap) {\n var mod = getOwn(registry, pluginMap.id);\n if (mod && !mod.enabled) {\n context.enable(pluginMap, this);\n }\n }));\n\n this.enabling = false;\n\n this.check();\n },\n\n on: function (name, cb) {\n var cbs = this.events[name];\n if (!cbs) {\n cbs = this.events[name] = [];\n }\n cbs.push(cb);\n },\n\n emit: function (name, evt) {\n each(this.events[name], function (cb) {\n cb(evt);\n });\n if (name === 'error') {\n //Now that the error handler was triggered, remove\n //the listeners, since this broken Module instance\n //can stay around for a while in the registry.\n delete this.events[name];\n }\n }\n };\n\n function callGetModule(args) {\n //Skip modules already defined.\n if (!hasProp(defined, args[0])) {\n getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);\n }\n }\n\n function removeListener(node, func, name, ieName) {\n //Favor detachEvent because of IE9\n //issue, see attachEvent/addEventListener comment elsewhere\n //in this file.\n if (node.detachEvent && !isOpera) {\n //Probably IE. If not it will throw an error, which will be\n //useful to know.\n if (ieName) {\n node.detachEvent(ieName, func);\n }\n } else {\n node.removeEventListener(name, func, false);\n }\n }\n\n /**\n * Given an event from a script node, get the requirejs info from it,\n * and then removes the event listeners on the node.\n * @param {Event} evt\n * @returns {Object}\n */\n function getScriptData(evt) {\n //Using currentTarget instead of target for Firefox 2.0's sake. Not\n //all old browsers will be supported, but this one was easy enough\n //to support and still makes sense.\n var node = evt.currentTarget || evt.srcElement;\n\n //Remove the listeners once here.\n removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');\n removeListener(node, context.onScriptError, 'error');\n\n return {\n node: node,\n id: node && node.getAttribute('data-requiremodule')\n };\n }\n\n function intakeDefines() {\n var args;\n\n //Any defined modules in the global queue, intake them now.\n takeGlobalQueue();\n\n //Make sure any remaining defQueue items get properly processed.\n while (defQueue.length) {\n args = defQueue.shift();\n if (args[0] === null) {\n return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' +\n args[args.length - 1]));\n } else {\n //args are id, deps, factory. Should be normalized by the\n //define() function.\n callGetModule(args);\n }\n }\n context.defQueueMap = {};\n }\n\n context = {\n config: config,\n contextName: contextName,\n registry: registry,\n defined: defined,\n urlFetched: urlFetched,\n defQueue: defQueue,\n defQueueMap: {},\n Module: Module,\n makeModuleMap: makeModuleMap,\n nextTick: req.nextTick,\n onError: onError,\n\n /**\n * Set a configuration for the context.\n * @param {Object} cfg config object to integrate.\n */\n configure: function (cfg) {\n //Make sure the baseUrl ends in a slash.\n if (cfg.baseUrl) {\n if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {\n cfg.baseUrl += '/';\n }\n }\n\n //Save off the paths since they require special processing,\n //they are additive.\n var shim = config.shim,\n objs = {\n paths: true,\n bundles: true,\n config: true,\n map: true\n };\n\n eachProp(cfg, function (value, prop) {\n if (objs[prop]) {\n if (!config[prop]) {\n config[prop] = {};\n }\n mixin(config[prop], value, true, true);\n } else {\n config[prop] = value;\n }\n });\n\n //Reverse map the bundles\n if (cfg.bundles) {\n eachProp(cfg.bundles, function (value, prop) {\n each(value, function (v) {\n if (v !== prop) {\n bundlesMap[v] = prop;\n }\n });\n });\n }\n\n //Merge shim\n if (cfg.shim) {\n eachProp(cfg.shim, function (value, id) {\n //Normalize the structure\n if (isArray(value)) {\n value = {\n deps: value\n };\n }\n if ((value.exports || value.init) && !value.exportsFn) {\n value.exportsFn = context.makeShimExports(value);\n }\n shim[id] = value;\n });\n config.shim = shim;\n }\n\n //Adjust packages if necessary.\n if (cfg.packages) {\n each(cfg.packages, function (pkgObj) {\n var location, name;\n\n pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj;\n\n name = pkgObj.name;\n location = pkgObj.location;\n if (location) {\n config.paths[name] = pkgObj.location;\n }\n\n //Save pointer to main module ID for pkg name.\n //Remove leading dot in main, so main paths are normalized,\n //and remove any trailing .js, since different package\n //envs have different conventions: some use a module name,\n //some use a file name.\n config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')\n .replace(currDirRegExp, '')\n .replace(jsSuffixRegExp, '');\n });\n }\n\n //If there are any \"waiting to execute\" modules in the registry,\n //update the maps for them, since their info, like URLs to load,\n //may have changed.\n eachProp(registry, function (mod, id) {\n //If module already has init called, since it is too\n //late to modify them, and ignore unnormalized ones\n //since they are transient.\n if (!mod.inited && !mod.map.unnormalized) {\n mod.map = makeModuleMap(id, null, true);\n }\n });\n\n //If a deps array or a config callback is specified, then call\n //require with those args. This is useful when require is defined as a\n //config object before require.js is loaded.\n if (cfg.deps || cfg.callback) {\n context.require(cfg.deps || [], cfg.callback);\n }\n },\n\n makeShimExports: function (value) {\n function fn() {\n var ret;\n if (value.init) {\n ret = value.init.apply(global, arguments);\n }\n return ret || (value.exports && getGlobal(value.exports));\n }\n return fn;\n },\n\n makeRequire: function (relMap, options) {\n options = options || {};\n\n function localRequire(deps, callback, errback) {\n var id, map, requireMod;\n\n if (options.enableBuildCallback && callback && isFunction(callback)) {\n callback.__requireJsBuild = true;\n }\n\n if (typeof deps === 'string') {\n if (isFunction(callback)) {\n //Invalid call\n return onError(makeError('requireargs', 'Invalid require call'), errback);\n }\n\n //If require|exports|module are requested, get the\n //value for them from the special handlers. Caveat:\n //this only works while module is being defined.\n if (relMap && hasProp(handlers, deps)) {\n return handlers[deps](registry[relMap.id]);\n }\n\n //Synchronous access to one module. If require.get is\n //available (as in the Node adapter), prefer that.\n if (req.get) {\n return req.get(context, deps, relMap, localRequire);\n }\n\n //Normalize module name, if it contains . or ..\n map = makeModuleMap(deps, relMap, false, true);\n id = map.id;\n\n if (!hasProp(defined, id)) {\n return onError(makeError('notloaded', 'Module name \"' +\n id +\n '\" has not been loaded yet for context: ' +\n contextName +\n (relMap ? '' : '. Use require([])')));\n }\n return defined[id];\n }\n\n //Grab defines waiting in the global queue.\n intakeDefines();\n\n //Mark all the dependencies as needing to be loaded.\n context.nextTick(function () {\n //Some defines could have been added since the\n //require call, collect them.\n intakeDefines();\n\n requireMod = getModule(makeModuleMap(null, relMap));\n\n //Store if map config should be applied to this require\n //call for dependencies.\n requireMod.skipMap = options.skipMap;\n\n requireMod.init(deps, callback, errback, {\n enabled: true\n });\n\n checkLoaded();\n });\n\n return localRequire;\n }\n\n mixin(localRequire, {\n isBrowser: isBrowser,\n\n /**\n * Converts a module name + .extension into an URL path.\n * *Requires* the use of a module name. It does not support using\n * plain URLs like nameToUrl.\n */\n toUrl: function (moduleNamePlusExt) {\n var ext,\n index = moduleNamePlusExt.lastIndexOf('.'),\n segment = moduleNamePlusExt.split('/')[0],\n isRelative = segment === '.' || segment === '..';\n\n //Have a file extension alias, and it is not the\n //dots from a relative path.\n if (index !== -1 && (!isRelative || index > 1)) {\n ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);\n moduleNamePlusExt = moduleNamePlusExt.substring(0, index);\n }\n\n return context.nameToUrl(normalize(moduleNamePlusExt,\n relMap && relMap.id, true), ext, true);\n },\n\n defined: function (id) {\n return hasProp(defined, makeModuleMap(id, relMap, false, true).id);\n },\n\n specified: function (id) {\n id = makeModuleMap(id, relMap, false, true).id;\n return hasProp(defined, id) || hasProp(registry, id);\n }\n });\n\n //Only allow undef on top level require calls\n if (!relMap) {\n localRequire.undef = function (id) {\n //Bind any waiting define() calls to this context,\n //fix for #408\n takeGlobalQueue();\n\n var map = makeModuleMap(id, relMap, true),\n mod = getOwn(registry, id);\n\n mod.undefed = true;\n removeScript(id);\n\n delete defined[id];\n delete urlFetched[map.url];\n delete undefEvents[id];\n\n //Clean queued defines too. Go backwards\n //in array so that the splices do not\n //mess up the iteration.\n eachReverse(defQueue, function(args, i) {\n if (args[0] === id) {\n defQueue.splice(i, 1);\n }\n });\n delete context.defQueueMap[id];\n\n if (mod) {\n //Hold on to listeners in case the\n //module will be attempted to be reloaded\n //using a different config.\n if (mod.events.defined) {\n undefEvents[id] = mod.events;\n }\n\n cleanRegistry(id);\n }\n };\n }\n\n return localRequire;\n },\n\n /**\n * Called to enable a module if it is still in the registry\n * awaiting enablement. A second arg, parent, the parent module,\n * is passed in for context, when this method is overridden by\n * the optimizer. Not shown here to keep code compact.\n */\n enable: function (depMap) {\n var mod = getOwn(registry, depMap.id);\n if (mod) {\n getModule(depMap).enable();\n }\n },\n\n /**\n * Internal method used by environment adapters to complete a load event.\n * A load event could be a script load or just a load pass from a synchronous\n * load call.\n * @param {String} moduleName the name of the module to potentially complete.\n */\n completeLoad: function (moduleName) {\n var found, args, mod,\n shim = getOwn(config.shim, moduleName) || {},\n shExports = shim.exports;\n\n takeGlobalQueue();\n\n while (defQueue.length) {\n args = defQueue.shift();\n if (args[0] === null) {\n args[0] = moduleName;\n //If already found an anonymous module and bound it\n //to this name, then this is some other anon module\n //waiting for its completeLoad to fire.\n if (found) {\n break;\n }\n found = true;\n } else if (args[0] === moduleName) {\n //Found matching define call for this script!\n found = true;\n }\n\n callGetModule(args);\n }\n context.defQueueMap = {};\n\n //Do this after the cycle of callGetModule in case the result\n //of those calls/init calls changes the registry.\n mod = getOwn(registry, moduleName);\n\n if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {\n if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {\n if (hasPathFallback(moduleName)) {\n return;\n } else {\n return onError(makeError('nodefine',\n 'No define call for ' + moduleName,\n null,\n [moduleName]));\n }\n } else {\n //A script that does not call define(), so just simulate\n //the call for it.\n callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);\n }\n }\n\n checkLoaded();\n },\n\n /**\n * Converts a module name to a file path. Supports cases where\n * moduleName may actually be just an URL.\n * Note that it **does not** call normalize on the moduleName,\n * it is assumed to have already been normalized. This is an\n * internal API, not a public one. Use toUrl for the public API.\n */\n nameToUrl: function (moduleName, ext, skipExt) {\n var paths, syms, i, parentModule, url,\n parentPath, bundleId,\n pkgMain = getOwn(config.pkgs, moduleName);\n\n if (pkgMain) {\n moduleName = pkgMain;\n }\n\n bundleId = getOwn(bundlesMap, moduleName);\n\n if (bundleId) {\n return context.nameToUrl(bundleId, ext, skipExt);\n }\n\n //If a colon is in the URL, it indicates a protocol is used and it is just\n //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)\n //or ends with .js, then assume the user meant to use an url and not a module id.\n //The slash is important for protocol-less URLs as well as full paths.\n if (req.jsExtRegExp.test(moduleName)) {\n //Just a plain path, not module name lookup, so just return it.\n //Add extension if it is included. This is a bit wonky, only non-.js things pass\n //an extension, this method probably needs to be reworked.\n url = moduleName + (ext || '');\n } else {\n //A module that needs to be converted to a path.\n paths = config.paths;\n\n syms = moduleName.split('/');\n //For each module name segment, see if there is a path\n //registered for it. Start with most specific name\n //and work up from it.\n for (i = syms.length; i > 0; i -= 1) {\n parentModule = syms.slice(0, i).join('/');\n\n parentPath = getOwn(paths, parentModule);\n if (parentPath) {\n //If an array, it means there are a few choices,\n //Choose the one that is desired\n if (isArray(parentPath)) {\n parentPath = parentPath[0];\n }\n syms.splice(0, i, parentPath);\n break;\n }\n }\n\n //Join the path parts together, then figure out if baseUrl is needed.\n url = syms.join('/');\n url += (ext || (/^data\\:|\\?/.test(url) || skipExt ? '' : '.js'));\n url = (url.charAt(0) === '/' || url.match(/^[\\w\\+\\.\\-]+:/) ? '' : config.baseUrl) + url;\n }\n\n return config.urlArgs ? url +\n ((url.indexOf('?') === -1 ? '?' : '&') +\n config.urlArgs) : url;\n },\n\n //Delegates to req.load. Broken out as a separate function to\n //allow overriding in the optimizer.\n load: function (id, url) {\n req.load(context, id, url);\n },\n\n /**\n * Executes a module callback function. Broken out as a separate function\n * solely to allow the build system to sequence the files in the built\n * layer in the right sequence.\n *\n * @private\n */\n execCb: function (name, callback, args, exports) {\n return callback.apply(exports, args);\n },\n\n /**\n * callback for script loads, used to check status of loading.\n *\n * @param {Event} evt the event from the browser for the script\n * that was loaded.\n */\n onScriptLoad: function (evt) {\n //Using currentTarget instead of target for Firefox 2.0's sake. Not\n //all old browsers will be supported, but this one was easy enough\n //to support and still makes sense.\n if (evt.type === 'load' ||\n (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {\n //Reset interactive script so a script node is not held onto for\n //to long.\n interactiveScript = null;\n\n //Pull out the name of the module and the context.\n var data = getScriptData(evt);\n context.completeLoad(data.id);\n }\n },\n\n /**\n * Callback for script errors.\n */\n onScriptError: function (evt) {\n var data = getScriptData(evt);\n if (!hasPathFallback(data.id)) {\n var parents = [];\n eachProp(registry, function(value, key) {\n if (key.indexOf('_@r') !== 0) {\n each(value.depMaps, function(depMap) {\n if (depMap.id === data.id) {\n parents.push(key);\n }\n return true;\n });\n }\n });\n return onError(makeError('scripterror', 'Script error for \"' + data.id +\n (parents.length ?\n '\", needed by: ' + parents.join(', ') :\n '\"'), evt, [data.id]));\n }\n }\n };\n\n context.require = context.makeRequire();\n return context;\n }\n\n /**\n * Main entry point.\n *\n * If the only argument to require is a string, then the module that\n * is represented by that string is fetched for the appropriate context.\n *\n * If the first argument is an array, then it will be treated as an array\n * of dependency string names to fetch. An optional function callback can\n * be specified to execute when all of those dependencies are available.\n *\n * Make a local req variable to help Caja compliance (it assumes things\n * on a require that are not standardized), and to give a short\n * name for minification/local scope use.\n */\n req = requirejs = function (deps, callback, errback, optional) {\n\n //Find the right context, use default\n var context, config,\n contextName = defContextName;\n\n // Determine if have config object in the call.\n if (!isArray(deps) && typeof deps !== 'string') {\n // deps is a config object\n config = deps;\n if (isArray(callback)) {\n // Adjust args if there are dependencies\n deps = callback;\n callback = errback;\n errback = optional;\n } else {\n deps = [];\n }\n }\n\n if (config && config.context) {\n contextName = config.context;\n }\n\n context = getOwn(contexts, contextName);\n if (!context) {\n context = contexts[contextName] = req.s.newContext(contextName);\n }\n\n if (config) {\n context.configure(config);\n }\n\n return context.require(deps, callback, errback);\n };\n\n /**\n * Support require.config() to make it easier to cooperate with other\n * AMD loaders on globally agreed names.\n */\n req.config = function (config) {\n return req(config);\n };\n\n /**\n * Execute something after the current tick\n * of the event loop. Override for other envs\n * that have a better solution than setTimeout.\n * @param {Function} fn function to execute later.\n */\n req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {\n setTimeout(fn, 4);\n } : function (fn) { fn(); };\n\n /**\n * Export require as a global, but only if it does not already exist.\n */\n if (!require) {\n require = req;\n }\n\n req.version = version;\n\n //Used to filter out dependencies that are already paths.\n req.jsExtRegExp = /^\\/|:|\\?|\\.js$/;\n req.isBrowser = isBrowser;\n s = req.s = {\n contexts: contexts,\n newContext: newContext\n };\n\n //Create default context.\n req({});\n\n //Exports some context-sensitive methods on global require.\n each([\n 'toUrl',\n 'undef',\n 'defined',\n 'specified'\n ], function (prop) {\n //Reference from contexts instead of early binding to default context,\n //so that during builds, the latest instance of the default context\n //with its config gets used.\n req[prop] = function () {\n var ctx = contexts[defContextName];\n return ctx.require[prop].apply(ctx, arguments);\n };\n });\n\n if (isBrowser) {\n head = s.head = document.getElementsByTagName('head')[0];\n //If BASE tag is in play, using appendChild is a problem for IE6.\n //When that browser dies, this can be removed. Details in this jQuery bug:\n //http://dev.jquery.com/ticket/2709\n baseElement = document.getElementsByTagName('base')[0];\n if (baseElement) {\n head = s.head = baseElement.parentNode;\n }\n }\n\n /**\n * Any errors that require explicitly generates will be passed to this\n * function. Intercept/override it if you want custom error handling.\n * @param {Error} err the error object.\n */\n req.onError = defaultOnError;\n\n /**\n * Creates the node for the load command. Only used in browser envs.\n */\n req.createNode = function (config, moduleName, url) {\n var node = config.xhtml ?\n document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :\n document.createElement('script');\n node.type = config.scriptType || 'text/javascript';\n node.charset = 'utf-8';\n node.async = true;\n return node;\n };\n\n /**\n * Does the request to load a module for the browser case.\n * Make this a separate function to allow other environments\n * to override it.\n *\n * @param {Object} context the require context to find state.\n * @param {String} moduleName the name of the module.\n * @param {Object} url the URL to the module.\n */\n req.load = function (context, moduleName, url) {\n var config = (context && context.config) || {},\n node;\n if (isBrowser) {\n //In the browser so use a script tag\n node = req.createNode(config, moduleName, url);\n if (config.onNodeCreated) {\n config.onNodeCreated(node, config, moduleName, url);\n }\n\n node.setAttribute('data-requirecontext', context.contextName);\n node.setAttribute('data-requiremodule', moduleName);\n\n //Set up load listener. Test attachEvent first because IE9 has\n //a subtle issue in its addEventListener and script onload firings\n //that do not match the behavior of all other browsers with\n //addEventListener support, which fire the onload event for a\n //script right after the script execution. See:\n //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution\n //UNFORTUNATELY Opera implements attachEvent but does not follow the script\n //script execution mode.\n if (node.attachEvent &&\n //Check if node.attachEvent is artificially added by custom script or\n //natively supported by browser\n //read https://github.com/jrburke/requirejs/issues/187\n //if we can NOT find [native code] then it must NOT natively supported.\n //in IE8, node.attachEvent does not have toString()\n //Note the test for \"[native code\" with no closing brace, see:\n //https://github.com/jrburke/requirejs/issues/273\n !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&\n !isOpera) {\n //Probably IE. IE (at least 6-8) do not fire\n //script onload right after executing the script, so\n //we cannot tie the anonymous define call to a name.\n //However, IE reports the script as being in 'interactive'\n //readyState at the time of the define call.\n useInteractive = true;\n\n node.attachEvent('onreadystatechange', context.onScriptLoad);\n //It would be great to add an error handler here to catch\n //404s in IE9+. However, onreadystatechange will fire before\n //the error handler, so that does not help. If addEventListener\n //is used, then IE will fire error before load, but we cannot\n //use that pathway given the connect.microsoft.com issue\n //mentioned above about not doing the 'script execute,\n //then fire the script load event listener before execute\n //next script' that other browsers do.\n //Best hope: IE10 fixes the issues,\n //and then destroys all installs of IE 6-9.\n //node.attachEvent('onerror', context.onScriptError);\n } else {\n node.addEventListener('load', context.onScriptLoad, false);\n node.addEventListener('error', context.onScriptError, false);\n }\n node.src = url;\n\n //For some cache cases in IE 6-8, the script executes before the end\n //of the appendChild execution, so to tie an anonymous define\n //call to the module name (which is stored on the node), hold on\n //to a reference to this node, but clear after the DOM insertion.\n currentlyAddingScript = node;\n if (baseElement) {\n head.insertBefore(node, baseElement);\n } else {\n head.appendChild(node);\n }\n currentlyAddingScript = null;\n\n return node;\n } else if (isWebWorker) {\n try {\n //In a web worker, use importScripts. This is not a very\n //efficient use of importScripts, importScripts will block until\n //its script is downloaded and evaluated. However, if web workers\n //are in play, the expectation is that a build has been done so\n //that only one script needs to be loaded anyway. This may need\n //to be reevaluated if other use cases become common.\n importScripts(url);\n\n //Account for anonymous modules\n context.completeLoad(moduleName);\n } catch (e) {\n context.onError(makeError('importscripts',\n 'importScripts failed for ' +\n moduleName + ' at ' + url,\n e,\n [moduleName]));\n }\n }\n };\n\n function getInteractiveScript() {\n if (interactiveScript && interactiveScript.readyState === 'interactive') {\n return interactiveScript;\n }\n\n eachReverse(scripts(), function (script) {\n if (script.readyState === 'interactive') {\n return (interactiveScript = script);\n }\n });\n return interactiveScript;\n }\n\n //Look for a data-main script attribute, which could also adjust the baseUrl.\n if (isBrowser && !cfg.skipDataMain) {\n //Figure out baseUrl. Get it from the script tag with require.js in it.\n eachReverse(scripts(), function (script) {\n //Set the 'head' where we can append children by\n //using the script's parent.\n if (!head) {\n head = script.parentNode;\n }\n\n //Look for a data-main attribute to set main script for the page\n //to load. If it is there, the path to data main becomes the\n //baseUrl, if it is not already set.\n dataMain = script.getAttribute('data-main');\n if (dataMain) {\n //Preserve dataMain in case it is a path (i.e. contains '?')\n mainScript = dataMain;\n\n //Set final baseUrl if there is not already an explicit one.\n if (!cfg.baseUrl) {\n //Pull off the directory of data-main for use as the\n //baseUrl.\n src = mainScript.split('/');\n mainScript = src.pop();\n subPath = src.length ? src.join('/') + '/' : './';\n\n cfg.baseUrl = subPath;\n }\n\n //Strip off any trailing .js since mainScript is now\n //like a module name.\n mainScript = mainScript.replace(jsSuffixRegExp, '');\n\n //If mainScript is still a path, fall back to dataMain\n if (req.jsExtRegExp.test(mainScript)) {\n mainScript = dataMain;\n }\n\n //Put the data-main script in the files to load.\n cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];\n\n return true;\n }\n });\n }\n\n /**\n * The function that handles definitions of modules. Differs from\n * require() in that a string for the module should be the first argument,\n * and the function to execute after dependencies are loaded should\n * return a value to define the module corresponding to the first argument's\n * name.\n */\n define = function (name, deps, callback) {\n var node, context;\n\n //Allow for anonymous modules\n if (typeof name !== 'string') {\n //Adjust args appropriately\n callback = deps;\n deps = name;\n name = null;\n }\n\n //This module may not have dependencies\n if (!isArray(deps)) {\n callback = deps;\n deps = null;\n }\n\n //If no name, and callback is a function, then figure out if it a\n //CommonJS thing with dependencies.\n if (!deps && isFunction(callback)) {\n deps = [];\n //Remove comments from the callback string,\n //look for require calls, and pull them into the dependencies,\n //but only if there are function args.\n if (callback.length) {\n callback\n .toString()\n .replace(commentRegExp, '')\n .replace(cjsRequireRegExp, function (match, dep) {\n deps.push(dep);\n });\n\n //May be a CommonJS thing even without require calls, but still\n //could use exports, and module. Avoid doing exports and module\n //work though if it just needs require.\n //REQUIRES the function to expect the CommonJS variables in the\n //order listed below.\n deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);\n }\n }\n\n //If in IE 6-8 and hit an anonymous define() call, do the interactive\n //work.\n if (useInteractive) {\n node = currentlyAddingScript || getInteractiveScript();\n if (node) {\n if (!name) {\n name = node.getAttribute('data-requiremodule');\n }\n context = contexts[node.getAttribute('data-requirecontext')];\n }\n }\n\n //Always save off evaluating the def call until the script onload handler.\n //This allows multiple modules to be in a file without prematurely\n //tracing dependencies, and allows for anonymous module support,\n //where the module name is not known until the script onload event\n //occurs. If no context, use the global queue, and get it processed\n //in the onscript load callback.\n if (context) {\n context.defQueue.push([name, deps, callback]);\n context.defQueueMap[name] = true;\n } else {\n globalDefQueue.push([name, deps, callback]);\n }\n };\n\n define.amd = {\n jQuery: true\n };\n\n /**\n * Executes the text. Normally just uses eval, but can be modified\n * to use a better, environment-specific call. Only used for transpiling\n * loader plugins, not for plain JS modules.\n * @param {String} text the text to execute/evaluate.\n */\n req.exec = function (text) {\n /*jslint evil: true */\n return eval(text);\n };\n\n //Set up with config info.\n req(cfg);\n}(this));\n","/*!\n * Chart.js\n * http://chartjs.org/\n * Version: 1.0.2\n *\n * Copyright 2015 Nick Downie\n * Released under the MIT license\n * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md\n */\n\n\n(function(){\n\n\t\"use strict\";\n\n\t//Declare root variable - window in the browser, global on the server\n\tvar root = this,\n\t\tprevious = root.Chart;\n\n\t//Occupy the global variable of Chart, and create a simple base class\n\tvar Chart = function(context){\n\t\tvar chart = this;\n\t\tthis.canvas = context.canvas;\n\n\t\tthis.ctx = context;\n\n\t\t//Variables global to the chart\n\t\tvar computeDimension = function(element,dimension)\n\t\t{\n\t\t\tif (element['offset'+dimension])\n\t\t\t{\n\t\t\t\treturn element['offset'+dimension];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn document.defaultView.getComputedStyle(element).getPropertyValue(dimension);\n\t\t\t}\n\t\t}\n\n\t\tvar width = this.width = computeDimension(context.canvas,'Width');\n\t\tvar height = this.height = computeDimension(context.canvas,'Height');\n\n\t\t// Firefox requires this to work correctly\n\t\tcontext.canvas.width = width;\n\t\tcontext.canvas.height = height;\n\n\t\tvar width = this.width = context.canvas.width;\n\t\tvar height = this.height = context.canvas.height;\n\t\tthis.aspectRatio = this.width / this.height;\n\t\t//High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale.\n\t\thelpers.retinaScale(this);\n\n\t\treturn this;\n\t};\n\t//Globally expose the defaults to allow for user updating/changing\n\tChart.defaults = {\n\t\tglobal: {\n\t\t\t// Boolean - Whether to animate the chart\n\t\t\tanimation: true,\n\n\t\t\t// Number - Number of animation steps\n\t\t\tanimationSteps: 60,\n\n\t\t\t// String - Animation easing effect\n\t\t\tanimationEasing: \"easeOutQuart\",\n\n\t\t\t// Boolean - If we should show the scale at all\n\t\t\tshowScale: true,\n\n\t\t\t// Boolean - If we want to override with a hard coded scale\n\t\t\tscaleOverride: false,\n\n\t\t\t// ** Required if scaleOverride is true **\n\t\t\t// Number - The number of steps in a hard coded scale\n\t\t\tscaleSteps: null,\n\t\t\t// Number - The value jump in the hard coded scale\n\t\t\tscaleStepWidth: null,\n\t\t\t// Number - The scale starting value\n\t\t\tscaleStartValue: null,\n\n\t\t\t// String - Colour of the scale line\n\t\t\tscaleLineColor: \"rgba(0,0,0,.1)\",\n\n\t\t\t// Number - Pixel width of the scale line\n\t\t\tscaleLineWidth: 1,\n\n\t\t\t// Boolean - Whether to show labels on the scale\n\t\t\tscaleShowLabels: true,\n\n\t\t\t// Interpolated JS string - can access value\n\t\t\tscaleLabel: \"<%=value%>\",\n\n\t\t\t// Boolean - Whether the scale should stick to integers, and not show any floats even if drawing space is there\n\t\t\tscaleIntegersOnly: true,\n\n\t\t\t// Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value\n\t\t\tscaleBeginAtZero: false,\n\n\t\t\t// String - Scale label font declaration for the scale label\n\t\t\tscaleFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n\n\t\t\t// Number - Scale label font size in pixels\n\t\t\tscaleFontSize: 12,\n\n\t\t\t// String - Scale label font weight style\n\t\t\tscaleFontStyle: \"normal\",\n\n\t\t\t// String - Scale label font colour\n\t\t\tscaleFontColor: \"#666\",\n\n\t\t\t// Boolean - whether or not the chart should be responsive and resize when the browser does.\n\t\t\tresponsive: false,\n\n\t\t\t// Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container\n\t\t\tmaintainAspectRatio: true,\n\n\t\t\t// Boolean - Determines whether to draw tooltips on the canvas or not - attaches events to touchmove & mousemove\n\t\t\tshowTooltips: true,\n\n\t\t\t// Boolean - Determines whether to draw built-in tooltip or call custom tooltip function\n\t\t\tcustomTooltips: false,\n\n\t\t\t// Array - Array of string names to attach tooltip events\n\t\t\ttooltipEvents: [\"mousemove\", \"touchstart\", \"touchmove\", \"mouseout\"],\n\n\t\t\t// String - Tooltip background colour\n\t\t\ttooltipFillColor: \"rgba(0,0,0,0.8)\",\n\n\t\t\t// String - Tooltip label font declaration for the scale label\n\t\t\ttooltipFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n\n\t\t\t// Number - Tooltip label font size in pixels\n\t\t\ttooltipFontSize: 14,\n\n\t\t\t// String - Tooltip font weight style\n\t\t\ttooltipFontStyle: \"normal\",\n\n\t\t\t// String - Tooltip label font colour\n\t\t\ttooltipFontColor: \"#fff\",\n\n\t\t\t// String - Tooltip title font declaration for the scale label\n\t\t\ttooltipTitleFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n\n\t\t\t// Number - Tooltip title font size in pixels\n\t\t\ttooltipTitleFontSize: 14,\n\n\t\t\t// String - Tooltip title font weight style\n\t\t\ttooltipTitleFontStyle: \"bold\",\n\n\t\t\t// String - Tooltip title font colour\n\t\t\ttooltipTitleFontColor: \"#fff\",\n\n\t\t\t// Number - pixel width of padding around tooltip text\n\t\t\ttooltipYPadding: 6,\n\n\t\t\t// Number - pixel width of padding around tooltip text\n\t\t\ttooltipXPadding: 6,\n\n\t\t\t// Number - Size of the caret on the tooltip\n\t\t\ttooltipCaretSize: 8,\n\n\t\t\t// Number - Pixel radius of the tooltip border\n\t\t\ttooltipCornerRadius: 6,\n\n\t\t\t// Number - Pixel offset from point x to tooltip edge\n\t\t\ttooltipXOffset: 10,\n\n\t\t\t// String - Template string for single tooltips\n\t\t\ttooltipTemplate: \"<%if (label){%><%=label%>: <%}%><%= value %>\",\n\n\t\t\t// String - Template string for single tooltips\n\t\t\tmultiTooltipTemplate: \"<%= value %>\",\n\n\t\t\t// String - Colour behind the legend colour block\n\t\t\tmultiTooltipKeyBackground: '#fff',\n\n\t\t\t// Function - Will fire on animation progression.\n\t\t\tonAnimationProgress: function(){},\n\n\t\t\t// Function - Will fire on animation completion.\n\t\t\tonAnimationComplete: function(){}\n\n\t\t}\n\t};\n\n\t//Create a dictionary of chart types, to allow for extension of existing types\n\tChart.types = {};\n\n\t//Global Chart helpers object for utility methods and classes\n\tvar helpers = Chart.helpers = {};\n\n\t\t//-- Basic js utility methods\n\tvar each = helpers.each = function(loopable,callback,self){\n\t\t\tvar additionalArgs = Array.prototype.slice.call(arguments, 3);\n\t\t\t// Check to see if null or undefined firstly.\n\t\t\tif (loopable){\n\t\t\t\tif (loopable.length === +loopable.length){\n\t\t\t\t\tvar i;\n\t\t\t\t\tfor (i=0; i<loopable.length; i++){\n\t\t\t\t\t\tcallback.apply(self,[loopable[i], i].concat(additionalArgs));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor (var item in loopable){\n\t\t\t\t\t\tcallback.apply(self,[loopable[item],item].concat(additionalArgs));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tclone = helpers.clone = function(obj){\n\t\t\tvar objClone = {};\n\t\t\teach(obj,function(value,key){\n\t\t\t\tif (obj.hasOwnProperty(key)) objClone[key] = value;\n\t\t\t});\n\t\t\treturn objClone;\n\t\t},\n\t\textend = helpers.extend = function(base){\n\t\t\teach(Array.prototype.slice.call(arguments,1), function(extensionObject) {\n\t\t\t\teach(extensionObject,function(value,key){\n\t\t\t\t\tif (extensionObject.hasOwnProperty(key)) base[key] = value;\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn base;\n\t\t},\n\t\tmerge = helpers.merge = function(base,master){\n\t\t\t//Merge properties in left object over to a shallow clone of object right.\n\t\t\tvar args = Array.prototype.slice.call(arguments,0);\n\t\t\targs.unshift({});\n\t\t\treturn extend.apply(null, args);\n\t\t},\n\t\tindexOf = helpers.indexOf = function(arrayToSearch, item){\n\t\t\tif (Array.prototype.indexOf) {\n\t\t\t\treturn arrayToSearch.indexOf(item);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor (var i = 0; i < arrayToSearch.length; i++) {\n\t\t\t\t\tif (arrayToSearch[i] === item) return i;\n\t\t\t\t}\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t},\n\t\twhere = helpers.where = function(collection, filterCallback){\n\t\t\tvar filtered = [];\n\n\t\t\thelpers.each(collection, function(item){\n\t\t\t\tif (filterCallback(item)){\n\t\t\t\t\tfiltered.push(item);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn filtered;\n\t\t},\n\t\tfindNextWhere = helpers.findNextWhere = function(arrayToSearch, filterCallback, startIndex){\n\t\t\t// Default to start of the array\n\t\t\tif (!startIndex){\n\t\t\t\tstartIndex = -1;\n\t\t\t}\n\t\t\tfor (var i = startIndex + 1; i < arrayToSearch.length; i++) {\n\t\t\t\tvar currentItem = arrayToSearch[i];\n\t\t\t\tif (filterCallback(currentItem)){\n\t\t\t\t\treturn currentItem;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tfindPreviousWhere = helpers.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex){\n\t\t\t// Default to end of the array\n\t\t\tif (!startIndex){\n\t\t\t\tstartIndex = arrayToSearch.length;\n\t\t\t}\n\t\t\tfor (var i = startIndex - 1; i >= 0; i--) {\n\t\t\t\tvar currentItem = arrayToSearch[i];\n\t\t\t\tif (filterCallback(currentItem)){\n\t\t\t\t\treturn currentItem;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tinherits = helpers.inherits = function(extensions){\n\t\t\t//Basic javascript inheritance based on the model created in Backbone.js\n\t\t\tvar parent = this;\n\t\t\tvar ChartElement = (extensions && extensions.hasOwnProperty(\"constructor\")) ? extensions.constructor : function(){ return parent.apply(this, arguments); };\n\n\t\t\tvar Surrogate = function(){ this.constructor = ChartElement;};\n\t\t\tSurrogate.prototype = parent.prototype;\n\t\t\tChartElement.prototype = new Surrogate();\n\n\t\t\tChartElement.extend = inherits;\n\n\t\t\tif (extensions) extend(ChartElement.prototype, extensions);\n\n\t\t\tChartElement.__super__ = parent.prototype;\n\n\t\t\treturn ChartElement;\n\t\t},\n\t\tnoop = helpers.noop = function(){},\n\t\tuid = helpers.uid = (function(){\n\t\t\tvar id=0;\n\t\t\treturn function(){\n\t\t\t\treturn \"chart-\" + id++;\n\t\t\t};\n\t\t})(),\n\t\twarn = helpers.warn = function(str){\n\t\t\t//Method for warning of errors\n\t\t\tif (window.console && typeof window.console.warn == \"function\") console.warn(str);\n\t\t},\n\t\tamd = helpers.amd = (typeof define == 'function' && define.amd),\n\t\t//-- Math methods\n\t\tisNumber = helpers.isNumber = function(n){\n\t\t\treturn !isNaN(parseFloat(n)) && isFinite(n);\n\t\t},\n\t\tmax = helpers.max = function(array){\n\t\t\treturn Math.max.apply( Math, array );\n\t\t},\n\t\tmin = helpers.min = function(array){\n\t\t\treturn Math.min.apply( Math, array );\n\t\t},\n\t\tcap = helpers.cap = function(valueToCap,maxValue,minValue){\n\t\t\tif(isNumber(maxValue)) {\n\t\t\t\tif( valueToCap > maxValue ) {\n\t\t\t\t\treturn maxValue;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(isNumber(minValue)){\n\t\t\t\tif ( valueToCap < minValue ){\n\t\t\t\t\treturn minValue;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn valueToCap;\n\t\t},\n\t\tgetDecimalPlaces = helpers.getDecimalPlaces = function(num){\n\t\t\tif (num%1!==0 && isNumber(num)){\n\t\t\t\treturn num.toString().split(\".\")[1].length;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t},\n\t\ttoRadians = helpers.radians = function(degrees){\n\t\t\treturn degrees * (Math.PI/180);\n\t\t},\n\t\t// Gets the angle from vertical upright to the point about a centre.\n\t\tgetAngleFromPoint = helpers.getAngleFromPoint = function(centrePoint, anglePoint){\n\t\t\tvar distanceFromXCenter = anglePoint.x - centrePoint.x,\n\t\t\t\tdistanceFromYCenter = anglePoint.y - centrePoint.y,\n\t\t\t\tradialDistanceFromCenter = Math.sqrt( distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\n\n\n\t\t\tvar angle = Math.PI * 2 + Math.atan2(distanceFromYCenter, distanceFromXCenter);\n\n\t\t\t//If the segment is in the top left quadrant, we need to add another rotation to the angle\n\t\t\tif (distanceFromXCenter < 0 && distanceFromYCenter < 0){\n\t\t\t\tangle += Math.PI*2;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tangle: angle,\n\t\t\t\tdistance: radialDistanceFromCenter\n\t\t\t};\n\t\t},\n\t\taliasPixel = helpers.aliasPixel = function(pixelWidth){\n\t\t\treturn (pixelWidth % 2 === 0) ? 0 : 0.5;\n\t\t},\n\t\tsplineCurve = helpers.splineCurve = function(FirstPoint,MiddlePoint,AfterPoint,t){\n\t\t\t//Props to Rob Spencer at scaled innovation for his post on splining between points\n\t\t\t//http://scaledinnovation.com/analytics/splines/aboutSplines.html\n\t\t\tvar d01=Math.sqrt(Math.pow(MiddlePoint.x-FirstPoint.x,2)+Math.pow(MiddlePoint.y-FirstPoint.y,2)),\n\t\t\t\td12=Math.sqrt(Math.pow(AfterPoint.x-MiddlePoint.x,2)+Math.pow(AfterPoint.y-MiddlePoint.y,2)),\n\t\t\t\tfa=t*d01/(d01+d12),// scaling factor for triangle Ta\n\t\t\t\tfb=t*d12/(d01+d12);\n\t\t\treturn {\n\t\t\t\tinner : {\n\t\t\t\t\tx : MiddlePoint.x-fa*(AfterPoint.x-FirstPoint.x),\n\t\t\t\t\ty : MiddlePoint.y-fa*(AfterPoint.y-FirstPoint.y)\n\t\t\t\t},\n\t\t\t\touter : {\n\t\t\t\t\tx: MiddlePoint.x+fb*(AfterPoint.x-FirstPoint.x),\n\t\t\t\t\ty : MiddlePoint.y+fb*(AfterPoint.y-FirstPoint.y)\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tcalculateOrderOfMagnitude = helpers.calculateOrderOfMagnitude = function(val){\n\t\t\treturn Math.floor(Math.log(val) / Math.LN10);\n\t\t},\n\t\tcalculateScaleRange = helpers.calculateScaleRange = function(valuesArray, drawingSize, textSize, startFromZero, integersOnly){\n\n\t\t\t//Set a minimum step of two - a point at the top of the graph, and a point at the base\n\t\t\tvar minSteps = 2,\n\t\t\t\tmaxSteps = Math.floor(drawingSize/(textSize * 1.5)),\n\t\t\t\tskipFitting = (minSteps >= maxSteps);\n\n\t\t\tvar maxValue = max(valuesArray),\n\t\t\t\tminValue = min(valuesArray);\n\n\t\t\t// We need some degree of seperation here to calculate the scales if all the values are the same\n\t\t\t// Adding/minusing 0.5 will give us a range of 1.\n\t\t\tif (maxValue === minValue){\n\t\t\t\tmaxValue += 0.5;\n\t\t\t\t// So we don't end up with a graph with a negative start value if we've said always start from zero\n\t\t\t\tif (minValue >= 0.5 && !startFromZero){\n\t\t\t\t\tminValue -= 0.5;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// Make up a whole number above the values\n\t\t\t\t\tmaxValue += 0.5;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar\tvalueRange = Math.abs(maxValue - minValue),\n\t\t\t\trangeOrderOfMagnitude = calculateOrderOfMagnitude(valueRange),\n\t\t\t\tgraphMax = Math.ceil(maxValue / (1 * Math.pow(10, rangeOrderOfMagnitude))) * Math.pow(10, rangeOrderOfMagnitude),\n\t\t\t\tgraphMin = (startFromZero) ? 0 : Math.floor(minValue / (1 * Math.pow(10, rangeOrderOfMagnitude))) * Math.pow(10, rangeOrderOfMagnitude),\n\t\t\t\tgraphRange = graphMax - graphMin,\n\t\t\t\tstepValue = Math.pow(10, rangeOrderOfMagnitude),\n\t\t\t\tnumberOfSteps = Math.round(graphRange / stepValue);\n\n\t\t\t//If we have more space on the graph we'll use it to give more definition to the data\n\t\t\twhile((numberOfSteps > maxSteps || (numberOfSteps * 2) < maxSteps) && !skipFitting) {\n\t\t\t\tif(numberOfSteps > maxSteps){\n\t\t\t\t\tstepValue *=2;\n\t\t\t\t\tnumberOfSteps = Math.round(graphRange/stepValue);\n\t\t\t\t\t// Don't ever deal with a decimal number of steps - cancel fitting and just use the minimum number of steps.\n\t\t\t\t\tif (numberOfSteps % 1 !== 0){\n\t\t\t\t\t\tskipFitting = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//We can fit in double the amount of scale points on the scale\n\t\t\t\telse{\n\t\t\t\t\t//If user has declared ints only, and the step value isn't a decimal\n\t\t\t\t\tif (integersOnly && rangeOrderOfMagnitude >= 0){\n\t\t\t\t\t\t//If the user has said integers only, we need to check that making the scale more granular wouldn't make it a float\n\t\t\t\t\t\tif(stepValue/2 % 1 === 0){\n\t\t\t\t\t\t\tstepValue /=2;\n\t\t\t\t\t\t\tnumberOfSteps = Math.round(graphRange/stepValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//If it would make it a float break out of the loop\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//If the scale doesn't have to be an int, make the scale more granular anyway.\n\t\t\t\t\telse{\n\t\t\t\t\t\tstepValue /=2;\n\t\t\t\t\t\tnumberOfSteps = Math.round(graphRange/stepValue);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (skipFitting){\n\t\t\t\tnumberOfSteps = minSteps;\n\t\t\t\tstepValue = graphRange / numberOfSteps;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tsteps : numberOfSteps,\n\t\t\t\tstepValue : stepValue,\n\t\t\t\tmin : graphMin,\n\t\t\t\tmax\t: graphMin + (numberOfSteps * stepValue)\n\t\t\t};\n\n\t\t},\n\t\t/* jshint ignore:start */\n\t\t// Blows up jshint errors based on the new Function constructor\n\t\t//Templating methods\n\t\t//Javascript micro templating by John Resig - source at http://ejohn.org/blog/javascript-micro-templating/\n\t\ttemplate = helpers.template = function(templateString, valuesObject){\n\n\t\t\t// If templateString is function rather than string-template - call the function for valuesObject\n\n\t\t\tif(templateString instanceof Function){\n\t\t\t \treturn templateString(valuesObject);\n\t\t \t}\n\n\t\t\tvar cache = {};\n\t\t\tfunction tmpl(str, data){\n\t\t\t\t// Figure out if we're getting a template, or if we need to\n\t\t\t\t// load the template - and be sure to cache the result.\n\t\t\t\tvar fn = !/\\W/.test(str) ?\n\t\t\t\tcache[str] = cache[str] :\n\n\t\t\t\t// Generate a reusable function that will serve as a template\n\t\t\t\t// generator (and which will be cached).\n\t\t\t\tnew Function(\"obj\",\n\t\t\t\t\t\"var p=[],print=function(){p.push.apply(p,arguments);};\" +\n\n\t\t\t\t\t// Introduce the data as local variables using with(){}\n\t\t\t\t\t\"with(obj){p.push('\" +\n\n\t\t\t\t\t// Convert the template into pure JavaScript\n\t\t\t\t\tstr\n\t\t\t\t\t\t.replace(/[\\r\\t\\n]/g, \" \")\n\t\t\t\t\t\t.split(\"<%\").join(\"\\t\")\n\t\t\t\t\t\t.replace(/((^|%>)[^\\t]*)'/g, \"$1\\r\")\n\t\t\t\t\t\t.replace(/\\t=(.*?)%>/g, \"',$1,'\")\n\t\t\t\t\t\t.split(\"\\t\").join(\"');\")\n\t\t\t\t\t\t.split(\"%>\").join(\"p.push('\")\n\t\t\t\t\t\t.split(\"\\r\").join(\"\\\\'\") +\n\t\t\t\t\t\"');}return p.join('');\"\n\t\t\t\t);\n\n\t\t\t\t// Provide some basic currying to the user\n\t\t\t\treturn data ? fn( data ) : fn;\n\t\t\t}\n\t\t\treturn tmpl(templateString,valuesObject);\n\t\t},\n\t\t/* jshint ignore:end */\n\t\tgenerateLabels = helpers.generateLabels = function(templateString,numberOfSteps,graphMin,stepValue){\n\t\t\tvar labelsArray = new Array(numberOfSteps);\n\t\t\tif (labelTemplateString){\n\t\t\t\teach(labelsArray,function(val,index){\n\t\t\t\t\tlabelsArray[index] = template(templateString,{value: (graphMin + (stepValue*(index+1)))});\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn labelsArray;\n\t\t},\n\t\t//--Animation methods\n\t\t//Easing functions adapted from Robert Penner's easing equations\n\t\t//http://www.robertpenner.com/easing/\n\t\teasingEffects = helpers.easingEffects = {\n\t\t\tlinear: function (t) {\n\t\t\t\treturn t;\n\t\t\t},\n\t\t\teaseInQuad: function (t) {\n\t\t\t\treturn t * t;\n\t\t\t},\n\t\t\teaseOutQuad: function (t) {\n\t\t\t\treturn -1 * t * (t - 2);\n\t\t\t},\n\t\t\teaseInOutQuad: function (t) {\n\t\t\t\tif ((t /= 1 / 2) < 1) return 1 / 2 * t * t;\n\t\t\t\treturn -1 / 2 * ((--t) * (t - 2) - 1);\n\t\t\t},\n\t\t\teaseInCubic: function (t) {\n\t\t\t\treturn t * t * t;\n\t\t\t},\n\t\t\teaseOutCubic: function (t) {\n\t\t\t\treturn 1 * ((t = t / 1 - 1) * t * t + 1);\n\t\t\t},\n\t\t\teaseInOutCubic: function (t) {\n\t\t\t\tif ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t;\n\t\t\t\treturn 1 / 2 * ((t -= 2) * t * t + 2);\n\t\t\t},\n\t\t\teaseInQuart: function (t) {\n\t\t\t\treturn t * t * t * t;\n\t\t\t},\n\t\t\teaseOutQuart: function (t) {\n\t\t\t\treturn -1 * ((t = t / 1 - 1) * t * t * t - 1);\n\t\t\t},\n\t\t\teaseInOutQuart: function (t) {\n\t\t\t\tif ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t * t;\n\t\t\t\treturn -1 / 2 * ((t -= 2) * t * t * t - 2);\n\t\t\t},\n\t\t\teaseInQuint: function (t) {\n\t\t\t\treturn 1 * (t /= 1) * t * t * t * t;\n\t\t\t},\n\t\t\teaseOutQuint: function (t) {\n\t\t\t\treturn 1 * ((t = t / 1 - 1) * t * t * t * t + 1);\n\t\t\t},\n\t\t\teaseInOutQuint: function (t) {\n\t\t\t\tif ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t * t * t;\n\t\t\t\treturn 1 / 2 * ((t -= 2) * t * t * t * t + 2);\n\t\t\t},\n\t\t\teaseInSine: function (t) {\n\t\t\t\treturn -1 * Math.cos(t / 1 * (Math.PI / 2)) + 1;\n\t\t\t},\n\t\t\teaseOutSine: function (t) {\n\t\t\t\treturn 1 * Math.sin(t / 1 * (Math.PI / 2));\n\t\t\t},\n\t\t\teaseInOutSine: function (t) {\n\t\t\t\treturn -1 / 2 * (Math.cos(Math.PI * t / 1) - 1);\n\t\t\t},\n\t\t\teaseInExpo: function (t) {\n\t\t\t\treturn (t === 0) ? 1 : 1 * Math.pow(2, 10 * (t / 1 - 1));\n\t\t\t},\n\t\t\teaseOutExpo: function (t) {\n\t\t\t\treturn (t === 1) ? 1 : 1 * (-Math.pow(2, -10 * t / 1) + 1);\n\t\t\t},\n\t\t\teaseInOutExpo: function (t) {\n\t\t\t\tif (t === 0) return 0;\n\t\t\t\tif (t === 1) return 1;\n\t\t\t\tif ((t /= 1 / 2) < 1) return 1 / 2 * Math.pow(2, 10 * (t - 1));\n\t\t\t\treturn 1 / 2 * (-Math.pow(2, -10 * --t) + 2);\n\t\t\t},\n\t\t\teaseInCirc: function (t) {\n\t\t\t\tif (t >= 1) return t;\n\t\t\t\treturn -1 * (Math.sqrt(1 - (t /= 1) * t) - 1);\n\t\t\t},\n\t\t\teaseOutCirc: function (t) {\n\t\t\t\treturn 1 * Math.sqrt(1 - (t = t / 1 - 1) * t);\n\t\t\t},\n\t\t\teaseInOutCirc: function (t) {\n\t\t\t\tif ((t /= 1 / 2) < 1) return -1 / 2 * (Math.sqrt(1 - t * t) - 1);\n\t\t\t\treturn 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n\t\t\t},\n\t\t\teaseInElastic: function (t) {\n\t\t\t\tvar s = 1.70158;\n\t\t\t\tvar p = 0;\n\t\t\t\tvar a = 1;\n\t\t\t\tif (t === 0) return 0;\n\t\t\t\tif ((t /= 1) == 1) return 1;\n\t\t\t\tif (!p) p = 1 * 0.3;\n\t\t\t\tif (a < Math.abs(1)) {\n\t\t\t\t\ta = 1;\n\t\t\t\t\ts = p / 4;\n\t\t\t\t} else s = p / (2 * Math.PI) * Math.asin(1 / a);\n\t\t\t\treturn -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));\n\t\t\t},\n\t\t\teaseOutElastic: function (t) {\n\t\t\t\tvar s = 1.70158;\n\t\t\t\tvar p = 0;\n\t\t\t\tvar a = 1;\n\t\t\t\tif (t === 0) return 0;\n\t\t\t\tif ((t /= 1) == 1) return 1;\n\t\t\t\tif (!p) p = 1 * 0.3;\n\t\t\t\tif (a < Math.abs(1)) {\n\t\t\t\t\ta = 1;\n\t\t\t\t\ts = p / 4;\n\t\t\t\t} else s = p / (2 * Math.PI) * Math.asin(1 / a);\n\t\t\t\treturn a * Math.pow(2, -10 * t) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) + 1;\n\t\t\t},\n\t\t\teaseInOutElastic: function (t) {\n\t\t\t\tvar s = 1.70158;\n\t\t\t\tvar p = 0;\n\t\t\t\tvar a = 1;\n\t\t\t\tif (t === 0) return 0;\n\t\t\t\tif ((t /= 1 / 2) == 2) return 1;\n\t\t\t\tif (!p) p = 1 * (0.3 * 1.5);\n\t\t\t\tif (a < Math.abs(1)) {\n\t\t\t\t\ta = 1;\n\t\t\t\t\ts = p / 4;\n\t\t\t\t} else s = p / (2 * Math.PI) * Math.asin(1 / a);\n\t\t\t\tif (t < 1) return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));\n\t\t\t\treturn a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) * 0.5 + 1;\n\t\t\t},\n\t\t\teaseInBack: function (t) {\n\t\t\t\tvar s = 1.70158;\n\t\t\t\treturn 1 * (t /= 1) * t * ((s + 1) * t - s);\n\t\t\t},\n\t\t\teaseOutBack: function (t) {\n\t\t\t\tvar s = 1.70158;\n\t\t\t\treturn 1 * ((t = t / 1 - 1) * t * ((s + 1) * t + s) + 1);\n\t\t\t},\n\t\t\teaseInOutBack: function (t) {\n\t\t\t\tvar s = 1.70158;\n\t\t\t\tif ((t /= 1 / 2) < 1) return 1 / 2 * (t * t * (((s *= (1.525)) + 1) * t - s));\n\t\t\t\treturn 1 / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);\n\t\t\t},\n\t\t\teaseInBounce: function (t) {\n\t\t\t\treturn 1 - easingEffects.easeOutBounce(1 - t);\n\t\t\t},\n\t\t\teaseOutBounce: function (t) {\n\t\t\t\tif ((t /= 1) < (1 / 2.75)) {\n\t\t\t\t\treturn 1 * (7.5625 * t * t);\n\t\t\t\t} else if (t < (2 / 2.75)) {\n\t\t\t\t\treturn 1 * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75);\n\t\t\t\t} else if (t < (2.5 / 2.75)) {\n\t\t\t\t\treturn 1 * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375);\n\t\t\t\t} else {\n\t\t\t\t\treturn 1 * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375);\n\t\t\t\t}\n\t\t\t},\n\t\t\teaseInOutBounce: function (t) {\n\t\t\t\tif (t < 1 / 2) return easingEffects.easeInBounce(t * 2) * 0.5;\n\t\t\t\treturn easingEffects.easeOutBounce(t * 2 - 1) * 0.5 + 1 * 0.5;\n\t\t\t}\n\t\t},\n\t\t//Request animation polyfill - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/\n\t\trequestAnimFrame = helpers.requestAnimFrame = (function(){\n\t\t\treturn window.requestAnimationFrame ||\n\t\t\t\twindow.webkitRequestAnimationFrame ||\n\t\t\t\twindow.mozRequestAnimationFrame ||\n\t\t\t\twindow.oRequestAnimationFrame ||\n\t\t\t\twindow.msRequestAnimationFrame ||\n\t\t\t\tfunction(callback) {\n\t\t\t\t\treturn window.setTimeout(callback, 1000 / 60);\n\t\t\t\t};\n\t\t})(),\n\t\tcancelAnimFrame = helpers.cancelAnimFrame = (function(){\n\t\t\treturn window.cancelAnimationFrame ||\n\t\t\t\twindow.webkitCancelAnimationFrame ||\n\t\t\t\twindow.mozCancelAnimationFrame ||\n\t\t\t\twindow.oCancelAnimationFrame ||\n\t\t\t\twindow.msCancelAnimationFrame ||\n\t\t\t\tfunction(callback) {\n\t\t\t\t\treturn window.clearTimeout(callback, 1000 / 60);\n\t\t\t\t};\n\t\t})(),\n\t\tanimationLoop = helpers.animationLoop = function(callback,totalSteps,easingString,onProgress,onComplete,chartInstance){\n\n\t\t\tvar currentStep = 0,\n\t\t\t\teasingFunction = easingEffects[easingString] || easingEffects.linear;\n\n\t\t\tvar animationFrame = function(){\n\t\t\t\tcurrentStep++;\n\t\t\t\tvar stepDecimal = currentStep/totalSteps;\n\t\t\t\tvar easeDecimal = easingFunction(stepDecimal);\n\n\t\t\t\tcallback.call(chartInstance,easeDecimal,stepDecimal, currentStep);\n\t\t\t\tonProgress.call(chartInstance,easeDecimal,stepDecimal);\n\t\t\t\tif (currentStep < totalSteps){\n\t\t\t\t\tchartInstance.animationFrame = requestAnimFrame(animationFrame);\n\t\t\t\t} else{\n\t\t\t\t\tonComplete.apply(chartInstance);\n\t\t\t\t}\n\t\t\t};\n\t\t\trequestAnimFrame(animationFrame);\n\t\t},\n\t\t//-- DOM methods\n\t\tgetRelativePosition = helpers.getRelativePosition = function(evt){\n\t\t\tvar mouseX, mouseY;\n\t\t\tvar e = evt.originalEvent || evt,\n\t\t\t\tcanvas = evt.currentTarget || evt.srcElement,\n\t\t\t\tboundingRect = canvas.getBoundingClientRect();\n\n\t\t\tif (e.touches){\n\t\t\t\tmouseX = e.touches[0].clientX - boundingRect.left;\n\t\t\t\tmouseY = e.touches[0].clientY - boundingRect.top;\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmouseX = e.clientX - boundingRect.left;\n\t\t\t\tmouseY = e.clientY - boundingRect.top;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tx : mouseX,\n\t\t\t\ty : mouseY\n\t\t\t};\n\n\t\t},\n\t\taddEvent = helpers.addEvent = function(node,eventType,method){\n\t\t\tif (node.addEventListener){\n\t\t\t\tnode.addEventListener(eventType,method);\n\t\t\t} else if (node.attachEvent){\n\t\t\t\tnode.attachEvent(\"on\"+eventType, method);\n\t\t\t} else {\n\t\t\t\tnode[\"on\"+eventType] = method;\n\t\t\t}\n\t\t},\n\t\tremoveEvent = helpers.removeEvent = function(node, eventType, handler){\n\t\t\tif (node.removeEventListener){\n\t\t\t\tnode.removeEventListener(eventType, handler, false);\n\t\t\t} else if (node.detachEvent){\n\t\t\t\tnode.detachEvent(\"on\"+eventType,handler);\n\t\t\t} else{\n\t\t\t\tnode[\"on\" + eventType] = noop;\n\t\t\t}\n\t\t},\n\t\tbindEvents = helpers.bindEvents = function(chartInstance, arrayOfEvents, handler){\n\t\t\t// Create the events object if it's not already present\n\t\t\tif (!chartInstance.events) chartInstance.events = {};\n\n\t\t\teach(arrayOfEvents,function(eventName){\n\t\t\t\tchartInstance.events[eventName] = function(){\n\t\t\t\t\thandler.apply(chartInstance, arguments);\n\t\t\t\t};\n\t\t\t\taddEvent(chartInstance.chart.canvas,eventName,chartInstance.events[eventName]);\n\t\t\t});\n\t\t},\n\t\tunbindEvents = helpers.unbindEvents = function (chartInstance, arrayOfEvents) {\n\t\t\teach(arrayOfEvents, function(handler,eventName){\n\t\t\t\tremoveEvent(chartInstance.chart.canvas, eventName, handler);\n\t\t\t});\n\t\t},\n\t\tgetMaximumWidth = helpers.getMaximumWidth = function(domNode){\n\t\t\tvar container = domNode.parentNode;\n\t\t\t// TODO = check cross browser stuff with this.\n\t\t\treturn container.clientWidth;\n\t\t},\n\t\tgetMaximumHeight = helpers.getMaximumHeight = function(domNode){\n\t\t\tvar container = domNode.parentNode;\n\t\t\t// TODO = check cross browser stuff with this.\n\t\t\treturn container.clientHeight;\n\t\t},\n\t\tgetMaximumSize = helpers.getMaximumSize = helpers.getMaximumWidth, // legacy support\n\t\tretinaScale = helpers.retinaScale = function(chart){\n\t\t\tvar ctx = chart.ctx,\n\t\t\t\twidth = chart.canvas.width,\n\t\t\t\theight = chart.canvas.height;\n\n\t\t\tif (window.devicePixelRatio) {\n\t\t\t\tctx.canvas.style.width = width + \"px\";\n\t\t\t\tctx.canvas.style.height = height + \"px\";\n\t\t\t\tctx.canvas.height = height * window.devicePixelRatio;\n\t\t\t\tctx.canvas.width = width * window.devicePixelRatio;\n\t\t\t\tctx.scale(window.devicePixelRatio, window.devicePixelRatio);\n\t\t\t}\n\t\t},\n\t\t//-- Canvas methods\n\t\tclear = helpers.clear = function(chart){\n\t\t\tchart.ctx.clearRect(0,0,chart.width,chart.height);\n\t\t},\n\t\tfontString = helpers.fontString = function(pixelSize,fontStyle,fontFamily){\n\t\t\treturn fontStyle + \" \" + pixelSize+\"px \" + fontFamily;\n\t\t},\n\t\tlongestText = helpers.longestText = function(ctx,font,arrayOfStrings){\n\t\t\tctx.font = font;\n\t\t\tvar longest = 0;\n\t\t\teach(arrayOfStrings,function(string){\n\t\t\t\tvar textWidth = ctx.measureText(string).width;\n\t\t\t\tlongest = (textWidth > longest) ? textWidth : longest;\n\t\t\t});\n\t\t\treturn longest;\n\t\t},\n\t\tdrawRoundedRectangle = helpers.drawRoundedRectangle = function(ctx,x,y,width,height,radius){\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(x + radius, y);\n\t\t\tctx.lineTo(x + width - radius, y);\n\t\t\tctx.quadraticCurveTo(x + width, y, x + width, y + radius);\n\t\t\tctx.lineTo(x + width, y + height - radius);\n\t\t\tctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\n\t\t\tctx.lineTo(x + radius, y + height);\n\t\t\tctx.quadraticCurveTo(x, y + height, x, y + height - radius);\n\t\t\tctx.lineTo(x, y + radius);\n\t\t\tctx.quadraticCurveTo(x, y, x + radius, y);\n\t\t\tctx.closePath();\n\t\t};\n\n\n\t//Store a reference to each instance - allowing us to globally resize chart instances on window resize.\n\t//Destroy method on the chart will remove the instance of the chart from this reference.\n\tChart.instances = {};\n\n\tChart.Type = function(data,options,chart){\n\t\tthis.options = options;\n\t\tthis.chart = chart;\n\t\tthis.id = uid();\n\t\t//Add the chart instance to the global namespace\n\t\tChart.instances[this.id] = this;\n\n\t\t// Initialize is always called when a chart type is created\n\t\t// By default it is a no op, but it should be extended\n\t\tif (options.responsive){\n\t\t\tthis.resize();\n\t\t}\n\t\tthis.initialize.call(this,data);\n\t};\n\n\t//Core methods that'll be a part of every chart type\n\textend(Chart.Type.prototype,{\n\t\tinitialize : function(){return this;},\n\t\tclear : function(){\n\t\t\tclear(this.chart);\n\t\t\treturn this;\n\t\t},\n\t\tstop : function(){\n\t\t\t// Stops any current animation loop occuring\n\t\t\tcancelAnimFrame(this.animationFrame);\n\t\t\treturn this;\n\t\t},\n\t\tresize : function(callback){\n\t\t\tthis.stop();\n\t\t\tvar canvas = this.chart.canvas,\n\t\t\t\tnewWidth = getMaximumWidth(this.chart.canvas),\n\t\t\t\tnewHeight = this.options.maintainAspectRatio ? newWidth / this.chart.aspectRatio : getMaximumHeight(this.chart.canvas);\n\n\t\t\tcanvas.width = this.chart.width = newWidth;\n\t\t\tcanvas.height = this.chart.height = newHeight;\n\n\t\t\tretinaScale(this.chart);\n\n\t\t\tif (typeof callback === \"function\"){\n\t\t\t\tcallback.apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\t\treflow : noop,\n\t\trender : function(reflow){\n\t\t\tif (reflow){\n\t\t\t\tthis.reflow();\n\t\t\t}\n\t\t\tif (this.options.animation && !reflow){\n\t\t\t\thelpers.animationLoop(\n\t\t\t\t\tthis.draw,\n\t\t\t\t\tthis.options.animationSteps,\n\t\t\t\t\tthis.options.animationEasing,\n\t\t\t\t\tthis.options.onAnimationProgress,\n\t\t\t\t\tthis.options.onAnimationComplete,\n\t\t\t\t\tthis\n\t\t\t\t);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthis.draw();\n\t\t\t\tthis.options.onAnimationComplete.call(this);\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\t\tgenerateLegend : function(){\n\t\t\treturn template(this.options.legendTemplate,this);\n\t\t},\n\t\tdestroy : function(){\n\t\t\tthis.clear();\n\t\t\tunbindEvents(this, this.events);\n\t\t\tvar canvas = this.chart.canvas;\n\n\t\t\t// Reset canvas height/width attributes starts a fresh with the canvas context\n\t\t\tcanvas.width = this.chart.width;\n\t\t\tcanvas.height = this.chart.height;\n\n\t\t\t// < IE9 doesn't support removeProperty\n\t\t\tif (canvas.style.removeProperty) {\n\t\t\t\tcanvas.style.removeProperty('width');\n\t\t\t\tcanvas.style.removeProperty('height');\n\t\t\t} else {\n\t\t\t\tcanvas.style.removeAttribute('width');\n\t\t\t\tcanvas.style.removeAttribute('height');\n\t\t\t}\n\n\t\t\tdelete Chart.instances[this.id];\n\t\t},\n\t\tshowTooltip : function(ChartElements, forceRedraw){\n\t\t\t// Only redraw the chart if we've actually changed what we're hovering on.\n\t\t\tif (typeof this.activeElements === 'undefined') this.activeElements = [];\n\n\t\t\tvar isChanged = (function(Elements){\n\t\t\t\tvar changed = false;\n\n\t\t\t\tif (Elements.length !== this.activeElements.length){\n\t\t\t\t\tchanged = true;\n\t\t\t\t\treturn changed;\n\t\t\t\t}\n\n\t\t\t\teach(Elements, function(element, index){\n\t\t\t\t\tif (element !== this.activeElements[index]){\n\t\t\t\t\t\tchanged = true;\n\t\t\t\t\t}\n\t\t\t\t}, this);\n\t\t\t\treturn changed;\n\t\t\t}).call(this, ChartElements);\n\n\t\t\tif (!isChanged && !forceRedraw){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthis.activeElements = ChartElements;\n\t\t\t}\n\t\t\tthis.draw();\n\t\t\tif(this.options.customTooltips){\n\t\t\t\tthis.options.customTooltips(false);\n\t\t\t}\n\t\t\tif (ChartElements.length > 0){\n\t\t\t\t// If we have multiple datasets, show a MultiTooltip for all of the data points at that index\n\t\t\t\tif (this.datasets && this.datasets.length > 1) {\n\t\t\t\t\tvar dataArray,\n\t\t\t\t\t\tdataIndex;\n\n\t\t\t\t\tfor (var i = this.datasets.length - 1; i >= 0; i--) {\n\t\t\t\t\t\tdataArray = this.datasets[i].points || this.datasets[i].bars || this.datasets[i].segments;\n\t\t\t\t\t\tdataIndex = indexOf(dataArray, ChartElements[0]);\n\t\t\t\t\t\tif (dataIndex !== -1){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar tooltipLabels = [],\n\t\t\t\t\t\ttooltipColors = [],\n\t\t\t\t\t\tmedianPosition = (function(index) {\n\n\t\t\t\t\t\t\t// Get all the points at that particular index\n\t\t\t\t\t\t\tvar Elements = [],\n\t\t\t\t\t\t\t\tdataCollection,\n\t\t\t\t\t\t\t\txPositions = [],\n\t\t\t\t\t\t\t\tyPositions = [],\n\t\t\t\t\t\t\t\txMax,\n\t\t\t\t\t\t\t\tyMax,\n\t\t\t\t\t\t\t\txMin,\n\t\t\t\t\t\t\t\tyMin;\n\t\t\t\t\t\t\thelpers.each(this.datasets, function(dataset){\n\t\t\t\t\t\t\t\tdataCollection = dataset.points || dataset.bars || dataset.segments;\n\t\t\t\t\t\t\t\tif (dataCollection[dataIndex] && dataCollection[dataIndex].hasValue()){\n\t\t\t\t\t\t\t\t\tElements.push(dataCollection[dataIndex]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\thelpers.each(Elements, function(element) {\n\t\t\t\t\t\t\t\txPositions.push(element.x);\n\t\t\t\t\t\t\t\tyPositions.push(element.y);\n\n\n\t\t\t\t\t\t\t\t//Include any colour information about the element\n\t\t\t\t\t\t\t\ttooltipLabels.push(helpers.template(this.options.multiTooltipTemplate, element));\n\t\t\t\t\t\t\t\ttooltipColors.push({\n\t\t\t\t\t\t\t\t\tfill: element._saved.fillColor || element.fillColor,\n\t\t\t\t\t\t\t\t\tstroke: element._saved.strokeColor || element.strokeColor\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t}, this);\n\n\t\t\t\t\t\t\tyMin = min(yPositions);\n\t\t\t\t\t\t\tyMax = max(yPositions);\n\n\t\t\t\t\t\t\txMin = min(xPositions);\n\t\t\t\t\t\t\txMax = max(xPositions);\n\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tx: (xMin > this.chart.width/2) ? xMin : xMax,\n\t\t\t\t\t\t\t\ty: (yMin + yMax)/2\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}).call(this, dataIndex);\n\n\t\t\t\t\tnew Chart.MultiTooltip({\n\t\t\t\t\t\tx: medianPosition.x,\n\t\t\t\t\t\ty: medianPosition.y,\n\t\t\t\t\t\txPadding: this.options.tooltipXPadding,\n\t\t\t\t\t\tyPadding: this.options.tooltipYPadding,\n\t\t\t\t\t\txOffset: this.options.tooltipXOffset,\n\t\t\t\t\t\tfillColor: this.options.tooltipFillColor,\n\t\t\t\t\t\ttextColor: this.options.tooltipFontColor,\n\t\t\t\t\t\tfontFamily: this.options.tooltipFontFamily,\n\t\t\t\t\t\tfontStyle: this.options.tooltipFontStyle,\n\t\t\t\t\t\tfontSize: this.options.tooltipFontSize,\n\t\t\t\t\t\ttitleTextColor: this.options.tooltipTitleFontColor,\n\t\t\t\t\t\ttitleFontFamily: this.options.tooltipTitleFontFamily,\n\t\t\t\t\t\ttitleFontStyle: this.options.tooltipTitleFontStyle,\n\t\t\t\t\t\ttitleFontSize: this.options.tooltipTitleFontSize,\n\t\t\t\t\t\tcornerRadius: this.options.tooltipCornerRadius,\n\t\t\t\t\t\tlabels: tooltipLabels,\n\t\t\t\t\t\tlegendColors: tooltipColors,\n\t\t\t\t\t\tlegendColorBackground : this.options.multiTooltipKeyBackground,\n\t\t\t\t\t\ttitle: ChartElements[0].label,\n\t\t\t\t\t\tchart: this.chart,\n\t\t\t\t\t\tctx: this.chart.ctx,\n\t\t\t\t\t\tcustom: this.options.customTooltips\n\t\t\t\t\t}).draw();\n\n\t\t\t\t} else {\n\t\t\t\t\teach(ChartElements, function(Element) {\n\t\t\t\t\t\tvar tooltipPosition = Element.tooltipPosition();\n\t\t\t\t\t\tnew Chart.Tooltip({\n\t\t\t\t\t\t\tx: Math.round(tooltipPosition.x),\n\t\t\t\t\t\t\ty: Math.round(tooltipPosition.y),\n\t\t\t\t\t\t\txPadding: this.options.tooltipXPadding,\n\t\t\t\t\t\t\tyPadding: this.options.tooltipYPadding,\n\t\t\t\t\t\t\tfillColor: this.options.tooltipFillColor,\n\t\t\t\t\t\t\ttextColor: this.options.tooltipFontColor,\n\t\t\t\t\t\t\tfontFamily: this.options.tooltipFontFamily,\n\t\t\t\t\t\t\tfontStyle: this.options.tooltipFontStyle,\n\t\t\t\t\t\t\tfontSize: this.options.tooltipFontSize,\n\t\t\t\t\t\t\tcaretHeight: this.options.tooltipCaretSize,\n\t\t\t\t\t\t\tcornerRadius: this.options.tooltipCornerRadius,\n\t\t\t\t\t\t\ttext: template(this.options.tooltipTemplate, Element),\n\t\t\t\t\t\t\tchart: this.chart,\n\t\t\t\t\t\t\tcustom: this.options.customTooltips\n\t\t\t\t\t\t}).draw();\n\t\t\t\t\t}, this);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\t\ttoBase64Image : function(){\n\t\t\treturn this.chart.canvas.toDataURL.apply(this.chart.canvas, arguments);\n\t\t}\n\t});\n\n\tChart.Type.extend = function(extensions){\n\n\t\tvar parent = this;\n\n\t\tvar ChartType = function(){\n\t\t\treturn parent.apply(this,arguments);\n\t\t};\n\n\t\t//Copy the prototype object of the this class\n\t\tChartType.prototype = clone(parent.prototype);\n\t\t//Now overwrite some of the properties in the base class with the new extensions\n\t\textend(ChartType.prototype, extensions);\n\n\t\tChartType.extend = Chart.Type.extend;\n\n\t\tif (extensions.name || parent.prototype.name){\n\n\t\t\tvar chartName = extensions.name || parent.prototype.name;\n\t\t\t//Assign any potential default values of the new chart type\n\n\t\t\t//If none are defined, we'll use a clone of the chart type this is being extended from.\n\t\t\t//I.e. if we extend a line chart, we'll use the defaults from the line chart if our new chart\n\t\t\t//doesn't define some defaults of their own.\n\n\t\t\tvar baseDefaults = (Chart.defaults[parent.prototype.name]) ? clone(Chart.defaults[parent.prototype.name]) : {};\n\n\t\t\tChart.defaults[chartName] = extend(baseDefaults,extensions.defaults);\n\n\t\t\tChart.types[chartName] = ChartType;\n\n\t\t\t//Register this new chart type in the Chart prototype\n\t\t\tChart.prototype[chartName] = function(data,options){\n\t\t\t\tvar config = merge(Chart.defaults.global, Chart.defaults[chartName], options || {});\n\t\t\t\treturn new ChartType(data,config,this);\n\t\t\t};\n\t\t} else{\n\t\t\twarn(\"Name not provided for this chart, so it hasn't been registered\");\n\t\t}\n\t\treturn parent;\n\t};\n\n\tChart.Element = function(configuration){\n\t\textend(this,configuration);\n\t\tthis.initialize.apply(this,arguments);\n\t\tthis.save();\n\t};\n\textend(Chart.Element.prototype,{\n\t\tinitialize : function(){},\n\t\trestore : function(props){\n\t\t\tif (!props){\n\t\t\t\textend(this,this._saved);\n\t\t\t} else {\n\t\t\t\teach(props,function(key){\n\t\t\t\t\tthis[key] = this._saved[key];\n\t\t\t\t},this);\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\t\tsave : function(){\n\t\t\tthis._saved = clone(this);\n\t\t\tdelete this._saved._saved;\n\t\t\treturn this;\n\t\t},\n\t\tupdate : function(newProps){\n\t\t\teach(newProps,function(value,key){\n\t\t\t\tthis._saved[key] = this[key];\n\t\t\t\tthis[key] = value;\n\t\t\t},this);\n\t\t\treturn this;\n\t\t},\n\t\ttransition : function(props,ease){\n\t\t\teach(props,function(value,key){\n\t\t\t\tthis[key] = ((value - this._saved[key]) * ease) + this._saved[key];\n\t\t\t},this);\n\t\t\treturn this;\n\t\t},\n\t\ttooltipPosition : function(){\n\t\t\treturn {\n\t\t\t\tx : this.x,\n\t\t\t\ty : this.y\n\t\t\t};\n\t\t},\n\t\thasValue: function(){\n\t\t\treturn isNumber(this.value);\n\t\t}\n\t});\n\n\tChart.Element.extend = inherits;\n\n\n\tChart.Point = Chart.Element.extend({\n\t\tdisplay: true,\n\t\tinRange: function(chartX,chartY){\n\t\t\tvar hitDetectionRange = this.hitDetectionRadius + this.radius;\n\t\t\treturn ((Math.pow(chartX-this.x, 2)+Math.pow(chartY-this.y, 2)) < Math.pow(hitDetectionRange,2));\n\t\t},\n\t\tdraw : function(){\n\t\t\tif (this.display){\n\t\t\t\tvar ctx = this.ctx;\n\t\t\t\tctx.beginPath();\n\n\t\t\t\tctx.arc(this.x, this.y, this.radius, 0, Math.PI*2);\n\t\t\t\tctx.closePath();\n\n\t\t\t\tctx.strokeStyle = this.strokeColor;\n\t\t\t\tctx.lineWidth = this.strokeWidth;\n\n\t\t\t\tctx.fillStyle = this.fillColor;\n\n\t\t\t\tctx.fill();\n\t\t\t\tctx.stroke();\n\t\t\t}\n\n\n\t\t\t//Quick debug for bezier curve splining\n\t\t\t//Highlights control points and the line between them.\n\t\t\t//Handy for dev - stripped in the min version.\n\n\t\t\t// ctx.save();\n\t\t\t// ctx.fillStyle = \"black\";\n\t\t\t// ctx.strokeStyle = \"black\"\n\t\t\t// ctx.beginPath();\n\t\t\t// ctx.arc(this.controlPoints.inner.x,this.controlPoints.inner.y, 2, 0, Math.PI*2);\n\t\t\t// ctx.fill();\n\n\t\t\t// ctx.beginPath();\n\t\t\t// ctx.arc(this.controlPoints.outer.x,this.controlPoints.outer.y, 2, 0, Math.PI*2);\n\t\t\t// ctx.fill();\n\n\t\t\t// ctx.moveTo(this.controlPoints.inner.x,this.controlPoints.inner.y);\n\t\t\t// ctx.lineTo(this.x, this.y);\n\t\t\t// ctx.lineTo(this.controlPoints.outer.x,this.controlPoints.outer.y);\n\t\t\t// ctx.stroke();\n\n\t\t\t// ctx.restore();\n\n\n\n\t\t}\n\t});\n\n\tChart.Arc = Chart.Element.extend({\n\t\tinRange : function(chartX,chartY){\n\n\t\t\tvar pointRelativePosition = helpers.getAngleFromPoint(this, {\n\t\t\t\tx: chartX,\n\t\t\t\ty: chartY\n\t\t\t});\n\n\t\t\t//Check if within the range of the open/close angle\n\t\t\tvar betweenAngles = (pointRelativePosition.angle >= this.startAngle && pointRelativePosition.angle <= this.endAngle),\n\t\t\t\twithinRadius = (pointRelativePosition.distance >= this.innerRadius && pointRelativePosition.distance <= this.outerRadius);\n\n\t\t\treturn (betweenAngles && withinRadius);\n\t\t\t//Ensure within the outside of the arc centre, but inside arc outer\n\t\t},\n\t\ttooltipPosition : function(){\n\t\t\tvar centreAngle = this.startAngle + ((this.endAngle - this.startAngle) / 2),\n\t\t\t\trangeFromCentre = (this.outerRadius - this.innerRadius) / 2 + this.innerRadius;\n\t\t\treturn {\n\t\t\t\tx : this.x + (Math.cos(centreAngle) * rangeFromCentre),\n\t\t\t\ty : this.y + (Math.sin(centreAngle) * rangeFromCentre)\n\t\t\t};\n\t\t},\n\t\tdraw : function(animationPercent){\n\n\t\t\tvar easingDecimal = animationPercent || 1;\n\n\t\t\tvar ctx = this.ctx;\n\n\t\t\tctx.beginPath();\n\n\t\t\tctx.arc(this.x, this.y, this.outerRadius, this.startAngle, this.endAngle);\n\n\t\t\tctx.arc(this.x, this.y, this.innerRadius, this.endAngle, this.startAngle, true);\n\n\t\t\tctx.closePath();\n\t\t\tctx.strokeStyle = this.strokeColor;\n\t\t\tctx.lineWidth = this.strokeWidth;\n\n\t\t\tctx.fillStyle = this.fillColor;\n\n\t\t\tctx.fill();\n\t\t\tctx.lineJoin = 'bevel';\n\n\t\t\tif (this.showStroke){\n\t\t\t\tctx.stroke();\n\t\t\t}\n\t\t}\n\t});\n\n\tChart.Rectangle = Chart.Element.extend({\n\t\tdraw : function(){\n\t\t\tvar ctx = this.ctx,\n\t\t\t\thalfWidth = this.width/2,\n\t\t\t\tleftX = this.x - halfWidth,\n\t\t\t\trightX = this.x + halfWidth,\n\t\t\t\ttop = this.base - (this.base - this.y),\n\t\t\t\thalfStroke = this.strokeWidth / 2;\n\n\t\t\t// Canvas doesn't allow us to stroke inside the width so we can\n\t\t\t// adjust the sizes to fit if we're setting a stroke on the line\n\t\t\tif (this.showStroke){\n\t\t\t\tleftX += halfStroke;\n\t\t\t\trightX -= halfStroke;\n\t\t\t\ttop += halfStroke;\n\t\t\t}\n\n\t\t\tctx.beginPath();\n\n\t\t\tctx.fillStyle = this.fillColor;\n\t\t\tctx.strokeStyle = this.strokeColor;\n\t\t\tctx.lineWidth = this.strokeWidth;\n\n\t\t\t// It'd be nice to keep this class totally generic to any rectangle\n\t\t\t// and simply specify which border to miss out.\n\t\t\tctx.moveTo(leftX, this.base);\n\t\t\tctx.lineTo(leftX, top);\n\t\t\tctx.lineTo(rightX, top);\n\t\t\tctx.lineTo(rightX, this.base);\n\t\t\tctx.fill();\n\t\t\tif (this.showStroke){\n\t\t\t\tctx.stroke();\n\t\t\t}\n\t\t},\n\t\theight : function(){\n\t\t\treturn this.base - this.y;\n\t\t},\n\t\tinRange : function(chartX,chartY){\n\t\t\treturn (chartX >= this.x - this.width/2 && chartX <= this.x + this.width/2) && (chartY >= this.y && chartY <= this.base);\n\t\t}\n\t});\n\n\tChart.Tooltip = Chart.Element.extend({\n\t\tdraw : function(){\n\n\t\t\tvar ctx = this.chart.ctx;\n\n\t\t\tctx.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);\n\n\t\t\tthis.xAlign = \"center\";\n\t\t\tthis.yAlign = \"above\";\n\n\t\t\t//Distance between the actual element.y position and the start of the tooltip caret\n\t\t\tvar caretPadding = this.caretPadding = 2;\n\n\t\t\tvar tooltipWidth = ctx.measureText(this.text).width + 2*this.xPadding,\n\t\t\t\ttooltipRectHeight = this.fontSize + 2*this.yPadding,\n\t\t\t\ttooltipHeight = tooltipRectHeight + this.caretHeight + caretPadding;\n\n\t\t\tif (this.x + tooltipWidth/2 >this.chart.width){\n\t\t\t\tthis.xAlign = \"left\";\n\t\t\t} else if (this.x - tooltipWidth/2 < 0){\n\t\t\t\tthis.xAlign = \"right\";\n\t\t\t}\n\n\t\t\tif (this.y - tooltipHeight < 0){\n\t\t\t\tthis.yAlign = \"below\";\n\t\t\t}\n\n\n\t\t\tvar tooltipX = this.x - tooltipWidth/2,\n\t\t\t\ttooltipY = this.y - tooltipHeight;\n\n\t\t\tctx.fillStyle = this.fillColor;\n\n\t\t\t// Custom Tooltips\n\t\t\tif(this.custom){\n\t\t\t\tthis.custom(this);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tswitch(this.yAlign)\n\t\t\t\t{\n\t\t\t\tcase \"above\":\n\t\t\t\t\t//Draw a caret above the x/y\n\t\t\t\t\tctx.beginPath();\n\t\t\t\t\tctx.moveTo(this.x,this.y - caretPadding);\n\t\t\t\t\tctx.lineTo(this.x + this.caretHeight, this.y - (caretPadding + this.caretHeight));\n\t\t\t\t\tctx.lineTo(this.x - this.caretHeight, this.y - (caretPadding + this.caretHeight));\n\t\t\t\t\tctx.closePath();\n\t\t\t\t\tctx.fill();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"below\":\n\t\t\t\t\ttooltipY = this.y + caretPadding + this.caretHeight;\n\t\t\t\t\t//Draw a caret below the x/y\n\t\t\t\t\tctx.beginPath();\n\t\t\t\t\tctx.moveTo(this.x, this.y + caretPadding);\n\t\t\t\t\tctx.lineTo(this.x + this.caretHeight, this.y + caretPadding + this.caretHeight);\n\t\t\t\t\tctx.lineTo(this.x - this.caretHeight, this.y + caretPadding + this.caretHeight);\n\t\t\t\t\tctx.closePath();\n\t\t\t\t\tctx.fill();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tswitch(this.xAlign)\n\t\t\t\t{\n\t\t\t\tcase \"left\":\n\t\t\t\t\ttooltipX = this.x - tooltipWidth + (this.cornerRadius + this.caretHeight);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\ttooltipX = this.x - (this.cornerRadius + this.caretHeight);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdrawRoundedRectangle(ctx,tooltipX,tooltipY,tooltipWidth,tooltipRectHeight,this.cornerRadius);\n\n\t\t\t\tctx.fill();\n\n\t\t\t\tctx.fillStyle = this.textColor;\n\t\t\t\tctx.textAlign = \"center\";\n\t\t\t\tctx.textBaseline = \"middle\";\n\t\t\t\tctx.fillText(this.text, tooltipX + tooltipWidth/2, tooltipY + tooltipRectHeight/2);\n\t\t\t}\n\t\t}\n\t});\n\n\tChart.MultiTooltip = Chart.Element.extend({\n\t\tinitialize : function(){\n\t\t\tthis.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);\n\n\t\t\tthis.titleFont = fontString(this.titleFontSize,this.titleFontStyle,this.titleFontFamily);\n\n\t\t\tthis.height = (this.labels.length * this.fontSize) + ((this.labels.length-1) * (this.fontSize/2)) + (this.yPadding*2) + this.titleFontSize *1.5;\n\n\t\t\tthis.ctx.font = this.titleFont;\n\n\t\t\tvar titleWidth = this.ctx.measureText(this.title).width,\n\t\t\t\t//Label has a legend square as well so account for this.\n\t\t\t\tlabelWidth = longestText(this.ctx,this.font,this.labels) + this.fontSize + 3,\n\t\t\t\tlongestTextWidth = max([labelWidth,titleWidth]);\n\n\t\t\tthis.width = longestTextWidth + (this.xPadding*2);\n\n\n\t\t\tvar halfHeight = this.height/2;\n\n\t\t\t//Check to ensure the height will fit on the canvas\n\t\t\tif (this.y - halfHeight < 0 ){\n\t\t\t\tthis.y = halfHeight;\n\t\t\t} else if (this.y + halfHeight > this.chart.height){\n\t\t\t\tthis.y = this.chart.height - halfHeight;\n\t\t\t}\n\n\t\t\t//Decide whether to align left or right based on position on canvas\n\t\t\tif (this.x > this.chart.width/2){\n\t\t\t\tthis.x -= this.xOffset + this.width;\n\t\t\t} else {\n\t\t\t\tthis.x += this.xOffset;\n\t\t\t}\n\n\n\t\t},\n\t\tgetLineHeight : function(index){\n\t\t\tvar baseLineHeight = this.y - (this.height/2) + this.yPadding,\n\t\t\t\tafterTitleIndex = index-1;\n\n\t\t\t//If the index is zero, we're getting the title\n\t\t\tif (index === 0){\n\t\t\t\treturn baseLineHeight + this.titleFontSize/2;\n\t\t\t} else{\n\t\t\t\treturn baseLineHeight + ((this.fontSize*1.5*afterTitleIndex) + this.fontSize/2) + this.titleFontSize * 1.5;\n\t\t\t}\n\n\t\t},\n\t\tdraw : function(){\n\t\t\t// Custom Tooltips\n\t\t\tif(this.custom){\n\t\t\t\tthis.custom(this);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tdrawRoundedRectangle(this.ctx,this.x,this.y - this.height/2,this.width,this.height,this.cornerRadius);\n\t\t\t\tvar ctx = this.ctx;\n\t\t\t\tctx.fillStyle = this.fillColor;\n\t\t\t\tctx.fill();\n\t\t\t\tctx.closePath();\n\n\t\t\t\tctx.textAlign = \"left\";\n\t\t\t\tctx.textBaseline = \"middle\";\n\t\t\t\tctx.fillStyle = this.titleTextColor;\n\t\t\t\tctx.font = this.titleFont;\n\n\t\t\t\tctx.fillText(this.title,this.x + this.xPadding, this.getLineHeight(0));\n\n\t\t\t\tctx.font = this.font;\n\t\t\t\thelpers.each(this.labels,function(label,index){\n\t\t\t\t\tctx.fillStyle = this.textColor;\n\t\t\t\t\tctx.fillText(label,this.x + this.xPadding + this.fontSize + 3, this.getLineHeight(index + 1));\n\n\t\t\t\t\t//A bit gnarly, but clearing this rectangle breaks when using explorercanvas (clears whole canvas)\n\t\t\t\t\t//ctx.clearRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);\n\t\t\t\t\t//Instead we'll make a white filled block to put the legendColour palette over.\n\n\t\t\t\t\tctx.fillStyle = this.legendColorBackground;\n\t\t\t\t\tctx.fillRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);\n\n\t\t\t\t\tctx.fillStyle = this.legendColors[index].fill;\n\t\t\t\t\tctx.fillRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);\n\n\n\t\t\t\t},this);\n\t\t\t}\n\t\t}\n\t});\n\n\tChart.Scale = Chart.Element.extend({\n\t\tinitialize : function(){\n\t\t\tthis.fit();\n\t\t},\n\t\tbuildYLabels : function(){\n\t\t\tthis.yLabels = [];\n\n\t\t\tvar stepDecimalPlaces = getDecimalPlaces(this.stepValue);\n\n\t\t\tfor (var i=0; i<=this.steps; i++){\n\t\t\t\tthis.yLabels.push(template(this.templateString,{value:(this.min + (i * this.stepValue)).toFixed(stepDecimalPlaces)}));\n\t\t\t}\n\t\t\tthis.yLabelWidth = (this.display && this.showLabels) ? longestText(this.ctx,this.font,this.yLabels) : 0;\n\t\t},\n\t\taddXLabel : function(label){\n\t\t\tthis.xLabels.push(label);\n\t\t\tthis.valuesCount++;\n\t\t\tthis.fit();\n\t\t},\n\t\tremoveXLabel : function(){\n\t\t\tthis.xLabels.shift();\n\t\t\tthis.valuesCount--;\n\t\t\tthis.fit();\n\t\t},\n\t\t// Fitting loop to rotate x Labels and figure out what fits there, and also calculate how many Y steps to use\n\t\tfit: function(){\n\t\t\t// First we need the width of the yLabels, assuming the xLabels aren't rotated\n\n\t\t\t// To do that we need the base line at the top and base of the chart, assuming there is no x label rotation\n\t\t\tthis.startPoint = (this.display) ? this.fontSize : 0;\n\t\t\tthis.endPoint = (this.display) ? this.height - (this.fontSize * 1.5) - 5 : this.height; // -5 to pad labels\n\n\t\t\t// Apply padding settings to the start and end point.\n\t\t\tthis.startPoint += this.padding;\n\t\t\tthis.endPoint -= this.padding;\n\n\t\t\t// Cache the starting height, so can determine if we need to recalculate the scale yAxis\n\t\t\tvar cachedHeight = this.endPoint - this.startPoint,\n\t\t\t\tcachedYLabelWidth;\n\n\t\t\t// Build the current yLabels so we have an idea of what size they'll be to start\n\t\t\t/*\n\t\t\t *\tThis sets what is returned from calculateScaleRange as static properties of this class:\n\t\t\t *\n\t\t\t\tthis.steps;\n\t\t\t\tthis.stepValue;\n\t\t\t\tthis.min;\n\t\t\t\tthis.max;\n\t\t\t *\n\t\t\t */\n\t\t\tthis.calculateYRange(cachedHeight);\n\n\t\t\t// With these properties set we can now build the array of yLabels\n\t\t\t// and also the width of the largest yLabel\n\t\t\tthis.buildYLabels();\n\n\t\t\tthis.calculateXLabelRotation();\n\n\t\t\twhile((cachedHeight > this.endPoint - this.startPoint)){\n\t\t\t\tcachedHeight = this.endPoint - this.startPoint;\n\t\t\t\tcachedYLabelWidth = this.yLabelWidth;\n\n\t\t\t\tthis.calculateYRange(cachedHeight);\n\t\t\t\tthis.buildYLabels();\n\n\t\t\t\t// Only go through the xLabel loop again if the yLabel width has changed\n\t\t\t\tif (cachedYLabelWidth < this.yLabelWidth){\n\t\t\t\t\tthis.calculateXLabelRotation();\n\t\t\t\t}\n\t\t\t}\n\n\t\t},\n\t\tcalculateXLabelRotation : function(){\n\t\t\t//Get the width of each grid by calculating the difference\n\t\t\t//between x offsets between 0 and 1.\n\n\t\t\tthis.ctx.font = this.font;\n\n\t\t\tvar firstWidth = this.ctx.measureText(this.xLabels[0]).width,\n\t\t\t\tlastWidth = this.ctx.measureText(this.xLabels[this.xLabels.length - 1]).width,\n\t\t\t\tfirstRotated,\n\t\t\t\tlastRotated;\n\n\n\t\t\tthis.xScalePaddingRight = lastWidth/2 + 3;\n\t\t\tthis.xScalePaddingLeft = (firstWidth/2 > this.yLabelWidth + 10) ? firstWidth/2 : this.yLabelWidth + 10;\n\n\t\t\tthis.xLabelRotation = 0;\n\t\t\tif (this.display){\n\t\t\t\tvar originalLabelWidth = longestText(this.ctx,this.font,this.xLabels),\n\t\t\t\t\tcosRotation,\n\t\t\t\t\tfirstRotatedWidth;\n\t\t\t\tthis.xLabelWidth = originalLabelWidth;\n\t\t\t\t//Allow 3 pixels x2 padding either side for label readability\n\t\t\t\tvar xGridWidth = Math.floor(this.calculateX(1) - this.calculateX(0)) - 6;\n\n\t\t\t\t//Max label rotate should be 90 - also act as a loop counter\n\t\t\t\twhile ((this.xLabelWidth > xGridWidth && this.xLabelRotation === 0) || (this.xLabelWidth > xGridWidth && this.xLabelRotation <= 90 && this.xLabelRotation > 0)){\n\t\t\t\t\tcosRotation = Math.cos(toRadians(this.xLabelRotation));\n\n\t\t\t\t\tfirstRotated = cosRotation * firstWidth;\n\t\t\t\t\tlastRotated = cosRotation * lastWidth;\n\n\t\t\t\t\t// We're right aligning the text now.\n\t\t\t\t\tif (firstRotated + this.fontSize / 2 > this.yLabelWidth + 8){\n\t\t\t\t\t\tthis.xScalePaddingLeft = firstRotated + this.fontSize / 2;\n\t\t\t\t\t}\n\t\t\t\t\tthis.xScalePaddingRight = this.fontSize/2;\n\n\n\t\t\t\t\tthis.xLabelRotation++;\n\t\t\t\t\tthis.xLabelWidth = cosRotation * originalLabelWidth;\n\n\t\t\t\t}\n\t\t\t\tif (this.xLabelRotation > 0){\n\t\t\t\t\tthis.endPoint -= Math.sin(toRadians(this.xLabelRotation))*originalLabelWidth + 3;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthis.xLabelWidth = 0;\n\t\t\t\tthis.xScalePaddingRight = this.padding;\n\t\t\t\tthis.xScalePaddingLeft = this.padding;\n\t\t\t}\n\n\t\t},\n\t\t// Needs to be overidden in each Chart type\n\t\t// Otherwise we need to pass all the data into the scale class\n\t\tcalculateYRange: noop,\n\t\tdrawingArea: function(){\n\t\t\treturn this.startPoint - this.endPoint;\n\t\t},\n\t\tcalculateY : function(value){\n\t\t\tvar scalingFactor = this.drawingArea() / (this.min - this.max);\n\t\t\treturn this.endPoint - (scalingFactor * (value - this.min));\n\t\t},\n\t\tcalculateX : function(index){\n\t\t\tvar isRotated = (this.xLabelRotation > 0),\n\t\t\t\t// innerWidth = (this.offsetGridLines) ? this.width - offsetLeft - this.padding : this.width - (offsetLeft + halfLabelWidth * 2) - this.padding,\n\t\t\t\tinnerWidth = this.width - (this.xScalePaddingLeft + this.xScalePaddingRight),\n\t\t\t\tvalueWidth = innerWidth/Math.max((this.valuesCount - ((this.offsetGridLines) ? 0 : 1)), 1),\n\t\t\t\tvalueOffset = (valueWidth * index) + this.xScalePaddingLeft;\n\n\t\t\tif (this.offsetGridLines){\n\t\t\t\tvalueOffset += (valueWidth/2);\n\t\t\t}\n\n\t\t\treturn Math.round(valueOffset);\n\t\t},\n\t\tupdate : function(newProps){\n\t\t\thelpers.extend(this, newProps);\n\t\t\tthis.fit();\n\t\t},\n\t\tdraw : function(){\n\t\t\tvar ctx = this.ctx,\n\t\t\t\tyLabelGap = (this.endPoint - this.startPoint) / this.steps,\n\t\t\t\txStart = Math.round(this.xScalePaddingLeft);\n\t\t\tif (this.display){\n\t\t\t\tctx.fillStyle = this.textColor;\n\t\t\t\tctx.font = this.font;\n\t\t\t\teach(this.yLabels,function(labelString,index){\n\t\t\t\t\tvar yLabelCenter = this.endPoint - (yLabelGap * index),\n\t\t\t\t\t\tlinePositionY = Math.round(yLabelCenter),\n\t\t\t\t\t\tdrawHorizontalLine = this.showHorizontalLines;\n\n\t\t\t\t\tctx.textAlign = \"right\";\n\t\t\t\t\tctx.textBaseline = \"middle\";\n\t\t\t\t\tif (this.showLabels){\n\t\t\t\t\t\tctx.fillText(labelString,xStart - 10,yLabelCenter);\n\t\t\t\t\t}\n\n\t\t\t\t\t// This is X axis, so draw it\n\t\t\t\t\tif (index === 0 && !drawHorizontalLine){\n\t\t\t\t\t\tdrawHorizontalLine = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (drawHorizontalLine){\n\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index > 0){\n\t\t\t\t\t\t// This is a grid line in the centre, so drop that\n\t\t\t\t\t\tctx.lineWidth = this.gridLineWidth;\n\t\t\t\t\t\tctx.strokeStyle = this.gridLineColor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// This is the first line on the scale\n\t\t\t\t\t\tctx.lineWidth = this.lineWidth;\n\t\t\t\t\t\tctx.strokeStyle = this.lineColor;\n\t\t\t\t\t}\n\n\t\t\t\t\tlinePositionY += helpers.aliasPixel(ctx.lineWidth);\n\n\t\t\t\t\tif(drawHorizontalLine){\n\t\t\t\t\t\tctx.moveTo(xStart, linePositionY);\n\t\t\t\t\t\tctx.lineTo(this.width, linePositionY);\n\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t\tctx.closePath();\n\t\t\t\t\t}\n\n\t\t\t\t\tctx.lineWidth = this.lineWidth;\n\t\t\t\t\tctx.strokeStyle = this.lineColor;\n\t\t\t\t\tctx.beginPath();\n\t\t\t\t\tctx.moveTo(xStart - 5, linePositionY);\n\t\t\t\t\tctx.lineTo(xStart, linePositionY);\n\t\t\t\t\tctx.stroke();\n\t\t\t\t\tctx.closePath();\n\n\t\t\t\t},this);\n\n\t\t\t\teach(this.xLabels,function(label,index){\n\t\t\t\t\tvar xPos = this.calculateX(index) + aliasPixel(this.lineWidth),\n\t\t\t\t\t\t// Check to see if line/bar here and decide where to place the line\n\t\t\t\t\t\tlinePos = this.calculateX(index - (this.offsetGridLines ? 0.5 : 0)) + aliasPixel(this.lineWidth),\n\t\t\t\t\t\tisRotated = (this.xLabelRotation > 0),\n\t\t\t\t\t\tdrawVerticalLine = this.showVerticalLines;\n\n\t\t\t\t\t// This is Y axis, so draw it\n\t\t\t\t\tif (index === 0 && !drawVerticalLine){\n\t\t\t\t\t\tdrawVerticalLine = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (drawVerticalLine){\n\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index > 0){\n\t\t\t\t\t\t// This is a grid line in the centre, so drop that\n\t\t\t\t\t\tctx.lineWidth = this.gridLineWidth;\n\t\t\t\t\t\tctx.strokeStyle = this.gridLineColor;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// This is the first line on the scale\n\t\t\t\t\t\tctx.lineWidth = this.lineWidth;\n\t\t\t\t\t\tctx.strokeStyle = this.lineColor;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (drawVerticalLine){\n\t\t\t\t\t\tctx.moveTo(linePos,this.endPoint);\n\t\t\t\t\t\tctx.lineTo(linePos,this.startPoint - 3);\n\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t\tctx.closePath();\n\t\t\t\t\t}\n\n\n\t\t\t\t\tctx.lineWidth = this.lineWidth;\n\t\t\t\t\tctx.strokeStyle = this.lineColor;\n\n\n\t\t\t\t\t// Small lines at the bottom of the base grid line\n\t\t\t\t\tctx.beginPath();\n\t\t\t\t\tctx.moveTo(linePos,this.endPoint);\n\t\t\t\t\tctx.lineTo(linePos,this.endPoint + 5);\n\t\t\t\t\tctx.stroke();\n\t\t\t\t\tctx.closePath();\n\n\t\t\t\t\tctx.save();\n\t\t\t\t\tctx.translate(xPos,(isRotated) ? this.endPoint + 12 : this.endPoint + 8);\n\t\t\t\t\tctx.rotate(toRadians(this.xLabelRotation)*-1);\n\t\t\t\t\tctx.font = this.font;\n\t\t\t\t\tctx.textAlign = (isRotated) ? \"right\" : \"center\";\n\t\t\t\t\tctx.textBaseline = (isRotated) ? \"middle\" : \"top\";\n\t\t\t\t\tctx.fillText(label, 0, 0);\n\t\t\t\t\tctx.restore();\n\t\t\t\t},this);\n\n\t\t\t}\n\t\t}\n\n\t});\n\n\tChart.RadialScale = Chart.Element.extend({\n\t\tinitialize: function(){\n\t\t\tthis.size = min([this.height, this.width]);\n\t\t\tthis.drawingArea = (this.display) ? (this.size/2) - (this.fontSize/2 + this.backdropPaddingY) : (this.size/2);\n\t\t},\n\t\tcalculateCenterOffset: function(value){\n\t\t\t// Take into account half font size + the yPadding of the top value\n\t\t\tvar scalingFactor = this.drawingArea / (this.max - this.min);\n\n\t\t\treturn (value - this.min) * scalingFactor;\n\t\t},\n\t\tupdate : function(){\n\t\t\tif (!this.lineArc){\n\t\t\t\tthis.setScaleSize();\n\t\t\t} else {\n\t\t\t\tthis.drawingArea = (this.display) ? (this.size/2) - (this.fontSize/2 + this.backdropPaddingY) : (this.size/2);\n\t\t\t}\n\t\t\tthis.buildYLabels();\n\t\t},\n\t\tbuildYLabels: function(){\n\t\t\tthis.yLabels = [];\n\n\t\t\tvar stepDecimalPlaces = getDecimalPlaces(this.stepValue);\n\n\t\t\tfor (var i=0; i<=this.steps; i++){\n\t\t\t\tthis.yLabels.push(template(this.templateString,{value:(this.min + (i * this.stepValue)).toFixed(stepDecimalPlaces)}));\n\t\t\t}\n\t\t},\n\t\tgetCircumference : function(){\n\t\t\treturn ((Math.PI*2) / this.valuesCount);\n\t\t},\n\t\tsetScaleSize: function(){\n\t\t\t/*\n\t\t\t * Right, this is really confusing and there is a lot of maths going on here\n\t\t\t * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9\n\t\t\t *\n\t\t\t * Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif\n\t\t\t *\n\t\t\t * Solution:\n\t\t\t *\n\t\t\t * We assume the radius of the polygon is half the size of the canvas at first\n\t\t\t * at each index we check if the text overlaps.\n\t\t\t *\n\t\t\t * Where it does, we store that angle and that index.\n\t\t\t *\n\t\t\t * After finding the largest index and angle we calculate how much we need to remove\n\t\t\t * from the shape radius to move the point inwards by that x.\n\t\t\t *\n\t\t\t * We average the left and right distances to get the maximum shape radius that can fit in the box\n\t\t\t * along with labels.\n\t\t\t *\n\t\t\t * Once we have that, we can find the centre point for the chart, by taking the x text protrusion\n\t\t\t * on each side, removing that from the size, halving it and adding the left x protrusion width.\n\t\t\t *\n\t\t\t * This will mean we have a shape fitted to the canvas, as large as it can be with the labels\n\t\t\t * and position it in the most space efficient manner\n\t\t\t *\n\t\t\t * https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif\n\t\t\t */\n\n\n\t\t\t// Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.\n\t\t\t// Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points\n\t\t\tvar largestPossibleRadius = min([(this.height/2 - this.pointLabelFontSize - 5), this.width/2]),\n\t\t\t\tpointPosition,\n\t\t\t\ti,\n\t\t\t\ttextWidth,\n\t\t\t\thalfTextWidth,\n\t\t\t\tfurthestRight = this.width,\n\t\t\t\tfurthestRightIndex,\n\t\t\t\tfurthestRightAngle,\n\t\t\t\tfurthestLeft = 0,\n\t\t\t\tfurthestLeftIndex,\n\t\t\t\tfurthestLeftAngle,\n\t\t\t\txProtrusionLeft,\n\t\t\t\txProtrusionRight,\n\t\t\t\tradiusReductionRight,\n\t\t\t\tradiusReductionLeft,\n\t\t\t\tmaxWidthRadius;\n\t\t\tthis.ctx.font = fontString(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily);\n\t\t\tfor (i=0;i<this.valuesCount;i++){\n\t\t\t\t// 5px to space the text slightly out - similar to what we do in the draw function.\n\t\t\t\tpointPosition = this.getPointPosition(i, largestPossibleRadius);\n\t\t\t\ttextWidth = this.ctx.measureText(template(this.templateString, { value: this.labels[i] })).width + 5;\n\t\t\t\tif (i === 0 || i === this.valuesCount/2){\n\t\t\t\t\t// If we're at index zero, or exactly the middle, we're at exactly the top/bottom\n\t\t\t\t\t// of the radar chart, so text will be aligned centrally, so we'll half it and compare\n\t\t\t\t\t// w/left and right text sizes\n\t\t\t\t\thalfTextWidth = textWidth/2;\n\t\t\t\t\tif (pointPosition.x + halfTextWidth > furthestRight) {\n\t\t\t\t\t\tfurthestRight = pointPosition.x + halfTextWidth;\n\t\t\t\t\t\tfurthestRightIndex = i;\n\t\t\t\t\t}\n\t\t\t\t\tif (pointPosition.x - halfTextWidth < furthestLeft) {\n\t\t\t\t\t\tfurthestLeft = pointPosition.x - halfTextWidth;\n\t\t\t\t\t\tfurthestLeftIndex = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (i < this.valuesCount/2) {\n\t\t\t\t\t// Less than half the values means we'll left align the text\n\t\t\t\t\tif (pointPosition.x + textWidth > furthestRight) {\n\t\t\t\t\t\tfurthestRight = pointPosition.x + textWidth;\n\t\t\t\t\t\tfurthestRightIndex = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (i > this.valuesCount/2){\n\t\t\t\t\t// More than half the values means we'll right align the text\n\t\t\t\t\tif (pointPosition.x - textWidth < furthestLeft) {\n\t\t\t\t\t\tfurthestLeft = pointPosition.x - textWidth;\n\t\t\t\t\t\tfurthestLeftIndex = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txProtrusionLeft = furthestLeft;\n\n\t\t\txProtrusionRight = Math.ceil(furthestRight - this.width);\n\n\t\t\tfurthestRightAngle = this.getIndexAngle(furthestRightIndex);\n\n\t\t\tfurthestLeftAngle = this.getIndexAngle(furthestLeftIndex);\n\n\t\t\tradiusReductionRight = xProtrusionRight / Math.sin(furthestRightAngle + Math.PI/2);\n\n\t\t\tradiusReductionLeft = xProtrusionLeft / Math.sin(furthestLeftAngle + Math.PI/2);\n\n\t\t\t// Ensure we actually need to reduce the size of the chart\n\t\t\tradiusReductionRight = (isNumber(radiusReductionRight)) ? radiusReductionRight : 0;\n\t\t\tradiusReductionLeft = (isNumber(radiusReductionLeft)) ? radiusReductionLeft : 0;\n\n\t\t\tthis.drawingArea = largestPossibleRadius - (radiusReductionLeft + radiusReductionRight)/2;\n\n\t\t\t//this.drawingArea = min([maxWidthRadius, (this.height - (2 * (this.pointLabelFontSize + 5)))/2])\n\t\t\tthis.setCenterPoint(radiusReductionLeft, radiusReductionRight);\n\n\t\t},\n\t\tsetCenterPoint: function(leftMovement, rightMovement){\n\n\t\t\tvar maxRight = this.width - rightMovement - this.drawingArea,\n\t\t\t\tmaxLeft = leftMovement + this.drawingArea;\n\n\t\t\tthis.xCenter = (maxLeft + maxRight)/2;\n\t\t\t// Always vertically in the centre as the text height doesn't change\n\t\t\tthis.yCenter = (this.height/2);\n\t\t},\n\n\t\tgetIndexAngle : function(index){\n\t\t\tvar angleMultiplier = (Math.PI * 2) / this.valuesCount;\n\t\t\t// Start from the top instead of right, so remove a quarter of the circle\n\n\t\t\treturn index * angleMultiplier - (Math.PI/2);\n\t\t},\n\t\tgetPointPosition : function(index, distanceFromCenter){\n\t\t\tvar thisAngle = this.getIndexAngle(index);\n\t\t\treturn {\n\t\t\t\tx : (Math.cos(thisAngle) * distanceFromCenter) + this.xCenter,\n\t\t\t\ty : (Math.sin(thisAngle) * distanceFromCenter) + this.yCenter\n\t\t\t};\n\t\t},\n\t\tdraw: function(){\n\t\t\tif (this.display){\n\t\t\t\tvar ctx = this.ctx;\n\t\t\t\teach(this.yLabels, function(label, index){\n\t\t\t\t\t// Don't draw a centre value\n\t\t\t\t\tif (index > 0){\n\t\t\t\t\t\tvar yCenterOffset = index * (this.drawingArea/this.steps),\n\t\t\t\t\t\t\tyHeight = this.yCenter - yCenterOffset,\n\t\t\t\t\t\t\tpointPosition;\n\n\t\t\t\t\t\t// Draw circular lines around the scale\n\t\t\t\t\t\tif (this.lineWidth > 0){\n\t\t\t\t\t\t\tctx.strokeStyle = this.lineColor;\n\t\t\t\t\t\t\tctx.lineWidth = this.lineWidth;\n\n\t\t\t\t\t\t\tif(this.lineArc){\n\t\t\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t\t\t\tctx.arc(this.xCenter, this.yCenter, yCenterOffset, 0, Math.PI*2);\n\t\t\t\t\t\t\t\tctx.closePath();\n\t\t\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t\t\t} else{\n\t\t\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t\t\t\tfor (var i=0;i<this.valuesCount;i++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpointPosition = this.getPointPosition(i, this.calculateCenterOffset(this.min + (index * this.stepValue)));\n\t\t\t\t\t\t\t\t\tif (i === 0){\n\t\t\t\t\t\t\t\t\t\tctx.moveTo(pointPosition.x, pointPosition.y);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tctx.lineTo(pointPosition.x, pointPosition.y);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tctx.closePath();\n\t\t\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.showLabels){\n\t\t\t\t\t\t\tctx.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);\n\t\t\t\t\t\t\tif (this.showLabelBackdrop){\n\t\t\t\t\t\t\t\tvar labelWidth = ctx.measureText(label).width;\n\t\t\t\t\t\t\t\tctx.fillStyle = this.backdropColor;\n\t\t\t\t\t\t\t\tctx.fillRect(\n\t\t\t\t\t\t\t\t\tthis.xCenter - labelWidth/2 - this.backdropPaddingX,\n\t\t\t\t\t\t\t\t\tyHeight - this.fontSize/2 - this.backdropPaddingY,\n\t\t\t\t\t\t\t\t\tlabelWidth + this.backdropPaddingX*2,\n\t\t\t\t\t\t\t\t\tthis.fontSize + this.backdropPaddingY*2\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tctx.textAlign = 'center';\n\t\t\t\t\t\t\tctx.textBaseline = \"middle\";\n\t\t\t\t\t\t\tctx.fillStyle = this.fontColor;\n\t\t\t\t\t\t\tctx.fillText(label, this.xCenter, yHeight);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, this);\n\n\t\t\t\tif (!this.lineArc){\n\t\t\t\t\tctx.lineWidth = this.angleLineWidth;\n\t\t\t\t\tctx.strokeStyle = this.angleLineColor;\n\t\t\t\t\tfor (var i = this.valuesCount - 1; i >= 0; i--) {\n\t\t\t\t\t\tif (this.angleLineWidth > 0){\n\t\t\t\t\t\t\tvar outerPosition = this.getPointPosition(i, this.calculateCenterOffset(this.max));\n\t\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t\t\tctx.moveTo(this.xCenter, this.yCenter);\n\t\t\t\t\t\t\tctx.lineTo(outerPosition.x, outerPosition.y);\n\t\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t\t\tctx.closePath();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Extra 3px out for some label spacing\n\t\t\t\t\t\tvar pointLabelPosition = this.getPointPosition(i, this.calculateCenterOffset(this.max) + 5);\n\t\t\t\t\t\tctx.font = fontString(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily);\n\t\t\t\t\t\tctx.fillStyle = this.pointLabelFontColor;\n\n\t\t\t\t\t\tvar labelsCount = this.labels.length,\n\t\t\t\t\t\t\thalfLabelsCount = this.labels.length/2,\n\t\t\t\t\t\t\tquarterLabelsCount = halfLabelsCount/2,\n\t\t\t\t\t\t\tupperHalf = (i < quarterLabelsCount || i > labelsCount - quarterLabelsCount),\n\t\t\t\t\t\t\texactQuarter = (i === quarterLabelsCount || i === labelsCount - quarterLabelsCount);\n\t\t\t\t\t\tif (i === 0){\n\t\t\t\t\t\t\tctx.textAlign = 'center';\n\t\t\t\t\t\t} else if(i === halfLabelsCount){\n\t\t\t\t\t\t\tctx.textAlign = 'center';\n\t\t\t\t\t\t} else if (i < halfLabelsCount){\n\t\t\t\t\t\t\tctx.textAlign = 'left';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tctx.textAlign = 'right';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Set the correct text baseline based on outer positioning\n\t\t\t\t\t\tif (exactQuarter){\n\t\t\t\t\t\t\tctx.textBaseline = 'middle';\n\t\t\t\t\t\t} else if (upperHalf){\n\t\t\t\t\t\t\tctx.textBaseline = 'bottom';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tctx.textBaseline = 'top';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tctx.fillText(this.labels[i], pointLabelPosition.x, pointLabelPosition.y);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t// Attach global event to resize each chart instance when the browser resizes\n\thelpers.addEvent(window, \"resize\", (function(){\n\t\t// Basic debounce of resize function so it doesn't hurt performance when resizing browser.\n\t\tvar timeout;\n\t\treturn function(){\n\t\t\tclearTimeout(timeout);\n\t\t\ttimeout = setTimeout(function(){\n\t\t\t\teach(Chart.instances,function(instance){\n\t\t\t\t\t// If the responsive flag is set in the chart instance config\n\t\t\t\t\t// Cascade the resize event down to the chart.\n\t\t\t\t\tif (instance.options.responsive){\n\t\t\t\t\t\tinstance.resize(instance.render, true);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}, 50);\n\t\t};\n\t})());\n\n\n\tif (amd) {\n\t\tdefine(function(){\n\t\t\treturn Chart;\n\t\t});\n\t} else if (typeof module === 'object' && module.exports) {\n\t\tmodule.exports = Chart;\n\t}\n\n\troot.Chart = Chart;\n\n\tChart.noConflict = function(){\n\t\troot.Chart = previous;\n\t\treturn Chart;\n\t};\n\n}).call(this);\n\n(function(){\n\t\"use strict\";\n\n\tvar root = this,\n\t\tChart = root.Chart,\n\t\thelpers = Chart.helpers;\n\n\n\tvar defaultConfig = {\n\t\t//Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value\n\t\tscaleBeginAtZero : true,\n\n\t\t//Boolean - Whether grid lines are shown across the chart\n\t\tscaleShowGridLines : true,\n\n\t\t//String - Colour of the grid lines\n\t\tscaleGridLineColor : \"rgba(0,0,0,.05)\",\n\n\t\t//Number - Width of the grid lines\n\t\tscaleGridLineWidth : 1,\n\n\t\t//Boolean - Whether to show horizontal lines (except X axis)\n\t\tscaleShowHorizontalLines: true,\n\n\t\t//Boolean - Whether to show vertical lines (except Y axis)\n\t\tscaleShowVerticalLines: true,\n\n\t\t//Boolean - If there is a stroke on each bar\n\t\tbarShowStroke : true,\n\n\t\t//Number - Pixel width of the bar stroke\n\t\tbarStrokeWidth : 2,\n\n\t\t//Number - Spacing between each of the X value sets\n\t\tbarValueSpacing : 5,\n\n\t\t//Number - Spacing between data sets within X values\n\t\tbarDatasetSpacing : 1,\n\n\t\t//String - A legend template\n\t\tlegendTemplate : \"<ul class=\\\"<%=name.toLowerCase()%>-legend\\\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\\\"background-color:<%=datasets[i].fillColor%>\\\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>\"\n\n\t};\n\n\n\tChart.Type.extend({\n\t\tname: \"Bar\",\n\t\tdefaults : defaultConfig,\n\t\tinitialize: function(data){\n\n\t\t\t//Expose options as a scope variable here so we can access it in the ScaleClass\n\t\t\tvar options = this.options;\n\n\t\t\tthis.ScaleClass = Chart.Scale.extend({\n\t\t\t\toffsetGridLines : true,\n\t\t\t\tcalculateBarX : function(datasetCount, datasetIndex, barIndex){\n\t\t\t\t\t//Reusable method for calculating the xPosition of a given bar based on datasetIndex & width of the bar\n\t\t\t\t\tvar xWidth = this.calculateBaseWidth(),\n\t\t\t\t\t\txAbsolute = this.calculateX(barIndex) - (xWidth/2),\n\t\t\t\t\t\tbarWidth = this.calculateBarWidth(datasetCount);\n\n\t\t\t\t\treturn xAbsolute + (barWidth * datasetIndex) + (datasetIndex * options.barDatasetSpacing) + barWidth/2;\n\t\t\t\t},\n\t\t\t\tcalculateBaseWidth : function(){\n\t\t\t\t\treturn (this.calculateX(1) - this.calculateX(0)) - (2*options.barValueSpacing);\n\t\t\t\t},\n\t\t\t\tcalculateBarWidth : function(datasetCount){\n\t\t\t\t\t//The padding between datasets is to the right of each bar, providing that there are more than 1 dataset\n\t\t\t\t\tvar baseWidth = this.calculateBaseWidth() - ((datasetCount - 1) * options.barDatasetSpacing);\n\n\t\t\t\t\treturn (baseWidth / datasetCount);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.datasets = [];\n\n\t\t\t//Set up tooltip events on the chart\n\t\t\tif (this.options.showTooltips){\n\t\t\t\thelpers.bindEvents(this, this.options.tooltipEvents, function(evt){\n\t\t\t\t\tvar activeBars = (evt.type !== 'mouseout') ? this.getBarsAtEvent(evt) : [];\n\n\t\t\t\t\tthis.eachBars(function(bar){\n\t\t\t\t\t\tbar.restore(['fillColor', 'strokeColor']);\n\t\t\t\t\t});\n\t\t\t\t\thelpers.each(activeBars, function(activeBar){\n\t\t\t\t\t\tactiveBar.fillColor = activeBar.highlightFill;\n\t\t\t\t\t\tactiveBar.strokeColor = activeBar.highlightStroke;\n\t\t\t\t\t});\n\t\t\t\t\tthis.showTooltip(activeBars);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t//Declare the extension of the default point, to cater for the options passed in to the constructor\n\t\t\tthis.BarClass = Chart.Rectangle.extend({\n\t\t\t\tstrokeWidth : this.options.barStrokeWidth,\n\t\t\t\tshowStroke : this.options.barShowStroke,\n\t\t\t\tctx : this.chart.ctx\n\t\t\t});\n\n\t\t\t//Iterate through each of the datasets, and build this into a property of the chart\n\t\t\thelpers.each(data.datasets,function(dataset,datasetIndex){\n\n\t\t\t\tvar datasetObject = {\n\t\t\t\t\tlabel : dataset.label || null,\n\t\t\t\t\tfillColor : dataset.fillColor,\n\t\t\t\t\tstrokeColor : dataset.strokeColor,\n\t\t\t\t\tbars : []\n\t\t\t\t};\n\n\t\t\t\tthis.datasets.push(datasetObject);\n\n\t\t\t\thelpers.each(dataset.data,function(dataPoint,index){\n\t\t\t\t\t//Add a new point for each piece of data, passing any required data to draw.\n\t\t\t\t\tdatasetObject.bars.push(new this.BarClass({\n\t\t\t\t\t\tvalue : dataPoint,\n\t\t\t\t\t\tlabel : data.labels[index],\n\t\t\t\t\t\tdatasetLabel: dataset.label,\n\t\t\t\t\t\tstrokeColor : dataset.strokeColor,\n\t\t\t\t\t\tfillColor : dataset.fillColor,\n\t\t\t\t\t\thighlightFill : dataset.highlightFill || dataset.fillColor,\n\t\t\t\t\t\thighlightStroke : dataset.highlightStroke || dataset.strokeColor\n\t\t\t\t\t}));\n\t\t\t\t},this);\n\n\t\t\t},this);\n\n\t\t\tthis.buildScale(data.labels);\n\n\t\t\tthis.BarClass.prototype.base = this.scale.endPoint;\n\n\t\t\tthis.eachBars(function(bar, index, datasetIndex){\n\t\t\t\thelpers.extend(bar, {\n\t\t\t\t\twidth : this.scale.calculateBarWidth(this.datasets.length),\n\t\t\t\t\tx: this.scale.calculateBarX(this.datasets.length, datasetIndex, index),\n\t\t\t\t\ty: this.scale.endPoint\n\t\t\t\t});\n\t\t\t\tbar.save();\n\t\t\t}, this);\n\n\t\t\tthis.render();\n\t\t},\n\t\tupdate : function(){\n\t\t\tthis.scale.update();\n\t\t\t// Reset any highlight colours before updating.\n\t\t\thelpers.each(this.activeElements, function(activeElement){\n\t\t\t\tactiveElement.restore(['fillColor', 'strokeColor']);\n\t\t\t});\n\n\t\t\tthis.eachBars(function(bar){\n\t\t\t\tbar.save();\n\t\t\t});\n\t\t\tthis.render();\n\t\t},\n\t\teachBars : function(callback){\n\t\t\thelpers.each(this.datasets,function(dataset, datasetIndex){\n\t\t\t\thelpers.each(dataset.bars, callback, this, datasetIndex);\n\t\t\t},this);\n\t\t},\n\t\tgetBarsAtEvent : function(e){\n\t\t\tvar barsArray = [],\n\t\t\t\teventPosition = helpers.getRelativePosition(e),\n\t\t\t\tdatasetIterator = function(dataset){\n\t\t\t\t\tbarsArray.push(dataset.bars[barIndex]);\n\t\t\t\t},\n\t\t\t\tbarIndex;\n\n\t\t\tfor (var datasetIndex = 0; datasetIndex < this.datasets.length; datasetIndex++) {\n\t\t\t\tfor (barIndex = 0; barIndex < this.datasets[datasetIndex].bars.length; barIndex++) {\n\t\t\t\t\tif (this.datasets[datasetIndex].bars[barIndex].inRange(eventPosition.x,eventPosition.y)){\n\t\t\t\t\t\thelpers.each(this.datasets, datasetIterator);\n\t\t\t\t\t\treturn barsArray;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn barsArray;\n\t\t},\n\t\tbuildScale : function(labels){\n\t\t\tvar self = this;\n\n\t\t\tvar dataTotal = function(){\n\t\t\t\tvar values = [];\n\t\t\t\tself.eachBars(function(bar){\n\t\t\t\t\tvalues.push(bar.value);\n\t\t\t\t});\n\t\t\t\treturn values;\n\t\t\t};\n\n\t\t\tvar scaleOptions = {\n\t\t\t\ttemplateString : this.options.scaleLabel,\n\t\t\t\theight : this.chart.height,\n\t\t\t\twidth : this.chart.width,\n\t\t\t\tctx : this.chart.ctx,\n\t\t\t\ttextColor : this.options.scaleFontColor,\n\t\t\t\tfontSize : this.options.scaleFontSize,\n\t\t\t\tfontStyle : this.options.scaleFontStyle,\n\t\t\t\tfontFamily : this.options.scaleFontFamily,\n\t\t\t\tvaluesCount : labels.length,\n\t\t\t\tbeginAtZero : this.options.scaleBeginAtZero,\n\t\t\t\tintegersOnly : this.options.scaleIntegersOnly,\n\t\t\t\tcalculateYRange: function(currentHeight){\n\t\t\t\t\tvar updatedRanges = helpers.calculateScaleRange(\n\t\t\t\t\t\tdataTotal(),\n\t\t\t\t\t\tcurrentHeight,\n\t\t\t\t\t\tthis.fontSize,\n\t\t\t\t\t\tthis.beginAtZero,\n\t\t\t\t\t\tthis.integersOnly\n\t\t\t\t\t);\n\t\t\t\t\thelpers.extend(this, updatedRanges);\n\t\t\t\t},\n\t\t\t\txLabels : labels,\n\t\t\t\tfont : helpers.fontString(this.options.scaleFontSize, this.options.scaleFontStyle, this.options.scaleFontFamily),\n\t\t\t\tlineWidth : this.options.scaleLineWidth,\n\t\t\t\tlineColor : this.options.scaleLineColor,\n\t\t\t\tshowHorizontalLines : this.options.scaleShowHorizontalLines,\n\t\t\t\tshowVerticalLines : this.options.scaleShowVerticalLines,\n\t\t\t\tgridLineWidth : (this.options.scaleShowGridLines) ? this.options.scaleGridLineWidth : 0,\n\t\t\t\tgridLineColor : (this.options.scaleShowGridLines) ? this.options.scaleGridLineColor : \"rgba(0,0,0,0)\",\n\t\t\t\tpadding : (this.options.showScale) ? 0 : (this.options.barShowStroke) ? this.options.barStrokeWidth : 0,\n\t\t\t\tshowLabels : this.options.scaleShowLabels,\n\t\t\t\tdisplay : this.options.showScale\n\t\t\t};\n\n\t\t\tif (this.options.scaleOverride){\n\t\t\t\thelpers.extend(scaleOptions, {\n\t\t\t\t\tcalculateYRange: helpers.noop,\n\t\t\t\t\tsteps: this.options.scaleSteps,\n\t\t\t\t\tstepValue: this.options.scaleStepWidth,\n\t\t\t\t\tmin: this.options.scaleStartValue,\n\t\t\t\t\tmax: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.scale = new this.ScaleClass(scaleOptions);\n\t\t},\n\t\taddData : function(valuesArray,label){\n\t\t\t//Map the values array for each of the datasets\n\t\t\thelpers.each(valuesArray,function(value,datasetIndex){\n\t\t\t\t//Add a new point for each piece of data, passing any required data to draw.\n\t\t\t\tthis.datasets[datasetIndex].bars.push(new this.BarClass({\n\t\t\t\t\tvalue : value,\n\t\t\t\t\tlabel : label,\n\t\t\t\t\tx: this.scale.calculateBarX(this.datasets.length, datasetIndex, this.scale.valuesCount+1),\n\t\t\t\t\ty: this.scale.endPoint,\n\t\t\t\t\twidth : this.scale.calculateBarWidth(this.datasets.length),\n\t\t\t\t\tbase : this.scale.endPoint,\n\t\t\t\t\tstrokeColor : this.datasets[datasetIndex].strokeColor,\n\t\t\t\t\tfillColor : this.datasets[datasetIndex].fillColor\n\t\t\t\t}));\n\t\t\t},this);\n\n\t\t\tthis.scale.addXLabel(label);\n\t\t\t//Then re-render the chart.\n\t\t\tthis.update();\n\t\t},\n\t\tremoveData : function(){\n\t\t\tthis.scale.removeXLabel();\n\t\t\t//Then re-render the chart.\n\t\t\thelpers.each(this.datasets,function(dataset){\n\t\t\t\tdataset.bars.shift();\n\t\t\t},this);\n\t\t\tthis.update();\n\t\t},\n\t\treflow : function(){\n\t\t\thelpers.extend(this.BarClass.prototype,{\n\t\t\t\ty: this.scale.endPoint,\n\t\t\t\tbase : this.scale.endPoint\n\t\t\t});\n\t\t\tvar newScaleProps = helpers.extend({\n\t\t\t\theight : this.chart.height,\n\t\t\t\twidth : this.chart.width\n\t\t\t});\n\t\t\tthis.scale.update(newScaleProps);\n\t\t},\n\t\tdraw : function(ease){\n\t\t\tvar easingDecimal = ease || 1;\n\t\t\tthis.clear();\n\n\t\t\tvar ctx = this.chart.ctx;\n\n\t\t\tthis.scale.draw(easingDecimal);\n\n\t\t\t//Draw all the bars for each dataset\n\t\t\thelpers.each(this.datasets,function(dataset,datasetIndex){\n\t\t\t\thelpers.each(dataset.bars,function(bar,index){\n\t\t\t\t\tif (bar.hasValue()){\n\t\t\t\t\t\tbar.base = this.scale.endPoint;\n\t\t\t\t\t\t//Transition then draw\n\t\t\t\t\t\tbar.transition({\n\t\t\t\t\t\t\tx : this.scale.calculateBarX(this.datasets.length, datasetIndex, index),\n\t\t\t\t\t\t\ty : this.scale.calculateY(bar.value),\n\t\t\t\t\t\t\twidth : this.scale.calculateBarWidth(this.datasets.length)\n\t\t\t\t\t\t}, easingDecimal).draw();\n\t\t\t\t\t}\n\t\t\t\t},this);\n\n\t\t\t},this);\n\t\t}\n\t});\n\n\n}).call(this);\n\n(function(){\n\t\"use strict\";\n\n\tvar root = this,\n\t\tChart = root.Chart,\n\t\t//Cache a local reference to Chart.helpers\n\t\thelpers = Chart.helpers;\n\n\tvar defaultConfig = {\n\t\t//Boolean - Whether we should show a stroke on each segment\n\t\tsegmentShowStroke : true,\n\n\t\t//String - The colour of each segment stroke\n\t\tsegmentStrokeColor : \"#fff\",\n\n\t\t//Number - The width of each segment stroke\n\t\tsegmentStrokeWidth : 2,\n\n\t\t//The percentage of the chart that we cut out of the middle.\n\t\tpercentageInnerCutout : 50,\n\n\t\t//Number - Amount of animation steps\n\t\tanimationSteps : 100,\n\n\t\t//String - Animation easing effect\n\t\tanimationEasing : \"easeOutBounce\",\n\n\t\t//Boolean - Whether we animate the rotation of the Doughnut\n\t\tanimateRotate : true,\n\n\t\t//Boolean - Whether we animate scaling the Doughnut from the centre\n\t\tanimateScale : false,\n\n\t\t//String - A legend template\n\t\tlegendTemplate : \"<ul class=\\\"<%=name.toLowerCase()%>-legend\\\"><% for (var i=0; i<segments.length; i++){%><li><span style=\\\"background-color:<%=segments[i].fillColor%>\\\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>\"\n\n\t};\n\n\n\tChart.Type.extend({\n\t\t//Passing in a name registers this chart in the Chart namespace\n\t\tname: \"Doughnut\",\n\t\t//Providing a defaults will also register the deafults in the chart namespace\n\t\tdefaults : defaultConfig,\n\t\t//Initialize is fired when the chart is initialized - Data is passed in as a parameter\n\t\t//Config is automatically merged by the core of Chart.js, and is available at this.options\n\t\tinitialize: function(data){\n\n\t\t\t//Declare segments as a static property to prevent inheriting across the Chart type prototype\n\t\t\tthis.segments = [];\n\t\t\tthis.outerRadius = (helpers.min([this.chart.width,this.chart.height]) -\tthis.options.segmentStrokeWidth/2)/2;\n\n\t\t\tthis.SegmentArc = Chart.Arc.extend({\n\t\t\t\tctx : this.chart.ctx,\n\t\t\t\tx : this.chart.width/2,\n\t\t\t\ty : this.chart.height/2\n\t\t\t});\n\n\t\t\t//Set up tooltip events on the chart\n\t\t\tif (this.options.showTooltips){\n\t\t\t\thelpers.bindEvents(this, this.options.tooltipEvents, function(evt){\n\t\t\t\t\tvar activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];\n\n\t\t\t\t\thelpers.each(this.segments,function(segment){\n\t\t\t\t\t\tsegment.restore([\"fillColor\"]);\n\t\t\t\t\t});\n\t\t\t\t\thelpers.each(activeSegments,function(activeSegment){\n\t\t\t\t\t\tactiveSegment.fillColor = activeSegment.highlightColor;\n\t\t\t\t\t});\n\t\t\t\t\tthis.showTooltip(activeSegments);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.calculateTotal(data);\n\n\t\t\thelpers.each(data,function(datapoint, index){\n\t\t\t\tthis.addData(datapoint, index, true);\n\t\t\t},this);\n\n\t\t\tthis.render();\n\t\t},\n\t\tgetSegmentsAtEvent : function(e){\n\t\t\tvar segmentsArray = [];\n\n\t\t\tvar location = helpers.getRelativePosition(e);\n\n\t\t\thelpers.each(this.segments,function(segment){\n\t\t\t\tif (segment.inRange(location.x,location.y)) segmentsArray.push(segment);\n\t\t\t},this);\n\t\t\treturn segmentsArray;\n\t\t},\n\t\taddData : function(segment, atIndex, silent){\n\t\t\tvar index = atIndex || this.segments.length;\n\t\t\tthis.segments.splice(index, 0, new this.SegmentArc({\n\t\t\t\tvalue : segment.value,\n\t\t\t\touterRadius : (this.options.animateScale) ? 0 : this.outerRadius,\n\t\t\t\tinnerRadius : (this.options.animateScale) ? 0 : (this.outerRadius/100) * this.options.percentageInnerCutout,\n\t\t\t\tfillColor : segment.color,\n\t\t\t\thighlightColor : segment.highlight || segment.color,\n\t\t\t\tshowStroke : this.options.segmentShowStroke,\n\t\t\t\tstrokeWidth : this.options.segmentStrokeWidth,\n\t\t\t\tstrokeColor : this.options.segmentStrokeColor,\n\t\t\t\tstartAngle : Math.PI * 1.5,\n\t\t\t\tcircumference : (this.options.animateRotate) ? 0 : this.calculateCircumference(segment.value),\n\t\t\t\tlabel : segment.label\n\t\t\t}));\n\t\t\tif (!silent){\n\t\t\t\tthis.reflow();\n\t\t\t\tthis.update();\n\t\t\t}\n\t\t},\n\t\tcalculateCircumference : function(value){\n\t\t\treturn (Math.PI*2)*(Math.abs(value) / this.total);\n\t\t},\n\t\tcalculateTotal : function(data){\n\t\t\tthis.total = 0;\n\t\t\thelpers.each(data,function(segment){\n\t\t\t\tthis.total += Math.abs(segment.value);\n\t\t\t},this);\n\t\t},\n\t\tupdate : function(){\n\t\t\tthis.calculateTotal(this.segments);\n\n\t\t\t// Reset any highlight colours before updating.\n\t\t\thelpers.each(this.activeElements, function(activeElement){\n\t\t\t\tactiveElement.restore(['fillColor']);\n\t\t\t});\n\n\t\t\thelpers.each(this.segments,function(segment){\n\t\t\t\tsegment.save();\n\t\t\t});\n\t\t\tthis.render();\n\t\t},\n\n\t\tremoveData: function(atIndex){\n\t\t\tvar indexToDelete = (helpers.isNumber(atIndex)) ? atIndex : this.segments.length-1;\n\t\t\tthis.segments.splice(indexToDelete, 1);\n\t\t\tthis.reflow();\n\t\t\tthis.update();\n\t\t},\n\n\t\treflow : function(){\n\t\t\thelpers.extend(this.SegmentArc.prototype,{\n\t\t\t\tx : this.chart.width/2,\n\t\t\t\ty : this.chart.height/2\n\t\t\t});\n\t\t\tthis.outerRadius = (helpers.min([this.chart.width,this.chart.height]) -\tthis.options.segmentStrokeWidth/2)/2;\n\t\t\thelpers.each(this.segments, function(segment){\n\t\t\t\tsegment.update({\n\t\t\t\t\touterRadius : this.outerRadius,\n\t\t\t\t\tinnerRadius : (this.outerRadius/100) * this.options.percentageInnerCutout\n\t\t\t\t});\n\t\t\t}, this);\n\t\t},\n\t\tdraw : function(easeDecimal){\n\t\t\tvar animDecimal = (easeDecimal) ? easeDecimal : 1;\n\t\t\tthis.clear();\n\t\t\thelpers.each(this.segments,function(segment,index){\n\t\t\t\tsegment.transition({\n\t\t\t\t\tcircumference : this.calculateCircumference(segment.value),\n\t\t\t\t\touterRadius : this.outerRadius,\n\t\t\t\t\tinnerRadius : (this.outerRadius/100) * this.options.percentageInnerCutout\n\t\t\t\t},animDecimal);\n\n\t\t\t\tsegment.endAngle = segment.startAngle + segment.circumference;\n\n\t\t\t\tsegment.draw();\n\t\t\t\tif (index === 0){\n\t\t\t\t\tsegment.startAngle = Math.PI * 1.5;\n\t\t\t\t}\n\t\t\t\t//Check to see if it's the last segment, if not get the next and update the start angle\n\t\t\t\tif (index < this.segments.length-1){\n\t\t\t\t\tthis.segments[index+1].startAngle = segment.endAngle;\n\t\t\t\t}\n\t\t\t},this);\n\n\t\t}\n\t});\n\n\tChart.types.Doughnut.extend({\n\t\tname : \"Pie\",\n\t\tdefaults : helpers.merge(defaultConfig,{percentageInnerCutout : 0})\n\t});\n\n}).call(this);\n(function(){\n\t\"use strict\";\n\n\tvar root = this,\n\t\tChart = root.Chart,\n\t\thelpers = Chart.helpers;\n\n\tvar defaultConfig = {\n\n\t\t///Boolean - Whether grid lines are shown across the chart\n\t\tscaleShowGridLines : true,\n\n\t\t//String - Colour of the grid lines\n\t\tscaleGridLineColor : \"rgba(0,0,0,.05)\",\n\n\t\t//Number - Width of the grid lines\n\t\tscaleGridLineWidth : 1,\n\n\t\t//Boolean - Whether to show horizontal lines (except X axis)\n\t\tscaleShowHorizontalLines: true,\n\n\t\t//Boolean - Whether to show vertical lines (except Y axis)\n\t\tscaleShowVerticalLines: true,\n\n\t\t//Boolean - Whether the line is curved between points\n\t\tbezierCurve : true,\n\n\t\t//Number - Tension of the bezier curve between points\n\t\tbezierCurveTension : 0.4,\n\n\t\t//Boolean - Whether to show a dot for each point\n\t\tpointDot : true,\n\n\t\t//Number - Radius of each point dot in pixels\n\t\tpointDotRadius : 4,\n\n\t\t//Number - Pixel width of point dot stroke\n\t\tpointDotStrokeWidth : 1,\n\n\t\t//Number - amount extra to add to the radius to cater for hit detection outside the drawn point\n\t\tpointHitDetectionRadius : 20,\n\n\t\t//Boolean - Whether to show a stroke for datasets\n\t\tdatasetStroke : true,\n\n\t\t//Number - Pixel width of dataset stroke\n\t\tdatasetStrokeWidth : 2,\n\n\t\t//Boolean - Whether to fill the dataset with a colour\n\t\tdatasetFill : true,\n\n\t\t//String - A legend template\n\t\tlegendTemplate : \"<ul class=\\\"<%=name.toLowerCase()%>-legend\\\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\\\"background-color:<%=datasets[i].strokeColor%>\\\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>\"\n\n\t};\n\n\n\tChart.Type.extend({\n\t\tname: \"Line\",\n\t\tdefaults : defaultConfig,\n\t\tinitialize: function(data){\n\t\t\t//Declare the extension of the default point, to cater for the options passed in to the constructor\n\t\t\tthis.PointClass = Chart.Point.extend({\n\t\t\t\tstrokeWidth : this.options.pointDotStrokeWidth,\n\t\t\t\tradius : this.options.pointDotRadius,\n\t\t\t\tdisplay: this.options.pointDot,\n\t\t\t\thitDetectionRadius : this.options.pointHitDetectionRadius,\n\t\t\t\tctx : this.chart.ctx,\n\t\t\t\tinRange : function(mouseX){\n\t\t\t\t\treturn (Math.pow(mouseX-this.x, 2) < Math.pow(this.radius + this.hitDetectionRadius,2));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis.datasets = [];\n\n\t\t\t//Set up tooltip events on the chart\n\t\t\tif (this.options.showTooltips){\n\t\t\t\thelpers.bindEvents(this, this.options.tooltipEvents, function(evt){\n\t\t\t\t\tvar activePoints = (evt.type !== 'mouseout') ? this.getPointsAtEvent(evt) : [];\n\t\t\t\t\tthis.eachPoints(function(point){\n\t\t\t\t\t\tpoint.restore(['fillColor', 'strokeColor']);\n\t\t\t\t\t});\n\t\t\t\t\thelpers.each(activePoints, function(activePoint){\n\t\t\t\t\t\tactivePoint.fillColor = activePoint.highlightFill;\n\t\t\t\t\t\tactivePoint.strokeColor = activePoint.highlightStroke;\n\t\t\t\t\t});\n\t\t\t\t\tthis.showTooltip(activePoints);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t//Iterate through each of the datasets, and build this into a property of the chart\n\t\t\thelpers.each(data.datasets,function(dataset){\n\n\t\t\t\tvar datasetObject = {\n\t\t\t\t\tlabel : dataset.label || null,\n\t\t\t\t\tfillColor : dataset.fillColor,\n\t\t\t\t\tstrokeColor : dataset.strokeColor,\n\t\t\t\t\tpointColor : dataset.pointColor,\n\t\t\t\t\tpointStrokeColor : dataset.pointStrokeColor,\n\t\t\t\t\tpoints : []\n\t\t\t\t};\n\n\t\t\t\tthis.datasets.push(datasetObject);\n\n\n\t\t\t\thelpers.each(dataset.data,function(dataPoint,index){\n\t\t\t\t\t//Add a new point for each piece of data, passing any required data to draw.\n\t\t\t\t\tdatasetObject.points.push(new this.PointClass({\n\t\t\t\t\t\tvalue : dataPoint,\n\t\t\t\t\t\tlabel : data.labels[index],\n\t\t\t\t\t\tdatasetLabel: dataset.label,\n\t\t\t\t\t\tstrokeColor : dataset.pointStrokeColor,\n\t\t\t\t\t\tfillColor : dataset.pointColor,\n\t\t\t\t\t\thighlightFill : dataset.pointHighlightFill || dataset.pointColor,\n\t\t\t\t\t\thighlightStroke : dataset.pointHighlightStroke || dataset.pointStrokeColor\n\t\t\t\t\t}));\n\t\t\t\t},this);\n\n\t\t\t\tthis.buildScale(data.labels);\n\n\n\t\t\t\tthis.eachPoints(function(point, index){\n\t\t\t\t\thelpers.extend(point, {\n\t\t\t\t\t\tx: this.scale.calculateX(index),\n\t\t\t\t\t\ty: this.scale.endPoint\n\t\t\t\t\t});\n\t\t\t\t\tpoint.save();\n\t\t\t\t}, this);\n\n\t\t\t},this);\n\n\n\t\t\tthis.render();\n\t\t},\n\t\tupdate : function(){\n\t\t\tthis.scale.update();\n\t\t\t// Reset any highlight colours before updating.\n\t\t\thelpers.each(this.activeElements, function(activeElement){\n\t\t\t\tactiveElement.restore(['fillColor', 'strokeColor']);\n\t\t\t});\n\t\t\tthis.eachPoints(function(point){\n\t\t\t\tpoint.save();\n\t\t\t});\n\t\t\tthis.render();\n\t\t},\n\t\teachPoints : function(callback){\n\t\t\thelpers.each(this.datasets,function(dataset){\n\t\t\t\thelpers.each(dataset.points,callback,this);\n\t\t\t},this);\n\t\t},\n\t\tgetPointsAtEvent : function(e){\n\t\t\tvar pointsArray = [],\n\t\t\t\teventPosition = helpers.getRelativePosition(e);\n\t\t\thelpers.each(this.datasets,function(dataset){\n\t\t\t\thelpers.each(dataset.points,function(point){\n\t\t\t\t\tif (point.inRange(eventPosition.x,eventPosition.y)) pointsArray.push(point);\n\t\t\t\t});\n\t\t\t},this);\n\t\t\treturn pointsArray;\n\t\t},\n\t\tbuildScale : function(labels){\n\t\t\tvar self = this;\n\n\t\t\tvar dataTotal = function(){\n\t\t\t\tvar values = [];\n\t\t\t\tself.eachPoints(function(point){\n\t\t\t\t\tvalues.push(point.value);\n\t\t\t\t});\n\n\t\t\t\treturn values;\n\t\t\t};\n\n\t\t\tvar scaleOptions = {\n\t\t\t\ttemplateString : this.options.scaleLabel,\n\t\t\t\theight : this.chart.height,\n\t\t\t\twidth : this.chart.width,\n\t\t\t\tctx : this.chart.ctx,\n\t\t\t\ttextColor : this.options.scaleFontColor,\n\t\t\t\tfontSize : this.options.scaleFontSize,\n\t\t\t\tfontStyle : this.options.scaleFontStyle,\n\t\t\t\tfontFamily : this.options.scaleFontFamily,\n\t\t\t\tvaluesCount : labels.length,\n\t\t\t\tbeginAtZero : this.options.scaleBeginAtZero,\n\t\t\t\tintegersOnly : this.options.scaleIntegersOnly,\n\t\t\t\tcalculateYRange : function(currentHeight){\n\t\t\t\t\tvar updatedRanges = helpers.calculateScaleRange(\n\t\t\t\t\t\tdataTotal(),\n\t\t\t\t\t\tcurrentHeight,\n\t\t\t\t\t\tthis.fontSize,\n\t\t\t\t\t\tthis.beginAtZero,\n\t\t\t\t\t\tthis.integersOnly\n\t\t\t\t\t);\n\t\t\t\t\thelpers.extend(this, updatedRanges);\n\t\t\t\t},\n\t\t\t\txLabels : labels,\n\t\t\t\tfont : helpers.fontString(this.options.scaleFontSize, this.options.scaleFontStyle, this.options.scaleFontFamily),\n\t\t\t\tlineWidth : this.options.scaleLineWidth,\n\t\t\t\tlineColor : this.options.scaleLineColor,\n\t\t\t\tshowHorizontalLines : this.options.scaleShowHorizontalLines,\n\t\t\t\tshowVerticalLines : this.options.scaleShowVerticalLines,\n\t\t\t\tgridLineWidth : (this.options.scaleShowGridLines) ? this.options.scaleGridLineWidth : 0,\n\t\t\t\tgridLineColor : (this.options.scaleShowGridLines) ? this.options.scaleGridLineColor : \"rgba(0,0,0,0)\",\n\t\t\t\tpadding: (this.options.showScale) ? 0 : this.options.pointDotRadius + this.options.pointDotStrokeWidth,\n\t\t\t\tshowLabels : this.options.scaleShowLabels,\n\t\t\t\tdisplay : this.options.showScale\n\t\t\t};\n\n\t\t\tif (this.options.scaleOverride){\n\t\t\t\thelpers.extend(scaleOptions, {\n\t\t\t\t\tcalculateYRange: helpers.noop,\n\t\t\t\t\tsteps: this.options.scaleSteps,\n\t\t\t\t\tstepValue: this.options.scaleStepWidth,\n\t\t\t\t\tmin: this.options.scaleStartValue,\n\t\t\t\t\tmax: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)\n\t\t\t\t});\n\t\t\t}\n\n\n\t\t\tthis.scale = new Chart.Scale(scaleOptions);\n\t\t},\n\t\taddData : function(valuesArray,label){\n\t\t\t//Map the values array for each of the datasets\n\n\t\t\thelpers.each(valuesArray,function(value,datasetIndex){\n\t\t\t\t//Add a new point for each piece of data, passing any required data to draw.\n\t\t\t\tthis.datasets[datasetIndex].points.push(new this.PointClass({\n\t\t\t\t\tvalue : value,\n\t\t\t\t\tlabel : label,\n\t\t\t\t\tx: this.scale.calculateX(this.scale.valuesCount+1),\n\t\t\t\t\ty: this.scale.endPoint,\n\t\t\t\t\tstrokeColor : this.datasets[datasetIndex].pointStrokeColor,\n\t\t\t\t\tfillColor : this.datasets[datasetIndex].pointColor\n\t\t\t\t}));\n\t\t\t},this);\n\n\t\t\tthis.scale.addXLabel(label);\n\t\t\t//Then re-render the chart.\n\t\t\tthis.update();\n\t\t},\n\t\tremoveData : function(){\n\t\t\tthis.scale.removeXLabel();\n\t\t\t//Then re-render the chart.\n\t\t\thelpers.each(this.datasets,function(dataset){\n\t\t\t\tdataset.points.shift();\n\t\t\t},this);\n\t\t\tthis.update();\n\t\t},\n\t\treflow : function(){\n\t\t\tvar newScaleProps = helpers.extend({\n\t\t\t\theight : this.chart.height,\n\t\t\t\twidth : this.chart.width\n\t\t\t});\n\t\t\tthis.scale.update(newScaleProps);\n\t\t},\n\t\tdraw : function(ease){\n\t\t\tvar easingDecimal = ease || 1;\n\t\t\tthis.clear();\n\n\t\t\tvar ctx = this.chart.ctx;\n\n\t\t\t// Some helper methods for getting the next/prev points\n\t\t\tvar hasValue = function(item){\n\t\t\t\treturn item.value !== null;\n\t\t\t},\n\t\t\tnextPoint = function(point, collection, index){\n\t\t\t\treturn helpers.findNextWhere(collection, hasValue, index) || point;\n\t\t\t},\n\t\t\tpreviousPoint = function(point, collection, index){\n\t\t\t\treturn helpers.findPreviousWhere(collection, hasValue, index) || point;\n\t\t\t};\n\n\t\t\tthis.scale.draw(easingDecimal);\n\n\n\t\t\thelpers.each(this.datasets,function(dataset){\n\t\t\t\tvar pointsWithValues = helpers.where(dataset.points, hasValue);\n\n\t\t\t\t//Transition each point first so that the line and point drawing isn't out of sync\n\t\t\t\t//We can use this extra loop to calculate the control points of this dataset also in this loop\n\n\t\t\t\thelpers.each(dataset.points, function(point, index){\n\t\t\t\t\tif (point.hasValue()){\n\t\t\t\t\t\tpoint.transition({\n\t\t\t\t\t\t\ty : this.scale.calculateY(point.value),\n\t\t\t\t\t\t\tx : this.scale.calculateX(index)\n\t\t\t\t\t\t}, easingDecimal);\n\t\t\t\t\t}\n\t\t\t\t},this);\n\n\n\t\t\t\t// Control points need to be calculated in a seperate loop, because we need to know the current x/y of the point\n\t\t\t\t// This would cause issues when there is no animation, because the y of the next point would be 0, so beziers would be skewed\n\t\t\t\tif (this.options.bezierCurve){\n\t\t\t\t\thelpers.each(pointsWithValues, function(point, index){\n\t\t\t\t\t\tvar tension = (index > 0 && index < pointsWithValues.length - 1) ? this.options.bezierCurveTension : 0;\n\t\t\t\t\t\tpoint.controlPoints = helpers.splineCurve(\n\t\t\t\t\t\t\tpreviousPoint(point, pointsWithValues, index),\n\t\t\t\t\t\t\tpoint,\n\t\t\t\t\t\t\tnextPoint(point, pointsWithValues, index),\n\t\t\t\t\t\t\ttension\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Prevent the bezier going outside of the bounds of the graph\n\n\t\t\t\t\t\t// Cap puter bezier handles to the upper/lower scale bounds\n\t\t\t\t\t\tif (point.controlPoints.outer.y > this.scale.endPoint){\n\t\t\t\t\t\t\tpoint.controlPoints.outer.y = this.scale.endPoint;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (point.controlPoints.outer.y < this.scale.startPoint){\n\t\t\t\t\t\t\tpoint.controlPoints.outer.y = this.scale.startPoint;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Cap inner bezier handles to the upper/lower scale bounds\n\t\t\t\t\t\tif (point.controlPoints.inner.y > this.scale.endPoint){\n\t\t\t\t\t\t\tpoint.controlPoints.inner.y = this.scale.endPoint;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (point.controlPoints.inner.y < this.scale.startPoint){\n\t\t\t\t\t\t\tpoint.controlPoints.inner.y = this.scale.startPoint;\n\t\t\t\t\t\t}\n\t\t\t\t\t},this);\n\t\t\t\t}\n\n\n\t\t\t\t//Draw the line between all the points\n\t\t\t\tctx.lineWidth = this.options.datasetStrokeWidth;\n\t\t\t\tctx.strokeStyle = dataset.strokeColor;\n\t\t\t\tctx.beginPath();\n\n\t\t\t\thelpers.each(pointsWithValues, function(point, index){\n\t\t\t\t\tif (index === 0){\n\t\t\t\t\t\tctx.moveTo(point.x, point.y);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif(this.options.bezierCurve){\n\t\t\t\t\t\t\tvar previous = previousPoint(point, pointsWithValues, index);\n\n\t\t\t\t\t\t\tctx.bezierCurveTo(\n\t\t\t\t\t\t\t\tprevious.controlPoints.outer.x,\n\t\t\t\t\t\t\t\tprevious.controlPoints.outer.y,\n\t\t\t\t\t\t\t\tpoint.controlPoints.inner.x,\n\t\t\t\t\t\t\t\tpoint.controlPoints.inner.y,\n\t\t\t\t\t\t\t\tpoint.x,\n\t\t\t\t\t\t\t\tpoint.y\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tctx.lineTo(point.x,point.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, this);\n\n\t\t\t\tctx.stroke();\n\n\t\t\t\tif (this.options.datasetFill && pointsWithValues.length > 0){\n\t\t\t\t\t//Round off the line by going to the base of the chart, back to the start, then fill.\n\t\t\t\t\tctx.lineTo(pointsWithValues[pointsWithValues.length - 1].x, this.scale.endPoint);\n\t\t\t\t\tctx.lineTo(pointsWithValues[0].x, this.scale.endPoint);\n\t\t\t\t\tctx.fillStyle = dataset.fillColor;\n\t\t\t\t\tctx.closePath();\n\t\t\t\t\tctx.fill();\n\t\t\t\t}\n\n\t\t\t\t//Now draw the points over the line\n\t\t\t\t//A little inefficient double looping, but better than the line\n\t\t\t\t//lagging behind the point positions\n\t\t\t\thelpers.each(pointsWithValues,function(point){\n\t\t\t\t\tpoint.draw();\n\t\t\t\t});\n\t\t\t},this);\n\t\t}\n\t});\n\n\n}).call(this);\n\n(function(){\n\t\"use strict\";\n\n\tvar root = this,\n\t\tChart = root.Chart,\n\t\t//Cache a local reference to Chart.helpers\n\t\thelpers = Chart.helpers;\n\n\tvar defaultConfig = {\n\t\t//Boolean - Show a backdrop to the scale label\n\t\tscaleShowLabelBackdrop : true,\n\n\t\t//String - The colour of the label backdrop\n\t\tscaleBackdropColor : \"rgba(255,255,255,0.75)\",\n\n\t\t// Boolean - Whether the scale should begin at zero\n\t\tscaleBeginAtZero : true,\n\n\t\t//Number - The backdrop padding above & below the label in pixels\n\t\tscaleBackdropPaddingY : 2,\n\n\t\t//Number - The backdrop padding to the side of the label in pixels\n\t\tscaleBackdropPaddingX : 2,\n\n\t\t//Boolean - Show line for each value in the scale\n\t\tscaleShowLine : true,\n\n\t\t//Boolean - Stroke a line around each segment in the chart\n\t\tsegmentShowStroke : true,\n\n\t\t//String - The colour of the stroke on each segement.\n\t\tsegmentStrokeColor : \"#fff\",\n\n\t\t//Number - The width of the stroke value in pixels\n\t\tsegmentStrokeWidth : 2,\n\n\t\t//Number - Amount of animation steps\n\t\tanimationSteps : 100,\n\n\t\t//String - Animation easing effect.\n\t\tanimationEasing : \"easeOutBounce\",\n\n\t\t//Boolean - Whether to animate the rotation of the chart\n\t\tanimateRotate : true,\n\n\t\t//Boolean - Whether to animate scaling the chart from the centre\n\t\tanimateScale : false,\n\n\t\t//String - A legend template\n\t\tlegendTemplate : \"<ul class=\\\"<%=name.toLowerCase()%>-legend\\\"><% for (var i=0; i<segments.length; i++){%><li><span style=\\\"background-color:<%=segments[i].fillColor%>\\\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>\"\n\t};\n\n\n\tChart.Type.extend({\n\t\t//Passing in a name registers this chart in the Chart namespace\n\t\tname: \"PolarArea\",\n\t\t//Providing a defaults will also register the deafults in the chart namespace\n\t\tdefaults : defaultConfig,\n\t\t//Initialize is fired when the chart is initialized - Data is passed in as a parameter\n\t\t//Config is automatically merged by the core of Chart.js, and is available at this.options\n\t\tinitialize: function(data){\n\t\t\tthis.segments = [];\n\t\t\t//Declare segment class as a chart instance specific class, so it can share props for this instance\n\t\t\tthis.SegmentArc = Chart.Arc.extend({\n\t\t\t\tshowStroke : this.options.segmentShowStroke,\n\t\t\t\tstrokeWidth : this.options.segmentStrokeWidth,\n\t\t\t\tstrokeColor : this.options.segmentStrokeColor,\n\t\t\t\tctx : this.chart.ctx,\n\t\t\t\tinnerRadius : 0,\n\t\t\t\tx : this.chart.width/2,\n\t\t\t\ty : this.chart.height/2\n\t\t\t});\n\t\t\tthis.scale = new Chart.RadialScale({\n\t\t\t\tdisplay: this.options.showScale,\n\t\t\t\tfontStyle: this.options.scaleFontStyle,\n\t\t\t\tfontSize: this.options.scaleFontSize,\n\t\t\t\tfontFamily: this.options.scaleFontFamily,\n\t\t\t\tfontColor: this.options.scaleFontColor,\n\t\t\t\tshowLabels: this.options.scaleShowLabels,\n\t\t\t\tshowLabelBackdrop: this.options.scaleShowLabelBackdrop,\n\t\t\t\tbackdropColor: this.options.scaleBackdropColor,\n\t\t\t\tbackdropPaddingY : this.options.scaleBackdropPaddingY,\n\t\t\t\tbackdropPaddingX: this.options.scaleBackdropPaddingX,\n\t\t\t\tlineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,\n\t\t\t\tlineColor: this.options.scaleLineColor,\n\t\t\t\tlineArc: true,\n\t\t\t\twidth: this.chart.width,\n\t\t\t\theight: this.chart.height,\n\t\t\t\txCenter: this.chart.width/2,\n\t\t\t\tyCenter: this.chart.height/2,\n\t\t\t\tctx : this.chart.ctx,\n\t\t\t\ttemplateString: this.options.scaleLabel,\n\t\t\t\tvaluesCount: data.length\n\t\t\t});\n\n\t\t\tthis.updateScaleRange(data);\n\n\t\t\tthis.scale.update();\n\n\t\t\thelpers.each(data,function(segment,index){\n\t\t\t\tthis.addData(segment,index,true);\n\t\t\t},this);\n\n\t\t\t//Set up tooltip events on the chart\n\t\t\tif (this.options.showTooltips){\n\t\t\t\thelpers.bindEvents(this, this.options.tooltipEvents, function(evt){\n\t\t\t\t\tvar activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];\n\t\t\t\t\thelpers.each(this.segments,function(segment){\n\t\t\t\t\t\tsegment.restore([\"fillColor\"]);\n\t\t\t\t\t});\n\t\t\t\t\thelpers.each(activeSegments,function(activeSegment){\n\t\t\t\t\t\tactiveSegment.fillColor = activeSegment.highlightColor;\n\t\t\t\t\t});\n\t\t\t\t\tthis.showTooltip(activeSegments);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.render();\n\t\t},\n\t\tgetSegmentsAtEvent : function(e){\n\t\t\tvar segmentsArray = [];\n\n\t\t\tvar location = helpers.getRelativePosition(e);\n\n\t\t\thelpers.each(this.segments,function(segment){\n\t\t\t\tif (segment.inRange(location.x,location.y)) segmentsArray.push(segment);\n\t\t\t},this);\n\t\t\treturn segmentsArray;\n\t\t},\n\t\taddData : function(segment, atIndex, silent){\n\t\t\tvar index = atIndex || this.segments.length;\n\n\t\t\tthis.segments.splice(index, 0, new this.SegmentArc({\n\t\t\t\tfillColor: segment.color,\n\t\t\t\thighlightColor: segment.highlight || segment.color,\n\t\t\t\tlabel: segment.label,\n\t\t\t\tvalue: segment.value,\n\t\t\t\touterRadius: (this.options.animateScale) ? 0 : this.scale.calculateCenterOffset(segment.value),\n\t\t\t\tcircumference: (this.options.animateRotate) ? 0 : this.scale.getCircumference(),\n\t\t\t\tstartAngle: Math.PI * 1.5\n\t\t\t}));\n\t\t\tif (!silent){\n\t\t\t\tthis.reflow();\n\t\t\t\tthis.update();\n\t\t\t}\n\t\t},\n\t\tremoveData: function(atIndex){\n\t\t\tvar indexToDelete = (helpers.isNumber(atIndex)) ? atIndex : this.segments.length-1;\n\t\t\tthis.segments.splice(indexToDelete, 1);\n\t\t\tthis.reflow();\n\t\t\tthis.update();\n\t\t},\n\t\tcalculateTotal: function(data){\n\t\t\tthis.total = 0;\n\t\t\thelpers.each(data,function(segment){\n\t\t\t\tthis.total += segment.value;\n\t\t\t},this);\n\t\t\tthis.scale.valuesCount = this.segments.length;\n\t\t},\n\t\tupdateScaleRange: function(datapoints){\n\t\t\tvar valuesArray = [];\n\t\t\thelpers.each(datapoints,function(segment){\n\t\t\t\tvaluesArray.push(segment.value);\n\t\t\t});\n\n\t\t\tvar scaleSizes = (this.options.scaleOverride) ?\n\t\t\t\t{\n\t\t\t\t\tsteps: this.options.scaleSteps,\n\t\t\t\t\tstepValue: this.options.scaleStepWidth,\n\t\t\t\t\tmin: this.options.scaleStartValue,\n\t\t\t\t\tmax: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)\n\t\t\t\t} :\n\t\t\t\thelpers.calculateScaleRange(\n\t\t\t\t\tvaluesArray,\n\t\t\t\t\thelpers.min([this.chart.width, this.chart.height])/2,\n\t\t\t\t\tthis.options.scaleFontSize,\n\t\t\t\t\tthis.options.scaleBeginAtZero,\n\t\t\t\t\tthis.options.scaleIntegersOnly\n\t\t\t\t);\n\n\t\t\thelpers.extend(\n\t\t\t\tthis.scale,\n\t\t\t\tscaleSizes,\n\t\t\t\t{\n\t\t\t\t\tsize: helpers.min([this.chart.width, this.chart.height]),\n\t\t\t\t\txCenter: this.chart.width/2,\n\t\t\t\t\tyCenter: this.chart.height/2\n\t\t\t\t}\n\t\t\t);\n\n\t\t},\n\t\tupdate : function(){\n\t\t\tthis.calculateTotal(this.segments);\n\n\t\t\thelpers.each(this.segments,function(segment){\n\t\t\t\tsegment.save();\n\t\t\t});\n\t\t\t\n\t\t\tthis.reflow();\n\t\t\tthis.render();\n\t\t},\n\t\treflow : function(){\n\t\t\thelpers.extend(this.SegmentArc.prototype,{\n\t\t\t\tx : this.chart.width/2,\n\t\t\t\ty : this.chart.height/2\n\t\t\t});\n\t\t\tthis.updateScaleRange(this.segments);\n\t\t\tthis.scale.update();\n\n\t\t\thelpers.extend(this.scale,{\n\t\t\t\txCenter: this.chart.width/2,\n\t\t\t\tyCenter: this.chart.height/2\n\t\t\t});\n\n\t\t\thelpers.each(this.segments, function(segment){\n\t\t\t\tsegment.update({\n\t\t\t\t\touterRadius : this.scale.calculateCenterOffset(segment.value)\n\t\t\t\t});\n\t\t\t}, this);\n\n\t\t},\n\t\tdraw : function(ease){\n\t\t\tvar easingDecimal = ease || 1;\n\t\t\t//Clear & draw the canvas\n\t\t\tthis.clear();\n\t\t\thelpers.each(this.segments,function(segment, index){\n\t\t\t\tsegment.transition({\n\t\t\t\t\tcircumference : this.scale.getCircumference(),\n\t\t\t\t\touterRadius : this.scale.calculateCenterOffset(segment.value)\n\t\t\t\t},easingDecimal);\n\n\t\t\t\tsegment.endAngle = segment.startAngle + segment.circumference;\n\n\t\t\t\t// If we've removed the first segment we need to set the first one to\n\t\t\t\t// start at the top.\n\t\t\t\tif (index === 0){\n\t\t\t\t\tsegment.startAngle = Math.PI * 1.5;\n\t\t\t\t}\n\n\t\t\t\t//Check to see if it's the last segment, if not get the next and update the start angle\n\t\t\t\tif (index < this.segments.length - 1){\n\t\t\t\t\tthis.segments[index+1].startAngle = segment.endAngle;\n\t\t\t\t}\n\t\t\t\tsegment.draw();\n\t\t\t}, this);\n\t\t\tthis.scale.draw();\n\t\t}\n\t});\n\n}).call(this);\n(function(){\n\t\"use strict\";\n\n\tvar root = this,\n\t\tChart = root.Chart,\n\t\thelpers = Chart.helpers;\n\n\n\n\tChart.Type.extend({\n\t\tname: \"Radar\",\n\t\tdefaults:{\n\t\t\t//Boolean - Whether to show lines for each scale point\n\t\t\tscaleShowLine : true,\n\n\t\t\t//Boolean - Whether we show the angle lines out of the radar\n\t\t\tangleShowLineOut : true,\n\n\t\t\t//Boolean - Whether to show labels on the scale\n\t\t\tscaleShowLabels : false,\n\n\t\t\t// Boolean - Whether the scale should begin at zero\n\t\t\tscaleBeginAtZero : true,\n\n\t\t\t//String - Colour of the angle line\n\t\t\tangleLineColor : \"rgba(0,0,0,.1)\",\n\n\t\t\t//Number - Pixel width of the angle line\n\t\t\tangleLineWidth : 1,\n\n\t\t\t//String - Point label font declaration\n\t\t\tpointLabelFontFamily : \"'Arial'\",\n\n\t\t\t//String - Point label font weight\n\t\t\tpointLabelFontStyle : \"normal\",\n\n\t\t\t//Number - Point label font size in pixels\n\t\t\tpointLabelFontSize : 10,\n\n\t\t\t//String - Point label font colour\n\t\t\tpointLabelFontColor : \"#666\",\n\n\t\t\t//Boolean - Whether to show a dot for each point\n\t\t\tpointDot : true,\n\n\t\t\t//Number - Radius of each point dot in pixels\n\t\t\tpointDotRadius : 3,\n\n\t\t\t//Number - Pixel width of point dot stroke\n\t\t\tpointDotStrokeWidth : 1,\n\n\t\t\t//Number - amount extra to add to the radius to cater for hit detection outside the drawn point\n\t\t\tpointHitDetectionRadius : 20,\n\n\t\t\t//Boolean - Whether to show a stroke for datasets\n\t\t\tdatasetStroke : true,\n\n\t\t\t//Number - Pixel width of dataset stroke\n\t\t\tdatasetStrokeWidth : 2,\n\n\t\t\t//Boolean - Whether to fill the dataset with a colour\n\t\t\tdatasetFill : true,\n\n\t\t\t//String - A legend template\n\t\t\tlegendTemplate : \"<ul class=\\\"<%=name.toLowerCase()%>-legend\\\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\\\"background-color:<%=datasets[i].strokeColor%>\\\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>\"\n\n\t\t},\n\n\t\tinitialize: function(data){\n\t\t\tthis.PointClass = Chart.Point.extend({\n\t\t\t\tstrokeWidth : this.options.pointDotStrokeWidth,\n\t\t\t\tradius : this.options.pointDotRadius,\n\t\t\t\tdisplay: this.options.pointDot,\n\t\t\t\thitDetectionRadius : this.options.pointHitDetectionRadius,\n\t\t\t\tctx : this.chart.ctx\n\t\t\t});\n\n\t\t\tthis.datasets = [];\n\n\t\t\tthis.buildScale(data);\n\n\t\t\t//Set up tooltip events on the chart\n\t\t\tif (this.options.showTooltips){\n\t\t\t\thelpers.bindEvents(this, this.options.tooltipEvents, function(evt){\n\t\t\t\t\tvar activePointsCollection = (evt.type !== 'mouseout') ? this.getPointsAtEvent(evt) : [];\n\n\t\t\t\t\tthis.eachPoints(function(point){\n\t\t\t\t\t\tpoint.restore(['fillColor', 'strokeColor']);\n\t\t\t\t\t});\n\t\t\t\t\thelpers.each(activePointsCollection, function(activePoint){\n\t\t\t\t\t\tactivePoint.fillColor = activePoint.highlightFill;\n\t\t\t\t\t\tactivePoint.strokeColor = activePoint.highlightStroke;\n\t\t\t\t\t});\n\n\t\t\t\t\tthis.showTooltip(activePointsCollection);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t//Iterate through each of the datasets, and build this into a property of the chart\n\t\t\thelpers.each(data.datasets,function(dataset){\n\n\t\t\t\tvar datasetObject = {\n\t\t\t\t\tlabel: dataset.label || null,\n\t\t\t\t\tfillColor : dataset.fillColor,\n\t\t\t\t\tstrokeColor : dataset.strokeColor,\n\t\t\t\t\tpointColor : dataset.pointColor,\n\t\t\t\t\tpointStrokeColor : dataset.pointStrokeColor,\n\t\t\t\t\tpoints : []\n\t\t\t\t};\n\n\t\t\t\tthis.datasets.push(datasetObject);\n\n\t\t\t\thelpers.each(dataset.data,function(dataPoint,index){\n\t\t\t\t\t//Add a new point for each piece of data, passing any required data to draw.\n\t\t\t\t\tvar pointPosition;\n\t\t\t\t\tif (!this.scale.animation){\n\t\t\t\t\t\tpointPosition = this.scale.getPointPosition(index, this.scale.calculateCenterOffset(dataPoint));\n\t\t\t\t\t}\n\t\t\t\t\tdatasetObject.points.push(new this.PointClass({\n\t\t\t\t\t\tvalue : dataPoint,\n\t\t\t\t\t\tlabel : data.labels[index],\n\t\t\t\t\t\tdatasetLabel: dataset.label,\n\t\t\t\t\t\tx: (this.options.animation) ? this.scale.xCenter : pointPosition.x,\n\t\t\t\t\t\ty: (this.options.animation) ? this.scale.yCenter : pointPosition.y,\n\t\t\t\t\t\tstrokeColor : dataset.pointStrokeColor,\n\t\t\t\t\t\tfillColor : dataset.pointColor,\n\t\t\t\t\t\thighlightFill : dataset.pointHighlightFill || dataset.pointColor,\n\t\t\t\t\t\thighlightStroke : dataset.pointHighlightStroke || dataset.pointStrokeColor\n\t\t\t\t\t}));\n\t\t\t\t},this);\n\n\t\t\t},this);\n\n\t\t\tthis.render();\n\t\t},\n\t\teachPoints : function(callback){\n\t\t\thelpers.each(this.datasets,function(dataset){\n\t\t\t\thelpers.each(dataset.points,callback,this);\n\t\t\t},this);\n\t\t},\n\n\t\tgetPointsAtEvent : function(evt){\n\t\t\tvar mousePosition = helpers.getRelativePosition(evt),\n\t\t\t\tfromCenter = helpers.getAngleFromPoint({\n\t\t\t\t\tx: this.scale.xCenter,\n\t\t\t\t\ty: this.scale.yCenter\n\t\t\t\t}, mousePosition);\n\n\t\t\tvar anglePerIndex = (Math.PI * 2) /this.scale.valuesCount,\n\t\t\t\tpointIndex = Math.round((fromCenter.angle - Math.PI * 1.5) / anglePerIndex),\n\t\t\t\tactivePointsCollection = [];\n\n\t\t\t// If we're at the top, make the pointIndex 0 to get the first of the array.\n\t\t\tif (pointIndex >= this.scale.valuesCount || pointIndex < 0){\n\t\t\t\tpointIndex = 0;\n\t\t\t}\n\n\t\t\tif (fromCenter.distance <= this.scale.drawingArea){\n\t\t\t\thelpers.each(this.datasets, function(dataset){\n\t\t\t\t\tactivePointsCollection.push(dataset.points[pointIndex]);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn activePointsCollection;\n\t\t},\n\n\t\tbuildScale : function(data){\n\t\t\tthis.scale = new Chart.RadialScale({\n\t\t\t\tdisplay: this.options.showScale,\n\t\t\t\tfontStyle: this.options.scaleFontStyle,\n\t\t\t\tfontSize: this.options.scaleFontSize,\n\t\t\t\tfontFamily: this.options.scaleFontFamily,\n\t\t\t\tfontColor: this.options.scaleFontColor,\n\t\t\t\tshowLabels: this.options.scaleShowLabels,\n\t\t\t\tshowLabelBackdrop: this.options.scaleShowLabelBackdrop,\n\t\t\t\tbackdropColor: this.options.scaleBackdropColor,\n\t\t\t\tbackdropPaddingY : this.options.scaleBackdropPaddingY,\n\t\t\t\tbackdropPaddingX: this.options.scaleBackdropPaddingX,\n\t\t\t\tlineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,\n\t\t\t\tlineColor: this.options.scaleLineColor,\n\t\t\t\tangleLineColor : this.options.angleLineColor,\n\t\t\t\tangleLineWidth : (this.options.angleShowLineOut) ? this.options.angleLineWidth : 0,\n\t\t\t\t// Point labels at the edge of each line\n\t\t\t\tpointLabelFontColor : this.options.pointLabelFontColor,\n\t\t\t\tpointLabelFontSize : this.options.pointLabelFontSize,\n\t\t\t\tpointLabelFontFamily : this.options.pointLabelFontFamily,\n\t\t\t\tpointLabelFontStyle : this.options.pointLabelFontStyle,\n\t\t\t\theight : this.chart.height,\n\t\t\t\twidth: this.chart.width,\n\t\t\t\txCenter: this.chart.width/2,\n\t\t\t\tyCenter: this.chart.height/2,\n\t\t\t\tctx : this.chart.ctx,\n\t\t\t\ttemplateString: this.options.scaleLabel,\n\t\t\t\tlabels: data.labels,\n\t\t\t\tvaluesCount: data.datasets[0].data.length\n\t\t\t});\n\n\t\t\tthis.scale.setScaleSize();\n\t\t\tthis.updateScaleRange(data.datasets);\n\t\t\tthis.scale.buildYLabels();\n\t\t},\n\t\tupdateScaleRange: function(datasets){\n\t\t\tvar valuesArray = (function(){\n\t\t\t\tvar totalDataArray = [];\n\t\t\t\thelpers.each(datasets,function(dataset){\n\t\t\t\t\tif (dataset.data){\n\t\t\t\t\t\ttotalDataArray = totalDataArray.concat(dataset.data);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\thelpers.each(dataset.points, function(point){\n\t\t\t\t\t\t\ttotalDataArray.push(point.value);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn totalDataArray;\n\t\t\t})();\n\n\n\t\t\tvar scaleSizes = (this.options.scaleOverride) ?\n\t\t\t\t{\n\t\t\t\t\tsteps: this.options.scaleSteps,\n\t\t\t\t\tstepValue: this.options.scaleStepWidth,\n\t\t\t\t\tmin: this.options.scaleStartValue,\n\t\t\t\t\tmax: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)\n\t\t\t\t} :\n\t\t\t\thelpers.calculateScaleRange(\n\t\t\t\t\tvaluesArray,\n\t\t\t\t\thelpers.min([this.chart.width, this.chart.height])/2,\n\t\t\t\t\tthis.options.scaleFontSize,\n\t\t\t\t\tthis.options.scaleBeginAtZero,\n\t\t\t\t\tthis.options.scaleIntegersOnly\n\t\t\t\t);\n\n\t\t\thelpers.extend(\n\t\t\t\tthis.scale,\n\t\t\t\tscaleSizes\n\t\t\t);\n\n\t\t},\n\t\taddData : function(valuesArray,label){\n\t\t\t//Map the values array for each of the datasets\n\t\t\tthis.scale.valuesCount++;\n\t\t\thelpers.each(valuesArray,function(value,datasetIndex){\n\t\t\t\tvar pointPosition = this.scale.getPointPosition(this.scale.valuesCount, this.scale.calculateCenterOffset(value));\n\t\t\t\tthis.datasets[datasetIndex].points.push(new this.PointClass({\n\t\t\t\t\tvalue : value,\n\t\t\t\t\tlabel : label,\n\t\t\t\t\tx: pointPosition.x,\n\t\t\t\t\ty: pointPosition.y,\n\t\t\t\t\tstrokeColor : this.datasets[datasetIndex].pointStrokeColor,\n\t\t\t\t\tfillColor : this.datasets[datasetIndex].pointColor\n\t\t\t\t}));\n\t\t\t},this);\n\n\t\t\tthis.scale.labels.push(label);\n\n\t\t\tthis.reflow();\n\n\t\t\tthis.update();\n\t\t},\n\t\tremoveData : function(){\n\t\t\tthis.scale.valuesCount--;\n\t\t\tthis.scale.labels.shift();\n\t\t\thelpers.each(this.datasets,function(dataset){\n\t\t\t\tdataset.points.shift();\n\t\t\t},this);\n\t\t\tthis.reflow();\n\t\t\tthis.update();\n\t\t},\n\t\tupdate : function(){\n\t\t\tthis.eachPoints(function(point){\n\t\t\t\tpoint.save();\n\t\t\t});\n\t\t\tthis.reflow();\n\t\t\tthis.render();\n\t\t},\n\t\treflow: function(){\n\t\t\thelpers.extend(this.scale, {\n\t\t\t\twidth : this.chart.width,\n\t\t\t\theight: this.chart.height,\n\t\t\t\tsize : helpers.min([this.chart.width, this.chart.height]),\n\t\t\t\txCenter: this.chart.width/2,\n\t\t\t\tyCenter: this.chart.height/2\n\t\t\t});\n\t\t\tthis.updateScaleRange(this.datasets);\n\t\t\tthis.scale.setScaleSize();\n\t\t\tthis.scale.buildYLabels();\n\t\t},\n\t\tdraw : function(ease){\n\t\t\tvar easeDecimal = ease || 1,\n\t\t\t\tctx = this.chart.ctx;\n\t\t\tthis.clear();\n\t\t\tthis.scale.draw();\n\n\t\t\thelpers.each(this.datasets,function(dataset){\n\n\t\t\t\t//Transition each point first so that the line and point drawing isn't out of sync\n\t\t\t\thelpers.each(dataset.points,function(point,index){\n\t\t\t\t\tif (point.hasValue()){\n\t\t\t\t\t\tpoint.transition(this.scale.getPointPosition(index, this.scale.calculateCenterOffset(point.value)), easeDecimal);\n\t\t\t\t\t}\n\t\t\t\t},this);\n\n\n\n\t\t\t\t//Draw the line between all the points\n\t\t\t\tctx.lineWidth = this.options.datasetStrokeWidth;\n\t\t\t\tctx.strokeStyle = dataset.strokeColor;\n\t\t\t\tctx.beginPath();\n\t\t\t\thelpers.each(dataset.points,function(point,index){\n\t\t\t\t\tif (index === 0){\n\t\t\t\t\t\tctx.moveTo(point.x,point.y);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tctx.lineTo(point.x,point.y);\n\t\t\t\t\t}\n\t\t\t\t},this);\n\t\t\t\tctx.closePath();\n\t\t\t\tctx.stroke();\n\n\t\t\t\tctx.fillStyle = dataset.fillColor;\n\t\t\t\tctx.fill();\n\n\t\t\t\t//Now draw the points over the line\n\t\t\t\t//A little inefficient double looping, but better than the line\n\t\t\t\t//lagging behind the point positions\n\t\t\t\thelpers.each(dataset.points,function(point){\n\t\t\t\t\tif (point.hasValue()){\n\t\t\t\t\t\tpoint.draw();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t},this);\n\n\t\t}\n\n\t});\n\n\n\n\n\n}).call(this);","/*************************\r\n * Croppie\r\n * Copyright 2017\r\n * Foliotek\r\n * Version: 2.5.0\r\n *************************/\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n // AMD. Register as an anonymous module.\r\n define(['exports'], factory);\r\n } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {\r\n // CommonJS\r\n factory(exports);\r\n } else {\r\n // Browser globals\r\n factory((root.commonJsStrict = {}));\r\n }\r\n}(this, function (exports) {\r\n\r\n /* Polyfills */\r\n if (typeof Promise !== 'function') {\r\n /*! promise-polyfill 3.1.0 */\r\n !function(a){function b(a,b){return function(){a.apply(b,arguments)}}function c(a){if(\"object\"!=typeof this)throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof a)throw new TypeError(\"not a function\");this._state=null,this._value=null,this._deferreds=[],i(a,b(e,this),b(f,this))}function d(a){var b=this;return null===this._state?void this._deferreds.push(a):void k(function(){var c=b._state?a.onFulfilled:a.onRejected;if(null===c)return void(b._state?a.resolve:a.reject)(b._value);var d;try{d=c(b._value)}catch(e){return void a.reject(e)}a.resolve(d)})}function e(a){try{if(a===this)throw new TypeError(\"A promise cannot be resolved with itself.\");if(a&&(\"object\"==typeof a||\"function\"==typeof a)){var c=a.then;if(\"function\"==typeof c)return void i(b(c,a),b(e,this),b(f,this))}this._state=!0,this._value=a,g.call(this)}catch(d){f.call(this,d)}}function f(a){this._state=!1,this._value=a,g.call(this)}function g(){for(var a=0,b=this._deferreds.length;b>a;a++)d.call(this,this._deferreds[a]);this._deferreds=null}function h(a,b,c,d){this.onFulfilled=\"function\"==typeof a?a:null,this.onRejected=\"function\"==typeof b?b:null,this.resolve=c,this.reject=d}function i(a,b,c){var d=!1;try{a(function(a){d||(d=!0,b(a))},function(a){d||(d=!0,c(a))})}catch(e){if(d)return;d=!0,c(e)}}var j=setTimeout,k=\"function\"==typeof setImmediate&&setImmediate||function(a){j(a,1)},l=Array.isArray||function(a){return\"[object Array]\"===Object.prototype.toString.call(a)};c.prototype[\"catch\"]=function(a){return this.then(null,a)},c.prototype.then=function(a,b){var e=this;return new c(function(c,f){d.call(e,new h(a,b,c,f))})},c.all=function(){var a=Array.prototype.slice.call(1===arguments.length&&l(arguments[0])?arguments[0]:arguments);return new c(function(b,c){function d(f,g){try{if(g&&(\"object\"==typeof g||\"function\"==typeof g)){var h=g.then;if(\"function\"==typeof h)return void h.call(g,function(a){d(f,a)},c)}a[f]=g,0===--e&&b(a)}catch(i){c(i)}}if(0===a.length)return b([]);for(var e=a.length,f=0;f<a.length;f++)d(f,a[f])})},c.resolve=function(a){return a&&\"object\"==typeof a&&a.constructor===c?a:new c(function(b){b(a)})},c.reject=function(a){return new c(function(b,c){c(a)})},c.race=function(a){return new c(function(b,c){for(var d=0,e=a.length;e>d;d++)a[d].then(b,c)})},c._setImmediateFn=function(a){k=a},\"undefined\"!=typeof module&&module.exports?module.exports=c:a.Promise||(a.Promise=c)}(this);\r\n }\r\n\r\n if ( typeof window.CustomEvent !== \"function\" ) {\r\n (function(){\r\n function CustomEvent ( event, params ) {\r\n params = params || { bubbles: false, cancelable: false, detail: undefined };\r\n var evt = document.createEvent( 'CustomEvent' );\r\n evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );\r\n return evt;\r\n }\r\n CustomEvent.prototype = window.Event.prototype;\r\n window.CustomEvent = CustomEvent;\r\n }());\r\n }\r\n\r\n if (!HTMLCanvasElement.prototype.toBlob) {\r\n Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {\r\n value: function (callback, type, quality) {\r\n var binStr = atob( this.toDataURL(type, quality).split(',')[1] ),\r\n len = binStr.length,\r\n arr = new Uint8Array(len);\r\n\r\n for (var i=0; i<len; i++ ) {\r\n arr[i] = binStr.charCodeAt(i);\r\n }\r\n\r\n callback( new Blob( [arr], {type: type || 'image/png'} ) );\r\n }\r\n });\r\n }\r\n /* End Polyfills */\r\n\r\n var cssPrefixes = ['Webkit', 'Moz', 'ms'],\r\n emptyStyles = document.createElement('div').style,\r\n CSS_TRANS_ORG,\r\n CSS_TRANSFORM,\r\n CSS_USERSELECT;\r\n\r\n function vendorPrefix(prop) {\r\n if (prop in emptyStyles) {\r\n return prop;\r\n }\r\n\r\n var capProp = prop[0].toUpperCase() + prop.slice(1),\r\n i = cssPrefixes.length;\r\n\r\n while (i--) {\r\n prop = cssPrefixes[i] + capProp;\r\n if (prop in emptyStyles) {\r\n return prop;\r\n }\r\n }\r\n }\r\n\r\n CSS_TRANSFORM = vendorPrefix('transform');\r\n CSS_TRANS_ORG = vendorPrefix('transformOrigin');\r\n CSS_USERSELECT = vendorPrefix('userSelect');\r\n\r\n // Credits to : Andrew Dupont - http://andrewdupont.net/2009/08/28/deep-extending-objects-in-javascript/\r\n function deepExtend(destination, source) {\r\n destination = destination || {};\r\n for (var property in source) {\r\n if (source[property] && source[property].constructor && source[property].constructor === Object) {\r\n destination[property] = destination[property] || {};\r\n deepExtend(destination[property], source[property]);\r\n } else {\r\n destination[property] = source[property];\r\n }\r\n }\r\n return destination;\r\n }\r\n\r\n function debounce(func, wait, immediate) {\r\n var timeout;\r\n return function () {\r\n var context = this, args = arguments;\r\n var later = function () {\r\n timeout = null;\r\n if (!immediate) func.apply(context, args);\r\n };\r\n var callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n }\r\n\r\n function dispatchChange(element) {\r\n if (\"createEvent\" in document) {\r\n var evt = document.createEvent(\"HTMLEvents\");\r\n evt.initEvent(\"change\", false, true);\r\n element.dispatchEvent(evt);\r\n }\r\n else {\r\n element.fireEvent(\"onchange\");\r\n }\r\n }\r\n\r\n //http://jsperf.com/vanilla-css\r\n function css(el, styles, val) {\r\n if (typeof (styles) === 'string') {\r\n var tmp = styles;\r\n styles = {};\r\n styles[tmp] = val;\r\n }\r\n\r\n for (var prop in styles) {\r\n el.style[prop] = styles[prop];\r\n }\r\n }\r\n\r\n function addClass(el, c) {\r\n if (el.classList) {\r\n el.classList.add(c);\r\n }\r\n else {\r\n el.className += ' ' + c;\r\n }\r\n }\r\n\r\n function removeClass(el, c) {\r\n if (el.classList) {\r\n el.classList.remove(c);\r\n }\r\n else {\r\n el.className = el.className.replace(c, '');\r\n }\r\n }\r\n\r\n function num(v) {\r\n return parseInt(v, 10);\r\n }\r\n\r\n /* Utilities */\r\n function loadImage(src, imageEl, doExif) {\r\n var img = imageEl || new Image();\r\n img.style.opacity = 0;\r\n\r\n return new Promise(function (resolve) {\r\n function _resolve() {\r\n setTimeout(function(){\r\n resolve(img);\r\n }, 1);\r\n }\r\n\r\n if (img.src === src) {// If image source hasn't changed resolve immediately\r\n _resolve();\r\n return;\r\n } \r\n\r\n img.exifdata = null;\r\n img.removeAttribute('crossOrigin');\r\n if (src.match(/^https?:\\/\\/|^\\/\\//)) {\r\n img.setAttribute('crossOrigin', 'anonymous');\r\n }\r\n img.onload = function () {\r\n if (doExif) {\r\n EXIF.getData(img, function () {\r\n _resolve();\r\n }); \r\n }\r\n else {\r\n _resolve();\r\n }\r\n };\r\n img.src = src;\r\n });\r\n }\r\n\r\n function naturalImageDimensions(img) {\r\n var w = img.naturalWidth;\r\n var h = img.naturalHeight;\r\n if (img.exifdata && img.exifdata.Orientation >= 5) {\r\n var x= w;\r\n w = h;\r\n h = x;\r\n }\r\n return { width: w, height: h };\r\n }\r\n\r\n /* CSS Transform Prototype */\r\n var TRANSLATE_OPTS = {\r\n 'translate3d': {\r\n suffix: ', 0px'\r\n },\r\n 'translate': {\r\n suffix: ''\r\n }\r\n };\r\n var Transform = function (x, y, scale) {\r\n this.x = parseFloat(x);\r\n this.y = parseFloat(y);\r\n this.scale = parseFloat(scale);\r\n };\r\n\r\n Transform.parse = function (v) {\r\n if (v.style) {\r\n return Transform.parse(v.style[CSS_TRANSFORM]);\r\n }\r\n else if (v.indexOf('matrix') > -1 || v.indexOf('none') > -1) {\r\n return Transform.fromMatrix(v);\r\n }\r\n else {\r\n return Transform.fromString(v);\r\n }\r\n };\r\n\r\n Transform.fromMatrix = function (v) {\r\n var vals = v.substring(7).split(',');\r\n if (!vals.length || v === 'none') {\r\n vals = [1, 0, 0, 1, 0, 0];\r\n }\r\n\r\n return new Transform(num(vals[4]), num(vals[5]), parseFloat(vals[0]));\r\n };\r\n\r\n Transform.fromString = function (v) {\r\n var values = v.split(') '),\r\n translate = values[0].substring(Croppie.globals.translate.length + 1).split(','),\r\n scale = values.length > 1 ? values[1].substring(6) : 1,\r\n x = translate.length > 1 ? translate[0] : 0,\r\n y = translate.length > 1 ? translate[1] : 0;\r\n\r\n return new Transform(x, y, scale);\r\n };\r\n\r\n Transform.prototype.toString = function () {\r\n var suffix = TRANSLATE_OPTS[Croppie.globals.translate].suffix || '';\r\n return Croppie.globals.translate + '(' + this.x + 'px, ' + this.y + 'px' + suffix + ') scale(' + this.scale + ')';\r\n };\r\n\r\n var TransformOrigin = function (el) {\r\n if (!el || !el.style[CSS_TRANS_ORG]) {\r\n this.x = 0;\r\n this.y = 0;\r\n return;\r\n }\r\n var css = el.style[CSS_TRANS_ORG].split(' ');\r\n this.x = parseFloat(css[0]);\r\n this.y = parseFloat(css[1]);\r\n };\r\n\r\n TransformOrigin.prototype.toString = function () {\r\n return this.x + 'px ' + this.y + 'px';\r\n };\r\n\r\n function getExifOrientation (img) {\r\n return img.exifdata.Orientation;\r\n }\r\n\r\n function drawCanvas(canvas, img, orientation) {\r\n var width = img.width,\r\n height = img.height,\r\n ctx = canvas.getContext('2d');\r\n\r\n canvas.width = img.width;\r\n canvas.height = img.height;\r\n\r\n ctx.save();\r\n switch (orientation) {\r\n case 2:\r\n ctx.translate(width, 0);\r\n ctx.scale(-1, 1);\r\n break;\r\n\r\n case 3:\r\n ctx.translate(width, height);\r\n ctx.rotate(180*Math.PI/180);\r\n break;\r\n\r\n case 4:\r\n ctx.translate(0, height);\r\n ctx.scale(1, -1);\r\n break;\r\n\r\n case 5:\r\n canvas.width = height;\r\n canvas.height = width;\r\n ctx.rotate(90*Math.PI/180);\r\n ctx.scale(1, -1);\r\n break;\r\n\r\n case 6:\r\n canvas.width = height;\r\n canvas.height = width;\r\n ctx.rotate(90*Math.PI/180);\r\n ctx.translate(0, -height);\r\n break;\r\n\r\n case 7:\r\n canvas.width = height;\r\n canvas.height = width;\r\n ctx.rotate(-90*Math.PI/180);\r\n ctx.translate(-width, height);\r\n ctx.scale(1, -1);\r\n break;\r\n\r\n case 8:\r\n canvas.width = height;\r\n canvas.height = width;\r\n ctx.translate(0, width);\r\n ctx.rotate(-90*Math.PI/180);\r\n break;\r\n }\r\n ctx.drawImage(img, 0,0, width, height);\r\n ctx.restore();\r\n }\r\n\r\n /* Private Methods */\r\n function _create() {\r\n var self = this,\r\n contClass = 'croppie-container',\r\n customViewportClass = self.options.viewport.type ? 'cr-vp-' + self.options.viewport.type : null,\r\n boundary, img, viewport, overlay, bw, bh;\r\n\r\n self.options.useCanvas = self.options.enableOrientation || _hasExif.call(self);\r\n // Properties on class\r\n self.data = {};\r\n self.elements = {};\r\n\r\n boundary = self.elements.boundary = document.createElement('div');\r\n viewport = self.elements.viewport = document.createElement('div');\r\n img = self.elements.img = document.createElement('img');\r\n overlay = self.elements.overlay = document.createElement('div');\r\n\r\n if (self.options.useCanvas) {\r\n self.elements.canvas = document.createElement('canvas');\r\n self.elements.preview = self.elements.canvas;\r\n }\r\n else {\r\n self.elements.preview = self.elements.img;\r\n }\r\n\r\n addClass(boundary, 'cr-boundary');\r\n bw = self.options.boundary.width;\r\n bh = self.options.boundary.height;\r\n css(boundary, {\r\n width: (bw + (isNaN(bw) ? '' : 'px')),\r\n height: (bh + (isNaN(bh) ? '' : 'px'))\r\n });\r\n\r\n addClass(viewport, 'cr-viewport');\r\n if (customViewportClass) {\r\n addClass(viewport, customViewportClass);\r\n }\r\n css(viewport, {\r\n width: self.options.viewport.width + 'px',\r\n height: self.options.viewport.height + 'px'\r\n });\r\n viewport.setAttribute('tabindex', 0);\r\n\r\n addClass(self.elements.preview, 'cr-image');\r\n addClass(overlay, 'cr-overlay');\r\n\r\n self.element.appendChild(boundary);\r\n boundary.appendChild(self.elements.preview);\r\n boundary.appendChild(viewport);\r\n boundary.appendChild(overlay);\r\n\r\n addClass(self.element, contClass);\r\n if (self.options.customClass) {\r\n addClass(self.element, self.options.customClass);\r\n }\r\n\r\n _initDraggable.call(this);\r\n\r\n if (self.options.enableZoom) {\r\n _initializeZoom.call(self);\r\n }\r\n\r\n // if (self.options.enableOrientation) {\r\n // _initRotationControls.call(self);\r\n // }\r\n\r\n if (self.options.enableResize) {\r\n _initializeResize.call(self);\r\n }\r\n }\r\n\r\n // function _initRotationControls () {\r\n // var self = this,\r\n // wrap, btnLeft, btnRight, iLeft, iRight;\r\n\r\n // wrap = document.createElement('div');\r\n // self.elements.orientationBtnLeft = btnLeft = document.createElement('button');\r\n // self.elements.orientationBtnRight = btnRight = document.createElement('button');\r\n\r\n // wrap.appendChild(btnLeft);\r\n // wrap.appendChild(btnRight);\r\n\r\n // iLeft = document.createElement('i');\r\n // iRight = document.createElement('i');\r\n // btnLeft.appendChild(iLeft);\r\n // btnRight.appendChild(iRight);\r\n\r\n // addClass(wrap, 'cr-rotate-controls');\r\n // addClass(btnLeft, 'cr-rotate-l');\r\n // addClass(btnRight, 'cr-rotate-r');\r\n\r\n // self.elements.boundary.appendChild(wrap);\r\n\r\n // btnLeft.addEventListener('click', function () {\r\n // self.rotate(-90);\r\n // });\r\n // btnRight.addEventListener('click', function () {\r\n // self.rotate(90);\r\n // });\r\n // }\r\n\r\n function _hasExif() {\r\n return this.options.enableExif && window.EXIF;\r\n }\r\n\r\n function _initializeResize () {\r\n var self = this;\r\n var wrap = document.createElement('div');\r\n var isDragging = false;\r\n var direction;\r\n var originalX;\r\n var originalY;\r\n var minSize = 50;\r\n var maxWidth;\r\n var maxHeight;\r\n var vr;\r\n var hr;\r\n\r\n addClass(wrap, 'cr-resizer');\r\n css(wrap, {\r\n width: this.options.viewport.width + 'px',\r\n height: this.options.viewport.height + 'px'\r\n });\r\n\r\n if (this.options.resizeControls.height) {\r\n vr = document.createElement('div');\r\n addClass(vr, 'cr-resizer-vertical');\r\n wrap.appendChild(vr);\r\n }\r\n\r\n if (this.options.resizeControls.width) {\r\n hr = document.createElement('div');\r\n addClass(hr, 'cr-resizer-horisontal');\r\n wrap.appendChild(hr);\r\n }\r\n\r\n function mouseDown(ev) {\r\n if (ev.button !== undefined && ev.button !== 0) return;\r\n\r\n ev.preventDefault();\r\n if (isDragging) {\r\n return;\r\n }\r\n\r\n var overlayRect = self.elements.overlay.getBoundingClientRect();\r\n\r\n isDragging = true;\r\n originalX = ev.pageX;\r\n originalY = ev.pageY;\r\n direction = ev.currentTarget.className.indexOf('vertical') !== -1 ? 'v' : 'h';\r\n maxWidth = overlayRect.width;\r\n maxHeight = overlayRect.height;\r\n\r\n if (ev.touches) {\r\n var touches = ev.touches[0];\r\n originalX = touches.pageX;\r\n originalY = touches.pageY;\r\n }\r\n\r\n window.addEventListener('mousemove', mouseMove);\r\n window.addEventListener('touchmove', mouseMove);\r\n window.addEventListener('mouseup', mouseUp);\r\n window.addEventListener('touchend', mouseUp);\r\n document.body.style[CSS_USERSELECT] = 'none';\r\n }\r\n\r\n function mouseMove(ev) {\r\n var pageX = ev.pageX;\r\n var pageY = ev.pageY;\r\n\r\n ev.preventDefault();\r\n\r\n if (ev.touches) {\r\n var touches = ev.touches[0];\r\n pageX = touches.pageX;\r\n pageY = touches.pageY;\r\n }\r\n\r\n var deltaX = pageX - originalX;\r\n var deltaY = pageY - originalY;\r\n var newHeight = self.options.viewport.height + deltaY;\r\n var newWidth = self.options.viewport.width + deltaX;\r\n\r\n if (direction === 'v' && newHeight >= minSize && newHeight <= maxHeight) {\r\n css(wrap, {\r\n height: newHeight + 'px'\r\n });\r\n\r\n self.options.boundary.height += deltaY;\r\n css(self.elements.boundary, {\r\n height: self.options.boundary.height + 'px'\r\n });\r\n\r\n self.options.viewport.height += deltaY;\r\n css(self.elements.viewport, {\r\n height: self.options.viewport.height + 'px'\r\n });\r\n }\r\n else if (direction === 'h' && newWidth >= minSize && newWidth <= maxWidth) {\r\n css(wrap, {\r\n width: newWidth + 'px'\r\n });\r\n\r\n self.options.boundary.width += deltaX;\r\n css(self.elements.boundary, {\r\n width: self.options.boundary.width + 'px'\r\n });\r\n\r\n self.options.viewport.width += deltaX;\r\n css(self.elements.viewport, {\r\n width: self.options.viewport.width + 'px'\r\n }); \r\n }\r\n\r\n _updateOverlay.call(self);\r\n _updateZoomLimits.call(self);\r\n _updateCenterPoint.call(self);\r\n _triggerUpdate.call(self);\r\n originalY = pageY;\r\n originalX = pageX;\r\n }\r\n\r\n function mouseUp() {\r\n isDragging = false;\r\n window.removeEventListener('mousemove', mouseMove);\r\n window.removeEventListener('touchmove', mouseMove);\r\n window.removeEventListener('mouseup', mouseUp);\r\n window.removeEventListener('touchend', mouseUp);\r\n document.body.style[CSS_USERSELECT] = '';\r\n }\r\n\r\n if (vr) {\r\n vr.addEventListener('mousedown', mouseDown);\r\n }\r\n\r\n if (hr) {\r\n hr.addEventListener('mousedown', mouseDown);\r\n }\r\n\r\n this.elements.boundary.appendChild(wrap);\r\n }\r\n\r\n function _setZoomerVal(v) {\r\n if (this.options.enableZoom) {\r\n var z = this.elements.zoomer,\r\n val = fix(v, 4);\r\n\r\n z.value = Math.max(z.min, Math.min(z.max, val));\r\n }\r\n }\r\n\r\n function _initializeZoom() {\r\n var self = this,\r\n wrap = self.elements.zoomerWrap = document.createElement('div'),\r\n zoomer = self.elements.zoomer = document.createElement('input');\r\n\r\n addClass(wrap, 'cr-slider-wrap');\r\n addClass(zoomer, 'cr-slider');\r\n zoomer.type = 'range';\r\n zoomer.step = '0.0001';\r\n zoomer.value = 1;\r\n zoomer.style.display = self.options.showZoomer ? '' : 'none';\r\n\r\n self.element.appendChild(wrap);\r\n wrap.appendChild(zoomer);\r\n\r\n self._currentZoom = 1;\r\n\r\n function change() {\r\n _onZoom.call(self, {\r\n value: parseFloat(zoomer.value),\r\n origin: new TransformOrigin(self.elements.preview),\r\n viewportRect: self.elements.viewport.getBoundingClientRect(),\r\n transform: Transform.parse(self.elements.preview)\r\n });\r\n }\r\n\r\n function scroll(ev) {\r\n var delta, targetZoom;\r\n\r\n if (ev.wheelDelta) {\r\n delta = ev.wheelDelta / 1200; //wheelDelta min: -120 max: 120 // max x 10 x 2\r\n } else if (ev.deltaY) {\r\n delta = ev.deltaY / 1060; //deltaY min: -53 max: 53 // max x 10 x 2\r\n } else if (ev.detail) {\r\n delta = ev.detail / -60; //delta min: -3 max: 3 // max x 10 x 2\r\n } else {\r\n delta = 0;\r\n }\r\n\r\n targetZoom = self._currentZoom + (delta * self._currentZoom);\r\n\r\n ev.preventDefault();\r\n _setZoomerVal.call(self, targetZoom);\r\n change.call(self);\r\n }\r\n\r\n self.elements.zoomer.addEventListener('input', change);// this is being fired twice on keypress\r\n self.elements.zoomer.addEventListener('change', change);\r\n\r\n if (self.options.mouseWheelZoom) {\r\n self.elements.boundary.addEventListener('mousewheel', scroll);\r\n self.elements.boundary.addEventListener('DOMMouseScroll', scroll);\r\n }\r\n }\r\n\r\n function _onZoom(ui) {\r\n var self = this,\r\n transform = ui ? ui.transform : Transform.parse(self.elements.preview),\r\n vpRect = ui ? ui.viewportRect : self.elements.viewport.getBoundingClientRect(),\r\n origin = ui ? ui.origin : new TransformOrigin(self.elements.preview);\r\n\r\n function applyCss() {\r\n var transCss = {};\r\n transCss[CSS_TRANSFORM] = transform.toString();\r\n transCss[CSS_TRANS_ORG] = origin.toString();\r\n css(self.elements.preview, transCss);\r\n }\r\n\r\n self._currentZoom = ui ? ui.value : self._currentZoom;\r\n transform.scale = self._currentZoom;\r\n applyCss();\r\n\r\n if (self.options.enforceBoundary) {\r\n var boundaries = _getVirtualBoundaries.call(self, vpRect),\r\n transBoundaries = boundaries.translate,\r\n oBoundaries = boundaries.origin;\r\n\r\n if (transform.x >= transBoundaries.maxX) {\r\n origin.x = oBoundaries.minX;\r\n transform.x = transBoundaries.maxX;\r\n }\r\n\r\n if (transform.x <= transBoundaries.minX) {\r\n origin.x = oBoundaries.maxX;\r\n transform.x = transBoundaries.minX;\r\n }\r\n\r\n if (transform.y >= transBoundaries.maxY) {\r\n origin.y = oBoundaries.minY;\r\n transform.y = transBoundaries.maxY;\r\n }\r\n\r\n if (transform.y <= transBoundaries.minY) {\r\n origin.y = oBoundaries.maxY;\r\n transform.y = transBoundaries.minY;\r\n }\r\n }\r\n applyCss();\r\n _debouncedOverlay.call(self);\r\n _triggerUpdate.call(self);\r\n }\r\n\r\n function _getVirtualBoundaries(viewport) {\r\n var self = this,\r\n scale = self._currentZoom,\r\n vpWidth = viewport.width,\r\n vpHeight = viewport.height,\r\n centerFromBoundaryX = self.elements.boundary.clientWidth / 2,\r\n centerFromBoundaryY = self.elements.boundary.clientHeight / 2,\r\n imgRect = self.elements.preview.getBoundingClientRect(),\r\n curImgWidth = imgRect.width,\r\n curImgHeight = imgRect.height,\r\n halfWidth = vpWidth / 2,\r\n halfHeight = vpHeight / 2;\r\n\r\n var maxX = ((halfWidth / scale) - centerFromBoundaryX) * -1;\r\n var minX = maxX - ((curImgWidth * (1 / scale)) - (vpWidth * (1 / scale)));\r\n\r\n var maxY = ((halfHeight / scale) - centerFromBoundaryY) * -1;\r\n var minY = maxY - ((curImgHeight * (1 / scale)) - (vpHeight * (1 / scale)));\r\n\r\n var originMinX = (1 / scale) * halfWidth;\r\n var originMaxX = (curImgWidth * (1 / scale)) - originMinX;\r\n\r\n var originMinY = (1 / scale) * halfHeight;\r\n var originMaxY = (curImgHeight * (1 / scale)) - originMinY;\r\n\r\n return {\r\n translate: {\r\n maxX: maxX,\r\n minX: minX,\r\n maxY: maxY,\r\n minY: minY\r\n },\r\n origin: {\r\n maxX: originMaxX,\r\n minX: originMinX,\r\n maxY: originMaxY,\r\n minY: originMinY\r\n }\r\n };\r\n }\r\n\r\n function _updateCenterPoint() {\r\n var self = this,\r\n scale = self._currentZoom,\r\n data = self.elements.preview.getBoundingClientRect(),\r\n vpData = self.elements.viewport.getBoundingClientRect(),\r\n transform = Transform.parse(self.elements.preview.style[CSS_TRANSFORM]),\r\n pc = new TransformOrigin(self.elements.preview),\r\n top = (vpData.top - data.top) + (vpData.height / 2),\r\n left = (vpData.left - data.left) + (vpData.width / 2),\r\n center = {},\r\n adj = {};\r\n\r\n center.y = top / scale;\r\n center.x = left / scale;\r\n\r\n adj.y = (center.y - pc.y) * (1 - scale);\r\n adj.x = (center.x - pc.x) * (1 - scale);\r\n\r\n transform.x -= adj.x;\r\n transform.y -= adj.y;\r\n\r\n var newCss = {};\r\n newCss[CSS_TRANS_ORG] = center.x + 'px ' + center.y + 'px';\r\n newCss[CSS_TRANSFORM] = transform.toString();\r\n css(self.elements.preview, newCss);\r\n }\r\n\r\n function _initDraggable() {\r\n var self = this,\r\n isDragging = false,\r\n originalX,\r\n originalY,\r\n originalDistance,\r\n vpRect,\r\n transform;\r\n\r\n function assignTransformCoordinates(deltaX, deltaY) {\r\n var imgRect = self.elements.preview.getBoundingClientRect(),\r\n top = transform.y + deltaY,\r\n left = transform.x + deltaX;\r\n\r\n if (self.options.enforceBoundary) {\r\n if (vpRect.top > imgRect.top + deltaY && vpRect.bottom < imgRect.bottom + deltaY) {\r\n transform.y = top;\r\n }\r\n\r\n if (vpRect.left > imgRect.left + deltaX && vpRect.right < imgRect.right + deltaX) {\r\n transform.x = left;\r\n }\r\n }\r\n else {\r\n transform.y = top;\r\n transform.x = left;\r\n }\r\n }\r\n\r\n function keyDown(ev) {\r\n var LEFT_ARROW = 37,\r\n UP_ARROW = 38,\r\n RIGHT_ARROW = 39,\r\n DOWN_ARROW = 40;\r\n\r\n if (ev.shiftKey && (ev.keyCode == UP_ARROW || ev.keyCode == DOWN_ARROW)) {\r\n var zoom = 0.0;\r\n if (ev.keyCode == UP_ARROW) {\r\n zoom = parseFloat(self.elements.zoomer.value, 10) + parseFloat(self.elements.zoomer.step, 10)\r\n }\r\n else {\r\n zoom = parseFloat(self.elements.zoomer.value, 10) - parseFloat(self.elements.zoomer.step, 10)\r\n }\r\n self.setZoom(zoom);\r\n }\r\n else if (self.options.enableKeyMovement && (ev.keyCode >= 37 && ev.keyCode <= 40)) {\r\n ev.preventDefault();\r\n var movement = parseKeyDown(ev.keyCode);\r\n\r\n transform = Transform.parse(self.elements.preview);\r\n document.body.style[CSS_USERSELECT] = 'none';\r\n vpRect = self.elements.viewport.getBoundingClientRect();\r\n keyMove(movement);\r\n };\r\n\r\n function parseKeyDown(key) {\r\n switch (key) {\r\n case LEFT_ARROW:\r\n return [1, 0];\r\n case UP_ARROW:\r\n return [0, 1];\r\n case RIGHT_ARROW:\r\n return [-1, 0];\r\n case DOWN_ARROW:\r\n return [0, -1];\r\n };\r\n };\r\n }\r\n\r\n function keyMove(movement) {\r\n var deltaX = movement[0],\r\n deltaY = movement[1],\r\n newCss = {};\r\n\r\n assignTransformCoordinates(deltaX, deltaY);\r\n\r\n newCss[CSS_TRANSFORM] = transform.toString();\r\n css(self.elements.preview, newCss);\r\n _updateOverlay.call(self);\r\n document.body.style[CSS_USERSELECT] = '';\r\n _updateCenterPoint.call(self);\r\n _triggerUpdate.call(self);\r\n originalDistance = 0;\r\n }\r\n\r\n function mouseDown(ev) {\r\n if (ev.button !== undefined && ev.button !== 0) return;\r\n\r\n ev.preventDefault();\r\n if (isDragging) return;\r\n isDragging = true;\r\n originalX = ev.pageX;\r\n originalY = ev.pageY;\r\n\r\n if (ev.touches) {\r\n var touches = ev.touches[0];\r\n originalX = touches.pageX;\r\n originalY = touches.pageY;\r\n }\r\n\r\n transform = Transform.parse(self.elements.preview);\r\n window.addEventListener('mousemove', mouseMove);\r\n window.addEventListener('touchmove', mouseMove);\r\n window.addEventListener('mouseup', mouseUp);\r\n window.addEventListener('touchend', mouseUp);\r\n document.body.style[CSS_USERSELECT] = 'none';\r\n vpRect = self.elements.viewport.getBoundingClientRect();\r\n }\r\n\r\n function mouseMove(ev) {\r\n ev.preventDefault();\r\n var pageX = ev.pageX,\r\n pageY = ev.pageY;\r\n\r\n if (ev.touches) {\r\n var touches = ev.touches[0];\r\n pageX = touches.pageX;\r\n pageY = touches.pageY;\r\n }\r\n\r\n var deltaX = pageX - originalX,\r\n deltaY = pageY - originalY,\r\n newCss = {};\r\n\r\n if (ev.type == 'touchmove') {\r\n if (ev.touches.length > 1) {\r\n var touch1 = ev.touches[0];\r\n var touch2 = ev.touches[1];\r\n var dist = Math.sqrt((touch1.pageX - touch2.pageX) * (touch1.pageX - touch2.pageX) + (touch1.pageY - touch2.pageY) * (touch1.pageY - touch2.pageY));\r\n\r\n if (!originalDistance) {\r\n originalDistance = dist / self._currentZoom;\r\n }\r\n\r\n var scale = dist / originalDistance;\r\n\r\n _setZoomerVal.call(self, scale);\r\n dispatchChange(self.elements.zoomer);\r\n return;\r\n }\r\n }\r\n\r\n assignTransformCoordinates(deltaX, deltaY);\r\n\r\n newCss[CSS_TRANSFORM] = transform.toString();\r\n css(self.elements.preview, newCss);\r\n _updateOverlay.call(self);\r\n originalY = pageY;\r\n originalX = pageX;\r\n }\r\n\r\n function mouseUp() {\r\n isDragging = false;\r\n window.removeEventListener('mousemove', mouseMove);\r\n window.removeEventListener('touchmove', mouseMove);\r\n window.removeEventListener('mouseup', mouseUp);\r\n window.removeEventListener('touchend', mouseUp);\r\n document.body.style[CSS_USERSELECT] = '';\r\n _updateCenterPoint.call(self);\r\n _triggerUpdate.call(self);\r\n originalDistance = 0;\r\n }\r\n\r\n self.elements.overlay.addEventListener('mousedown', mouseDown);\r\n self.elements.viewport.addEventListener('keydown', keyDown);\r\n self.elements.overlay.addEventListener('touchstart', mouseDown);\r\n }\r\n\r\n function _updateOverlay() {\r\n var self = this,\r\n boundRect = self.elements.boundary.getBoundingClientRect(),\r\n imgData = self.elements.preview.getBoundingClientRect();\r\n\r\n css(self.elements.overlay, {\r\n width: imgData.width + 'px',\r\n height: imgData.height + 'px',\r\n top: (imgData.top - boundRect.top) + 'px',\r\n left: (imgData.left - boundRect.left) + 'px'\r\n });\r\n }\r\n var _debouncedOverlay = debounce(_updateOverlay, 500);\r\n\r\n function _triggerUpdate() {\r\n var self = this,\r\n data = self.get(),\r\n ev;\r\n\r\n if (!_isVisible.call(self)) {\r\n return;\r\n }\r\n\r\n self.options.update.call(self, data);\r\n if (self.$ && typeof Prototype == 'undefined') {\r\n self.$(self.element).trigger('update', data); \r\n }\r\n else {\r\n var ev;\r\n if (window.CustomEvent) {\r\n ev = new CustomEvent('update', { detail: data });\r\n } else {\r\n ev = document.createEvent('CustomEvent');\r\n ev.initCustomEvent('update', true, true, data);\r\n }\r\n\r\n self.element.dispatchEvent(ev);\r\n }\r\n }\r\n\r\n function _isVisible() {\r\n return this.elements.preview.offsetHeight > 0 && this.elements.preview.offsetWidth > 0;\r\n }\r\n\r\n function _updatePropertiesFromImage() {\r\n var self = this,\r\n initialZoom = 1,\r\n cssReset = {},\r\n img = self.elements.preview,\r\n imgData = self.elements.preview.getBoundingClientRect(),\r\n transformReset = new Transform(0, 0, initialZoom),\r\n originReset = new TransformOrigin(),\r\n isVisible = _isVisible.call(self);\r\n\r\n if (!isVisible || self.data.bound) {\r\n // if the croppie isn't visible or it doesn't need binding\r\n return;\r\n }\r\n\r\n self.data.bound = true;\r\n cssReset[CSS_TRANSFORM] = transformReset.toString();\r\n cssReset[CSS_TRANS_ORG] = originReset.toString();\r\n cssReset['opacity'] = 1;\r\n css(img, cssReset);\r\n\r\n self._originalImageWidth = imgData.width;\r\n self._originalImageHeight = imgData.height;\r\n\r\n if (self.options.enableZoom) {\r\n _updateZoomLimits.call(self, true);\r\n }\r\n else {\r\n self._currentZoom = initialZoom;\r\n }\r\n\r\n transformReset.scale = self._currentZoom;\r\n cssReset[CSS_TRANSFORM] = transformReset.toString();\r\n css(img, cssReset);\r\n\r\n if (self.data.points.length) {\r\n _bindPoints.call(self, self.data.points);\r\n }\r\n else {\r\n _centerImage.call(self);\r\n }\r\n\r\n _updateCenterPoint.call(self);\r\n _updateOverlay.call(self);\r\n }\r\n\r\n function _updateZoomLimits (initial) {\r\n var self = this,\r\n minZoom = 0,\r\n maxZoom = 1.5,\r\n initialZoom,\r\n defaultInitialZoom,\r\n zoomer = self.elements.zoomer,\r\n scale = parseFloat(zoomer.value),\r\n boundaryData = self.elements.boundary.getBoundingClientRect(),\r\n imgData = self.elements.preview.getBoundingClientRect(),\r\n vpData = self.elements.viewport.getBoundingClientRect(),\r\n minW,\r\n minH;\r\n\r\n if (self.options.enforceBoundary) {\r\n minW = vpData.width / (initial ? imgData.width : imgData.width / scale);\r\n minH = vpData.height / (initial ? imgData.height : imgData.height / scale);\r\n minZoom = Math.max(minW, minH);\r\n }\r\n\r\n if (minZoom >= maxZoom) {\r\n maxZoom = minZoom + 1;\r\n }\r\n\r\n zoomer.min = fix(minZoom, 4);\r\n zoomer.max = fix(maxZoom, 4);\r\n\r\n if (initial) {\r\n defaultInitialZoom = Math.max((boundaryData.width / imgData.width), (boundaryData.height / imgData.height));\r\n initialZoom = self.data.boundZoom !== null ? self.data.boundZoom : defaultInitialZoom;\r\n _setZoomerVal.call(self, initialZoom);\r\n }\r\n\r\n dispatchChange(zoomer);\r\n }\r\n\r\n function _bindPoints(points) {\r\n if (points.length != 4) {\r\n throw \"Croppie - Invalid number of points supplied: \" + points;\r\n }\r\n var self = this,\r\n pointsWidth = points[2] - points[0],\r\n // pointsHeight = points[3] - points[1],\r\n vpData = self.elements.viewport.getBoundingClientRect(),\r\n boundRect = self.elements.boundary.getBoundingClientRect(),\r\n vpOffset = {\r\n left: vpData.left - boundRect.left,\r\n top: vpData.top - boundRect.top\r\n },\r\n scale = vpData.width / pointsWidth,\r\n originTop = points[1],\r\n originLeft = points[0],\r\n transformTop = (-1 * points[1]) + vpOffset.top,\r\n transformLeft = (-1 * points[0]) + vpOffset.left,\r\n newCss = {};\r\n\r\n newCss[CSS_TRANS_ORG] = originLeft + 'px ' + originTop + 'px';\r\n newCss[CSS_TRANSFORM] = new Transform(transformLeft, transformTop, scale).toString();\r\n css(self.elements.preview, newCss);\r\n\r\n _setZoomerVal.call(self, scale);\r\n self._currentZoom = scale;\r\n }\r\n\r\n function _centerImage() {\r\n var self = this,\r\n imgDim = self.elements.preview.getBoundingClientRect(),\r\n vpDim = self.elements.viewport.getBoundingClientRect(),\r\n boundDim = self.elements.boundary.getBoundingClientRect(),\r\n vpLeft = vpDim.left - boundDim.left,\r\n vpTop = vpDim.top - boundDim.top,\r\n w = vpLeft - ((imgDim.width - vpDim.width) / 2),\r\n h = vpTop - ((imgDim.height - vpDim.height) / 2),\r\n transform = new Transform(w, h, self._currentZoom);\r\n\r\n css(self.elements.preview, CSS_TRANSFORM, transform.toString());\r\n }\r\n\r\n function _transferImageToCanvas(customOrientation) {\r\n var self = this,\r\n canvas = self.elements.canvas,\r\n img = self.elements.img,\r\n ctx = canvas.getContext('2d'),\r\n exif = _hasExif.call(self),\r\n customOrientation = self.options.enableOrientation && customOrientation;\r\n\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n canvas.width = img.width;\r\n canvas.height = img.height;\r\n\r\n if (exif && !customOrientation) {\r\n var orientation = getExifOrientation(img);\r\n drawCanvas(canvas, img, num(orientation || 0, 10));\r\n } \r\n else if (customOrientation) {\r\n drawCanvas(canvas, img, customOrientation);\r\n }\r\n }\r\n\r\n function _getCanvas(data) {\r\n var self = this,\r\n points = data.points,\r\n left = num(points[0]),\r\n top = num(points[1]),\r\n right = num(points[2]),\r\n bottom = num(points[3]),\r\n width = right-left,\r\n height = bottom-top,\r\n circle = data.circle,\r\n canvas = document.createElement('canvas'),\r\n ctx = canvas.getContext('2d'),\r\n outWidth = width,\r\n outHeight = height,\r\n startX = 0,\r\n startY = 0,\r\n canvasWidth = outWidth,\r\n canvasHeight = outHeight,\r\n customDimensions = (data.outputWidth && data.outputHeight),\r\n outputRatio = 1;\r\n\r\n if (customDimensions) {\r\n canvasWidth = data.outputWidth;\r\n canvasHeight = data.outputHeight;\r\n outputRatio = canvasWidth / outWidth;\r\n }\r\n\r\n canvas.width = canvasWidth;\r\n canvas.height = canvasHeight;\r\n\r\n if (data.backgroundColor) {\r\n ctx.fillStyle = data.backgroundColor;\r\n ctx.fillRect(0, 0, outWidth, outHeight);\r\n }\r\n\r\n // start fixing data to send to draw image for enforceBoundary: false\r\n if (!self.options.enforceBoundary) {\r\n if (left < 0) {\r\n startX = Math.abs(left);\r\n left = 0;\r\n }\r\n if (top < 0) {\r\n startY = Math.abs(top);\r\n top = 0;\r\n }\r\n if (right > self._originalImageWidth) {\r\n width = self._originalImageWidth - left;\r\n outWidth = width;\r\n }\r\n if (bottom > self._originalImageHeight) {\r\n height = self._originalImageHeight - top;\r\n outHeight = height;\r\n }\r\n }\r\n\r\n if (outputRatio !== 1) {\r\n startX *= outputRatio;\r\n startY *= outputRatio;\r\n outWidth *= outputRatio;\r\n outHeight *= outputRatio;\r\n }\r\n\r\n ctx.drawImage(this.elements.preview, left, top, Math.min(width, self._originalImageWidth), Math.min(height, self._originalImageHeight), startX, startY, outWidth, outHeight);\r\n if (circle) {\r\n ctx.fillStyle = '#fff';\r\n ctx.globalCompositeOperation = 'destination-in';\r\n ctx.beginPath();\r\n ctx.arc(outWidth / 2, outHeight / 2, outWidth / 2, 0, Math.PI * 2, true);\r\n ctx.closePath();\r\n ctx.fill();\r\n }\r\n return canvas;\r\n }\r\n\r\n function _getHtmlResult(data) {\r\n var points = data.points,\r\n div = document.createElement('div'),\r\n img = document.createElement('img'),\r\n width = points[2] - points[0],\r\n height = points[3] - points[1];\r\n\r\n addClass(div, 'croppie-result');\r\n div.appendChild(img);\r\n css(img, {\r\n left: (-1 * points[0]) + 'px',\r\n top: (-1 * points[1]) + 'px'\r\n });\r\n img.src = data.url;\r\n css(div, {\r\n width: width + 'px',\r\n height: height + 'px'\r\n });\r\n\r\n return div;\r\n }\r\n\r\n function _getBase64Result(data) {\r\n return _getCanvas.call(this, data).toDataURL(data.format, data.quality);\r\n }\r\n\r\n function _getBlobResult(data) {\r\n var self = this;\r\n return new Promise(function (resolve, reject) {\r\n _getCanvas.call(self, data).toBlob(function (blob) {\r\n resolve(blob);\r\n }, data.format, data.quality);\r\n });\r\n }\r\n\r\n function _bind(options, cb) {\r\n var self = this,\r\n url,\r\n points = [],\r\n zoom = null,\r\n hasExif = _hasExif.call(self);;\r\n\r\n if (typeof (options) === 'string') {\r\n url = options;\r\n options = {};\r\n }\r\n else if (Array.isArray(options)) {\r\n points = options.slice();\r\n }\r\n else if (typeof (options) == 'undefined' && self.data.url) { //refreshing\r\n _updatePropertiesFromImage.call(self);\r\n _triggerUpdate.call(self);\r\n return null;\r\n }\r\n else {\r\n url = options.url;\r\n points = options.points || [];\r\n zoom = typeof(options.zoom) === 'undefined' ? null : options.zoom;\r\n }\r\n\r\n self.data.bound = false;\r\n self.data.url = url || self.data.url;\r\n self.data.boundZoom = zoom;\r\n\r\n return loadImage(url, self.elements.img, hasExif).then(function (img) {\r\n if (!points.length) {\r\n var natDim = naturalImageDimensions(img);\r\n var rect = self.elements.viewport.getBoundingClientRect();\r\n var aspectRatio = rect.width / rect.height;\r\n var imgAspectRatio = natDim.width / natDim.height;\r\n var width, height;\r\n\r\n if (imgAspectRatio > aspectRatio) {\r\n height = natDim.height;\r\n width = height * aspectRatio;\r\n }\r\n else {\r\n width = natDim.width;\r\n height = width / aspectRatio;\r\n }\r\n\r\n var x0 = (natDim.width - width) / 2;\r\n var y0 = (natDim.height - height) / 2;\r\n var x1 = x0 + width;\r\n var y1 = y0 + height;\r\n\r\n self.data.points = [x0, y0, x1, y1];\r\n } \r\n else if (self.options.relative) {\r\n points = [\r\n points[0] * img.naturalWidth / 100,\r\n points[1] * img.naturalHeight / 100,\r\n points[2] * img.naturalWidth / 100,\r\n points[3] * img.naturalHeight / 100\r\n ];\r\n }\r\n\r\n self.data.points = points.map(function (p) {\r\n return parseFloat(p);\r\n });\r\n if (self.options.useCanvas) {\r\n _transferImageToCanvas.call(self, options.orientation || 1);\r\n }\r\n _updatePropertiesFromImage.call(self);\r\n _triggerUpdate.call(self);\r\n cb && cb();\r\n });\r\n }\r\n\r\n function fix(v, decimalPoints) {\r\n return parseFloat(v).toFixed(decimalPoints || 0);\r\n }\r\n\r\n function _get() {\r\n var self = this,\r\n imgData = self.elements.preview.getBoundingClientRect(),\r\n vpData = self.elements.viewport.getBoundingClientRect(),\r\n x1 = vpData.left - imgData.left,\r\n y1 = vpData.top - imgData.top,\r\n widthDiff = (vpData.width - self.elements.viewport.offsetWidth) / 2, //border\r\n heightDiff = (vpData.height - self.elements.viewport.offsetHeight) / 2,\r\n x2 = x1 + self.elements.viewport.offsetWidth + widthDiff,\r\n y2 = y1 + self.elements.viewport.offsetHeight + heightDiff,\r\n scale = self._currentZoom;\r\n\r\n if (scale === Infinity || isNaN(scale)) {\r\n scale = 1;\r\n }\r\n\r\n var max = self.options.enforceBoundary ? 0 : Number.NEGATIVE_INFINITY;\r\n x1 = Math.max(max, x1 / scale);\r\n y1 = Math.max(max, y1 / scale);\r\n x2 = Math.max(max, x2 / scale);\r\n y2 = Math.max(max, y2 / scale);\r\n\r\n return {\r\n points: [fix(x1), fix(y1), fix(x2), fix(y2)],\r\n zoom: scale\r\n };\r\n }\r\n\r\n var RESULT_DEFAULTS = {\r\n type: 'canvas',\r\n format: 'png',\r\n quality: 1\r\n },\r\n RESULT_FORMATS = ['jpeg', 'webp', 'png'];\r\n\r\n function _result(options) {\r\n var self = this,\r\n data = _get.call(self),\r\n opts = deepExtend(RESULT_DEFAULTS, deepExtend({}, options)),\r\n resultType = (typeof (options) === 'string' ? options : (opts.type || 'base64')),\r\n size = opts.size || 'viewport',\r\n format = opts.format,\r\n quality = opts.quality,\r\n backgroundColor = opts.backgroundColor,\r\n circle = typeof opts.circle === 'boolean' ? opts.circle : (self.options.viewport.type === 'circle'),\r\n vpRect = self.elements.viewport.getBoundingClientRect(),\r\n ratio = vpRect.width / vpRect.height,\r\n prom;\r\n\r\n if (size === 'viewport') {\r\n data.outputWidth = vpRect.width;\r\n data.outputHeight = vpRect.height;\r\n } else if (typeof size === 'object') {\r\n if (size.width && size.height) {\r\n data.outputWidth = size.width;\r\n data.outputHeight = size.height;\r\n } else if (size.width) {\r\n data.outputWidth = size.width;\r\n data.outputHeight = size.width / ratio;\r\n } else if (size.height) {\r\n data.outputWidth = size.height * ratio;\r\n data.outputHeight = size.height;\r\n }\r\n }\r\n\r\n if (RESULT_FORMATS.indexOf(format) > -1) {\r\n data.format = 'image/' + format;\r\n data.quality = quality;\r\n }\r\n\r\n data.circle = circle;\r\n data.url = self.data.url;\r\n data.backgroundColor = backgroundColor;\r\n\r\n prom = new Promise(function (resolve, reject) {\r\n switch(resultType.toLowerCase())\r\n {\r\n case 'rawcanvas':\r\n resolve(_getCanvas.call(self, data));\r\n break;\r\n case 'canvas':\r\n case 'base64':\r\n resolve(_getBase64Result.call(self, data));\r\n break;\r\n case 'blob':\r\n _getBlobResult.call(self, data).then(resolve);\r\n break;\r\n default:\r\n resolve(_getHtmlResult.call(self, data));\r\n break;\r\n }\r\n });\r\n return prom;\r\n }\r\n\r\n function _refresh() {\r\n _updatePropertiesFromImage.call(this);\r\n }\r\n\r\n function _rotate(deg) {\r\n if (!this.options.useCanvas) {\r\n throw 'Croppie: Cannot rotate without enableOrientation';\r\n }\r\n\r\n var self = this,\r\n canvas = self.elements.canvas,\r\n copy = document.createElement('canvas'),\r\n ornt = 1;\r\n\r\n copy.width = canvas.width;\r\n copy.height = canvas.height;\r\n var ctx = copy.getContext('2d');\r\n ctx.drawImage(canvas, 0, 0);\r\n\r\n if (deg === 90 || deg === -270) ornt = 6;\r\n if (deg === -90 || deg === 270) ornt = 8;\r\n if (deg === 180 || deg === -180) ornt = 3;\r\n\r\n drawCanvas(canvas, copy, ornt);\r\n _onZoom.call(self);\r\n copy = null;\r\n }\r\n\r\n function _destroy() {\r\n var self = this;\r\n self.element.removeChild(self.elements.boundary);\r\n removeClass(self.element, 'croppie-container');\r\n if (self.options.enableZoom) {\r\n self.element.removeChild(self.elements.zoomerWrap);\r\n }\r\n delete self.elements;\r\n }\r\n\r\n if (window.jQuery) {\r\n var $ = window.jQuery;\r\n $.fn.croppie = function (opts) {\r\n var ot = typeof opts;\r\n\r\n if (ot === 'string') {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n var singleInst = $(this).data('croppie');\r\n\r\n if (opts === 'get') {\r\n return singleInst.get();\r\n }\r\n else if (opts === 'result') {\r\n return singleInst.result.apply(singleInst, args);\r\n }\r\n else if (opts === 'bind') {\r\n return singleInst.bind.apply(singleInst, args);\r\n }\r\n\r\n return this.each(function () {\r\n var i = $(this).data('croppie');\r\n if (!i) return;\r\n\r\n var method = i[opts];\r\n if ($.isFunction(method)) {\r\n method.apply(i, args);\r\n if (opts === 'destroy') {\r\n $(this).removeData('croppie');\r\n }\r\n }\r\n else {\r\n throw 'Croppie ' + opts + ' method not found';\r\n }\r\n });\r\n }\r\n else {\r\n return this.each(function () {\r\n var i = new Croppie(this, opts);\r\n i.$ = $;\r\n $(this).data('croppie', i);\r\n });\r\n }\r\n };\r\n }\r\n\r\n function Croppie(element, opts) {\r\n this.element = element;\r\n this.options = deepExtend(deepExtend({}, Croppie.defaults), opts);\r\n\r\n if (this.element.tagName.toLowerCase() === 'img') {\r\n var origImage = this.element;\r\n addClass(origImage, 'cr-original-image');\r\n var replacementDiv = document.createElement('div');\r\n this.element.parentNode.appendChild(replacementDiv);\r\n replacementDiv.appendChild(origImage);\r\n this.element = replacementDiv;\r\n this.options.url = this.options.url || origImage.src;\r\n }\r\n\r\n _create.call(this);\r\n if (this.options.url) {\r\n var bindOpts = {\r\n url: this.options.url,\r\n points: this.options.points\r\n };\r\n delete this.options['url'];\r\n delete this.options['points'];\r\n _bind.call(this, bindOpts);\r\n }\r\n }\r\n\r\n Croppie.defaults = {\r\n viewport: {\r\n width: 100,\r\n height: 100,\r\n type: 'square'\r\n },\r\n boundary: { },\r\n orientationControls: {\r\n enabled: true,\r\n leftClass: '',\r\n rightClass: ''\r\n },\r\n resizeControls: {\r\n width: true,\r\n height: true\r\n },\r\n customClass: '',\r\n showZoomer: true,\r\n enableZoom: true,\r\n enableResize: false,\r\n mouseWheelZoom: true,\r\n enableExif: false,\r\n enforceBoundary: true,\r\n enableOrientation: false,\r\n enableKeyMovement: true,\r\n update: function () { }\r\n };\r\n\r\n Croppie.globals = {\r\n translate: 'translate3d'\r\n };\r\n\r\n deepExtend(Croppie.prototype, {\r\n bind: function (options, cb) {\r\n return _bind.call(this, options, cb);\r\n },\r\n get: function () {\r\n var data = _get.call(this);\r\n var points = data.points;\r\n if (this.options.relative) {\r\n points[0] /= this.elements.img.naturalWidth / 100;\r\n points[1] /= this.elements.img.naturalHeight / 100;\r\n points[2] /= this.elements.img.naturalWidth / 100;\r\n points[3] /= this.elements.img.naturalHeight / 100;\r\n }\r\n return data;\r\n },\r\n result: function (type) {\r\n return _result.call(this, type);\r\n },\r\n refresh: function () {\r\n return _refresh.call(this);\r\n },\r\n setZoom: function (v) {\r\n _setZoomerVal.call(this, v);\r\n dispatchChange(this.elements.zoomer);\r\n },\r\n rotate: function (deg) {\r\n _rotate.call(this, deg);\r\n },\r\n destroy: function () {\r\n return _destroy.call(this);\r\n }\r\n });\r\n\r\n exports.Croppie = window.Croppie = Croppie;\r\n\r\n if (typeof module === 'object' && !!module.exports) {\r\n module.exports = Croppie;\r\n }\r\n}));\r\n","/**\n * autoNumeric.js\n * @author: Bob Knothe\n * @author: Sokolov Yura\n * @version: 1.9.43 - 2015-12-19 GMT 4:00 PM / 16:00\n *\n * Created by Robert J. Knothe on 2010-10-25. Please report any bugs to https://github.com/BobKnothe/autoNumeric\n * Contributor by Sokolov Yura on 2010-11-07\n *\n * Copyright (c) 2011 Robert J. Knothe http://www.decorplanit.com/plugin/\n *\n * The MIT License (http://www.opensource.org/licenses/mit-license.php)\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n(function (factory) {\n if (typeof define === \"function\" && define.amd) {\n /** AMD. Register as an anonymous module. */\n define([\"jquery\"], factory);\n } else if (typeof module === \"object\" && module.exports) {\n /** Node/CommonJS */\n module.exports = factory(require(\"jquery\"));\n } else {\n /** Browser globals */\n factory(window.jQuery);\n }\n}(function ($) {\n \"use strict\";\n /*jslint browser: true*/\n /*global jQuery: false*/\n /*Cross browser routine for getting selected range/cursor position\n */\n\n /**\n * Cross browser routine for getting selected range/cursor position\n */\n\n function getElementSelection(that) {\n var position = {};\n if (that.selectionStart === undefined) {\n that.focus();\n var select = document.selection.createRange();\n position.length = select.text.length;\n select.moveStart('character', -that.value.length);\n position.end = select.text.length;\n position.start = position.end - position.length;\n } else {\n position.start = that.selectionStart;\n position.end = that.selectionEnd;\n position.length = position.end - position.start;\n }\n return position;\n }\n\n /**\n * Cross browser routine for setting selected range/cursor position\n */\n\n function setElementSelection(that, start, end) {\n if (that.selectionStart === undefined) {\n that.focus();\n var r = that.createTextRange();\n r.collapse(true);\n r.moveEnd('character', end);\n r.moveStart('character', start);\n r.select();\n } else {\n that.selectionStart = start;\n that.selectionEnd = end;\n }\n }\n\n /**\n * run callbacks in parameters if any\n * any parameter could be a callback:\n * - a function, which invoked with jQuery element, parameters and this parameter name and returns parameter value\n * - a name of function, attached to $(selector).autoNumeric.functionName(){} - which was called previously\n */\n\n function runCallbacks($this, settings) {\n /**\n * loops through the settings object (option array) to find the following\n * k = option name example k=aNum\n * val = option value example val=0123456789\n */\n $.each(settings, function (k, val) {\n if (typeof val === 'function') {\n settings[k] = val($this, settings, k);\n } else if (typeof $this.autoNumeric[val] === 'function') {\n /**\n * calls the attached function from the html5 data example: data-a-sign=\"functionName\"\n */\n settings[k] = $this.autoNumeric[val]($this, settings, k);\n }\n });\n }\n\n /**\n * Converts the vMin, vMax & mDec string to numeric value\n */\n\n function convertKeyToNumber(settings, key) {\n if (typeof(settings[key]) === 'string') {\n settings[key] *= 1;\n }\n }\n\n /**\n * Preparing user defined options for further usage\n * merge them with defaults appropriately\n */\n\n function autoCode($this, settings) {\n runCallbacks($this, settings);\n settings.tagList = ['b', 'caption', 'cite', 'code', 'dd', 'del', 'div', 'dfn', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ins', 'kdb', 'label', 'li', 'output', 'p', 'q', 's', 'sample', 'span', 'strong', 'td', 'th', 'u', 'var'];\n var vmax = settings.vMax.toString().split('.'),\n vmin = (!settings.vMin && settings.vMin !== 0) ? [] : settings.vMin.toString().split('.');\n convertKeyToNumber(settings, 'vMax');\n convertKeyToNumber(settings, 'vMin');\n convertKeyToNumber(settings, 'mDec'); /** set mDec if not defined by user */\n settings.mDec = (settings.mRound === 'CHF') ? '2' : settings.mDec;\n settings.allowLeading = true;\n settings.aNeg = settings.vMin < 0 ? '-' : '';\n vmax[0] = vmax[0].replace('-', '');\n vmin[0] = vmin[0].replace('-', '');\n settings.mInt = Math.max(vmax[0].length, vmin[0].length, 1);\n if (settings.mDec === null) {\n var vmaxLength = 0,\n vminLength = 0;\n if (vmax[1]) {\n vmaxLength = vmax[1].length;\n }\n if (vmin[1]) {\n vminLength = vmin[1].length;\n }\n settings.mDec = Math.max(vmaxLength, vminLength);\n } /** set alternative decimal separator key */\n if (settings.altDec === null && settings.mDec > 0) {\n if (settings.aDec === '.' && settings.aSep !== ',') {\n settings.altDec = ',';\n } else if (settings.aDec === ',' && settings.aSep !== '.') {\n settings.altDec = '.';\n }\n }\n /** cache regexps for autoStrip */\n var aNegReg = settings.aNeg ? '([-\\\\' + settings.aNeg + ']?)' : '(-?)';\n settings.aNegRegAutoStrip = aNegReg;\n settings.skipFirstAutoStrip = new RegExp(aNegReg + '[^-' + (settings.aNeg ? '\\\\' + settings.aNeg : '') + '\\\\' + settings.aDec + '\\\\d]' + '.*?(\\\\d|\\\\' + settings.aDec + '\\\\d)');\n settings.skipLastAutoStrip = new RegExp('(\\\\d\\\\' + settings.aDec + '?)[^\\\\' + settings.aDec + '\\\\d]\\\\D*$');\n var allowed = '-' + settings.aNum + '\\\\' + settings.aDec;\n settings.allowedAutoStrip = new RegExp('[^' + allowed + ']', 'gi');\n settings.numRegAutoStrip = new RegExp(aNegReg + '(?:\\\\' + settings.aDec + '?(\\\\d+\\\\' + settings.aDec + '\\\\d+)|(\\\\d*(?:\\\\' + settings.aDec + '\\\\d*)?))');\n return settings;\n }\n\n /**\n * strips all unwanted characters and leave only a number alert\n */\n\n function autoStrip(s, settings, strip_zero) {\n if (settings.aSign) { /** remove currency sign */\n while (s.indexOf(settings.aSign) > -1) {\n s = s.replace(settings.aSign, '');\n }\n }\n s = s.replace(settings.skipFirstAutoStrip, '$1$2'); /** first replace anything before digits */\n s = s.replace(settings.skipLastAutoStrip, '$1'); /** then replace anything after digits */\n s = s.replace(settings.allowedAutoStrip, ''); /** then remove any uninterested characters */\n if (settings.altDec) {\n s = s.replace(settings.altDec, settings.aDec);\n } /** get only number string */\n var m = s.match(settings.numRegAutoStrip);\n s = m ? [m[1], m[2], m[3]].join('') : '';\n if ((settings.lZero === 'allow' || settings.lZero === 'keep') && strip_zero !== 'strip') {\n var parts = [],\n nSign = '';\n parts = s.split(settings.aDec);\n if (parts[0].indexOf('-') !== -1) {\n nSign = '-';\n parts[0] = parts[0].replace('-', '');\n }\n if (parts[0].length > settings.mInt && parts[0].charAt(0) === '0') { /** strip leading zero if need */\n parts[0] = parts[0].slice(1);\n }\n s = nSign + parts.join(settings.aDec);\n }\n if ((strip_zero && settings.lZero === 'deny') || (strip_zero && settings.lZero === 'allow' && settings.allowLeading === false)) {\n var strip_reg = '^' + settings.aNegRegAutoStrip + '0*(\\\\d' + (strip_zero === 'leading' ? ')' : '|$)');\n strip_reg = new RegExp(strip_reg);\n s = s.replace(strip_reg, '$1$2');\n }\n return s;\n }\n\n /**\n * places or removes brackets on negative values\n * works only when with pSign: 'p'\n */\n\n function negativeBracket(s, settings) {\n if (settings.pSign === 'p') {\n var brackets = settings.nBracket.split(',');\n if (!settings.hasFocus && !settings.removeBrackets) {\n s = s.replace(settings.aNeg, '');\n s = brackets[0] + s + brackets[1];\n } else if ((settings.hasFocus && s.charAt(0) === brackets[0]) || (settings.removeBrackets && s.charAt(0) === brackets[0])) {\n s = s.replace(brackets[0], settings.aNeg);\n s = s.replace(brackets[1], '');\n }\n }\n return s;\n }\n\n /**\n * function to handle numbers less than 0 that are stored in Exponential notation ex: .0000001 stored as 1e-7\n */\n\n function checkValue(value, settings) {\n if (value) {\n var checkSmall = +value;\n if (checkSmall < 0.000001 && checkSmall > -1) {\n value = +value;\n if (value < 0.000001 && value > 0) {\n value = (value + 10).toString();\n value = value.substring(1);\n }\n if (value < 0 && value > -1) {\n value = (value - 10).toString();\n value = '-' + value.substring(2);\n }\n value = value.toString();\n } else {\n var parts = value.split('.');\n if (parts[1] !== undefined) {\n if (+parts[1] === 0) {\n value = parts[0];\n } else {\n parts[1] = parts[1].replace(/0*$/, '');\n value = parts.join('.');\n }\n }\n }\n }\n return (settings.lZero === 'keep') ? value : value.replace(/^0*(\\d)/, '$1');\n }\n\n /**\n * prepare number string to be converted to real number\n */\n\n function fixNumber(s, aDec, aNeg) {\n if (aDec && aDec !== '.') {\n s = s.replace(aDec, '.');\n }\n if (aNeg && aNeg !== '-') {\n s = s.replace(aNeg, '-');\n }\n if (!s.match(/\\d/)) {\n s += '0';\n }\n return s;\n }\n\n /**\n * prepare real number to be converted to our format\n */\n\n function presentNumber(s, aDec, aNeg) {\n if (aNeg && aNeg !== '-') {\n s = s.replace('-', aNeg);\n }\n if (aDec && aDec !== '.') {\n s = s.replace('.', aDec);\n }\n return s;\n }\n\n /**\n * private function to check for empty value\n */\n\n function checkEmpty(iv, settings, signOnEmpty) {\n if (iv === '' || iv === settings.aNeg) {\n if (settings.wEmpty === 'zero') {\n return iv + '0';\n }\n if (settings.wEmpty === 'sign' || signOnEmpty) {\n return iv + settings.aSign;\n }\n return iv;\n }\n return null;\n }\n\n /**\n * private function that formats our number\n */\n\n function autoGroup(iv, settings) {\n iv = autoStrip(iv, settings);\n var testNeg = iv.replace(',', '.'),\n empty = checkEmpty(iv, settings, true);\n if (empty !== null) {\n return empty;\n }\n var digitalGroup = '';\n if (settings.dGroup === 2) {\n digitalGroup = /(\\d)((\\d)(\\d{2}?)+)$/;\n } else if (settings.dGroup === 4) {\n digitalGroup = /(\\d)((\\d{4}?)+)$/;\n } else {\n digitalGroup = /(\\d)((\\d{3}?)+)$/;\n } /** splits the string at the decimal string */\n var ivSplit = iv.split(settings.aDec);\n if (settings.altDec && ivSplit.length === 1) {\n ivSplit = iv.split(settings.altDec);\n } /** assigns the whole number to the a variable (s) */\n var s = ivSplit[0];\n if (settings.aSep) {\n while (digitalGroup.test(s)) { /** re-inserts the thousand separator via a regular expression */\n s = s.replace(digitalGroup, '$1' + settings.aSep + '$2');\n }\n }\n if (settings.mDec !== 0 && ivSplit.length > 1) {\n if (ivSplit[1].length > settings.mDec) {\n ivSplit[1] = ivSplit[1].substring(0, settings.mDec);\n } /** joins the whole number with the decimal value */\n iv = s + settings.aDec + ivSplit[1];\n } else { /** if whole numbers only */\n iv = s;\n }\n if (settings.aSign) {\n var has_aNeg = iv.indexOf(settings.aNeg) !== -1;\n iv = iv.replace(settings.aNeg, '');\n iv = settings.pSign === 'p' ? settings.aSign + iv : iv + settings.aSign;\n if (has_aNeg) {\n iv = settings.aNeg + iv;\n }\n }\n if (testNeg < 0 && settings.nBracket !== null) { /** removes the negative sign and places brackets */\n iv = negativeBracket(iv, settings);\n }\n return iv;\n }\n\n /**\n * round number after setting by pasting or $().autoNumericSet()\n * private function for round the number\n * please note this handled as text - JavaScript math function can return inaccurate values\n * also this offers multiple rounding methods that are not easily accomplished in JavaScript\n */\n\n function autoRound(iv, settings) { /** value to string */\n iv = (iv === '') ? '0' : iv.toString();\n convertKeyToNumber(settings, 'mDec'); /** set mDec to number needed when mDec set by 'update method */\n if (settings.mRound === 'CHF') {\n iv = (Math.round(iv * 20) / 20).toString();\n }\n var ivRounded = '',\n i = 0,\n nSign = '',\n rDec = (typeof(settings.aPad) === 'boolean' || settings.aPad === null) ? (settings.aPad ? settings.mDec : 0) : +settings.aPad;\n var truncateZeros = function (ivRounded) { /** truncate not needed zeros */\n var regex = (rDec === 0) ? (/(\\.(?:\\d*[1-9])?)0*$/) : rDec === 1 ? (/(\\.\\d(?:\\d*[1-9])?)0*$/) : new RegExp('(\\\\.\\\\d{' + rDec + '}(?:\\\\d*[1-9])?)0*$');\n ivRounded = ivRounded.replace(regex, '$1'); /** If there are no decimal places, we don't need a decimal point at the end */\n if (rDec === 0) {\n ivRounded = ivRounded.replace(/\\.$/, '');\n }\n return ivRounded;\n };\n if (iv.charAt(0) === '-') { /** Checks if the iv (input Value)is a negative value */\n nSign = '-';\n iv = iv.replace('-', ''); /** removes the negative sign will be added back later if required */\n }\n if (!iv.match(/^\\d/)) { /** append a zero if first character is not a digit (then it is likely to be a dot)*/\n iv = '0' + iv;\n }\n if (nSign === '-' && +iv === 0) { /** determines if the value is zero - if zero no negative sign */\n nSign = '';\n }\n if ((+iv > 0 && settings.lZero !== 'keep') || (iv.length > 0 && settings.lZero === 'allow')) { /** trims leading zero's if needed */\n iv = iv.replace(/^0*(\\d)/, '$1');\n }\n var dPos = iv.lastIndexOf('.'),\n /** virtual decimal position */\n vdPos = (dPos === -1) ? iv.length - 1 : dPos,\n /** checks decimal places to determine if rounding is required */\n cDec = (iv.length - 1) - vdPos; /** check if no rounding is required */\n if (cDec <= settings.mDec) {\n ivRounded = iv; /** check if we need to pad with zeros */\n if (cDec < rDec) {\n if (dPos === -1) {\n ivRounded += settings.aDec;\n }\n var zeros = '000000';\n while (cDec < rDec) {\n zeros = zeros.substring(0, rDec - cDec);\n ivRounded += zeros;\n cDec += zeros.length;\n }\n } else if (cDec > rDec) {\n ivRounded = truncateZeros(ivRounded);\n } else if (cDec === 0 && rDec === 0) {\n ivRounded = ivRounded.replace(/\\.$/, '');\n }\n if (settings.mRound !== 'CHF') {\n return (+ivRounded === 0) ? ivRounded : nSign + ivRounded;\n }\n if (settings.mRound === 'CHF') {\n dPos = ivRounded.lastIndexOf('.');\n iv = ivRounded;\n }\n\n } /** rounded length of the string after rounding */\n var rLength = dPos + settings.mDec,\n tRound = +iv.charAt(rLength + 1),\n ivArray = iv.substring(0, rLength + 1).split(''),\n odd = (iv.charAt(rLength) === '.') ? (iv.charAt(rLength - 1) % 2) : (iv.charAt(rLength) % 2),\n onePass = true;\n if (odd !== 1) {\n odd = (odd === 0 && (iv.substring(rLength + 2, iv.length) > 0)) ? 1 : 0;\n }\n /*jslint white: true*/\n if ((tRound > 4 && settings.mRound === 'S') || /** Round half up symmetric */\n (tRound > 4 && settings.mRound === 'A' && nSign === '') || /** Round half up asymmetric positive values */\n (tRound > 5 && settings.mRound === 'A' && nSign === '-') || /** Round half up asymmetric negative values */\n (tRound > 5 && settings.mRound === 's') || /** Round half down symmetric */\n (tRound > 5 && settings.mRound === 'a' && nSign === '') || /** Round half down asymmetric positive values */\n (tRound > 4 && settings.mRound === 'a' && nSign === '-') || /** Round half down asymmetric negative values */\n (tRound > 5 && settings.mRound === 'B') || /** Round half even \"Banker's Rounding\" */\n (tRound === 5 && settings.mRound === 'B' && odd === 1) || /** Round half even \"Banker's Rounding\" */\n (tRound > 0 && settings.mRound === 'C' && nSign === '') || /** Round to ceiling toward positive infinite */\n (tRound > 0 && settings.mRound === 'F' && nSign === '-') || /** Round to floor toward negative infinite */\n (tRound > 0 && settings.mRound === 'U') || /** round up away from zero */\n (settings.mRound === 'CHF')) { /** Round Swiss FRanc */\n /*jslint white: false*/\n for (i = (ivArray.length - 1); i >= 0; i -= 1) { /** Round up the last digit if required, and continue until no more 9's are found */\n if (ivArray[i] !== '.') {\n if (settings.mRound === 'CHF' && ivArray[i] <= 2 && onePass) {\n ivArray[i] = 0;\n onePass = false;\n break;\n }\n if (settings.mRound === 'CHF' && ivArray[i] <= 7 && onePass) {\n ivArray[i] = 5;\n onePass = false;\n break;\n }\n if (settings.mRound === 'CHF' && onePass) {\n ivArray[i] = 10;\n onePass = false;\n } else {\n ivArray[i] = +ivArray[i] + 1;\n }\n if (ivArray[i] < 10) {\n break;\n }\n if (i > 0) {\n ivArray[i] = '0';\n }\n }\n }\n }\n ivArray = ivArray.slice(0, rLength + 1); /** Reconstruct the string, converting any 10's to 0's */\n ivRounded = truncateZeros(ivArray.join('')); /** return rounded value */\n return (+ivRounded === 0) ? ivRounded : nSign + ivRounded;\n }\n\n /**\n * truncate decimal part of a number\n */\n\n function truncateDecimal(s, settings, paste) {\n var aDec = settings.aDec,\n mDec = settings.mDec;\n s = (paste === 'paste') ? autoRound(s, settings) : s;\n if (aDec && mDec) {\n var parts = s.split(aDec);\n /** truncate decimal part to satisfying length\n * cause we would round it anyway */\n if (parts[1] && parts[1].length > mDec) {\n if (mDec > 0) {\n parts[1] = parts[1].substring(0, mDec);\n s = parts.join(aDec);\n } else {\n s = parts[0];\n }\n }\n }\n return s;\n }\n\n /**\n * checking that number satisfy format conditions\n * and lays between settings.vMin and settings.vMax\n * and the string length does not exceed the digits in settings.vMin and settings.vMax\n */\n\n function autoCheck(s, settings) {\n s = autoStrip(s, settings);\n s = truncateDecimal(s, settings);\n s = fixNumber(s, settings.aDec, settings.aNeg);\n var value = +s;\n return value >= settings.vMin && value <= settings.vMax;\n }\n\n /**\n * Holder object for field properties\n */\n\n function AutoNumericHolder(that, settings) {\n this.settings = settings;\n this.that = that;\n this.$that = $(that);\n this.formatted = false;\n this.settingsClone = autoCode(this.$that, this.settings);\n this.value = that.value;\n }\n AutoNumericHolder.prototype = {\n init: function (e) {\n this.value = this.that.value;\n this.settingsClone = autoCode(this.$that, this.settings);\n this.ctrlKey = e.ctrlKey;\n this.cmdKey = e.metaKey;\n this.shiftKey = e.shiftKey;\n this.selection = getElementSelection(this.that); /** keypress event overwrites meaningful value of e.keyCode */\n if (e.type === 'keydown' || e.type === 'keyup') {\n this.kdCode = e.keyCode;\n }\n this.which = e.which;\n this.processed = false;\n this.formatted = false;\n },\n setSelection: function (start, end, setReal) {\n start = Math.max(start, 0);\n end = Math.min(end, this.that.value.length);\n this.selection = {\n start: start,\n end: end,\n length: end - start\n };\n if (setReal === undefined || setReal) {\n setElementSelection(this.that, start, end);\n }\n },\n setPosition: function (pos, setReal) {\n this.setSelection(pos, pos, setReal);\n },\n getBeforeAfter: function () {\n var value = this.value,\n left = value.substring(0, this.selection.start),\n right = value.substring(this.selection.end, value.length);\n return [left, right];\n },\n getBeforeAfterStriped: function () {\n var parts = this.getBeforeAfter();\n parts[0] = autoStrip(parts[0], this.settingsClone);\n parts[1] = autoStrip(parts[1], this.settingsClone);\n return parts;\n },\n\n /**\n * strip parts from excess characters and leading zeroes\n */\n normalizeParts: function (left, right) {\n var settingsClone = this.settingsClone;\n right = autoStrip(right, settingsClone); /** if right is not empty and first character is not aDec, */\n /** we could strip all zeros, otherwise only leading */\n var strip = right.match(/^\\d/) ? true : 'leading';\n left = autoStrip(left, settingsClone, strip); /** prevents multiple leading zeros from being entered */\n if ((left === '' || left === settingsClone.aNeg) && settingsClone.lZero === 'deny') {\n if (right > '') {\n right = right.replace(/^0*(\\d)/, '$1');\n }\n }\n var new_value = left + right; /** insert zero if has leading dot */\n if (settingsClone.aDec) {\n var m = new_value.match(new RegExp('^' + settingsClone.aNegRegAutoStrip + '\\\\' + settingsClone.aDec));\n if (m) {\n left = left.replace(m[1], m[1] + '0');\n new_value = left + right;\n }\n } /** insert zero if number is empty and io.wEmpty == 'zero' */\n if (settingsClone.wEmpty === 'zero' && (new_value === settingsClone.aNeg || new_value === '')) {\n left += '0';\n }\n return [left, right];\n },\n\n /**\n * set part of number to value keeping position of cursor\n */\n setValueParts: function (left, right, paste) {\n var settingsClone = this.settingsClone,\n parts = this.normalizeParts(left, right),\n new_value = parts.join(''),\n position = parts[0].length;\n if (autoCheck(new_value, settingsClone)) {\n new_value = truncateDecimal(new_value, settingsClone, paste);\n if (position > new_value.length) {\n position = new_value.length;\n }\n this.value = new_value;\n this.setPosition(position, false);\n return true;\n }\n return false;\n },\n\n /**\n * helper function for expandSelectionOnSign\n * returns sign position of a formatted value\n */\n signPosition: function () {\n var settingsClone = this.settingsClone,\n aSign = settingsClone.aSign,\n that = this.that;\n if (aSign) {\n var aSignLen = aSign.length;\n if (settingsClone.pSign === 'p') {\n var hasNeg = settingsClone.aNeg && that.value && that.value.charAt(0) === settingsClone.aNeg;\n return hasNeg ? [1, aSignLen + 1] : [0, aSignLen];\n }\n var valueLen = that.value.length;\n return [valueLen - aSignLen, valueLen];\n }\n return [1000, -1];\n },\n\n /**\n * expands selection to cover whole sign\n * prevents partial deletion/copying/overwriting of a sign\n */\n expandSelectionOnSign: function (setReal) {\n var sign_position = this.signPosition(),\n selection = this.selection;\n if (selection.start < sign_position[1] && selection.end > sign_position[0]) { /** if selection catches something except sign and catches only space from sign */\n if ((selection.start < sign_position[0] || selection.end > sign_position[1]) && this.value.substring(Math.max(selection.start, sign_position[0]), Math.min(selection.end, sign_position[1])).match(/^\\s*$/)) { /** then select without empty space */\n if (selection.start < sign_position[0]) {\n this.setSelection(selection.start, sign_position[0], setReal);\n } else {\n this.setSelection(sign_position[1], selection.end, setReal);\n }\n } else { /** else select with whole sign */\n this.setSelection(Math.min(selection.start, sign_position[0]), Math.max(selection.end, sign_position[1]), setReal);\n }\n }\n },\n\n /**\n * try to strip pasted value to digits\n */\n checkPaste: function () {\n if (this.valuePartsBeforePaste !== undefined) {\n var parts = this.getBeforeAfter(),\n\n oldParts = this.valuePartsBeforePaste;\n delete this.valuePartsBeforePaste; /** try to strip pasted value first */\n parts[0] = parts[0].substr(0, oldParts[0].length) + autoStrip(parts[0].substr(oldParts[0].length), this.settingsClone);\n if (!this.setValueParts(parts[0], parts[1], 'paste')) {\n this.value = oldParts.join('');\n this.setPosition(oldParts[0].length, false);\n }\n }\n },\n\n /**\n * process pasting, cursor moving and skipping of not interesting keys\n * if returns true, further processing is not performed\n */\n skipAllways: function (e) {\n var kdCode = this.kdCode,\n which = this.which,\n ctrlKey = this.ctrlKey,\n cmdKey = this.cmdKey,\n shiftKey = this.shiftKey; /** catch the ctrl up on ctrl-v */\n if (((ctrlKey || cmdKey) && e.type === 'keyup' && this.valuePartsBeforePaste !== undefined) || (shiftKey && kdCode === 45)) {\n this.checkPaste();\n return false;\n }\n /** codes are taken from http://www.cambiaresearch.com/c4/702b8cd1-e5b0-42e6-83ac-25f0306e3e25/Javascript-Char-Codes-Key-Codes.aspx\n * skip Fx keys, windows keys, other special keys\n * Thanks Ney Estrabelli for the FF for Mac meta key support \"keycode 224\"\n */\n if ((kdCode >= 112 && kdCode <= 123) || (kdCode >= 91 && kdCode <= 93) || (kdCode >= 9 && kdCode <= 31) || (kdCode < 8 && (which === 0 || which === kdCode)) || kdCode === 144 || kdCode === 145 || kdCode === 45 || kdCode === 224) {\n return true;\n }\n if ((ctrlKey || cmdKey) && kdCode === 65) { /** if select all (a=65)*/\n return true;\n }\n if ((ctrlKey || cmdKey) && (kdCode === 67 || kdCode === 86 || kdCode === 88)) { /** if copy (c=67) paste (v=86) or cut (x=88) */\n if (e.type === 'keydown') {\n this.expandSelectionOnSign();\n }\n if (kdCode === 86 || kdCode === 45) { /** try to prevent wrong paste */\n if (e.type === 'keydown' || e.type === 'keypress') {\n if (this.valuePartsBeforePaste === undefined) {\n this.valuePartsBeforePaste = this.getBeforeAfter();\n }\n } else {\n this.checkPaste();\n }\n }\n return e.type === 'keydown' || e.type === 'keypress' || kdCode === 67;\n }\n if (ctrlKey || cmdKey) {\n return true;\n }\n if (kdCode === 37 || kdCode === 39) { /** jump over thousand separator */\n var aSep = this.settingsClone.aSep,\n start = this.selection.start,\n value = this.that.value;\n if (e.type === 'keydown' && aSep && !this.shiftKey) {\n if (kdCode === 37 && value.charAt(start - 2) === aSep) {\n this.setPosition(start - 1);\n } else if (kdCode === 39 && value.charAt(start + 1) === aSep) {\n this.setPosition(start + 1);\n }\n }\n return true;\n }\n if (kdCode >= 34 && kdCode <= 40) {\n return true;\n }\n return false;\n },\n\n /**\n * process deletion of characters\n * returns true if processing performed\n */\n processAllways: function () {\n var parts; /** process backspace or delete */\n if (this.kdCode === 8 || this.kdCode === 46) {\n if (!this.selection.length) {\n parts = this.getBeforeAfterStriped();\n if (this.kdCode === 8) {\n parts[0] = parts[0].substring(0, parts[0].length - 1);\n } else {\n parts[1] = parts[1].substring(1, parts[1].length);\n }\n this.setValueParts(parts[0], parts[1]);\n } else {\n this.expandSelectionOnSign(false);\n parts = this.getBeforeAfterStriped();\n this.setValueParts(parts[0], parts[1]);\n }\n return true;\n }\n return false;\n },\n\n /**\n * process insertion of characters\n * returns true if processing performed\n */\n processKeypress: function () {\n var settingsClone = this.settingsClone,\n cCode = String.fromCharCode(this.which),\n parts = this.getBeforeAfterStriped(),\n left = parts[0],\n right = parts[1]; /** start rules when the decimal character key is pressed */\n /** always use numeric pad dot to insert decimal separator */\n if (cCode === settingsClone.aDec || (settingsClone.altDec && cCode === settingsClone.altDec) || ((cCode === '.' || cCode === ',') && this.kdCode === 110)) { /** do not allow decimal character if no decimal part allowed */\n if (!settingsClone.mDec || !settingsClone.aDec) {\n return true;\n } /** do not allow decimal character before aNeg character */\n if (settingsClone.aNeg && right.indexOf(settingsClone.aNeg) > -1) {\n return true;\n } /** do not allow decimal character if other decimal character present */\n if (left.indexOf(settingsClone.aDec) > -1) {\n return true;\n }\n if (right.indexOf(settingsClone.aDec) > 0) {\n return true;\n }\n if (right.indexOf(settingsClone.aDec) === 0) {\n right = right.substr(1);\n }\n this.setValueParts(left + settingsClone.aDec, right);\n return true;\n }\n /**\n * start rule on negative sign & prevent minus if not allowed\n */\n if (cCode === '-' || cCode === '+') {\n if (!settingsClone.aNeg) {\n return true;\n } /** caret is always after minus */\n if (left === '' && right.indexOf(settingsClone.aNeg) > -1) {\n left = settingsClone.aNeg;\n right = right.substring(1, right.length);\n } /** change sign of number, remove part if should */\n if (left.charAt(0) === settingsClone.aNeg) {\n left = left.substring(1, left.length);\n } else {\n left = (cCode === '-') ? settingsClone.aNeg + left : left;\n }\n this.setValueParts(left, right);\n return true;\n } /** digits */\n if (cCode >= '0' && cCode <= '9') { /** if try to insert digit before minus */\n if (settingsClone.aNeg && left === '' && right.indexOf(settingsClone.aNeg) > -1) {\n left = settingsClone.aNeg;\n right = right.substring(1, right.length);\n }\n if (settingsClone.vMax <= 0 && settingsClone.vMin < settingsClone.vMax && this.value.indexOf(settingsClone.aNeg) === -1 && cCode !== '0') {\n left = settingsClone.aNeg + left;\n }\n this.setValueParts(left + cCode, right);\n return true;\n } /** prevent any other character */\n return true;\n },\n\n /**\n * formatting of just processed value with keeping of cursor position\n */\n formatQuick: function () {\n var settingsClone = this.settingsClone,\n parts = this.getBeforeAfterStriped(),\n leftLength = this.value;\n if ((settingsClone.aSep === '' || (settingsClone.aSep !== '' && leftLength.indexOf(settingsClone.aSep) === -1)) && (settingsClone.aSign === '' || (settingsClone.aSign !== '' && leftLength.indexOf(settingsClone.aSign) === -1))) {\n var subParts = [],\n nSign = '';\n subParts = leftLength.split(settingsClone.aDec);\n if (subParts[0].indexOf('-') > -1) {\n nSign = '-';\n subParts[0] = subParts[0].replace('-', '');\n parts[0] = parts[0].replace('-', '');\n }\n if (subParts[0].length > settingsClone.mInt && parts[0].charAt(0) === '0') { /** strip leading zero if need */\n parts[0] = parts[0].slice(1);\n }\n parts[0] = nSign + parts[0];\n }\n var value = autoGroup(this.value, this.settingsClone),\n position = value.length;\n if (value) {\n /** prepare regexp which searches for cursor position from unformatted left part */\n var left_ar = parts[0].split(''),\n i = 0;\n for (i; i < left_ar.length; i += 1) { /** thanks Peter Kovari */\n if (!left_ar[i].match('\\\\d')) {\n left_ar[i] = '\\\\' + left_ar[i];\n }\n }\n var leftReg = new RegExp('^.*?' + left_ar.join('.*?'));\n /** search cursor position in formatted value */\n var newLeft = value.match(leftReg);\n if (newLeft) {\n position = newLeft[0].length;\n /** if we are just before sign which is in prefix position */\n if (((position === 0 && value.charAt(0) !== settingsClone.aNeg) || (position === 1 && value.charAt(0) === settingsClone.aNeg)) && settingsClone.aSign && settingsClone.pSign === 'p') {\n /** place caret after prefix sign */\n position = this.settingsClone.aSign.length + (value.charAt(0) === '-' ? 1 : 0);\n }\n } else if (settingsClone.aSign && settingsClone.pSign === 's') {\n /** if we could not find a place for cursor and have a sign as a suffix */\n /** place carret before suffix currency sign */\n position -= settingsClone.aSign.length;\n }\n }\n this.that.value = value;\n this.setPosition(position);\n this.formatted = true;\n }\n };\n\n /**\n * thanks to Anthony & Evan C\n */\n\n function autoGet(obj) {\n if (typeof obj === 'string') {\n obj = obj.replace(/\\[/g, \"\\\\[\").replace(/\\]/g, \"\\\\]\");\n obj = '#' + obj.replace(/(:|\\.)/g, '\\\\$1');\n /** obj = '#' + obj.replace(/([;&,\\.\\+\\*\\~':\"\\!\\^#$%@\\[\\]\\(\\)=>\\|])/g, '\\\\$1'); */\n /** possible modification to replace the above 2 lines */\n }\n return $(obj);\n }\n\n /**\n * function to attach data to the element\n * and imitate the holder\n */\n\n function getHolder($that, settings, update) {\n var data = $that.data('autoNumeric');\n if (!data) {\n data = {};\n $that.data('autoNumeric', data);\n }\n var holder = data.holder;\n if ((holder === undefined && settings) || update) {\n holder = new AutoNumericHolder($that.get(0), settings);\n data.holder = holder;\n }\n return holder;\n }\n\n var methods = {\n\n /**\n * Method to initiate autoNumeric and attached the settings (default and options passed as a parameter\n * $(someSelector).autoNumeric('init'); // initiate autoNumeric with defaults\n * $(someSelector).autoNumeric('init', {option}); // initiate autoNumeric with options\n * $(someSelector).autoNumeric(); // initiate autoNumeric with defaults\n * $(someSelector).autoNumeric({option}); // initiate autoNumeric with options\n * options passes as a parameter example '{aSep: '.', aDec: ',', aSign: '€ '}\n */\n init: function (options) {\n return this.each(function () {\n var $this = $(this),\n settings = $this.data('autoNumeric'),\n /** attempt to grab 'autoNumeric' settings, if they don't exist returns \"undefined\". */\n tagData = $this.data(),\n /** attempt to grab HTML5 data, if they don't exist we'll get \"undefined\".*/\n $input = $this.is('input[type=text], input[type=hidden], input[type=tel], input:not([type])');\n if (typeof settings !== 'object') { /** If we couldn't grab settings, create them from defaults and passed options. */\n settings = $.extend({}, $.fn.autoNumeric.defaults, tagData, options, {\n aNum: '0123456789',\n hasFocus: false,\n removeBrackets: false,\n runOnce: false,\n tagList: ['b', 'caption', 'cite', 'code', 'dd', 'del', 'div', 'dfn', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ins', 'kdb', 'label', 'li', 'output', 'p', 'q', 's', 'sample', 'span', 'strong', 'td', 'th', 'u', 'var']\n }); /** Merge defaults, tagData and options */\n if (settings.aDec === settings.aSep) {\n $.error(\"autoNumeric will not function properly when the decimal character aDec: '\" + settings.aDec + \"' and thousand separator aSep: '\" + settings.aSep + \"' are the same character\");\n }\n $this.data('autoNumeric', settings); /** Save our new settings */\n } else {\n return this;\n }\n var holder = getHolder($this, settings);\n if (!$input && $this.prop('tagName').toLowerCase() === 'input') { /** checks for non-supported input types */\n $.error('The input type \"' + $this.prop('type') + '\" is not supported by autoNumeric()');\n\n }\n if ($.inArray($this.prop('tagName').toLowerCase(), settings.tagList) === -1 && $this.prop('tagName').toLowerCase() !== 'input') {\n $.error(\"The <\" + $this.prop('tagName').toLowerCase() + \"> is not supported by autoNumeric()\");\n\n }\n if (settings.runOnce === false && settings.aForm) { /** routine to format default value on page load */\n if ($input) {\n var setValue = true;\n if ($this[0].value === '' && settings.wEmpty === 'empty') {\n $this[0].value = '';\n setValue = false;\n }\n if ($this[0].value === '' && settings.wEmpty === 'sign') {\n $this[0].value = settings.aSign;\n setValue = false;\n }\n /** checks for page reload from back button\n * also checks for ASP.net form post back\n * the following HTML data attribute is REQUIRED (data-an-default=\"same value as the value attribute\")\n * example: <asp:TextBox runat=\"server\" id=\"someID\" value=\"1234.56\" data-an-default=\"1234.56\">\n */\n if (setValue && $this.val() !== '' && ((settings.anDefault === null && $this[0].value === $this.prop('defaultValue')) || (settings.anDefault !== null && settings.anDefault.toString() === $this.val()))) {\n $this.autoNumeric('set', $this.val());\n }\n }\n if ($.inArray($this.prop('tagName').toLowerCase(), settings.tagList) !== -1 && $this.text() !== '') {\n $this.autoNumeric('set', $this.text());\n }\n }\n settings.runOnce = true;\n if ($this.is('input[type=text], input[type=hidden], input[type=tel], input:not([type])')) { /**added hidden type */\n $this.on('keydown.autoNumeric', function (e) {\n holder = getHolder($this);\n if (holder.settings.aDec === holder.settings.aSep) {\n $.error(\"autoNumeric will not function properly when the decimal character aDec: '\" + holder.settings.aDec + \"' and thousand separator aSep: '\" + holder.settings.aSep + \"' are the same character\");\n }\n if (holder.that.readOnly) {\n holder.processed = true;\n return true;\n }\n /** The below streamed code / comment allows the \"enter\" keydown to throw a change() event */\n /** if (e.keyCode === 13 && holder.inVal !== $this.val()){\n $this.change();\n holder.inVal = $this.val();\n }*/\n holder.init(e);\n if (holder.skipAllways(e)) {\n holder.processed = true;\n return true;\n }\n if (holder.processAllways()) {\n holder.processed = true;\n holder.formatQuick();\n e.preventDefault();\n return false;\n }\n holder.formatted = false;\n return true;\n });\n $this.on('keypress.autoNumeric', function (e) {\n holder = getHolder($this);\n var processed = holder.processed;\n holder.init(e);\n if (holder.skipAllways(e)) {\n return true;\n }\n if (processed) {\n e.preventDefault();\n return false;\n }\n if (holder.processAllways() || holder.processKeypress()) {\n holder.formatQuick();\n e.preventDefault();\n return false;\n }\n holder.formatted = false;\n });\n $this.on('keyup.autoNumeric', function (e) {\n holder = getHolder($this);\n holder.init(e);\n var skip = holder.skipAllways(e);\n holder.kdCode = 0;\n delete holder.valuePartsBeforePaste;\n if ($this[0].value === holder.settings.aSign) { /** added to properly place the caret when only the currency is present */\n if (holder.settings.pSign === 's') {\n setElementSelection(this, 0, 0);\n } else {\n setElementSelection(this, holder.settings.aSign.length, holder.settings.aSign.length);\n }\n }\n if (skip) {\n return true;\n }\n if (this.value === '') {\n return true;\n }\n if (!holder.formatted) {\n holder.formatQuick();\n }\n });\n $this.on('focusin.autoNumeric', function () {\n holder = getHolder($this);\n var $settings = holder.settingsClone;\n $settings.hasFocus = true;\n if ($settings.nBracket !== null) {\n var checkVal = $this.val();\n $this.val(negativeBracket(checkVal, $settings));\n }\n holder.inVal = $this.val();\n var onEmpty = checkEmpty(holder.inVal, $settings, true);\n if (onEmpty !== null && onEmpty !== '') {\n $this.val(onEmpty);\n }\n });\n $this.on('focusout.autoNumeric', function () {\n holder = getHolder($this);\n var $settings = holder.settingsClone,\n value = $this.val(),\n origValue = value;\n $settings.hasFocus = false;\n var strip_zero = ''; /** added to control leading zero */\n if ($settings.lZero === 'allow') { /** added to control leading zero */\n $settings.allowLeading = false;\n strip_zero = 'leading';\n }\n if (value !== '') {\n value = autoStrip(value, $settings, strip_zero);\n if (checkEmpty(value, $settings) === null && autoCheck(value, $settings, $this[0])) {\n value = fixNumber(value, $settings.aDec, $settings.aNeg);\n value = autoRound(value, $settings);\n value = presentNumber(value, $settings.aDec, $settings.aNeg);\n } else {\n value = '';\n }\n }\n var groupedValue = checkEmpty(value, $settings, false);\n if (groupedValue === null) {\n groupedValue = autoGroup(value, $settings);\n }\n if (groupedValue !== holder.inVal || groupedValue !== origValue) {\n $this.val(groupedValue);\n $this.change();\n delete holder.inVal;\n }\n });\n }\n });\n },\n\n /**\n * method to remove settings and stop autoNumeric() - does not remove the formatting\n * $(someSelector).autoNumeric('destroy'); // destroy autoNumeric\n * no parameters accepted\n */\n destroy: function () {\n return $(this).each(function () {\n var $this = $(this);\n $this.off('.autoNumeric');\n $this.removeData('autoNumeric');\n });\n },\n\n /**\n * method to update settings - can be call as many times\n * $(someSelector).autoNumeric('update', {options}); // updates the settings\n * options passes as a parameter example '{aSep: '.', aDec: ',', aSign: '€ '}\n */\n update: function (options) {\n return $(this).each(function () {\n var $this = autoGet($(this)),\n settings = $this.data('autoNumeric');\n if (typeof settings !== 'object') {\n $.error(\"You must initialize autoNumeric('init', {options}) prior to calling the 'update' method\");\n }\n var strip = $this.autoNumeric('get');\n settings = $.extend(settings, options);\n getHolder($this, settings, true);\n if (settings.aDec === settings.aSep) {\n $.error(\"autoNumeric will not function properly when the decimal character aDec: '\" + settings.aDec + \"' and thousand separator aSep: '\" + settings.aSep + \"' are the same character\");\n }\n $this.data('autoNumeric', settings);\n if ($this.val() !== '' || $this.text() !== '') {\n return $this.autoNumeric('set', strip);\n }\n return;\n });\n },\n\n /**\n * method to format value sent as a parameter \"\"\n * $(someSelector).autoNumeric('set', 'value'}); // formats the value being passed\n * value passed as a string - can be a integer '1234' or double '1234.56789'\n * must contain only numbers and one decimal (period) character\n */\n set: function (valueIn) {\n if (valueIn === null) {\n return;\n }\n return $(this).each(function () {\n var $this = autoGet($(this)),\n settings = $this.data('autoNumeric'),\n value = valueIn.toString(),\n testValue = valueIn.toString(),\n $input = $this.is('input[type=text], input[type=hidden], input[type=tel], input:not([type])');\n if (typeof settings !== 'object') {\n $.error(\"You must initialize autoNumeric('init', {options}) prior to calling the 'set' method\");\n }\n /** allows locale decimal separator to be a comma */\n if ((testValue === $this.attr('value') || testValue === $this.text()) && settings.runOnce === false) {\n value = value.replace(',', '.');\n }\n if (!$.isNumeric(+value)) {\n $.error(\"The value (\" + value + \") being 'set' is not numeric and has caused a error to be thrown\");\n }\n value = checkValue(value, settings);\n settings.setEvent = true;\n value.toString();\n if (value !== '') {\n value = autoRound(value, settings);\n }\n value = presentNumber(value, settings.aDec, settings.aNeg);\n if (!autoCheck(value, settings)) {\n value = autoRound('', settings);\n }\n value = autoGroup(value, settings);\n if ($input) {\n return $this.val(value);\n }\n if ($.inArray($this.prop('tagName').toLowerCase(), settings.tagList) !== -1) {\n return $this.text(value);\n }\n return false;\n });\n },\n\n /**\n * method to get the unformatted that accepts up to one parameter\n * $(someSelector).autoNumeric('get'); no parameters accepted\n * values returned as ISO numeric string \"1234.56\" where the decimal character is a period\n * only the first element in the selector is returned\n */\n get: function () {\n var $this = autoGet($(this)),\n settings = $this.data('autoNumeric');\n if (typeof settings !== 'object') {\n $.error(\"You must initialize autoNumeric('init', {options}) prior to calling the 'get' method\");\n }\n var getValue = '';\n /** determine the element type then use .eq(0) selector to grab the value of the first element in selector */\n if ($this.is('input[type=text], input[type=hidden], input[type=tel], input:not([type])')) { /**added hidden type */\n getValue = $this.eq(0).val();\n } else if ($.inArray($this.prop('tagName').toLowerCase(), settings.tagList) !== -1) {\n getValue = $this.eq(0).text();\n } else {\n $.error(\"The <\" + $this.prop('tagName').toLowerCase() + \"> is not supported by autoNumeric()\");\n }\n if ((getValue === '' && settings.wEmpty === 'empty') || (getValue === settings.aSign && (settings.wEmpty === 'sign' || settings.wEmpty === 'empty'))) {\n return '';\n }\n if (getValue !== '' && settings.nBracket !== null) {\n settings.removeBrackets = true;\n getValue = negativeBracket(getValue, settings);\n settings.removeBrackets = false;\n }\n if (settings.runOnce || settings.aForm === false) {\n getValue = autoStrip(getValue, settings);\n }\n getValue = fixNumber(getValue, settings.aDec, settings.aNeg);\n if (+getValue === 0 && settings.lZero !== 'keep') {\n getValue = '0';\n }\n if (settings.lZero === 'keep') {\n return getValue;\n }\n getValue = checkValue(getValue, settings);\n return getValue; /** returned Numeric String */\n },\n\n /**\n * The 'getString' method used jQuerys .serialize() method that creates a text string in standard URL-encoded notation\n * it then loops through the string and un-formats the inputs with autoNumeric\n * $(someSelector).autoNumeric('getString'); no parameter accepted\n * values returned as ISO numeric string \"1234.56\" where the decimal character is a period\n */\n getString: function () {\n var isAutoNumeric = false,\n $this = autoGet($(this)),\n formFields = $this.serialize(),\n formParts = formFields.split('&'),\n formIndex = $('form').index($this),\n allFormElements = $('form:eq(' + formIndex + ')'),\n aiIndex = [],\n /* all input index */\n scIndex = [],\n /* successful control index */\n rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n /* from jQuery serialize method */\n rsubmittable = /^(?:input|select|textarea|keygen)/i,\n /* from jQuery serialize method */\n rcheckableType = /^(?:checkbox|radio)$/i,\n rnonAutoNumericTypes = /^(?:button|checkbox|color|date|datetime|datetime-local|email|file|image|month|number|password|radio|range|reset|search|submit|time|url|week)/i,\n count = 0;\n /*jslint unparam: true*/\n /* index of successful elements */\n $.each(allFormElements[0], function (i, field) {\n if (field.name !== '' && rsubmittable.test(field.localName) && !rsubmitterTypes.test(field.type) && !field.disabled && (field.checked || !rcheckableType.test(field.type))) {\n scIndex.push(count);\n count = count + 1;\n } else {\n scIndex.push(-1);\n }\n });\n /* index of all inputs tags except checkbox */\n count = 0;\n $.each(allFormElements[0], function (i, field) {\n if (field.localName === 'input' && (field.type === '' || field.type === 'text' || field.type === 'hidden' || field.type === 'tel')) {\n aiIndex.push(count);\n count = count + 1;\n } else {\n aiIndex.push(-1);\n if (field.localName === 'input' && rnonAutoNumericTypes.test(field.type)) {\n count = count + 1;\n }\n }\n });\n $.each(formParts, function (i, miniParts) {\n miniParts = formParts[i].split('=');\n var scElement = $.inArray(i, scIndex);\n if (scElement > -1 && aiIndex[scElement] > -1) {\n var testInput = $('form:eq(' + formIndex + ') input:eq(' + aiIndex[scElement] + ')'),\n settings = testInput.data('autoNumeric');\n if (typeof settings === 'object') {\n if (miniParts[1] !== null) {\n miniParts[1] = $('form:eq(' + formIndex + ') input:eq(' + aiIndex[scElement] + ')').autoNumeric('get').toString();\n formParts[i] = miniParts.join('=');\n isAutoNumeric = true;\n }\n }\n }\n });\n /*jslint unparam: false*/\n if (!isAutoNumeric) {\n $.error(\"You must initialize autoNumeric('init', {options}) prior to calling the 'getString' method\");\n }\n return formParts.join('&');\n },\n\n /**\n * The 'getString' method used jQuerys .serializeArray() method that creates array or objects that can be encoded as a JSON string\n * it then loops through the string and un-formats the inputs with autoNumeric\n * $(someSelector).autoNumeric('getArray'); no parameter accepted\n * values returned as ISO numeric string \"1234.56\" where the decimal character is a period\n */\n getArray: function () {\n var isAutoNumeric = false,\n $this = autoGet($(this)),\n formFields = $this.serializeArray(),\n formIndex = $('form').index($this),\n allFormElements = $('form:eq(' + formIndex + ')'),\n aiIndex = [],\n /* all input index */\n scIndex = [],\n /* successful control index */\n rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n /* from jQuery serialize method */\n rsubmittable = /^(?:input|select|textarea|keygen)/i,\n /* from jQuery serialize method */\n rcheckableType = /^(?:checkbox|radio)$/i,\n rnonAutoNumericTypes = /^(?:button|checkbox|color|date|datetime|datetime-local|email|file|image|month|number|password|radio|range|reset|search|submit|time|url|week)/i,\n count = 0;\n /*jslint unparam: true*/\n /* index of successful elements */\n $.each(allFormElements[0], function (i, field) {\n if (field.name !== '' && rsubmittable.test(field.localName) && !rsubmitterTypes.test(field.type) && !field.disabled && (field.checked || !rcheckableType.test(field.type))) {\n scIndex.push(count);\n count = count + 1;\n } else {\n scIndex.push(-1);\n }\n });\n /* index of all inputs tags */\n count = 0;\n $.each(allFormElements[0], function (i, field) {\n if (field.localName === 'input' && (field.type === '' || field.type === 'text' || field.type === 'hidden' || field.type === 'tel')) {\n aiIndex.push(count);\n count = count + 1;\n } else {\n aiIndex.push(-1);\n if (field.localName === 'input' && rnonAutoNumericTypes.test(field.type)) {\n count = count + 1;\n }\n }\n });\n $.each(formFields, function (i, field) {\n var scElement = $.inArray(i, scIndex);\n if (scElement > -1 && aiIndex[scElement] > -1) {\n var testInput = $('form:eq(' + formIndex + ') input:eq(' + aiIndex[scElement] + ')'),\n settings = testInput.data('autoNumeric');\n if (typeof settings === 'object') {\n field.value = $('form:eq(' + formIndex + ') input:eq(' + aiIndex[scElement] + ')').autoNumeric('get').toString();\n isAutoNumeric = true;\n }\n }\n });\n /*jslint unparam: false*/\n if (!isAutoNumeric) {\n $.error(\"None of the successful form inputs are initialized by autoNumeric.\");\n }\n return formFields;\n },\n\n /**\n * The 'getSteetings returns the object with autoNumeric settings for those who need to look under the hood\n * $(someSelector).autoNumeric('getSettings'); // no parameters accepted\n * $(someSelector).autoNumeric('getSettings').aDec; // return the aDec setting as a string - ant valid setting can be used\n */\n getSettings: function () {\n var $this = autoGet($(this));\n return $this.eq(0).data('autoNumeric');\n }\n };\n\n /**\n * autoNumeric function\n */\n $.fn.autoNumeric = function (method) {\n if (methods[method]) {\n return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));\n }\n if (typeof method === 'object' || !method) {\n return methods.init.apply(this, arguments);\n }\n $.error('Method \"' + method + '\" is not supported by autoNumeric()');\n };\n\n /**\n * Defaults are public - these can be overridden by the following:\n * HTML5 data attributes\n * Options passed by the 'init' or 'update' methods\n * Use jQuery's $.extend method - great way to pass ASP.NET current culture settings\n */\n $.fn.autoNumeric.defaults = {\n /** allowed thousand separator characters\n * comma = ','\n * period \"full stop\" = '.'\n * apostrophe is escaped = '\\''\n * space = ' '\n * none = ''\n * NOTE: do not use numeric characters\n */\n aSep: ',',\n /** digital grouping for the thousand separator used in Format\n * dGroup: '2', results in 99,99,99,999 common in India for values less than 1 billion and greater than -1 billion\n * dGroup: '3', results in 999,999,999 default\n * dGroup: '4', results in 9999,9999,9999 used in some Asian countries\n */\n dGroup: '3',\n /** allowed decimal separator characters\n * period \"full stop\" = '.'\n * comma = ','\n */\n aDec: '.',\n /** allow to declare alternative decimal separator which is automatically replaced by aDec\n * developed for countries the use a comma ',' as the decimal character\n * and have keyboards\\numeric pads that have a period 'full stop' as the decimal characters (Spain is an example)\n */\n altDec: null,\n /** allowed currency symbol\n * Must be in quotes aSign: '$', a space is allowed aSign: '$ '\n */\n aSign: '',\n /** placement of currency sign\n * for prefix pSign: 'p',\n * for suffix pSign: 's',\n */\n pSign: 'p',\n /** maximum possible value\n * value must be enclosed in quotes and use the period for the decimal point\n * value must be larger than vMin\n */\n vMax: '9999999999999.99',\n /** minimum possible value\n * value must be enclosed in quotes and use the period for the decimal point\n * value must be smaller than vMax\n */\n vMin: '-9999999999999.99',\n /** max number of decimal places = used to override decimal places set by the vMin & vMax values\n * value must be enclosed in quotes example mDec: '3',\n * This can also set the value via a call back function mDec: 'css:#\n */\n mDec: null,\n /** method used for rounding\n * mRound: 'S', Round-Half-Up Symmetric (default)\n * mRound: 'A', Round-Half-Up Asymmetric\n * mRound: 's', Round-Half-Down Symmetric (lower case s)\n * mRound: 'a', Round-Half-Down Asymmetric (lower case a)\n * mRound: 'B', Round-Half-Even \"Bankers Rounding\"\n * mRound: 'U', Round Up \"Round-Away-From-Zero\"\n * mRound: 'D', Round Down \"Round-Toward-Zero\" - same as truncate\n * mRound: 'C', Round to Ceiling \"Toward Positive Infinity\"\n * mRound: 'F', Round to Floor \"Toward Negative Infinity\"\n */\n mRound: 'S',\n /** controls decimal padding\n * aPad: true - always Pad decimals with zeros\n * aPad: false - does not pad with zeros.\n * aPad: `some number` - pad decimals with zero to number different from mDec\n * thanks to Jonas Johansson for the suggestion\n */\n aPad: true,\n /** places brackets on negative value -$ 999.99 to (999.99)\n * visible only when the field does NOT have focus the left and right symbols should be enclosed in quotes and seperated by a comma\n * nBracket: null, nBracket: '(,)', nBracket: '[,]', nBracket: '<,>' or nBracket: '{,}'\n */\n nBracket: null,\n /** Displayed on empty string\n * wEmpty: 'empty', - input can be blank\n * wEmpty: 'zero', - displays zero\n * wEmpty: 'sign', - displays the currency sign\n */\n wEmpty: 'empty',\n /** controls leading zero behavior\n * lZero: 'allow', - allows leading zeros to be entered. Zeros will be truncated when entering additional digits. On focusout zeros will be deleted.\n * lZero: 'deny', - allows only one leading zero on values less than one\n * lZero: 'keep', - allows leading zeros to be entered. on fousout zeros will be retained.\n */\n lZero: 'allow',\n /** determine if the select all keyboard command will select\n * the complete input text or only the input numeric value\n * if the currency symbol is between the numeric value and the negative sign only the numeric value will sellected\n */\n sNumber: true,\n /** determine if the default value will be formatted on page ready.\n * true = automatically formats the default value on page ready\n * false = will not format the default value\n */\n aForm: true,\n /** helper option for ASP.NET postback\n * should be the value of the unformatted default value\n * examples:\n * no default value='' {anDefault: ''}\n * value=1234.56 {anDefault: '1234.56'}\n */\n anDefault: null\n };\n}));","/*\n backgrid-paginator\n http://github.com/wyuenho/backgrid\n\n Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors\n Licensed under the MIT @license.\n*/\n(function (root, factory) {\n\n // CommonJS\n if (typeof exports == \"object\") {\n module.exports = factory(require(\"underscore\"),\n require(\"backbone\"),\n require(\"backgrid\"),\n require(\"backbone.paginator\"));\n }\n // AMD. Register as an anonymous module.\n else if (typeof define == \"function\" && define.amd) {\n define([\"underscore\", \"backbone\", \"backgrid\", \"backbone.paginator\"], factory);\n }\n // Browser\n else {\n factory(root._, root.Backbone, root.Backgrid);\n }\n\n}(this, function (_, Backbone, Backgrid) {\n\n \"use strict\";\n\n /**\n PageHandle is a class that renders the actual page handles and reacts to\n click events for pagination.\n\n This class acts in two modes - control or discrete page handle modes. If\n one of the `is*` flags is `true`, an instance of this class is under\n control page handle mode. Setting a `pageIndex` to an instance of this\n class under control mode has no effect and the correct page index will\n always be inferred from the `is*` flag. Only one of the `is*` flags should\n be set to `true` at a time. For example, an instance of this class cannot\n simultaneously be a rewind control and a fast forward control. A `label`\n and a `title` function or a string are required to be passed to the\n constuctor under this mode. If a `title` function is provided, it __MUST__\n accept a hash parameter `data`, which contains a key `label`. Its result\n will be used to render the generated anchor's title attribute.\n\n If all of the `is*` flags is set to `false`, which is the default, an\n instance of this class will be in discrete page handle mode. An instance\n under this mode requires the `pageIndex` to be passed from the constructor\n as an option and it __MUST__ be a 0-based index of the list of page numbers\n to render. The constuctor will normalize the base to the same base the\n underlying PageableCollection collection instance uses. A `label` is not\n required under this mode, which will default to the equivalent 1-based page\n index calculated from `pageIndex` and the underlying PageableCollection\n instance. A provided `label` will still be honored however. The `title`\n parameter is also not required under this mode, in which case the default\n `title` function will be used. You are encouraged to provide your own\n `title` function however if you wish to localize the title strings.\n\n If this page handle represents the current page, an `active` class will be\n placed on the root list element.\n\n If this page handle is at the border of the list of pages, a `disabled`\n class will be placed on the root list element.\n\n Only page handles that are neither `active` nor `disabled` will respond to\n click events and triggers pagination.\n\n @class Backgrid.Extension.PageHandle\n */\n var PageHandle = Backgrid.Extension.PageHandle = Backbone.View.extend({\n\n /** @property */\n tagName: \"li\",\n\n /** @property */\n events: {\n \"click a\": \"changePage\"\n },\n\n /**\n @property {string|function(Object.<string, string>): string} title\n The title to use for the `title` attribute of the generated page handle\n anchor elements. It can be a string or a function that takes a `data`\n parameter, which contains a mandatory `label` key which provides the\n label value to be displayed.\n */\n title: function (data) {\n return 'Page ' + data.label;\n },\n\n /**\n @property {boolean} isRewind Whether this handle represents a rewind\n control\n */\n isRewind: false,\n\n /**\n @property {boolean} isBack Whether this handle represents a back\n control\n */\n isBack: false,\n\n /**\n @property {boolean} isForward Whether this handle represents a forward\n control\n */\n isForward: false,\n\n /**\n @property {boolean} isFastForward Whether this handle represents a fast\n forward control\n */\n isFastForward: false,\n\n /**\n Initializer.\n\n @param {Object} options\n @param {Backbone.Collection} options.collection\n @param {number} pageIndex 0-based index of the page number this handle\n handles. This parameter will be normalized to the base the underlying\n PageableCollection uses.\n @param {string} [options.label] If provided it is used to render the\n anchor text, otherwise the normalized pageIndex will be used\n instead. Required if any of the `is*` flags is set to `true`.\n @param {string} [options.title]\n @param {boolean} [options.isRewind=false]\n @param {boolean} [options.isBack=false]\n @param {boolean} [options.isForward=false]\n @param {boolean} [options.isFastForward=false]\n */\n initialize: function (options) {\n var collection = this.collection;\n var state = collection.state;\n var currentPage = state.currentPage;\n var firstPage = state.firstPage;\n var lastPage = state.lastPage;\n\n _.extend(this, _.pick(options,\n [\"isRewind\", \"isBack\", \"isForward\", \"isFastForward\"]));\n\n var pageIndex;\n if (this.isRewind) pageIndex = firstPage;\n else if (this.isBack) pageIndex = Math.max(firstPage, currentPage - 1);\n else if (this.isForward) pageIndex = Math.min(lastPage, currentPage + 1);\n else if (this.isFastForward) pageIndex = lastPage;\n else {\n pageIndex = +options.pageIndex;\n pageIndex = (firstPage ? pageIndex + 1 : pageIndex);\n }\n this.pageIndex = pageIndex;\n\n this.label = (options.label || (firstPage ? pageIndex : pageIndex + 1)) + '';\n var title = options.title || this.title;\n this.title = _.isFunction(title) ? title({label: this.label}) : title;\n },\n\n /**\n Renders a clickable anchor element under a list item.\n */\n render: function () {\n this.$el.empty();\n var anchor = document.createElement(\"a\");\n anchor.href = '#';\n if (this.title) anchor.title = this.title;\n anchor.innerHTML = this.label;\n this.el.appendChild(anchor);\n\n var collection = this.collection;\n var state = collection.state;\n var currentPage = state.currentPage;\n var pageIndex = this.pageIndex;\n\n if (this.isRewind && currentPage == state.firstPage ||\n this.isBack && !collection.hasPreviousPage() ||\n this.isForward && !collection.hasNextPage() ||\n this.isFastForward && (currentPage == state.lastPage || state.totalPages < 1)) {\n this.$el.addClass(\"disabled\");\n }\n else if (!(this.isRewind ||\n this.isBack ||\n this.isForward ||\n this.isFastForward) &&\n state.currentPage == pageIndex) {\n this.$el.addClass(\"active\");\n }\n\n this.delegateEvents();\n return this;\n },\n\n /**\n jQuery click event handler. Goes to the page this PageHandle instance\n represents. No-op if this page handle is currently active or disabled.\n */\n changePage: function (e) {\n e.preventDefault();\n var $el = this.$el, col = this.collection;\n if (!$el.hasClass(\"active\") && !$el.hasClass(\"disabled\")) {\n if (this.isRewind) col.getFirstPage({reset: true});\n else if (this.isBack) col.getPreviousPage({reset: true});\n else if (this.isForward) col.getNextPage({reset: true});\n else if (this.isFastForward) col.getLastPage({reset: true});\n else col.getPage(this.pageIndex, {reset: true});\n }\n return this;\n }\n\n });\n\n /**\n Paginator is a Backgrid extension that renders a series of configurable\n pagination handles. This extension is best used for splitting a large data\n set across multiple pages. If the number of pages is larger then a\n threshold, which is set to 10 by default, the page handles are rendered\n within a sliding window, plus the rewind, back, forward and fast forward\n control handles. The individual control handles can be turned off.\n\n @class Backgrid.Extension.Paginator\n */\n var Paginator = Backgrid.Extension.Paginator = Backbone.View.extend({\n\n /** @property */\n className: \"backgrid-paginator\",\n\n /** @property */\n windowSize: 10,\n\n /**\n @property {number} slideScale the number used by #slideHowMuch to scale\n `windowSize` to yield the number of pages to slide. For example, the\n default windowSize(10) * slideScale(0.5) yields 5, which means the window\n will slide forward 5 pages as soon as you've reached page 6. The smaller\n the scale factor the less pages to slide, and vice versa.\n\n Also See:\n\n - #slideMaybe\n - #slideHowMuch\n */\n slideScale: 0.5,\n\n /**\n @property {Object.<string, Object.<string, string>>} controls You can\n disable specific control handles by setting the keys in question to\n null. The defaults will be merged with your controls object, with your\n changes taking precedent.\n */\n controls: {\n rewind: {\n label: \"《\",\n title: \"First\"\n },\n back: {\n label: \"〈\",\n title: \"Previous\"\n },\n forward: {\n label: \"〉\",\n title: \"Next\"\n },\n fastForward: {\n label: \"》\",\n title: \"Last\"\n }\n },\n\n /** @property */\n renderIndexedPageHandles: true,\n\n /**\n @property renderMultiplePagesOnly. Determines if the paginator\n should show in cases where the collection has more than one page.\n Default is false for backwards compatibility.\n */\n renderMultiplePagesOnly: false,\n\n /**\n @property {Backgrid.Extension.PageHandle} pageHandle. The PageHandle\n class to use for rendering individual handles\n */\n pageHandle: PageHandle,\n\n /** @property */\n goBackFirstOnSort: true,\n\n /**\n Initializer.\n\n @param {Object} options\n @param {Backbone.Collection} options.collection\n @param {boolean} [options.controls]\n @param {boolean} [options.pageHandle=Backgrid.Extension.PageHandle]\n @param {boolean} [options.goBackFirstOnSort=true]\n @param {boolean} [options.renderMultiplePagesOnly=false]\n */\n initialize: function (options) {\n var self = this;\n self.controls = _.defaults(options.controls || {}, self.controls,\n Paginator.prototype.controls);\n\n _.extend(self, _.pick(options || {}, \"windowSize\", \"pageHandle\",\n \"slideScale\", \"goBackFirstOnSort\",\n \"renderIndexedPageHandles\",\n \"renderMultiplePagesOnly\"));\n\n var col = self.collection;\n self.listenTo(col, \"add\", self.render);\n self.listenTo(col, \"remove\", self.render);\n self.listenTo(col, \"reset\", self.render);\n self.listenTo(col, \"backgrid:sorted\", function () {\n if (self.goBackFirstOnSort && col.state.currentPage !== col.state.firstPage) col.getFirstPage({reset: true});\n });\n },\n\n /**\n Decides whether the window should slide. This method should return 1 if\n sliding should occur and 0 otherwise. The default is sliding should occur\n if half of the pages in a window has been reached.\n\n __Note__: All the parameters have been normalized to be 0-based.\n\n @param {number} firstPage\n @param {number} lastPage\n @param {number} currentPage\n @param {number} windowSize\n @param {number} slideScale\n\n @return {0|1}\n */\n slideMaybe: function (firstPage, lastPage, currentPage, windowSize, slideScale) {\n return Math.round(currentPage % windowSize / windowSize);\n },\n\n /**\n Decides how many pages to slide when sliding should occur. The default\n simply scales the `windowSize` to arrive at a fraction of the `windowSize`\n to increment.\n\n __Note__: All the parameters have been normalized to be 0-based.\n\n @param {number} firstPage\n @param {number} lastPage\n @param {number} currentPage\n @param {number} windowSize\n @param {number} slideScale\n\n @return {number}\n */\n slideThisMuch: function (firstPage, lastPage, currentPage, windowSize, slideScale) {\n return ~~(windowSize * slideScale);\n },\n\n _calculateWindow: function () {\n var collection = this.collection;\n var state = collection.state;\n\n // convert all indices to 0-based here\n var firstPage = state.firstPage;\n var lastPage = +state.lastPage;\n lastPage = Math.max(0, firstPage ? lastPage - 1 : lastPage);\n var currentPage = Math.max(state.currentPage, state.firstPage);\n currentPage = firstPage ? currentPage - 1 : currentPage;\n var windowSize = this.windowSize;\n var slideScale = this.slideScale;\n var windowStart = Math.floor(currentPage / windowSize) * windowSize;\n if (currentPage <= lastPage - this.slideThisMuch()) {\n windowStart += (this.slideMaybe(firstPage, lastPage, currentPage, windowSize, slideScale) *\n this.slideThisMuch(firstPage, lastPage, currentPage, windowSize, slideScale));\n }\n var windowEnd = Math.min(lastPage + 1, windowStart + windowSize);\n return [windowStart, windowEnd];\n },\n\n /**\n Creates a list of page handle objects for rendering.\n\n @return {Array.<Object>} an array of page handle objects hashes\n */\n makeHandles: function () {\n\n var handles = [];\n var collection = this.collection;\n\n var window = this._calculateWindow();\n var winStart = window[0], winEnd = window[1];\n\n if (this.renderIndexedPageHandles) {\n for (var i = winStart; i < winEnd; i++) {\n handles.push(new this.pageHandle({\n collection: collection,\n pageIndex: i\n }));\n }\n }\n\n var controls = this.controls;\n _.each([\"back\", \"rewind\", \"forward\", \"fastForward\"], function (key) {\n var value = controls[key];\n if (value) {\n var handleCtorOpts = {\n collection: collection,\n title: value.title,\n label: value.label\n };\n handleCtorOpts[\"is\" + key.slice(0, 1).toUpperCase() + key.slice(1)] = true;\n var handle = new this.pageHandle(handleCtorOpts);\n if (key == \"rewind\" || key == \"back\") handles.unshift(handle);\n else handles.push(handle);\n }\n }, this);\n\n return handles;\n },\n\n /**\n Render the paginator handles inside an unordered list.\n */\n render: function () {\n this.$el.empty();\n\n var totalPages = this.collection.state.totalPages;\n\n // Don't render if collection is empty\n if(this.renderMultiplePagesOnly && totalPages <= 1) {\n return this;\n }\n\n if (this.handles) {\n for (var i = 0, l = this.handles.length; i < l; i++) {\n this.handles[i].remove();\n }\n }\n\n var handles = this.handles = this.makeHandles();\n\n var ul = document.createElement(\"ul\");\n for (var i = 0; i < handles.length; i++) {\n ul.appendChild(handles[i].render().el);\n }\n\n this.el.appendChild(ul);\n\n return this;\n }\n\n });\n\n}));\n","/*\n backgrid-select-all\n http://github.com/wyuenho/backgrid\n\n Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors\n Licensed under the MIT @license.\n*/\n(function (root, factory) {\n\n // CommonJS\n if (typeof exports == \"object\") {\n module.exports = factory(require(\"backbone\"), require(\"backgrid\"));\n }\n // Browser\n else factory(root.Backbone, root.Backgrid);\n\n}(this, function (Backbone, Backgrid) {\n\n \"use strict\";\n\n /**\n Renders a checkbox for row selection.\n\n @class Backgrid.Extension.SelectRowCell\n @extends Backbone.View\n */\n var SelectRowCell = Backgrid.Extension.SelectRowCell = Backbone.View.extend({\n\n /** @property */\n className: \"select-row-cell\",\n\n /** @property */\n tagName: \"td\",\n\n /** @property */\n events: {\n \"keydown input[type=checkbox]\": \"onKeydown\",\n \"change input[type=checkbox]\": \"onChange\",\n \"click input[type=checkbox]\": \"enterEditMode\"\n },\n\n /**\n Initializer. If the underlying model triggers a `select` event, this cell\n will change its checked value according to the event's `selected` value.\n\n @param {Object} options\n @param {Backgrid.Column} options.column\n @param {Backbone.Model} options.model\n */\n initialize: function (options) {\n\n this.column = options.column;\n if (!(this.column instanceof Backgrid.Column)) {\n this.column = new Backgrid.Column(this.column);\n }\n\n var column = this.column, model = this.model, $el = this.$el;\n this.listenTo(column, \"change:renderable\", function (column, renderable) {\n $el.toggleClass(\"renderable\", renderable);\n });\n\n if (Backgrid.callByNeed(column.renderable(), column, model)) $el.addClass(\"renderable\");\n\n this.listenTo(model, \"backgrid:select\", function (model, selected) {\n this.$el.find(\"input[type=checkbox]\").prop(\"checked\", selected).change();\n });\n },\n\n /**\n Focuses the checkbox.\n */\n enterEditMode: function () {\n this.$el.find(\"input[type=checkbox]\").focus();\n },\n\n /**\n Unfocuses the checkbox.\n */\n exitEditMode: function () {\n this.$el.find(\"input[type=checkbox]\").blur();\n },\n\n /**\n Process keyboard navigation.\n */\n onKeydown: function (e) {\n var command = new Backgrid.Command(e);\n if (command.passThru()) return true; // skip ahead to `change`\n if (command.cancel()) {\n e.stopPropagation();\n this.$el.find(\"input[type=checkbox]\").blur();\n }\n else if (command.save() || command.moveLeft() || command.moveRight() ||\n command.moveUp() || command.moveDown()) {\n e.preventDefault();\n e.stopPropagation();\n this.model.trigger(\"backgrid:edited\", this.model, this.column, command);\n }\n },\n\n /**\n When the checkbox's value changes, this method will trigger a Backbone\n `backgrid:selected` event with a reference of the model and the\n checkbox's `checked` value.\n */\n onChange: function () {\n var checked = this.$el.find(\"input[type=checkbox]\").prop(\"checked\");\n this.$el.parent().toggleClass(\"selected\", checked);\n this.model.trigger(\"backgrid:selected\", this.model, checked);\n },\n\n /**\n Renders a checkbox in a table cell.\n */\n render: function () {\n this.$el.empty().append('<input tabindex=\"-1\" type=\"checkbox\" />');\n this.delegateEvents();\n return this;\n }\n\n });\n\n /**\n Renders a checkbox to select all rows on the current page.\n\n @class Backgrid.Extension.SelectAllHeaderCell\n @extends Backgrid.Extension.SelectRowCell\n */\n var SelectAllHeaderCell = Backgrid.Extension.SelectAllHeaderCell = SelectRowCell.extend({\n\n /** @property */\n className: \"select-all-header-cell\",\n\n /** @property */\n tagName: \"th\",\n\n /**\n Initializer. When this cell's checkbox is checked, a Backbone\n `backgrid:select` event will be triggered for each model for the current\n page in the underlying collection. If a `SelectRowCell` instance exists\n for the rows representing the models, they will check themselves. If any\n of the SelectRowCell instances trigger a Backbone `backgrid:selected`\n event with a `false` value, this cell will uncheck its checkbox. In the\n event of a Backbone `backgrid:refresh` event, which is triggered when the\n body refreshes its rows, which can happen under a number of conditions\n such as paging or the columns were reset, this cell will still remember\n the previously selected models and trigger a Backbone `backgrid:select`\n event on them such that the SelectRowCells can recheck themselves upon\n refreshing.\n\n @param {Object} options\n @param {Backgrid.Column} options.column\n @param {Backbone.Collection} options.collection\n */\n initialize: function (options) {\n\n this.column = options.column;\n if (!(this.column instanceof Backgrid.Column)) {\n this.column = new Backgrid.Column(this.column);\n }\n\n var collection = this.collection;\n var selectedModels = this.selectedModels = {};\n this.listenTo(collection.fullCollection || collection,\n \"backgrid:selected\", function (model, selected) {\n if (selected) selectedModels[model.id || model.cid] = 1;\n else {\n delete selectedModels[model.id || model.cid];\n this.$el.find(\"input[type=checkbox]\").prop(\"checked\", false);\n }\n });\n\n this.listenTo(collection.fullCollection || collection, \"remove\", function (model) {\n delete selectedModels[model.id || model.cid];\n });\n\n this.listenTo(collection, \"backgrid:refresh\", function () {\n var checked = this.$el.find(\"input[type=checkbox]\").prop(\"checked\");\n for (var i = 0; i < collection.length; i++) {\n var model = collection.at(i);\n if (checked || selectedModels[model.id || model.cid]) {\n model.trigger(\"backgrid:select\", model, true);\n }\n }\n });\n\n var column = this.column, $el = this.$el;\n this.listenTo(column, \"change:renderable\", function (column, renderable) {\n $el.toggleClass(\"renderable\", renderable);\n });\n\n if (Backgrid.callByNeed(column.renderable(), column, collection)) $el.addClass(\"renderable\");\n },\n\n /**\n Propagates the checked value of this checkbox to all the models of the\n underlying collection by triggering a Backbone `backgrid:select` event on\n the models on the current page, passing each model and the current\n `checked` value of the checkbox in each event.\n\n A `backgrid:selected` event will also be triggered with the current\n `checked` value on all the models regardless of whether they are on the\n current page.\n\n This method triggers a 'backgrid:select-all' event on the collection\n afterwards.\n */\n onChange: function () {\n var checked = this.$el.find(\"input[type=checkbox]\").prop(\"checked\");\n\n var collection = this.collection;\n collection.each(function (model) {\n model.trigger(\"backgrid:select\", model, checked);\n });\n\n if (collection.fullCollection) {\n collection.fullCollection.each(function (model) {\n if (!collection.get(model.cid)) {\n model.trigger(\"backgrid:selected\", model, checked);\n }\n });\n }\n\n this.collection.trigger(\"backgrid:select-all\", this.collection, checked);\n }\n\n });\n\n /**\n Convenient method to retrieve a list of selected models. This method only\n exists when the `SelectAll` extension has been included. Selected models\n are retained across pagination.\n\n @member Backgrid.Grid\n @return {Array.<Backbone.Model>}\n */\n Backgrid.Grid.prototype.getSelectedModels = function () {\n var selectAllHeaderCell;\n var headerCells = this.header.row.cells;\n for (var i = 0, l = headerCells.length; i < l; i++) {\n var headerCell = headerCells[i];\n if (headerCell instanceof SelectAllHeaderCell) {\n selectAllHeaderCell = headerCell;\n break;\n }\n }\n\n var result = [];\n if (selectAllHeaderCell) {\n var selectedModels = selectAllHeaderCell.selectedModels;\n var collection = this.collection.fullCollection || this.collection;\n for (var modelId in selectedModels) {\n result.push(collection.get(modelId));\n }\n }\n\n return result;\n };\n\n /**\n Convenient method to deselect the selected models. This method is only\n available when the `SelectAll` extension has been included.\n\n @member Backgrid.Grid\n */\n Backgrid.Grid.prototype.clearSelectedModels = function () {\n var selectedModels = this.getSelectedModels();\n for (var i = 0, l = selectedModels.length; i < l; i++) {\n var model = selectedModels[i];\n model.trigger(\"backgrid:select\", model, false);\n }\n };\n\n}));\n","/*!\n * Datepicker for Bootstrap v1.5.0 (https://github.com/eternicode/bootstrap-datepicker)\n *\n * Copyright 2012 Stefan Petre\n * Improvements by Andrew Rowls\n * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n */(function(factory){\n if (typeof define === \"function\" && define.amd) {\n define([\"jquery\"], factory);\n } else if (typeof exports === 'object') {\n factory(require('jquery'));\n } else {\n factory(jQuery);\n }\n}(function($, undefined){\n\n\tfunction UTCDate(){\n\t\treturn new Date(Date.UTC.apply(Date, arguments));\n\t}\n\tfunction UTCToday(){\n\t\tvar today = new Date();\n\t\treturn UTCDate(today.getFullYear(), today.getMonth(), today.getDate());\n\t}\n\tfunction isUTCEquals(date1, date2) {\n\t\treturn (\n\t\t\tdate1.getUTCFullYear() === date2.getUTCFullYear() &&\n\t\t\tdate1.getUTCMonth() === date2.getUTCMonth() &&\n\t\t\tdate1.getUTCDate() === date2.getUTCDate()\n\t\t);\n\t}\n\tfunction alias(method){\n\t\treturn function(){\n\t\t\treturn this[method].apply(this, arguments);\n\t\t};\n\t}\n\tfunction isValidDate(d) {\n\t\treturn d && !isNaN(d.getTime());\n\t}\n\n\tvar DateArray = (function(){\n\t\tvar extras = {\n\t\t\tget: function(i){\n\t\t\t\treturn this.slice(i)[0];\n\t\t\t},\n\t\t\tcontains: function(d){\n\t\t\t\t// Array.indexOf is not cross-browser;\n\t\t\t\t// $.inArray doesn't work with Dates\n\t\t\t\tvar val = d && d.valueOf();\n\t\t\t\tfor (var i=0, l=this.length; i < l; i++)\n\t\t\t\t\tif (this[i].valueOf() === val)\n\t\t\t\t\t\treturn i;\n\t\t\t\treturn -1;\n\t\t\t},\n\t\t\tremove: function(i){\n\t\t\t\tthis.splice(i,1);\n\t\t\t},\n\t\t\treplace: function(new_array){\n\t\t\t\tif (!new_array)\n\t\t\t\t\treturn;\n\t\t\t\tif (!$.isArray(new_array))\n\t\t\t\t\tnew_array = [new_array];\n\t\t\t\tthis.clear();\n\t\t\t\tthis.push.apply(this, new_array);\n\t\t\t},\n\t\t\tclear: function(){\n\t\t\t\tthis.length = 0;\n\t\t\t},\n\t\t\tcopy: function(){\n\t\t\t\tvar a = new DateArray();\n\t\t\t\ta.replace(this);\n\t\t\t\treturn a;\n\t\t\t}\n\t\t};\n\n\t\treturn function(){\n\t\t\tvar a = [];\n\t\t\ta.push.apply(a, arguments);\n\t\t\t$.extend(a, extras);\n\t\t\treturn a;\n\t\t};\n\t})();\n\n\n\t// Picker object\n\n\tvar Datepicker = function(element, options){\n\t\tthis._process_options(options);\n\n\t\tthis.dates = new DateArray();\n\t\tthis.viewDate = this.o.defaultViewDate;\n\t\tthis.focusDate = null;\n\n\t\tthis.element = $(element);\n\t\tthis.isInline = false;\n\t\tthis.isInput = this.element.is('input');\n\t\tthis.component = this.element.hasClass('date') ? this.element.find('.add-on, .input-group-addon, .btn') : false;\n\t\tthis.hasInput = this.component && this.element.find('input').length;\n\t\tif (this.component && this.component.length === 0)\n\t\t\tthis.component = false;\n\n\t\tthis.picker = $(DPGlobal.template);\n\t\tthis._buildEvents();\n\t\tthis._attachEvents();\n\n\t\tif (this.isInline){\n\t\t\tthis.picker.addClass('datepicker-inline').appendTo(this.element);\n\t\t}\n\t\telse {\n\t\t\tthis.picker.addClass('datepicker-dropdown dropdown-menu');\n\t\t}\n\n\t\tif (this.o.rtl){\n\t\t\tthis.picker.addClass('datepicker-rtl');\n\t\t}\n\n\t\tthis.viewMode = this.o.startView;\n\n\t\tif (this.o.calendarWeeks)\n\t\t\tthis.picker.find('tfoot .today, tfoot .clear')\n\t\t\t\t\t\t.attr('colspan', function(i, val){\n\t\t\t\t\t\t\treturn parseInt(val) + 1;\n\t\t\t\t\t\t});\n\n\t\tthis._allow_update = false;\n\n\t\tthis.setStartDate(this._o.startDate);\n\t\tthis.setEndDate(this._o.endDate);\n\t\tthis.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);\n\t\tthis.setDaysOfWeekHighlighted(this.o.daysOfWeekHighlighted);\n\t\tthis.setDatesDisabled(this.o.datesDisabled);\n\n\t\tthis.fillDow();\n\t\tthis.fillMonths();\n\n\t\tthis._allow_update = true;\n\n\t\tthis.update();\n\t\tthis.showMode();\n\n\t\tif (this.isInline){\n\t\t\tthis.show();\n\t\t}\n\t};\n\n\tDatepicker.prototype = {\n\t\tconstructor: Datepicker,\n\n\t\t_process_options: function(opts){\n\t\t\t// Store raw options for reference\n\t\t\tthis._o = $.extend({}, this._o, opts);\n\t\t\t// Processed options\n\t\t\tvar o = this.o = $.extend({}, this._o);\n\n\t\t\t// Check if \"de-DE\" style date is available, if not language should\n\t\t\t// fallback to 2 letter code eg \"de\"\n\t\t\tvar lang = o.language;\n\t\t\tif (!dates[lang]){\n\t\t\t\tlang = lang.split('-')[0];\n\t\t\t\tif (!dates[lang])\n\t\t\t\t\tlang = defaults.language;\n\t\t\t}\n\t\t\to.language = lang;\n\n\t\t\tswitch (o.startView){\n\t\t\t\tcase 2:\n\t\t\t\tcase 'decade':\n\t\t\t\t\to.startView = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tcase 'year':\n\t\t\t\t\to.startView = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\to.startView = 0;\n\t\t\t}\n\n\t\t\tswitch (o.minViewMode){\n\t\t\t\tcase 1:\n\t\t\t\tcase 'months':\n\t\t\t\t\to.minViewMode = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tcase 'years':\n\t\t\t\t\to.minViewMode = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\to.minViewMode = 0;\n\t\t\t}\n\n\t\t\tswitch (o.maxViewMode) {\n\t\t\t\tcase 0:\n\t\t\t\tcase 'days':\n\t\t\t\t\to.maxViewMode = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tcase 'months':\n\t\t\t\t\to.maxViewMode = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\to.maxViewMode = 2;\n\t\t\t}\n\n\t\t\to.startView = Math.min(o.startView, o.maxViewMode);\n\t\t\to.startView = Math.max(o.startView, o.minViewMode);\n\n\t\t\t// true, false, or Number > 0\n\t\t\tif (o.multidate !== true){\n\t\t\t\to.multidate = Number(o.multidate) || false;\n\t\t\t\tif (o.multidate !== false)\n\t\t\t\t\to.multidate = Math.max(0, o.multidate);\n\t\t\t}\n\t\t\to.multidateSeparator = String(o.multidateSeparator);\n\n\t\t\to.weekStart %= 7;\n\t\t\to.weekEnd = ((o.weekStart + 6) % 7);\n\n\t\t\tvar format = DPGlobal.parseFormat(o.format);\n\t\t\tif (o.startDate !== -Infinity){\n\t\t\t\tif (!!o.startDate){\n\t\t\t\t\tif (o.startDate instanceof Date)\n\t\t\t\t\t\to.startDate = this._local_to_utc(this._zero_time(o.startDate));\n\t\t\t\t\telse\n\t\t\t\t\t\to.startDate = DPGlobal.parseDate(o.startDate, format, o.language);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\to.startDate = -Infinity;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (o.endDate !== Infinity){\n\t\t\t\tif (!!o.endDate){\n\t\t\t\t\tif (o.endDate instanceof Date)\n\t\t\t\t\t\to.endDate = this._local_to_utc(this._zero_time(o.endDate));\n\t\t\t\t\telse\n\t\t\t\t\t\to.endDate = DPGlobal.parseDate(o.endDate, format, o.language);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\to.endDate = Infinity;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\to.daysOfWeekDisabled = o.daysOfWeekDisabled||[];\n\t\t\tif (!$.isArray(o.daysOfWeekDisabled))\n\t\t\t\to.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\\s]*/);\n\t\t\to.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function(d){\n\t\t\t\treturn parseInt(d, 10);\n\t\t\t});\n\n\t\t\to.daysOfWeekHighlighted = o.daysOfWeekHighlighted||[];\n\t\t\tif (!$.isArray(o.daysOfWeekHighlighted))\n\t\t\t\to.daysOfWeekHighlighted = o.daysOfWeekHighlighted.split(/[,\\s]*/);\n\t\t\to.daysOfWeekHighlighted = $.map(o.daysOfWeekHighlighted, function(d){\n\t\t\t\treturn parseInt(d, 10);\n\t\t\t});\n\n\t\t\to.datesDisabled = o.datesDisabled||[];\n\t\t\tif (!$.isArray(o.datesDisabled)) {\n\t\t\t\tvar datesDisabled = [];\n\t\t\t\tdatesDisabled.push(DPGlobal.parseDate(o.datesDisabled, format, o.language));\n\t\t\t\to.datesDisabled = datesDisabled;\n\t\t\t}\n\t\t\to.datesDisabled = $.map(o.datesDisabled,function(d){\n\t\t\t\treturn DPGlobal.parseDate(d, format, o.language);\n\t\t\t});\n\n\t\t\tvar plc = String(o.orientation).toLowerCase().split(/\\s+/g),\n\t\t\t\t_plc = o.orientation.toLowerCase();\n\t\t\tplc = $.grep(plc, function(word){\n\t\t\t\treturn /^auto|left|right|top|bottom$/.test(word);\n\t\t\t});\n\t\t\to.orientation = {x: 'auto', y: 'auto'};\n\t\t\tif (!_plc || _plc === 'auto')\n\t\t\t\t; // no action\n\t\t\telse if (plc.length === 1){\n\t\t\t\tswitch (plc[0]){\n\t\t\t\t\tcase 'top':\n\t\t\t\t\tcase 'bottom':\n\t\t\t\t\t\to.orientation.y = plc[0];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'left':\n\t\t\t\t\tcase 'right':\n\t\t\t\t\t\to.orientation.x = plc[0];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_plc = $.grep(plc, function(word){\n\t\t\t\t\treturn /^left|right$/.test(word);\n\t\t\t\t});\n\t\t\t\to.orientation.x = _plc[0] || 'auto';\n\n\t\t\t\t_plc = $.grep(plc, function(word){\n\t\t\t\t\treturn /^top|bottom$/.test(word);\n\t\t\t\t});\n\t\t\t\to.orientation.y = _plc[0] || 'auto';\n\t\t\t}\n\t\t\tif (o.defaultViewDate) {\n\t\t\t\tvar year = o.defaultViewDate.year || new Date().getFullYear();\n\t\t\t\tvar month = o.defaultViewDate.month || 0;\n\t\t\t\tvar day = o.defaultViewDate.day || 1;\n\t\t\t\to.defaultViewDate = UTCDate(year, month, day);\n\t\t\t} else {\n\t\t\t\to.defaultViewDate = UTCToday();\n\t\t\t}\n\t\t\to.showOnFocus = o.showOnFocus !== undefined ? o.showOnFocus : true;\n\t\t\to.zIndexOffset = o.zIndexOffset !== undefined ? o.zIndexOffset : 10;\n\t\t},\n\t\t_events: [],\n\t\t_secondaryEvents: [],\n\t\t_applyEvents: function(evs){\n\t\t\tfor (var i=0, el, ch, ev; i < evs.length; i++){\n\t\t\t\tel = evs[i][0];\n\t\t\t\tif (evs[i].length === 2){\n\t\t\t\t\tch = undefined;\n\t\t\t\t\tev = evs[i][1];\n\t\t\t\t}\n\t\t\t\telse if (evs[i].length === 3){\n\t\t\t\t\tch = evs[i][1];\n\t\t\t\t\tev = evs[i][2];\n\t\t\t\t}\n\t\t\t\tel.on(ev, ch);\n\t\t\t}\n\t\t},\n\t\t_unapplyEvents: function(evs){\n\t\t\tfor (var i=0, el, ev, ch; i < evs.length; i++){\n\t\t\t\tel = evs[i][0];\n\t\t\t\tif (evs[i].length === 2){\n\t\t\t\t\tch = undefined;\n\t\t\t\t\tev = evs[i][1];\n\t\t\t\t}\n\t\t\t\telse if (evs[i].length === 3){\n\t\t\t\t\tch = evs[i][1];\n\t\t\t\t\tev = evs[i][2];\n\t\t\t\t}\n\t\t\t\tel.off(ev, ch);\n\t\t\t}\n\t\t},\n\t\t_buildEvents: function(){\n var events = {\n keyup: $.proxy(function(e){\n if ($.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1)\n this.update();\n }, this),\n keydown: $.proxy(this.keydown, this),\n paste: $.proxy(this.paste, this)\n };\n\n if (this.o.showOnFocus === true) {\n events.focus = $.proxy(this.show, this);\n }\n\n if (this.isInput) { // single input\n this._events = [\n [this.element, events]\n ];\n }\n else if (this.component && this.hasInput) { // component: input + button\n this._events = [\n // For components that are not readonly, allow keyboard nav\n [this.element.find('input'), events],\n [this.component, {\n click: $.proxy(this.show, this)\n }]\n ];\n }\n\t\t\telse if (this.element.is('div')){ // inline datepicker\n\t\t\t\tthis.isInline = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._events = [\n\t\t\t\t\t[this.element, {\n\t\t\t\t\t\tclick: $.proxy(this.show, this)\n\t\t\t\t\t}]\n\t\t\t\t];\n\t\t\t}\n\t\t\tthis._events.push(\n\t\t\t\t// Component: listen for blur on element descendants\n\t\t\t\t[this.element, '*', {\n\t\t\t\t\tblur: $.proxy(function(e){\n\t\t\t\t\t\tthis._focused_from = e.target;\n\t\t\t\t\t}, this)\n\t\t\t\t}],\n\t\t\t\t// Input: listen for blur on element\n\t\t\t\t[this.element, {\n\t\t\t\t\tblur: $.proxy(function(e){\n\t\t\t\t\t\tthis._focused_from = e.target;\n\t\t\t\t\t}, this)\n\t\t\t\t}]\n\t\t\t);\n\n\t\t\tif (this.o.immediateUpdates) {\n\t\t\t\t// Trigger input updates immediately on changed year/month\n\t\t\t\tthis._events.push([this.element, {\n\t\t\t\t\t'changeYear changeMonth': $.proxy(function(e){\n\t\t\t\t\t\tthis.update(e.date);\n\t\t\t\t\t}, this)\n\t\t\t\t}]);\n\t\t\t}\n\n\t\t\tthis._secondaryEvents = [\n\t\t\t\t[this.picker, {\n\t\t\t\t\tclick: $.proxy(this.click, this)\n\t\t\t\t}],\n\t\t\t\t[$(window), {\n\t\t\t\t\tresize: $.proxy(this.place, this)\n\t\t\t\t}],\n\t\t\t\t[$(document), {\n\t\t\t\t\tmousedown: $.proxy(function(e){\n\t\t\t\t\t\t// Clicked outside the datepicker, hide it\n\t\t\t\t\t\tif (!(\n\t\t\t\t\t\t\tthis.element.is(e.target) ||\n\t\t\t\t\t\t\tthis.element.find(e.target).length ||\n\t\t\t\t\t\t\tthis.picker.is(e.target) ||\n\t\t\t\t\t\t\tthis.picker.find(e.target).length ||\n\t\t\t\t\t\t\tthis.picker.hasClass('datepicker-inline')\n\t\t\t\t\t\t)){\n\t\t\t\t\t\t\tthis.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this)\n\t\t\t\t}]\n\t\t\t];\n\t\t},\n\t\t_attachEvents: function(){\n\t\t\tthis._detachEvents();\n\t\t\tthis._applyEvents(this._events);\n\t\t},\n\t\t_detachEvents: function(){\n\t\t\tthis._unapplyEvents(this._events);\n\t\t},\n\t\t_attachSecondaryEvents: function(){\n\t\t\tthis._detachSecondaryEvents();\n\t\t\tthis._applyEvents(this._secondaryEvents);\n\t\t},\n\t\t_detachSecondaryEvents: function(){\n\t\t\tthis._unapplyEvents(this._secondaryEvents);\n\t\t},\n\t\t_trigger: function(event, altdate){\n\t\t\tvar date = altdate || this.dates.get(-1),\n\t\t\t\tlocal_date = this._utc_to_local(date);\n\n\t\t\tthis.element.trigger({\n\t\t\t\ttype: event,\n\t\t\t\tdate: local_date,\n\t\t\t\tdates: $.map(this.dates, this._utc_to_local),\n\t\t\t\tformat: $.proxy(function(ix, format){\n\t\t\t\t\tif (arguments.length === 0){\n\t\t\t\t\t\tix = this.dates.length - 1;\n\t\t\t\t\t\tformat = this.o.format;\n\t\t\t\t\t}\n\t\t\t\t\telse if (typeof ix === 'string'){\n\t\t\t\t\t\tformat = ix;\n\t\t\t\t\t\tix = this.dates.length - 1;\n\t\t\t\t\t}\n\t\t\t\t\tformat = format || this.o.format;\n\t\t\t\t\tvar date = this.dates.get(ix);\n\t\t\t\t\treturn DPGlobal.formatDate(date, format, this.o.language);\n\t\t\t\t}, this)\n\t\t\t});\n\t\t},\n\n\t\tshow: function(){\n\t\t\tif (this.element.attr('readonly') && this.o.enableOnReadonly === false)\n\t\t\t\treturn;\n\t\t\tif (!this.isInline)\n\t\t\t\tthis.picker.appendTo(this.o.container);\n\t\t\tthis.place();\n\t\t\tthis.picker.show();\n\t\t\tthis._attachSecondaryEvents();\n\t\t\tthis._trigger('show');\n\t\t\tif ((window.navigator.msMaxTouchPoints || 'ontouchstart' in document) && this.o.disableTouchKeyboard) {\n\t\t\t\t$(this.element).blur();\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\n\t\thide: function(){\n\t\t\tif (this.isInline)\n\t\t\t\treturn this;\n\t\t\tif (!this.picker.is(':visible'))\n\t\t\t\treturn this;\n\t\t\tthis.focusDate = null;\n\t\t\tthis.picker.hide().detach();\n\t\t\tthis._detachSecondaryEvents();\n\t\t\tthis.viewMode = this.o.startView;\n\t\t\tthis.showMode();\n\n\t\t\tif (\n\t\t\t\tthis.o.forceParse &&\n\t\t\t\t(\n\t\t\t\t\tthis.isInput && this.element.val() ||\n\t\t\t\t\tthis.hasInput && this.element.find('input').val()\n\t\t\t\t)\n\t\t\t)\n\t\t\t\tthis.setValue();\n\t\t\tthis._trigger('hide');\n\t\t\treturn this;\n\t\t},\n\n\t\tremove: function(){\n\t\t\tthis.hide();\n\t\t\tthis._detachEvents();\n\t\t\tthis._detachSecondaryEvents();\n\t\t\tthis.picker.remove();\n\t\t\tdelete this.element.data().datepicker;\n\t\t\tif (!this.isInput){\n\t\t\t\tdelete this.element.data().date;\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\n\t\tpaste: function(evt){\n\t\t\tvar dateString;\n\t\t\tif (evt.originalEvent.clipboardData && evt.originalEvent.clipboardData.types\n\t\t\t\t&& $.inArray('text/plain', evt.originalEvent.clipboardData.types) !== -1) {\n\t\t\t\tdateString = evt.originalEvent.clipboardData.getData('text/plain');\n\t\t\t}\n\t\t\telse if (window.clipboardData) {\n\t\t\t\tdateString = window.clipboardData.getData('Text');\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setDate(dateString);\n\t\t\tthis.update();\n\t\t\tevt.preventDefault();\n\t\t},\n\n\t\t_utc_to_local: function(utc){\n\t\t\treturn utc && new Date(utc.getTime() + (utc.getTimezoneOffset()*60000));\n\t\t},\n\t\t_local_to_utc: function(local){\n\t\t\treturn local && new Date(local.getTime() - (local.getTimezoneOffset()*60000));\n\t\t},\n\t\t_zero_time: function(local){\n\t\t\treturn local && new Date(local.getFullYear(), local.getMonth(), local.getDate());\n\t\t},\n\t\t_zero_utc_time: function(utc){\n\t\t\treturn utc && new Date(Date.UTC(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate()));\n\t\t},\n\n\t\tgetDates: function(){\n\t\t\treturn $.map(this.dates, this._utc_to_local);\n\t\t},\n\n\t\tgetUTCDates: function(){\n\t\t\treturn $.map(this.dates, function(d){\n\t\t\t\treturn new Date(d);\n\t\t\t});\n\t\t},\n\n\t\tgetDate: function(){\n\t\t\treturn this._utc_to_local(this.getUTCDate());\n\t\t},\n\n\t\tgetUTCDate: function(){\n\t\t\tvar selected_date = this.dates.get(-1);\n\t\t\tif (typeof selected_date !== 'undefined') {\n\t\t\t\treturn new Date(selected_date);\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t},\n\n\t\tclearDates: function(){\n\t\t\tvar element;\n\t\t\tif (this.isInput) {\n\t\t\t\telement = this.element;\n\t\t\t} else if (this.component) {\n\t\t\t\telement = this.element.find('input');\n\t\t\t}\n\n\t\t\tif (element) {\n\t\t\t\telement.val('');\n\t\t\t}\n\n\t\t\tthis.update();\n\t\t\tthis._trigger('changeDate');\n\n\t\t\tif (this.o.autoclose) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t},\n\t\tsetDates: function(){\n\t\t\tvar args = $.isArray(arguments[0]) ? arguments[0] : arguments;\n\t\t\tthis.update.apply(this, args);\n\t\t\tthis._trigger('changeDate');\n\t\t\tthis.setValue();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetUTCDates: function(){\n\t\t\tvar args = $.isArray(arguments[0]) ? arguments[0] : arguments;\n\t\t\tthis.update.apply(this, $.map(args, this._utc_to_local));\n\t\t\tthis._trigger('changeDate');\n\t\t\tthis.setValue();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetDate: alias('setDates'),\n\t\tsetUTCDate: alias('setUTCDates'),\n\n\t\tsetValue: function(){\n\t\t\tvar formatted = this.getFormattedDate();\n\t\t\tif (!this.isInput){\n\t\t\t\tif (this.component){\n\t\t\t\t\tthis.element.find('input').val(formatted);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.element.val(formatted);\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\n\t\tgetFormattedDate: function(format){\n\t\t\tif (format === undefined)\n\t\t\t\tformat = this.o.format;\n\n\t\t\tvar lang = this.o.language;\n\t\t\treturn $.map(this.dates, function(d){\n\t\t\t\treturn DPGlobal.formatDate(d, format, lang);\n\t\t\t}).join(this.o.multidateSeparator);\n\t\t},\n\n\t\tsetStartDate: function(startDate){\n\t\t\tthis._process_options({startDate: startDate});\n\t\t\tthis.update();\n\t\t\tthis.updateNavArrows();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetEndDate: function(endDate){\n\t\t\tthis._process_options({endDate: endDate});\n\t\t\tthis.update();\n\t\t\tthis.updateNavArrows();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetDaysOfWeekDisabled: function(daysOfWeekDisabled){\n\t\t\tthis._process_options({daysOfWeekDisabled: daysOfWeekDisabled});\n\t\t\tthis.update();\n\t\t\tthis.updateNavArrows();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetDaysOfWeekHighlighted: function(daysOfWeekHighlighted){\n\t\t\tthis._process_options({daysOfWeekHighlighted: daysOfWeekHighlighted});\n\t\t\tthis.update();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetDatesDisabled: function(datesDisabled){\n\t\t\tthis._process_options({datesDisabled: datesDisabled});\n\t\t\tthis.update();\n\t\t\tthis.updateNavArrows();\n\t\t},\n\n\t\tplace: function(){\n\t\t\tif (this.isInline)\n\t\t\t\treturn this;\n\t\t\tvar calendarWidth = this.picker.outerWidth(),\n\t\t\t\tcalendarHeight = this.picker.outerHeight(),\n\t\t\t\tvisualPadding = 10,\n\t\t\t\tcontainer = $(this.o.container),\n\t\t\t\twindowWidth = container.width(),\n\t\t\t\tscrollTop = container.scrollTop(),\n\t\t\t\tappendOffset = container.offset();\n\n\t\t\tvar parentsZindex = [];\n\t\t\tthis.element.parents().each(function(){\n\t\t\t\tvar itemZIndex = $(this).css('z-index');\n\t\t\t\tif (itemZIndex !== 'auto' && itemZIndex !== 0) parentsZindex.push(parseInt(itemZIndex));\n\t\t\t});\n\t\t\tvar zIndex = Math.max.apply(Math, parentsZindex) + this.o.zIndexOffset;\n\t\t\tvar offset = this.component ? this.component.parent().offset() : this.element.offset();\n\t\t\tvar height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false);\n\t\t\tvar width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false);\n\t\t\tvar left = offset.left - appendOffset.left,\n\t\t\t\ttop = offset.top - appendOffset.top;\n\n\t\t\tthis.picker.removeClass(\n\t\t\t\t'datepicker-orient-top datepicker-orient-bottom '+\n\t\t\t\t'datepicker-orient-right datepicker-orient-left'\n\t\t\t);\n\n\t\t\tif (this.o.orientation.x !== 'auto'){\n\t\t\t\tthis.picker.addClass('datepicker-orient-' + this.o.orientation.x);\n\t\t\t\tif (this.o.orientation.x === 'right')\n\t\t\t\t\tleft -= calendarWidth - width;\n\t\t\t}\n\t\t\t// auto x orientation is best-placement: if it crosses a window\n\t\t\t// edge, fudge it sideways\n\t\t\telse {\n\t\t\t\tif (offset.left < 0) {\n\t\t\t\t\t// component is outside the window on the left side. Move it into visible range\n\t\t\t\t\tthis.picker.addClass('datepicker-orient-left');\n\t\t\t\t\tleft -= offset.left - visualPadding;\n\t\t\t\t} else if (left + calendarWidth > windowWidth) {\n\t\t\t\t\t// the calendar passes the widow right edge. Align it to component right side\n\t\t\t\t\tthis.picker.addClass('datepicker-orient-right');\n\t\t\t\t\tleft = offset.left + width - calendarWidth;\n\t\t\t\t} else {\n\t\t\t\t\t// Default to left\n\t\t\t\t\tthis.picker.addClass('datepicker-orient-left');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// auto y orientation is best-situation: top or bottom, no fudging,\n\t\t\t// decision based on which shows more of the calendar\n\t\t\tvar yorient = this.o.orientation.y,\n\t\t\t\ttop_overflow;\n\t\t\tif (yorient === 'auto'){\n\t\t\t\ttop_overflow = -scrollTop + top - calendarHeight;\n\t\t\t\tyorient = top_overflow < 0 ? 'bottom' : 'top';\n\t\t\t}\n\n\t\t\tthis.picker.addClass('datepicker-orient-' + yorient);\n\t\t\tif (yorient === 'top')\n\t\t\t\ttop -= calendarHeight + parseInt(this.picker.css('padding-top'));\n\t\t\telse\n\t\t\t\ttop += height;\n\n\t\t\tif (this.o.rtl) {\n\t\t\t\tvar right = windowWidth - (left + width);\n\t\t\t\tthis.picker.css({\n\t\t\t\t\ttop: top,\n\t\t\t\t\tright: right,\n\t\t\t\t\tzIndex: zIndex\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.picker.css({\n\t\t\t\t\ttop: top,\n\t\t\t\t\tleft: left,\n\t\t\t\t\tzIndex: zIndex\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\n\t\t_allow_update: true,\n\t\tupdate: function(){\n\t\t\tif (!this._allow_update)\n\t\t\t\treturn this;\n\n\t\t\tvar oldDates = this.dates.copy(),\n\t\t\t\tdates = [],\n\t\t\t\tfromArgs = false;\n\t\t\tif (arguments.length){\n\t\t\t\t$.each(arguments, $.proxy(function(i, date){\n\t\t\t\t\tif (date instanceof Date)\n\t\t\t\t\t\tdate = this._local_to_utc(date);\n\t\t\t\t\tdates.push(date);\n\t\t\t\t}, this));\n\t\t\t\tfromArgs = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdates = this.isInput\n\t\t\t\t\t\t? this.element.val()\n\t\t\t\t\t\t: this.element.data('date') || this.element.find('input').val();\n\t\t\t\tif (dates && this.o.multidate)\n\t\t\t\t\tdates = dates.split(this.o.multidateSeparator);\n\t\t\t\telse\n\t\t\t\t\tdates = [dates];\n\t\t\t\tdelete this.element.data().date;\n\t\t\t}\n\n\t\t\tdates = $.map(dates, $.proxy(function(date){\n\t\t\t\treturn DPGlobal.parseDate(date, this.o.format, this.o.language);\n\t\t\t}, this));\n\t\t\tdates = $.grep(dates, $.proxy(function(date){\n\t\t\t\treturn (\n\t\t\t\t\tdate < this.o.startDate ||\n\t\t\t\t\tdate > this.o.endDate ||\n\t\t\t\t\t!date\n\t\t\t\t);\n\t\t\t}, this), true);\n\t\t\tthis.dates.replace(dates);\n\n\t\t\tif (this.dates.length)\n\t\t\t\tthis.viewDate = new Date(this.dates.get(-1));\n\t\t\telse if (this.viewDate < this.o.startDate)\n\t\t\t\tthis.viewDate = new Date(this.o.startDate);\n\t\t\telse if (this.viewDate > this.o.endDate)\n\t\t\t\tthis.viewDate = new Date(this.o.endDate);\n\t\t\telse\n\t\t\t\tthis.viewDate = this.o.defaultViewDate;\n\n\t\t\tif (fromArgs){\n\t\t\t\t// setting date by clicking\n\t\t\t\tthis.setValue();\n\t\t\t}\n\t\t\telse if (dates.length){\n\t\t\t\t// setting date by typing\n\t\t\t\tif (String(oldDates) !== String(this.dates))\n\t\t\t\t\tthis._trigger('changeDate');\n\t\t\t}\n\t\t\tif (!this.dates.length && oldDates.length)\n\t\t\t\tthis._trigger('clearDate');\n\n\t\t\tthis.fill();\n\t\t\tthis.element.change();\n\t\t\treturn this;\n\t\t},\n\n\t\tfillDow: function(){\n\t\t\tvar dowCnt = this.o.weekStart,\n\t\t\t\thtml = '<tr>';\n\t\t\tif (this.o.calendarWeeks){\n\t\t\t\tthis.picker.find('.datepicker-days .datepicker-switch')\n\t\t\t\t\t.attr('colspan', function(i, val){\n\t\t\t\t\t\treturn parseInt(val) + 1;\n\t\t\t\t\t});\n\t\t\t\thtml += '<th class=\"cw\"> </th>';\n\t\t\t}\n\t\t\twhile (dowCnt < this.o.weekStart + 7){\n\t\t\t\thtml += '<th class=\"dow\">'+dates[this.o.language].daysMin[(dowCnt++)%7]+'</th>';\n\t\t\t}\n\t\t\thtml += '</tr>';\n\t\t\tthis.picker.find('.datepicker-days thead').append(html);\n\t\t},\n\n\t\tfillMonths: function(){\n\t\t\tvar html = '',\n\t\t\ti = 0;\n\t\t\twhile (i < 12){\n\t\t\t\thtml += '<span class=\"month\">'+dates[this.o.language].monthsShort[i++]+'</span>';\n\t\t\t}\n\t\t\tthis.picker.find('.datepicker-months td').html(html);\n\t\t},\n\n\t\tsetRange: function(range){\n\t\t\tif (!range || !range.length)\n\t\t\t\tdelete this.range;\n\t\t\telse\n\t\t\t\tthis.range = $.map(range, function(d){\n\t\t\t\t\treturn d.valueOf();\n\t\t\t\t});\n\t\t\tthis.fill();\n\t\t},\n\n\t\tgetClassNames: function(date){\n\t\t\tvar cls = [],\n\t\t\t\tyear = this.viewDate.getUTCFullYear(),\n\t\t\t\tmonth = this.viewDate.getUTCMonth(),\n\t\t\t\ttoday = new Date();\n\t\t\tif (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)){\n\t\t\t\tcls.push('old');\n\t\t\t}\n\t\t\telse if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)){\n\t\t\t\tcls.push('new');\n\t\t\t}\n\t\t\tif (this.focusDate && date.valueOf() === this.focusDate.valueOf())\n\t\t\t\tcls.push('focused');\n\t\t\t// Compare internal UTC date with local today, not UTC today\n\t\t\tif (this.o.todayHighlight &&\n\t\t\t\tdate.getUTCFullYear() === today.getFullYear() &&\n\t\t\t\tdate.getUTCMonth() === today.getMonth() &&\n\t\t\t\tdate.getUTCDate() === today.getDate()){\n\t\t\t\tcls.push('today');\n\t\t\t}\n\t\t\tif (this.dates.contains(date) !== -1)\n\t\t\t\tcls.push('active');\n\t\t\tif (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate ||\n\t\t\t\t$.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1){\n\t\t\t\tcls.push('disabled');\n\t\t\t}\n\t\t\tif ($.inArray(date.getUTCDay(), this.o.daysOfWeekHighlighted) !== -1){\n\t\t\t\tcls.push('highlighted');\n\t\t\t}\n\t\t\tif (this.o.datesDisabled.length > 0 &&\n\t\t\t\t$.grep(this.o.datesDisabled, function(d){\n\t\t\t\t\treturn isUTCEquals(date, d); }).length > 0) {\n\t\t\t\tcls.push('disabled', 'disabled-date');\n\t\t\t}\n\n\t\t\tif (this.range){\n\t\t\t\tif (date > this.range[0] && date < this.range[this.range.length-1]){\n\t\t\t\t\tcls.push('range');\n\t\t\t\t}\n\t\t\t\tif ($.inArray(date.valueOf(), this.range) !== -1){\n\t\t\t\t\tcls.push('selected');\n\t\t\t\t}\n\t\t\t\tif (date.valueOf() === this.range[0]){\n cls.push('range-start');\n }\n if (date.valueOf() === this.range[this.range.length-1]){\n cls.push('range-end');\n }\n\t\t\t}\n\t\t\treturn cls;\n\t\t},\n\n\t\tfill: function(){\n\t\t\tvar d = new Date(this.viewDate),\n\t\t\t\tyear = d.getUTCFullYear(),\n\t\t\t\tmonth = d.getUTCMonth(),\n\t\t\t\tstartYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity,\n\t\t\t\tstartMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity,\n\t\t\t\tendYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity,\n\t\t\t\tendMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity,\n\t\t\t\ttodaytxt = dates[this.o.language].today || dates['en'].today || '',\n\t\t\t\tcleartxt = dates[this.o.language].clear || dates['en'].clear || '',\n\t\t\t\ttitleFormat = dates[this.o.language].titleFormat || dates['en'].titleFormat,\n\t\t\t\ttooltip;\n\t\t\tif (isNaN(year) || isNaN(month))\n\t\t\t\treturn;\n\t\t\tthis.picker.find('.datepicker-days thead .datepicker-switch')\n\t\t\t\t\t\t.text(DPGlobal.formatDate(new UTCDate(year, month), titleFormat, this.o.language));\n\t\t\tthis.picker.find('tfoot .today')\n\t\t\t\t\t\t.text(todaytxt)\n\t\t\t\t\t\t.toggle(this.o.todayBtn !== false);\n\t\t\tthis.picker.find('tfoot .clear')\n\t\t\t\t\t\t.text(cleartxt)\n\t\t\t\t\t\t.toggle(this.o.clearBtn !== false);\n\t\t\tthis.picker.find('thead .datepicker-title')\n\t\t\t\t\t\t.text(this.o.title)\n\t\t\t\t\t\t.toggle(this.o.title !== '');\n\t\t\tthis.updateNavArrows();\n\t\t\tthis.fillMonths();\n\t\t\tvar prevMonth = UTCDate(year, month-1, 28),\n\t\t\t\tday = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth());\n\t\t\tprevMonth.setUTCDate(day);\n\t\t\tprevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7);\n\t\t\tvar nextMonth = new Date(prevMonth);\n\t\t\tif (prevMonth.getUTCFullYear() < 100){\n nextMonth.setUTCFullYear(prevMonth.getUTCFullYear());\n }\n\t\t\tnextMonth.setUTCDate(nextMonth.getUTCDate() + 42);\n\t\t\tnextMonth = nextMonth.valueOf();\n\t\t\tvar html = [];\n\t\t\tvar clsName;\n\t\t\twhile (prevMonth.valueOf() < nextMonth){\n\t\t\t\tif (prevMonth.getUTCDay() === this.o.weekStart){\n\t\t\t\t\thtml.push('<tr>');\n\t\t\t\t\tif (this.o.calendarWeeks){\n\t\t\t\t\t\t// ISO 8601: First week contains first thursday.\n\t\t\t\t\t\t// ISO also states week starts on Monday, but we can be more abstract here.\n\t\t\t\t\t\tvar\n\t\t\t\t\t\t\t// Start of current week: based on weekstart/current date\n\t\t\t\t\t\t\tws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5),\n\t\t\t\t\t\t\t// Thursday of this week\n\t\t\t\t\t\t\tth = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5),\n\t\t\t\t\t\t\t// First Thursday of year, year from thursday\n\t\t\t\t\t\t\tyth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5),\n\t\t\t\t\t\t\t// Calendar week: ms between thursdays, div ms per day, div 7 days\n\t\t\t\t\t\t\tcalWeek = (th - yth) / 864e5 / 7 + 1;\n\t\t\t\t\t\thtml.push('<td class=\"cw\">'+ calWeek +'</td>');\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclsName = this.getClassNames(prevMonth);\n\t\t\t\tclsName.push('day');\n\n\t\t\t\tif (this.o.beforeShowDay !== $.noop){\n\t\t\t\t\tvar before = this.o.beforeShowDay(this._utc_to_local(prevMonth));\n\t\t\t\t\tif (before === undefined)\n\t\t\t\t\t\tbefore = {};\n\t\t\t\t\telse if (typeof(before) === 'boolean')\n\t\t\t\t\t\tbefore = {enabled: before};\n\t\t\t\t\telse if (typeof(before) === 'string')\n\t\t\t\t\t\tbefore = {classes: before};\n\t\t\t\t\tif (before.enabled === false)\n\t\t\t\t\t\tclsName.push('disabled');\n\t\t\t\t\tif (before.classes)\n\t\t\t\t\t\tclsName = clsName.concat(before.classes.split(/\\s+/));\n\t\t\t\t\tif (before.tooltip)\n\t\t\t\t\t\ttooltip = before.tooltip;\n\t\t\t\t}\n\n\t\t\t\tclsName = $.unique(clsName);\n\t\t\t\thtml.push('<td class=\"'+clsName.join(' ')+'\"' + (tooltip ? ' title=\"'+tooltip+'\"' : '') + '>'+prevMonth.getUTCDate() + '</td>');\n\t\t\t\ttooltip = null;\n\t\t\t\tif (prevMonth.getUTCDay() === this.o.weekEnd){\n\t\t\t\t\thtml.push('</tr>');\n\t\t\t\t}\n\t\t\t\tprevMonth.setUTCDate(prevMonth.getUTCDate()+1);\n\t\t\t}\n\t\t\tthis.picker.find('.datepicker-days tbody').empty().append(html.join(''));\n\n\t\t\tvar months = this.picker.find('.datepicker-months')\n\t\t\t\t\t\t.find('.datepicker-switch')\n\t\t\t\t\t\t\t.text(this.o.maxViewMode < 2 ? 'Months' : year)\n\t\t\t\t\t\t\t.end()\n\t\t\t\t\t\t.find('span').removeClass('active');\n\n\t\t\t$.each(this.dates, function(i, d){\n\t\t\t\tif (d.getUTCFullYear() === year)\n\t\t\t\t\tmonths.eq(d.getUTCMonth()).addClass('active');\n\t\t\t});\n\n\t\t\tif (year < startYear || year > endYear){\n\t\t\t\tmonths.addClass('disabled');\n\t\t\t}\n\t\t\tif (year === startYear){\n\t\t\t\tmonths.slice(0, startMonth).addClass('disabled');\n\t\t\t}\n\t\t\tif (year === endYear){\n\t\t\t\tmonths.slice(endMonth+1).addClass('disabled');\n\t\t\t}\n\n\t\t\tif (this.o.beforeShowMonth !== $.noop){\n\t\t\t\tvar that = this;\n\t\t\t\t$.each(months, function(i, month){\n\t\t\t\t\tif (!$(month).hasClass('disabled')) {\n\t\t\t\t\t\tvar moDate = new Date(year, i, 1);\n\t\t\t\t\t\tvar before = that.o.beforeShowMonth(moDate);\n\t\t\t\t\t\tif (before === false)\n\t\t\t\t\t\t\t$(month).addClass('disabled');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\thtml = '';\n\t\t\tyear = parseInt(year/10, 10) * 10;\n\t\t\tvar yearCont = this.picker.find('.datepicker-years')\n\t\t\t\t\t\t\t\t.find('.datepicker-switch')\n\t\t\t\t\t\t\t\t\t.text(year + '-' + (year + 9))\n\t\t\t\t\t\t\t\t\t.end()\n\t\t\t\t\t\t\t\t.find('td');\n\t\t\tyear -= 1;\n\t\t\tvar years = $.map(this.dates, function(d){\n\t\t\t\t\treturn d.getUTCFullYear();\n\t\t\t\t}),\n\t\t\t\tclasses;\n\t\t\tfor (var i = -1; i < 11; i++){\n\t\t\t\tclasses = ['year'];\n\t\t\t\ttooltip = null;\n\n\t\t\t\tif (i === -1)\n\t\t\t\t\tclasses.push('old');\n\t\t\t\telse if (i === 10)\n\t\t\t\t\tclasses.push('new');\n\t\t\t\tif ($.inArray(year, years) !== -1)\n\t\t\t\t\tclasses.push('active');\n\t\t\t\tif (year < startYear || year > endYear)\n\t\t\t\t\tclasses.push('disabled');\n\n\t\t\t\tif (this.o.beforeShowYear !== $.noop) {\n\t\t\t\t\tvar yrBefore = this.o.beforeShowYear(new Date(year, 0, 1));\n\t\t\t\t\tif (yrBefore === undefined)\n\t\t\t\t\t\tyrBefore = {};\n\t\t\t\t\telse if (typeof(yrBefore) === 'boolean')\n\t\t\t\t\t\tyrBefore = {enabled: yrBefore};\n\t\t\t\t\telse if (typeof(yrBefore) === 'string')\n\t\t\t\t\t\tyrBefore = {classes: yrBefore};\n\t\t\t\t\tif (yrBefore.enabled === false)\n\t\t\t\t\t\tclasses.push('disabled');\n\t\t\t\t\tif (yrBefore.classes)\n\t\t\t\t\t\tclasses = classes.concat(yrBefore.classes.split(/\\s+/));\n\t\t\t\t\tif (yrBefore.tooltip)\n\t\t\t\t\t\ttooltip = yrBefore.tooltip;\n\t\t\t\t}\n\n\t\t\t\thtml += '<span class=\"' + classes.join(' ') + '\"' + (tooltip ? ' title=\"'+tooltip+'\"' : '') + '>' + year + '</span>';\n\t\t\t\tyear += 1;\n\t\t\t}\n\t\t\tyearCont.html(html);\n\t\t},\n\n\t\tupdateNavArrows: function(){\n\t\t\tif (!this._allow_update)\n\t\t\t\treturn;\n\n\t\t\tvar d = new Date(this.viewDate),\n\t\t\t\tyear = d.getUTCFullYear(),\n\t\t\t\tmonth = d.getUTCMonth();\n\t\t\tswitch (this.viewMode){\n\t\t\t\tcase 0:\n\t\t\t\t\tif (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()){\n\t\t\t\t\t\tthis.picker.find('.prev').css({visibility: 'hidden'});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.picker.find('.prev').css({visibility: 'visible'});\n\t\t\t\t\t}\n\t\t\t\t\tif (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()){\n\t\t\t\t\t\tthis.picker.find('.next').css({visibility: 'hidden'});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.picker.find('.next').css({visibility: 'visible'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tcase 2:\n\t\t\t\t\tif (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() || this.o.maxViewMode < 2){\n\t\t\t\t\t\tthis.picker.find('.prev').css({visibility: 'hidden'});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.picker.find('.prev').css({visibility: 'visible'});\n\t\t\t\t\t}\n\t\t\t\t\tif (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() || this.o.maxViewMode < 2){\n\t\t\t\t\t\tthis.picker.find('.next').css({visibility: 'hidden'});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.picker.find('.next').css({visibility: 'visible'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\n\t\tclick: function(e){\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tvar target = $(e.target).closest('span, td, th'),\n\t\t\t\tyear, month, day;\n\t\t\tif (target.length === 1){\n\t\t\t\tswitch (target[0].nodeName.toLowerCase()){\n\t\t\t\t\tcase 'th':\n\t\t\t\t\t\tswitch (target[0].className){\n\t\t\t\t\t\t\tcase 'datepicker-switch':\n\t\t\t\t\t\t\t\tthis.showMode(1);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'prev':\n\t\t\t\t\t\t\tcase 'next':\n\t\t\t\t\t\t\t\tvar dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1);\n\t\t\t\t\t\t\t\tswitch (this.viewMode){\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\tthis.viewDate = this.moveMonth(this.viewDate, dir);\n\t\t\t\t\t\t\t\t\t\tthis._trigger('changeMonth', this.viewDate);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\tthis.viewDate = this.moveYear(this.viewDate, dir);\n\t\t\t\t\t\t\t\t\t\tif (this.viewMode === 1)\n\t\t\t\t\t\t\t\t\t\t\tthis._trigger('changeYear', this.viewDate);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.fill();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'today':\n\t\t\t\t\t\t\t\tvar date = new Date();\n\t\t\t\t\t\t\t\tdate = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\n\n\t\t\t\t\t\t\t\tthis.showMode(-2);\n\t\t\t\t\t\t\t\tvar which = this.o.todayBtn === 'linked' ? null : 'view';\n\t\t\t\t\t\t\t\tthis._setDate(date, which);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'clear':\n\t\t\t\t\t\t\t\tthis.clearDates();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'span':\n\t\t\t\t\t\tif (!target.hasClass('disabled')){\n\t\t\t\t\t\t\tthis.viewDate.setUTCDate(1);\n\t\t\t\t\t\t\tif (target.hasClass('month')){\n\t\t\t\t\t\t\t\tday = 1;\n\t\t\t\t\t\t\t\tmonth = target.parent().find('span').index(target);\n\t\t\t\t\t\t\t\tyear = this.viewDate.getUTCFullYear();\n\t\t\t\t\t\t\t\tthis.viewDate.setUTCMonth(month);\n\t\t\t\t\t\t\t\tthis._trigger('changeMonth', this.viewDate);\n\t\t\t\t\t\t\t\tif (this.o.minViewMode === 1){\n\t\t\t\t\t\t\t\t\tthis._setDate(UTCDate(year, month, day));\n\t\t\t\t\t\t\t\t\tthis.showMode();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.showMode(-1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tday = 1;\n\t\t\t\t\t\t\t\tmonth = 0;\n\t\t\t\t\t\t\t\tyear = parseInt(target.text(), 10)||0;\n\t\t\t\t\t\t\t\tthis.viewDate.setUTCFullYear(year);\n\t\t\t\t\t\t\t\tthis._trigger('changeYear', this.viewDate);\n\t\t\t\t\t\t\t\tif (this.o.minViewMode === 2){\n\t\t\t\t\t\t\t\t\tthis._setDate(UTCDate(year, month, day));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.showMode(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.fill();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'td':\n\t\t\t\t\t\tif (target.hasClass('day') && !target.hasClass('disabled')){\n\t\t\t\t\t\t\tday = parseInt(target.text(), 10)||1;\n\t\t\t\t\t\t\tyear = this.viewDate.getUTCFullYear();\n\t\t\t\t\t\t\tmonth = this.viewDate.getUTCMonth();\n\t\t\t\t\t\t\tif (target.hasClass('old')){\n\t\t\t\t\t\t\t\tif (month === 0){\n\t\t\t\t\t\t\t\t\tmonth = 11;\n\t\t\t\t\t\t\t\t\tyear -= 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tmonth -= 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (target.hasClass('new')){\n\t\t\t\t\t\t\t\tif (month === 11){\n\t\t\t\t\t\t\t\t\tmonth = 0;\n\t\t\t\t\t\t\t\t\tyear += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tmonth += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._setDate(UTCDate(year, month, day));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.picker.is(':visible') && this._focused_from){\n\t\t\t\t$(this._focused_from).focus();\n\t\t\t}\n\t\t\tdelete this._focused_from;\n\t\t},\n\n\t\t_toggle_multidate: function(date){\n\t\t\tvar ix = this.dates.contains(date);\n\t\t\tif (!date){\n\t\t\t\tthis.dates.clear();\n\t\t\t}\n\n\t\t\tif (ix !== -1){\n\t\t\t\tif (this.o.multidate === true || this.o.multidate > 1 || this.o.toggleActive){\n\t\t\t\t\tthis.dates.remove(ix);\n\t\t\t\t}\n\t\t\t} else if (this.o.multidate === false) {\n\t\t\t\tthis.dates.clear();\n\t\t\t\tthis.dates.push(date);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.dates.push(date);\n\t\t\t}\n\n\t\t\tif (typeof this.o.multidate === 'number')\n\t\t\t\twhile (this.dates.length > this.o.multidate)\n\t\t\t\t\tthis.dates.remove(0);\n\t\t},\n\n\t\t_setDate: function(date, which){\n\t\t\tif (!which || which === 'date')\n\t\t\t\tthis._toggle_multidate(date && new Date(date));\n\t\t\tif (!which || which === 'view')\n\t\t\t\tthis.viewDate = date && new Date(date);\n\n\t\t\tthis.fill();\n\t\t\tthis.setValue();\n\t\t\tif (!which || which !== 'view') {\n\t\t\t\tthis._trigger('changeDate');\n\t\t\t}\n\t\t\tvar element;\n\t\t\tif (this.isInput){\n\t\t\t\telement = this.element;\n\t\t\t}\n\t\t\telse if (this.component){\n\t\t\t\telement = this.element.find('input');\n\t\t\t}\n\t\t\tif (element){\n\t\t\t\telement.change();\n\t\t\t}\n\t\t\tif (this.o.autoclose && (!which || which === 'date')){\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t},\n\n\t\tmoveMonth: function(date, dir){\n\t\t\tif (!isValidDate(date))\n\t\t\t\treturn this.o.defaultViewDate;\n\t\t\tif (!dir)\n\t\t\t\treturn date;\n\t\t\tvar new_date = new Date(date.valueOf()),\n\t\t\t\tday = new_date.getUTCDate(),\n\t\t\t\tmonth = new_date.getUTCMonth(),\n\t\t\t\tmag = Math.abs(dir),\n\t\t\t\tnew_month, test;\n\t\t\tdir = dir > 0 ? 1 : -1;\n\t\t\tif (mag === 1){\n\t\t\t\ttest = dir === -1\n\t\t\t\t\t// If going back one month, make sure month is not current month\n\t\t\t\t\t// (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02)\n\t\t\t\t\t? function(){\n\t\t\t\t\t\treturn new_date.getUTCMonth() === month;\n\t\t\t\t\t}\n\t\t\t\t\t// If going forward one month, make sure month is as expected\n\t\t\t\t\t// (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02)\n\t\t\t\t\t: function(){\n\t\t\t\t\t\treturn new_date.getUTCMonth() !== new_month;\n\t\t\t\t\t};\n\t\t\t\tnew_month = month + dir;\n\t\t\t\tnew_date.setUTCMonth(new_month);\n\t\t\t\t// Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11\n\t\t\t\tif (new_month < 0 || new_month > 11)\n\t\t\t\t\tnew_month = (new_month + 12) % 12;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// For magnitudes >1, move one month at a time...\n\t\t\t\tfor (var i=0; i < mag; i++)\n\t\t\t\t\t// ...which might decrease the day (eg, Jan 31 to Feb 28, etc)...\n\t\t\t\t\tnew_date = this.moveMonth(new_date, dir);\n\t\t\t\t// ...then reset the day, keeping it in the new month\n\t\t\t\tnew_month = new_date.getUTCMonth();\n\t\t\t\tnew_date.setUTCDate(day);\n\t\t\t\ttest = function(){\n\t\t\t\t\treturn new_month !== new_date.getUTCMonth();\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Common date-resetting loop -- if date is beyond end of month, make it\n\t\t\t// end of month\n\t\t\twhile (test()){\n\t\t\t\tnew_date.setUTCDate(--day);\n\t\t\t\tnew_date.setUTCMonth(new_month);\n\t\t\t}\n\t\t\treturn new_date;\n\t\t},\n\n\t\tmoveYear: function(date, dir){\n\t\t\treturn this.moveMonth(date, dir*12);\n\t\t},\n\n\t\tdateWithinRange: function(date){\n\t\t\treturn date >= this.o.startDate && date <= this.o.endDate;\n\t\t},\n\n\t\tkeydown: function(e){\n\t\t\tif (!this.picker.is(':visible')){\n\t\t\t\tif (e.keyCode === 40 || e.keyCode === 27) { // allow down to re-show picker\n\t\t\t\t\tthis.show();\n\t\t\t\t\te.stopPropagation();\n }\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar dateChanged = false,\n\t\t\t\tdir, newDate, newViewDate,\n\t\t\t\tfocusDate = this.focusDate || this.viewDate;\n\t\t\tswitch (e.keyCode){\n\t\t\t\tcase 27: // escape\n\t\t\t\t\tif (this.focusDate){\n\t\t\t\t\t\tthis.focusDate = null;\n\t\t\t\t\t\tthis.viewDate = this.dates.get(-1) || this.viewDate;\n\t\t\t\t\t\tthis.fill();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.hide();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 37: // left\n\t\t\t\tcase 39: // right\n\t\t\t\t\tif (!this.o.keyboardNavigation)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdir = e.keyCode === 37 ? -1 : 1;\n\t\t\t\t\tif (e.ctrlKey){\n\t\t\t\t\t\tnewDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir);\n\t\t\t\t\t\tnewViewDate = this.moveYear(focusDate, dir);\n\t\t\t\t\t\tthis._trigger('changeYear', this.viewDate);\n\t\t\t\t\t}\n\t\t\t\t\telse if (e.shiftKey){\n\t\t\t\t\t\tnewDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir);\n\t\t\t\t\t\tnewViewDate = this.moveMonth(focusDate, dir);\n\t\t\t\t\t\tthis._trigger('changeMonth', this.viewDate);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnewDate = new Date(this.dates.get(-1) || UTCToday());\n\t\t\t\t\t\tnewDate.setUTCDate(newDate.getUTCDate() + dir);\n\t\t\t\t\t\tnewViewDate = new Date(focusDate);\n\t\t\t\t\t\tnewViewDate.setUTCDate(focusDate.getUTCDate() + dir);\n\t\t\t\t\t}\n\t\t\t\t\tif (this.dateWithinRange(newViewDate)){\n\t\t\t\t\t\tthis.focusDate = this.viewDate = newViewDate;\n\t\t\t\t\t\tthis.setValue();\n\t\t\t\t\t\tthis.fill();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 38: // up\n\t\t\t\tcase 40: // down\n\t\t\t\t\tif (!this.o.keyboardNavigation)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdir = e.keyCode === 38 ? -1 : 1;\n\t\t\t\t\tif (e.ctrlKey){\n\t\t\t\t\t\tnewDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir);\n\t\t\t\t\t\tnewViewDate = this.moveYear(focusDate, dir);\n\t\t\t\t\t\tthis._trigger('changeYear', this.viewDate);\n\t\t\t\t\t}\n\t\t\t\t\telse if (e.shiftKey){\n\t\t\t\t\t\tnewDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir);\n\t\t\t\t\t\tnewViewDate = this.moveMonth(focusDate, dir);\n\t\t\t\t\t\tthis._trigger('changeMonth', this.viewDate);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnewDate = new Date(this.dates.get(-1) || UTCToday());\n\t\t\t\t\t\tnewDate.setUTCDate(newDate.getUTCDate() + dir * 7);\n\t\t\t\t\t\tnewViewDate = new Date(focusDate);\n\t\t\t\t\t\tnewViewDate.setUTCDate(focusDate.getUTCDate() + dir * 7);\n\t\t\t\t\t}\n\t\t\t\t\tif (this.dateWithinRange(newViewDate)){\n\t\t\t\t\t\tthis.focusDate = this.viewDate = newViewDate;\n\t\t\t\t\t\tthis.setValue();\n\t\t\t\t\t\tthis.fill();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 32: // spacebar\n\t\t\t\t\t// Spacebar is used in manually typing dates in some formats.\n\t\t\t\t\t// As such, its behavior should not be hijacked.\n\t\t\t\t\tbreak;\n\t\t\t\tcase 13: // enter\n\t\t\t\t\tif (!this.o.forceParse) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfocusDate = this.focusDate || this.dates.get(-1) || this.viewDate;\n\t\t\t\t\tif (this.o.keyboardNavigation) {\n\t\t\t\t\t\tthis._toggle_multidate(focusDate);\n\t\t\t\t\t\tdateChanged = true;\n\t\t\t\t\t}\n\t\t\t\t\tthis.focusDate = null;\n\t\t\t\t\tthis.viewDate = this.dates.get(-1) || this.viewDate;\n\t\t\t\t\tthis.setValue();\n\t\t\t\t\tthis.fill();\n\t\t\t\t\tif (this.picker.is(':visible')){\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tif (typeof e.stopPropagation === 'function') {\n\t\t\t\t\t\t\te.stopPropagation(); // All modern browsers, IE9+\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\te.cancelBubble = true; // IE6,7,8 ignore \"stopPropagation\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (this.o.autoclose)\n\t\t\t\t\t\t\tthis.hide();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9: // tab\n\t\t\t\t\tthis.focusDate = null;\n\t\t\t\t\tthis.viewDate = this.dates.get(-1) || this.viewDate;\n\t\t\t\t\tthis.fill();\n\t\t\t\t\tthis.hide();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (dateChanged){\n\t\t\t\tif (this.dates.length)\n\t\t\t\t\tthis._trigger('changeDate');\n\t\t\t\telse\n\t\t\t\t\tthis._trigger('clearDate');\n\t\t\t\tvar element;\n\t\t\t\tif (this.isInput){\n\t\t\t\t\telement = this.element;\n\t\t\t\t}\n\t\t\t\telse if (this.component){\n\t\t\t\t\telement = this.element.find('input');\n\t\t\t\t}\n\t\t\t\tif (element){\n\t\t\t\t\telement.change();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tshowMode: function(dir){\n\t\t\tif (dir){\n\t\t\t\tthis.viewMode = Math.max(this.o.minViewMode, Math.min(this.o.maxViewMode, this.viewMode + dir));\n\t\t\t}\n\t\t\tthis.picker\n\t\t\t\t.children('div')\n\t\t\t\t.hide()\n\t\t\t\t.filter('.datepicker-' + DPGlobal.modes[this.viewMode].clsName)\n\t\t\t\t\t.show();\n\t\t\tthis.updateNavArrows();\n\t\t}\n\t};\n\n\tvar DateRangePicker = function(element, options){\n\t\tthis.element = $(element);\n\t\tthis.inputs = $.map(options.inputs, function(i){\n\t\t\treturn i.jquery ? i[0] : i;\n\t\t});\n\t\tdelete options.inputs;\n\n\t\tdatepickerPlugin.call($(this.inputs), options)\n\t\t\t.on('changeDate', $.proxy(this.dateUpdated, this));\n\n\t\tthis.pickers = $.map(this.inputs, function(i){\n\t\t\treturn $(i).data('datepicker');\n\t\t});\n\t\tthis.updateDates();\n\t};\n\tDateRangePicker.prototype = {\n\t\tupdateDates: function(){\n\t\t\tthis.dates = $.map(this.pickers, function(i){\n\t\t\t\treturn i.getUTCDate();\n\t\t\t});\n\t\t\tthis.updateRanges();\n\t\t},\n\t\tupdateRanges: function(){\n\t\t\tvar range = $.map(this.dates, function(d){\n\t\t\t\treturn d.valueOf();\n\t\t\t});\n\t\t\t$.each(this.pickers, function(i, p){\n\t\t\t\tp.setRange(range);\n\t\t\t});\n\t\t},\n\t\tdateUpdated: function(e){\n\t\t\t// `this.updating` is a workaround for preventing infinite recursion\n\t\t\t// between `changeDate` triggering and `setUTCDate` calling. Until\n\t\t\t// there is a better mechanism.\n\t\t\tif (this.updating)\n\t\t\t\treturn;\n\t\t\tthis.updating = true;\n\n\t\t\tvar dp = $(e.target).data('datepicker');\n\n\t\t\tif (typeof(dp) === \"undefined\") {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar new_date = dp.getUTCDate(),\n\t\t\t\ti = $.inArray(e.target, this.inputs),\n\t\t\t\tj = i - 1,\n\t\t\t\tk = i + 1,\n\t\t\t\tl = this.inputs.length;\n\t\t\tif (i === -1)\n\t\t\t\treturn;\n\n\t\t\t$.each(this.pickers, function(i, p){\n\t\t\t\tif (!p.getUTCDate())\n\t\t\t\t\tp.setUTCDate(new_date);\n\t\t\t});\n\n\t\t\tif (new_date < this.dates[j]){\n\t\t\t\t// Date being moved earlier/left\n\t\t\t\twhile (j >= 0 && new_date < this.dates[j]){\n\t\t\t\t\tthis.pickers[j--].setUTCDate(new_date);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (new_date > this.dates[k]){\n\t\t\t\t// Date being moved later/right\n\t\t\t\twhile (k < l && new_date > this.dates[k]){\n\t\t\t\t\tthis.pickers[k++].setUTCDate(new_date);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.updateDates();\n\n\t\t\tdelete this.updating;\n\t\t},\n\t\tremove: function(){\n\t\t\t$.map(this.pickers, function(p){ p.remove(); });\n\t\t\tdelete this.element.data().datepicker;\n\t\t}\n\t};\n\n\tfunction opts_from_el(el, prefix){\n\t\t// Derive options from element data-attrs\n\t\tvar data = $(el).data(),\n\t\t\tout = {}, inkey,\n\t\t\treplace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])');\n\t\tprefix = new RegExp('^' + prefix.toLowerCase());\n\t\tfunction re_lower(_,a){\n\t\t\treturn a.toLowerCase();\n\t\t}\n\t\tfor (var key in data)\n\t\t\tif (prefix.test(key)){\n\t\t\t\tinkey = key.replace(replace, re_lower);\n\t\t\t\tout[inkey] = data[key];\n\t\t\t}\n\t\treturn out;\n\t}\n\n\tfunction opts_from_locale(lang){\n\t\t// Derive options from locale plugins\n\t\tvar out = {};\n\t\t// Check if \"de-DE\" style date is available, if not language should\n\t\t// fallback to 2 letter code eg \"de\"\n\t\tif (!dates[lang]){\n\t\t\tlang = lang.split('-')[0];\n\t\t\tif (!dates[lang])\n\t\t\t\treturn;\n\t\t}\n\t\tvar d = dates[lang];\n\t\t$.each(locale_opts, function(i,k){\n\t\t\tif (k in d)\n\t\t\t\tout[k] = d[k];\n\t\t});\n\t\treturn out;\n\t}\n\n\tvar old = $.fn.datepicker;\n\tvar datepickerPlugin = function(option){\n\t\tvar args = Array.apply(null, arguments);\n\t\targs.shift();\n\t\tvar internal_return;\n\t\tthis.each(function(){\n\t\t\tvar $this = $(this),\n\t\t\t\tdata = $this.data('datepicker'),\n\t\t\t\toptions = typeof option === 'object' && option;\n\t\t\tif (!data){\n\t\t\t\tvar elopts = opts_from_el(this, 'date'),\n\t\t\t\t\t// Preliminary otions\n\t\t\t\t\txopts = $.extend({}, defaults, elopts, options),\n\t\t\t\t\tlocopts = opts_from_locale(xopts.language),\n\t\t\t\t\t// Options priority: js args, data-attrs, locales, defaults\n\t\t\t\t\topts = $.extend({}, defaults, locopts, elopts, options);\n\t\t\t\tif ($this.hasClass('input-daterange') || opts.inputs){\n\t\t\t\t\tvar ropts = {\n\t\t\t\t\t\tinputs: opts.inputs || $this.find('input').toArray()\n\t\t\t\t\t};\n\t\t\t\t\t$this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts))));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this.data('datepicker', (data = new Datepicker(this, opts)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof option === 'string' && typeof data[option] === 'function'){\n\t\t\t\tinternal_return = data[option].apply(data, args);\n\t\t\t}\n\t\t});\n\n\t\tif (\n\t\t\tinternal_return === undefined ||\n\t\t\tinternal_return instanceof Datepicker ||\n\t\t\tinternal_return instanceof DateRangePicker\n\t\t)\n\t\t\treturn this;\n\n\t\tif (this.length > 1)\n\t\t\tthrow new Error('Using only allowed for the collection of a single element (' + option + ' function)');\n\t\telse\n\t\t\treturn internal_return;\n\t};\n\t$.fn.datepicker = datepickerPlugin;\n\n\tvar defaults = $.fn.datepicker.defaults = {\n\t\tautoclose: false,\n\t\tbeforeShowDay: $.noop,\n\t\tbeforeShowMonth: $.noop,\n\t\tbeforeShowYear: $.noop,\n\t\tcalendarWeeks: false,\n\t\tclearBtn: false,\n\t\ttoggleActive: false,\n\t\tdaysOfWeekDisabled: [],\n\t\tdaysOfWeekHighlighted: [],\n\t\tdatesDisabled: [],\n\t\tendDate: Infinity,\n\t\tforceParse: true,\n\t\tformat: 'mm/dd/yyyy',\n\t\tkeyboardNavigation: true,\n\t\tlanguage: 'en',\n\t\tminViewMode: 0,\n\t\tmaxViewMode: 2,\n\t\tmultidate: false,\n\t\tmultidateSeparator: ',',\n\t\torientation: \"auto\",\n\t\trtl: false,\n\t\tstartDate: -Infinity,\n\t\tstartView: 0,\n\t\ttodayBtn: false,\n\t\ttodayHighlight: false,\n\t\tweekStart: 0,\n\t\tdisableTouchKeyboard: false,\n\t\tenableOnReadonly: true,\n\t\tcontainer: 'body',\n\t\timmediateUpdates: false,\n\t\ttitle: ''\n\t};\n\tvar locale_opts = $.fn.datepicker.locale_opts = [\n\t\t'format',\n\t\t'rtl',\n\t\t'weekStart'\n\t];\n\t$.fn.datepicker.Constructor = Datepicker;\n\tvar dates = $.fn.datepicker.dates = {\n\t\ten: {\n\t\t\tdays: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n\t\t\tdaysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n\t\t\tdaysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n\t\t\tmonths: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n\t\t\tmonthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n\t\t\ttoday: \"Today\",\n\t\t\tclear: \"Clear\",\n\t\t\ttitleFormat: \"MM yyyy\"\n\t\t}\n\t};\n\n\tvar DPGlobal = {\n\t\tmodes: [\n\t\t\t{\n\t\t\t\tclsName: 'days',\n\t\t\t\tnavFnc: 'Month',\n\t\t\t\tnavStep: 1\n\t\t\t},\n\t\t\t{\n\t\t\t\tclsName: 'months',\n\t\t\t\tnavFnc: 'FullYear',\n\t\t\t\tnavStep: 1\n\t\t\t},\n\t\t\t{\n\t\t\t\tclsName: 'years',\n\t\t\t\tnavFnc: 'FullYear',\n\t\t\t\tnavStep: 10\n\t\t}],\n\t\tisLeapYear: function(year){\n\t\t\treturn (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0));\n\t\t},\n\t\tgetDaysInMonth: function(year, month){\n\t\t\treturn [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n\t\t},\n\t\tvalidParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g,\n\t\tnonpunctuation: /[^ -\\/:-@\\[\\u3400-\\u9fff-`{-~\\t\\n\\r]+/g,\n\t\tparseFormat: function(format){\n\t\t\tif (typeof format.toValue === 'function' && typeof format.toDisplay === 'function')\n return format;\n // IE treats \\0 as a string end in inputs (truncating the value),\n\t\t\t// so it's a bad format delimiter, anyway\n\t\t\tvar separators = format.replace(this.validParts, '\\0').split('\\0'),\n\t\t\t\tparts = format.match(this.validParts);\n\t\t\tif (!separators || !separators.length || !parts || parts.length === 0){\n\t\t\t\tthrow new Error(\"Invalid date format.\");\n\t\t\t}\n\t\t\treturn {separators: separators, parts: parts};\n\t\t},\n\t\tparseDate: function(date, format, language){\n\t\t\tif (!date)\n\t\t\t\treturn undefined;\n\t\t\tif (date instanceof Date)\n\t\t\t\treturn date;\n\t\t\tif (typeof format === 'string')\n\t\t\t\tformat = DPGlobal.parseFormat(format);\n\t\t\tif (format.toValue)\n return format.toValue(date, format, language);\n var part_re = /([\\-+]\\d+)([dmwy])/,\n\t\t\t\tparts = date.match(/([\\-+]\\d+)([dmwy])/g),\n\t\t\t\tpart, dir, i;\n\t\t\tif (/^[\\-+]\\d+[dmwy]([\\s,]+[\\-+]\\d+[dmwy])*$/.test(date)){\n\t\t\t\tdate = new Date();\n\t\t\t\tfor (i=0; i < parts.length; i++){\n\t\t\t\t\tpart = part_re.exec(parts[i]);\n\t\t\t\t\tdir = parseInt(part[1]);\n\t\t\t\t\tswitch (part[2]){\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\tdate.setUTCDate(date.getUTCDate() + dir);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'm':\n\t\t\t\t\t\t\tdate = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'w':\n\t\t\t\t\t\t\tdate.setUTCDate(date.getUTCDate() + dir * 7);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'y':\n\t\t\t\t\t\t\tdate = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0);\n\t\t\t}\n\t\t\tparts = date && date.match(this.nonpunctuation) || [];\n\t\t\tdate = new Date();\n\t\t\tvar parsed = {},\n\t\t\t\tsetters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'],\n\t\t\t\tsetters_map = {\n\t\t\t\t\tyyyy: function(d,v){\n\t\t\t\t\t\treturn d.setUTCFullYear(v);\n\t\t\t\t\t},\n\t\t\t\t\tyy: function(d,v){\n\t\t\t\t\t\treturn d.setUTCFullYear(2000+v);\n\t\t\t\t\t},\n\t\t\t\t\tm: function(d,v){\n\t\t\t\t\t\tif (isNaN(d))\n\t\t\t\t\t\t\treturn d;\n\t\t\t\t\t\tv -= 1;\n\t\t\t\t\t\twhile (v < 0) v += 12;\n\t\t\t\t\t\tv %= 12;\n\t\t\t\t\t\td.setUTCMonth(v);\n\t\t\t\t\t\twhile (d.getUTCMonth() !== v)\n\t\t\t\t\t\t\td.setUTCDate(d.getUTCDate()-1);\n\t\t\t\t\t\treturn d;\n\t\t\t\t\t},\n\t\t\t\t\td: function(d,v){\n\t\t\t\t\t\treturn d.setUTCDate(v);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tval, filtered;\n\t\t\tsetters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m'];\n\t\t\tsetters_map['dd'] = setters_map['d'];\n\t\t\tdate = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\n\t\t\tvar fparts = format.parts.slice();\n\t\t\t// Remove noop parts\n\t\t\tif (parts.length !== fparts.length){\n\t\t\t\tfparts = $(fparts).filter(function(i,p){\n\t\t\t\t\treturn $.inArray(p, setters_order) !== -1;\n\t\t\t\t}).toArray();\n\t\t\t}\n\t\t\t// Process remainder\n\t\t\tfunction match_part(){\n\t\t\t\tvar m = this.slice(0, parts[i].length),\n\t\t\t\t\tp = parts[i].slice(0, m.length);\n\t\t\t\treturn m.toLowerCase() === p.toLowerCase();\n\t\t\t}\n\t\t\tif (parts.length === fparts.length){\n\t\t\t\tvar cnt;\n\t\t\t\tfor (i=0, cnt = fparts.length; i < cnt; i++){\n\t\t\t\t\tval = parseInt(parts[i], 10);\n\t\t\t\t\tpart = fparts[i];\n\t\t\t\t\tif (isNaN(val)){\n\t\t\t\t\t\tswitch (part){\n\t\t\t\t\t\t\tcase 'MM':\n\t\t\t\t\t\t\t\tfiltered = $(dates[language].months).filter(match_part);\n\t\t\t\t\t\t\t\tval = $.inArray(filtered[0], dates[language].months) + 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'M':\n\t\t\t\t\t\t\t\tfiltered = $(dates[language].monthsShort).filter(match_part);\n\t\t\t\t\t\t\t\tval = $.inArray(filtered[0], dates[language].monthsShort) + 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tparsed[part] = val;\n\t\t\t\t}\n\t\t\t\tvar _date, s;\n\t\t\t\tfor (i=0; i < setters_order.length; i++){\n\t\t\t\t\ts = setters_order[i];\n\t\t\t\t\tif (s in parsed && !isNaN(parsed[s])){\n\t\t\t\t\t\t_date = new Date(date);\n\t\t\t\t\t\tsetters_map[s](_date, parsed[s]);\n\t\t\t\t\t\tif (!isNaN(_date))\n\t\t\t\t\t\t\tdate = _date;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn date;\n\t\t},\n\t\tformatDate: function(date, format, language){\n\t\t\tif (!date)\n\t\t\t\treturn '';\n\t\t\tif (typeof format === 'string')\n\t\t\t\tformat = DPGlobal.parseFormat(format);\n\t\t\tif (format.toDisplay)\n return format.toDisplay(date, format, language);\n var val = {\n\t\t\t\td: date.getUTCDate(),\n\t\t\t\tD: dates[language].daysShort[date.getUTCDay()],\n\t\t\t\tDD: dates[language].days[date.getUTCDay()],\n\t\t\t\tm: date.getUTCMonth() + 1,\n\t\t\t\tM: dates[language].monthsShort[date.getUTCMonth()],\n\t\t\t\tMM: dates[language].months[date.getUTCMonth()],\n\t\t\t\tyy: date.getUTCFullYear().toString().substring(2),\n\t\t\t\tyyyy: date.getUTCFullYear()\n\t\t\t};\n\t\t\tval.dd = (val.d < 10 ? '0' : '') + val.d;\n\t\t\tval.mm = (val.m < 10 ? '0' : '') + val.m;\n\t\t\tdate = [];\n\t\t\tvar seps = $.extend([], format.separators);\n\t\t\tfor (var i=0, cnt = format.parts.length; i <= cnt; i++){\n\t\t\t\tif (seps.length)\n\t\t\t\t\tdate.push(seps.shift());\n\t\t\t\tdate.push(val[format.parts[i]]);\n\t\t\t}\n\t\t\treturn date.join('');\n\t\t},\n\t\theadTemplate: '<thead>'+\n\t\t\t '<tr>'+\n\t\t\t '<th colspan=\"7\" class=\"datepicker-title\"></th>'+\n\t\t\t '</tr>'+\n\t\t\t\t\t\t\t'<tr>'+\n\t\t\t\t\t\t\t\t'<th class=\"prev\">«</th>'+\n\t\t\t\t\t\t\t\t'<th colspan=\"5\" class=\"datepicker-switch\"></th>'+\n\t\t\t\t\t\t\t\t'<th class=\"next\">»</th>'+\n\t\t\t\t\t\t\t'</tr>'+\n\t\t\t\t\t\t'</thead>',\n\t\tcontTemplate: '<tbody><tr><td colspan=\"7\"></td></tr></tbody>',\n\t\tfootTemplate: '<tfoot>'+\n\t\t\t\t\t\t\t'<tr>'+\n\t\t\t\t\t\t\t\t'<th colspan=\"7\" class=\"today\"></th>'+\n\t\t\t\t\t\t\t'</tr>'+\n\t\t\t\t\t\t\t'<tr>'+\n\t\t\t\t\t\t\t\t'<th colspan=\"7\" class=\"clear\"></th>'+\n\t\t\t\t\t\t\t'</tr>'+\n\t\t\t\t\t\t'</tfoot>'\n\t};\n\tDPGlobal.template = '<div class=\"datepicker\">'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-days\">'+\n\t\t\t\t\t\t\t\t'<table class=\" table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\t'<tbody></tbody>'+\n\t\t\t\t\t\t\t\t\tDPGlobal.footTemplate+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-months\">'+\n\t\t\t\t\t\t\t\t'<table class=\"table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.contTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.footTemplate+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-years\">'+\n\t\t\t\t\t\t\t\t'<table class=\"table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.contTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.footTemplate+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t'</div>';\n\n\t$.fn.datepicker.DPGlobal = DPGlobal;\n\n\n\t/* DATEPICKER NO CONFLICT\n\t* =================== */\n\n\t$.fn.datepicker.noConflict = function(){\n\t\t$.fn.datepicker = old;\n\t\treturn this;\n\t};\n\n\t/* DATEPICKER VERSION\n\t * =================== */\n\t$.fn.datepicker.version = '1.5.0';\n\n\t/* DATEPICKER DATA-API\n\t* ================== */\n\n\t$(document).on(\n\t\t'focus.datepicker.data-api click.datepicker.data-api',\n\t\t'[data-provide=\"datepicker\"]',\n\t\tfunction(e){\n\t\t\tvar $this = $(this);\n\t\t\tif ($this.data('datepicker'))\n\t\t\t\treturn;\n\t\t\te.preventDefault();\n\t\t\t// component click requires us to explicitly show it\n\t\t\tdatepickerPlugin.call($this, 'show');\n\t\t}\n\t);\n\t$(function(){\n\t\tdatepickerPlugin.call($('[data-provide=\"datepicker-inline\"]'));\n\t});\n\n}));\n","/*!\n * Bootstrap-select v1.12.2 (http://silviomoreto.github.io/bootstrap-select)\n *\n * Copyright 2013-2017 bootstrap-select\n * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)\n */\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module unless amdModuleId is set\n define([\"jquery\"], function (a0) {\n return (factory(a0));\n });\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require(\"jquery\"));\n } else {\n factory(root[\"jQuery\"]);\n }\n}(this, function (jQuery) {\n\n(function ($) {\n 'use strict';\n\n //<editor-fold desc=\"Shims\">\n if (!String.prototype.includes) {\n (function () {\n 'use strict'; // needed to support `apply`/`call` with `undefined`/`null`\n var toString = {}.toString;\n var defineProperty = (function () {\n // IE 8 only supports `Object.defineProperty` on DOM elements\n try {\n var object = {};\n var $defineProperty = Object.defineProperty;\n var result = $defineProperty(object, object, object) && $defineProperty;\n } catch (error) {\n }\n return result;\n }());\n var indexOf = ''.indexOf;\n var includes = function (search) {\n if (this == null) {\n throw new TypeError();\n }\n var string = String(this);\n if (search && toString.call(search) == '[object RegExp]') {\n throw new TypeError();\n }\n var stringLength = string.length;\n var searchString = String(search);\n var searchLength = searchString.length;\n var position = arguments.length > 1 ? arguments[1] : undefined;\n // `ToInteger`\n var pos = position ? Number(position) : 0;\n if (pos != pos) { // better `isNaN`\n pos = 0;\n }\n var start = Math.min(Math.max(pos, 0), stringLength);\n // Avoid the `indexOf` call if no match is possible\n if (searchLength + start > stringLength) {\n return false;\n }\n return indexOf.call(string, searchString, pos) != -1;\n };\n if (defineProperty) {\n defineProperty(String.prototype, 'includes', {\n 'value': includes,\n 'configurable': true,\n 'writable': true\n });\n } else {\n String.prototype.includes = includes;\n }\n }());\n }\n\n if (!String.prototype.startsWith) {\n (function () {\n 'use strict'; // needed to support `apply`/`call` with `undefined`/`null`\n var defineProperty = (function () {\n // IE 8 only supports `Object.defineProperty` on DOM elements\n try {\n var object = {};\n var $defineProperty = Object.defineProperty;\n var result = $defineProperty(object, object, object) && $defineProperty;\n } catch (error) {\n }\n return result;\n }());\n var toString = {}.toString;\n var startsWith = function (search) {\n if (this == null) {\n throw new TypeError();\n }\n var string = String(this);\n if (search && toString.call(search) == '[object RegExp]') {\n throw new TypeError();\n }\n var stringLength = string.length;\n var searchString = String(search);\n var searchLength = searchString.length;\n var position = arguments.length > 1 ? arguments[1] : undefined;\n // `ToInteger`\n var pos = position ? Number(position) : 0;\n if (pos != pos) { // better `isNaN`\n pos = 0;\n }\n var start = Math.min(Math.max(pos, 0), stringLength);\n // Avoid the `indexOf` call if no match is possible\n if (searchLength + start > stringLength) {\n return false;\n }\n var index = -1;\n while (++index < searchLength) {\n if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {\n return false;\n }\n }\n return true;\n };\n if (defineProperty) {\n defineProperty(String.prototype, 'startsWith', {\n 'value': startsWith,\n 'configurable': true,\n 'writable': true\n });\n } else {\n String.prototype.startsWith = startsWith;\n }\n }());\n }\n\n if (!Object.keys) {\n Object.keys = function (\n o, // object\n k, // key\n r // result array\n ){\n // initialize object and result\n r=[];\n // iterate over object keys\n for (k in o)\n // fill result array with non-prototypical keys\n r.hasOwnProperty.call(o, k) && r.push(k);\n // return result\n return r;\n };\n }\n\n // set data-selected on select element if the value has been programmatically selected\n // prior to initialization of bootstrap-select\n // * consider removing or replacing an alternative method *\n var valHooks = {\n useDefault: false,\n _set: $.valHooks.select.set\n };\n\n $.valHooks.select.set = function(elem, value) {\n if (value && !valHooks.useDefault) $(elem).data('selected', true);\n\n return valHooks._set.apply(this, arguments);\n };\n\n var changed_arguments = null;\n $.fn.triggerNative = function (eventName) {\n var el = this[0],\n event;\n\n if (el.dispatchEvent) { // for modern browsers & IE9+\n if (typeof Event === 'function') {\n // For modern browsers\n event = new Event(eventName, {\n bubbles: true\n });\n } else {\n // For IE since it doesn't support Event constructor\n event = document.createEvent('Event');\n event.initEvent(eventName, true, false);\n }\n\n el.dispatchEvent(event);\n } else if (el.fireEvent) { // for IE8\n event = document.createEventObject();\n event.eventType = eventName;\n el.fireEvent('on' + eventName, event);\n } else {\n // fall back to jQuery.trigger\n this.trigger(eventName);\n }\n };\n //</editor-fold>\n\n // Case insensitive contains search\n $.expr.pseudos.icontains = function (obj, index, meta) {\n var $obj = $(obj);\n var haystack = ($obj.data('tokens') || $obj.text()).toString().toUpperCase();\n return haystack.includes(meta[3].toUpperCase());\n };\n\n // Case insensitive begins search\n $.expr.pseudos.ibegins = function (obj, index, meta) {\n var $obj = $(obj);\n var haystack = ($obj.data('tokens') || $obj.text()).toString().toUpperCase();\n return haystack.startsWith(meta[3].toUpperCase());\n };\n\n // Case and accent insensitive contains search\n $.expr.pseudos.aicontains = function (obj, index, meta) {\n var $obj = $(obj);\n var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toString().toUpperCase();\n return haystack.includes(meta[3].toUpperCase());\n };\n\n // Case and accent insensitive begins search\n $.expr.pseudos.aibegins = function (obj, index, meta) {\n var $obj = $(obj);\n var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toString().toUpperCase();\n return haystack.startsWith(meta[3].toUpperCase());\n };\n\n /**\n * Remove all diatrics from the given text.\n * @access private\n * @param {String} text\n * @returns {String}\n */\n function normalizeToBase(text) {\n var rExps = [\n {re: /[\\xC0-\\xC6]/g, ch: \"A\"},\n {re: /[\\xE0-\\xE6]/g, ch: \"a\"},\n {re: /[\\xC8-\\xCB]/g, ch: \"E\"},\n {re: /[\\xE8-\\xEB]/g, ch: \"e\"},\n {re: /[\\xCC-\\xCF]/g, ch: \"I\"},\n {re: /[\\xEC-\\xEF]/g, ch: \"i\"},\n {re: /[\\xD2-\\xD6]/g, ch: \"O\"},\n {re: /[\\xF2-\\xF6]/g, ch: \"o\"},\n {re: /[\\xD9-\\xDC]/g, ch: \"U\"},\n {re: /[\\xF9-\\xFC]/g, ch: \"u\"},\n {re: /[\\xC7-\\xE7]/g, ch: \"c\"},\n {re: /[\\xD1]/g, ch: \"N\"},\n {re: /[\\xF1]/g, ch: \"n\"}\n ];\n $.each(rExps, function () {\n text = text ? text.replace(this.re, this.ch) : '';\n });\n return text;\n }\n\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n \n var unescapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '`': '`'\n };\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + Object.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n\n var htmlEscape = createEscaper(escapeMap);\n var htmlUnescape = createEscaper(unescapeMap);\n\n var Selectpicker = function (element, options) {\n // bootstrap-select has been initialized - revert valHooks.select.set back to its original function\n if (!valHooks.useDefault) {\n $.valHooks.select.set = valHooks._set;\n valHooks.useDefault = true;\n }\n\n this.$element = $(element);\n this.$newElement = null;\n this.$button = null;\n this.$menu = null;\n this.$lis = null;\n this.options = options;\n\n // If we have no title yet, try to pull it from the html title attribute (jQuery doesnt' pick it up as it's not a\n // data-attribute)\n if (this.options.title === null) {\n this.options.title = this.$element.attr('title');\n }\n\n // Format window padding\n var winPad = this.options.windowPadding;\n if (typeof winPad === 'number') {\n this.options.windowPadding = [winPad, winPad, winPad, winPad];\n }\n\n //Expose public methods\n this.val = Selectpicker.prototype.val;\n this.render = Selectpicker.prototype.render;\n this.refresh = Selectpicker.prototype.refresh;\n this.setStyle = Selectpicker.prototype.setStyle;\n this.selectAll = Selectpicker.prototype.selectAll;\n this.deselectAll = Selectpicker.prototype.deselectAll;\n this.destroy = Selectpicker.prototype.destroy;\n this.remove = Selectpicker.prototype.remove;\n this.show = Selectpicker.prototype.show;\n this.hide = Selectpicker.prototype.hide;\n\n this.init();\n };\n\n Selectpicker.VERSION = '1.12.2';\n\n // part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.\n Selectpicker.DEFAULTS = {\n noneSelectedText: 'Nothing selected',\n noneResultsText: 'No results matched {0}',\n countSelectedText: function (numSelected, numTotal) {\n return (numSelected == 1) ? \"{0} item selected\" : \"{0} items selected\";\n },\n maxOptionsText: function (numAll, numGroup) {\n return [\n (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',\n (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'\n ];\n },\n selectAllText: 'Select All',\n deselectAllText: 'Deselect All',\n doneButton: false,\n doneButtonText: 'Close',\n multipleSeparator: ', ',\n styleBase: 'btn',\n style: 'btn-default',\n size: 'auto',\n title: null,\n selectedTextFormat: 'values',\n width: false,\n container: false,\n hideDisabled: false,\n showSubtext: false,\n showIcon: true,\n showContent: true,\n dropupAuto: true,\n header: false,\n liveSearch: false,\n liveSearchPlaceholder: null,\n liveSearchNormalize: false,\n liveSearchStyle: 'contains',\n actionsBox: false,\n iconBase: 'glyphicon',\n tickIcon: 'glyphicon-ok',\n showTick: false,\n template: {\n caret: '<span class=\"caret\"></span>'\n },\n maxOptions: false,\n mobile: false,\n selectOnTab: false,\n dropdownAlignRight: false,\n windowPadding: 0\n };\n\n Selectpicker.prototype = {\n\n constructor: Selectpicker,\n\n init: function () {\n var that = this,\n id = this.$element.attr('id');\n\n this.$element.addClass('bs-select-hidden');\n\n // store originalIndex (key) and newIndex (value) in this.liObj for fast accessibility\n // allows us to do this.$lis.eq(that.liObj[index]) instead of this.$lis.filter('[data-original-index=\"' + index + '\"]')\n this.liObj = {};\n this.multiple = this.$element.prop('multiple');\n this.autofocus = this.$element.prop('autofocus');\n this.$newElement = this.createView();\n this.$element\n .after(this.$newElement)\n .appendTo(this.$newElement);\n this.$button = this.$newElement.children('button');\n this.$menu = this.$newElement.children('.dropdown-menu');\n this.$menuInner = this.$menu.children('.inner');\n this.$searchbox = this.$menu.find('input');\n\n this.$element.removeClass('bs-select-hidden');\n\n if (this.options.dropdownAlignRight === true) this.$menu.addClass('dropdown-menu-right');\n\n if (typeof id !== 'undefined') {\n this.$button.attr('data-id', id);\n $('label[for=\"' + id + '\"]').click(function (e) {\n e.preventDefault();\n that.$button.focus();\n });\n }\n\n this.checkDisabled();\n this.clickListener();\n if (this.options.liveSearch) this.liveSearchListener();\n this.render();\n this.setStyle();\n this.setWidth();\n if (this.options.container) this.selectPosition();\n this.$menu.data('this', this);\n this.$newElement.data('this', this);\n if (this.options.mobile) this.mobile();\n\n this.$newElement.on({\n 'hide.bs.dropdown': function (e) {\n that.$menuInner.attr('aria-expanded', false);\n that.$element.trigger('hide.bs.select', e);\n },\n 'hidden.bs.dropdown': function (e) {\n that.$element.trigger('hidden.bs.select', e);\n },\n 'show.bs.dropdown': function (e) {\n that.$menuInner.attr('aria-expanded', true);\n that.$element.trigger('show.bs.select', e);\n },\n 'shown.bs.dropdown': function (e) {\n that.$element.trigger('shown.bs.select', e);\n }\n });\n\n if (that.$element[0].hasAttribute('required')) {\n this.$element.on('invalid', function () {\n that.$button\n .addClass('bs-invalid')\n .focus();\n\n that.$element.on({\n 'focus.bs.select': function () {\n that.$button.focus();\n that.$element.off('focus.bs.select');\n },\n 'shown.bs.select': function () {\n that.$element\n .val(that.$element.val()) // set the value to hide the validation message in Chrome when menu is opened\n .off('shown.bs.select');\n },\n 'rendered.bs.select': function () {\n // if select is no longer invalid, remove the bs-invalid class\n if (this.validity.valid) that.$button.removeClass('bs-invalid');\n that.$element.off('rendered.bs.select');\n }\n });\n });\n }\n\n setTimeout(function () {\n that.$element.trigger('loaded.bs.select');\n });\n },\n\n createDropdown: function () {\n // Options\n // If we are multiple or showTick option is set, then add the show-tick class\n var showTick = (this.multiple || this.options.showTick) ? ' show-tick' : '',\n inputGroup = this.$element.parent().hasClass('input-group') ? ' input-group-btn' : '',\n autofocus = this.autofocus ? ' autofocus' : '';\n // Elements\n var header = this.options.header ? '<div class=\"popover-title\"><button type=\"button\" class=\"close\" aria-hidden=\"true\">×</button>' + this.options.header + '</div>' : '';\n var searchbox = this.options.liveSearch ?\n '<div class=\"bs-searchbox\">' +\n '<input type=\"text\" class=\"form-control\" autocomplete=\"off\"' +\n (null === this.options.liveSearchPlaceholder ? '' : ' placeholder=\"' + htmlEscape(this.options.liveSearchPlaceholder) + '\"') + ' role=\"textbox\" aria-label=\"Search\">' +\n '</div>'\n : '';\n var actionsbox = this.multiple && this.options.actionsBox ?\n '<div class=\"bs-actionsbox\">' +\n '<div class=\"btn-group btn-group-sm btn-block\">' +\n '<button type=\"button\" class=\"actions-btn bs-select-all btn btn-default\">' +\n this.options.selectAllText +\n '</button>' +\n '<button type=\"button\" class=\"actions-btn bs-deselect-all btn btn-default\">' +\n this.options.deselectAllText +\n '</button>' +\n '</div>' +\n '</div>'\n : '';\n var donebutton = this.multiple && this.options.doneButton ?\n '<div class=\"bs-donebutton\">' +\n '<div class=\"btn-group btn-block\">' +\n '<button type=\"button\" class=\"btn btn-sm btn-default\">' +\n this.options.doneButtonText +\n '</button>' +\n '</div>' +\n '</div>'\n : '';\n var drop =\n '<div class=\"btn-group bootstrap-select' + showTick + inputGroup + '\">' +\n '<button type=\"button\" class=\"' + this.options.styleBase + ' dropdown-toggle\" data-toggle=\"dropdown\"' + autofocus + ' role=\"button\">' +\n '<span class=\"filter-option pull-left\"></span> ' +\n '<span class=\"bs-caret\">' +\n this.options.template.caret +\n '</span>' +\n '</button>' +\n '<div class=\"dropdown-menu open\" role=\"combobox\">' +\n header +\n searchbox +\n actionsbox +\n '<ul class=\"dropdown-menu inner\" role=\"listbox\" aria-expanded=\"false\">' +\n '</ul>' +\n donebutton +\n '</div>' +\n '</div>';\n\n return $(drop);\n },\n\n createView: function () {\n var $drop = this.createDropdown(),\n li = this.createLi();\n\n $drop.find('ul')[0].innerHTML = li;\n return $drop;\n },\n\n reloadLi: function () {\n // rebuild\n var li = this.createLi();\n this.$menuInner[0].innerHTML = li;\n },\n\n createLi: function () {\n var that = this,\n _li = [],\n optID = 0,\n titleOption = document.createElement('option'),\n liIndex = -1; // increment liIndex whenever a new <li> element is created to ensure liObj is correct\n\n // Helper functions\n /**\n * @param content\n * @param [index]\n * @param [classes]\n * @param [optgroup]\n * @returns {string}\n */\n var generateLI = function (content, index, classes, optgroup) {\n return '<li' +\n ((typeof classes !== 'undefined' & '' !== classes) ? ' class=\"' + classes + '\"' : '') +\n ((typeof index !== 'undefined' & null !== index) ? ' data-original-index=\"' + index + '\"' : '') +\n ((typeof optgroup !== 'undefined' & null !== optgroup) ? 'data-optgroup=\"' + optgroup + '\"' : '') +\n '>' + content + '</li>';\n };\n\n /**\n * @param text\n * @param [classes]\n * @param [inline]\n * @param [tokens]\n * @returns {string}\n */\n var generateA = function (text, classes, inline, tokens) {\n return '<a tabindex=\"0\"' +\n (typeof classes !== 'undefined' ? ' class=\"' + classes + '\"' : '') +\n (inline ? ' style=\"' + inline + '\"' : '') +\n (that.options.liveSearchNormalize ? ' data-normalized-text=\"' + normalizeToBase(htmlEscape($(text).html())) + '\"' : '') +\n (typeof tokens !== 'undefined' || tokens !== null ? ' data-tokens=\"' + tokens + '\"' : '') +\n ' role=\"option\">' + text +\n '<span class=\"' + that.options.iconBase + ' ' + that.options.tickIcon + ' check-mark\"></span>' +\n '</a>';\n };\n\n if (this.options.title && !this.multiple) {\n // this option doesn't create a new <li> element, but does add a new option, so liIndex is decreased\n // since liObj is recalculated on every refresh, liIndex needs to be decreased even if the titleOption is already appended\n liIndex--;\n\n if (!this.$element.find('.bs-title-option').length) {\n // Use native JS to prepend option (faster)\n var element = this.$element[0];\n titleOption.className = 'bs-title-option';\n titleOption.innerHTML = this.options.title;\n titleOption.value = '';\n element.insertBefore(titleOption, element.firstChild);\n // Check if selected or data-selected attribute is already set on an option. If not, select the titleOption option.\n // the selected item may have been changed by user or programmatically before the bootstrap select plugin runs,\n // if so, the select will have the data-selected attribute\n var $opt = $(element.options[element.selectedIndex]);\n if ($opt.attr('selected') === undefined && this.$element.data('selected') === undefined) {\n titleOption.selected = true;\n }\n }\n }\n\n this.$element.find('option').each(function (index) {\n var $this = $(this);\n\n liIndex++;\n\n if ($this.hasClass('bs-title-option')) return;\n\n // Get the class and text for the option\n var optionClass = this.className || '',\n inline = this.style.cssText,\n text = $this.data('content') ? $this.data('content') : $this.html(),\n tokens = $this.data('tokens') ? $this.data('tokens') : null,\n subtext = typeof $this.data('subtext') !== 'undefined' ? '<small class=\"text-muted\">' + $this.data('subtext') + '</small>' : '',\n icon = typeof $this.data('icon') !== 'undefined' ? '<span class=\"' + that.options.iconBase + ' ' + $this.data('icon') + '\"></span> ' : '',\n $parent = $this.parent(),\n isOptgroup = $parent[0].tagName === 'OPTGROUP',\n isOptgroupDisabled = isOptgroup && $parent[0].disabled,\n isDisabled = this.disabled || isOptgroupDisabled;\n\n if (icon !== '' && isDisabled) {\n icon = '<span>' + icon + '</span>';\n }\n\n if (that.options.hideDisabled && (isDisabled && !isOptgroup || isOptgroupDisabled)) {\n liIndex--;\n return;\n }\n\n if (!$this.data('content')) {\n // Prepend any icon and append any subtext to the main text.\n text = icon + '<span class=\"text\">' + text + subtext + '</span>';\n }\n\n if (isOptgroup && $this.data('divider') !== true) {\n if (that.options.hideDisabled && isDisabled) {\n if ($parent.data('allOptionsDisabled') === undefined) {\n var $options = $parent.children();\n $parent.data('allOptionsDisabled', $options.filter(':disabled').length === $options.length);\n }\n\n if ($parent.data('allOptionsDisabled')) {\n liIndex--;\n return;\n }\n }\n\n var optGroupClass = ' ' + $parent[0].className || '';\n\n if ($this.index() === 0) { // Is it the first option of the optgroup?\n optID += 1;\n\n // Get the opt group label\n var label = $parent[0].label,\n labelSubtext = typeof $parent.data('subtext') !== 'undefined' ? '<small class=\"text-muted\">' + $parent.data('subtext') + '</small>' : '',\n labelIcon = $parent.data('icon') ? '<span class=\"' + that.options.iconBase + ' ' + $parent.data('icon') + '\"></span> ' : '';\n\n label = labelIcon + '<span class=\"text\">' + htmlEscape(label) + labelSubtext + '</span>';\n\n if (index !== 0 && _li.length > 0) { // Is it NOT the first option of the select && are there elements in the dropdown?\n liIndex++;\n _li.push(generateLI('', null, 'divider', optID + 'div'));\n }\n liIndex++;\n _li.push(generateLI(label, null, 'dropdown-header' + optGroupClass, optID));\n }\n\n if (that.options.hideDisabled && isDisabled) {\n liIndex--;\n return;\n }\n\n _li.push(generateLI(generateA(text, 'opt ' + optionClass + optGroupClass, inline, tokens), index, '', optID));\n } else if ($this.data('divider') === true) {\n _li.push(generateLI('', index, 'divider'));\n } else if ($this.data('hidden') === true) {\n _li.push(generateLI(generateA(text, optionClass, inline, tokens), index, 'hidden is-hidden'));\n } else {\n var showDivider = this.previousElementSibling && this.previousElementSibling.tagName === 'OPTGROUP';\n\n // if previous element is not an optgroup and hideDisabled is true\n if (!showDivider && that.options.hideDisabled) {\n // get previous elements\n var $prev = $(this).prevAll();\n\n for (var i = 0; i < $prev.length; i++) {\n // find the first element in the previous elements that is an optgroup\n if ($prev[i].tagName === 'OPTGROUP') {\n var optGroupDistance = 0;\n\n // loop through the options in between the current option and the optgroup\n // and check if they are hidden or disabled\n for (var d = 0; d < i; d++) {\n var prevOption = $prev[d];\n if (prevOption.disabled || $(prevOption).data('hidden') === true) optGroupDistance++;\n }\n\n // if all of the options between the current option and the optgroup are hidden or disabled, show the divider\n if (optGroupDistance === i) showDivider = true;\n\n break;\n }\n }\n }\n\n if (showDivider) {\n liIndex++;\n _li.push(generateLI('', null, 'divider', optID + 'div'));\n }\n _li.push(generateLI(generateA(text, optionClass, inline, tokens), index));\n }\n\n that.liObj[index] = liIndex;\n });\n\n //If we are not multiple, we don't have a selected item, and we don't have a title, select the first element so something is set in the button\n if (!this.multiple && this.$element.find('option:selected').length === 0 && !this.options.title) {\n this.$element.find('option').eq(0).prop('selected', true).attr('selected', 'selected');\n }\n\n return _li.join('');\n },\n\n findLis: function () {\n if (this.$lis == null) this.$lis = this.$menu.find('li');\n return this.$lis;\n },\n\n /**\n * @param [updateLi] defaults to true\n */\n render: function (updateLi) {\n var that = this,\n notDisabled;\n\n //Update the LI to match the SELECT\n if (updateLi !== false) {\n this.$element.find('option').each(function (index) {\n var $lis = that.findLis().eq(that.liObj[index]);\n\n that.setDisabled(index, this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled, $lis);\n that.setSelected(index, this.selected, $lis);\n });\n }\n\n this.togglePlaceholder();\n\n this.tabIndex();\n\n var selectedItems = this.$element.find('option').map(function () {\n if (this.selected) {\n if (that.options.hideDisabled && (this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled)) return;\n\n var $this = $(this),\n icon = $this.data('icon') && that.options.showIcon ? '<i class=\"' + that.options.iconBase + ' ' + $this.data('icon') + '\"></i> ' : '',\n subtext;\n\n if (that.options.showSubtext && $this.data('subtext') && !that.multiple) {\n subtext = ' <small class=\"text-muted\">' + $this.data('subtext') + '</small>';\n } else {\n subtext = '';\n }\n if (typeof $this.attr('title') !== 'undefined') {\n return $this.attr('title');\n } else if ($this.data('content') && that.options.showContent) {\n return $this.data('content').toString();\n } else {\n return icon + $this.html() + subtext;\n }\n }\n }).toArray();\n\n //Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled\n //Convert all the values into a comma delimited string\n var title = !this.multiple ? selectedItems[0] : selectedItems.join(this.options.multipleSeparator);\n\n //If this is multi select, and the selectText type is count, the show 1 of 2 selected etc..\n if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) {\n var max = this.options.selectedTextFormat.split('>');\n if ((max.length > 1 && selectedItems.length > max[1]) || (max.length == 1 && selectedItems.length >= 2)) {\n notDisabled = this.options.hideDisabled ? ', [disabled]' : '';\n var totalCount = this.$element.find('option').not('[data-divider=\"true\"], [data-hidden=\"true\"]' + notDisabled).length,\n tr8nText = (typeof this.options.countSelectedText === 'function') ? this.options.countSelectedText(selectedItems.length, totalCount) : this.options.countSelectedText;\n title = tr8nText.replace('{0}', selectedItems.length.toString()).replace('{1}', totalCount.toString());\n }\n }\n\n if (this.options.title == undefined) {\n this.options.title = this.$element.attr('title');\n }\n\n if (this.options.selectedTextFormat == 'static') {\n title = this.options.title;\n }\n\n //If we dont have a title, then use the default, or if nothing is set at all, use the not selected text\n if (!title) {\n title = typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText;\n }\n\n //strip all HTML tags and trim the result, then unescape any escaped tags\n this.$button.attr('title', htmlUnescape($.trim(title.replace(/<[^>]*>?/g, ''))));\n this.$button.children('.filter-option').html(title);\n\n this.$element.trigger('rendered.bs.select');\n },\n\n /**\n * @param [style]\n * @param [status]\n */\n setStyle: function (style, status) {\n if (this.$element.attr('class')) {\n this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|bs-select-hidden|validate\\[.*\\]/gi, ''));\n }\n\n var buttonClass = style ? style : this.options.style;\n\n if (status == 'add') {\n this.$button.addClass(buttonClass);\n } else if (status == 'remove') {\n this.$button.removeClass(buttonClass);\n } else {\n this.$button.removeClass(this.options.style);\n this.$button.addClass(buttonClass);\n }\n },\n\n liHeight: function (refresh) {\n if (!refresh && (this.options.size === false || this.sizeInfo)) return;\n\n var newElement = document.createElement('div'),\n menu = document.createElement('div'),\n menuInner = document.createElement('ul'),\n divider = document.createElement('li'),\n li = document.createElement('li'),\n a = document.createElement('a'),\n text = document.createElement('span'),\n header = this.options.header && this.$menu.find('.popover-title').length > 0 ? this.$menu.find('.popover-title')[0].cloneNode(true) : null,\n search = this.options.liveSearch ? document.createElement('div') : null,\n actions = this.options.actionsBox && this.multiple && this.$menu.find('.bs-actionsbox').length > 0 ? this.$menu.find('.bs-actionsbox')[0].cloneNode(true) : null,\n doneButton = this.options.doneButton && this.multiple && this.$menu.find('.bs-donebutton').length > 0 ? this.$menu.find('.bs-donebutton')[0].cloneNode(true) : null;\n\n text.className = 'text';\n newElement.className = this.$menu[0].parentNode.className + ' open';\n menu.className = 'dropdown-menu open';\n menuInner.className = 'dropdown-menu inner';\n divider.className = 'divider';\n\n text.appendChild(document.createTextNode('Inner text'));\n a.appendChild(text);\n li.appendChild(a);\n menuInner.appendChild(li);\n menuInner.appendChild(divider);\n if (header) menu.appendChild(header);\n if (search) {\n var input = document.createElement('input');\n search.className = 'bs-searchbox';\n input.className = 'form-control';\n search.appendChild(input);\n menu.appendChild(search);\n }\n if (actions) menu.appendChild(actions);\n menu.appendChild(menuInner);\n if (doneButton) menu.appendChild(doneButton);\n newElement.appendChild(menu);\n\n document.body.appendChild(newElement);\n\n var liHeight = a.offsetHeight,\n headerHeight = header ? header.offsetHeight : 0,\n searchHeight = search ? search.offsetHeight : 0,\n actionsHeight = actions ? actions.offsetHeight : 0,\n doneButtonHeight = doneButton ? doneButton.offsetHeight : 0,\n dividerHeight = $(divider).outerHeight(true),\n // fall back to jQuery if getComputedStyle is not supported\n menuStyle = typeof getComputedStyle === 'function' ? getComputedStyle(menu) : false,\n $menu = menuStyle ? null : $(menu),\n menuPadding = {\n vert: parseInt(menuStyle ? menuStyle.paddingTop : $menu.css('paddingTop')) +\n parseInt(menuStyle ? menuStyle.paddingBottom : $menu.css('paddingBottom')) +\n parseInt(menuStyle ? menuStyle.borderTopWidth : $menu.css('borderTopWidth')) +\n parseInt(menuStyle ? menuStyle.borderBottomWidth : $menu.css('borderBottomWidth')),\n horiz: parseInt(menuStyle ? menuStyle.paddingLeft : $menu.css('paddingLeft')) +\n parseInt(menuStyle ? menuStyle.paddingRight : $menu.css('paddingRight')) +\n parseInt(menuStyle ? menuStyle.borderLeftWidth : $menu.css('borderLeftWidth')) +\n parseInt(menuStyle ? menuStyle.borderRightWidth : $menu.css('borderRightWidth'))\n },\n menuExtras = {\n vert: menuPadding.vert +\n parseInt(menuStyle ? menuStyle.marginTop : $menu.css('marginTop')) +\n parseInt(menuStyle ? menuStyle.marginBottom : $menu.css('marginBottom')) + 2,\n horiz: menuPadding.horiz +\n parseInt(menuStyle ? menuStyle.marginLeft : $menu.css('marginLeft')) +\n parseInt(menuStyle ? menuStyle.marginRight : $menu.css('marginRight')) + 2\n }\n\n document.body.removeChild(newElement);\n\n this.sizeInfo = {\n liHeight: liHeight,\n headerHeight: headerHeight,\n searchHeight: searchHeight,\n actionsHeight: actionsHeight,\n doneButtonHeight: doneButtonHeight,\n dividerHeight: dividerHeight,\n menuPadding: menuPadding,\n menuExtras: menuExtras\n };\n },\n\n setSize: function () {\n this.findLis();\n this.liHeight();\n\n if (this.options.header) this.$menu.css('padding-top', 0);\n if (this.options.size === false) return;\n\n var that = this,\n $menu = this.$menu,\n $menuInner = this.$menuInner,\n $window = $(window),\n selectHeight = this.$newElement[0].offsetHeight,\n selectWidth = this.$newElement[0].offsetWidth,\n liHeight = this.sizeInfo['liHeight'],\n headerHeight = this.sizeInfo['headerHeight'],\n searchHeight = this.sizeInfo['searchHeight'],\n actionsHeight = this.sizeInfo['actionsHeight'],\n doneButtonHeight = this.sizeInfo['doneButtonHeight'],\n divHeight = this.sizeInfo['dividerHeight'],\n menuPadding = this.sizeInfo['menuPadding'],\n menuExtras = this.sizeInfo['menuExtras'],\n notDisabled = this.options.hideDisabled ? '.disabled' : '',\n menuHeight,\n menuWidth,\n getHeight,\n getWidth,\n selectOffsetTop,\n selectOffsetBot,\n selectOffsetLeft,\n selectOffsetRight,\n getPos = function() {\n var pos = that.$newElement.offset(),\n $container = $(that.options.container),\n containerPos;\n\n if (that.options.container && !$container.is('body')) {\n containerPos = $container.offset();\n containerPos.top += parseInt($container.css('borderTopWidth'));\n containerPos.left += parseInt($container.css('borderLeftWidth'));\n } else {\n containerPos = { top: 0, left: 0 };\n }\n\n var winPad = that.options.windowPadding;\n selectOffsetTop = pos.top - containerPos.top - $window.scrollTop();\n selectOffsetBot = $window.height() - selectOffsetTop - selectHeight - containerPos.top - winPad[2];\n selectOffsetLeft = pos.left - containerPos.left - $window.scrollLeft();\n selectOffsetRight = $window.width() - selectOffsetLeft - selectWidth - containerPos.left - winPad[1];\n selectOffsetTop -= winPad[0];\n selectOffsetLeft -= winPad[3];\n };\n\n getPos();\n\n if (this.options.size === 'auto') {\n var getSize = function () {\n var minHeight,\n hasClass = function (className, include) {\n return function (element) {\n if (include) {\n return (element.classList ? element.classList.contains(className) : $(element).hasClass(className));\n } else {\n return !(element.classList ? element.classList.contains(className) : $(element).hasClass(className));\n }\n };\n },\n lis = that.$menuInner[0].getElementsByTagName('li'),\n lisVisible = Array.prototype.filter ? Array.prototype.filter.call(lis, hasClass('hidden', false)) : that.$lis.not('.hidden'),\n optGroup = Array.prototype.filter ? Array.prototype.filter.call(lisVisible, hasClass('dropdown-header', true)) : lisVisible.filter('.dropdown-header');\n\n getPos();\n menuHeight = selectOffsetBot - menuExtras.vert;\n menuWidth = selectOffsetRight - menuExtras.horiz;\n\n if (that.options.container) {\n if (!$menu.data('height')) $menu.data('height', $menu.height());\n getHeight = $menu.data('height');\n\n if (!$menu.data('width')) $menu.data('width', $menu.width());\n getWidth = $menu.data('width');\n } else {\n getHeight = $menu.height();\n getWidth = $menu.width();\n }\n\n if (that.options.dropupAuto) {\n that.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && (menuHeight - menuExtras.vert) < getHeight);\n }\n\n if (that.$newElement.hasClass('dropup')) {\n menuHeight = selectOffsetTop - menuExtras.vert;\n }\n\n if (that.options.dropdownAlignRight === 'auto') {\n $menu.toggleClass('dropdown-menu-right', selectOffsetLeft > selectOffsetRight && (menuWidth - menuExtras.horiz) < (getWidth - selectWidth));\n }\n\n if ((lisVisible.length + optGroup.length) > 3) {\n minHeight = liHeight * 3 + menuExtras.vert - 2;\n } else {\n minHeight = 0;\n }\n\n $menu.css({\n 'max-height': menuHeight + 'px',\n 'overflow': 'hidden',\n 'min-height': minHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px'\n });\n $menuInner.css({\n 'max-height': menuHeight - headerHeight - searchHeight - actionsHeight - doneButtonHeight - menuPadding.vert + 'px',\n 'overflow-y': 'auto',\n 'min-height': Math.max(minHeight - menuPadding.vert, 0) + 'px'\n });\n };\n getSize();\n this.$searchbox.off('input.getSize propertychange.getSize').on('input.getSize propertychange.getSize', getSize);\n $window.off('resize.getSize scroll.getSize').on('resize.getSize scroll.getSize', getSize);\n } else if (this.options.size && this.options.size != 'auto' && this.$lis.not(notDisabled).length > this.options.size) {\n var optIndex = this.$lis.not('.divider').not(notDisabled).children().slice(0, this.options.size).last().parent().index(),\n divLength = this.$lis.slice(0, optIndex + 1).filter('.divider').length;\n menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding.vert;\n\n if (that.options.container) {\n if (!$menu.data('height')) $menu.data('height', $menu.height());\n getHeight = $menu.data('height');\n } else {\n getHeight = $menu.height();\n }\n\n if (that.options.dropupAuto) {\n //noinspection JSUnusedAssignment\n this.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && (menuHeight - menuExtras.vert) < getHeight);\n }\n $menu.css({\n 'max-height': menuHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px',\n 'overflow': 'hidden',\n 'min-height': ''\n });\n $menuInner.css({\n 'max-height': menuHeight - menuPadding.vert + 'px',\n 'overflow-y': 'auto',\n 'min-height': ''\n });\n }\n },\n\n setWidth: function () {\n if (this.options.width === 'auto') {\n this.$menu.css('min-width', '0');\n\n // Get correct width if element is hidden\n var $selectClone = this.$menu.parent().clone().appendTo('body'),\n $selectClone2 = this.options.container ? this.$newElement.clone().appendTo('body') : $selectClone,\n ulWidth = $selectClone.children('.dropdown-menu').outerWidth(),\n btnWidth = $selectClone2.css('width', 'auto').children('button').outerWidth();\n\n $selectClone.remove();\n $selectClone2.remove();\n\n // Set width to whatever's larger, button title or longest option\n this.$newElement.css('width', Math.max(ulWidth, btnWidth) + 'px');\n } else if (this.options.width === 'fit') {\n // Remove inline min-width so width can be changed from 'auto'\n this.$menu.css('min-width', '');\n this.$newElement.css('width', '').addClass('fit-width');\n } else if (this.options.width) {\n // Remove inline min-width so width can be changed from 'auto'\n this.$menu.css('min-width', '');\n this.$newElement.css('width', this.options.width);\n } else {\n // Remove inline min-width/width so width can be changed\n this.$menu.css('min-width', '');\n this.$newElement.css('width', '');\n }\n // Remove fit-width class if width is changed programmatically\n if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') {\n this.$newElement.removeClass('fit-width');\n }\n },\n\n selectPosition: function () {\n this.$bsContainer = $('<div class=\"bs-container\" />');\n\n var that = this,\n $container = $(this.options.container),\n pos,\n containerPos,\n actualHeight,\n getPlacement = function ($element) {\n that.$bsContainer.addClass($element.attr('class').replace(/form-control|fit-width/gi, '')).toggleClass('dropup', $element.hasClass('dropup'));\n pos = $element.offset();\n\n if (!$container.is('body')) {\n containerPos = $container.offset();\n containerPos.top += parseInt($container.css('borderTopWidth')) - $container.scrollTop();\n containerPos.left += parseInt($container.css('borderLeftWidth')) - $container.scrollLeft();\n } else {\n containerPos = { top: 0, left: 0 };\n }\n\n actualHeight = $element.hasClass('dropup') ? 0 : $element[0].offsetHeight;\n\n that.$bsContainer.css({\n 'top': pos.top - containerPos.top + actualHeight,\n 'left': pos.left - containerPos.left,\n 'width': $element[0].offsetWidth\n });\n };\n\n this.$button.on('click', function () {\n var $this = $(this);\n\n if (that.isDisabled()) {\n return;\n }\n\n getPlacement(that.$newElement);\n\n that.$bsContainer\n .appendTo(that.options.container)\n .toggleClass('open', !$this.hasClass('open'))\n .append(that.$menu);\n });\n\n $(window).on('resize scroll', function () {\n getPlacement(that.$newElement);\n });\n\n this.$element.on('hide.bs.select', function () {\n that.$menu.data('height', that.$menu.height());\n that.$bsContainer.detach();\n });\n },\n\n /**\n * @param {number} index - the index of the option that is being changed\n * @param {boolean} selected - true if the option is being selected, false if being deselected\n * @param {JQuery} $lis - the 'li' element that is being modified\n */\n setSelected: function (index, selected, $lis) {\n if (!$lis) {\n this.togglePlaceholder(); // check if setSelected is being called by changing the value of the select\n $lis = this.findLis().eq(this.liObj[index]);\n }\n\n $lis.toggleClass('selected', selected).find('a').attr('aria-selected', selected);\n },\n\n /**\n * @param {number} index - the index of the option that is being disabled\n * @param {boolean} disabled - true if the option is being disabled, false if being enabled\n * @param {JQuery} $lis - the 'li' element that is being modified\n */\n setDisabled: function (index, disabled, $lis) {\n if (!$lis) {\n $lis = this.findLis().eq(this.liObj[index]);\n }\n\n if (disabled) {\n $lis.addClass('disabled').children('a').attr('href', '#').attr('tabindex', -1).attr('aria-disabled', true);\n } else {\n $lis.removeClass('disabled').children('a').removeAttr('href').attr('tabindex', 0).attr('aria-disabled', false);\n }\n },\n\n isDisabled: function () {\n return this.$element[0].disabled;\n },\n\n checkDisabled: function () {\n var that = this;\n\n if (this.isDisabled()) {\n this.$newElement.addClass('disabled');\n this.$button.addClass('disabled').attr('tabindex', -1).attr('aria-disabled', true);\n } else {\n if (this.$button.hasClass('disabled')) {\n this.$newElement.removeClass('disabled');\n this.$button.removeClass('disabled').attr('aria-disabled', false);\n }\n\n if (this.$button.attr('tabindex') == -1 && !this.$element.data('tabindex')) {\n this.$button.removeAttr('tabindex');\n }\n }\n\n this.$button.click(function () {\n return !that.isDisabled();\n });\n },\n\n togglePlaceholder: function () {\n var value = this.$element.val();\n this.$button.toggleClass('bs-placeholder', value === null || value === '' || (value.constructor === Array && value.length === 0));\n },\n\n tabIndex: function () {\n if (this.$element.data('tabindex') !== this.$element.attr('tabindex') && \n (this.$element.attr('tabindex') !== -98 && this.$element.attr('tabindex') !== '-98')) {\n this.$element.data('tabindex', this.$element.attr('tabindex'));\n this.$button.attr('tabindex', this.$element.data('tabindex'));\n }\n\n this.$element.attr('tabindex', -98);\n },\n\n clickListener: function () {\n var that = this,\n $document = $(document);\n\n $document.data('spaceSelect', false);\n\n this.$button.on('keyup', function (e) {\n if (/(32)/.test(e.keyCode.toString(10)) && $document.data('spaceSelect')) {\n e.preventDefault();\n $document.data('spaceSelect', false);\n }\n });\n\n this.$button.on('click', function () {\n that.setSize();\n });\n\n this.$element.on('shown.bs.select', function () {\n if (!that.options.liveSearch && !that.multiple) {\n that.$menuInner.find('.selected a').focus();\n } else if (!that.multiple) {\n var selectedIndex = that.liObj[that.$element[0].selectedIndex];\n\n if (typeof selectedIndex !== 'number' || that.options.size === false) return;\n\n // scroll to selected option\n var offset = that.$lis.eq(selectedIndex)[0].offsetTop - that.$menuInner[0].offsetTop;\n offset = offset - that.$menuInner[0].offsetHeight/2 + that.sizeInfo.liHeight/2;\n that.$menuInner[0].scrollTop = offset;\n }\n });\n\n this.$menuInner.on('click', 'li a', function (e) {\n var $this = $(this),\n clickedIndex = $this.parent().data('originalIndex'),\n prevValue = that.$element.val(),\n prevIndex = that.$element.prop('selectedIndex'),\n triggerChange = true;\n\n // Don't close on multi choice menu\n if (that.multiple && that.options.maxOptions !== 1) {\n e.stopPropagation();\n }\n\n e.preventDefault();\n\n //Don't run if we have been disabled\n if (!that.isDisabled() && !$this.parent().hasClass('disabled')) {\n var $options = that.$element.find('option'),\n $option = $options.eq(clickedIndex),\n state = $option.prop('selected'),\n $optgroup = $option.parent('optgroup'),\n maxOptions = that.options.maxOptions,\n maxOptionsGrp = $optgroup.data('maxOptions') || false;\n\n if (!that.multiple) { // Deselect all others if not multi select box\n $options.prop('selected', false);\n $option.prop('selected', true);\n that.$menuInner.find('.selected').removeClass('selected').find('a').attr('aria-selected', false);\n that.setSelected(clickedIndex, true);\n } else { // Toggle the one we have chosen if we are multi select.\n $option.prop('selected', !state);\n that.setSelected(clickedIndex, !state);\n $this.blur();\n\n if (maxOptions !== false || maxOptionsGrp !== false) {\n var maxReached = maxOptions < $options.filter(':selected').length,\n maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length;\n\n if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) {\n if (maxOptions && maxOptions == 1) {\n $options.prop('selected', false);\n $option.prop('selected', true);\n that.$menuInner.find('.selected').removeClass('selected');\n that.setSelected(clickedIndex, true);\n } else if (maxOptionsGrp && maxOptionsGrp == 1) {\n $optgroup.find('option:selected').prop('selected', false);\n $option.prop('selected', true);\n var optgroupID = $this.parent().data('optgroup');\n that.$menuInner.find('[data-optgroup=\"' + optgroupID + '\"]').removeClass('selected');\n that.setSelected(clickedIndex, true);\n } else {\n var maxOptionsText = typeof that.options.maxOptionsText === 'string' ? [that.options.maxOptionsText, that.options.maxOptionsText] : that.options.maxOptionsText,\n maxOptionsArr = typeof maxOptionsText === 'function' ? maxOptionsText(maxOptions, maxOptionsGrp) : maxOptionsText,\n maxTxt = maxOptionsArr[0].replace('{n}', maxOptions),\n maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp),\n $notify = $('<div class=\"notify\"></div>');\n // If {var} is set in array, replace it\n /** @deprecated */\n if (maxOptionsArr[2]) {\n maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]);\n maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]);\n }\n\n $option.prop('selected', false);\n\n that.$menu.append($notify);\n\n if (maxOptions && maxReached) {\n $notify.append($('<div>' + maxTxt + '</div>'));\n triggerChange = false;\n that.$element.trigger('maxReached.bs.select');\n }\n\n if (maxOptionsGrp && maxReachedGrp) {\n $notify.append($('<div>' + maxTxtGrp + '</div>'));\n triggerChange = false;\n that.$element.trigger('maxReachedGrp.bs.select');\n }\n\n setTimeout(function () {\n that.setSelected(clickedIndex, false);\n }, 10);\n\n $notify.delay(750).fadeOut(300, function () {\n $(this).remove();\n });\n }\n }\n }\n }\n\n if (!that.multiple || (that.multiple && that.options.maxOptions === 1)) {\n that.$button.focus();\n } else if (that.options.liveSearch) {\n that.$searchbox.focus();\n }\n\n // Trigger select 'change'\n if (triggerChange) {\n if ((prevValue != that.$element.val() && that.multiple) || (prevIndex != that.$element.prop('selectedIndex') && !that.multiple)) {\n // $option.prop('selected') is current option state (selected/unselected). state is previous option state.\n changed_arguments = [clickedIndex, $option.prop('selected'), state];\n that.$element\n .triggerNative('change');\n }\n }\n }\n });\n\n this.$menu.on('click', 'li.disabled a, .popover-title, .popover-title :not(.close)', function (e) {\n if (e.currentTarget == this) {\n e.preventDefault();\n e.stopPropagation();\n if (that.options.liveSearch && !$(e.target).hasClass('close')) {\n that.$searchbox.focus();\n } else {\n that.$button.focus();\n }\n }\n });\n\n this.$menuInner.on('click', '.divider, .dropdown-header', function (e) {\n e.preventDefault();\n e.stopPropagation();\n if (that.options.liveSearch) {\n that.$searchbox.focus();\n } else {\n that.$button.focus();\n }\n });\n\n this.$menu.on('click', '.popover-title .close', function () {\n that.$button.click();\n });\n\n this.$searchbox.on('click', function (e) {\n e.stopPropagation();\n });\n\n this.$menu.on('click', '.actions-btn', function (e) {\n if (that.options.liveSearch) {\n that.$searchbox.focus();\n } else {\n that.$button.focus();\n }\n\n e.preventDefault();\n e.stopPropagation();\n\n if ($(this).hasClass('bs-select-all')) {\n that.selectAll();\n } else {\n that.deselectAll();\n }\n });\n\n this.$element.change(function () {\n that.render(false);\n that.$element.trigger('changed.bs.select', changed_arguments);\n changed_arguments = null;\n });\n },\n\n liveSearchListener: function () {\n var that = this,\n $no_results = $('<li class=\"no-results\"></li>');\n\n this.$button.on('click.dropdown.data-api', function () {\n that.$menuInner.find('.active').removeClass('active');\n if (!!that.$searchbox.val()) {\n that.$searchbox.val('');\n that.$lis.not('.is-hidden').removeClass('hidden');\n if (!!$no_results.parent().length) $no_results.remove();\n }\n if (!that.multiple) that.$menuInner.find('.selected').addClass('active');\n setTimeout(function () {\n that.$searchbox.focus();\n }, 10);\n });\n\n this.$searchbox.on('click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api', function (e) {\n e.stopPropagation();\n });\n\n this.$searchbox.on('input propertychange', function () {\n that.$lis.not('.is-hidden').removeClass('hidden');\n that.$lis.filter('.active').removeClass('active');\n $no_results.remove();\n\n if (that.$searchbox.val()) {\n var $searchBase = that.$lis.not('.is-hidden, .divider, .dropdown-header'),\n $hideItems;\n if (that.options.liveSearchNormalize) {\n $hideItems = $searchBase.find('a').not(':a' + that._searchStyle() + '(\"' + normalizeToBase(that.$searchbox.val()) + '\")');\n } else {\n $hideItems = $searchBase.find('a').not(':' + that._searchStyle() + '(\"' + that.$searchbox.val() + '\")');\n }\n\n if ($hideItems.length === $searchBase.length) {\n $no_results.html(that.options.noneResultsText.replace('{0}', '\"' + htmlEscape(that.$searchbox.val()) + '\"'));\n that.$menuInner.append($no_results);\n that.$lis.addClass('hidden');\n } else {\n $hideItems.parent().addClass('hidden');\n\n var $lisVisible = that.$lis.not('.hidden'),\n $foundDiv;\n\n // hide divider if first or last visible, or if followed by another divider\n $lisVisible.each(function (index) {\n var $this = $(this);\n\n if ($this.hasClass('divider')) {\n if ($foundDiv === undefined) {\n $this.addClass('hidden');\n } else {\n if ($foundDiv) $foundDiv.addClass('hidden');\n $foundDiv = $this;\n }\n } else if ($this.hasClass('dropdown-header') && $lisVisible.eq(index + 1).data('optgroup') !== $this.data('optgroup')) {\n $this.addClass('hidden');\n } else {\n $foundDiv = null;\n }\n });\n if ($foundDiv) $foundDiv.addClass('hidden');\n\n $searchBase.not('.hidden').first().addClass('active');\n }\n }\n });\n },\n\n _searchStyle: function () {\n var styles = {\n begins: 'ibegins',\n startsWith: 'ibegins'\n };\n\n return styles[this.options.liveSearchStyle] || 'icontains';\n },\n\n val: function (value) {\n if (typeof value !== 'undefined') {\n this.$element.val(value);\n this.render();\n\n return this.$element;\n } else {\n return this.$element.val();\n }\n },\n\n changeAll: function (status) {\n if (!this.multiple) return;\n if (typeof status === 'undefined') status = true;\n\n this.findLis();\n\n var $options = this.$element.find('option'),\n $lisVisible = this.$lis.not('.divider, .dropdown-header, .disabled, .hidden'),\n lisVisLen = $lisVisible.length,\n selectedOptions = [];\n \n if (status) {\n if ($lisVisible.filter('.selected').length === $lisVisible.length) return;\n } else {\n if ($lisVisible.filter('.selected').length === 0) return;\n }\n \n $lisVisible.toggleClass('selected', status);\n\n for (var i = 0; i < lisVisLen; i++) {\n var origIndex = $lisVisible[i].getAttribute('data-original-index');\n selectedOptions[selectedOptions.length] = $options.eq(origIndex)[0];\n }\n\n $(selectedOptions).prop('selected', status);\n\n this.render(false);\n\n this.togglePlaceholder();\n\n this.$element\n .triggerNative('change');\n },\n\n selectAll: function () {\n return this.changeAll(true);\n },\n\n deselectAll: function () {\n return this.changeAll(false);\n },\n\n toggle: function (e) {\n e = e || window.event;\n\n if (e) e.stopPropagation();\n\n this.$button.trigger('click');\n },\n\n keydown: function (e) {\n var $this = $(this),\n $parent = $this.is('input') ? $this.parent().parent() : $this.parent(),\n $items,\n that = $parent.data('this'),\n index,\n next,\n first,\n last,\n prev,\n nextPrev,\n prevIndex,\n isActive,\n selector = ':not(.disabled, .hidden, .dropdown-header, .divider)',\n keyCodeMap = {\n 32: ' ',\n 48: '0',\n 49: '1',\n 50: '2',\n 51: '3',\n 52: '4',\n 53: '5',\n 54: '6',\n 55: '7',\n 56: '8',\n 57: '9',\n 59: ';',\n 65: 'a',\n 66: 'b',\n 67: 'c',\n 68: 'd',\n 69: 'e',\n 70: 'f',\n 71: 'g',\n 72: 'h',\n 73: 'i',\n 74: 'j',\n 75: 'k',\n 76: 'l',\n 77: 'm',\n 78: 'n',\n 79: 'o',\n 80: 'p',\n 81: 'q',\n 82: 'r',\n 83: 's',\n 84: 't',\n 85: 'u',\n 86: 'v',\n 87: 'w',\n 88: 'x',\n 89: 'y',\n 90: 'z',\n 96: '0',\n 97: '1',\n 98: '2',\n 99: '3',\n 100: '4',\n 101: '5',\n 102: '6',\n 103: '7',\n 104: '8',\n 105: '9'\n };\n\n if (that.options.liveSearch) $parent = $this.parent().parent();\n\n if (that.options.container) $parent = that.$menu;\n\n $items = $('[role=\"listbox\"] li', $parent);\n\n isActive = that.$newElement.hasClass('open');\n\n if (!isActive && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105 || e.keyCode >= 65 && e.keyCode <= 90)) {\n if (!that.options.container) {\n that.setSize();\n that.$menu.parent().addClass('open');\n isActive = true;\n } else {\n that.$button.trigger('click');\n }\n that.$searchbox.focus();\n return;\n }\n\n if (that.options.liveSearch) {\n if (/(^9$|27)/.test(e.keyCode.toString(10)) && isActive) {\n e.preventDefault();\n e.stopPropagation();\n that.$menuInner.click();\n that.$button.focus();\n }\n // $items contains li elements when liveSearch is enabled\n $items = $('[role=\"listbox\"] li' + selector, $parent);\n if (!$this.val() && !/(38|40)/.test(e.keyCode.toString(10))) {\n if ($items.filter('.active').length === 0) {\n $items = that.$menuInner.find('li');\n if (that.options.liveSearchNormalize) {\n $items = $items.filter(':a' + that._searchStyle() + '(' + normalizeToBase(keyCodeMap[e.keyCode]) + ')');\n } else {\n $items = $items.filter(':' + that._searchStyle() + '(' + keyCodeMap[e.keyCode] + ')');\n }\n }\n }\n }\n\n if (!$items.length) return;\n\n if (/(38|40)/.test(e.keyCode.toString(10))) {\n index = $items.index($items.find('a').filter(':focus').parent());\n first = $items.filter(selector).first().index();\n last = $items.filter(selector).last().index();\n next = $items.eq(index).nextAll(selector).eq(0).index();\n prev = $items.eq(index).prevAll(selector).eq(0).index();\n nextPrev = $items.eq(next).prevAll(selector).eq(0).index();\n\n if (that.options.liveSearch) {\n $items.each(function (i) {\n if (!$(this).hasClass('disabled')) {\n $(this).data('index', i);\n }\n });\n index = $items.index($items.filter('.active'));\n first = $items.first().data('index');\n last = $items.last().data('index');\n next = $items.eq(index).nextAll().eq(0).data('index');\n prev = $items.eq(index).prevAll().eq(0).data('index');\n nextPrev = $items.eq(next).prevAll().eq(0).data('index');\n }\n\n prevIndex = $this.data('prevIndex');\n\n if (e.keyCode == 38) {\n if (that.options.liveSearch) index--;\n if (index != nextPrev && index > prev) index = prev;\n if (index < first) index = first;\n if (index == prevIndex) index = last;\n } else if (e.keyCode == 40) {\n if (that.options.liveSearch) index++;\n if (index == -1) index = 0;\n if (index != nextPrev && index < next) index = next;\n if (index > last) index = last;\n if (index == prevIndex) index = first;\n }\n\n $this.data('prevIndex', index);\n\n if (!that.options.liveSearch) {\n $items.eq(index).children('a').focus();\n } else {\n e.preventDefault();\n if (!$this.hasClass('dropdown-toggle')) {\n $items.removeClass('active').eq(index).addClass('active').children('a').focus();\n $this.focus();\n }\n }\n\n } else if (!$this.is('input')) {\n var keyIndex = [],\n count,\n prevKey;\n\n $items.each(function () {\n if (!$(this).hasClass('disabled')) {\n if ($.trim($(this).children('a').text().toLowerCase()).substring(0, 1) == keyCodeMap[e.keyCode]) {\n keyIndex.push($(this).index());\n }\n }\n });\n\n count = $(document).data('keycount');\n count++;\n $(document).data('keycount', count);\n\n prevKey = $.trim($(':focus').text().toLowerCase()).substring(0, 1);\n\n if (prevKey != keyCodeMap[e.keyCode]) {\n count = 1;\n $(document).data('keycount', count);\n } else if (count >= keyIndex.length) {\n $(document).data('keycount', 0);\n if (count > keyIndex.length) count = 1;\n }\n\n $items.eq(keyIndex[count - 1]).children('a').focus();\n }\n\n // Select focused option if \"Enter\", \"Spacebar\" or \"Tab\" (when selectOnTab is true) are pressed inside the menu.\n if ((/(13|32)/.test(e.keyCode.toString(10)) || (/(^9$)/.test(e.keyCode.toString(10)) && that.options.selectOnTab)) && isActive) {\n if (!/(32)/.test(e.keyCode.toString(10))) e.preventDefault();\n if (!that.options.liveSearch) {\n var elem = $(':focus');\n elem.click();\n // Bring back focus for multiselects\n elem.focus();\n // Prevent screen from scrolling if the user hit the spacebar\n e.preventDefault();\n // Fixes spacebar selection of dropdown items in FF & IE\n $(document).data('spaceSelect', true);\n } else if (!/(32)/.test(e.keyCode.toString(10))) {\n that.$menuInner.find('.active a').click();\n $this.focus();\n }\n $(document).data('keycount', 0);\n }\n\n if ((/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && (that.multiple || that.options.liveSearch)) || (/(27)/.test(e.keyCode.toString(10)) && !isActive)) {\n that.$menu.parent().removeClass('open');\n if (that.options.container) that.$newElement.removeClass('open');\n that.$button.focus();\n }\n },\n\n mobile: function () {\n this.$element.addClass('mobile-device');\n },\n\n refresh: function () {\n this.$lis = null;\n this.liObj = {};\n this.reloadLi();\n this.render();\n this.checkDisabled();\n this.liHeight(true);\n this.setStyle();\n this.setWidth();\n if (this.$lis) this.$searchbox.trigger('propertychange');\n\n this.$element.trigger('refreshed.bs.select');\n },\n\n hide: function () {\n this.$newElement.hide();\n },\n\n show: function () {\n this.$newElement.show();\n },\n\n remove: function () {\n this.$newElement.remove();\n this.$element.remove();\n },\n\n destroy: function () {\n this.$newElement.before(this.$element).remove();\n\n if (this.$bsContainer) {\n this.$bsContainer.remove();\n } else {\n this.$menu.remove();\n }\n\n this.$element\n .off('.bs.select')\n .removeData('selectpicker')\n .removeClass('bs-select-hidden selectpicker');\n }\n };\n\n // SELECTPICKER PLUGIN DEFINITION\n // ==============================\n function Plugin(option) {\n // get the args of the outer function..\n var args = arguments;\n // The arguments of the function are explicitly re-defined from the argument list, because the shift causes them\n // to get lost/corrupted in android 2.3 and IE9 #715 #775\n var _option = option;\n\n [].shift.apply(args);\n\n var value;\n var chain = this.each(function () {\n var $this = $(this);\n if ($this.is('select')) {\n var data = $this.data('selectpicker'),\n options = typeof _option == 'object' && _option;\n\n if (!data) {\n var config = $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, $this.data(), options);\n config.template = $.extend({}, Selectpicker.DEFAULTS.template, ($.fn.selectpicker.defaults ? $.fn.selectpicker.defaults.template : {}), $this.data().template, options.template);\n $this.data('selectpicker', (data = new Selectpicker(this, config)));\n } else if (options) {\n for (var i in options) {\n if (options.hasOwnProperty(i)) {\n data.options[i] = options[i];\n }\n }\n }\n\n if (typeof _option == 'string') {\n if (data[_option] instanceof Function) {\n value = data[_option].apply(data, args);\n } else {\n value = data.options[_option];\n }\n }\n }\n });\n\n if (typeof value !== 'undefined') {\n //noinspection JSUnusedAssignment\n return value;\n } else {\n return chain;\n }\n }\n\n var old = $.fn.selectpicker;\n $.fn.selectpicker = Plugin;\n $.fn.selectpicker.Constructor = Selectpicker;\n\n // SELECTPICKER NO CONFLICT\n // ========================\n $.fn.selectpicker.noConflict = function () {\n $.fn.selectpicker = old;\n return this;\n };\n\n $(document)\n .data('keycount', 0)\n .on('keydown.bs.select', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=\"listbox\"], .bs-searchbox input', Selectpicker.prototype.keydown)\n .on('focusin.modal', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=\"listbox\"], .bs-searchbox input', function (e) {\n e.stopPropagation();\n });\n\n // SELECTPICKER DATA-API\n // =====================\n $(window).on('load.bs.select.data-api', function () {\n $('.selectpicker').each(function () {\n var $selectpicker = $(this);\n Plugin.call($selectpicker, $selectpicker.data());\n })\n });\n})(jQuery);\n\n\n}));\n","!function(a,b,c,d){\"use strict\";var e=\"treeview\",f={};f.settings={injectStyle:!0,levels:2,expandIcon:\"glyphicon glyphicon-plus\",collapseIcon:\"glyphicon glyphicon-minus\",emptyIcon:\"glyphicon\",nodeIcon:\"\",selectedIcon:\"\",checkedIcon:\"glyphicon glyphicon-check\",uncheckedIcon:\"glyphicon glyphicon-unchecked\",color:d,backColor:d,borderColor:d,onhoverColor:\"#F5F5F5\",selectedColor:\"#FFFFFF\",selectedBackColor:\"#428bca\",searchResultColor:\"#D9534F\",searchResultBackColor:d,enableLinks:!1,highlightSelected:!0,highlightSearchResults:!0,showBorder:!0,showIcon:!0,showCheckbox:!1,showTags:!1,multiSelect:!1,onNodeChecked:d,onNodeCollapsed:d,onNodeDisabled:d,onNodeEnabled:d,onNodeExpanded:d,onNodeSelected:d,onNodeUnchecked:d,onNodeUnselected:d,onSearchComplete:d,onSearchCleared:d},f.options={silent:!1,ignoreChildren:!1},f.searchOptions={ignoreCase:!0,exactMatch:!1,revealResults:!0};var g=function(b,c){return this.$element=a(b),this.elementId=b.id,this.styleId=this.elementId+\"-style\",this.init(c),{options:this.options,init:a.proxy(this.init,this),remove:a.proxy(this.remove,this),getNode:a.proxy(this.getNode,this),getParent:a.proxy(this.getParent,this),getSiblings:a.proxy(this.getSiblings,this),getSelected:a.proxy(this.getSelected,this),getUnselected:a.proxy(this.getUnselected,this),getExpanded:a.proxy(this.getExpanded,this),getCollapsed:a.proxy(this.getCollapsed,this),getChecked:a.proxy(this.getChecked,this),getUnchecked:a.proxy(this.getUnchecked,this),getDisabled:a.proxy(this.getDisabled,this),getEnabled:a.proxy(this.getEnabled,this),selectNode:a.proxy(this.selectNode,this),unselectNode:a.proxy(this.unselectNode,this),toggleNodeSelected:a.proxy(this.toggleNodeSelected,this),collapseAll:a.proxy(this.collapseAll,this),collapseNode:a.proxy(this.collapseNode,this),expandAll:a.proxy(this.expandAll,this),expandNode:a.proxy(this.expandNode,this),toggleNodeExpanded:a.proxy(this.toggleNodeExpanded,this),revealNode:a.proxy(this.revealNode,this),checkAll:a.proxy(this.checkAll,this),checkNode:a.proxy(this.checkNode,this),uncheckAll:a.proxy(this.uncheckAll,this),uncheckNode:a.proxy(this.uncheckNode,this),toggleNodeChecked:a.proxy(this.toggleNodeChecked,this),disableAll:a.proxy(this.disableAll,this),disableNode:a.proxy(this.disableNode,this),enableAll:a.proxy(this.enableAll,this),enableNode:a.proxy(this.enableNode,this),toggleNodeDisabled:a.proxy(this.toggleNodeDisabled,this),search:a.proxy(this.search,this),clearSearch:a.proxy(this.clearSearch,this)}};g.prototype.init=function(b){this.tree=[],this.nodes=[],b.data&&(\"string\"==typeof b.data&&(b.data=a.parseJSON(b.data)),this.tree=a.extend(!0,[],b.data),delete b.data),this.options=a.extend({},f.settings,b),this.destroy(),this.subscribeEvents(),this.setInitialStates({nodes:this.tree},0),this.render()},g.prototype.remove=function(){this.destroy(),a.removeData(this,e),a(\"#\"+this.styleId).remove()},g.prototype.destroy=function(){this.initialized&&(this.$wrapper.remove(),this.$wrapper=null,this.unsubscribeEvents(),this.initialized=!1)},g.prototype.unsubscribeEvents=function(){this.$element.off(\"click\"),this.$element.off(\"nodeChecked\"),this.$element.off(\"nodeCollapsed\"),this.$element.off(\"nodeDisabled\"),this.$element.off(\"nodeEnabled\"),this.$element.off(\"nodeExpanded\"),this.$element.off(\"nodeSelected\"),this.$element.off(\"nodeUnchecked\"),this.$element.off(\"nodeUnselected\"),this.$element.off(\"searchComplete\"),this.$element.off(\"searchCleared\")},g.prototype.subscribeEvents=function(){this.unsubscribeEvents(),this.$element.on(\"click\",a.proxy(this.clickHandler,this)),\"function\"==typeof this.options.onNodeChecked&&this.$element.on(\"nodeChecked\",this.options.onNodeChecked),\"function\"==typeof this.options.onNodeCollapsed&&this.$element.on(\"nodeCollapsed\",this.options.onNodeCollapsed),\"function\"==typeof this.options.onNodeDisabled&&this.$element.on(\"nodeDisabled\",this.options.onNodeDisabled),\"function\"==typeof this.options.onNodeEnabled&&this.$element.on(\"nodeEnabled\",this.options.onNodeEnabled),\"function\"==typeof this.options.onNodeExpanded&&this.$element.on(\"nodeExpanded\",this.options.onNodeExpanded),\"function\"==typeof this.options.onNodeSelected&&this.$element.on(\"nodeSelected\",this.options.onNodeSelected),\"function\"==typeof this.options.onNodeUnchecked&&this.$element.on(\"nodeUnchecked\",this.options.onNodeUnchecked),\"function\"==typeof this.options.onNodeUnselected&&this.$element.on(\"nodeUnselected\",this.options.onNodeUnselected),\"function\"==typeof this.options.onSearchComplete&&this.$element.on(\"searchComplete\",this.options.onSearchComplete),\"function\"==typeof this.options.onSearchCleared&&this.$element.on(\"searchCleared\",this.options.onSearchCleared)},g.prototype.setInitialStates=function(b,c){if(b.nodes){c+=1;var d=b,e=this;a.each(b.nodes,function(a,b){b.nodeId=e.nodes.length,b.parentId=d.nodeId,b.hasOwnProperty(\"selectable\")||(b.selectable=!0),b.state=b.state||{},b.state.hasOwnProperty(\"checked\")||(b.state.checked=!1),b.state.hasOwnProperty(\"disabled\")||(b.state.disabled=!1),b.state.hasOwnProperty(\"expanded\")||(!b.state.disabled&&c<e.options.levels&&b.nodes&&b.nodes.length>0?b.state.expanded=!0:b.state.expanded=!1),b.state.hasOwnProperty(\"selected\")||(b.state.selected=!1),e.nodes.push(b),b.nodes&&e.setInitialStates(b,c)})}},g.prototype.clickHandler=function(b){this.options.enableLinks||b.preventDefault();var c=a(b.target),d=this.findNode(c);if(d&&!d.state.disabled){var e=c.attr(\"class\")?c.attr(\"class\").split(\" \"):[];-1!==e.indexOf(\"expand-icon\")?(this.toggleExpandedState(d,f.options),this.render()):-1!==e.indexOf(\"check-icon\")?(this.toggleCheckedState(d,f.options),this.render()):(d.selectable?this.toggleSelectedState(d,f.options):this.toggleExpandedState(d,f.options),this.render())}},g.prototype.findNode=function(a){var b=a.closest(\"li.list-group-item\").attr(\"data-nodeid\"),c=this.nodes[b];return c||console.log(\"Error: node does not exist\"),c},g.prototype.toggleExpandedState=function(a,b){a&&this.setExpandedState(a,!a.state.expanded,b)},g.prototype.setExpandedState=function(b,c,d){c!==b.state.expanded&&(c&&b.nodes?(b.state.expanded=!0,d.silent||this.$element.trigger(\"nodeExpanded\",a.extend(!0,{},b))):c||(b.state.expanded=!1,d.silent||this.$element.trigger(\"nodeCollapsed\",a.extend(!0,{},b)),b.nodes&&!d.ignoreChildren&&a.each(b.nodes,a.proxy(function(a,b){this.setExpandedState(b,!1,d)},this))))},g.prototype.toggleSelectedState=function(a,b){a&&this.setSelectedState(a,!a.state.selected,b)},g.prototype.setSelectedState=function(b,c,d){c!==b.state.selected&&(c?(this.options.multiSelect||a.each(this.findNodes(\"true\",\"g\",\"state.selected\"),a.proxy(function(a,b){this.setSelectedState(b,!1,d)},this)),b.state.selected=!0,d.silent||this.$element.trigger(\"nodeSelected\",a.extend(!0,{},b))):(b.state.selected=!1,d.silent||this.$element.trigger(\"nodeUnselected\",a.extend(!0,{},b))))},g.prototype.toggleCheckedState=function(a,b){a&&this.setCheckedState(a,!a.state.checked,b)},g.prototype.setCheckedState=function(b,c,d){c!==b.state.checked&&(c?(b.state.checked=!0,d.silent||this.$element.trigger(\"nodeChecked\",a.extend(!0,{},b))):(b.state.checked=!1,d.silent||this.$element.trigger(\"nodeUnchecked\",a.extend(!0,{},b))))},g.prototype.setDisabledState=function(b,c,d){c!==b.state.disabled&&(c?(b.state.disabled=!0,this.setExpandedState(b,!1,d),this.setSelectedState(b,!1,d),this.setCheckedState(b,!1,d),d.silent||this.$element.trigger(\"nodeDisabled\",a.extend(!0,{},b))):(b.state.disabled=!1,d.silent||this.$element.trigger(\"nodeEnabled\",a.extend(!0,{},b))))},g.prototype.render=function(){this.initialized||(this.$element.addClass(e),this.$wrapper=a(this.template.list),this.injectStyle(),this.initialized=!0),this.$element.empty().append(this.$wrapper.empty()),this.buildTree(this.tree,0)},g.prototype.buildTree=function(b,c){if(b){c+=1;var d=this;a.each(b,function(b,e){for(var f=a(d.template.item).addClass(\"node-\"+d.elementId).addClass(e.state.checked?\"node-checked\":\"\").addClass(e.state.disabled?\"node-disabled\":\"\").addClass(e.state.selected?\"node-selected\":\"\").addClass(e.searchResult?\"search-result\":\"\").attr(\"data-nodeid\",e.nodeId).attr(\"style\",d.buildStyleOverride(e)),g=0;c-1>g;g++)f.append(d.template.indent);var h=[];if(e.nodes?(h.push(\"expand-icon\"),h.push(e.state.expanded?d.options.collapseIcon:d.options.expandIcon)):h.push(d.options.emptyIcon),f.append(a(d.template.icon).addClass(h.join(\" \"))),d.options.showIcon){var h=[\"node-icon\"];h.push(e.icon||d.options.nodeIcon),e.state.selected&&(h.pop(),h.push(e.selectedIcon||d.options.selectedIcon||e.icon||d.options.nodeIcon)),f.append(a(d.template.icon).addClass(h.join(\" \")))}if(d.options.showCheckbox){var h=[\"check-icon\"];h.push(e.state.checked?d.options.checkedIcon:d.options.uncheckedIcon),f.append(a(d.template.icon).addClass(h.join(\" \")))}return f.append(d.options.enableLinks?a(d.template.link).attr(\"href\",e.href).append(e.text):e.text),d.options.showTags&&e.tags&&a.each(e.tags,function(b,c){f.append(a(d.template.badge).append(c))}),d.$wrapper.append(f),e.nodes&&e.state.expanded&&!e.state.disabled?d.buildTree(e.nodes,c):void 0})}},g.prototype.buildStyleOverride=function(a){if(a.state.disabled)return\"\";var b=a.color,c=a.backColor;return this.options.highlightSelected&&a.state.selected&&(this.options.selectedColor&&(b=this.options.selectedColor),this.options.selectedBackColor&&(c=this.options.selectedBackColor)),this.options.highlightSearchResults&&a.searchResult&&!a.state.disabled&&(this.options.searchResultColor&&(b=this.options.searchResultColor),this.options.searchResultBackColor&&(c=this.options.searchResultBackColor)),\"color:\"+b+\";background-color:\"+c+\";\"},g.prototype.injectStyle=function(){this.options.injectStyle&&!c.getElementById(this.styleId)&&a('<style type=\"text/css\" id=\"'+this.styleId+'\"> '+this.buildStyle()+\" </style>\").appendTo(\"head\")},g.prototype.buildStyle=function(){var a=\".node-\"+this.elementId+\"{\";return this.options.color&&(a+=\"color:\"+this.options.color+\";\"),this.options.backColor&&(a+=\"background-color:\"+this.options.backColor+\";\"),this.options.showBorder?this.options.borderColor&&(a+=\"border:1px solid \"+this.options.borderColor+\";\"):a+=\"border:none;\",a+=\"}\",this.options.onhoverColor&&(a+=\".node-\"+this.elementId+\":not(.node-disabled):hover{background-color:\"+this.options.onhoverColor+\";}\"),this.css+a},g.prototype.template={list:'<ul class=\"list-group\"></ul>',item:'<li class=\"list-group-item\"></li>',indent:'<span class=\"indent\"></span>',icon:'<span class=\"icon\"></span>',link:'<a href=\"#\" style=\"color:inherit;\"></a>',badge:'<span class=\"badge\"></span>'},g.prototype.css=\".treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}\",g.prototype.getNode=function(a){return this.nodes[a]},g.prototype.getParent=function(a){var b=this.identifyNode(a);return this.nodes[b.parentId]},g.prototype.getSiblings=function(a){var b=this.identifyNode(a),c=this.getParent(b),d=c?c.nodes:this.tree;return d.filter(function(a){return a.nodeId!==b.nodeId})},g.prototype.getSelected=function(){return this.findNodes(\"true\",\"g\",\"state.selected\")},g.prototype.getUnselected=function(){return this.findNodes(\"false\",\"g\",\"state.selected\")},g.prototype.getExpanded=function(){return this.findNodes(\"true\",\"g\",\"state.expanded\")},g.prototype.getCollapsed=function(){return this.findNodes(\"false\",\"g\",\"state.expanded\")},g.prototype.getChecked=function(){return this.findNodes(\"true\",\"g\",\"state.checked\")},g.prototype.getUnchecked=function(){return this.findNodes(\"false\",\"g\",\"state.checked\")},g.prototype.getDisabled=function(){return this.findNodes(\"true\",\"g\",\"state.disabled\")},g.prototype.getEnabled=function(){return this.findNodes(\"false\",\"g\",\"state.disabled\")},g.prototype.selectNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setSelectedState(a,!0,b)},this)),this.render()},g.prototype.unselectNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setSelectedState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeSelected=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleSelectedState(a,b)},this)),this.render()},g.prototype.collapseAll=function(b){var c=this.findNodes(\"true\",\"g\",\"state.expanded\");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setExpandedState(a,!1,b)},this)),this.render()},g.prototype.collapseNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setExpandedState(a,!1,b)},this)),this.render()},g.prototype.expandAll=function(b){if(b=a.extend({},f.options,b),b&&b.levels)this.expandLevels(this.tree,b.levels,b);else{var c=this.findNodes(\"false\",\"g\",\"state.expanded\");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setExpandedState(a,!0,b)},this))}this.render()},g.prototype.expandNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setExpandedState(a,!0,b),a.nodes&&b&&b.levels&&this.expandLevels(a.nodes,b.levels-1,b)},this)),this.render()},g.prototype.expandLevels=function(b,c,d){d=a.extend({},f.options,d),a.each(b,a.proxy(function(a,b){this.setExpandedState(b,c>0?!0:!1,d),b.nodes&&this.expandLevels(b.nodes,c-1,d)},this))},g.prototype.revealNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){for(var c=this.getParent(a);c;)this.setExpandedState(c,!0,b),c=this.getParent(c)},this)),this.render()},g.prototype.toggleNodeExpanded=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleExpandedState(a,b)},this)),this.render()},g.prototype.checkAll=function(b){var c=this.findNodes(\"false\",\"g\",\"state.checked\");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setCheckedState(a,!0,b)},this)),this.render()},g.prototype.checkNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setCheckedState(a,!0,b)},this)),this.render()},g.prototype.uncheckAll=function(b){var c=this.findNodes(\"true\",\"g\",\"state.checked\");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setCheckedState(a,!1,b)},this)),this.render()},g.prototype.uncheckNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setCheckedState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeChecked=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.toggleCheckedState(a,b)},this)),this.render()},g.prototype.disableAll=function(b){var c=this.findNodes(\"false\",\"g\",\"state.disabled\");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setDisabledState(a,!0,b)},this)),this.render()},g.prototype.disableNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!0,b)},this)),this.render()},g.prototype.enableAll=function(b){var c=this.findNodes(\"true\",\"g\",\"state.disabled\");this.forEachIdentifier(c,b,a.proxy(function(a,b){this.setDisabledState(a,!1,b)},this)),this.render()},g.prototype.enableNode=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!1,b)},this)),this.render()},g.prototype.toggleNodeDisabled=function(b,c){this.forEachIdentifier(b,c,a.proxy(function(a,b){this.setDisabledState(a,!a.state.disabled,b)},this)),this.render()},g.prototype.forEachIdentifier=function(b,c,d){c=a.extend({},f.options,c),b instanceof Array||(b=[b]),a.each(b,a.proxy(function(a,b){d(this.identifyNode(b),c)},this))},g.prototype.identifyNode=function(a){return\"number\"==typeof a?this.nodes[a]:a},g.prototype.search=function(b,c){c=a.extend({},f.searchOptions,c),this.clearSearch({render:!1});var d=[];if(b&&b.length>0){c.exactMatch&&(b=\"^\"+b+\"$\");var e=\"g\";c.ignoreCase&&(e+=\"i\"),d=this.findNodes(b,e),a.each(d,function(a,b){b.searchResult=!0})}return c.revealResults?this.revealNode(d):this.render(),this.$element.trigger(\"searchComplete\",a.extend(!0,{},d)),d},g.prototype.clearSearch=function(b){b=a.extend({},{render:!0},b);var c=a.each(this.findNodes(\"true\",\"g\",\"searchResult\"),function(a,b){b.searchResult=!1});b.render&&this.render(),this.$element.trigger(\"searchCleared\",a.extend(!0,{},c))},g.prototype.findNodes=function(b,c,d){c=c||\"g\",d=d||\"text\";var e=this;return a.grep(this.nodes,function(a){var f=e.getNodeValue(a,d);return\"string\"==typeof f?f.match(new RegExp(b,c)):void 0})},g.prototype.getNodeValue=function(a,b){var c=b.indexOf(\".\");if(c>0){var e=a[b.substring(0,c)],f=b.substring(c+1,b.length);return this.getNodeValue(e,f)}return a.hasOwnProperty(b)?a[b].toString():d};var h=function(a){b.console&&b.console.error(a)};a.fn[e]=function(b,c){var d;return this.each(function(){var f=a.data(this,e);\"string\"==typeof b?f?a.isFunction(f[b])&&\"_\"!==b.charAt(0)?(c instanceof Array||(c=[c]),d=f[b].apply(f,c)):h(\"No such method : \"+b):h(\"Not initialized, can not call method : \"+b):\"boolean\"==typeof b?d=f:a.data(this,e,new g(this,a.extend(!0,{},b)))}),d||this}}(jQuery,window,document);","/*!\n * jQuery twitter bootstrap wizard plugin\n * Examples and documentation at: http://github.com/VinceG/twitter-bootstrap-wizard\n * version 1.0\n * Requires jQuery v1.3.2 or later\n * Dual licensed under the MIT and GPL licenses:\n * http://www.opensource.org/licenses/mit-license.php\n * http://www.gnu.org/licenses/gpl.html\n * Authors: Vadim Vincent Gabriel (http://vadimg.com), Jason Gill (www.gilluminate.com)\n */\n;(function($) {\nvar bootstrapWizardCreate = function(element, options) {\n\tvar element = $(element);\n\tvar obj = this;\n\n\t// Merge options with defaults\n\tvar $settings = $.extend({}, $.fn.bootstrapWizard.defaults, options);\n\tvar $activeTab = null;\n\tvar $navigation = null;\n\n\tthis.fixNavigationButtons = function() {\n\t\t// Get the current active tab\n\t\tif(!$activeTab.length) {\n\t\t\t// Select first one\n\t\t\t$navigation.find('a:first').tab('show');\n\t\t\t$activeTab = $navigation.find('li:first');\n\t\t}\n\n\t\t// See if we're currently in the first/last then disable the previous and last buttons\n\t\t$($settings.previousSelector, element).toggleClass('disabled', (obj.firstIndex() >= obj.currentIndex()));\n\t\t$($settings.nextSelector, element).toggleClass('disabled', (obj.currentIndex() >= obj.navigationLength()));\n\n\t\t// We are unbinding and rebinding to ensure single firing and no double-click errors\n\t\t$($settings.nextSelector, element).unbind('click', obj.next);\n\t\t$($settings.previousSelector, element).unbind('click', obj.previous);\n\t\t$($settings.lastSelector, element).unbind('click', obj.last);\n\t\t$($settings.firstSelector, element).unbind('click', obj.first);\n\t\t// Next/Previous events\n\t\t$($settings.nextSelector, element).one('click', obj.next);\n\t\t$($settings.previousSelector, element).one('click', obj.previous);\n\t\t$($settings.lastSelector, element).one('click', obj.last);\n\t\t$($settings.firstSelector, element).one('click', obj.first);\n\n\t\tif($settings.onTabShow && typeof $settings.onTabShow === 'function' && $settings.onTabShow($activeTab, $navigation, obj.currentIndex())===false){\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tthis.next = function(e) {\n\n\t\t// If we clicked the last then dont activate this\n\t\tif(element.hasClass('last')) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif($settings.onNext && typeof $settings.onNext === 'function' && $settings.onNext($activeTab, $navigation, obj.nextIndex())===false){\n\t\t\treturn false;\n\t\t}\n\n\t\t// Did we click the last button\n\t\t$index = obj.nextIndex();\n\t\tif($index > obj.navigationLength()) {\n\t\t} else {\n\t\t\t$navigation.find('li:eq('+$index+') a').tab('show');\n\t\t}\n\t};\n\n\tthis.previous = function(e) {\n\n\t\t// If we clicked the first then dont activate this\n\t\tif(element.hasClass('first')) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif($settings.onPrevious && typeof $settings.onPrevious === 'function' && $settings.onPrevious($activeTab, $navigation, obj.previousIndex())===false){\n\t\t\treturn false;\n\t\t}\n\n\t\t$index = obj.previousIndex();\n\t\tif($index < 0) {\n\t\t} else {\n\t\t\t$navigation.find('li:eq('+$index+') a').tab('show');\n\t\t}\n\t};\n\n\tthis.first = function(e) {\n\t\tif($settings.onFirst && typeof $settings.onFirst === 'function' && $settings.onFirst($activeTab, $navigation, obj.firstIndex())===false){\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the element is disabled then we won't do anything\n\t\tif(element.hasClass('disabled')) {\n\t\t\treturn false;\n\t\t}\n\t\t$navigation.find('li:eq(0) a').tab('show');\n\n\t};\n\tthis.last = function(e) {\n\t\tif($settings.onLast && typeof $settings.onLast === 'function' && $settings.onLast($activeTab, $navigation, obj.lastIndex())===false){\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the element is disabled then we won't do anything\n\t\tif(element.hasClass('disabled')) {\n\t\t\treturn false;\n\t\t}\n\t\t$navigation.find('li:eq('+obj.navigationLength()+') a').tab('show');\n\t};\n\tthis.currentIndex = function() {\n\t\treturn $navigation.find('li').index($activeTab);\n\t};\n\tthis.firstIndex = function() {\n\t\treturn 0;\n\t};\n\tthis.lastIndex = function() {\n\t\treturn obj.navigationLength();\n\t};\n\tthis.getIndex = function(e) {\n\t\treturn $navigation.find('li').index(e);\n\t};\n\tthis.nextIndex = function() {\n\t\treturn $navigation.find('li').index($activeTab) + 1;\n\t};\n\tthis.previousIndex = function() {\n\t\treturn $navigation.find('li').index($activeTab) - 1;\n\t};\n\tthis.navigationLength = function() {\n\t\treturn $navigation.find('li').length - 1;\n\t};\n\tthis.activeTab = function() {\n\t\treturn $activeTab;\n\t};\n\tthis.nextTab = function() {\n\t\treturn $navigation.find('li:eq('+(obj.currentIndex()+1)+')').length ? $navigation.find('li:eq('+(obj.currentIndex()+1)+')') : null;\n\t};\n\tthis.previousTab = function() {\n\t\tif(obj.currentIndex() <= 0) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $navigation.find('li:eq('+parseInt(obj.currentIndex()-1)+')');\n\t};\n\tthis.show = function(index) {\n\t\treturn element.find('li:eq(' + index + ') a').tab('show');\n\t};\n\tthis.disable = function(index) {\n\t\t$navigation.find('li:eq('+index+')').addClass('disabled');\n\t};\n\tthis.enable = function(index) {\n\t\t$navigation.find('li:eq('+index+')').removeClass('disabled');\n\t};\n\tthis.hide = function(index) {\n\t\t$navigation.find('li:eq('+index+')').hide();\n\t};\n\tthis.display = function(index) {\n\t\t$navigation.find('li:eq('+index+')').show();\n\t};\n\tthis.remove = function(args) {\n\t\tvar $index = args[0];\n\t\tvar $removeTabPane = typeof args[1] != 'undefined' ? args[1] : false;\n\t\tvar $item = $navigation.find('li:eq('+$index+')');\n\n\t\t// Remove the tab pane first if needed\n\t\tif($removeTabPane) {\n\t\t\tvar $href = $item.find('a').attr('href');\n\t\t\t$($href).remove();\n\t\t}\n\n\t\t// Remove menu item\n\t\t$item.remove();\n\t};\n\n\t$navigation = element.find('ul:first', element);\n\t$activeTab = $navigation.find('li.active', element);\n\n\tif(!$navigation.hasClass($settings.tabClass)) {\n\t\t$navigation.addClass($settings.tabClass);\n\t}\n\n\t// Load onInit\n\tif($settings.onInit && typeof $settings.onInit === 'function'){\n\t\t$settings.onInit($activeTab, $navigation, 0);\n\t}\n\n\t// Load onShow\n\tif($settings.onShow && typeof $settings.onShow === 'function'){\n\t\t$settings.onShow($activeTab, $navigation, obj.nextIndex());\n\t}\n\n\t// Work the next/previous buttons\n\tobj.fixNavigationButtons();\n\n\t$('a[data-toggle=\"tab\"]', $navigation).on('click', function (e) {\n\t\t// Get the index of the clicked tab\n\t\tvar clickedIndex = $navigation.find('li').index($(e.currentTarget).parent('li'));\n\t\tif($settings.onTabClick && typeof $settings.onTabClick === 'function' && $settings.onTabClick($activeTab, $navigation, obj.currentIndex(), clickedIndex)===false){\n\t\t\treturn false;\n\t\t}\n\t});\n\n\t$('a[data-toggle=\"tab\"]', $navigation).on('shown', function (e) { // use shown instead of show to help prevent double firing\n\t\t$element = $(e.target).parent();\n\t\tvar nextTab = $navigation.find('li').index($element);\n\n\t\t// If it's disabled then do not change\n\t\tif($element.hasClass('disabled')) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif($settings.onTabChange && typeof $settings.onTabChange === 'function' && $settings.onTabChange($activeTab, $navigation, obj.currentIndex(), nextTab)===false){\n\t\t\t\treturn false;\n\t\t}\n\n\t\t$activeTab = $element; // activated tab\n\t\tobj.fixNavigationButtons();\n\t});\n};\n$.fn.bootstrapWizard = function(options) {\n\t//expose methods\n\tif (typeof options == 'string') {\n\t\tvar args = Array.prototype.slice.call(arguments, 1)\n\t\tif(args.length === 1) {\n\t\t\targs.toString();\n\t\t}\n\t\treturn this.data('bootstrapWizard')[options](args);\n\t}\n\treturn this.each(function(index){\n\t\tvar element = $(this);\n\t\t// Return early if this element already has a plugin instance\n\t\tif (element.data('bootstrapWizard')) return;\n\t\t// pass options to plugin constructor\n\t\tvar wizard = new bootstrapWizardCreate(element, options);\n\t\t// Store plugin object in this element's data\n\t\telement.data('bootstrapWizard', wizard);\n\t});\n};\n\n// expose options\n$.fn.bootstrapWizard.defaults = {\n\ttabClass: 'nav nav-pills',\n\tnextSelector: '.wizard li.next',\n\tpreviousSelector: '.wizard li.previous',\n\tfirstSelector: '.wizard li.first',\n\tlastSelector: '.wizard li.last',\n\tonShow: null,\n\tonInit: null,\n\tonNext: null,\n\tonPrevious: null,\n\tonLast: null,\n\tonFirst: null,\n\tonTabChange: null, \n\tonTabClick: null,\n\tonTabShow: null\n};\n\n})(jQuery);\n","/* \n* Project: Bootstrap Notify = v3.1.3\n* Description: Turns standard Bootstrap alerts into \"Growl-like\" notifications.\n* Author: Mouse0270 aka Robert McIntosh\n* License: MIT License\n* Website: https://github.com/mouse0270/bootstrap-growl\n*/\n(function (factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(['jquery'], factory);\n\t} else if (typeof exports === 'object') {\n\t\t// Node/CommonJS\n\t\tfactory(require('jquery'));\n\t} else {\n\t\t// Browser globals\n\t\tfactory(jQuery);\n\t}\n}(function ($) {\n\t// Create the defaults once\n\tvar defaults = {\n\t\t\telement: 'body',\n\t\t\tposition: null,\n\t\t\ttype: \"info\",\n\t\t\tallow_dismiss: true,\n\t\t\tnewest_on_top: false,\n\t\t\tshowProgressbar: false,\n\t\t\tplacement: {\n\t\t\t\tfrom: \"top\",\n\t\t\t\talign: \"right\"\n\t\t\t},\n\t\t\toffset: 20,\n\t\t\tspacing: 10,\n\t\t\tz_index: 1031,\n\t\t\tdelay: 5000,\n\t\t\ttimer: 1000,\n\t\t\turl_target: '_blank',\n\t\t\tmouse_over: null,\n\t\t\tanimate: {\n\t\t\t\tenter: 'animated fadeInDown',\n\t\t\t\texit: 'animated fadeOutUp'\n\t\t\t},\n\t\t\tonShow: null,\n\t\t\tonShown: null,\n\t\t\tonClose: null,\n\t\t\tonClosed: null,\n\t\t\ticon_type: 'class',\n\t\t\ttemplate: '<div data-notify=\"container\" class=\"col-xs-11 col-sm-4 alert alert-{0}\" role=\"alert\"><button type=\"button\" aria-hidden=\"true\" class=\"close\" data-notify=\"dismiss\">×</button><span data-notify=\"icon\"></span> <span data-notify=\"title\">{1}</span> <span data-notify=\"message\">{2}</span><div class=\"progress\" data-notify=\"progressbar\"><div class=\"progress-bar progress-bar-{0}\" role=\"progressbar\" aria-valuenow=\"0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 0%;\"></div></div><a href=\"{3}\" target=\"{4}\" data-notify=\"url\"></a></div>'\n\t\t};\n\n\tString.format = function() {\n\t\tvar str = arguments[0];\n\t\tfor (var i = 1; i < arguments.length; i++) {\n\t\t\tstr = str.replace(RegExp(\"\\\\{\" + (i - 1) + \"\\\\}\", \"gm\"), arguments[i]);\n\t\t}\n\t\treturn str;\n\t};\n\n\tfunction Notify ( element, content, options ) {\n\t\t// Setup Content of Notify\n\t\tvar content = {\n\t\t\tcontent: {\n\t\t\t\tmessage: typeof content == 'object' ? content.message : content,\n\t\t\t\ttitle: content.title ? content.title : '',\n\t\t\t\ticon: content.icon ? content.icon : '',\n\t\t\t\turl: content.url ? content.url : '#',\n\t\t\t\ttarget: content.target ? content.target : '-'\n\t\t\t}\n\t\t};\n\n\t\toptions = $.extend(true, {}, content, options);\n\t\tthis.settings = $.extend(true, {}, defaults, options);\n\t\tthis._defaults = defaults;\n\t\tif (this.settings.content.target == \"-\") {\n\t\t\tthis.settings.content.target = this.settings.url_target;\n\t\t}\n\t\tthis.animations = {\n\t\t\tstart: 'webkitAnimationStart oanimationstart MSAnimationStart animationstart',\n\t\t\tend: 'webkitAnimationEnd oanimationend MSAnimationEnd animationend'\n\t\t}\n\n\t\tif (typeof this.settings.offset == 'number') {\n\t\t this.settings.offset = {\n\t\t \tx: this.settings.offset,\n\t\t \ty: this.settings.offset\n\t\t };\n\t\t}\n\n\t\tthis.init();\n\t};\n\n\t$.extend(Notify.prototype, {\n\t\tinit: function () {\n\t\t\tvar self = this;\n\n\t\t\tthis.buildNotify();\n\t\t\tif (this.settings.content.icon) {\n\t\t\t\tthis.setIcon();\n\t\t\t}\n\t\t\tif (this.settings.content.url != \"#\") {\n\t\t\t\tthis.styleURL();\n\t\t\t}\n\t\t\tthis.placement();\n\t\t\tthis.bind();\n\n\t\t\tthis.notify = {\n\t\t\t\t$ele: this.$ele,\n\t\t\t\tupdate: function(command, update) {\n\t\t\t\t\tvar commands = {};\n\t\t\t\t\tif (typeof command == \"string\") {\t\t\t\t\t\n\t\t\t\t\t\tcommands[command] = update;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcommands = command;\n\t\t\t\t\t}\n\t\t\t\t\tfor (var command in commands) {\n\t\t\t\t\t\tswitch (command) {\n\t\t\t\t\t\t\tcase \"type\":\n\t\t\t\t\t\t\t\tthis.$ele.removeClass('alert-' + self.settings.type);\n\t\t\t\t\t\t\t\tthis.$ele.find('[data-notify=\"progressbar\"] > .progress-bar').removeClass('progress-bar-' + self.settings.type);\n\t\t\t\t\t\t\t\tself.settings.type = commands[command];\n\t\t\t\t\t\t\t\tthis.$ele.addClass('alert-' + commands[command]).find('[data-notify=\"progressbar\"] > .progress-bar').addClass('progress-bar-' + commands[command]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"icon\":\n\t\t\t\t\t\t\t\tvar $icon = this.$ele.find('[data-notify=\"icon\"]');\n\t\t\t\t\t\t\t\tif (self.settings.icon_type.toLowerCase() == 'class') {\n\t\t\t\t\t\t\t\t\t$icon.removeClass(self.settings.content.icon).addClass(commands[command]);\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tif (!$icon.is('img')) {\n\t\t\t\t\t\t\t\t\t\t$icon.find('img');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$icon.attr('src', commands[command]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"progress\":\n\t\t\t\t\t\t\t\tvar newDelay = self.settings.delay - (self.settings.delay * (commands[command] / 100));\n\t\t\t\t\t\t\t\tthis.$ele.data('notify-delay', newDelay);\n\t\t\t\t\t\t\t\tthis.$ele.find('[data-notify=\"progressbar\"] > div').attr('aria-valuenow', commands[command]).css('width', commands[command] + '%');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"url\":\n\t\t\t\t\t\t\t\tthis.$ele.find('[data-notify=\"url\"]').attr('href', commands[command]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"target\":\n\t\t\t\t\t\t\t\tthis.$ele.find('[data-notify=\"url\"]').attr('target', commands[command]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthis.$ele.find('[data-notify=\"' + command +'\"]').html(commands[command]);\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tvar posX = this.$ele.outerHeight() + parseInt(self.settings.spacing) + parseInt(self.settings.offset.y);\n\t\t\t\t\tself.reposition(posX);\n\t\t\t\t},\n\t\t\t\tclose: function() {\n\t\t\t\t\tself.close();\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tbuildNotify: function () {\n\t\t\tvar content = this.settings.content;\n\t\t\tthis.$ele = $(String.format(this.settings.template, this.settings.type, content.title, content.message, content.url, content.target));\n\t\t\tthis.$ele.attr('data-notify-position', this.settings.placement.from + '-' + this.settings.placement.align);\t\t\n\t\t\tif (!this.settings.allow_dismiss) {\n\t\t\t\tthis.$ele.find('[data-notify=\"dismiss\"]').css('display', 'none');\n\t\t\t}\n\t\t\tif ((this.settings.delay <= 0 && !this.settings.showProgressbar) || !this.settings.showProgressbar) {\n\t\t\t\tthis.$ele.find('[data-notify=\"progressbar\"]').remove();\n\t\t\t}\n\t\t},\n\t\tsetIcon: function() {\n\t\t\tif (this.settings.icon_type.toLowerCase() == 'class') {\n\t\t\t\tthis.$ele.find('[data-notify=\"icon\"]').addClass(this.settings.content.icon);\n\t\t\t}else{\n\t\t\t\tif (this.$ele.find('[data-notify=\"icon\"]').is('img')) {\n\t\t\t\t\tthis.$ele.find('[data-notify=\"icon\"]').attr('src', this.settings.content.icon);\n\t\t\t\t}else{\n\t\t\t\t\tthis.$ele.find('[data-notify=\"icon\"]').append('<img src=\"'+this.settings.content.icon+'\" alt=\"Notify Icon\" />');\n\t\t\t\t}\t\n\t\t\t}\n\t\t},\n\t\tstyleURL: function() {\n\t\t\tthis.$ele.find('[data-notify=\"url\"]').css({\n\t\t\t\tbackgroundImage: 'url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)',\n\t\t\t\theight: '100%',\n\t\t\t\tleft: '0px',\n\t\t\t\tposition: 'absolute',\n\t\t\t\ttop: '0px',\n\t\t\t\twidth: '100%',\n\t\t\t\tzIndex: this.settings.z_index + 1\n\t\t\t});\n\t\t\tthis.$ele.find('[data-notify=\"dismiss\"]').css({\n\t\t\t\tposition: 'absolute',\n\t\t\t\tright: '10px',\n\t\t\t\ttop: '5px',\n\t\t\t\tzIndex: this.settings.z_index + 2\n\t\t\t});\n\t\t},\n\t\tplacement: function() {\n\t\t\tvar self = this,\n\t\t\t\toffsetAmt = this.settings.offset.y,\n\t\t\t\tcss = {\n\t\t\t\t\tdisplay: 'inline-block',\n\t\t\t\t\tmargin: '0px auto',\n\t\t\t\t\tposition: this.settings.position ? this.settings.position : (this.settings.element === 'body' ? 'fixed' : 'absolute'),\n\t\t\t\t\ttransition: 'all .5s ease-in-out',\n\t\t\t\t\tzIndex: this.settings.z_index\n\t\t\t\t},\n\t\t\t\thasAnimation = false,\n\t\t\t\tsettings = this.settings;\n\n\t\t\t$('[data-notify-position=\"' + this.settings.placement.from + '-' + this.settings.placement.align + '\"]:not([data-closing=\"true\"])').each(function() {\n\t\t\t\treturn offsetAmt = Math.max(offsetAmt, parseInt($(this).css(settings.placement.from)) + parseInt($(this).outerHeight()) + parseInt(settings.spacing));\n\t\t\t});\n\t\t\tif (this.settings.newest_on_top == true) {\n\t\t\t\toffsetAmt = this.settings.offset.y;\n\t\t\t}\n\t\t\tcss[this.settings.placement.from] = offsetAmt+'px';\n\n\t\t\tswitch (this.settings.placement.align) {\n\t\t\t\tcase \"left\":\n\t\t\t\tcase \"right\":\n\t\t\t\t\tcss[this.settings.placement.align] = this.settings.offset.x+'px';\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"center\":\n\t\t\t\t\tcss.left = 0;\n\t\t\t\t\tcss.right = 0;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.$ele.css(css).addClass(this.settings.animate.enter);\n\t\t\t$.each(Array('webkit', 'moz', 'o', 'ms', ''), function(index, prefix) {\n\t\t\t\tself.$ele[0].style[prefix+'AnimationIterationCount'] = 1;\n\t\t\t});\n\n\t\t\t$(this.settings.element).append(this.$ele);\n\n\t\t\tif (this.settings.newest_on_top == true) {\n\t\t\t\toffsetAmt = (parseInt(offsetAmt)+parseInt(this.settings.spacing)) + this.$ele.outerHeight();\n\t\t\t\tthis.reposition(offsetAmt);\n\t\t\t}\n\t\t\t\n\t\t\tif ($.isFunction(self.settings.onShow)) {\n\t\t\t\tself.settings.onShow.call(this.$ele);\n\t\t\t}\n\n\t\t\tthis.$ele.one(this.animations.start, function(event) {\n\t\t\t\thasAnimation = true;\n\t\t\t}).one(this.animations.end, function(event) {\n\t\t\t\tif ($.isFunction(self.settings.onShown)) {\n\t\t\t\t\tself.settings.onShown.call(this);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetTimeout(function() {\n\t\t\t\tif (!hasAnimation) {\n\t\t\t\t\tif ($.isFunction(self.settings.onShown)) {\n\t\t\t\t\t\tself.settings.onShown.call(this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 600);\n\t\t},\n\t\tbind: function() {\n\t\t\tvar self = this;\n\n\t\t\tthis.$ele.find('[data-notify=\"dismiss\"]').on('click', function() {\t\t\n\t\t\t\tself.close();\n\t\t\t})\n\n\t\t\tthis.$ele.mouseover(function(e) {\n\t\t\t\t$(this).data('data-hover', \"true\");\n\t\t\t}).mouseout(function(e) {\n\t\t\t\t$(this).data('data-hover', \"false\");\n\t\t\t});\n\t\t\tthis.$ele.data('data-hover', \"false\");\n\n\t\t\tif (this.settings.delay > 0) {\n\t\t\t\tself.$ele.data('notify-delay', self.settings.delay);\n\t\t\t\tvar timer = setInterval(function() {\n\t\t\t\t\tvar delay = parseInt(self.$ele.data('notify-delay')) - self.settings.timer;\n\t\t\t\t\tif ((self.$ele.data('data-hover') === 'false' && self.settings.mouse_over == \"pause\") || self.settings.mouse_over != \"pause\") {\n\t\t\t\t\t\tvar percent = ((self.settings.delay - delay) / self.settings.delay) * 100;\n\t\t\t\t\t\tself.$ele.data('notify-delay', delay);\n\t\t\t\t\t\tself.$ele.find('[data-notify=\"progressbar\"] > div').attr('aria-valuenow', percent).css('width', percent + '%');\n\t\t\t\t\t}\n\t\t\t\t\tif (delay <= -(self.settings.timer)) {\n\t\t\t\t\t\tclearInterval(timer);\n\t\t\t\t\t\tself.close();\n\t\t\t\t\t}\n\t\t\t\t}, self.settings.timer);\n\t\t\t}\n\t\t},\n\t\tclose: function() {\n\t\t\tvar self = this,\n\t\t\t\t$successors = null,\n\t\t\t\tposX = parseInt(this.$ele.css(this.settings.placement.from)),\n\t\t\t\thasAnimation = false;\n\n\t\t\tthis.$ele.data('closing', 'true').addClass(this.settings.animate.exit);\n\t\t\tself.reposition(posX);\t\t\t\n\t\t\t\n\t\t\tif ($.isFunction(self.settings.onClose)) {\n\t\t\t\tself.settings.onClose.call(this.$ele);\n\t\t\t}\n\n\t\t\tthis.$ele.one(this.animations.start, function(event) {\n\t\t\t\thasAnimation = true;\n\t\t\t}).one(this.animations.end, function(event) {\n\t\t\t\t$(this).remove();\n\t\t\t\tif ($.isFunction(self.settings.onClosed)) {\n\t\t\t\t\tself.settings.onClosed.call(this);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetTimeout(function() {\n\t\t\t\tif (!hasAnimation) {\n\t\t\t\t\tself.$ele.remove();\n\t\t\t\t\tif (self.settings.onClosed) {\n\t\t\t\t\t\tself.settings.onClosed(self.$ele);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 600);\n\t\t},\n\t\treposition: function(posX) {\n\t\t\tvar self = this,\n\t\t\t\tnotifies = '[data-notify-position=\"' + this.settings.placement.from + '-' + this.settings.placement.align + '\"]:not([data-closing=\"true\"])',\n\t\t\t\t$elements = this.$ele.nextAll(notifies);\n\t\t\tif (this.settings.newest_on_top == true) {\n\t\t\t\t$elements = this.$ele.prevAll(notifies);\n\t\t\t}\n\t\t\t$elements.each(function() {\n\t\t\t\t$(this).css(self.settings.placement.from, posX);\n\t\t\t\tposX = (parseInt(posX)+parseInt(self.settings.spacing)) + $(this).outerHeight();\n\t\t\t});\n\t\t}\n\t});\n\n\t$.notify = function ( content, options ) {\n\t\tvar plugin = new Notify( this, content, options );\n\t\treturn plugin.notify;\n\t};\n\t$.notifyDefaults = function( options ) {\n\t\tdefaults = $.extend(true, {}, defaults, options);\n\t\treturn defaults;\n\t};\n\t$.notifyClose = function( command ) {\n\t\tif (typeof command === \"undefined\" || command == \"all\") {\n\t\t\t$('[data-notify]').find('[data-notify=\"dismiss\"]').trigger('click');\n\t\t}else{\n\t\t\t$('[data-notify-position=\"'+command+'\"]').find('[data-notify=\"dismiss\"]').trigger('click');\n\t\t}\n\t};\n\n}));","/*!\n * Bootstrap Colorpicker\n * http://mjolnic.github.io/bootstrap-colorpicker/\n *\n * Originally written by (c) 2012 Stefan Petre\n * Licensed under the Apache License v2.0\n * http://www.apache.org/licenses/LICENSE-2.0.txt\n *\n * @todo Update DOCS\n */\n\n(function(factory) {\n \"use strict\";\n if (typeof exports === 'object') {\n module.exports = factory(window.jQuery);\n } else if (typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n } else if (window.jQuery && !window.jQuery.fn.colorpicker) {\n factory(window.jQuery);\n }\n }\n (function($) {\n 'use strict';\n\n // Color object\n var Color = function(val, customColors) {\n this.value = {\n h: 0,\n s: 0,\n b: 0,\n a: 1\n };\n this.origFormat = null; // original string format\n if (customColors) {\n $.extend(this.colors, customColors);\n }\n if (val) {\n if (val.toLowerCase !== undefined) {\n // cast to string\n val = val + '';\n this.setColor(val);\n } else if (val.h !== undefined) {\n this.value = val;\n }\n }\n };\n\n Color.prototype = {\n constructor: Color,\n // 140 predefined colors from the HTML Colors spec\n colors: {\n \"aliceblue\": \"#f0f8ff\",\n \"antiquewhite\": \"#faebd7\",\n \"aqua\": \"#00ffff\",\n \"aquamarine\": \"#7fffd4\",\n \"azure\": \"#f0ffff\",\n \"beige\": \"#f5f5dc\",\n \"bisque\": \"#ffe4c4\",\n \"black\": \"#000000\",\n \"blanchedalmond\": \"#ffebcd\",\n \"blue\": \"#0000ff\",\n \"blueviolet\": \"#8a2be2\",\n \"brown\": \"#a52a2a\",\n \"burlywood\": \"#deb887\",\n \"cadetblue\": \"#5f9ea0\",\n \"chartreuse\": \"#7fff00\",\n \"chocolate\": \"#d2691e\",\n \"coral\": \"#ff7f50\",\n \"cornflowerblue\": \"#6495ed\",\n \"cornsilk\": \"#fff8dc\",\n \"crimson\": \"#dc143c\",\n \"cyan\": \"#00ffff\",\n \"darkblue\": \"#00008b\",\n \"darkcyan\": \"#008b8b\",\n \"darkgoldenrod\": \"#b8860b\",\n \"darkgray\": \"#a9a9a9\",\n \"darkgreen\": \"#006400\",\n \"darkkhaki\": \"#bdb76b\",\n \"darkmagenta\": \"#8b008b\",\n \"darkolivegreen\": \"#556b2f\",\n \"darkorange\": \"#ff8c00\",\n \"darkorchid\": \"#9932cc\",\n \"darkred\": \"#8b0000\",\n \"darksalmon\": \"#e9967a\",\n \"darkseagreen\": \"#8fbc8f\",\n \"darkslateblue\": \"#483d8b\",\n \"darkslategray\": \"#2f4f4f\",\n \"darkturquoise\": \"#00ced1\",\n \"darkviolet\": \"#9400d3\",\n \"deeppink\": \"#ff1493\",\n \"deepskyblue\": \"#00bfff\",\n \"dimgray\": \"#696969\",\n \"dodgerblue\": \"#1e90ff\",\n \"firebrick\": \"#b22222\",\n \"floralwhite\": \"#fffaf0\",\n \"forestgreen\": \"#228b22\",\n \"fuchsia\": \"#ff00ff\",\n \"gainsboro\": \"#dcdcdc\",\n \"ghostwhite\": \"#f8f8ff\",\n \"gold\": \"#ffd700\",\n \"goldenrod\": \"#daa520\",\n \"gray\": \"#808080\",\n \"green\": \"#008000\",\n \"greenyellow\": \"#adff2f\",\n \"honeydew\": \"#f0fff0\",\n \"hotpink\": \"#ff69b4\",\n \"indianred\": \"#cd5c5c\",\n \"indigo\": \"#4b0082\",\n \"ivory\": \"#fffff0\",\n \"khaki\": \"#f0e68c\",\n \"lavender\": \"#e6e6fa\",\n \"lavenderblush\": \"#fff0f5\",\n \"lawngreen\": \"#7cfc00\",\n \"lemonchiffon\": \"#fffacd\",\n \"lightblue\": \"#add8e6\",\n \"lightcoral\": \"#f08080\",\n \"lightcyan\": \"#e0ffff\",\n \"lightgoldenrodyellow\": \"#fafad2\",\n \"lightgrey\": \"#d3d3d3\",\n \"lightgreen\": \"#90ee90\",\n \"lightpink\": \"#ffb6c1\",\n \"lightsalmon\": \"#ffa07a\",\n \"lightseagreen\": \"#20b2aa\",\n \"lightskyblue\": \"#87cefa\",\n \"lightslategray\": \"#778899\",\n \"lightsteelblue\": \"#b0c4de\",\n \"lightyellow\": \"#ffffe0\",\n \"lime\": \"#00ff00\",\n \"limegreen\": \"#32cd32\",\n \"linen\": \"#faf0e6\",\n \"magenta\": \"#ff00ff\",\n \"maroon\": \"#800000\",\n \"mediumaquamarine\": \"#66cdaa\",\n \"mediumblue\": \"#0000cd\",\n \"mediumorchid\": \"#ba55d3\",\n \"mediumpurple\": \"#9370d8\",\n \"mediumseagreen\": \"#3cb371\",\n \"mediumslateblue\": \"#7b68ee\",\n \"mediumspringgreen\": \"#00fa9a\",\n \"mediumturquoise\": \"#48d1cc\",\n \"mediumvioletred\": \"#c71585\",\n \"midnightblue\": \"#191970\",\n \"mintcream\": \"#f5fffa\",\n \"mistyrose\": \"#ffe4e1\",\n \"moccasin\": \"#ffe4b5\",\n \"navajowhite\": \"#ffdead\",\n \"navy\": \"#000080\",\n \"oldlace\": \"#fdf5e6\",\n \"olive\": \"#808000\",\n \"olivedrab\": \"#6b8e23\",\n \"orange\": \"#ffa500\",\n \"orangered\": \"#ff4500\",\n \"orchid\": \"#da70d6\",\n \"palegoldenrod\": \"#eee8aa\",\n \"palegreen\": \"#98fb98\",\n \"paleturquoise\": \"#afeeee\",\n \"palevioletred\": \"#d87093\",\n \"papayawhip\": \"#ffefd5\",\n \"peachpuff\": \"#ffdab9\",\n \"peru\": \"#cd853f\",\n \"pink\": \"#ffc0cb\",\n \"plum\": \"#dda0dd\",\n \"powderblue\": \"#b0e0e6\",\n \"purple\": \"#800080\",\n \"red\": \"#ff0000\",\n \"rosybrown\": \"#bc8f8f\",\n \"royalblue\": \"#4169e1\",\n \"saddlebrown\": \"#8b4513\",\n \"salmon\": \"#fa8072\",\n \"sandybrown\": \"#f4a460\",\n \"seagreen\": \"#2e8b57\",\n \"seashell\": \"#fff5ee\",\n \"sienna\": \"#a0522d\",\n \"silver\": \"#c0c0c0\",\n \"skyblue\": \"#87ceeb\",\n \"slateblue\": \"#6a5acd\",\n \"slategray\": \"#708090\",\n \"snow\": \"#fffafa\",\n \"springgreen\": \"#00ff7f\",\n \"steelblue\": \"#4682b4\",\n \"tan\": \"#d2b48c\",\n \"teal\": \"#008080\",\n \"thistle\": \"#d8bfd8\",\n \"tomato\": \"#ff6347\",\n \"turquoise\": \"#40e0d0\",\n \"violet\": \"#ee82ee\",\n \"wheat\": \"#f5deb3\",\n \"white\": \"#ffffff\",\n \"whitesmoke\": \"#f5f5f5\",\n \"yellow\": \"#ffff00\",\n \"yellowgreen\": \"#9acd32\",\n \"transparent\": \"transparent\"\n },\n _sanitizeNumber: function(val) {\n if (typeof val === 'number') {\n return val;\n }\n if (isNaN(val) || (val === null) || (val === '') || (val === undefined)) {\n return 1;\n }\n if (val.toLowerCase !== undefined) {\n return parseFloat(val);\n }\n return 1;\n },\n isTransparent: function(strVal) {\n if (!strVal) {\n return false;\n }\n strVal = strVal.toLowerCase().trim();\n return (strVal === 'transparent') || (strVal.match(/#?00000000/)) || (strVal.match(/(rgba|hsla)\\(0,0,0,0?\\.?0\\)/));\n },\n rgbaIsTransparent: function(rgba) {\n return ((rgba.r === 0) && (rgba.g === 0) && (rgba.b === 0) && (rgba.a === 0));\n },\n //parse a string to HSB\n setColor: function(strVal) {\n strVal = strVal.toLowerCase().trim();\n if (strVal) {\n if (this.isTransparent(strVal)) {\n this.value = {\n h: 0,\n s: 0,\n b: 0,\n a: 0\n };\n } else {\n this.value = this.stringToHSB(strVal) || {\n h: 0,\n s: 0,\n b: 0,\n a: 1\n }; // if parser fails, defaults to black\n }\n }\n },\n stringToHSB: function(strVal) {\n strVal = strVal.toLowerCase();\n var alias;\n if (typeof this.colors[strVal] !== 'undefined') {\n strVal = this.colors[strVal];\n alias = 'alias';\n }\n var that = this,\n result = false;\n $.each(this.stringParsers, function(i, parser) {\n var match = parser.re.exec(strVal),\n values = match && parser.parse.apply(that, [match]),\n format = alias || parser.format || 'rgba';\n if (values) {\n if (format.match(/hsla?/)) {\n result = that.RGBtoHSB.apply(that, that.HSLtoRGB.apply(that, values));\n } else {\n result = that.RGBtoHSB.apply(that, values);\n }\n that.origFormat = format;\n return false;\n }\n return true;\n });\n return result;\n },\n setHue: function(h) {\n this.value.h = 1 - h;\n },\n setSaturation: function(s) {\n this.value.s = s;\n },\n setBrightness: function(b) {\n this.value.b = 1 - b;\n },\n setAlpha: function(a) {\n this.value.a = parseInt((1 - a) * 100, 10) / 100;\n },\n toRGB: function(h, s, b, a) {\n if (!h) {\n h = this.value.h;\n s = this.value.s;\n b = this.value.b;\n }\n h *= 360;\n var R, G, B, X, C;\n h = (h % 360) / 60;\n C = b * s;\n X = C * (1 - Math.abs(h % 2 - 1));\n R = G = B = b - C;\n\n h = ~~h;\n R += [C, X, 0, 0, X, C][h];\n G += [X, C, C, X, 0, 0][h];\n B += [0, 0, X, C, C, X][h];\n return {\n r: Math.round(R * 255),\n g: Math.round(G * 255),\n b: Math.round(B * 255),\n a: a || this.value.a\n };\n },\n toHex: function(h, s, b, a) {\n var rgb = this.toRGB(h, s, b, a);\n if (this.rgbaIsTransparent(rgb)) {\n return 'transparent';\n }\n return '#' + ((1 << 24) | (parseInt(rgb.r) << 16) | (parseInt(rgb.g) << 8) | parseInt(rgb.b)).toString(16).substr(1);\n },\n toHSL: function(h, s, b, a) {\n h = h || this.value.h;\n s = s || this.value.s;\n b = b || this.value.b;\n a = a || this.value.a;\n\n var H = h,\n L = (2 - s) * b,\n S = s * b;\n if (L > 0 && L <= 1) {\n S /= L;\n } else {\n S /= 2 - L;\n }\n L /= 2;\n if (S > 1) {\n S = 1;\n }\n return {\n h: isNaN(H) ? 0 : H,\n s: isNaN(S) ? 0 : S,\n l: isNaN(L) ? 0 : L,\n a: isNaN(a) ? 0 : a\n };\n },\n toAlias: function(r, g, b, a) {\n var rgb = this.toHex(r, g, b, a);\n for (var alias in this.colors) {\n if (this.colors[alias] === rgb) {\n return alias;\n }\n }\n return false;\n },\n RGBtoHSB: function(r, g, b, a) {\n r /= 255;\n g /= 255;\n b /= 255;\n\n var H, S, V, C;\n V = Math.max(r, g, b);\n C = V - Math.min(r, g, b);\n H = (C === 0 ? null :\n V === r ? (g - b) / C :\n V === g ? (b - r) / C + 2 :\n (r - g) / C + 4\n );\n H = ((H + 360) % 6) * 60 / 360;\n S = C === 0 ? 0 : C / V;\n return {\n h: this._sanitizeNumber(H),\n s: S,\n b: V,\n a: this._sanitizeNumber(a)\n };\n },\n HueToRGB: function(p, q, h) {\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n if ((h * 6) < 1) {\n return p + (q - p) * h * 6;\n } else if ((h * 2) < 1) {\n return q;\n } else if ((h * 3) < 2) {\n return p + (q - p) * ((2 / 3) - h) * 6;\n } else {\n return p;\n }\n },\n HSLtoRGB: function(h, s, l, a) {\n if (s < 0) {\n s = 0;\n }\n var q;\n if (l <= 0.5) {\n q = l * (1 + s);\n } else {\n q = l + s - (l * s);\n }\n\n var p = 2 * l - q;\n\n var tr = h + (1 / 3);\n var tg = h;\n var tb = h - (1 / 3);\n\n var r = Math.round(this.HueToRGB(p, q, tr) * 255);\n var g = Math.round(this.HueToRGB(p, q, tg) * 255);\n var b = Math.round(this.HueToRGB(p, q, tb) * 255);\n return [r, g, b, this._sanitizeNumber(a)];\n },\n toString: function(format) {\n format = format || 'rgba';\n var c = false;\n switch (format) {\n case 'rgb':\n {\n c = this.toRGB();\n if (this.rgbaIsTransparent(c)) {\n return 'transparent';\n }\n return 'rgb(' + c.r + ',' + c.g + ',' + c.b + ')';\n }\n break;\n case 'rgba':\n {\n c = this.toRGB();\n return 'rgba(' + c.r + ',' + c.g + ',' + c.b + ',' + c.a + ')';\n }\n break;\n case 'hsl':\n {\n c = this.toHSL();\n return 'hsl(' + Math.round(c.h * 360) + ',' + Math.round(c.s * 100) + '%,' + Math.round(c.l * 100) + '%)';\n }\n break;\n case 'hsla':\n {\n c = this.toHSL();\n return 'hsla(' + Math.round(c.h * 360) + ',' + Math.round(c.s * 100) + '%,' + Math.round(c.l * 100) + '%,' + c.a + ')';\n }\n break;\n case 'hex':\n {\n return this.toHex();\n }\n break;\n case 'alias':\n return this.toAlias() || this.toHex();\n default:\n {\n return c;\n }\n break;\n }\n },\n // a set of RE's that can match strings and generate color tuples.\n // from John Resig color plugin\n // https://github.com/jquery/jquery-color/\n stringParsers: [{\n re: /rgb\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*?\\)/,\n format: 'rgb',\n parse: function(execResult) {\n return [\n execResult[1],\n execResult[2],\n execResult[3],\n 1\n ];\n }\n }, {\n re: /rgb\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*?\\)/,\n format: 'rgb',\n parse: function(execResult) {\n return [\n 2.55 * execResult[1],\n 2.55 * execResult[2],\n 2.55 * execResult[3],\n 1\n ];\n }\n }, {\n re: /rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d+(?:\\.\\d+)?)\\s*)?\\)/,\n format: 'rgba',\n parse: function(execResult) {\n return [\n execResult[1],\n execResult[2],\n execResult[3],\n execResult[4]\n ];\n }\n }, {\n re: /rgba\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d+(?:\\.\\d+)?)\\s*)?\\)/,\n format: 'rgba',\n parse: function(execResult) {\n return [\n 2.55 * execResult[1],\n 2.55 * execResult[2],\n 2.55 * execResult[3],\n execResult[4]\n ];\n }\n }, {\n re: /hsl\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*?\\)/,\n format: 'hsl',\n parse: function(execResult) {\n return [\n execResult[1] / 360,\n execResult[2] / 100,\n execResult[3] / 100,\n execResult[4]\n ];\n }\n }, {\n re: /hsla\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d+(?:\\.\\d+)?)\\s*)?\\)/,\n format: 'hsla',\n parse: function(execResult) {\n return [\n execResult[1] / 360,\n execResult[2] / 100,\n execResult[3] / 100,\n execResult[4]\n ];\n }\n }, {\n re: /#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,\n format: 'hex',\n parse: function(execResult) {\n return [\n parseInt(execResult[1], 16),\n parseInt(execResult[2], 16),\n parseInt(execResult[3], 16),\n 1\n ];\n }\n }, {\n re: /#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,\n format: 'hex',\n parse: function(execResult) {\n return [\n parseInt(execResult[1] + execResult[1], 16),\n parseInt(execResult[2] + execResult[2], 16),\n parseInt(execResult[3] + execResult[3], 16),\n 1\n ];\n }\n }],\n colorNameToHex: function(name) {\n if (typeof this.colors[name.toLowerCase()] !== 'undefined') {\n return this.colors[name.toLowerCase()];\n }\n return false;\n }\n };\n\n\n var defaults = {\n horizontal: false, // horizontal mode layout ?\n inline: false, //forces to show the colorpicker as an inline element\n color: false, //forces a color\n format: false, //forces a format\n input: 'input', // children input selector\n container: false, // container selector\n component: '.add-on, .input-group-addon', // children component selector\n sliders: {\n saturation: {\n maxLeft: 100,\n maxTop: 100,\n callLeft: 'setSaturation',\n callTop: 'setBrightness'\n },\n hue: {\n maxLeft: 0,\n maxTop: 100,\n callLeft: false,\n callTop: 'setHue'\n },\n alpha: {\n maxLeft: 0,\n maxTop: 100,\n callLeft: false,\n callTop: 'setAlpha'\n }\n },\n slidersHorz: {\n saturation: {\n maxLeft: 100,\n maxTop: 100,\n callLeft: 'setSaturation',\n callTop: 'setBrightness'\n },\n hue: {\n maxLeft: 100,\n maxTop: 0,\n callLeft: 'setHue',\n callTop: false\n },\n alpha: {\n maxLeft: 100,\n maxTop: 0,\n callLeft: 'setAlpha',\n callTop: false\n }\n },\n template: '<div class=\"colorpicker dropdown-menu\">' +\n '<div class=\"colorpicker-saturation\"><i><b></b></i></div>' +\n '<div class=\"colorpicker-hue\"><i></i></div>' +\n '<div class=\"colorpicker-alpha\"><i></i></div>' +\n '<div class=\"colorpicker-color\"><div /></div>' +\n '<div class=\"colorpicker-selectors\"></div>' +\n '</div>',\n align: 'right',\n customClass: null,\n colorSelectors: null\n };\n\n var Colorpicker = function(element, options) {\n this.element = $(element).addClass('colorpicker-element');\n this.options = $.extend(true, {}, defaults, this.element.data(), options);\n this.component = this.options.component;\n this.component = (this.component !== false) ? this.element.find(this.component) : false;\n if (this.component && (this.component.length === 0)) {\n this.component = false;\n }\n this.container = (this.options.container === true) ? this.element : this.options.container;\n this.container = (this.container !== false) ? $(this.container) : false;\n\n // Is the element an input? Should we search inside for any input?\n this.input = this.element.is('input') ? this.element : (this.options.input ?\n this.element.find(this.options.input) : false);\n if (this.input && (this.input.length === 0)) {\n this.input = false;\n }\n // Set HSB color\n this.color = new Color(this.options.color !== false ? this.options.color : this.getValue(), this.options.colorSelectors);\n this.format = this.options.format !== false ? this.options.format : this.color.origFormat;\n\n // Setup picker\n this.picker = $(this.options.template);\n if (this.options.customClass) {\n this.picker.addClass(this.options.customClass);\n }\n if (this.options.inline) {\n this.picker.addClass('colorpicker-inline colorpicker-visible');\n } else {\n this.picker.addClass('colorpicker-hidden');\n }\n if (this.options.horizontal) {\n this.picker.addClass('colorpicker-horizontal');\n }\n if (this.format === 'rgba' || this.format === 'hsla' || this.options.format === false) {\n this.picker.addClass('colorpicker-with-alpha');\n }\n if (this.options.align === 'right') {\n this.picker.addClass('colorpicker-right');\n }\n if (this.options.colorSelectors) {\n var colorpicker = this;\n $.each(this.options.colorSelectors, function(name, color) {\n var $btn = $('<i />').css('background-color', color).data('class', name);\n $btn.click(function() {\n colorpicker.setValue($(this).css('background-color'));\n });\n colorpicker.picker.find('.colorpicker-selectors').append($btn);\n });\n this.picker.find('.colorpicker-selectors').show();\n }\n this.picker.on('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.mousedown, this));\n this.picker.appendTo(this.container ? this.container : $('body'));\n\n // Bind events\n if (this.input !== false) {\n this.input.on({\n 'keyup.colorpicker': $.proxy(this.keyup, this)\n });\n this.input.on({\n 'change.colorpicker': $.proxy(this.change, this)\n });\n if (this.component === false) {\n this.element.on({\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n }\n if (this.options.inline === false) {\n this.element.on({\n 'focusout.colorpicker': $.proxy(this.hide, this)\n });\n }\n }\n\n if (this.component !== false) {\n this.component.on({\n 'click.colorpicker': $.proxy(this.show, this)\n });\n }\n\n if ((this.input === false) && (this.component === false)) {\n this.element.on({\n 'click.colorpicker': $.proxy(this.show, this)\n });\n }\n\n // for HTML5 input[type='color']\n if ((this.input !== false) && (this.component !== false) && (this.input.attr('type') === 'color')) {\n\n this.input.on({\n 'click.colorpicker': $.proxy(this.show, this),\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n }\n this.update();\n\n $($.proxy(function() {\n this.element.trigger('create');\n }, this));\n };\n\n Colorpicker.Color = Color;\n\n Colorpicker.prototype = {\n constructor: Colorpicker,\n destroy: function() {\n this.picker.remove();\n this.element.removeData('colorpicker').off('.colorpicker');\n if (this.input !== false) {\n this.input.off('.colorpicker');\n }\n if (this.component !== false) {\n this.component.off('.colorpicker');\n }\n this.element.removeClass('colorpicker-element');\n this.element.trigger({\n type: 'destroy'\n });\n },\n reposition: function() {\n if (this.options.inline !== false || this.options.container) {\n return false;\n }\n var type = this.container && this.container[0] !== document.body ? 'position' : 'offset';\n var element = this.component || this.element;\n var offset = element[type]();\n if (this.options.align === 'right') {\n offset.left -= this.picker.outerWidth() - element.outerWidth();\n }\n this.picker.css({\n top: offset.top + element.outerHeight(),\n left: offset.left\n });\n },\n show: function(e) {\n if (this.isDisabled()) {\n return false;\n }\n this.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden');\n this.reposition();\n $(window).on('resize.colorpicker', $.proxy(this.reposition, this));\n if (e && (!this.hasInput() || this.input.attr('type') === 'color')) {\n if (e.stopPropagation && e.preventDefault) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n if (this.options.inline === false) {\n $(window.document).on({\n 'mousedown.colorpicker': $.proxy(this.hide, this)\n });\n }\n this.element.trigger({\n type: 'showPicker',\n color: this.color\n });\n },\n hide: function() {\n this.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible');\n $(window).off('resize.colorpicker', this.reposition);\n $(document).off({\n 'mousedown.colorpicker': this.hide\n });\n this.update();\n this.element.trigger({\n type: 'hidePicker',\n color: this.color\n });\n },\n updateData: function(val) {\n val = val || this.color.toString(this.format);\n this.element.data('color', val);\n return val;\n },\n updateInput: function(val) {\n val = val || this.color.toString(this.format);\n if (this.input !== false) {\n if (this.options.colorSelectors) {\n var color = new Color(val, this.options.colorSelectors);\n var alias = color.toAlias();\n if (typeof this.options.colorSelectors[alias] !== 'undefined') {\n val = alias;\n }\n }\n this.input.prop('value', val);\n }\n return val;\n },\n updatePicker: function(val) {\n if (val !== undefined) {\n this.color = new Color(val, this.options.colorSelectors);\n }\n var sl = (this.options.horizontal === false) ? this.options.sliders : this.options.slidersHorz;\n var icns = this.picker.find('i');\n if (icns.length === 0) {\n return;\n }\n if (this.options.horizontal === false) {\n sl = this.options.sliders;\n icns.eq(1).css('top', sl.hue.maxTop * (1 - this.color.value.h)).end()\n .eq(2).css('top', sl.alpha.maxTop * (1 - this.color.value.a));\n } else {\n sl = this.options.slidersHorz;\n icns.eq(1).css('left', sl.hue.maxLeft * (1 - this.color.value.h)).end()\n .eq(2).css('left', sl.alpha.maxLeft * (1 - this.color.value.a));\n }\n icns.eq(0).css({\n 'top': sl.saturation.maxTop - this.color.value.b * sl.saturation.maxTop,\n 'left': this.color.value.s * sl.saturation.maxLeft\n });\n this.picker.find('.colorpicker-saturation').css('backgroundColor', this.color.toHex(this.color.value.h, 1, 1, 1));\n this.picker.find('.colorpicker-alpha').css('backgroundColor', this.color.toHex());\n this.picker.find('.colorpicker-color, .colorpicker-color div').css('backgroundColor', this.color.toString(this.format));\n return val;\n },\n updateComponent: function(val) {\n val = val || this.color.toString(this.format);\n if (this.component !== false) {\n var icn = this.component.find('i').eq(0);\n if (icn.length > 0) {\n icn.css({\n 'backgroundColor': val\n });\n } else {\n this.component.css({\n 'backgroundColor': val\n });\n }\n }\n return val;\n },\n update: function(force) {\n var val;\n if ((this.getValue(false) !== false) || (force === true)) {\n // Update input/data only if the current value is not empty\n val = this.updateComponent();\n this.updateInput(val);\n this.updateData(val);\n this.updatePicker(); // only update picker if value is not empty\n }\n return val;\n\n },\n setValue: function(val) { // set color manually\n this.color = new Color(val, this.options.colorSelectors);\n this.update(true);\n this.element.trigger({\n type: 'changeColor',\n color: this.color,\n value: val\n });\n },\n getValue: function(defaultValue) {\n defaultValue = (defaultValue === undefined) ? '#000000' : defaultValue;\n var val;\n if (this.hasInput()) {\n val = this.input.val();\n } else {\n val = this.element.data('color');\n }\n if ((val === undefined) || (val === '') || (val === null)) {\n // if not defined or empty, return default\n val = defaultValue;\n }\n return val;\n },\n hasInput: function() {\n return (this.input !== false);\n },\n isDisabled: function() {\n if (this.hasInput()) {\n return (this.input.prop('disabled') === true);\n }\n return false;\n },\n disable: function() {\n if (this.hasInput()) {\n this.input.prop('disabled', true);\n this.element.trigger({\n type: 'disable',\n color: this.color,\n value: this.getValue()\n });\n return true;\n }\n return false;\n },\n enable: function() {\n if (this.hasInput()) {\n this.input.prop('disabled', false);\n this.element.trigger({\n type: 'enable',\n color: this.color,\n value: this.getValue()\n });\n return true;\n }\n return false;\n },\n currentSlider: null,\n mousePointer: {\n left: 0,\n top: 0\n },\n mousedown: function(e) {\n if (!e.pageX && !e.pageY && e.originalEvent) {\n e.pageX = e.originalEvent.touches[0].pageX;\n e.pageY = e.originalEvent.touches[0].pageY;\n }\n e.stopPropagation();\n e.preventDefault();\n\n var target = $(e.target);\n\n //detect the slider and set the limits and callbacks\n var zone = target.closest('div');\n var sl = this.options.horizontal ? this.options.slidersHorz : this.options.sliders;\n if (!zone.is('.colorpicker')) {\n if (zone.is('.colorpicker-saturation')) {\n this.currentSlider = $.extend({}, sl.saturation);\n } else if (zone.is('.colorpicker-hue')) {\n this.currentSlider = $.extend({}, sl.hue);\n } else if (zone.is('.colorpicker-alpha')) {\n this.currentSlider = $.extend({}, sl.alpha);\n } else {\n return false;\n }\n var offset = zone.offset();\n //reference to guide's style\n this.currentSlider.guide = zone.find('i')[0].style;\n this.currentSlider.left = e.pageX - offset.left;\n this.currentSlider.top = e.pageY - offset.top;\n this.mousePointer = {\n left: e.pageX,\n top: e.pageY\n };\n //trigger mousemove to move the guide to the current position\n $(document).on({\n 'mousemove.colorpicker': $.proxy(this.mousemove, this),\n 'touchmove.colorpicker': $.proxy(this.mousemove, this),\n 'mouseup.colorpicker': $.proxy(this.mouseup, this),\n 'touchend.colorpicker': $.proxy(this.mouseup, this)\n }).trigger('mousemove');\n }\n return false;\n },\n mousemove: function(e) {\n if (!e.pageX && !e.pageY && e.originalEvent) {\n e.pageX = e.originalEvent.touches[0].pageX;\n e.pageY = e.originalEvent.touches[0].pageY;\n }\n e.stopPropagation();\n e.preventDefault();\n var left = Math.max(\n 0,\n Math.min(\n this.currentSlider.maxLeft,\n this.currentSlider.left + ((e.pageX || this.mousePointer.left) - this.mousePointer.left)\n )\n );\n var top = Math.max(\n 0,\n Math.min(\n this.currentSlider.maxTop,\n this.currentSlider.top + ((e.pageY || this.mousePointer.top) - this.mousePointer.top)\n )\n );\n this.currentSlider.guide.left = left + 'px';\n this.currentSlider.guide.top = top + 'px';\n if (this.currentSlider.callLeft) {\n this.color[this.currentSlider.callLeft].call(this.color, left / this.currentSlider.maxLeft);\n }\n if (this.currentSlider.callTop) {\n this.color[this.currentSlider.callTop].call(this.color, top / this.currentSlider.maxTop);\n }\n // Change format dynamically\n // Only occurs if user choose the dynamic format by\n // setting option format to false\n if (this.currentSlider.callTop === 'setAlpha' && this.options.format === false) {\n\n // Converting from hex / rgb to rgba\n if (this.color.value.a !== 1) {\n this.format = 'rgba';\n this.color.origFormat = 'rgba';\n }\n\n // Converting from rgba to hex\n else {\n this.format = 'hex';\n this.color.origFormat = 'hex';\n }\n }\n this.update(true);\n\n this.element.trigger({\n type: 'changeColor',\n color: this.color\n });\n return false;\n },\n mouseup: function(e) {\n e.stopPropagation();\n e.preventDefault();\n $(document).off({\n 'mousemove.colorpicker': this.mousemove,\n 'touchmove.colorpicker': this.mousemove,\n 'mouseup.colorpicker': this.mouseup,\n 'touchend.colorpicker': this.mouseup\n });\n return false;\n },\n change: function(e) {\n this.keyup(e);\n },\n keyup: function(e) {\n if ((e.keyCode === 38)) {\n if (this.color.value.a < 1) {\n this.color.value.a = Math.round((this.color.value.a + 0.01) * 100) / 100;\n }\n this.update(true);\n } else if ((e.keyCode === 40)) {\n if (this.color.value.a > 0) {\n this.color.value.a = Math.round((this.color.value.a - 0.01) * 100) / 100;\n }\n this.update(true);\n } else {\n this.color = new Color(this.input.val(), this.options.colorSelectors);\n // Change format dynamically\n // Only occurs if user choose the dynamic format by\n // setting option format to false\n if (this.color.origFormat && this.options.format === false) {\n this.format = this.color.origFormat;\n }\n if (this.getValue(false) !== false) {\n this.updateData();\n this.updateComponent();\n this.updatePicker();\n }\n }\n this.element.trigger({\n type: 'changeColor',\n color: this.color,\n value: this.input.val()\n });\n }\n };\n\n $.colorpicker = Colorpicker;\n\n $.fn.colorpicker = function(option) {\n var pickerArgs = arguments,\n rv;\n\n var $returnValue = this.each(function() {\n var $this = $(this),\n inst = $this.data('colorpicker'),\n options = ((typeof option === 'object') ? option : {});\n if ((!inst) && (typeof option !== 'string')) {\n $this.data('colorpicker', new Colorpicker(this, options));\n } else {\n if (typeof option === 'string') {\n rv = inst[option].apply(inst, Array.prototype.slice.call(pickerArgs, 1));\n }\n }\n });\n if (option === 'getValue') {\n return rv;\n }\n return $returnValue;\n };\n\n $.fn.colorpicker.constructor = Colorpicker;\n\n }));\n","/*!\n * Chart.js\n * http://chartjs.org/\n * Version: 2.5.0\n *\n * Copyright 2017 Nick Downie\n * Released under the MIT license\n * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md\n */\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.Chart = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n\n},{}],2:[function(require,module,exports){\n/* MIT license */\r\nvar colorNames = require(6);\r\n\r\nmodule.exports = {\r\n getRgba: getRgba,\r\n getHsla: getHsla,\r\n getRgb: getRgb,\r\n getHsl: getHsl,\r\n getHwb: getHwb,\r\n getAlpha: getAlpha,\r\n\r\n hexString: hexString,\r\n rgbString: rgbString,\r\n rgbaString: rgbaString,\r\n percentString: percentString,\r\n percentaString: percentaString,\r\n hslString: hslString,\r\n hslaString: hslaString,\r\n hwbString: hwbString,\r\n keyword: keyword\r\n}\r\n\r\nfunction getRgba(string) {\r\n if (!string) {\r\n return;\r\n }\r\n var abbr = /^#([a-fA-F0-9]{3})$/,\r\n hex = /^#([a-fA-F0-9]{6})$/,\r\n rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/,\r\n per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/,\r\n keyword = /(\\w+)/;\r\n\r\n var rgb = [0, 0, 0],\r\n a = 1,\r\n match = string.match(abbr);\r\n if (match) {\r\n match = match[1];\r\n for (var i = 0; i < rgb.length; i++) {\r\n rgb[i] = parseInt(match[i] + match[i], 16);\r\n }\r\n }\r\n else if (match = string.match(hex)) {\r\n match = match[1];\r\n for (var i = 0; i < rgb.length; i++) {\r\n rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);\r\n }\r\n }\r\n else if (match = string.match(rgba)) {\r\n for (var i = 0; i < rgb.length; i++) {\r\n rgb[i] = parseInt(match[i + 1]);\r\n }\r\n a = parseFloat(match[4]);\r\n }\r\n else if (match = string.match(per)) {\r\n for (var i = 0; i < rgb.length; i++) {\r\n rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\r\n }\r\n a = parseFloat(match[4]);\r\n }\r\n else if (match = string.match(keyword)) {\r\n if (match[1] == \"transparent\") {\r\n return [0, 0, 0, 0];\r\n }\r\n rgb = colorNames[match[1]];\r\n if (!rgb) {\r\n return;\r\n }\r\n }\r\n\r\n for (var i = 0; i < rgb.length; i++) {\r\n rgb[i] = scale(rgb[i], 0, 255);\r\n }\r\n if (!a && a != 0) {\r\n a = 1;\r\n }\r\n else {\r\n a = scale(a, 0, 1);\r\n }\r\n rgb[3] = a;\r\n return rgb;\r\n}\r\n\r\nfunction getHsla(string) {\r\n if (!string) {\r\n return;\r\n }\r\n var hsl = /^hsla?\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\r\n var match = string.match(hsl);\r\n if (match) {\r\n var alpha = parseFloat(match[4]);\r\n var h = scale(parseInt(match[1]), 0, 360),\r\n s = scale(parseFloat(match[2]), 0, 100),\r\n l = scale(parseFloat(match[3]), 0, 100),\r\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\r\n return [h, s, l, a];\r\n }\r\n}\r\n\r\nfunction getHwb(string) {\r\n if (!string) {\r\n return;\r\n }\r\n var hwb = /^hwb\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\r\n var match = string.match(hwb);\r\n if (match) {\r\n var alpha = parseFloat(match[4]);\r\n var h = scale(parseInt(match[1]), 0, 360),\r\n w = scale(parseFloat(match[2]), 0, 100),\r\n b = scale(parseFloat(match[3]), 0, 100),\r\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\r\n return [h, w, b, a];\r\n }\r\n}\r\n\r\nfunction getRgb(string) {\r\n var rgba = getRgba(string);\r\n return rgba && rgba.slice(0, 3);\r\n}\r\n\r\nfunction getHsl(string) {\r\n var hsla = getHsla(string);\r\n return hsla && hsla.slice(0, 3);\r\n}\r\n\r\nfunction getAlpha(string) {\r\n var vals = getRgba(string);\r\n if (vals) {\r\n return vals[3];\r\n }\r\n else if (vals = getHsla(string)) {\r\n return vals[3];\r\n }\r\n else if (vals = getHwb(string)) {\r\n return vals[3];\r\n }\r\n}\r\n\r\n// generators\r\nfunction hexString(rgb) {\r\n return \"#\" + hexDouble(rgb[0]) + hexDouble(rgb[1])\r\n + hexDouble(rgb[2]);\r\n}\r\n\r\nfunction rgbString(rgba, alpha) {\r\n if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\r\n return rgbaString(rgba, alpha);\r\n }\r\n return \"rgb(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2] + \")\";\r\n}\r\n\r\nfunction rgbaString(rgba, alpha) {\r\n if (alpha === undefined) {\r\n alpha = (rgba[3] !== undefined ? rgba[3] : 1);\r\n }\r\n return \"rgba(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2]\r\n + \", \" + alpha + \")\";\r\n}\r\n\r\nfunction percentString(rgba, alpha) {\r\n if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\r\n return percentaString(rgba, alpha);\r\n }\r\n var r = Math.round(rgba[0]/255 * 100),\r\n g = Math.round(rgba[1]/255 * 100),\r\n b = Math.round(rgba[2]/255 * 100);\r\n\r\n return \"rgb(\" + r + \"%, \" + g + \"%, \" + b + \"%)\";\r\n}\r\n\r\nfunction percentaString(rgba, alpha) {\r\n var r = Math.round(rgba[0]/255 * 100),\r\n g = Math.round(rgba[1]/255 * 100),\r\n b = Math.round(rgba[2]/255 * 100);\r\n return \"rgba(\" + r + \"%, \" + g + \"%, \" + b + \"%, \" + (alpha || rgba[3] || 1) + \")\";\r\n}\r\n\r\nfunction hslString(hsla, alpha) {\r\n if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {\r\n return hslaString(hsla, alpha);\r\n }\r\n return \"hsl(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%)\";\r\n}\r\n\r\nfunction hslaString(hsla, alpha) {\r\n if (alpha === undefined) {\r\n alpha = (hsla[3] !== undefined ? hsla[3] : 1);\r\n }\r\n return \"hsla(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%, \"\r\n + alpha + \")\";\r\n}\r\n\r\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\r\n// (hwb have alpha optional & 1 is default value)\r\nfunction hwbString(hwb, alpha) {\r\n if (alpha === undefined) {\r\n alpha = (hwb[3] !== undefined ? hwb[3] : 1);\r\n }\r\n return \"hwb(\" + hwb[0] + \", \" + hwb[1] + \"%, \" + hwb[2] + \"%\"\r\n + (alpha !== undefined && alpha !== 1 ? \", \" + alpha : \"\") + \")\";\r\n}\r\n\r\nfunction keyword(rgb) {\r\n return reverseNames[rgb.slice(0, 3)];\r\n}\r\n\r\n// helpers\r\nfunction scale(num, min, max) {\r\n return Math.min(Math.max(min, num), max);\r\n}\r\n\r\nfunction hexDouble(num) {\r\n var str = num.toString(16).toUpperCase();\r\n return (str.length < 2) ? \"0\" + str : str;\r\n}\r\n\r\n\r\n//create a list of reverse color names\r\nvar reverseNames = {};\r\nfor (var name in colorNames) {\r\n reverseNames[colorNames[name]] = name;\r\n}\r\n\n},{\"6\":6}],3:[function(require,module,exports){\n/* MIT license */\r\nvar convert = require(5);\r\nvar string = require(2);\r\n\r\nvar Color = function (obj) {\r\n\tif (obj instanceof Color) {\r\n\t\treturn obj;\r\n\t}\r\n\tif (!(this instanceof Color)) {\r\n\t\treturn new Color(obj);\r\n\t}\r\n\r\n\tthis.values = {\r\n\t\trgb: [0, 0, 0],\r\n\t\thsl: [0, 0, 0],\r\n\t\thsv: [0, 0, 0],\r\n\t\thwb: [0, 0, 0],\r\n\t\tcmyk: [0, 0, 0, 0],\r\n\t\talpha: 1\r\n\t};\r\n\r\n\t// parse Color() argument\r\n\tvar vals;\r\n\tif (typeof obj === 'string') {\r\n\t\tvals = string.getRgba(obj);\r\n\t\tif (vals) {\r\n\t\t\tthis.setValues('rgb', vals);\r\n\t\t} else if (vals = string.getHsla(obj)) {\r\n\t\t\tthis.setValues('hsl', vals);\r\n\t\t} else if (vals = string.getHwb(obj)) {\r\n\t\t\tthis.setValues('hwb', vals);\r\n\t\t} else {\r\n\t\t\tthrow new Error('Unable to parse color from string \"' + obj + '\"');\r\n\t\t}\r\n\t} else if (typeof obj === 'object') {\r\n\t\tvals = obj;\r\n\t\tif (vals.r !== undefined || vals.red !== undefined) {\r\n\t\t\tthis.setValues('rgb', vals);\r\n\t\t} else if (vals.l !== undefined || vals.lightness !== undefined) {\r\n\t\t\tthis.setValues('hsl', vals);\r\n\t\t} else if (vals.v !== undefined || vals.value !== undefined) {\r\n\t\t\tthis.setValues('hsv', vals);\r\n\t\t} else if (vals.w !== undefined || vals.whiteness !== undefined) {\r\n\t\t\tthis.setValues('hwb', vals);\r\n\t\t} else if (vals.c !== undefined || vals.cyan !== undefined) {\r\n\t\t\tthis.setValues('cmyk', vals);\r\n\t\t} else {\r\n\t\t\tthrow new Error('Unable to parse color from object ' + JSON.stringify(obj));\r\n\t\t}\r\n\t}\r\n};\r\n\r\nColor.prototype = {\r\n\trgb: function () {\r\n\t\treturn this.setSpace('rgb', arguments);\r\n\t},\r\n\thsl: function () {\r\n\t\treturn this.setSpace('hsl', arguments);\r\n\t},\r\n\thsv: function () {\r\n\t\treturn this.setSpace('hsv', arguments);\r\n\t},\r\n\thwb: function () {\r\n\t\treturn this.setSpace('hwb', arguments);\r\n\t},\r\n\tcmyk: function () {\r\n\t\treturn this.setSpace('cmyk', arguments);\r\n\t},\r\n\r\n\trgbArray: function () {\r\n\t\treturn this.values.rgb;\r\n\t},\r\n\thslArray: function () {\r\n\t\treturn this.values.hsl;\r\n\t},\r\n\thsvArray: function () {\r\n\t\treturn this.values.hsv;\r\n\t},\r\n\thwbArray: function () {\r\n\t\tvar values = this.values;\r\n\t\tif (values.alpha !== 1) {\r\n\t\t\treturn values.hwb.concat([values.alpha]);\r\n\t\t}\r\n\t\treturn values.hwb;\r\n\t},\r\n\tcmykArray: function () {\r\n\t\treturn this.values.cmyk;\r\n\t},\r\n\trgbaArray: function () {\r\n\t\tvar values = this.values;\r\n\t\treturn values.rgb.concat([values.alpha]);\r\n\t},\r\n\thslaArray: function () {\r\n\t\tvar values = this.values;\r\n\t\treturn values.hsl.concat([values.alpha]);\r\n\t},\r\n\talpha: function (val) {\r\n\t\tif (val === undefined) {\r\n\t\t\treturn this.values.alpha;\r\n\t\t}\r\n\t\tthis.setValues('alpha', val);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tred: function (val) {\r\n\t\treturn this.setChannel('rgb', 0, val);\r\n\t},\r\n\tgreen: function (val) {\r\n\t\treturn this.setChannel('rgb', 1, val);\r\n\t},\r\n\tblue: function (val) {\r\n\t\treturn this.setChannel('rgb', 2, val);\r\n\t},\r\n\thue: function (val) {\r\n\t\tif (val) {\r\n\t\t\tval %= 360;\r\n\t\t\tval = val < 0 ? 360 + val : val;\r\n\t\t}\r\n\t\treturn this.setChannel('hsl', 0, val);\r\n\t},\r\n\tsaturation: function (val) {\r\n\t\treturn this.setChannel('hsl', 1, val);\r\n\t},\r\n\tlightness: function (val) {\r\n\t\treturn this.setChannel('hsl', 2, val);\r\n\t},\r\n\tsaturationv: function (val) {\r\n\t\treturn this.setChannel('hsv', 1, val);\r\n\t},\r\n\twhiteness: function (val) {\r\n\t\treturn this.setChannel('hwb', 1, val);\r\n\t},\r\n\tblackness: function (val) {\r\n\t\treturn this.setChannel('hwb', 2, val);\r\n\t},\r\n\tvalue: function (val) {\r\n\t\treturn this.setChannel('hsv', 2, val);\r\n\t},\r\n\tcyan: function (val) {\r\n\t\treturn this.setChannel('cmyk', 0, val);\r\n\t},\r\n\tmagenta: function (val) {\r\n\t\treturn this.setChannel('cmyk', 1, val);\r\n\t},\r\n\tyellow: function (val) {\r\n\t\treturn this.setChannel('cmyk', 2, val);\r\n\t},\r\n\tblack: function (val) {\r\n\t\treturn this.setChannel('cmyk', 3, val);\r\n\t},\r\n\r\n\thexString: function () {\r\n\t\treturn string.hexString(this.values.rgb);\r\n\t},\r\n\trgbString: function () {\r\n\t\treturn string.rgbString(this.values.rgb, this.values.alpha);\r\n\t},\r\n\trgbaString: function () {\r\n\t\treturn string.rgbaString(this.values.rgb, this.values.alpha);\r\n\t},\r\n\tpercentString: function () {\r\n\t\treturn string.percentString(this.values.rgb, this.values.alpha);\r\n\t},\r\n\thslString: function () {\r\n\t\treturn string.hslString(this.values.hsl, this.values.alpha);\r\n\t},\r\n\thslaString: function () {\r\n\t\treturn string.hslaString(this.values.hsl, this.values.alpha);\r\n\t},\r\n\thwbString: function () {\r\n\t\treturn string.hwbString(this.values.hwb, this.values.alpha);\r\n\t},\r\n\tkeyword: function () {\r\n\t\treturn string.keyword(this.values.rgb, this.values.alpha);\r\n\t},\r\n\r\n\trgbNumber: function () {\r\n\t\tvar rgb = this.values.rgb;\r\n\t\treturn (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];\r\n\t},\r\n\r\n\tluminosity: function () {\r\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\r\n\t\tvar rgb = this.values.rgb;\r\n\t\tvar lum = [];\r\n\t\tfor (var i = 0; i < rgb.length; i++) {\r\n\t\t\tvar chan = rgb[i] / 255;\r\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\r\n\t\t}\r\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\r\n\t},\r\n\r\n\tcontrast: function (color2) {\r\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\r\n\t\tvar lum1 = this.luminosity();\r\n\t\tvar lum2 = color2.luminosity();\r\n\t\tif (lum1 > lum2) {\r\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\r\n\t\t}\r\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\r\n\t},\r\n\r\n\tlevel: function (color2) {\r\n\t\tvar contrastRatio = this.contrast(color2);\r\n\t\tif (contrastRatio >= 7.1) {\r\n\t\t\treturn 'AAA';\r\n\t\t}\r\n\r\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\r\n\t},\r\n\r\n\tdark: function () {\r\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\r\n\t\tvar rgb = this.values.rgb;\r\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\r\n\t\treturn yiq < 128;\r\n\t},\r\n\r\n\tlight: function () {\r\n\t\treturn !this.dark();\r\n\t},\r\n\r\n\tnegate: function () {\r\n\t\tvar rgb = [];\r\n\t\tfor (var i = 0; i < 3; i++) {\r\n\t\t\trgb[i] = 255 - this.values.rgb[i];\r\n\t\t}\r\n\t\tthis.setValues('rgb', rgb);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tlighten: function (ratio) {\r\n\t\tvar hsl = this.values.hsl;\r\n\t\thsl[2] += hsl[2] * ratio;\r\n\t\tthis.setValues('hsl', hsl);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tdarken: function (ratio) {\r\n\t\tvar hsl = this.values.hsl;\r\n\t\thsl[2] -= hsl[2] * ratio;\r\n\t\tthis.setValues('hsl', hsl);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsaturate: function (ratio) {\r\n\t\tvar hsl = this.values.hsl;\r\n\t\thsl[1] += hsl[1] * ratio;\r\n\t\tthis.setValues('hsl', hsl);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tdesaturate: function (ratio) {\r\n\t\tvar hsl = this.values.hsl;\r\n\t\thsl[1] -= hsl[1] * ratio;\r\n\t\tthis.setValues('hsl', hsl);\r\n\t\treturn this;\r\n\t},\r\n\r\n\twhiten: function (ratio) {\r\n\t\tvar hwb = this.values.hwb;\r\n\t\thwb[1] += hwb[1] * ratio;\r\n\t\tthis.setValues('hwb', hwb);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tblacken: function (ratio) {\r\n\t\tvar hwb = this.values.hwb;\r\n\t\thwb[2] += hwb[2] * ratio;\r\n\t\tthis.setValues('hwb', hwb);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgreyscale: function () {\r\n\t\tvar rgb = this.values.rgb;\r\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\r\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\r\n\t\tthis.setValues('rgb', [val, val, val]);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclearer: function (ratio) {\r\n\t\tvar alpha = this.values.alpha;\r\n\t\tthis.setValues('alpha', alpha - (alpha * ratio));\r\n\t\treturn this;\r\n\t},\r\n\r\n\topaquer: function (ratio) {\r\n\t\tvar alpha = this.values.alpha;\r\n\t\tthis.setValues('alpha', alpha + (alpha * ratio));\r\n\t\treturn this;\r\n\t},\r\n\r\n\trotate: function (degrees) {\r\n\t\tvar hsl = this.values.hsl;\r\n\t\tvar hue = (hsl[0] + degrees) % 360;\r\n\t\thsl[0] = hue < 0 ? 360 + hue : hue;\r\n\t\tthis.setValues('hsl', hsl);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t/**\r\n\t * Ported from sass implementation in C\r\n\t * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\r\n\t */\r\n\tmix: function (mixinColor, weight) {\r\n\t\tvar color1 = this;\r\n\t\tvar color2 = mixinColor;\r\n\t\tvar p = weight === undefined ? 0.5 : weight;\r\n\r\n\t\tvar w = 2 * p - 1;\r\n\t\tvar a = color1.alpha() - color2.alpha();\r\n\r\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\r\n\t\tvar w2 = 1 - w1;\r\n\r\n\t\treturn this\r\n\t\t\t.rgb(\r\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\r\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\r\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue()\r\n\t\t\t)\r\n\t\t\t.alpha(color1.alpha() * p + color2.alpha() * (1 - p));\r\n\t},\r\n\r\n\ttoJSON: function () {\r\n\t\treturn this.rgb();\r\n\t},\r\n\r\n\tclone: function () {\r\n\t\t// NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,\r\n\t\t// making the final build way to big to embed in Chart.js. So let's do it manually,\r\n\t\t// assuming that values to clone are 1 dimension arrays containing only numbers,\r\n\t\t// except 'alpha' which is a number.\r\n\t\tvar result = new Color();\r\n\t\tvar source = this.values;\r\n\t\tvar target = result.values;\r\n\t\tvar value, type;\r\n\r\n\t\tfor (var prop in source) {\r\n\t\t\tif (source.hasOwnProperty(prop)) {\r\n\t\t\t\tvalue = source[prop];\r\n\t\t\t\ttype = ({}).toString.call(value);\r\n\t\t\t\tif (type === '[object Array]') {\r\n\t\t\t\t\ttarget[prop] = value.slice(0);\r\n\t\t\t\t} else if (type === '[object Number]') {\r\n\t\t\t\t\ttarget[prop] = value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.error('unexpected color value:', value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n};\r\n\r\nColor.prototype.spaces = {\r\n\trgb: ['red', 'green', 'blue'],\r\n\thsl: ['hue', 'saturation', 'lightness'],\r\n\thsv: ['hue', 'saturation', 'value'],\r\n\thwb: ['hue', 'whiteness', 'blackness'],\r\n\tcmyk: ['cyan', 'magenta', 'yellow', 'black']\r\n};\r\n\r\nColor.prototype.maxes = {\r\n\trgb: [255, 255, 255],\r\n\thsl: [360, 100, 100],\r\n\thsv: [360, 100, 100],\r\n\thwb: [360, 100, 100],\r\n\tcmyk: [100, 100, 100, 100]\r\n};\r\n\r\nColor.prototype.getValues = function (space) {\r\n\tvar values = this.values;\r\n\tvar vals = {};\r\n\r\n\tfor (var i = 0; i < space.length; i++) {\r\n\t\tvals[space.charAt(i)] = values[space][i];\r\n\t}\r\n\r\n\tif (values.alpha !== 1) {\r\n\t\tvals.a = values.alpha;\r\n\t}\r\n\r\n\t// {r: 255, g: 255, b: 255, a: 0.4}\r\n\treturn vals;\r\n};\r\n\r\nColor.prototype.setValues = function (space, vals) {\r\n\tvar values = this.values;\r\n\tvar spaces = this.spaces;\r\n\tvar maxes = this.maxes;\r\n\tvar alpha = 1;\r\n\tvar i;\r\n\r\n\tif (space === 'alpha') {\r\n\t\talpha = vals;\r\n\t} else if (vals.length) {\r\n\t\t// [10, 10, 10]\r\n\t\tvalues[space] = vals.slice(0, space.length);\r\n\t\talpha = vals[space.length];\r\n\t} else if (vals[space.charAt(0)] !== undefined) {\r\n\t\t// {r: 10, g: 10, b: 10}\r\n\t\tfor (i = 0; i < space.length; i++) {\r\n\t\t\tvalues[space][i] = vals[space.charAt(i)];\r\n\t\t}\r\n\r\n\t\talpha = vals.a;\r\n\t} else if (vals[spaces[space][0]] !== undefined) {\r\n\t\t// {red: 10, green: 10, blue: 10}\r\n\t\tvar chans = spaces[space];\r\n\r\n\t\tfor (i = 0; i < space.length; i++) {\r\n\t\t\tvalues[space][i] = vals[chans[i]];\r\n\t\t}\r\n\r\n\t\talpha = vals.alpha;\r\n\t}\r\n\r\n\tvalues.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));\r\n\r\n\tif (space === 'alpha') {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tvar capped;\r\n\r\n\t// cap values of the space prior converting all values\r\n\tfor (i = 0; i < space.length; i++) {\r\n\t\tcapped = Math.max(0, Math.min(maxes[space][i], values[space][i]));\r\n\t\tvalues[space][i] = Math.round(capped);\r\n\t}\r\n\r\n\t// convert to all the other color spaces\r\n\tfor (var sname in spaces) {\r\n\t\tif (sname !== space) {\r\n\t\t\tvalues[sname] = convert[space][sname](values[space]);\r\n\t\t}\r\n\t}\r\n\r\n\treturn true;\r\n};\r\n\r\nColor.prototype.setSpace = function (space, args) {\r\n\tvar vals = args[0];\r\n\r\n\tif (vals === undefined) {\r\n\t\t// color.rgb()\r\n\t\treturn this.getValues(space);\r\n\t}\r\n\r\n\t// color.rgb(10, 10, 10)\r\n\tif (typeof vals === 'number') {\r\n\t\tvals = Array.prototype.slice.call(args);\r\n\t}\r\n\r\n\tthis.setValues(space, vals);\r\n\treturn this;\r\n};\r\n\r\nColor.prototype.setChannel = function (space, index, val) {\r\n\tvar svalues = this.values[space];\r\n\tif (val === undefined) {\r\n\t\t// color.red()\r\n\t\treturn svalues[index];\r\n\t} else if (val === svalues[index]) {\r\n\t\t// color.red(color.red())\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// color.red(100)\r\n\tsvalues[index] = val;\r\n\tthis.setValues(space, svalues);\r\n\r\n\treturn this;\r\n};\r\n\r\nif (typeof window !== 'undefined') {\r\n\twindow.Color = Color;\r\n}\r\n\r\nmodule.exports = Color;\r\n\n},{\"2\":2,\"5\":5}],4:[function(require,module,exports){\n/* MIT license */\n\nmodule.exports = {\n rgb2hsl: rgb2hsl,\n rgb2hsv: rgb2hsv,\n rgb2hwb: rgb2hwb,\n rgb2cmyk: rgb2cmyk,\n rgb2keyword: rgb2keyword,\n rgb2xyz: rgb2xyz,\n rgb2lab: rgb2lab,\n rgb2lch: rgb2lch,\n\n hsl2rgb: hsl2rgb,\n hsl2hsv: hsl2hsv,\n hsl2hwb: hsl2hwb,\n hsl2cmyk: hsl2cmyk,\n hsl2keyword: hsl2keyword,\n\n hsv2rgb: hsv2rgb,\n hsv2hsl: hsv2hsl,\n hsv2hwb: hsv2hwb,\n hsv2cmyk: hsv2cmyk,\n hsv2keyword: hsv2keyword,\n\n hwb2rgb: hwb2rgb,\n hwb2hsl: hwb2hsl,\n hwb2hsv: hwb2hsv,\n hwb2cmyk: hwb2cmyk,\n hwb2keyword: hwb2keyword,\n\n cmyk2rgb: cmyk2rgb,\n cmyk2hsl: cmyk2hsl,\n cmyk2hsv: cmyk2hsv,\n cmyk2hwb: cmyk2hwb,\n cmyk2keyword: cmyk2keyword,\n\n keyword2rgb: keyword2rgb,\n keyword2hsl: keyword2hsl,\n keyword2hsv: keyword2hsv,\n keyword2hwb: keyword2hwb,\n keyword2cmyk: keyword2cmyk,\n keyword2lab: keyword2lab,\n keyword2xyz: keyword2xyz,\n\n xyz2rgb: xyz2rgb,\n xyz2lab: xyz2lab,\n xyz2lch: xyz2lch,\n\n lab2xyz: lab2xyz,\n lab2rgb: lab2rgb,\n lab2lch: lab2lch,\n\n lch2lab: lch2lab,\n lch2xyz: lch2xyz,\n lch2rgb: lch2rgb\n}\n\n\nfunction rgb2hsl(rgb) {\n var r = rgb[0]/255,\n g = rgb[1]/255,\n b = rgb[2]/255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n delta = max - min,\n h, s, l;\n\n if (max == min)\n h = 0;\n else if (r == max)\n h = (g - b) / delta;\n else if (g == max)\n h = 2 + (b - r) / delta;\n else if (b == max)\n h = 4 + (r - g)/ delta;\n\n h = Math.min(h * 60, 360);\n\n if (h < 0)\n h += 360;\n\n l = (min + max) / 2;\n\n if (max == min)\n s = 0;\n else if (l <= 0.5)\n s = delta / (max + min);\n else\n s = delta / (2 - max - min);\n\n return [h, s * 100, l * 100];\n}\n\nfunction rgb2hsv(rgb) {\n var r = rgb[0],\n g = rgb[1],\n b = rgb[2],\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n delta = max - min,\n h, s, v;\n\n if (max == 0)\n s = 0;\n else\n s = (delta/max * 1000)/10;\n\n if (max == min)\n h = 0;\n else if (r == max)\n h = (g - b) / delta;\n else if (g == max)\n h = 2 + (b - r) / delta;\n else if (b == max)\n h = 4 + (r - g) / delta;\n\n h = Math.min(h * 60, 360);\n\n if (h < 0)\n h += 360;\n\n v = ((max / 255) * 1000) / 10;\n\n return [h, s, v];\n}\n\nfunction rgb2hwb(rgb) {\n var r = rgb[0],\n g = rgb[1],\n b = rgb[2],\n h = rgb2hsl(rgb)[0],\n w = 1/255 * Math.min(r, Math.min(g, b)),\n b = 1 - 1/255 * Math.max(r, Math.max(g, b));\n\n return [h, w * 100, b * 100];\n}\n\nfunction rgb2cmyk(rgb) {\n var r = rgb[0] / 255,\n g = rgb[1] / 255,\n b = rgb[2] / 255,\n c, m, y, k;\n\n k = Math.min(1 - r, 1 - g, 1 - b);\n c = (1 - r - k) / (1 - k) || 0;\n m = (1 - g - k) / (1 - k) || 0;\n y = (1 - b - k) / (1 - k) || 0;\n return [c * 100, m * 100, y * 100, k * 100];\n}\n\nfunction rgb2keyword(rgb) {\n return reverseKeywords[JSON.stringify(rgb)];\n}\n\nfunction rgb2xyz(rgb) {\n var r = rgb[0] / 255,\n g = rgb[1] / 255,\n b = rgb[2] / 255;\n\n // assume sRGB\n r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n return [x * 100, y *100, z * 100];\n}\n\nfunction rgb2lab(rgb) {\n var xyz = rgb2xyz(rgb),\n x = xyz[0],\n y = xyz[1],\n z = xyz[2],\n l, a, b;\n\n x /= 95.047;\n y /= 100;\n z /= 108.883;\n\n x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116);\n y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116);\n z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116);\n\n l = (116 * y) - 16;\n a = 500 * (x - y);\n b = 200 * (y - z);\n\n return [l, a, b];\n}\n\nfunction rgb2lch(args) {\n return lab2lch(rgb2lab(args));\n}\n\nfunction hsl2rgb(hsl) {\n var h = hsl[0] / 360,\n s = hsl[1] / 100,\n l = hsl[2] / 100,\n t1, t2, t3, rgb, val;\n\n if (s == 0) {\n val = l * 255;\n return [val, val, val];\n }\n\n if (l < 0.5)\n t2 = l * (1 + s);\n else\n t2 = l + s - l * s;\n t1 = 2 * l - t2;\n\n rgb = [0, 0, 0];\n for (var i = 0; i < 3; i++) {\n t3 = h + 1 / 3 * - (i - 1);\n t3 < 0 && t3++;\n t3 > 1 && t3--;\n\n if (6 * t3 < 1)\n val = t1 + (t2 - t1) * 6 * t3;\n else if (2 * t3 < 1)\n val = t2;\n else if (3 * t3 < 2)\n val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n else\n val = t1;\n\n rgb[i] = val * 255;\n }\n\n return rgb;\n}\n\nfunction hsl2hsv(hsl) {\n var h = hsl[0],\n s = hsl[1] / 100,\n l = hsl[2] / 100,\n sv, v;\n\n if(l === 0) {\n // no need to do calc on black\n // also avoids divide by 0 error\n return [0, 0, 0];\n }\n\n l *= 2;\n s *= (l <= 1) ? l : 2 - l;\n v = (l + s) / 2;\n sv = (2 * s) / (l + s);\n return [h, sv * 100, v * 100];\n}\n\nfunction hsl2hwb(args) {\n return rgb2hwb(hsl2rgb(args));\n}\n\nfunction hsl2cmyk(args) {\n return rgb2cmyk(hsl2rgb(args));\n}\n\nfunction hsl2keyword(args) {\n return rgb2keyword(hsl2rgb(args));\n}\n\n\nfunction hsv2rgb(hsv) {\n var h = hsv[0] / 60,\n s = hsv[1] / 100,\n v = hsv[2] / 100,\n hi = Math.floor(h) % 6;\n\n var f = h - Math.floor(h),\n p = 255 * v * (1 - s),\n q = 255 * v * (1 - (s * f)),\n t = 255 * v * (1 - (s * (1 - f))),\n v = 255 * v;\n\n switch(hi) {\n case 0:\n return [v, t, p];\n case 1:\n return [q, v, p];\n case 2:\n return [p, v, t];\n case 3:\n return [p, q, v];\n case 4:\n return [t, p, v];\n case 5:\n return [v, p, q];\n }\n}\n\nfunction hsv2hsl(hsv) {\n var h = hsv[0],\n s = hsv[1] / 100,\n v = hsv[2] / 100,\n sl, l;\n\n l = (2 - s) * v;\n sl = s * v;\n sl /= (l <= 1) ? l : 2 - l;\n sl = sl || 0;\n l /= 2;\n return [h, sl * 100, l * 100];\n}\n\nfunction hsv2hwb(args) {\n return rgb2hwb(hsv2rgb(args))\n}\n\nfunction hsv2cmyk(args) {\n return rgb2cmyk(hsv2rgb(args));\n}\n\nfunction hsv2keyword(args) {\n return rgb2keyword(hsv2rgb(args));\n}\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nfunction hwb2rgb(hwb) {\n var h = hwb[0] / 360,\n wh = hwb[1] / 100,\n bl = hwb[2] / 100,\n ratio = wh + bl,\n i, v, f, n;\n\n // wh + bl cant be > 1\n if (ratio > 1) {\n wh /= ratio;\n bl /= ratio;\n }\n\n i = Math.floor(6 * h);\n v = 1 - bl;\n f = 6 * h - i;\n if ((i & 0x01) != 0) {\n f = 1 - f;\n }\n n = wh + f * (v - wh); // linear interpolation\n\n switch (i) {\n default:\n case 6:\n case 0: r = v; g = n; b = wh; break;\n case 1: r = n; g = v; b = wh; break;\n case 2: r = wh; g = v; b = n; break;\n case 3: r = wh; g = n; b = v; break;\n case 4: r = n; g = wh; b = v; break;\n case 5: r = v; g = wh; b = n; break;\n }\n\n return [r * 255, g * 255, b * 255];\n}\n\nfunction hwb2hsl(args) {\n return rgb2hsl(hwb2rgb(args));\n}\n\nfunction hwb2hsv(args) {\n return rgb2hsv(hwb2rgb(args));\n}\n\nfunction hwb2cmyk(args) {\n return rgb2cmyk(hwb2rgb(args));\n}\n\nfunction hwb2keyword(args) {\n return rgb2keyword(hwb2rgb(args));\n}\n\nfunction cmyk2rgb(cmyk) {\n var c = cmyk[0] / 100,\n m = cmyk[1] / 100,\n y = cmyk[2] / 100,\n k = cmyk[3] / 100,\n r, g, b;\n\n r = 1 - Math.min(1, c * (1 - k) + k);\n g = 1 - Math.min(1, m * (1 - k) + k);\n b = 1 - Math.min(1, y * (1 - k) + k);\n return [r * 255, g * 255, b * 255];\n}\n\nfunction cmyk2hsl(args) {\n return rgb2hsl(cmyk2rgb(args));\n}\n\nfunction cmyk2hsv(args) {\n return rgb2hsv(cmyk2rgb(args));\n}\n\nfunction cmyk2hwb(args) {\n return rgb2hwb(cmyk2rgb(args));\n}\n\nfunction cmyk2keyword(args) {\n return rgb2keyword(cmyk2rgb(args));\n}\n\n\nfunction xyz2rgb(xyz) {\n var x = xyz[0] / 100,\n y = xyz[1] / 100,\n z = xyz[2] / 100,\n r, g, b;\n\n r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n // assume sRGB\n r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n : r = (r * 12.92);\n\n g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n : g = (g * 12.92);\n\n b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n : b = (b * 12.92);\n\n r = Math.min(Math.max(0, r), 1);\n g = Math.min(Math.max(0, g), 1);\n b = Math.min(Math.max(0, b), 1);\n\n return [r * 255, g * 255, b * 255];\n}\n\nfunction xyz2lab(xyz) {\n var x = xyz[0],\n y = xyz[1],\n z = xyz[2],\n l, a, b;\n\n x /= 95.047;\n y /= 100;\n z /= 108.883;\n\n x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116);\n y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116);\n z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116);\n\n l = (116 * y) - 16;\n a = 500 * (x - y);\n b = 200 * (y - z);\n\n return [l, a, b];\n}\n\nfunction xyz2lch(args) {\n return lab2lch(xyz2lab(args));\n}\n\nfunction lab2xyz(lab) {\n var l = lab[0],\n a = lab[1],\n b = lab[2],\n x, y, z, y2;\n\n if (l <= 8) {\n y = (l * 100) / 903.3;\n y2 = (7.787 * (y / 100)) + (16 / 116);\n } else {\n y = 100 * Math.pow((l + 16) / 116, 3);\n y2 = Math.pow(y / 100, 1/3);\n }\n\n x = x / 95.047 <= 0.008856 ? x = (95.047 * ((a / 500) + y2 - (16 / 116))) / 7.787 : 95.047 * Math.pow((a / 500) + y2, 3);\n\n z = z / 108.883 <= 0.008859 ? z = (108.883 * (y2 - (b / 200) - (16 / 116))) / 7.787 : 108.883 * Math.pow(y2 - (b / 200), 3);\n\n return [x, y, z];\n}\n\nfunction lab2lch(lab) {\n var l = lab[0],\n a = lab[1],\n b = lab[2],\n hr, h, c;\n\n hr = Math.atan2(b, a);\n h = hr * 360 / 2 / Math.PI;\n if (h < 0) {\n h += 360;\n }\n c = Math.sqrt(a * a + b * b);\n return [l, c, h];\n}\n\nfunction lab2rgb(args) {\n return xyz2rgb(lab2xyz(args));\n}\n\nfunction lch2lab(lch) {\n var l = lch[0],\n c = lch[1],\n h = lch[2],\n a, b, hr;\n\n hr = h / 360 * 2 * Math.PI;\n a = c * Math.cos(hr);\n b = c * Math.sin(hr);\n return [l, a, b];\n}\n\nfunction lch2xyz(args) {\n return lab2xyz(lch2lab(args));\n}\n\nfunction lch2rgb(args) {\n return lab2rgb(lch2lab(args));\n}\n\nfunction keyword2rgb(keyword) {\n return cssKeywords[keyword];\n}\n\nfunction keyword2hsl(args) {\n return rgb2hsl(keyword2rgb(args));\n}\n\nfunction keyword2hsv(args) {\n return rgb2hsv(keyword2rgb(args));\n}\n\nfunction keyword2hwb(args) {\n return rgb2hwb(keyword2rgb(args));\n}\n\nfunction keyword2cmyk(args) {\n return rgb2cmyk(keyword2rgb(args));\n}\n\nfunction keyword2lab(args) {\n return rgb2lab(keyword2rgb(args));\n}\n\nfunction keyword2xyz(args) {\n return rgb2xyz(keyword2rgb(args));\n}\n\nvar cssKeywords = {\n aliceblue: [240,248,255],\n antiquewhite: [250,235,215],\n aqua: [0,255,255],\n aquamarine: [127,255,212],\n azure: [240,255,255],\n beige: [245,245,220],\n bisque: [255,228,196],\n black: [0,0,0],\n blanchedalmond: [255,235,205],\n blue: [0,0,255],\n blueviolet: [138,43,226],\n brown: [165,42,42],\n burlywood: [222,184,135],\n cadetblue: [95,158,160],\n chartreuse: [127,255,0],\n chocolate: [210,105,30],\n coral: [255,127,80],\n cornflowerblue: [100,149,237],\n cornsilk: [255,248,220],\n crimson: [220,20,60],\n cyan: [0,255,255],\n darkblue: [0,0,139],\n darkcyan: [0,139,139],\n darkgoldenrod: [184,134,11],\n darkgray: [169,169,169],\n darkgreen: [0,100,0],\n darkgrey: [169,169,169],\n darkkhaki: [189,183,107],\n darkmagenta: [139,0,139],\n darkolivegreen: [85,107,47],\n darkorange: [255,140,0],\n darkorchid: [153,50,204],\n darkred: [139,0,0],\n darksalmon: [233,150,122],\n darkseagreen: [143,188,143],\n darkslateblue: [72,61,139],\n darkslategray: [47,79,79],\n darkslategrey: [47,79,79],\n darkturquoise: [0,206,209],\n darkviolet: [148,0,211],\n deeppink: [255,20,147],\n deepskyblue: [0,191,255],\n dimgray: [105,105,105],\n dimgrey: [105,105,105],\n dodgerblue: [30,144,255],\n firebrick: [178,34,34],\n floralwhite: [255,250,240],\n forestgreen: [34,139,34],\n fuchsia: [255,0,255],\n gainsboro: [220,220,220],\n ghostwhite: [248,248,255],\n gold: [255,215,0],\n goldenrod: [218,165,32],\n gray: [128,128,128],\n green: [0,128,0],\n greenyellow: [173,255,47],\n grey: [128,128,128],\n honeydew: [240,255,240],\n hotpink: [255,105,180],\n indianred: [205,92,92],\n indigo: [75,0,130],\n ivory: [255,255,240],\n khaki: [240,230,140],\n lavender: [230,230,250],\n lavenderblush: [255,240,245],\n lawngreen: [124,252,0],\n lemonchiffon: [255,250,205],\n lightblue: [173,216,230],\n lightcoral: [240,128,128],\n lightcyan: [224,255,255],\n lightgoldenrodyellow: [250,250,210],\n lightgray: [211,211,211],\n lightgreen: [144,238,144],\n lightgrey: [211,211,211],\n lightpink: [255,182,193],\n lightsalmon: [255,160,122],\n lightseagreen: [32,178,170],\n lightskyblue: [135,206,250],\n lightslategray: [119,136,153],\n lightslategrey: [119,136,153],\n lightsteelblue: [176,196,222],\n lightyellow: [255,255,224],\n lime: [0,255,0],\n limegreen: [50,205,50],\n linen: [250,240,230],\n magenta: [255,0,255],\n maroon: [128,0,0],\n mediumaquamarine: [102,205,170],\n mediumblue: [0,0,205],\n mediumorchid: [186,85,211],\n mediumpurple: [147,112,219],\n mediumseagreen: [60,179,113],\n mediumslateblue: [123,104,238],\n mediumspringgreen: [0,250,154],\n mediumturquoise: [72,209,204],\n mediumvioletred: [199,21,133],\n midnightblue: [25,25,112],\n mintcream: [245,255,250],\n mistyrose: [255,228,225],\n moccasin: [255,228,181],\n navajowhite: [255,222,173],\n navy: [0,0,128],\n oldlace: [253,245,230],\n olive: [128,128,0],\n olivedrab: [107,142,35],\n orange: [255,165,0],\n orangered: [255,69,0],\n orchid: [218,112,214],\n palegoldenrod: [238,232,170],\n palegreen: [152,251,152],\n paleturquoise: [175,238,238],\n palevioletred: [219,112,147],\n papayawhip: [255,239,213],\n peachpuff: [255,218,185],\n peru: [205,133,63],\n pink: [255,192,203],\n plum: [221,160,221],\n powderblue: [176,224,230],\n purple: [128,0,128],\n rebeccapurple: [102, 51, 153],\n red: [255,0,0],\n rosybrown: [188,143,143],\n royalblue: [65,105,225],\n saddlebrown: [139,69,19],\n salmon: [250,128,114],\n sandybrown: [244,164,96],\n seagreen: [46,139,87],\n seashell: [255,245,238],\n sienna: [160,82,45],\n silver: [192,192,192],\n skyblue: [135,206,235],\n slateblue: [106,90,205],\n slategray: [112,128,144],\n slategrey: [112,128,144],\n snow: [255,250,250],\n springgreen: [0,255,127],\n steelblue: [70,130,180],\n tan: [210,180,140],\n teal: [0,128,128],\n thistle: [216,191,216],\n tomato: [255,99,71],\n turquoise: [64,224,208],\n violet: [238,130,238],\n wheat: [245,222,179],\n white: [255,255,255],\n whitesmoke: [245,245,245],\n yellow: [255,255,0],\n yellowgreen: [154,205,50]\n};\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n reverseKeywords[JSON.stringify(cssKeywords[key])] = key;\n}\n\n},{}],5:[function(require,module,exports){\nvar conversions = require(4);\n\nvar convert = function() {\n return new Converter();\n}\n\nfor (var func in conversions) {\n // export Raw versions\n convert[func + \"Raw\"] = (function(func) {\n // accept array or plain args\n return function(arg) {\n if (typeof arg == \"number\")\n arg = Array.prototype.slice.call(arguments);\n return conversions[func](arg);\n }\n })(func);\n\n var pair = /(\\w+)2(\\w+)/.exec(func),\n from = pair[1],\n to = pair[2];\n\n // export rgb2hsl and [\"rgb\"][\"hsl\"]\n convert[from] = convert[from] || {};\n\n convert[from][to] = convert[func] = (function(func) { \n return function(arg) {\n if (typeof arg == \"number\")\n arg = Array.prototype.slice.call(arguments);\n \n var val = conversions[func](arg);\n if (typeof val == \"string\" || val === undefined)\n return val; // keyword\n\n for (var i = 0; i < val.length; i++)\n val[i] = Math.round(val[i]);\n return val;\n }\n })(func);\n}\n\n\n/* Converter does lazy conversion and caching */\nvar Converter = function() {\n this.convs = {};\n};\n\n/* Either get the values for a space or\n set the values for a space, depending on args */\nConverter.prototype.routeSpace = function(space, args) {\n var values = args[0];\n if (values === undefined) {\n // color.rgb()\n return this.getValues(space);\n }\n // color.rgb(10, 10, 10)\n if (typeof values == \"number\") {\n values = Array.prototype.slice.call(args); \n }\n\n return this.setValues(space, values);\n};\n \n/* Set the values for a space, invalidating cache */\nConverter.prototype.setValues = function(space, values) {\n this.space = space;\n this.convs = {};\n this.convs[space] = values;\n return this;\n};\n\n/* Get the values for a space. If there's already\n a conversion for the space, fetch it, otherwise\n compute it */\nConverter.prototype.getValues = function(space) {\n var vals = this.convs[space];\n if (!vals) {\n var fspace = this.space,\n from = this.convs[fspace];\n vals = convert[fspace][space](from);\n\n this.convs[space] = vals;\n }\n return vals;\n};\n\n[\"rgb\", \"hsl\", \"hsv\", \"cmyk\", \"keyword\"].forEach(function(space) {\n Converter.prototype[space] = function(vals) {\n return this.routeSpace(space, arguments);\n }\n});\n\nmodule.exports = convert;\n},{\"4\":4}],6:[function(require,module,exports){\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\n},{}],7:[function(require,module,exports){\n/**\n * @namespace Chart\n */\nvar Chart = require(28)();\n\nrequire(26)(Chart);\nrequire(42)(Chart);\nrequire(22)(Chart);\nrequire(31)(Chart);\nrequire(25)(Chart);\nrequire(21)(Chart);\nrequire(23)(Chart);\nrequire(24)(Chart);\nrequire(29)(Chart);\nrequire(33)(Chart);\nrequire(34)(Chart);\nrequire(32)(Chart);\nrequire(35)(Chart);\nrequire(30)(Chart);\nrequire(27)(Chart);\nrequire(36)(Chart);\n\nrequire(37)(Chart);\nrequire(38)(Chart);\nrequire(39)(Chart);\nrequire(40)(Chart);\n\nrequire(45)(Chart);\nrequire(43)(Chart);\nrequire(44)(Chart);\nrequire(46)(Chart);\nrequire(47)(Chart);\nrequire(48)(Chart);\n\n// Controllers must be loaded after elements\n// See Chart.core.datasetController.dataElementType\nrequire(15)(Chart);\nrequire(16)(Chart);\nrequire(17)(Chart);\nrequire(18)(Chart);\nrequire(19)(Chart);\nrequire(20)(Chart);\n\nrequire(8)(Chart);\nrequire(9)(Chart);\nrequire(10)(Chart);\nrequire(11)(Chart);\nrequire(12)(Chart);\nrequire(13)(Chart);\nrequire(14)(Chart);\n\nwindow.Chart = module.exports = Chart;\n\n},{\"10\":10,\"11\":11,\"12\":12,\"13\":13,\"14\":14,\"15\":15,\"16\":16,\"17\":17,\"18\":18,\"19\":19,\"20\":20,\"21\":21,\"22\":22,\"23\":23,\"24\":24,\"25\":25,\"26\":26,\"27\":27,\"28\":28,\"29\":29,\"30\":30,\"31\":31,\"32\":32,\"33\":33,\"34\":34,\"35\":35,\"36\":36,\"37\":37,\"38\":38,\"39\":39,\"40\":40,\"42\":42,\"43\":43,\"44\":44,\"45\":45,\"46\":46,\"47\":47,\"48\":48,\"8\":8,\"9\":9}],8:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tChart.Bar = function(context, config) {\n\t\tconfig.type = 'bar';\n\n\t\treturn new Chart(context, config);\n\t};\n\n};\n\n},{}],9:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tChart.Bubble = function(context, config) {\n\t\tconfig.type = 'bubble';\n\t\treturn new Chart(context, config);\n\t};\n\n};\n\n},{}],10:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tChart.Doughnut = function(context, config) {\n\t\tconfig.type = 'doughnut';\n\n\t\treturn new Chart(context, config);\n\t};\n\n};\n\n},{}],11:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tChart.Line = function(context, config) {\n\t\tconfig.type = 'line';\n\n\t\treturn new Chart(context, config);\n\t};\n\n};\n\n},{}],12:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tChart.PolarArea = function(context, config) {\n\t\tconfig.type = 'polarArea';\n\n\t\treturn new Chart(context, config);\n\t};\n\n};\n\n},{}],13:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tChart.Radar = function(context, config) {\n\t\tconfig.type = 'radar';\n\n\t\treturn new Chart(context, config);\n\t};\n\n};\n\n},{}],14:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar defaultConfig = {\n\t\thover: {\n\t\t\tmode: 'single'\n\t\t},\n\n\t\tscales: {\n\t\t\txAxes: [{\n\t\t\t\ttype: 'linear', // scatter should not use a category axis\n\t\t\t\tposition: 'bottom',\n\t\t\t\tid: 'x-axis-1' // need an ID so datasets can reference the scale\n\t\t\t}],\n\t\t\tyAxes: [{\n\t\t\t\ttype: 'linear',\n\t\t\t\tposition: 'left',\n\t\t\t\tid: 'y-axis-1'\n\t\t\t}]\n\t\t},\n\n\t\ttooltips: {\n\t\t\tcallbacks: {\n\t\t\t\ttitle: function() {\n\t\t\t\t\t// Title doesn't make sense for scatter since we format the data as a point\n\t\t\t\t\treturn '';\n\t\t\t\t},\n\t\t\t\tlabel: function(tooltipItem) {\n\t\t\t\t\treturn '(' + tooltipItem.xLabel + ', ' + tooltipItem.yLabel + ')';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t// Register the default config for this type\n\tChart.defaults.scatter = defaultConfig;\n\n\t// Scatter charts use line controllers\n\tChart.controllers.scatter = Chart.controllers.line;\n\n\tChart.Scatter = function(context, config) {\n\t\tconfig.type = 'scatter';\n\t\treturn new Chart(context, config);\n\t};\n\n};\n\n},{}],15:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.defaults.bar = {\n\t\thover: {\n\t\t\tmode: 'label'\n\t\t},\n\n\t\tscales: {\n\t\t\txAxes: [{\n\t\t\t\ttype: 'category',\n\n\t\t\t\t// Specific to Bar Controller\n\t\t\t\tcategoryPercentage: 0.8,\n\t\t\t\tbarPercentage: 0.9,\n\n\t\t\t\t// grid line settings\n\t\t\t\tgridLines: {\n\t\t\t\t\toffsetGridLines: true\n\t\t\t\t}\n\t\t\t}],\n\t\t\tyAxes: [{\n\t\t\t\ttype: 'linear'\n\t\t\t}]\n\t\t}\n\t};\n\n\tChart.controllers.bar = Chart.DatasetController.extend({\n\n\t\tdataElementType: Chart.elements.Rectangle,\n\n\t\tinitialize: function(chart, datasetIndex) {\n\t\t\tChart.DatasetController.prototype.initialize.call(this, chart, datasetIndex);\n\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar dataset = me.getDataset();\n\n\t\t\tmeta.stack = dataset.stack;\n\t\t\t// Use this to indicate that this is a bar dataset.\n\t\t\tmeta.bar = true;\n\t\t},\n\n\t\t// Correctly calculate the bar width accounting for stacks and the fact that not all bars are visible\n\t\tgetStackCount: function() {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\n\t\t\tvar stacks = [];\n\t\t\thelpers.each(me.chart.data.datasets, function(dataset, datasetIndex) {\n\t\t\t\tvar dsMeta = me.chart.getDatasetMeta(datasetIndex);\n\t\t\t\tif (dsMeta.bar && me.chart.isDatasetVisible(datasetIndex) &&\n\t\t\t\t\t(yScale.options.stacked === false ||\n\t\t\t\t\t(yScale.options.stacked === true && stacks.indexOf(dsMeta.stack) === -1) ||\n\t\t\t\t\t(yScale.options.stacked === undefined && (dsMeta.stack === undefined || stacks.indexOf(dsMeta.stack) === -1)))) {\n\t\t\t\t\tstacks.push(dsMeta.stack);\n\t\t\t\t}\n\t\t\t}, me);\n\n\t\t\treturn stacks.length;\n\t\t},\n\n\t\tupdate: function(reset) {\n\t\t\tvar me = this;\n\t\t\thelpers.each(me.getMeta().data, function(rectangle, index) {\n\t\t\t\tme.updateElement(rectangle, index, reset);\n\t\t\t}, me);\n\t\t},\n\n\t\tupdateElement: function(rectangle, index, reset) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\t\tvar scaleBase = yScale.getBasePixel();\n\t\t\tvar rectangleElementOptions = me.chart.options.elements.rectangle;\n\t\t\tvar custom = rectangle.custom || {};\n\t\t\tvar dataset = me.getDataset();\n\n\t\t\trectangle._xScale = xScale;\n\t\t\trectangle._yScale = yScale;\n\t\t\trectangle._datasetIndex = me.index;\n\t\t\trectangle._index = index;\n\n\t\t\tvar ruler = me.getRuler(index); // The index argument for compatible\n\t\t\trectangle._model = {\n\t\t\t\tx: me.calculateBarX(index, me.index, ruler),\n\t\t\t\ty: reset ? scaleBase : me.calculateBarY(index, me.index),\n\n\t\t\t\t// Tooltip\n\t\t\t\tlabel: me.chart.data.labels[index],\n\t\t\t\tdatasetLabel: dataset.label,\n\n\t\t\t\t// Appearance\n\t\t\t\thorizontal: false,\n\t\t\t\tbase: reset ? scaleBase : me.calculateBarBase(me.index, index),\n\t\t\t\twidth: me.calculateBarWidth(ruler),\n\t\t\t\tbackgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.getValueAtIndexOrDefault(dataset.backgroundColor, index, rectangleElementOptions.backgroundColor),\n\t\t\t\tborderSkipped: custom.borderSkipped ? custom.borderSkipped : rectangleElementOptions.borderSkipped,\n\t\t\t\tborderColor: custom.borderColor ? custom.borderColor : helpers.getValueAtIndexOrDefault(dataset.borderColor, index, rectangleElementOptions.borderColor),\n\t\t\t\tborderWidth: custom.borderWidth ? custom.borderWidth : helpers.getValueAtIndexOrDefault(dataset.borderWidth, index, rectangleElementOptions.borderWidth)\n\t\t\t};\n\n\t\t\trectangle.pivot();\n\t\t},\n\n\t\tcalculateBarBase: function(datasetIndex, index) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\t\tvar base = yScale.getBaseValue();\n\t\t\tvar original = base;\n\n\t\t\tif ((yScale.options.stacked === true) ||\n\t\t\t\t(yScale.options.stacked === undefined && meta.stack !== undefined)) {\n\t\t\t\tvar chart = me.chart;\n\t\t\t\tvar datasets = chart.data.datasets;\n\t\t\t\tvar value = Number(datasets[datasetIndex].data[index]);\n\n\t\t\t\tfor (var i = 0; i < datasetIndex; i++) {\n\t\t\t\t\tvar currentDs = datasets[i];\n\t\t\t\t\tvar currentDsMeta = chart.getDatasetMeta(i);\n\t\t\t\t\tif (currentDsMeta.bar && currentDsMeta.yAxisID === yScale.id && chart.isDatasetVisible(i) &&\n\t\t\t\t\t\tmeta.stack === currentDsMeta.stack) {\n\t\t\t\t\t\tvar currentVal = Number(currentDs.data[index]);\n\t\t\t\t\t\tbase += value < 0 ? Math.min(currentVal, original) : Math.max(currentVal, original);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn yScale.getPixelForValue(base);\n\t\t\t}\n\n\t\t\treturn yScale.getBasePixel();\n\t\t},\n\n\t\tgetRuler: function() {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\t\tvar stackCount = me.getStackCount();\n\n\t\t\tvar tickWidth = xScale.width / xScale.ticks.length;\r\n\t\t\tvar categoryWidth = tickWidth * xScale.options.categoryPercentage;\n\t\t\tvar categorySpacing = (tickWidth - (tickWidth * xScale.options.categoryPercentage)) / 2;\n\t\t\tvar fullBarWidth = categoryWidth / stackCount;\n\n\t\t\tvar barWidth = fullBarWidth * xScale.options.barPercentage;\n\t\t\tvar barSpacing = fullBarWidth - (fullBarWidth * xScale.options.barPercentage);\n\n\t\t\treturn {\n\t\t\t\tstackCount: stackCount,\n\t\t\t\ttickWidth: tickWidth,\n\t\t\t\tcategoryWidth: categoryWidth,\n\t\t\t\tcategorySpacing: categorySpacing,\n\t\t\t\tfullBarWidth: fullBarWidth,\n\t\t\t\tbarWidth: barWidth,\n\t\t\t\tbarSpacing: barSpacing\n\t\t\t};\n\t\t},\n\n\t\tcalculateBarWidth: function(ruler) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\t\tif (xScale.options.barThickness) {\n\t\t\t\treturn xScale.options.barThickness;\n\t\t\t}\n\t\t\treturn ruler.barWidth;\r\n\t\t},\n\n\t\t// Get stack index from the given dataset index accounting for stacks and the fact that not all bars are visible\n\t\tgetStackIndex: function(datasetIndex) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.chart.getDatasetMeta(datasetIndex);\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\t\tvar dsMeta, j;\n\t\t\tvar stacks = [meta.stack];\n\n\t\t\tfor (j = 0; j < datasetIndex; ++j) {\n\t\t\t\tdsMeta = this.chart.getDatasetMeta(j);\n\t\t\t\tif (dsMeta.bar && this.chart.isDatasetVisible(j) &&\n\t\t\t\t\t(yScale.options.stacked === false ||\n\t\t\t\t\t(yScale.options.stacked === true && stacks.indexOf(dsMeta.stack) === -1) ||\n\t\t\t\t\t(yScale.options.stacked === undefined && (dsMeta.stack === undefined || stacks.indexOf(dsMeta.stack) === -1)))) {\n\t\t\t\t\tstacks.push(dsMeta.stack);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn stacks.length - 1;\n\t\t},\n\n\t\tcalculateBarX: function(index, datasetIndex, ruler) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\t\tvar stackIndex = me.getStackIndex(datasetIndex);\n\t\t\tvar leftTick = xScale.getPixelForValue(null, index, datasetIndex, me.chart.isCombo);\n\t\t\tleftTick -= me.chart.isCombo ? (ruler.tickWidth / 2) : 0;\n\n\t\t\treturn leftTick +\n\t\t\t\t(ruler.barWidth / 2) +\n\t\t\t\truler.categorySpacing +\n\t\t\t\t(ruler.barWidth * stackIndex) +\n\t\t\t\t(ruler.barSpacing / 2) +\n\t\t\t\t(ruler.barSpacing * stackIndex);\n\t\t},\n\n\t\tcalculateBarY: function(index, datasetIndex) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\t\tvar value = Number(me.getDataset().data[index]);\n\n\t\t\tif (yScale.options.stacked ||\n\t\t\t\t(yScale.options.stacked === undefined && meta.stack !== undefined)) {\n\t\t\t\tvar base = yScale.getBaseValue();\n\t\t\t\tvar sumPos = base,\n\t\t\t\t\tsumNeg = base;\r\n\n\t\t\t\tfor (var i = 0; i < datasetIndex; i++) {\n\t\t\t\t\tvar ds = me.chart.data.datasets[i];\n\t\t\t\t\tvar dsMeta = me.chart.getDatasetMeta(i);\n\t\t\t\t\tif (dsMeta.bar && dsMeta.yAxisID === yScale.id && me.chart.isDatasetVisible(i) &&\n\t\t\t\t\t\tmeta.stack === dsMeta.stack) {\n\t\t\t\t\t\tvar stackedVal = Number(ds.data[index]);\n\t\t\t\t\t\tif (stackedVal < 0) {\n\t\t\t\t\t\t\tsumNeg += stackedVal || 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsumPos += stackedVal || 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (value < 0) {\n\t\t\t\t\treturn yScale.getPixelForValue(sumNeg + value);\n\t\t\t\t}\n\t\t\t\treturn yScale.getPixelForValue(sumPos + value);\n\t\t\t}\n\n\t\t\treturn yScale.getPixelForValue(value);\n\t\t},\n\n\t\tdraw: function(ease) {\n\t\t\tvar me = this;\n\t\t\tvar easingDecimal = ease || 1;\n\t\t\tvar metaData = me.getMeta().data;\n\t\t\tvar dataset = me.getDataset();\n\t\t\tvar i, len;\n\n\t\t\tChart.canvasHelpers.clipArea(me.chart.chart.ctx, me.chart.chartArea);\n\t\t\tfor (i = 0, len = metaData.length; i < len; ++i) {\n\t\t\t\tvar d = dataset.data[i];\n\t\t\t\tif (d !== null && d !== undefined && !isNaN(d)) {\n\t\t\t\t\tmetaData[i].transition(easingDecimal).draw();\n\t\t\t\t}\n\t\t\t}\n\t\t\tChart.canvasHelpers.unclipArea(me.chart.chart.ctx);\n\t\t},\n\n\t\tsetHoverStyle: function(rectangle) {\n\t\t\tvar dataset = this.chart.data.datasets[rectangle._datasetIndex];\n\t\t\tvar index = rectangle._index;\n\n\t\t\tvar custom = rectangle.custom || {};\n\t\t\tvar model = rectangle._model;\n\t\t\tmodel.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : helpers.getValueAtIndexOrDefault(dataset.hoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));\n\t\t\tmodel.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : helpers.getValueAtIndexOrDefault(dataset.hoverBorderColor, index, helpers.getHoverColor(model.borderColor));\n\t\t\tmodel.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : helpers.getValueAtIndexOrDefault(dataset.hoverBorderWidth, index, model.borderWidth);\n\t\t},\n\n\t\tremoveHoverStyle: function(rectangle) {\n\t\t\tvar dataset = this.chart.data.datasets[rectangle._datasetIndex];\n\t\t\tvar index = rectangle._index;\n\t\t\tvar custom = rectangle.custom || {};\n\t\t\tvar model = rectangle._model;\n\t\t\tvar rectangleElementOptions = this.chart.options.elements.rectangle;\n\n\t\t\tmodel.backgroundColor = custom.backgroundColor ? custom.backgroundColor : helpers.getValueAtIndexOrDefault(dataset.backgroundColor, index, rectangleElementOptions.backgroundColor);\n\t\t\tmodel.borderColor = custom.borderColor ? custom.borderColor : helpers.getValueAtIndexOrDefault(dataset.borderColor, index, rectangleElementOptions.borderColor);\n\t\t\tmodel.borderWidth = custom.borderWidth ? custom.borderWidth : helpers.getValueAtIndexOrDefault(dataset.borderWidth, index, rectangleElementOptions.borderWidth);\n\t\t}\n\n\t});\n\n\n\t// including horizontalBar in the bar file, instead of a file of its own\n\t// it extends bar (like pie extends doughnut)\n\tChart.defaults.horizontalBar = {\n\t\thover: {\n\t\t\tmode: 'label'\n\t\t},\n\n\t\tscales: {\n\t\t\txAxes: [{\n\t\t\t\ttype: 'linear',\n\t\t\t\tposition: 'bottom'\n\t\t\t}],\n\t\t\tyAxes: [{\n\t\t\t\tposition: 'left',\n\t\t\t\ttype: 'category',\n\n\t\t\t\t// Specific to Horizontal Bar Controller\n\t\t\t\tcategoryPercentage: 0.8,\n\t\t\t\tbarPercentage: 0.9,\n\n\t\t\t\t// grid line settings\n\t\t\t\tgridLines: {\n\t\t\t\t\toffsetGridLines: true\n\t\t\t\t}\n\t\t\t}]\n\t\t},\n\t\telements: {\n\t\t\trectangle: {\n\t\t\t\tborderSkipped: 'left'\n\t\t\t}\n\t\t},\n\t\ttooltips: {\n\t\t\tcallbacks: {\n\t\t\t\ttitle: function(tooltipItems, data) {\n\t\t\t\t\t// Pick first xLabel for now\n\t\t\t\t\tvar title = '';\n\n\t\t\t\t\tif (tooltipItems.length > 0) {\n\t\t\t\t\t\tif (tooltipItems[0].yLabel) {\n\t\t\t\t\t\t\ttitle = tooltipItems[0].yLabel;\n\t\t\t\t\t\t} else if (data.labels.length > 0 && tooltipItems[0].index < data.labels.length) {\n\t\t\t\t\t\t\ttitle = data.labels[tooltipItems[0].index];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn title;\n\t\t\t\t},\n\t\t\t\tlabel: function(tooltipItem, data) {\n\t\t\t\t\tvar datasetLabel = data.datasets[tooltipItem.datasetIndex].label || '';\n\t\t\t\t\treturn datasetLabel + ': ' + tooltipItem.xLabel;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tChart.controllers.horizontalBar = Chart.controllers.bar.extend({\n\n\t\t// Correctly calculate the bar width accounting for stacks and the fact that not all bars are visible\n\t\tgetStackCount: function() {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\n\t\t\tvar stacks = [];\n\t\t\thelpers.each(me.chart.data.datasets, function(dataset, datasetIndex) {\n\t\t\t\tvar dsMeta = me.chart.getDatasetMeta(datasetIndex);\n\t\t\t\tif (dsMeta.bar && me.chart.isDatasetVisible(datasetIndex) &&\n\t\t\t\t\t(xScale.options.stacked === false ||\n\t\t\t\t\t(xScale.options.stacked === true && stacks.indexOf(dsMeta.stack) === -1) ||\n\t\t\t\t\t(xScale.options.stacked === undefined && (dsMeta.stack === undefined || stacks.indexOf(dsMeta.stack) === -1)))) {\n\t\t\t\t\tstacks.push(dsMeta.stack);\n\t\t\t\t}\n\t\t\t}, me);\n\n\t\t\treturn stacks.length;\n\t\t},\n\n\t\tupdateElement: function(rectangle, index, reset) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\t\tvar scaleBase = xScale.getBasePixel();\n\t\t\tvar custom = rectangle.custom || {};\n\t\t\tvar dataset = me.getDataset();\n\t\t\tvar rectangleElementOptions = me.chart.options.elements.rectangle;\n\n\t\t\trectangle._xScale = xScale;\n\t\t\trectangle._yScale = yScale;\n\t\t\trectangle._datasetIndex = me.index;\n\t\t\trectangle._index = index;\n\n\t\t\tvar ruler = me.getRuler(index); // The index argument for compatible\n\t\t\trectangle._model = {\n\t\t\t\tx: reset ? scaleBase : me.calculateBarX(index, me.index),\n\t\t\t\ty: me.calculateBarY(index, me.index, ruler),\n\n\t\t\t\t// Tooltip\n\t\t\t\tlabel: me.chart.data.labels[index],\n\t\t\t\tdatasetLabel: dataset.label,\n\n\t\t\t\t// Appearance\n\t\t\t\thorizontal: true,\n\t\t\t\tbase: reset ? scaleBase : me.calculateBarBase(me.index, index),\n\t\t\t\theight: me.calculateBarHeight(ruler),\n\t\t\t\tbackgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.getValueAtIndexOrDefault(dataset.backgroundColor, index, rectangleElementOptions.backgroundColor),\n\t\t\t\tborderSkipped: custom.borderSkipped ? custom.borderSkipped : rectangleElementOptions.borderSkipped,\n\t\t\t\tborderColor: custom.borderColor ? custom.borderColor : helpers.getValueAtIndexOrDefault(dataset.borderColor, index, rectangleElementOptions.borderColor),\n\t\t\t\tborderWidth: custom.borderWidth ? custom.borderWidth : helpers.getValueAtIndexOrDefault(dataset.borderWidth, index, rectangleElementOptions.borderWidth)\n\t\t\t};\n\n\t\t\trectangle.pivot();\n\t\t},\n\n\t\tcalculateBarBase: function(datasetIndex, index) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\t\tvar base = xScale.getBaseValue();\n\t\t\tvar originalBase = base;\n\n\t\t\tif (xScale.options.stacked ||\n\t\t\t\t(xScale.options.stacked === undefined && meta.stack !== undefined)) {\n\t\t\t\tvar chart = me.chart;\n\t\t\t\tvar datasets = chart.data.datasets;\n\t\t\t\tvar value = Number(datasets[datasetIndex].data[index]);\n\n\t\t\t\tfor (var i = 0; i < datasetIndex; i++) {\n\t\t\t\t\tvar currentDs = datasets[i];\n\t\t\t\t\tvar currentDsMeta = chart.getDatasetMeta(i);\n\t\t\t\t\tif (currentDsMeta.bar && currentDsMeta.xAxisID === xScale.id && chart.isDatasetVisible(i) &&\n\t\t\t\t\t\tmeta.stack === currentDsMeta.stack) {\n\t\t\t\t\t\tvar currentVal = Number(currentDs.data[index]);\n\t\t\t\t\t\tbase += value < 0 ? Math.min(currentVal, originalBase) : Math.max(currentVal, originalBase);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn xScale.getPixelForValue(base);\n\t\t\t}\n\n\t\t\treturn xScale.getBasePixel();\n\t\t},\n\n\t\tgetRuler: function() {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\t\tvar stackCount = me.getStackCount();\n\n\t\t\tvar tickHeight = yScale.height / yScale.ticks.length;\n\t\t\tvar categoryHeight = tickHeight * yScale.options.categoryPercentage;\n\t\t\tvar categorySpacing = (tickHeight - (tickHeight * yScale.options.categoryPercentage)) / 2;\n\t\t\tvar fullBarHeight = categoryHeight / stackCount;\n\n\t\t\tvar barHeight = fullBarHeight * yScale.options.barPercentage;\n\t\t\tvar barSpacing = fullBarHeight - (fullBarHeight * yScale.options.barPercentage);\n\n\t\t\treturn {\n\t\t\t\tstackCount: stackCount,\n\t\t\t\ttickHeight: tickHeight,\n\t\t\t\tcategoryHeight: categoryHeight,\n\t\t\t\tcategorySpacing: categorySpacing,\n\t\t\t\tfullBarHeight: fullBarHeight,\n\t\t\t\tbarHeight: barHeight,\n\t\t\t\tbarSpacing: barSpacing\n\t\t\t};\n\t\t},\n\n\t\tcalculateBarHeight: function(ruler) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\t\tif (yScale.options.barThickness) {\n\t\t\t\treturn yScale.options.barThickness;\n\t\t\t}\n\t\t\treturn ruler.barHeight;\n\t\t},\n\n\t\t// Get stack index from the given dataset index accounting for stacks and the fact that not all bars are visible\n\t\tgetStackIndex: function(datasetIndex) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.chart.getDatasetMeta(datasetIndex);\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\t\tvar dsMeta, j;\n\t\t\tvar stacks = [meta.stack];\n\n\t\t\tfor (j = 0; j < datasetIndex; ++j) {\n\t\t\t\tdsMeta = this.chart.getDatasetMeta(j);\n\t\t\t\tif (dsMeta.bar && this.chart.isDatasetVisible(j) &&\n\t\t\t\t\t(xScale.options.stacked === false ||\n\t\t\t\t\t(xScale.options.stacked === true && stacks.indexOf(dsMeta.stack) === -1) ||\n\t\t\t\t\t(xScale.options.stacked === undefined && (dsMeta.stack === undefined || stacks.indexOf(dsMeta.stack) === -1)))) {\n\t\t\t\t\tstacks.push(dsMeta.stack);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn stacks.length - 1;\r\n\t\t},\n\n\t\tcalculateBarX: function(index, datasetIndex) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\t\tvar value = Number(me.getDataset().data[index]);\n\n\t\t\tif (xScale.options.stacked ||\n\t\t\t\t(xScale.options.stacked === undefined && meta.stack !== undefined)) {\n\t\t\t\tvar base = xScale.getBaseValue();\n\t\t\t\tvar sumPos = base,\n\t\t\t\t\tsumNeg = base;\r\n\n\t\t\t\tfor (var i = 0; i < datasetIndex; i++) {\n\t\t\t\t\tvar ds = me.chart.data.datasets[i];\n\t\t\t\t\tvar dsMeta = me.chart.getDatasetMeta(i);\n\t\t\t\t\tif (dsMeta.bar && dsMeta.xAxisID === xScale.id && me.chart.isDatasetVisible(i) &&\n\t\t\t\t\t\tmeta.stack === dsMeta.stack) {\n\t\t\t\t\t\tvar stackedVal = Number(ds.data[index]);\n\t\t\t\t\t\tif (stackedVal < 0) {\n\t\t\t\t\t\t\tsumNeg += stackedVal || 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsumPos += stackedVal || 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (value < 0) {\n\t\t\t\t\treturn xScale.getPixelForValue(sumNeg + value);\n\t\t\t\t}\n\t\t\t\treturn xScale.getPixelForValue(sumPos + value);\n\t\t\t}\n\n\t\t\treturn xScale.getPixelForValue(value);\n\t\t},\n\n\t\tcalculateBarY: function(index, datasetIndex, ruler) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\t\tvar stackIndex = me.getStackIndex(datasetIndex);\n\t\t\tvar topTick = yScale.getPixelForValue(null, index, datasetIndex, me.chart.isCombo);\n\t\t\ttopTick -= me.chart.isCombo ? (ruler.tickHeight / 2) : 0;\n\n\t\t\treturn topTick +\n\t\t\t\t(ruler.barHeight / 2) +\n\t\t\t\truler.categorySpacing +\n\t\t\t\t(ruler.barHeight * stackIndex) +\n\t\t\t\t(ruler.barSpacing / 2) +\n\t\t\t\t(ruler.barSpacing * stackIndex);\n\t\t}\n\t});\n};\n\n},{}],16:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.defaults.bubble = {\n\t\thover: {\n\t\t\tmode: 'single'\n\t\t},\n\n\t\tscales: {\n\t\t\txAxes: [{\n\t\t\t\ttype: 'linear', // bubble should probably use a linear scale by default\n\t\t\t\tposition: 'bottom',\n\t\t\t\tid: 'x-axis-0' // need an ID so datasets can reference the scale\n\t\t\t}],\n\t\t\tyAxes: [{\n\t\t\t\ttype: 'linear',\n\t\t\t\tposition: 'left',\n\t\t\t\tid: 'y-axis-0'\n\t\t\t}]\n\t\t},\n\n\t\ttooltips: {\n\t\t\tcallbacks: {\n\t\t\t\ttitle: function() {\n\t\t\t\t\t// Title doesn't make sense for scatter since we format the data as a point\n\t\t\t\t\treturn '';\n\t\t\t\t},\n\t\t\t\tlabel: function(tooltipItem, data) {\n\t\t\t\t\tvar datasetLabel = data.datasets[tooltipItem.datasetIndex].label || '';\n\t\t\t\t\tvar dataPoint = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\n\t\t\t\t\treturn datasetLabel + ': (' + tooltipItem.xLabel + ', ' + tooltipItem.yLabel + ', ' + dataPoint.r + ')';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tChart.controllers.bubble = Chart.DatasetController.extend({\n\n\t\tdataElementType: Chart.elements.Point,\n\n\t\tupdate: function(reset) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar points = meta.data;\n\n\t\t\t// Update Points\n\t\t\thelpers.each(points, function(point, index) {\n\t\t\t\tme.updateElement(point, index, reset);\n\t\t\t});\n\t\t},\n\n\t\tupdateElement: function(point, index, reset) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\n\t\t\tvar custom = point.custom || {};\n\t\t\tvar dataset = me.getDataset();\n\t\t\tvar data = dataset.data[index];\n\t\t\tvar pointElementOptions = me.chart.options.elements.point;\n\t\t\tvar dsIndex = me.index;\n\n\t\t\thelpers.extend(point, {\n\t\t\t\t// Utility\n\t\t\t\t_xScale: xScale,\n\t\t\t\t_yScale: yScale,\n\t\t\t\t_datasetIndex: dsIndex,\n\t\t\t\t_index: index,\n\n\t\t\t\t// Desired view properties\n\t\t\t\t_model: {\n\t\t\t\t\tx: reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex, me.chart.isCombo),\n\t\t\t\t\ty: reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex),\n\t\t\t\t\t// Appearance\n\t\t\t\t\tradius: reset ? 0 : custom.radius ? custom.radius : me.getRadius(data),\n\n\t\t\t\t\t// Tooltip\n\t\t\t\t\thitRadius: custom.hitRadius ? custom.hitRadius : helpers.getValueAtIndexOrDefault(dataset.hitRadius, index, pointElementOptions.hitRadius)\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Trick to reset the styles of the point\n\t\t\tChart.DatasetController.prototype.removeHoverStyle.call(me, point, pointElementOptions);\n\n\t\t\tvar model = point._model;\n\t\t\tmodel.skip = custom.skip ? custom.skip : (isNaN(model.x) || isNaN(model.y));\n\n\t\t\tpoint.pivot();\n\t\t},\n\n\t\tgetRadius: function(value) {\n\t\t\treturn value.r || this.chart.options.elements.point.radius;\n\t\t},\n\n\t\tsetHoverStyle: function(point) {\n\t\t\tvar me = this;\n\t\t\tChart.DatasetController.prototype.setHoverStyle.call(me, point);\n\n\t\t\t// Radius\n\t\t\tvar dataset = me.chart.data.datasets[point._datasetIndex];\n\t\t\tvar index = point._index;\n\t\t\tvar custom = point.custom || {};\n\t\t\tvar model = point._model;\n\t\t\tmodel.radius = custom.hoverRadius ? custom.hoverRadius : (helpers.getValueAtIndexOrDefault(dataset.hoverRadius, index, me.chart.options.elements.point.hoverRadius)) + me.getRadius(dataset.data[index]);\n\t\t},\n\n\t\tremoveHoverStyle: function(point) {\n\t\t\tvar me = this;\n\t\t\tChart.DatasetController.prototype.removeHoverStyle.call(me, point, me.chart.options.elements.point);\n\n\t\t\tvar dataVal = me.chart.data.datasets[point._datasetIndex].data[point._index];\n\t\t\tvar custom = point.custom || {};\n\t\t\tvar model = point._model;\n\n\t\t\tmodel.radius = custom.radius ? custom.radius : me.getRadius(dataVal);\n\t\t}\n\t});\n};\n\n},{}],17:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers,\n\t\tdefaults = Chart.defaults;\n\n\tdefaults.doughnut = {\n\t\tanimation: {\n\t\t\t// Boolean - Whether we animate the rotation of the Doughnut\n\t\t\tanimateRotate: true,\n\t\t\t// Boolean - Whether we animate scaling the Doughnut from the centre\n\t\t\tanimateScale: false\n\t\t},\n\t\taspectRatio: 1,\n\t\thover: {\n\t\t\tmode: 'single'\n\t\t},\n\t\tlegendCallback: function(chart) {\n\t\t\tvar text = [];\n\t\t\ttext.push('<ul class=\"' + chart.id + '-legend\">');\n\n\t\t\tvar data = chart.data;\n\t\t\tvar datasets = data.datasets;\n\t\t\tvar labels = data.labels;\n\n\t\t\tif (datasets.length) {\n\t\t\t\tfor (var i = 0; i < datasets[0].data.length; ++i) {\n\t\t\t\t\ttext.push('<li><span style=\"background-color:' + datasets[0].backgroundColor[i] + '\"></span>');\n\t\t\t\t\tif (labels[i]) {\n\t\t\t\t\t\ttext.push(labels[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttext.push('</li>');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttext.push('</ul>');\n\t\t\treturn text.join('');\n\t\t},\n\t\tlegend: {\n\t\t\tlabels: {\n\t\t\t\tgenerateLabels: function(chart) {\n\t\t\t\t\tvar data = chart.data;\n\t\t\t\t\tif (data.labels.length && data.datasets.length) {\n\t\t\t\t\t\treturn data.labels.map(function(label, i) {\n\t\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\n\t\t\t\t\t\t\tvar ds = data.datasets[0];\n\t\t\t\t\t\t\tvar arc = meta.data[i];\n\t\t\t\t\t\t\tvar custom = arc && arc.custom || {};\n\t\t\t\t\t\t\tvar getValueAtIndexOrDefault = helpers.getValueAtIndexOrDefault;\n\t\t\t\t\t\t\tvar arcOpts = chart.options.elements.arc;\n\t\t\t\t\t\t\tvar fill = custom.backgroundColor ? custom.backgroundColor : getValueAtIndexOrDefault(ds.backgroundColor, i, arcOpts.backgroundColor);\n\t\t\t\t\t\t\tvar stroke = custom.borderColor ? custom.borderColor : getValueAtIndexOrDefault(ds.borderColor, i, arcOpts.borderColor);\n\t\t\t\t\t\t\tvar bw = custom.borderWidth ? custom.borderWidth : getValueAtIndexOrDefault(ds.borderWidth, i, arcOpts.borderWidth);\n\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: label,\n\t\t\t\t\t\t\t\tfillStyle: fill,\n\t\t\t\t\t\t\t\tstrokeStyle: stroke,\n\t\t\t\t\t\t\t\tlineWidth: bw,\n\t\t\t\t\t\t\t\thidden: isNaN(ds.data[i]) || meta.data[i].hidden,\n\n\t\t\t\t\t\t\t\t// Extra data used for toggling the correct item\n\t\t\t\t\t\t\t\tindex: i\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\treturn [];\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tonClick: function(e, legendItem) {\n\t\t\t\tvar index = legendItem.index;\n\t\t\t\tvar chart = this.chart;\n\t\t\t\tvar i, ilen, meta;\n\n\t\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\n\t\t\t\t\tmeta = chart.getDatasetMeta(i);\n\t\t\t\t\t// toggle visibility of index if exists\n\t\t\t\t\tif (meta.data[index]) {\n\t\t\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tchart.update();\n\t\t\t}\n\t\t},\n\n\t\t// The percentage of the chart that we cut out of the middle.\n\t\tcutoutPercentage: 50,\n\n\t\t// The rotation of the chart, where the first data arc begins.\n\t\trotation: Math.PI * -0.5,\n\n\t\t// The total circumference of the chart.\n\t\tcircumference: Math.PI * 2.0,\n\n\t\t// Need to override these to give a nice default\n\t\ttooltips: {\n\t\t\tcallbacks: {\n\t\t\t\ttitle: function() {\n\t\t\t\t\treturn '';\n\t\t\t\t},\n\t\t\t\tlabel: function(tooltipItem, data) {\n\t\t\t\t\tvar dataLabel = data.labels[tooltipItem.index];\n\t\t\t\t\tvar value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\n\n\t\t\t\t\tif (helpers.isArray(dataLabel)) {\n\t\t\t\t\t\t// show value on first line of multiline label\n\t\t\t\t\t\t// need to clone because we are changing the value\n\t\t\t\t\t\tdataLabel = dataLabel.slice();\n\t\t\t\t\t\tdataLabel[0] += value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdataLabel += value;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn dataLabel;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tdefaults.pie = helpers.clone(defaults.doughnut);\n\thelpers.extend(defaults.pie, {\n\t\tcutoutPercentage: 0\n\t});\n\n\n\tChart.controllers.doughnut = Chart.controllers.pie = Chart.DatasetController.extend({\n\n\t\tdataElementType: Chart.elements.Arc,\n\n\t\tlinkScales: helpers.noop,\n\n\t\t// Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly\n\t\tgetRingIndex: function(datasetIndex) {\n\t\t\tvar ringIndex = 0;\n\n\t\t\tfor (var j = 0; j < datasetIndex; ++j) {\n\t\t\t\tif (this.chart.isDatasetVisible(j)) {\n\t\t\t\t\t++ringIndex;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn ringIndex;\n\t\t},\n\n\t\tupdate: function(reset) {\n\t\t\tvar me = this;\n\t\t\tvar chart = me.chart,\n\t\t\t\tchartArea = chart.chartArea,\n\t\t\t\topts = chart.options,\n\t\t\t\tarcOpts = opts.elements.arc,\n\t\t\t\tavailableWidth = chartArea.right - chartArea.left - arcOpts.borderWidth,\n\t\t\t\tavailableHeight = chartArea.bottom - chartArea.top - arcOpts.borderWidth,\n\t\t\t\tminSize = Math.min(availableWidth, availableHeight),\n\t\t\t\toffset = {\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty: 0\n\t\t\t\t},\n\t\t\t\tmeta = me.getMeta(),\n\t\t\t\tcutoutPercentage = opts.cutoutPercentage,\n\t\t\t\tcircumference = opts.circumference;\n\n\t\t\t// If the chart's circumference isn't a full circle, calculate minSize as a ratio of the width/height of the arc\n\t\t\tif (circumference < Math.PI * 2.0) {\n\t\t\t\tvar startAngle = opts.rotation % (Math.PI * 2.0);\n\t\t\t\tstartAngle += Math.PI * 2.0 * (startAngle >= Math.PI ? -1 : startAngle < -Math.PI ? 1 : 0);\n\t\t\t\tvar endAngle = startAngle + circumference;\n\t\t\t\tvar start = {x: Math.cos(startAngle), y: Math.sin(startAngle)};\n\t\t\t\tvar end = {x: Math.cos(endAngle), y: Math.sin(endAngle)};\n\t\t\t\tvar contains0 = (startAngle <= 0 && 0 <= endAngle) || (startAngle <= Math.PI * 2.0 && Math.PI * 2.0 <= endAngle);\n\t\t\t\tvar contains90 = (startAngle <= Math.PI * 0.5 && Math.PI * 0.5 <= endAngle) || (startAngle <= Math.PI * 2.5 && Math.PI * 2.5 <= endAngle);\n\t\t\t\tvar contains180 = (startAngle <= -Math.PI && -Math.PI <= endAngle) || (startAngle <= Math.PI && Math.PI <= endAngle);\n\t\t\t\tvar contains270 = (startAngle <= -Math.PI * 0.5 && -Math.PI * 0.5 <= endAngle) || (startAngle <= Math.PI * 1.5 && Math.PI * 1.5 <= endAngle);\n\t\t\t\tvar cutout = cutoutPercentage / 100.0;\n\t\t\t\tvar min = {x: contains180 ? -1 : Math.min(start.x * (start.x < 0 ? 1 : cutout), end.x * (end.x < 0 ? 1 : cutout)), y: contains270 ? -1 : Math.min(start.y * (start.y < 0 ? 1 : cutout), end.y * (end.y < 0 ? 1 : cutout))};\n\t\t\t\tvar max = {x: contains0 ? 1 : Math.max(start.x * (start.x > 0 ? 1 : cutout), end.x * (end.x > 0 ? 1 : cutout)), y: contains90 ? 1 : Math.max(start.y * (start.y > 0 ? 1 : cutout), end.y * (end.y > 0 ? 1 : cutout))};\n\t\t\t\tvar size = {width: (max.x - min.x) * 0.5, height: (max.y - min.y) * 0.5};\n\t\t\t\tminSize = Math.min(availableWidth / size.width, availableHeight / size.height);\n\t\t\t\toffset = {x: (max.x + min.x) * -0.5, y: (max.y + min.y) * -0.5};\n\t\t\t}\n\n\t\t\tchart.borderWidth = me.getMaxBorderWidth(meta.data);\n\t\t\tchart.outerRadius = Math.max((minSize - chart.borderWidth) / 2, 0);\n\t\t\tchart.innerRadius = Math.max(cutoutPercentage ? (chart.outerRadius / 100) * (cutoutPercentage) : 0, 0);\n\t\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();\n\t\t\tchart.offsetX = offset.x * chart.outerRadius;\n\t\t\tchart.offsetY = offset.y * chart.outerRadius;\n\n\t\t\tmeta.total = me.calculateTotal();\n\n\t\t\tme.outerRadius = chart.outerRadius - (chart.radiusLength * me.getRingIndex(me.index));\n\t\t\tme.innerRadius = Math.max(me.outerRadius - chart.radiusLength, 0);\n\n\t\t\thelpers.each(meta.data, function(arc, index) {\n\t\t\t\tme.updateElement(arc, index, reset);\n\t\t\t});\n\t\t},\n\n\t\tupdateElement: function(arc, index, reset) {\n\t\t\tvar me = this;\n\t\t\tvar chart = me.chart,\n\t\t\t\tchartArea = chart.chartArea,\n\t\t\t\topts = chart.options,\n\t\t\t\tanimationOpts = opts.animation,\n\t\t\t\tcenterX = (chartArea.left + chartArea.right) / 2,\n\t\t\t\tcenterY = (chartArea.top + chartArea.bottom) / 2,\n\t\t\t\tstartAngle = opts.rotation, // non reset case handled later\n\t\t\t\tendAngle = opts.rotation, // non reset case handled later\n\t\t\t\tdataset = me.getDataset(),\n\t\t\t\tcircumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / (2.0 * Math.PI)),\n\t\t\t\tinnerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius,\n\t\t\t\touterRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius,\n\t\t\t\tvalueAtIndexOrDefault = helpers.getValueAtIndexOrDefault;\n\n\t\t\thelpers.extend(arc, {\n\t\t\t\t// Utility\n\t\t\t\t_datasetIndex: me.index,\n\t\t\t\t_index: index,\n\n\t\t\t\t// Desired view properties\n\t\t\t\t_model: {\n\t\t\t\t\tx: centerX + chart.offsetX,\n\t\t\t\t\ty: centerY + chart.offsetY,\n\t\t\t\t\tstartAngle: startAngle,\n\t\t\t\t\tendAngle: endAngle,\n\t\t\t\t\tcircumference: circumference,\n\t\t\t\t\touterRadius: outerRadius,\n\t\t\t\t\tinnerRadius: innerRadius,\n\t\t\t\t\tlabel: valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index])\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar model = arc._model;\n\t\t\t// Resets the visual styles\n\t\t\tthis.removeHoverStyle(arc);\n\n\t\t\t// Set correct angles if not resetting\n\t\t\tif (!reset || !animationOpts.animateRotate) {\n\t\t\t\tif (index === 0) {\n\t\t\t\t\tmodel.startAngle = opts.rotation;\n\t\t\t\t} else {\n\t\t\t\t\tmodel.startAngle = me.getMeta().data[index - 1]._model.endAngle;\n\t\t\t\t}\n\n\t\t\t\tmodel.endAngle = model.startAngle + model.circumference;\n\t\t\t}\n\n\t\t\tarc.pivot();\n\t\t},\n\n\t\tremoveHoverStyle: function(arc) {\n\t\t\tChart.DatasetController.prototype.removeHoverStyle.call(this, arc, this.chart.options.elements.arc);\n\t\t},\n\n\t\tcalculateTotal: function() {\n\t\t\tvar dataset = this.getDataset();\n\t\t\tvar meta = this.getMeta();\n\t\t\tvar total = 0;\n\t\t\tvar value;\n\n\t\t\thelpers.each(meta.data, function(element, index) {\n\t\t\t\tvalue = dataset.data[index];\n\t\t\t\tif (!isNaN(value) && !element.hidden) {\n\t\t\t\t\ttotal += Math.abs(value);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t/* if (total === 0) {\n\t\t\t\ttotal = NaN;\n\t\t\t}*/\n\n\t\t\treturn total;\n\t\t},\n\n\t\tcalculateCircumference: function(value) {\n\t\t\tvar total = this.getMeta().total;\n\t\t\tif (total > 0 && !isNaN(value)) {\n\t\t\t\treturn (Math.PI * 2.0) * (value / total);\n\t\t\t}\n\t\t\treturn 0;\n\t\t},\n\n\t\t// gets the max border or hover width to properly scale pie charts\n\t\tgetMaxBorderWidth: function(elements) {\n\t\t\tvar max = 0,\n\t\t\t\tindex = this.index,\n\t\t\t\tlength = elements.length,\n\t\t\t\tborderWidth,\n\t\t\t\thoverWidth;\n\n\t\t\tfor (var i = 0; i < length; i++) {\n\t\t\t\tborderWidth = elements[i]._model ? elements[i]._model.borderWidth : 0;\n\t\t\t\thoverWidth = elements[i]._chart ? elements[i]._chart.config.data.datasets[index].hoverBorderWidth : 0;\n\n\t\t\t\tmax = borderWidth > max ? borderWidth : max;\n\t\t\t\tmax = hoverWidth > max ? hoverWidth : max;\n\t\t\t}\n\t\t\treturn max;\n\t\t}\n\t});\n};\n\n},{}],18:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.defaults.line = {\n\t\tshowLines: true,\n\t\tspanGaps: false,\n\n\t\thover: {\n\t\t\tmode: 'label'\n\t\t},\n\n\t\tscales: {\n\t\t\txAxes: [{\n\t\t\t\ttype: 'category',\n\t\t\t\tid: 'x-axis-0'\n\t\t\t}],\n\t\t\tyAxes: [{\n\t\t\t\ttype: 'linear',\n\t\t\t\tid: 'y-axis-0'\n\t\t\t}]\n\t\t}\n\t};\n\n\tfunction lineEnabled(dataset, options) {\n\t\treturn helpers.getValueOrDefault(dataset.showLine, options.showLines);\n\t}\n\n\tChart.controllers.line = Chart.DatasetController.extend({\n\n\t\tdatasetElementType: Chart.elements.Line,\n\n\t\tdataElementType: Chart.elements.Point,\n\n\t\tupdate: function(reset) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar line = meta.dataset;\n\t\t\tvar points = meta.data || [];\n\t\t\tvar options = me.chart.options;\n\t\t\tvar lineElementOptions = options.elements.line;\n\t\t\tvar scale = me.getScaleForId(meta.yAxisID);\n\t\t\tvar i, ilen, custom;\n\t\t\tvar dataset = me.getDataset();\n\t\t\tvar showLine = lineEnabled(dataset, options);\n\n\t\t\t// Update Line\n\t\t\tif (showLine) {\n\t\t\t\tcustom = line.custom || {};\n\n\t\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\n\t\t\t\tif ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {\n\t\t\t\t\tdataset.lineTension = dataset.tension;\n\t\t\t\t}\n\n\t\t\t\t// Utility\n\t\t\t\tline._scale = scale;\n\t\t\t\tline._datasetIndex = me.index;\n\t\t\t\t// Data\n\t\t\t\tline._children = points;\n\t\t\t\t// Model\n\t\t\t\tline._model = {\n\t\t\t\t\t// Appearance\n\t\t\t\t\t// The default behavior of lines is to break at null values, according\n\t\t\t\t\t// to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158\n\t\t\t\t\t// This option gives lines the ability to span gaps\n\t\t\t\t\tspanGaps: dataset.spanGaps ? dataset.spanGaps : options.spanGaps,\n\t\t\t\t\ttension: custom.tension ? custom.tension : helpers.getValueOrDefault(dataset.lineTension, lineElementOptions.tension),\n\t\t\t\t\tbackgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor),\n\t\t\t\t\tborderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth),\n\t\t\t\t\tborderColor: custom.borderColor ? custom.borderColor : (dataset.borderColor || lineElementOptions.borderColor),\n\t\t\t\t\tborderCapStyle: custom.borderCapStyle ? custom.borderCapStyle : (dataset.borderCapStyle || lineElementOptions.borderCapStyle),\n\t\t\t\t\tborderDash: custom.borderDash ? custom.borderDash : (dataset.borderDash || lineElementOptions.borderDash),\n\t\t\t\t\tborderDashOffset: custom.borderDashOffset ? custom.borderDashOffset : (dataset.borderDashOffset || lineElementOptions.borderDashOffset),\n\t\t\t\t\tborderJoinStyle: custom.borderJoinStyle ? custom.borderJoinStyle : (dataset.borderJoinStyle || lineElementOptions.borderJoinStyle),\n\t\t\t\t\tfill: custom.fill ? custom.fill : (dataset.fill !== undefined ? dataset.fill : lineElementOptions.fill),\n\t\t\t\t\tsteppedLine: custom.steppedLine ? custom.steppedLine : helpers.getValueOrDefault(dataset.steppedLine, lineElementOptions.stepped),\n\t\t\t\t\tcubicInterpolationMode: custom.cubicInterpolationMode ? custom.cubicInterpolationMode : helpers.getValueOrDefault(dataset.cubicInterpolationMode, lineElementOptions.cubicInterpolationMode),\n\t\t\t\t\t// Scale\n\t\t\t\t\tscaleTop: scale.top,\n\t\t\t\t\tscaleBottom: scale.bottom,\n\t\t\t\t\tscaleZero: scale.getBasePixel()\n\t\t\t\t};\n\n\t\t\t\tline.pivot();\n\t\t\t}\n\n\t\t\t// Update Points\n\t\t\tfor (i=0, ilen=points.length; i<ilen; ++i) {\n\t\t\t\tme.updateElement(points[i], i, reset);\n\t\t\t}\n\n\t\t\tif (showLine && line._model.tension !== 0) {\n\t\t\t\tme.updateBezierControlPoints();\n\t\t\t}\n\n\t\t\t// Now pivot the point for animation\n\t\t\tfor (i=0, ilen=points.length; i<ilen; ++i) {\n\t\t\t\tpoints[i].pivot();\n\t\t\t}\n\t\t},\n\n\t\tgetPointBackgroundColor: function(point, index) {\n\t\t\tvar backgroundColor = this.chart.options.elements.point.backgroundColor;\n\t\t\tvar dataset = this.getDataset();\n\t\t\tvar custom = point.custom || {};\n\n\t\t\tif (custom.backgroundColor) {\n\t\t\t\tbackgroundColor = custom.backgroundColor;\n\t\t\t} else if (dataset.pointBackgroundColor) {\n\t\t\t\tbackgroundColor = helpers.getValueAtIndexOrDefault(dataset.pointBackgroundColor, index, backgroundColor);\n\t\t\t} else if (dataset.backgroundColor) {\n\t\t\t\tbackgroundColor = dataset.backgroundColor;\n\t\t\t}\n\n\t\t\treturn backgroundColor;\n\t\t},\n\n\t\tgetPointBorderColor: function(point, index) {\n\t\t\tvar borderColor = this.chart.options.elements.point.borderColor;\n\t\t\tvar dataset = this.getDataset();\n\t\t\tvar custom = point.custom || {};\n\n\t\t\tif (custom.borderColor) {\n\t\t\t\tborderColor = custom.borderColor;\n\t\t\t} else if (dataset.pointBorderColor) {\n\t\t\t\tborderColor = helpers.getValueAtIndexOrDefault(dataset.pointBorderColor, index, borderColor);\n\t\t\t} else if (dataset.borderColor) {\n\t\t\t\tborderColor = dataset.borderColor;\n\t\t\t}\n\n\t\t\treturn borderColor;\n\t\t},\n\n\t\tgetPointBorderWidth: function(point, index) {\n\t\t\tvar borderWidth = this.chart.options.elements.point.borderWidth;\n\t\t\tvar dataset = this.getDataset();\n\t\t\tvar custom = point.custom || {};\n\n\t\t\tif (!isNaN(custom.borderWidth)) {\n\t\t\t\tborderWidth = custom.borderWidth;\n\t\t\t} else if (!isNaN(dataset.pointBorderWidth)) {\n\t\t\t\tborderWidth = helpers.getValueAtIndexOrDefault(dataset.pointBorderWidth, index, borderWidth);\n\t\t\t} else if (!isNaN(dataset.borderWidth)) {\n\t\t\t\tborderWidth = dataset.borderWidth;\n\t\t\t}\n\n\t\t\treturn borderWidth;\n\t\t},\n\n\t\tupdateElement: function(point, index, reset) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar custom = point.custom || {};\n\t\t\tvar dataset = me.getDataset();\n\t\t\tvar datasetIndex = me.index;\n\t\t\tvar value = dataset.data[index];\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\t\tvar xScale = me.getScaleForId(meta.xAxisID);\n\t\t\tvar pointOptions = me.chart.options.elements.point;\n\t\t\tvar x, y;\n\t\t\tvar labels = me.chart.data.labels || [];\n\t\t\tvar includeOffset = (labels.length === 1 || dataset.data.length === 1) || me.chart.isCombo;\n\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\n\t\t\tif ((dataset.radius !== undefined) && (dataset.pointRadius === undefined)) {\n\t\t\t\tdataset.pointRadius = dataset.radius;\n\t\t\t}\n\t\t\tif ((dataset.hitRadius !== undefined) && (dataset.pointHitRadius === undefined)) {\n\t\t\t\tdataset.pointHitRadius = dataset.hitRadius;\n\t\t\t}\n\n\t\t\tx = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex, includeOffset);\n\t\t\ty = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex);\n\n\t\t\t// Utility\n\t\t\tpoint._xScale = xScale;\n\t\t\tpoint._yScale = yScale;\n\t\t\tpoint._datasetIndex = datasetIndex;\n\t\t\tpoint._index = index;\n\n\t\t\t// Desired view properties\n\t\t\tpoint._model = {\n\t\t\t\tx: x,\n\t\t\t\ty: y,\n\t\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\n\t\t\t\t// Appearance\n\t\t\t\tradius: custom.radius || helpers.getValueAtIndexOrDefault(dataset.pointRadius, index, pointOptions.radius),\n\t\t\t\tpointStyle: custom.pointStyle || helpers.getValueAtIndexOrDefault(dataset.pointStyle, index, pointOptions.pointStyle),\n\t\t\t\tbackgroundColor: me.getPointBackgroundColor(point, index),\n\t\t\t\tborderColor: me.getPointBorderColor(point, index),\n\t\t\t\tborderWidth: me.getPointBorderWidth(point, index),\n\t\t\t\ttension: meta.dataset._model ? meta.dataset._model.tension : 0,\n\t\t\t\tsteppedLine: meta.dataset._model ? meta.dataset._model.steppedLine : false,\n\t\t\t\t// Tooltip\n\t\t\t\thitRadius: custom.hitRadius || helpers.getValueAtIndexOrDefault(dataset.pointHitRadius, index, pointOptions.hitRadius)\n\t\t\t};\n\t\t},\n\n\t\tcalculatePointY: function(value, index, datasetIndex) {\n\t\t\tvar me = this;\n\t\t\tvar chart = me.chart;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar yScale = me.getScaleForId(meta.yAxisID);\n\t\t\tvar sumPos = 0;\n\t\t\tvar sumNeg = 0;\n\t\t\tvar i, ds, dsMeta;\n\n\t\t\tif (yScale.options.stacked) {\n\t\t\t\tfor (i = 0; i < datasetIndex; i++) {\n\t\t\t\t\tds = chart.data.datasets[i];\n\t\t\t\t\tdsMeta = chart.getDatasetMeta(i);\n\t\t\t\t\tif (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id && chart.isDatasetVisible(i)) {\n\t\t\t\t\t\tvar stackedRightValue = Number(yScale.getRightValue(ds.data[index]));\n\t\t\t\t\t\tif (stackedRightValue < 0) {\n\t\t\t\t\t\t\tsumNeg += stackedRightValue || 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsumPos += stackedRightValue || 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar rightValue = Number(yScale.getRightValue(value));\n\t\t\t\tif (rightValue < 0) {\n\t\t\t\t\treturn yScale.getPixelForValue(sumNeg + rightValue);\n\t\t\t\t}\n\t\t\t\treturn yScale.getPixelForValue(sumPos + rightValue);\n\t\t\t}\n\n\t\t\treturn yScale.getPixelForValue(value);\n\t\t},\n\n\t\tupdateBezierControlPoints: function() {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar area = me.chart.chartArea;\n\t\t\tvar points = (meta.data || []);\n\t\t\tvar i, ilen, point, model, controlPoints;\n\n\t\t\t// Only consider points that are drawn in case the spanGaps option is used\n\t\t\tif (meta.dataset._model.spanGaps) {\n\t\t\t\tpoints = points.filter(function(pt) {\n\t\t\t\t\treturn !pt._model.skip;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfunction capControlPoint(pt, min, max) {\n\t\t\t\treturn Math.max(Math.min(pt, max), min);\n\t\t\t}\n\n\t\t\tif (meta.dataset._model.cubicInterpolationMode === 'monotone') {\n\t\t\t\thelpers.splineCurveMonotone(points);\n\t\t\t} else {\n\t\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\n\t\t\t\t\tpoint = points[i];\n\t\t\t\t\tmodel = point._model;\n\t\t\t\t\tcontrolPoints = helpers.splineCurve(\n\t\t\t\t\t\thelpers.previousItem(points, i)._model,\n\t\t\t\t\t\tmodel,\n\t\t\t\t\t\thelpers.nextItem(points, i)._model,\n\t\t\t\t\t\tmeta.dataset._model.tension\n\t\t\t\t\t);\n\t\t\t\t\tmodel.controlPointPreviousX = controlPoints.previous.x;\n\t\t\t\t\tmodel.controlPointPreviousY = controlPoints.previous.y;\n\t\t\t\t\tmodel.controlPointNextX = controlPoints.next.x;\n\t\t\t\t\tmodel.controlPointNextY = controlPoints.next.y;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (me.chart.options.elements.line.capBezierPoints) {\n\t\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\n\t\t\t\t\tmodel = points[i]._model;\n\t\t\t\t\tmodel.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);\n\t\t\t\t\tmodel.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);\n\t\t\t\t\tmodel.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);\n\t\t\t\t\tmodel.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tdraw: function(ease) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar points = meta.data || [];\n\t\t\tvar easingDecimal = ease || 1;\n\t\t\tvar i, ilen;\n\n\t\t\t// Transition Point Locations\n\t\t\tfor (i=0, ilen=points.length; i<ilen; ++i) {\n\t\t\t\tpoints[i].transition(easingDecimal);\n\t\t\t}\n\n\t\t\tChart.canvasHelpers.clipArea(me.chart.chart.ctx, me.chart.chartArea);\n\t\t\t// Transition and Draw the line\n\t\t\tif (lineEnabled(me.getDataset(), me.chart.options)) {\n\t\t\t\tmeta.dataset.transition(easingDecimal).draw();\n\t\t\t}\n\t\t\tChart.canvasHelpers.unclipArea(me.chart.chart.ctx);\n\n\t\t\t// Draw the points\n\t\t\tfor (i=0, ilen=points.length; i<ilen; ++i) {\n\t\t\t\tpoints[i].draw(me.chart.chartArea);\n\t\t\t}\n\t\t},\n\n\t\tsetHoverStyle: function(point) {\n\t\t\t// Point\n\t\t\tvar dataset = this.chart.data.datasets[point._datasetIndex];\n\t\t\tvar index = point._index;\n\t\t\tvar custom = point.custom || {};\n\t\t\tvar model = point._model;\n\n\t\t\tmodel.radius = custom.hoverRadius || helpers.getValueAtIndexOrDefault(dataset.pointHoverRadius, index, this.chart.options.elements.point.hoverRadius);\n\t\t\tmodel.backgroundColor = custom.hoverBackgroundColor || helpers.getValueAtIndexOrDefault(dataset.pointHoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));\n\t\t\tmodel.borderColor = custom.hoverBorderColor || helpers.getValueAtIndexOrDefault(dataset.pointHoverBorderColor, index, helpers.getHoverColor(model.borderColor));\n\t\t\tmodel.borderWidth = custom.hoverBorderWidth || helpers.getValueAtIndexOrDefault(dataset.pointHoverBorderWidth, index, model.borderWidth);\n\t\t},\n\n\t\tremoveHoverStyle: function(point) {\n\t\t\tvar me = this;\n\t\t\tvar dataset = me.chart.data.datasets[point._datasetIndex];\n\t\t\tvar index = point._index;\n\t\t\tvar custom = point.custom || {};\n\t\t\tvar model = point._model;\n\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\n\t\t\tif ((dataset.radius !== undefined) && (dataset.pointRadius === undefined)) {\n\t\t\t\tdataset.pointRadius = dataset.radius;\n\t\t\t}\n\n\t\t\tmodel.radius = custom.radius || helpers.getValueAtIndexOrDefault(dataset.pointRadius, index, me.chart.options.elements.point.radius);\n\t\t\tmodel.backgroundColor = me.getPointBackgroundColor(point, index);\n\t\t\tmodel.borderColor = me.getPointBorderColor(point, index);\n\t\t\tmodel.borderWidth = me.getPointBorderWidth(point, index);\n\t\t}\n\t});\n};\n\n},{}],19:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.defaults.polarArea = {\n\n\t\tscale: {\n\t\t\ttype: 'radialLinear',\n\t\t\tlineArc: true, // so that lines are circular\n\t\t\tticks: {\n\t\t\t\tbeginAtZero: true\n\t\t\t}\n\t\t},\n\n\t\t// Boolean - Whether to animate the rotation of the chart\n\t\tanimation: {\n\t\t\tanimateRotate: true,\n\t\t\tanimateScale: true\n\t\t},\n\n\t\tstartAngle: -0.5 * Math.PI,\n\t\taspectRatio: 1,\n\t\tlegendCallback: function(chart) {\n\t\t\tvar text = [];\n\t\t\ttext.push('<ul class=\"' + chart.id + '-legend\">');\n\n\t\t\tvar data = chart.data;\n\t\t\tvar datasets = data.datasets;\n\t\t\tvar labels = data.labels;\n\n\t\t\tif (datasets.length) {\n\t\t\t\tfor (var i = 0; i < datasets[0].data.length; ++i) {\n\t\t\t\t\ttext.push('<li><span style=\"background-color:' + datasets[0].backgroundColor[i] + '\"></span>');\n\t\t\t\t\tif (labels[i]) {\n\t\t\t\t\t\ttext.push(labels[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttext.push('</li>');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttext.push('</ul>');\n\t\t\treturn text.join('');\n\t\t},\n\t\tlegend: {\n\t\t\tlabels: {\n\t\t\t\tgenerateLabels: function(chart) {\n\t\t\t\t\tvar data = chart.data;\n\t\t\t\t\tif (data.labels.length && data.datasets.length) {\n\t\t\t\t\t\treturn data.labels.map(function(label, i) {\n\t\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\n\t\t\t\t\t\t\tvar ds = data.datasets[0];\n\t\t\t\t\t\t\tvar arc = meta.data[i];\n\t\t\t\t\t\t\tvar custom = arc.custom || {};\n\t\t\t\t\t\t\tvar getValueAtIndexOrDefault = helpers.getValueAtIndexOrDefault;\n\t\t\t\t\t\t\tvar arcOpts = chart.options.elements.arc;\n\t\t\t\t\t\t\tvar fill = custom.backgroundColor ? custom.backgroundColor : getValueAtIndexOrDefault(ds.backgroundColor, i, arcOpts.backgroundColor);\n\t\t\t\t\t\t\tvar stroke = custom.borderColor ? custom.borderColor : getValueAtIndexOrDefault(ds.borderColor, i, arcOpts.borderColor);\n\t\t\t\t\t\t\tvar bw = custom.borderWidth ? custom.borderWidth : getValueAtIndexOrDefault(ds.borderWidth, i, arcOpts.borderWidth);\n\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: label,\n\t\t\t\t\t\t\t\tfillStyle: fill,\n\t\t\t\t\t\t\t\tstrokeStyle: stroke,\n\t\t\t\t\t\t\t\tlineWidth: bw,\n\t\t\t\t\t\t\t\thidden: isNaN(ds.data[i]) || meta.data[i].hidden,\n\n\t\t\t\t\t\t\t\t// Extra data used for toggling the correct item\n\t\t\t\t\t\t\t\tindex: i\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\treturn [];\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tonClick: function(e, legendItem) {\n\t\t\t\tvar index = legendItem.index;\n\t\t\t\tvar chart = this.chart;\n\t\t\t\tvar i, ilen, meta;\n\n\t\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\n\t\t\t\t\tmeta = chart.getDatasetMeta(i);\n\t\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\n\t\t\t\t}\n\n\t\t\t\tchart.update();\n\t\t\t}\n\t\t},\n\n\t\t// Need to override these to give a nice default\n\t\ttooltips: {\n\t\t\tcallbacks: {\n\t\t\t\ttitle: function() {\n\t\t\t\t\treturn '';\n\t\t\t\t},\n\t\t\t\tlabel: function(tooltipItem, data) {\n\t\t\t\t\treturn data.labels[tooltipItem.index] + ': ' + tooltipItem.yLabel;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tChart.controllers.polarArea = Chart.DatasetController.extend({\n\n\t\tdataElementType: Chart.elements.Arc,\n\n\t\tlinkScales: helpers.noop,\n\n\t\tupdate: function(reset) {\n\t\t\tvar me = this;\n\t\t\tvar chart = me.chart;\n\t\t\tvar chartArea = chart.chartArea;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar opts = chart.options;\n\t\t\tvar arcOpts = opts.elements.arc;\n\t\t\tvar minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\n\t\t\tchart.outerRadius = Math.max((minSize - arcOpts.borderWidth / 2) / 2, 0);\n\t\t\tchart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);\n\t\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();\n\n\t\t\tme.outerRadius = chart.outerRadius - (chart.radiusLength * me.index);\n\t\t\tme.innerRadius = me.outerRadius - chart.radiusLength;\n\n\t\t\tmeta.count = me.countVisibleElements();\n\n\t\t\thelpers.each(meta.data, function(arc, index) {\n\t\t\t\tme.updateElement(arc, index, reset);\n\t\t\t});\n\t\t},\n\n\t\tupdateElement: function(arc, index, reset) {\n\t\t\tvar me = this;\n\t\t\tvar chart = me.chart;\n\t\t\tvar dataset = me.getDataset();\n\t\t\tvar opts = chart.options;\n\t\t\tvar animationOpts = opts.animation;\n\t\t\tvar scale = chart.scale;\n\t\t\tvar getValueAtIndexOrDefault = helpers.getValueAtIndexOrDefault;\n\t\t\tvar labels = chart.data.labels;\n\n\t\t\tvar circumference = me.calculateCircumference(dataset.data[index]);\n\t\t\tvar centerX = scale.xCenter;\n\t\t\tvar centerY = scale.yCenter;\n\n\t\t\t// If there is NaN data before us, we need to calculate the starting angle correctly.\n\t\t\t// We could be way more efficient here, but its unlikely that the polar area chart will have a lot of data\n\t\t\tvar visibleCount = 0;\n\t\t\tvar meta = me.getMeta();\n\t\t\tfor (var i = 0; i < index; ++i) {\n\t\t\t\tif (!isNaN(dataset.data[i]) && !meta.data[i].hidden) {\n\t\t\t\t\t++visibleCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// var negHalfPI = -0.5 * Math.PI;\n\t\t\tvar datasetStartAngle = opts.startAngle;\n\t\t\tvar distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\n\t\t\tvar startAngle = datasetStartAngle + (circumference * visibleCount);\n\t\t\tvar endAngle = startAngle + (arc.hidden ? 0 : circumference);\n\n\t\t\tvar resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\n\n\t\t\thelpers.extend(arc, {\n\t\t\t\t// Utility\n\t\t\t\t_datasetIndex: me.index,\n\t\t\t\t_index: index,\n\t\t\t\t_scale: scale,\n\n\t\t\t\t// Desired view properties\n\t\t\t\t_model: {\n\t\t\t\t\tx: centerX,\n\t\t\t\t\ty: centerY,\n\t\t\t\t\tinnerRadius: 0,\n\t\t\t\t\touterRadius: reset ? resetRadius : distance,\n\t\t\t\t\tstartAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle,\n\t\t\t\t\tendAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle,\n\t\t\t\t\tlabel: getValueAtIndexOrDefault(labels, index, labels[index])\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Apply border and fill style\n\t\t\tme.removeHoverStyle(arc);\n\n\t\t\tarc.pivot();\n\t\t},\n\n\t\tremoveHoverStyle: function(arc) {\n\t\t\tChart.DatasetController.prototype.removeHoverStyle.call(this, arc, this.chart.options.elements.arc);\n\t\t},\n\n\t\tcountVisibleElements: function() {\n\t\t\tvar dataset = this.getDataset();\n\t\t\tvar meta = this.getMeta();\n\t\t\tvar count = 0;\n\n\t\t\thelpers.each(meta.data, function(element, index) {\n\t\t\t\tif (!isNaN(dataset.data[index]) && !element.hidden) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn count;\n\t\t},\n\n\t\tcalculateCircumference: function(value) {\n\t\t\tvar count = this.getMeta().count;\n\t\t\tif (count > 0 && !isNaN(value)) {\n\t\t\t\treturn (2 * Math.PI) / count;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\t});\n};\n\n},{}],20:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.defaults.radar = {\n\t\taspectRatio: 1,\n\t\tscale: {\n\t\t\ttype: 'radialLinear'\n\t\t},\n\t\telements: {\n\t\t\tline: {\n\t\t\t\ttension: 0 // no bezier in radar\n\t\t\t}\n\t\t}\n\t};\n\n\tChart.controllers.radar = Chart.DatasetController.extend({\n\n\t\tdatasetElementType: Chart.elements.Line,\n\n\t\tdataElementType: Chart.elements.Point,\n\n\t\tlinkScales: helpers.noop,\n\n\t\tupdate: function(reset) {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar line = meta.dataset;\n\t\t\tvar points = meta.data;\n\t\t\tvar custom = line.custom || {};\n\t\t\tvar dataset = me.getDataset();\n\t\t\tvar lineElementOptions = me.chart.options.elements.line;\n\t\t\tvar scale = me.chart.scale;\n\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\n\t\t\tif ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {\n\t\t\t\tdataset.lineTension = dataset.tension;\n\t\t\t}\n\n\t\t\thelpers.extend(meta.dataset, {\n\t\t\t\t// Utility\n\t\t\t\t_datasetIndex: me.index,\n\t\t\t\t// Data\n\t\t\t\t_children: points,\n\t\t\t\t_loop: true,\n\t\t\t\t// Model\n\t\t\t\t_model: {\n\t\t\t\t\t// Appearance\n\t\t\t\t\ttension: custom.tension ? custom.tension : helpers.getValueOrDefault(dataset.lineTension, lineElementOptions.tension),\n\t\t\t\t\tbackgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor),\n\t\t\t\t\tborderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth),\n\t\t\t\t\tborderColor: custom.borderColor ? custom.borderColor : (dataset.borderColor || lineElementOptions.borderColor),\n\t\t\t\t\tfill: custom.fill ? custom.fill : (dataset.fill !== undefined ? dataset.fill : lineElementOptions.fill),\n\t\t\t\t\tborderCapStyle: custom.borderCapStyle ? custom.borderCapStyle : (dataset.borderCapStyle || lineElementOptions.borderCapStyle),\n\t\t\t\t\tborderDash: custom.borderDash ? custom.borderDash : (dataset.borderDash || lineElementOptions.borderDash),\n\t\t\t\t\tborderDashOffset: custom.borderDashOffset ? custom.borderDashOffset : (dataset.borderDashOffset || lineElementOptions.borderDashOffset),\n\t\t\t\t\tborderJoinStyle: custom.borderJoinStyle ? custom.borderJoinStyle : (dataset.borderJoinStyle || lineElementOptions.borderJoinStyle),\n\n\t\t\t\t\t// Scale\n\t\t\t\t\tscaleTop: scale.top,\n\t\t\t\t\tscaleBottom: scale.bottom,\n\t\t\t\t\tscaleZero: scale.getBasePosition()\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmeta.dataset.pivot();\n\n\t\t\t// Update Points\n\t\t\thelpers.each(points, function(point, index) {\n\t\t\t\tme.updateElement(point, index, reset);\n\t\t\t}, me);\n\n\t\t\t// Update bezier control points\n\t\t\tme.updateBezierControlPoints();\n\t\t},\n\t\tupdateElement: function(point, index, reset) {\n\t\t\tvar me = this;\n\t\t\tvar custom = point.custom || {};\n\t\t\tvar dataset = me.getDataset();\n\t\t\tvar scale = me.chart.scale;\n\t\t\tvar pointElementOptions = me.chart.options.elements.point;\n\t\t\tvar pointPosition = scale.getPointPositionForValue(index, dataset.data[index]);\n\n\t\t\thelpers.extend(point, {\n\t\t\t\t// Utility\n\t\t\t\t_datasetIndex: me.index,\n\t\t\t\t_index: index,\n\t\t\t\t_scale: scale,\n\n\t\t\t\t// Desired view properties\n\t\t\t\t_model: {\n\t\t\t\t\tx: reset ? scale.xCenter : pointPosition.x, // value not used in dataset scale, but we want a consistent API between scales\n\t\t\t\t\ty: reset ? scale.yCenter : pointPosition.y,\n\n\t\t\t\t\t// Appearance\n\t\t\t\t\ttension: custom.tension ? custom.tension : helpers.getValueOrDefault(dataset.lineTension, me.chart.options.elements.line.tension),\n\t\t\t\t\tradius: custom.radius ? custom.radius : helpers.getValueAtIndexOrDefault(dataset.pointRadius, index, pointElementOptions.radius),\n\t\t\t\t\tbackgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.getValueAtIndexOrDefault(dataset.pointBackgroundColor, index, pointElementOptions.backgroundColor),\n\t\t\t\t\tborderColor: custom.borderColor ? custom.borderColor : helpers.getValueAtIndexOrDefault(dataset.pointBorderColor, index, pointElementOptions.borderColor),\n\t\t\t\t\tborderWidth: custom.borderWidth ? custom.borderWidth : helpers.getValueAtIndexOrDefault(dataset.pointBorderWidth, index, pointElementOptions.borderWidth),\n\t\t\t\t\tpointStyle: custom.pointStyle ? custom.pointStyle : helpers.getValueAtIndexOrDefault(dataset.pointStyle, index, pointElementOptions.pointStyle),\n\n\t\t\t\t\t// Tooltip\n\t\t\t\t\thitRadius: custom.hitRadius ? custom.hitRadius : helpers.getValueAtIndexOrDefault(dataset.hitRadius, index, pointElementOptions.hitRadius)\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpoint._model.skip = custom.skip ? custom.skip : (isNaN(point._model.x) || isNaN(point._model.y));\n\t\t},\n\t\tupdateBezierControlPoints: function() {\n\t\t\tvar chartArea = this.chart.chartArea;\n\t\t\tvar meta = this.getMeta();\n\n\t\t\thelpers.each(meta.data, function(point, index) {\n\t\t\t\tvar model = point._model;\n\t\t\t\tvar controlPoints = helpers.splineCurve(\n\t\t\t\t\thelpers.previousItem(meta.data, index, true)._model,\n\t\t\t\t\tmodel,\n\t\t\t\t\thelpers.nextItem(meta.data, index, true)._model,\n\t\t\t\t\tmodel.tension\n\t\t\t\t);\n\n\t\t\t\t// Prevent the bezier going outside of the bounds of the graph\n\t\t\t\tmodel.controlPointPreviousX = Math.max(Math.min(controlPoints.previous.x, chartArea.right), chartArea.left);\n\t\t\t\tmodel.controlPointPreviousY = Math.max(Math.min(controlPoints.previous.y, chartArea.bottom), chartArea.top);\n\n\t\t\t\tmodel.controlPointNextX = Math.max(Math.min(controlPoints.next.x, chartArea.right), chartArea.left);\n\t\t\t\tmodel.controlPointNextY = Math.max(Math.min(controlPoints.next.y, chartArea.bottom), chartArea.top);\n\n\t\t\t\t// Now pivot the point for animation\n\t\t\t\tpoint.pivot();\n\t\t\t});\n\t\t},\n\n\t\tdraw: function(ease) {\n\t\t\tvar meta = this.getMeta();\n\t\t\tvar easingDecimal = ease || 1;\n\n\t\t\t// Transition Point Locations\n\t\t\thelpers.each(meta.data, function(point) {\n\t\t\t\tpoint.transition(easingDecimal);\n\t\t\t});\n\n\t\t\t// Transition and Draw the line\n\t\t\tmeta.dataset.transition(easingDecimal).draw();\n\n\t\t\t// Draw the points\n\t\t\thelpers.each(meta.data, function(point) {\n\t\t\t\tpoint.draw();\n\t\t\t});\n\t\t},\n\n\t\tsetHoverStyle: function(point) {\n\t\t\t// Point\n\t\t\tvar dataset = this.chart.data.datasets[point._datasetIndex];\n\t\t\tvar custom = point.custom || {};\n\t\t\tvar index = point._index;\n\t\t\tvar model = point._model;\n\n\t\t\tmodel.radius = custom.hoverRadius ? custom.hoverRadius : helpers.getValueAtIndexOrDefault(dataset.pointHoverRadius, index, this.chart.options.elements.point.hoverRadius);\n\t\t\tmodel.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : helpers.getValueAtIndexOrDefault(dataset.pointHoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));\n\t\t\tmodel.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : helpers.getValueAtIndexOrDefault(dataset.pointHoverBorderColor, index, helpers.getHoverColor(model.borderColor));\n\t\t\tmodel.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : helpers.getValueAtIndexOrDefault(dataset.pointHoverBorderWidth, index, model.borderWidth);\n\t\t},\n\n\t\tremoveHoverStyle: function(point) {\n\t\t\tvar dataset = this.chart.data.datasets[point._datasetIndex];\n\t\t\tvar custom = point.custom || {};\n\t\t\tvar index = point._index;\n\t\t\tvar model = point._model;\n\t\t\tvar pointElementOptions = this.chart.options.elements.point;\n\n\t\t\tmodel.radius = custom.radius ? custom.radius : helpers.getValueAtIndexOrDefault(dataset.radius, index, pointElementOptions.radius);\n\t\t\tmodel.backgroundColor = custom.backgroundColor ? custom.backgroundColor : helpers.getValueAtIndexOrDefault(dataset.pointBackgroundColor, index, pointElementOptions.backgroundColor);\n\t\t\tmodel.borderColor = custom.borderColor ? custom.borderColor : helpers.getValueAtIndexOrDefault(dataset.pointBorderColor, index, pointElementOptions.borderColor);\n\t\t\tmodel.borderWidth = custom.borderWidth ? custom.borderWidth : helpers.getValueAtIndexOrDefault(dataset.pointBorderWidth, index, pointElementOptions.borderWidth);\n\t\t}\n\t});\n};\n\n},{}],21:[function(require,module,exports){\n/* global window: false */\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.defaults.global.animation = {\n\t\tduration: 1000,\n\t\teasing: 'easeOutQuart',\n\t\tonProgress: helpers.noop,\n\t\tonComplete: helpers.noop\n\t};\n\n\tChart.Animation = Chart.Element.extend({\n\t\tcurrentStep: null, // the current animation step\n\t\tnumSteps: 60, // default number of steps\n\t\teasing: '', // the easing to use for this animation\n\t\trender: null, // render function used by the animation service\n\n\t\tonAnimationProgress: null, // user specified callback to fire on each step of the animation\n\t\tonAnimationComplete: null // user specified callback to fire when the animation finishes\n\t});\n\n\tChart.animationService = {\n\t\tframeDuration: 17,\n\t\tanimations: [],\n\t\tdropFrames: 0,\n\t\trequest: null,\n\n\t\t/**\n\t\t * @function Chart.animationService.addAnimation\n\t\t * @param chartInstance {ChartController} the chart to animate\n\t\t * @param animationObject {IAnimation} the animation that we will animate\n\t\t * @param duration {Number} length of animation in ms\n\t\t * @param lazy {Boolean} if true, the chart is not marked as animating to enable more responsive interactions\n\t\t */\n\t\taddAnimation: function(chartInstance, animationObject, duration, lazy) {\n\t\t\tvar me = this;\n\n\t\t\tif (!lazy) {\n\t\t\t\tchartInstance.animating = true;\n\t\t\t}\n\n\t\t\tfor (var index = 0; index < me.animations.length; ++index) {\n\t\t\t\tif (me.animations[index].chartInstance === chartInstance) {\n\t\t\t\t\t// replacing an in progress animation\n\t\t\t\t\tme.animations[index].animationObject = animationObject;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tme.animations.push({\n\t\t\t\tchartInstance: chartInstance,\n\t\t\t\tanimationObject: animationObject\n\t\t\t});\n\n\t\t\t// If there are no animations queued, manually kickstart a digest, for lack of a better word\n\t\t\tif (me.animations.length === 1) {\n\t\t\t\tme.requestAnimationFrame();\n\t\t\t}\n\t\t},\n\t\t// Cancel the animation for a given chart instance\n\t\tcancelAnimation: function(chartInstance) {\n\t\t\tvar index = helpers.findIndex(this.animations, function(animationWrapper) {\n\t\t\t\treturn animationWrapper.chartInstance === chartInstance;\n\t\t\t});\n\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.animations.splice(index, 1);\n\t\t\t\tchartInstance.animating = false;\n\t\t\t}\n\t\t},\n\t\trequestAnimationFrame: function() {\n\t\t\tvar me = this;\n\t\t\tif (me.request === null) {\n\t\t\t\t// Skip animation frame requests until the active one is executed.\n\t\t\t\t// This can happen when processing mouse events, e.g. 'mousemove'\n\t\t\t\t// and 'mouseout' events will trigger multiple renders.\n\t\t\t\tme.request = helpers.requestAnimFrame.call(window, function() {\n\t\t\t\t\tme.request = null;\n\t\t\t\t\tme.startDigest();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tstartDigest: function() {\n\t\t\tvar me = this;\n\n\t\t\tvar startTime = Date.now();\n\t\t\tvar framesToDrop = 0;\n\n\t\t\tif (me.dropFrames > 1) {\n\t\t\t\tframesToDrop = Math.floor(me.dropFrames);\n\t\t\t\tme.dropFrames = me.dropFrames % 1;\n\t\t\t}\n\n\t\t\tvar i = 0;\n\t\t\twhile (i < me.animations.length) {\n\t\t\t\tif (me.animations[i].animationObject.currentStep === null) {\n\t\t\t\t\tme.animations[i].animationObject.currentStep = 0;\n\t\t\t\t}\n\n\t\t\t\tme.animations[i].animationObject.currentStep += 1 + framesToDrop;\n\n\t\t\t\tif (me.animations[i].animationObject.currentStep > me.animations[i].animationObject.numSteps) {\n\t\t\t\t\tme.animations[i].animationObject.currentStep = me.animations[i].animationObject.numSteps;\n\t\t\t\t}\n\n\t\t\t\tme.animations[i].animationObject.render(me.animations[i].chartInstance, me.animations[i].animationObject);\n\t\t\t\tif (me.animations[i].animationObject.onAnimationProgress && me.animations[i].animationObject.onAnimationProgress.call) {\n\t\t\t\t\tme.animations[i].animationObject.onAnimationProgress.call(me.animations[i].chartInstance, me.animations[i]);\n\t\t\t\t}\n\n\t\t\t\tif (me.animations[i].animationObject.currentStep === me.animations[i].animationObject.numSteps) {\n\t\t\t\t\tif (me.animations[i].animationObject.onAnimationComplete && me.animations[i].animationObject.onAnimationComplete.call) {\n\t\t\t\t\t\tme.animations[i].animationObject.onAnimationComplete.call(me.animations[i].chartInstance, me.animations[i]);\n\t\t\t\t\t}\n\n\t\t\t\t\t// executed the last frame. Remove the animation.\n\t\t\t\t\tme.animations[i].chartInstance.animating = false;\n\n\t\t\t\t\tme.animations.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\t++i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar endTime = Date.now();\n\t\t\tvar dropFrames = (endTime - startTime) / me.frameDuration;\n\n\t\t\tme.dropFrames += dropFrames;\n\n\t\t\t// Do we have more stuff to animate?\n\t\t\tif (me.animations.length > 0) {\n\t\t\t\tme.requestAnimationFrame();\n\t\t\t}\n\t\t}\n\t};\n};\n\n},{}],22:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\t// Global Chart canvas helpers object for drawing items to canvas\n\tvar helpers = Chart.canvasHelpers = {};\n\n\thelpers.drawPoint = function(ctx, pointStyle, radius, x, y) {\n\t\tvar type, edgeLength, xOffset, yOffset, height, size;\n\n\t\tif (typeof pointStyle === 'object') {\n\t\t\ttype = pointStyle.toString();\n\t\t\tif (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\n\t\t\t\tctx.drawImage(pointStyle, x - pointStyle.width / 2, y - pointStyle.height / 2);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (isNaN(radius) || radius <= 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (pointStyle) {\n\t\t// Default includes circle\n\t\tdefault:\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(x, y, radius, 0, Math.PI * 2);\n\t\t\tctx.closePath();\n\t\t\tctx.fill();\n\t\t\tbreak;\n\t\tcase 'triangle':\n\t\t\tctx.beginPath();\n\t\t\tedgeLength = 3 * radius / Math.sqrt(3);\n\t\t\theight = edgeLength * Math.sqrt(3) / 2;\n\t\t\tctx.moveTo(x - edgeLength / 2, y + height / 3);\n\t\t\tctx.lineTo(x + edgeLength / 2, y + height / 3);\n\t\t\tctx.lineTo(x, y - 2 * height / 3);\n\t\t\tctx.closePath();\n\t\t\tctx.fill();\n\t\t\tbreak;\n\t\tcase 'rect':\n\t\t\tsize = 1 / Math.SQRT2 * radius;\n\t\t\tctx.beginPath();\n\t\t\tctx.fillRect(x - size, y - size, 2 * size, 2 * size);\n\t\t\tctx.strokeRect(x - size, y - size, 2 * size, 2 * size);\n\t\t\tbreak;\n\t\tcase 'rectRounded':\n\t\t\tvar offset = radius / Math.SQRT2;\n\t\t\tvar leftX = x - offset;\n\t\t\tvar topY = y - offset;\n\t\t\tvar sideSize = Math.SQRT2 * radius;\n\t\t\tChart.helpers.drawRoundedRectangle(ctx, leftX, topY, sideSize, sideSize, radius / 2);\n\t\t\tctx.fill();\n\t\t\tbreak;\n\t\tcase 'rectRot':\n\t\t\tsize = 1 / Math.SQRT2 * radius;\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(x - size, y);\n\t\t\tctx.lineTo(x, y + size);\n\t\t\tctx.lineTo(x + size, y);\n\t\t\tctx.lineTo(x, y - size);\n\t\t\tctx.closePath();\n\t\t\tctx.fill();\n\t\t\tbreak;\n\t\tcase 'cross':\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(x, y + radius);\n\t\t\tctx.lineTo(x, y - radius);\n\t\t\tctx.moveTo(x - radius, y);\n\t\t\tctx.lineTo(x + radius, y);\n\t\t\tctx.closePath();\n\t\t\tbreak;\n\t\tcase 'crossRot':\n\t\t\tctx.beginPath();\n\t\t\txOffset = Math.cos(Math.PI / 4) * radius;\n\t\t\tyOffset = Math.sin(Math.PI / 4) * radius;\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\n\t\t\tctx.moveTo(x - xOffset, y + yOffset);\n\t\t\tctx.lineTo(x + xOffset, y - yOffset);\n\t\t\tctx.closePath();\n\t\t\tbreak;\n\t\tcase 'star':\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(x, y + radius);\n\t\t\tctx.lineTo(x, y - radius);\n\t\t\tctx.moveTo(x - radius, y);\n\t\t\tctx.lineTo(x + radius, y);\n\t\t\txOffset = Math.cos(Math.PI / 4) * radius;\n\t\t\tyOffset = Math.sin(Math.PI / 4) * radius;\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\n\t\t\tctx.moveTo(x - xOffset, y + yOffset);\n\t\t\tctx.lineTo(x + xOffset, y - yOffset);\n\t\t\tctx.closePath();\n\t\t\tbreak;\n\t\tcase 'line':\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(x - radius, y);\n\t\t\tctx.lineTo(x + radius, y);\n\t\t\tctx.closePath();\n\t\t\tbreak;\n\t\tcase 'dash':\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(x, y);\n\t\t\tctx.lineTo(x + radius, y);\n\t\t\tctx.closePath();\n\t\t\tbreak;\n\t\t}\n\n\t\tctx.stroke();\n\t};\n\n\thelpers.clipArea = function(ctx, clipArea) {\n\t\tctx.save();\n\t\tctx.beginPath();\n\t\tctx.rect(clipArea.left, clipArea.top, clipArea.right - clipArea.left, clipArea.bottom - clipArea.top);\n\t\tctx.clip();\n\t};\n\n\thelpers.unclipArea = function(ctx) {\n\t\tctx.restore();\n\t};\n\n};\n\n},{}],23:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\tvar plugins = Chart.plugins;\n\tvar platform = Chart.platform;\n\n\t// Create a dictionary of chart types, to allow for extension of existing types\n\tChart.types = {};\n\n\t// Store a reference to each instance - allowing us to globally resize chart instances on window resize.\n\t// Destroy method on the chart will remove the instance of the chart from this reference.\n\tChart.instances = {};\n\n\t// Controllers available for dataset visualization eg. bar, line, slice, etc.\n\tChart.controllers = {};\n\n\t/**\n\t * Initializes the given config with global and chart default values.\n\t */\n\tfunction initConfig(config) {\n\t\tconfig = config || {};\n\n\t\t// Do NOT use configMerge() for the data object because this method merges arrays\n\t\t// and so would change references to labels and datasets, preventing data updates.\n\t\tvar data = config.data = config.data || {};\n\t\tdata.datasets = data.datasets || [];\n\t\tdata.labels = data.labels || [];\n\n\t\tconfig.options = helpers.configMerge(\n\t\t\tChart.defaults.global,\n\t\t\tChart.defaults[config.type],\n\t\t\tconfig.options || {});\n\n\t\treturn config;\n\t}\n\n\t/**\n\t * Updates the config of the chart\n\t * @param chart {Chart.Controller} chart to update the options for\n\t */\n\tfunction updateConfig(chart) {\n\t\tvar newOptions = chart.options;\n\n\t\t// Update Scale(s) with options\n\t\tif (newOptions.scale) {\n\t\t\tchart.scale.options = newOptions.scale;\n\t\t} else if (newOptions.scales) {\n\t\t\tnewOptions.scales.xAxes.concat(newOptions.scales.yAxes).forEach(function(scaleOptions) {\n\t\t\t\tchart.scales[scaleOptions.id].options = scaleOptions;\n\t\t\t});\n\t\t}\n\n\t\t// Tooltip\n\t\tchart.tooltip._options = newOptions.tooltips;\n\t}\n\n\t/**\n\t * @class Chart.Controller\n\t * The main controller of a chart.\n\t */\n\tChart.Controller = function(item, config, instance) {\n\t\tvar me = this;\n\n\t\tconfig = initConfig(config);\n\n\t\tvar context = platform.acquireContext(item, config);\n\t\tvar canvas = context && context.canvas;\n\t\tvar height = canvas && canvas.height;\n\t\tvar width = canvas && canvas.width;\n\n\t\tinstance.ctx = context;\n\t\tinstance.canvas = canvas;\n\t\tinstance.config = config;\n\t\tinstance.width = width;\n\t\tinstance.height = height;\n\t\tinstance.aspectRatio = height? width / height : null;\n\n\t\tme.id = helpers.uid();\n\t\tme.chart = instance;\n\t\tme.config = config;\n\t\tme.options = config.options;\n\t\tme._bufferedRender = false;\n\n\t\t// Add the chart instance to the global namespace\n\t\tChart.instances[me.id] = me;\n\n\t\tObject.defineProperty(me, 'data', {\n\t\t\tget: function() {\n\t\t\t\treturn me.config.data;\n\t\t\t}\n\t\t});\n\n\t\tif (!context || !canvas) {\n\t\t\t// The given item is not a compatible context2d element, let's return before finalizing\n\t\t\t// the chart initialization but after setting basic chart / controller properties that\n\t\t\t// can help to figure out that the chart is not valid (e.g chart.canvas !== null);\n\t\t\t// https://github.com/chartjs/Chart.js/issues/2807\n\t\t\tconsole.error(\"Failed to create chart: can't acquire context from the given item\");\n\t\t\treturn me;\n\t\t}\n\n\t\tme.initialize();\n\t\tme.update();\n\n\t\treturn me;\n\t};\n\n\thelpers.extend(Chart.Controller.prototype, /** @lends Chart.Controller.prototype */ {\n\t\tinitialize: function() {\n\t\t\tvar me = this;\n\n\t\t\t// Before init plugin notification\n\t\t\tplugins.notify(me, 'beforeInit');\n\n\t\t\thelpers.retinaScale(me.chart);\n\n\t\t\tme.bindEvents();\n\n\t\t\tif (me.options.responsive) {\n\t\t\t\t// Initial resize before chart draws (must be silent to preserve initial animations).\n\t\t\t\tme.resize(true);\n\t\t\t}\n\n\t\t\t// Make sure scales have IDs and are built before we build any controllers.\n\t\t\tme.ensureScalesHaveIDs();\n\t\t\tme.buildScales();\n\t\t\tme.initToolTip();\n\n\t\t\t// After init plugin notification\n\t\t\tplugins.notify(me, 'afterInit');\n\n\t\t\treturn me;\n\t\t},\n\n\t\tclear: function() {\n\t\t\thelpers.clear(this.chart);\n\t\t\treturn this;\n\t\t},\n\n\t\tstop: function() {\n\t\t\t// Stops any current animation loop occurring\n\t\t\tChart.animationService.cancelAnimation(this);\n\t\t\treturn this;\n\t\t},\n\n\t\tresize: function(silent) {\n\t\t\tvar me = this;\n\t\t\tvar chart = me.chart;\n\t\t\tvar options = me.options;\n\t\t\tvar canvas = chart.canvas;\n\t\t\tvar aspectRatio = (options.maintainAspectRatio && chart.aspectRatio) || null;\n\n\t\t\t// the canvas render width and height will be casted to integers so make sure that\n\t\t\t// the canvas display style uses the same integer values to avoid blurring effect.\n\t\t\tvar newWidth = Math.floor(helpers.getMaximumWidth(canvas));\n\t\t\tvar newHeight = Math.floor(aspectRatio? newWidth / aspectRatio : helpers.getMaximumHeight(canvas));\n\n\t\t\tif (chart.width === newWidth && chart.height === newHeight) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcanvas.width = chart.width = newWidth;\n\t\t\tcanvas.height = chart.height = newHeight;\n\t\t\tcanvas.style.width = newWidth + 'px';\n\t\t\tcanvas.style.height = newHeight + 'px';\n\n\t\t\thelpers.retinaScale(chart);\n\n\t\t\tif (!silent) {\n\t\t\t\t// Notify any plugins about the resize\n\t\t\t\tvar newSize = {width: newWidth, height: newHeight};\n\t\t\t\tplugins.notify(me, 'resize', [newSize]);\n\n\t\t\t\t// Notify of resize\n\t\t\t\tif (me.options.onResize) {\n\t\t\t\t\tme.options.onResize(me, newSize);\n\t\t\t\t}\n\n\t\t\t\tme.stop();\n\t\t\t\tme.update(me.options.responsiveAnimationDuration);\n\t\t\t}\n\t\t},\n\n\t\tensureScalesHaveIDs: function() {\n\t\t\tvar options = this.options;\n\t\t\tvar scalesOptions = options.scales || {};\n\t\t\tvar scaleOptions = options.scale;\n\n\t\t\thelpers.each(scalesOptions.xAxes, function(xAxisOptions, index) {\n\t\t\t\txAxisOptions.id = xAxisOptions.id || ('x-axis-' + index);\n\t\t\t});\n\n\t\t\thelpers.each(scalesOptions.yAxes, function(yAxisOptions, index) {\n\t\t\t\tyAxisOptions.id = yAxisOptions.id || ('y-axis-' + index);\n\t\t\t});\n\n\t\t\tif (scaleOptions) {\n\t\t\t\tscaleOptions.id = scaleOptions.id || 'scale';\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Builds a map of scale ID to scale object for future lookup.\n\t\t */\n\t\tbuildScales: function() {\n\t\t\tvar me = this;\n\t\t\tvar options = me.options;\n\t\t\tvar scales = me.scales = {};\n\t\t\tvar items = [];\n\n\t\t\tif (options.scales) {\n\t\t\t\titems = items.concat(\n\t\t\t\t\t(options.scales.xAxes || []).map(function(xAxisOptions) {\n\t\t\t\t\t\treturn {options: xAxisOptions, dtype: 'category'};\n\t\t\t\t\t}),\n\t\t\t\t\t(options.scales.yAxes || []).map(function(yAxisOptions) {\n\t\t\t\t\t\treturn {options: yAxisOptions, dtype: 'linear'};\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (options.scale) {\n\t\t\t\titems.push({options: options.scale, dtype: 'radialLinear', isDefault: true});\n\t\t\t}\n\n\t\t\thelpers.each(items, function(item) {\n\t\t\t\tvar scaleOptions = item.options;\n\t\t\t\tvar scaleType = helpers.getValueOrDefault(scaleOptions.type, item.dtype);\n\t\t\t\tvar scaleClass = Chart.scaleService.getScaleConstructor(scaleType);\n\t\t\t\tif (!scaleClass) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar scale = new scaleClass({\n\t\t\t\t\tid: scaleOptions.id,\n\t\t\t\t\toptions: scaleOptions,\n\t\t\t\t\tctx: me.chart.ctx,\n\t\t\t\t\tchart: me\n\t\t\t\t});\n\n\t\t\t\tscales[scale.id] = scale;\n\n\t\t\t\t// TODO(SB): I think we should be able to remove this custom case (options.scale)\n\t\t\t\t// and consider it as a regular scale part of the \"scales\"\" map only! This would\n\t\t\t\t// make the logic easier and remove some useless? custom code.\n\t\t\t\tif (item.isDefault) {\n\t\t\t\t\tme.scale = scale;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tChart.scaleService.addScalesToLayout(this);\n\t\t},\n\n\t\tbuildOrUpdateControllers: function() {\n\t\t\tvar me = this;\n\t\t\tvar types = [];\n\t\t\tvar newControllers = [];\n\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\n\t\t\t\tvar meta = me.getDatasetMeta(datasetIndex);\n\t\t\t\tif (!meta.type) {\n\t\t\t\t\tmeta.type = dataset.type || me.config.type;\n\t\t\t\t}\n\n\t\t\t\ttypes.push(meta.type);\n\n\t\t\t\tif (meta.controller) {\n\t\t\t\t\tmeta.controller.updateIndex(datasetIndex);\n\t\t\t\t} else {\n\t\t\t\t\tmeta.controller = new Chart.controllers[meta.type](me, datasetIndex);\n\t\t\t\t\tnewControllers.push(meta.controller);\n\t\t\t\t}\n\t\t\t}, me);\n\n\t\t\tif (types.length > 1) {\n\t\t\t\tfor (var i = 1; i < types.length; i++) {\n\t\t\t\t\tif (types[i] !== types[i - 1]) {\n\t\t\t\t\t\tme.isCombo = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn newControllers;\n\t\t},\n\n\t\t/**\n\t\t * Reset the elements of all datasets\n\t\t * @private\n\t\t */\n\t\tresetElements: function() {\n\t\t\tvar me = this;\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\n\t\t\t\tme.getDatasetMeta(datasetIndex).controller.reset();\n\t\t\t}, me);\n\t\t},\n\n\t\t/**\n\t\t* Resets the chart back to it's state before the initial animation\n\t\t*/\n\t\treset: function() {\n\t\t\tthis.resetElements();\n\t\t\tthis.tooltip.initialize();\n\t\t},\n\n\t\tupdate: function(animationDuration, lazy) {\n\t\t\tvar me = this;\n\n\t\t\tupdateConfig(me);\n\n\t\t\tif (plugins.notify(me, 'beforeUpdate') === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// In case the entire data object changed\n\t\t\tme.tooltip._data = me.data;\n\n\t\t\t// Make sure dataset controllers are updated and new controllers are reset\n\t\t\tvar newControllers = me.buildOrUpdateControllers();\n\n\t\t\t// Make sure all dataset controllers have correct meta data counts\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\n\t\t\t\tme.getDatasetMeta(datasetIndex).controller.buildOrUpdateElements();\n\t\t\t}, me);\n\n\t\t\tme.updateLayout();\n\n\t\t\t// Can only reset the new controllers after the scales have been updated\n\t\t\thelpers.each(newControllers, function(controller) {\n\t\t\t\tcontroller.reset();\n\t\t\t});\n\n\t\t\tme.updateDatasets();\n\n\t\t\t// Do this before render so that any plugins that need final scale updates can use it\n\t\t\tplugins.notify(me, 'afterUpdate');\n\n\t\t\tif (me._bufferedRender) {\n\t\t\t\tme._bufferedRequest = {\n\t\t\t\t\tlazy: lazy,\n\t\t\t\t\tduration: animationDuration\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tme.render(animationDuration, lazy);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Updates the chart layout unless a plugin returns `false` to the `beforeLayout`\n\t\t * hook, in which case, plugins will not be called on `afterLayout`.\n\t\t * @private\n\t\t */\n\t\tupdateLayout: function() {\n\t\t\tvar me = this;\n\n\t\t\tif (plugins.notify(me, 'beforeLayout') === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tChart.layoutService.update(this, this.chart.width, this.chart.height);\n\n\t\t\t/**\n\t\t\t * Provided for backward compatibility, use `afterLayout` instead.\n\t\t\t * @method IPlugin#afterScaleUpdate\n\t\t\t * @deprecated since version 2.5.0\n\t\t\t * @todo remove at version 3\n\t\t\t */\n\t\t\tplugins.notify(me, 'afterScaleUpdate');\n\t\t\tplugins.notify(me, 'afterLayout');\n\t\t},\n\n\t\t/**\n\t\t * Updates all datasets unless a plugin returns `false` to the `beforeDatasetsUpdate`\n\t\t * hook, in which case, plugins will not be called on `afterDatasetsUpdate`.\n\t\t * @private\n\t\t */\n\t\tupdateDatasets: function() {\n\t\t\tvar me = this;\n\n\t\t\tif (plugins.notify(me, 'beforeDatasetsUpdate') === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {\n\t\t\t\tme.getDatasetMeta(i).controller.update();\n\t\t\t}\n\n\t\t\tplugins.notify(me, 'afterDatasetsUpdate');\n\t\t},\n\n\t\trender: function(duration, lazy) {\n\t\t\tvar me = this;\n\n\t\t\tif (plugins.notify(me, 'beforeRender') === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar animationOptions = me.options.animation;\n\t\t\tvar onComplete = function() {\n\t\t\t\tplugins.notify(me, 'afterRender');\n\t\t\t\tvar callback = animationOptions && animationOptions.onComplete;\n\t\t\t\tif (callback && callback.call) {\n\t\t\t\t\tcallback.call(me);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (animationOptions && ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration === 'undefined' && animationOptions.duration !== 0))) {\n\t\t\t\tvar animation = new Chart.Animation();\n\t\t\t\tanimation.numSteps = (duration || animationOptions.duration) / 16.66; // 60 fps\n\t\t\t\tanimation.easing = animationOptions.easing;\n\n\t\t\t\t// render function\n\t\t\t\tanimation.render = function(chartInstance, animationObject) {\n\t\t\t\t\tvar easingFunction = helpers.easingEffects[animationObject.easing];\n\t\t\t\t\tvar stepDecimal = animationObject.currentStep / animationObject.numSteps;\n\t\t\t\t\tvar easeDecimal = easingFunction(stepDecimal);\n\n\t\t\t\t\tchartInstance.draw(easeDecimal, stepDecimal, animationObject.currentStep);\n\t\t\t\t};\n\n\t\t\t\t// user events\n\t\t\t\tanimation.onAnimationProgress = animationOptions.onProgress;\n\t\t\t\tanimation.onAnimationComplete = onComplete;\n\n\t\t\t\tChart.animationService.addAnimation(me, animation, duration, lazy);\n\t\t\t} else {\n\t\t\t\tme.draw();\n\t\t\t\tonComplete();\n\t\t\t}\n\n\t\t\treturn me;\n\t\t},\n\n\t\tdraw: function(easingValue) {\n\t\t\tvar me = this;\n\n\t\t\tme.clear();\n\n\t\t\tif (easingValue === undefined || easingValue === null) {\n\t\t\t\teasingValue = 1;\n\t\t\t}\n\n\t\t\tif (plugins.notify(me, 'beforeDraw', [easingValue]) === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Draw all the scales\n\t\t\thelpers.each(me.boxes, function(box) {\n\t\t\t\tbox.draw(me.chartArea);\n\t\t\t}, me);\n\n\t\t\tif (me.scale) {\n\t\t\t\tme.scale.draw();\n\t\t\t}\n\n\t\t\tme.drawDatasets(easingValue);\n\n\t\t\t// Finally draw the tooltip\n\t\t\tme.tooltip.transition(easingValue).draw();\n\n\t\t\tplugins.notify(me, 'afterDraw', [easingValue]);\n\t\t},\n\n\t\t/**\n\t\t * Draws all datasets unless a plugin returns `false` to the `beforeDatasetsDraw`\n\t\t * hook, in which case, plugins will not be called on `afterDatasetsDraw`.\n\t\t * @private\n\t\t */\n\t\tdrawDatasets: function(easingValue) {\n\t\t\tvar me = this;\n\n\t\t\tif (plugins.notify(me, 'beforeDatasetsDraw', [easingValue]) === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Draw each dataset via its respective controller (reversed to support proper line stacking)\n\t\t\thelpers.each(me.data.datasets, function(dataset, datasetIndex) {\n\t\t\t\tif (me.isDatasetVisible(datasetIndex)) {\n\t\t\t\t\tme.getDatasetMeta(datasetIndex).controller.draw(easingValue);\n\t\t\t\t}\n\t\t\t}, me, true);\n\n\t\t\tplugins.notify(me, 'afterDatasetsDraw', [easingValue]);\n\t\t},\n\n\t\t// Get the single element that was clicked on\n\t\t// @return : An object containing the dataset index and element index of the matching element. Also contains the rectangle that was draw\n\t\tgetElementAtEvent: function(e) {\n\t\t\treturn Chart.Interaction.modes.single(this, e);\n\t\t},\n\n\t\tgetElementsAtEvent: function(e) {\n\t\t\treturn Chart.Interaction.modes.label(this, e, {intersect: true});\n\t\t},\n\n\t\tgetElementsAtXAxis: function(e) {\n\t\t\treturn Chart.Interaction.modes['x-axis'](this, e, {intersect: true});\n\t\t},\n\n\t\tgetElementsAtEventForMode: function(e, mode, options) {\n\t\t\tvar method = Chart.Interaction.modes[mode];\n\t\t\tif (typeof method === 'function') {\n\t\t\t\treturn method(this, e, options);\n\t\t\t}\n\n\t\t\treturn [];\n\t\t},\n\n\t\tgetDatasetAtEvent: function(e) {\n\t\t\treturn Chart.Interaction.modes.dataset(this, e, {intersect: true});\n\t\t},\n\n\t\tgetDatasetMeta: function(datasetIndex) {\n\t\t\tvar me = this;\n\t\t\tvar dataset = me.data.datasets[datasetIndex];\n\t\t\tif (!dataset._meta) {\n\t\t\t\tdataset._meta = {};\n\t\t\t}\n\n\t\t\tvar meta = dataset._meta[me.id];\n\t\t\tif (!meta) {\n\t\t\t\tmeta = dataset._meta[me.id] = {\n\t\t\t\t\ttype: null,\n\t\t\t\t\tdata: [],\n\t\t\t\t\tdataset: null,\n\t\t\t\t\tcontroller: null,\n\t\t\t\t\thidden: null,\t\t\t// See isDatasetVisible() comment\n\t\t\t\t\txAxisID: null,\n\t\t\t\t\tyAxisID: null\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn meta;\n\t\t},\n\n\t\tgetVisibleDatasetCount: function() {\n\t\t\tvar count = 0;\n\t\t\tfor (var i = 0, ilen = this.data.datasets.length; i<ilen; ++i) {\n\t\t\t\tif (this.isDatasetVisible(i)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn count;\n\t\t},\n\n\t\tisDatasetVisible: function(datasetIndex) {\n\t\t\tvar meta = this.getDatasetMeta(datasetIndex);\n\n\t\t\t// meta.hidden is a per chart dataset hidden flag override with 3 states: if true or false,\n\t\t\t// the dataset.hidden value is ignored, else if null, the dataset hidden state is returned.\n\t\t\treturn typeof meta.hidden === 'boolean'? !meta.hidden : !this.data.datasets[datasetIndex].hidden;\n\t\t},\n\n\t\tgenerateLegend: function() {\n\t\t\treturn this.options.legendCallback(this);\n\t\t},\n\n\t\tdestroy: function() {\n\t\t\tvar me = this;\n\t\t\tvar canvas = me.chart.canvas;\n\t\t\tvar meta, i, ilen;\n\n\t\t\tme.stop();\n\n\t\t\t// dataset controllers need to cleanup associated data\n\t\t\tfor (i = 0, ilen = me.data.datasets.length; i < ilen; ++i) {\n\t\t\t\tmeta = me.getDatasetMeta(i);\n\t\t\t\tif (meta.controller) {\n\t\t\t\t\tmeta.controller.destroy();\n\t\t\t\t\tmeta.controller = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (canvas) {\n\t\t\t\tme.unbindEvents();\n\t\t\t\thelpers.clear(me.chart);\n\t\t\t\tplatform.releaseContext(me.chart.ctx);\n\t\t\t\tme.chart.canvas = null;\n\t\t\t\tme.chart.ctx = null;\n\t\t\t}\n\n\t\t\tplugins.notify(me, 'destroy');\n\n\t\t\tdelete Chart.instances[me.id];\n\t\t},\n\n\t\ttoBase64Image: function() {\n\t\t\treturn this.chart.canvas.toDataURL.apply(this.chart.canvas, arguments);\n\t\t},\n\n\t\tinitToolTip: function() {\n\t\t\tvar me = this;\n\t\t\tme.tooltip = new Chart.Tooltip({\n\t\t\t\t_chart: me.chart,\n\t\t\t\t_chartInstance: me,\n\t\t\t\t_data: me.data,\n\t\t\t\t_options: me.options.tooltips\n\t\t\t}, me);\n\t\t\tme.tooltip.initialize();\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tbindEvents: function() {\n\t\t\tvar me = this;\n\t\t\tvar listeners = me._listeners = {};\n\t\t\tvar listener = function() {\n\t\t\t\tme.eventHandler.apply(me, arguments);\n\t\t\t};\n\n\t\t\thelpers.each(me.options.events, function(type) {\n\t\t\t\tplatform.addEventListener(me, type, listener);\n\t\t\t\tlisteners[type] = listener;\n\t\t\t});\n\n\t\t\t// Responsiveness is currently based on the use of an iframe, however this method causes\n\t\t\t// performance issues and could be troublesome when used with ad blockers. So make sure\n\t\t\t// that the user is still able to create a chart without iframe when responsive is false.\n\t\t\t// See https://github.com/chartjs/Chart.js/issues/2210\n\t\t\tif (me.options.responsive) {\n\t\t\t\tlistener = function() {\n\t\t\t\t\tme.resize();\n\t\t\t\t};\n\n\t\t\t\tplatform.addEventListener(me, 'resize', listener);\n\t\t\t\tlisteners.resize = listener;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tunbindEvents: function() {\n\t\t\tvar me = this;\n\t\t\tvar listeners = me._listeners;\n\t\t\tif (!listeners) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdelete me._listeners;\n\t\t\thelpers.each(listeners, function(listener, type) {\n\t\t\t\tplatform.removeEventListener(me, type, listener);\n\t\t\t});\n\t\t},\n\n\t\tupdateHoverStyle: function(elements, mode, enabled) {\n\t\t\tvar method = enabled? 'setHoverStyle' : 'removeHoverStyle';\n\t\t\tvar element, i, ilen;\n\n\t\t\tfor (i=0, ilen=elements.length; i<ilen; ++i) {\n\t\t\t\telement = elements[i];\n\t\t\t\tif (element) {\n\t\t\t\t\tthis.getDatasetMeta(element._datasetIndex).controller[method](element);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\teventHandler: function(e) {\n\t\t\tvar me = this;\n\t\t\tvar tooltip = me.tooltip;\n\n\t\t\tif (plugins.notify(me, 'beforeEvent', [e]) === false) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Buffer any update calls so that renders do not occur\n\t\t\tme._bufferedRender = true;\n\t\t\tme._bufferedRequest = null;\n\n\t\t\tvar changed = me.handleEvent(e);\n\t\t\tchanged |= tooltip && tooltip.handleEvent(e);\n\n\t\t\tplugins.notify(me, 'afterEvent', [e]);\n\n\t\t\tvar bufferedRequest = me._bufferedRequest;\n\t\t\tif (bufferedRequest) {\n\t\t\t\t// If we have an update that was triggered, we need to do a normal render\n\t\t\t\tme.render(bufferedRequest.duration, bufferedRequest.lazy);\n\t\t\t} else if (changed && !me.animating) {\n\t\t\t\t// If entering, leaving, or changing elements, animate the change via pivot\n\t\t\t\tme.stop();\n\n\t\t\t\t// We only need to render at this point. Updating will cause scales to be\n\t\t\t\t// recomputed generating flicker & using more memory than necessary.\n\t\t\t\tme.render(me.options.hover.animationDuration, true);\n\t\t\t}\n\n\t\t\tme._bufferedRender = false;\n\t\t\tme._bufferedRequest = null;\n\n\t\t\treturn me;\n\t\t},\n\n\t\t/**\n\t\t * Handle an event\n\t\t * @private\n\t\t * @param {IEvent} event the event to handle\n\t\t * @return {Boolean} true if the chart needs to re-render\n\t\t */\n\t\thandleEvent: function(e) {\n\t\t\tvar me = this;\n\t\t\tvar options = me.options || {};\n\t\t\tvar hoverOptions = options.hover;\n\t\t\tvar changed = false;\n\n\t\t\tme.lastActive = me.lastActive || [];\n\n\t\t\t// Find Active Elements for hover and tooltips\n\t\t\tif (e.type === 'mouseout') {\n\t\t\t\tme.active = [];\n\t\t\t} else {\n\t\t\t\tme.active = me.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions);\n\t\t\t}\n\n\t\t\t// On Hover hook\n\t\t\tif (hoverOptions.onHover) {\n\t\t\t\t// Need to call with native event here to not break backwards compatibility\n\t\t\t\thoverOptions.onHover.call(me, e.native, me.active);\n\t\t\t}\n\n\t\t\tif (e.type === 'mouseup' || e.type === 'click') {\n\t\t\t\tif (options.onClick) {\n\t\t\t\t\t// Use e.native here for backwards compatibility\n\t\t\t\t\toptions.onClick.call(me, e.native, me.active);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove styling for last active (even if it may still be active)\n\t\t\tif (me.lastActive.length) {\n\t\t\t\tme.updateHoverStyle(me.lastActive, hoverOptions.mode, false);\n\t\t\t}\n\n\t\t\t// Built in hover styling\n\t\t\tif (me.active.length && hoverOptions.mode) {\n\t\t\t\tme.updateHoverStyle(me.active, hoverOptions.mode, true);\n\t\t\t}\n\n\t\t\tchanged = !helpers.arrayEquals(me.active, me.lastActive);\n\n\t\t\t// Remember Last Actives\n\t\t\tme.lastActive = me.active;\n\n\t\t\treturn changed;\n\t\t}\n\t});\n};\n\n},{}],24:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tvar arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];\n\n\t/**\n\t * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',\n\t * 'unshift') and notify the listener AFTER the array has been altered. Listeners are\n\t * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments.\n\t */\n\tfunction listenArrayEvents(array, listener) {\n\t\tif (array._chartjs) {\n\t\t\tarray._chartjs.listeners.push(listener);\n\t\t\treturn;\n\t\t}\n\n\t\tObject.defineProperty(array, '_chartjs', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: {\n\t\t\t\tlisteners: [listener]\n\t\t\t}\n\t\t});\n\n\t\tarrayEvents.forEach(function(key) {\n\t\t\tvar method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1);\n\t\t\tvar base = array[key];\n\n\t\t\tObject.defineProperty(array, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: function() {\n\t\t\t\t\tvar args = Array.prototype.slice.call(arguments);\n\t\t\t\t\tvar res = base.apply(this, args);\n\n\t\t\t\t\thelpers.each(array._chartjs.listeners, function(object) {\n\t\t\t\t\t\tif (typeof object[method] === 'function') {\n\t\t\t\t\t\t\tobject[method].apply(object, args);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\treturn res;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Removes the given array event listener and cleanup extra attached properties (such as\n\t * the _chartjs stub and overridden methods) if array doesn't have any more listeners.\n\t */\n\tfunction unlistenArrayEvents(array, listener) {\n\t\tvar stub = array._chartjs;\n\t\tif (!stub) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar listeners = stub.listeners;\n\t\tvar index = listeners.indexOf(listener);\n\t\tif (index !== -1) {\n\t\t\tlisteners.splice(index, 1);\n\t\t}\n\n\t\tif (listeners.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tarrayEvents.forEach(function(key) {\n\t\t\tdelete array[key];\n\t\t});\n\n\t\tdelete array._chartjs;\n\t}\n\n\t// Base class for all dataset controllers (line, bar, etc)\n\tChart.DatasetController = function(chart, datasetIndex) {\n\t\tthis.initialize(chart, datasetIndex);\n\t};\n\n\thelpers.extend(Chart.DatasetController.prototype, {\n\n\t\t/**\n\t\t * Element type used to generate a meta dataset (e.g. Chart.element.Line).\n\t\t * @type {Chart.core.element}\n\t\t */\n\t\tdatasetElementType: null,\n\n\t\t/**\n\t\t * Element type used to generate a meta data (e.g. Chart.element.Point).\n\t\t * @type {Chart.core.element}\n\t\t */\n\t\tdataElementType: null,\n\n\t\tinitialize: function(chart, datasetIndex) {\n\t\t\tvar me = this;\n\t\t\tme.chart = chart;\n\t\t\tme.index = datasetIndex;\n\t\t\tme.linkScales();\n\t\t\tme.addElements();\n\t\t},\n\n\t\tupdateIndex: function(datasetIndex) {\n\t\t\tthis.index = datasetIndex;\n\t\t},\n\n\t\tlinkScales: function() {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar dataset = me.getDataset();\n\n\t\t\tif (meta.xAxisID === null) {\n\t\t\t\tmeta.xAxisID = dataset.xAxisID || me.chart.options.scales.xAxes[0].id;\n\t\t\t}\n\t\t\tif (meta.yAxisID === null) {\n\t\t\t\tmeta.yAxisID = dataset.yAxisID || me.chart.options.scales.yAxes[0].id;\n\t\t\t}\n\t\t},\n\n\t\tgetDataset: function() {\n\t\t\treturn this.chart.data.datasets[this.index];\n\t\t},\n\n\t\tgetMeta: function() {\n\t\t\treturn this.chart.getDatasetMeta(this.index);\n\t\t},\n\n\t\tgetScaleForId: function(scaleID) {\n\t\t\treturn this.chart.scales[scaleID];\n\t\t},\n\n\t\treset: function() {\n\t\t\tthis.update(true);\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tdestroy: function() {\n\t\t\tif (this._data) {\n\t\t\t\tunlistenArrayEvents(this._data, this);\n\t\t\t}\n\t\t},\n\n\t\tcreateMetaDataset: function() {\n\t\t\tvar me = this;\n\t\t\tvar type = me.datasetElementType;\n\t\t\treturn type && new type({\n\t\t\t\t_chart: me.chart.chart,\n\t\t\t\t_datasetIndex: me.index\n\t\t\t});\n\t\t},\n\n\t\tcreateMetaData: function(index) {\n\t\t\tvar me = this;\n\t\t\tvar type = me.dataElementType;\n\t\t\treturn type && new type({\n\t\t\t\t_chart: me.chart.chart,\n\t\t\t\t_datasetIndex: me.index,\n\t\t\t\t_index: index\n\t\t\t});\n\t\t},\n\n\t\taddElements: function() {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar data = me.getDataset().data || [];\n\t\t\tvar metaData = meta.data;\n\t\t\tvar i, ilen;\n\n\t\t\tfor (i=0, ilen=data.length; i<ilen; ++i) {\n\t\t\t\tmetaData[i] = metaData[i] || me.createMetaData(i);\n\t\t\t}\n\n\t\t\tmeta.dataset = meta.dataset || me.createMetaDataset();\n\t\t},\n\n\t\taddElementAndReset: function(index) {\n\t\t\tvar element = this.createMetaData(index);\n\t\t\tthis.getMeta().data.splice(index, 0, element);\n\t\t\tthis.updateElement(element, index, true);\n\t\t},\n\n\t\tbuildOrUpdateElements: function() {\n\t\t\tvar me = this;\n\t\t\tvar dataset = me.getDataset();\n\t\t\tvar data = dataset.data || (dataset.data = []);\n\n\t\t\t// In order to correctly handle data addition/deletion animation (an thus simulate\n\t\t\t// real-time charts), we need to monitor these data modifications and synchronize\n\t\t\t// the internal meta data accordingly.\n\t\t\tif (me._data !== data) {\n\t\t\t\tif (me._data) {\n\t\t\t\t\t// This case happens when the user replaced the data array instance.\n\t\t\t\t\tunlistenArrayEvents(me._data, me);\n\t\t\t\t}\n\n\t\t\t\tlistenArrayEvents(data, me);\n\t\t\t\tme._data = data;\n\t\t\t}\n\n\t\t\t// Re-sync meta data in case the user replaced the data array or if we missed\n\t\t\t// any updates and so make sure that we handle number of datapoints changing.\n\t\t\tme.resyncElements();\n\t\t},\n\n\t\tupdate: helpers.noop,\n\n\t\tdraw: function(ease) {\n\t\t\tvar easingDecimal = ease || 1;\n\t\t\tvar i, len;\n\t\t\tvar metaData = this.getMeta().data;\n\t\t\tfor (i = 0, len = metaData.length; i < len; ++i) {\n\t\t\t\tmetaData[i].transition(easingDecimal).draw();\n\t\t\t}\n\t\t},\n\n\t\tremoveHoverStyle: function(element, elementOpts) {\n\t\t\tvar dataset = this.chart.data.datasets[element._datasetIndex],\n\t\t\t\tindex = element._index,\n\t\t\t\tcustom = element.custom || {},\n\t\t\t\tvalueOrDefault = helpers.getValueAtIndexOrDefault,\n\t\t\t\tmodel = element._model;\n\n\t\t\tmodel.backgroundColor = custom.backgroundColor ? custom.backgroundColor : valueOrDefault(dataset.backgroundColor, index, elementOpts.backgroundColor);\n\t\t\tmodel.borderColor = custom.borderColor ? custom.borderColor : valueOrDefault(dataset.borderColor, index, elementOpts.borderColor);\n\t\t\tmodel.borderWidth = custom.borderWidth ? custom.borderWidth : valueOrDefault(dataset.borderWidth, index, elementOpts.borderWidth);\n\t\t},\n\n\t\tsetHoverStyle: function(element) {\n\t\t\tvar dataset = this.chart.data.datasets[element._datasetIndex],\n\t\t\t\tindex = element._index,\n\t\t\t\tcustom = element.custom || {},\n\t\t\t\tvalueOrDefault = helpers.getValueAtIndexOrDefault,\n\t\t\t\tgetHoverColor = helpers.getHoverColor,\n\t\t\t\tmodel = element._model;\n\n\t\t\tmodel.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : valueOrDefault(dataset.hoverBackgroundColor, index, getHoverColor(model.backgroundColor));\n\t\t\tmodel.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : valueOrDefault(dataset.hoverBorderColor, index, getHoverColor(model.borderColor));\n\t\t\tmodel.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : valueOrDefault(dataset.hoverBorderWidth, index, model.borderWidth);\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tresyncElements: function() {\n\t\t\tvar me = this;\n\t\t\tvar meta = me.getMeta();\n\t\t\tvar data = me.getDataset().data;\n\t\t\tvar numMeta = meta.data.length;\n\t\t\tvar numData = data.length;\n\n\t\t\tif (numData < numMeta) {\n\t\t\t\tmeta.data.splice(numData, numMeta - numData);\n\t\t\t} else if (numData > numMeta) {\n\t\t\t\tme.insertElements(numMeta, numData - numMeta);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tinsertElements: function(start, count) {\n\t\t\tfor (var i=0; i<count; ++i) {\n\t\t\t\tthis.addElementAndReset(start + i);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tonDataPush: function() {\n\t\t\tthis.insertElements(this.getDataset().data.length-1, arguments.length);\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tonDataPop: function() {\n\t\t\tthis.getMeta().data.pop();\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tonDataShift: function() {\n\t\t\tthis.getMeta().data.shift();\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tonDataSplice: function(start, count) {\n\t\t\tthis.getMeta().data.splice(start, count);\n\t\t\tthis.insertElements(start, arguments.length - 2);\n\t\t},\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tonDataUnshift: function() {\n\t\t\tthis.insertElements(0, arguments.length);\n\t\t}\n\t});\n\n\tChart.DatasetController.extend = helpers.inherits;\n};\n\n},{}],25:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.elements = {};\n\n\tChart.Element = function(configuration) {\n\t\thelpers.extend(this, configuration);\n\t\tthis.initialize.apply(this, arguments);\n\t};\n\n\thelpers.extend(Chart.Element.prototype, {\n\n\t\tinitialize: function() {\n\t\t\tthis.hidden = false;\n\t\t},\n\n\t\tpivot: function() {\n\t\t\tvar me = this;\n\t\t\tif (!me._view) {\n\t\t\t\tme._view = helpers.clone(me._model);\n\t\t\t}\n\t\t\tme._start = helpers.clone(me._view);\n\t\t\treturn me;\n\t\t},\n\n\t\ttransition: function(ease) {\n\t\t\tvar me = this;\n\n\t\t\tif (!me._view) {\n\t\t\t\tme._view = helpers.clone(me._model);\n\t\t\t}\n\n\t\t\t// No animation -> No Transition\n\t\t\tif (ease === 1) {\n\t\t\t\tme._view = me._model;\n\t\t\t\tme._start = null;\n\t\t\t\treturn me;\n\t\t\t}\n\n\t\t\tif (!me._start) {\n\t\t\t\tme.pivot();\n\t\t\t}\n\n\t\t\thelpers.each(me._model, function(value, key) {\n\n\t\t\t\tif (key[0] === '_') {\n\t\t\t\t\t// Only non-underscored properties\n\t\t\t\t// Init if doesn't exist\n\t\t\t\t} else if (!me._view.hasOwnProperty(key)) {\n\t\t\t\t\tif (typeof value === 'number' && !isNaN(me._view[key])) {\n\t\t\t\t\t\tme._view[key] = value * ease;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tme._view[key] = value;\n\t\t\t\t\t}\n\t\t\t\t// No unnecessary computations\n\t\t\t\t} else if (value === me._view[key]) {\n\t\t\t\t\t// It's the same! Woohoo!\n\t\t\t\t// Color transitions if possible\n\t\t\t\t} else if (typeof value === 'string') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar color = helpers.color(me._model[key]).mix(helpers.color(me._start[key]), ease);\n\t\t\t\t\t\tme._view[key] = color.rgbString();\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tme._view[key] = value;\n\t\t\t\t\t}\n\t\t\t\t// Number transitions\n\t\t\t\t} else if (typeof value === 'number') {\n\t\t\t\t\tvar startVal = me._start[key] !== undefined && isNaN(me._start[key]) === false ? me._start[key] : 0;\n\t\t\t\t\tme._view[key] = ((me._model[key] - startVal) * ease) + startVal;\n\t\t\t\t// Everything else\n\t\t\t\t} else {\n\t\t\t\t\tme._view[key] = value;\n\t\t\t\t}\n\t\t\t}, me);\n\n\t\t\treturn me;\n\t\t},\n\n\t\ttooltipPosition: function() {\n\t\t\treturn {\n\t\t\t\tx: this._model.x,\n\t\t\t\ty: this._model.y\n\t\t\t};\n\t\t},\n\n\t\thasValue: function() {\n\t\t\treturn helpers.isNumber(this._model.x) && helpers.isNumber(this._model.y);\n\t\t}\n\t});\n\n\tChart.Element.extend = helpers.inherits;\n\n};\n\n},{}],26:[function(require,module,exports){\n/* global window: false */\n/* global document: false */\n'use strict';\n\nvar color = require(3);\n\nmodule.exports = function(Chart) {\n\t// Global Chart helpers object for utility methods and classes\n\tvar helpers = Chart.helpers = {};\n\n\t// -- Basic js utility methods\n\thelpers.each = function(loopable, callback, self, reverse) {\n\t\t// Check to see if null or undefined firstly.\n\t\tvar i, len;\n\t\tif (helpers.isArray(loopable)) {\n\t\t\tlen = loopable.length;\n\t\t\tif (reverse) {\n\t\t\t\tfor (i = len - 1; i >= 0; i--) {\n\t\t\t\t\tcallback.call(self, loopable[i], i);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\t\tcallback.call(self, loopable[i], i);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (typeof loopable === 'object') {\n\t\t\tvar keys = Object.keys(loopable);\n\t\t\tlen = keys.length;\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tcallback.call(self, loopable[keys[i]], keys[i]);\n\t\t\t}\n\t\t}\n\t};\n\thelpers.clone = function(obj) {\n\t\tvar objClone = {};\n\t\thelpers.each(obj, function(value, key) {\n\t\t\tif (helpers.isArray(value)) {\n\t\t\t\tobjClone[key] = value.slice(0);\n\t\t\t} else if (typeof value === 'object' && value !== null) {\n\t\t\t\tobjClone[key] = helpers.clone(value);\n\t\t\t} else {\n\t\t\t\tobjClone[key] = value;\n\t\t\t}\n\t\t});\n\t\treturn objClone;\n\t};\n\thelpers.extend = function(base) {\n\t\tvar setFn = function(value, key) {\n\t\t\tbase[key] = value;\n\t\t};\n\t\tfor (var i = 1, ilen = arguments.length; i < ilen; i++) {\n\t\t\thelpers.each(arguments[i], setFn);\n\t\t}\n\t\treturn base;\n\t};\n\t// Need a special merge function to chart configs since they are now grouped\n\thelpers.configMerge = function(_base) {\n\t\tvar base = helpers.clone(_base);\n\t\thelpers.each(Array.prototype.slice.call(arguments, 1), function(extension) {\n\t\t\thelpers.each(extension, function(value, key) {\n\t\t\t\tvar baseHasProperty = base.hasOwnProperty(key);\n\t\t\t\tvar baseVal = baseHasProperty ? base[key] : {};\n\n\t\t\t\tif (key === 'scales') {\n\t\t\t\t\t// Scale config merging is complex. Add our own function here for that\n\t\t\t\t\tbase[key] = helpers.scaleMerge(baseVal, value);\n\t\t\t\t} else if (key === 'scale') {\n\t\t\t\t\t// Used in polar area & radar charts since there is only one scale\n\t\t\t\t\tbase[key] = helpers.configMerge(baseVal, Chart.scaleService.getScaleDefaults(value.type), value);\n\t\t\t\t} else if (baseHasProperty\n\t\t\t\t\t\t&& typeof baseVal === 'object'\n\t\t\t\t\t\t&& !helpers.isArray(baseVal)\n\t\t\t\t\t\t&& baseVal !== null\n\t\t\t\t\t\t&& typeof value === 'object'\n\t\t\t\t\t\t&& !helpers.isArray(value)) {\n\t\t\t\t\t// If we are overwriting an object with an object, do a merge of the properties.\n\t\t\t\t\tbase[key] = helpers.configMerge(baseVal, value);\n\t\t\t\t} else {\n\t\t\t\t\t// can just overwrite the value in this case\n\t\t\t\t\tbase[key] = value;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn base;\n\t};\n\thelpers.scaleMerge = function(_base, extension) {\n\t\tvar base = helpers.clone(_base);\n\n\t\thelpers.each(extension, function(value, key) {\n\t\t\tif (key === 'xAxes' || key === 'yAxes') {\n\t\t\t\t// These properties are arrays of items\n\t\t\t\tif (base.hasOwnProperty(key)) {\n\t\t\t\t\thelpers.each(value, function(valueObj, index) {\n\t\t\t\t\t\tvar axisType = helpers.getValueOrDefault(valueObj.type, key === 'xAxes' ? 'category' : 'linear');\n\t\t\t\t\t\tvar axisDefaults = Chart.scaleService.getScaleDefaults(axisType);\n\t\t\t\t\t\tif (index >= base[key].length || !base[key][index].type) {\n\t\t\t\t\t\t\tbase[key].push(helpers.configMerge(axisDefaults, valueObj));\n\t\t\t\t\t\t} else if (valueObj.type && valueObj.type !== base[key][index].type) {\n\t\t\t\t\t\t\t// Type changed. Bring in the new defaults before we bring in valueObj so that valueObj can override the correct scale defaults\n\t\t\t\t\t\t\tbase[key][index] = helpers.configMerge(base[key][index], axisDefaults, valueObj);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Type is the same\n\t\t\t\t\t\t\tbase[key][index] = helpers.configMerge(base[key][index], valueObj);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tbase[key] = [];\n\t\t\t\t\thelpers.each(value, function(valueObj) {\n\t\t\t\t\t\tvar axisType = helpers.getValueOrDefault(valueObj.type, key === 'xAxes' ? 'category' : 'linear');\n\t\t\t\t\t\tbase[key].push(helpers.configMerge(Chart.scaleService.getScaleDefaults(axisType), valueObj));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (base.hasOwnProperty(key) && typeof base[key] === 'object' && base[key] !== null && typeof value === 'object') {\n\t\t\t\t// If we are overwriting an object with an object, do a merge of the properties.\n\t\t\t\tbase[key] = helpers.configMerge(base[key], value);\n\n\t\t\t} else {\n\t\t\t\t// can just overwrite the value in this case\n\t\t\t\tbase[key] = value;\n\t\t\t}\n\t\t});\n\n\t\treturn base;\n\t};\n\thelpers.getValueAtIndexOrDefault = function(value, index, defaultValue) {\n\t\tif (value === undefined || value === null) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\tif (helpers.isArray(value)) {\n\t\t\treturn index < value.length ? value[index] : defaultValue;\n\t\t}\n\n\t\treturn value;\n\t};\n\thelpers.getValueOrDefault = function(value, defaultValue) {\n\t\treturn value === undefined ? defaultValue : value;\n\t};\n\thelpers.indexOf = Array.prototype.indexOf?\n\t\tfunction(array, item) {\n\t\t\treturn array.indexOf(item);\n\t\t}:\n\t\tfunction(array, item) {\n\t\t\tfor (var i = 0, ilen = array.length; i < ilen; ++i) {\n\t\t\t\tif (array[i] === item) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn -1;\n\t\t};\n\thelpers.where = function(collection, filterCallback) {\n\t\tif (helpers.isArray(collection) && Array.prototype.filter) {\n\t\t\treturn collection.filter(filterCallback);\n\t\t}\n\t\tvar filtered = [];\n\n\t\thelpers.each(collection, function(item) {\n\t\t\tif (filterCallback(item)) {\n\t\t\t\tfiltered.push(item);\n\t\t\t}\n\t\t});\n\n\t\treturn filtered;\n\t};\n\thelpers.findIndex = Array.prototype.findIndex?\n\t\tfunction(array, callback, scope) {\n\t\t\treturn array.findIndex(callback, scope);\n\t\t} :\n\t\tfunction(array, callback, scope) {\n\t\t\tscope = scope === undefined? array : scope;\n\t\t\tfor (var i = 0, ilen = array.length; i < ilen; ++i) {\n\t\t\t\tif (callback.call(scope, array[i], i, array)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn -1;\n\t\t};\n\thelpers.findNextWhere = function(arrayToSearch, filterCallback, startIndex) {\n\t\t// Default to start of the array\n\t\tif (startIndex === undefined || startIndex === null) {\n\t\t\tstartIndex = -1;\n\t\t}\n\t\tfor (var i = startIndex + 1; i < arrayToSearch.length; i++) {\n\t\t\tvar currentItem = arrayToSearch[i];\n\t\t\tif (filterCallback(currentItem)) {\n\t\t\t\treturn currentItem;\n\t\t\t}\n\t\t}\n\t};\n\thelpers.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex) {\n\t\t// Default to end of the array\n\t\tif (startIndex === undefined || startIndex === null) {\n\t\t\tstartIndex = arrayToSearch.length;\n\t\t}\n\t\tfor (var i = startIndex - 1; i >= 0; i--) {\n\t\t\tvar currentItem = arrayToSearch[i];\n\t\t\tif (filterCallback(currentItem)) {\n\t\t\t\treturn currentItem;\n\t\t\t}\n\t\t}\n\t};\n\thelpers.inherits = function(extensions) {\n\t\t// Basic javascript inheritance based on the model created in Backbone.js\n\t\tvar me = this;\n\t\tvar ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() {\n\t\t\treturn me.apply(this, arguments);\n\t\t};\n\n\t\tvar Surrogate = function() {\n\t\t\tthis.constructor = ChartElement;\n\t\t};\n\t\tSurrogate.prototype = me.prototype;\n\t\tChartElement.prototype = new Surrogate();\n\n\t\tChartElement.extend = helpers.inherits;\n\n\t\tif (extensions) {\n\t\t\thelpers.extend(ChartElement.prototype, extensions);\n\t\t}\n\n\t\tChartElement.__super__ = me.prototype;\n\n\t\treturn ChartElement;\n\t};\n\thelpers.noop = function() {};\n\thelpers.uid = (function() {\n\t\tvar id = 0;\n\t\treturn function() {\n\t\t\treturn id++;\n\t\t};\n\t}());\n\t// -- Math methods\n\thelpers.isNumber = function(n) {\n\t\treturn !isNaN(parseFloat(n)) && isFinite(n);\n\t};\n\thelpers.almostEquals = function(x, y, epsilon) {\n\t\treturn Math.abs(x - y) < epsilon;\n\t};\n\thelpers.almostWhole = function(x, epsilon) {\n\t\tvar rounded = Math.round(x);\n\t\treturn (((rounded - epsilon) < x) && ((rounded + epsilon) > x));\n\t};\n\thelpers.max = function(array) {\n\t\treturn array.reduce(function(max, value) {\n\t\t\tif (!isNaN(value)) {\n\t\t\t\treturn Math.max(max, value);\n\t\t\t}\n\t\t\treturn max;\n\t\t}, Number.NEGATIVE_INFINITY);\n\t};\n\thelpers.min = function(array) {\n\t\treturn array.reduce(function(min, value) {\n\t\t\tif (!isNaN(value)) {\n\t\t\t\treturn Math.min(min, value);\n\t\t\t}\n\t\t\treturn min;\n\t\t}, Number.POSITIVE_INFINITY);\n\t};\n\thelpers.sign = Math.sign?\n\t\tfunction(x) {\n\t\t\treturn Math.sign(x);\n\t\t} :\n\t\tfunction(x) {\n\t\t\tx = +x; // convert to a number\n\t\t\tif (x === 0 || isNaN(x)) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\treturn x > 0 ? 1 : -1;\n\t\t};\n\thelpers.log10 = Math.log10?\n\t\tfunction(x) {\n\t\t\treturn Math.log10(x);\n\t\t} :\n\t\tfunction(x) {\n\t\t\treturn Math.log(x) / Math.LN10;\n\t\t};\n\thelpers.toRadians = function(degrees) {\n\t\treturn degrees * (Math.PI / 180);\n\t};\n\thelpers.toDegrees = function(radians) {\n\t\treturn radians * (180 / Math.PI);\n\t};\n\t// Gets the angle from vertical upright to the point about a centre.\n\thelpers.getAngleFromPoint = function(centrePoint, anglePoint) {\n\t\tvar distanceFromXCenter = anglePoint.x - centrePoint.x,\n\t\t\tdistanceFromYCenter = anglePoint.y - centrePoint.y,\n\t\t\tradialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\n\n\t\tvar angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\n\n\t\tif (angle < (-0.5 * Math.PI)) {\n\t\t\tangle += 2.0 * Math.PI; // make sure the returned angle is in the range of (-PI/2, 3PI/2]\n\t\t}\n\n\t\treturn {\n\t\t\tangle: angle,\n\t\t\tdistance: radialDistanceFromCenter\n\t\t};\n\t};\n\thelpers.distanceBetweenPoints = function(pt1, pt2) {\n\t\treturn Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\n\t};\n\thelpers.aliasPixel = function(pixelWidth) {\n\t\treturn (pixelWidth % 2 === 0) ? 0 : 0.5;\n\t};\n\thelpers.splineCurve = function(firstPoint, middlePoint, afterPoint, t) {\n\t\t// Props to Rob Spencer at scaled innovation for his post on splining between points\n\t\t// http://scaledinnovation.com/analytics/splines/aboutSplines.html\n\n\t\t// This function must also respect \"skipped\" points\n\n\t\tvar previous = firstPoint.skip ? middlePoint : firstPoint,\n\t\t\tcurrent = middlePoint,\n\t\t\tnext = afterPoint.skip ? middlePoint : afterPoint;\n\n\t\tvar d01 = Math.sqrt(Math.pow(current.x - previous.x, 2) + Math.pow(current.y - previous.y, 2));\n\t\tvar d12 = Math.sqrt(Math.pow(next.x - current.x, 2) + Math.pow(next.y - current.y, 2));\n\n\t\tvar s01 = d01 / (d01 + d12);\n\t\tvar s12 = d12 / (d01 + d12);\n\n\t\t// If all points are the same, s01 & s02 will be inf\n\t\ts01 = isNaN(s01) ? 0 : s01;\n\t\ts12 = isNaN(s12) ? 0 : s12;\n\n\t\tvar fa = t * s01; // scaling factor for triangle Ta\n\t\tvar fb = t * s12;\n\n\t\treturn {\n\t\t\tprevious: {\n\t\t\t\tx: current.x - fa * (next.x - previous.x),\n\t\t\t\ty: current.y - fa * (next.y - previous.y)\n\t\t\t},\n\t\t\tnext: {\n\t\t\t\tx: current.x + fb * (next.x - previous.x),\n\t\t\t\ty: current.y + fb * (next.y - previous.y)\n\t\t\t}\n\t\t};\n\t};\n\thelpers.EPSILON = Number.EPSILON || 1e-14;\n\thelpers.splineCurveMonotone = function(points) {\n\t\t// This function calculates Bézier control points in a similar way than |splineCurve|,\n\t\t// but preserves monotonicity of the provided data and ensures no local extremums are added\n\t\t// between the dataset discrete points due to the interpolation.\n\t\t// See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\n\n\t\tvar pointsWithTangents = (points || []).map(function(point) {\n\t\t\treturn {\n\t\t\t\tmodel: point._model,\n\t\t\t\tdeltaK: 0,\n\t\t\t\tmK: 0\n\t\t\t};\n\t\t});\n\n\t\t// Calculate slopes (deltaK) and initialize tangents (mK)\n\t\tvar pointsLen = pointsWithTangents.length;\n\t\tvar i, pointBefore, pointCurrent, pointAfter;\n\t\tfor (i = 0; i < pointsLen; ++i) {\n\t\t\tpointCurrent = pointsWithTangents[i];\n\t\t\tif (pointCurrent.model.skip) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tpointBefore = i > 0 ? pointsWithTangents[i - 1] : null;\n\t\t\tpointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;\n\t\t\tif (pointAfter && !pointAfter.model.skip) {\n\t\t\t\tvar slopeDeltaX = (pointAfter.model.x - pointCurrent.model.x);\n\n\t\t\t\t// In the case of two points that appear at the same x pixel, slopeDeltaX is 0\n\t\t\t\tpointCurrent.deltaK = slopeDeltaX !== 0 ? (pointAfter.model.y - pointCurrent.model.y) / slopeDeltaX : 0;\n\t\t\t}\n\n\t\t\tif (!pointBefore || pointBefore.model.skip) {\n\t\t\t\tpointCurrent.mK = pointCurrent.deltaK;\n\t\t\t} else if (!pointAfter || pointAfter.model.skip) {\n\t\t\t\tpointCurrent.mK = pointBefore.deltaK;\n\t\t\t} else if (this.sign(pointBefore.deltaK) !== this.sign(pointCurrent.deltaK)) {\n\t\t\t\tpointCurrent.mK = 0;\n\t\t\t} else {\n\t\t\t\tpointCurrent.mK = (pointBefore.deltaK + pointCurrent.deltaK) / 2;\n\t\t\t}\n\t\t}\n\n\t\t// Adjust tangents to ensure monotonic properties\n\t\tvar alphaK, betaK, tauK, squaredMagnitude;\n\t\tfor (i = 0; i < pointsLen - 1; ++i) {\n\t\t\tpointCurrent = pointsWithTangents[i];\n\t\t\tpointAfter = pointsWithTangents[i + 1];\n\t\t\tif (pointCurrent.model.skip || pointAfter.model.skip) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (helpers.almostEquals(pointCurrent.deltaK, 0, this.EPSILON)) {\n\t\t\t\tpointCurrent.mK = pointAfter.mK = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\talphaK = pointCurrent.mK / pointCurrent.deltaK;\n\t\t\tbetaK = pointAfter.mK / pointCurrent.deltaK;\n\t\t\tsquaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\n\t\t\tif (squaredMagnitude <= 9) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\ttauK = 3 / Math.sqrt(squaredMagnitude);\n\t\t\tpointCurrent.mK = alphaK * tauK * pointCurrent.deltaK;\n\t\t\tpointAfter.mK = betaK * tauK * pointCurrent.deltaK;\n\t\t}\n\n\t\t// Compute control points\n\t\tvar deltaX;\n\t\tfor (i = 0; i < pointsLen; ++i) {\n\t\t\tpointCurrent = pointsWithTangents[i];\n\t\t\tif (pointCurrent.model.skip) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tpointBefore = i > 0 ? pointsWithTangents[i - 1] : null;\n\t\t\tpointAfter = i < pointsLen - 1 ? pointsWithTangents[i + 1] : null;\n\t\t\tif (pointBefore && !pointBefore.model.skip) {\n\t\t\t\tdeltaX = (pointCurrent.model.x - pointBefore.model.x) / 3;\n\t\t\t\tpointCurrent.model.controlPointPreviousX = pointCurrent.model.x - deltaX;\n\t\t\t\tpointCurrent.model.controlPointPreviousY = pointCurrent.model.y - deltaX * pointCurrent.mK;\n\t\t\t}\n\t\t\tif (pointAfter && !pointAfter.model.skip) {\n\t\t\t\tdeltaX = (pointAfter.model.x - pointCurrent.model.x) / 3;\n\t\t\t\tpointCurrent.model.controlPointNextX = pointCurrent.model.x + deltaX;\n\t\t\t\tpointCurrent.model.controlPointNextY = pointCurrent.model.y + deltaX * pointCurrent.mK;\n\t\t\t}\n\t\t}\n\t};\n\thelpers.nextItem = function(collection, index, loop) {\n\t\tif (loop) {\n\t\t\treturn index >= collection.length - 1 ? collection[0] : collection[index + 1];\n\t\t}\n\t\treturn index >= collection.length - 1 ? collection[collection.length - 1] : collection[index + 1];\n\t};\n\thelpers.previousItem = function(collection, index, loop) {\n\t\tif (loop) {\n\t\t\treturn index <= 0 ? collection[collection.length - 1] : collection[index - 1];\n\t\t}\n\t\treturn index <= 0 ? collection[0] : collection[index - 1];\n\t};\n\t// Implementation of the nice number algorithm used in determining where axis labels will go\n\thelpers.niceNum = function(range, round) {\n\t\tvar exponent = Math.floor(helpers.log10(range));\n\t\tvar fraction = range / Math.pow(10, exponent);\n\t\tvar niceFraction;\n\n\t\tif (round) {\n\t\t\tif (fraction < 1.5) {\n\t\t\t\tniceFraction = 1;\n\t\t\t} else if (fraction < 3) {\n\t\t\t\tniceFraction = 2;\n\t\t\t} else if (fraction < 7) {\n\t\t\t\tniceFraction = 5;\n\t\t\t} else {\n\t\t\t\tniceFraction = 10;\n\t\t\t}\n\t\t} else if (fraction <= 1.0) {\n\t\t\tniceFraction = 1;\n\t\t} else if (fraction <= 2) {\n\t\t\tniceFraction = 2;\n\t\t} else if (fraction <= 5) {\n\t\t\tniceFraction = 5;\n\t\t} else {\n\t\t\tniceFraction = 10;\n\t\t}\n\n\t\treturn niceFraction * Math.pow(10, exponent);\n\t};\n\t// Easing functions adapted from Robert Penner's easing equations\n\t// http://www.robertpenner.com/easing/\n\tvar easingEffects = helpers.easingEffects = {\n\t\tlinear: function(t) {\n\t\t\treturn t;\n\t\t},\n\t\teaseInQuad: function(t) {\n\t\t\treturn t * t;\n\t\t},\n\t\teaseOutQuad: function(t) {\n\t\t\treturn -1 * t * (t - 2);\n\t\t},\n\t\teaseInOutQuad: function(t) {\n\t\t\tif ((t /= 1 / 2) < 1) {\n\t\t\t\treturn 1 / 2 * t * t;\n\t\t\t}\n\t\t\treturn -1 / 2 * ((--t) * (t - 2) - 1);\n\t\t},\n\t\teaseInCubic: function(t) {\n\t\t\treturn t * t * t;\n\t\t},\n\t\teaseOutCubic: function(t) {\n\t\t\treturn 1 * ((t = t / 1 - 1) * t * t + 1);\n\t\t},\n\t\teaseInOutCubic: function(t) {\n\t\t\tif ((t /= 1 / 2) < 1) {\n\t\t\t\treturn 1 / 2 * t * t * t;\n\t\t\t}\n\t\t\treturn 1 / 2 * ((t -= 2) * t * t + 2);\n\t\t},\n\t\teaseInQuart: function(t) {\n\t\t\treturn t * t * t * t;\n\t\t},\n\t\teaseOutQuart: function(t) {\n\t\t\treturn -1 * ((t = t / 1 - 1) * t * t * t - 1);\n\t\t},\n\t\teaseInOutQuart: function(t) {\n\t\t\tif ((t /= 1 / 2) < 1) {\n\t\t\t\treturn 1 / 2 * t * t * t * t;\n\t\t\t}\n\t\t\treturn -1 / 2 * ((t -= 2) * t * t * t - 2);\n\t\t},\n\t\teaseInQuint: function(t) {\n\t\t\treturn 1 * (t /= 1) * t * t * t * t;\n\t\t},\n\t\teaseOutQuint: function(t) {\n\t\t\treturn 1 * ((t = t / 1 - 1) * t * t * t * t + 1);\n\t\t},\n\t\teaseInOutQuint: function(t) {\n\t\t\tif ((t /= 1 / 2) < 1) {\n\t\t\t\treturn 1 / 2 * t * t * t * t * t;\n\t\t\t}\n\t\t\treturn 1 / 2 * ((t -= 2) * t * t * t * t + 2);\n\t\t},\n\t\teaseInSine: function(t) {\n\t\t\treturn -1 * Math.cos(t / 1 * (Math.PI / 2)) + 1;\n\t\t},\n\t\teaseOutSine: function(t) {\n\t\t\treturn 1 * Math.sin(t / 1 * (Math.PI / 2));\n\t\t},\n\t\teaseInOutSine: function(t) {\n\t\t\treturn -1 / 2 * (Math.cos(Math.PI * t / 1) - 1);\n\t\t},\n\t\teaseInExpo: function(t) {\n\t\t\treturn (t === 0) ? 1 : 1 * Math.pow(2, 10 * (t / 1 - 1));\n\t\t},\n\t\teaseOutExpo: function(t) {\n\t\t\treturn (t === 1) ? 1 : 1 * (-Math.pow(2, -10 * t / 1) + 1);\n\t\t},\n\t\teaseInOutExpo: function(t) {\n\t\t\tif (t === 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif (t === 1) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif ((t /= 1 / 2) < 1) {\n\t\t\t\treturn 1 / 2 * Math.pow(2, 10 * (t - 1));\n\t\t\t}\n\t\t\treturn 1 / 2 * (-Math.pow(2, -10 * --t) + 2);\n\t\t},\n\t\teaseInCirc: function(t) {\n\t\t\tif (t >= 1) {\n\t\t\t\treturn t;\n\t\t\t}\n\t\t\treturn -1 * (Math.sqrt(1 - (t /= 1) * t) - 1);\n\t\t},\n\t\teaseOutCirc: function(t) {\n\t\t\treturn 1 * Math.sqrt(1 - (t = t / 1 - 1) * t);\n\t\t},\n\t\teaseInOutCirc: function(t) {\n\t\t\tif ((t /= 1 / 2) < 1) {\n\t\t\t\treturn -1 / 2 * (Math.sqrt(1 - t * t) - 1);\n\t\t\t}\n\t\t\treturn 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n\t\t},\n\t\teaseInElastic: function(t) {\n\t\t\tvar s = 1.70158;\n\t\t\tvar p = 0;\n\t\t\tvar a = 1;\n\t\t\tif (t === 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif ((t /= 1) === 1) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (!p) {\n\t\t\t\tp = 1 * 0.3;\n\t\t\t}\n\t\t\tif (a < Math.abs(1)) {\n\t\t\t\ta = 1;\n\t\t\t\ts = p / 4;\n\t\t\t} else {\n\t\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\n\t\t\t}\n\t\t\treturn -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));\n\t\t},\n\t\teaseOutElastic: function(t) {\n\t\t\tvar s = 1.70158;\n\t\t\tvar p = 0;\n\t\t\tvar a = 1;\n\t\t\tif (t === 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif ((t /= 1) === 1) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (!p) {\n\t\t\t\tp = 1 * 0.3;\n\t\t\t}\n\t\t\tif (a < Math.abs(1)) {\n\t\t\t\ta = 1;\n\t\t\t\ts = p / 4;\n\t\t\t} else {\n\t\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\n\t\t\t}\n\t\t\treturn a * Math.pow(2, -10 * t) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) + 1;\n\t\t},\n\t\teaseInOutElastic: function(t) {\n\t\t\tvar s = 1.70158;\n\t\t\tvar p = 0;\n\t\t\tvar a = 1;\n\t\t\tif (t === 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif ((t /= 1 / 2) === 2) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (!p) {\n\t\t\t\tp = 1 * (0.3 * 1.5);\n\t\t\t}\n\t\t\tif (a < Math.abs(1)) {\n\t\t\t\ta = 1;\n\t\t\t\ts = p / 4;\n\t\t\t} else {\n\t\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\n\t\t\t}\n\t\t\tif (t < 1) {\n\t\t\t\treturn -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));\n\t\t\t}\n\t\t\treturn a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) * 0.5 + 1;\n\t\t},\n\t\teaseInBack: function(t) {\n\t\t\tvar s = 1.70158;\n\t\t\treturn 1 * (t /= 1) * t * ((s + 1) * t - s);\n\t\t},\n\t\teaseOutBack: function(t) {\n\t\t\tvar s = 1.70158;\n\t\t\treturn 1 * ((t = t / 1 - 1) * t * ((s + 1) * t + s) + 1);\n\t\t},\n\t\teaseInOutBack: function(t) {\n\t\t\tvar s = 1.70158;\n\t\t\tif ((t /= 1 / 2) < 1) {\n\t\t\t\treturn 1 / 2 * (t * t * (((s *= (1.525)) + 1) * t - s));\n\t\t\t}\n\t\t\treturn 1 / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);\n\t\t},\n\t\teaseInBounce: function(t) {\n\t\t\treturn 1 - easingEffects.easeOutBounce(1 - t);\n\t\t},\n\t\teaseOutBounce: function(t) {\n\t\t\tif ((t /= 1) < (1 / 2.75)) {\n\t\t\t\treturn 1 * (7.5625 * t * t);\n\t\t\t} else if (t < (2 / 2.75)) {\n\t\t\t\treturn 1 * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75);\n\t\t\t} else if (t < (2.5 / 2.75)) {\n\t\t\t\treturn 1 * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375);\n\t\t\t}\n\t\t\treturn 1 * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375);\n\t\t},\n\t\teaseInOutBounce: function(t) {\n\t\t\tif (t < 1 / 2) {\n\t\t\t\treturn easingEffects.easeInBounce(t * 2) * 0.5;\n\t\t\t}\n\t\t\treturn easingEffects.easeOutBounce(t * 2 - 1) * 0.5 + 1 * 0.5;\n\t\t}\n\t};\n\t// Request animation polyfill - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/\n\thelpers.requestAnimFrame = (function() {\n\t\treturn window.requestAnimationFrame ||\n\t\t\twindow.webkitRequestAnimationFrame ||\n\t\t\twindow.mozRequestAnimationFrame ||\n\t\t\twindow.oRequestAnimationFrame ||\n\t\t\twindow.msRequestAnimationFrame ||\n\t\t\tfunction(callback) {\n\t\t\t\treturn window.setTimeout(callback, 1000 / 60);\n\t\t\t};\n\t}());\n\t// -- DOM methods\n\thelpers.getRelativePosition = function(evt, chart) {\n\t\tvar mouseX, mouseY;\n\t\tvar e = evt.originalEvent || evt,\n\t\t\tcanvas = evt.currentTarget || evt.srcElement,\n\t\t\tboundingRect = canvas.getBoundingClientRect();\n\n\t\tvar touches = e.touches;\n\t\tif (touches && touches.length > 0) {\n\t\t\tmouseX = touches[0].clientX;\n\t\t\tmouseY = touches[0].clientY;\n\n\t\t} else {\n\t\t\tmouseX = e.clientX;\n\t\t\tmouseY = e.clientY;\n\t\t}\n\n\t\t// Scale mouse coordinates into canvas coordinates\n\t\t// by following the pattern laid out by 'jerryj' in the comments of\n\t\t// http://www.html5canvastutorials.com/advanced/html5-canvas-mouse-coordinates/\n\t\tvar paddingLeft = parseFloat(helpers.getStyle(canvas, 'padding-left'));\n\t\tvar paddingTop = parseFloat(helpers.getStyle(canvas, 'padding-top'));\n\t\tvar paddingRight = parseFloat(helpers.getStyle(canvas, 'padding-right'));\n\t\tvar paddingBottom = parseFloat(helpers.getStyle(canvas, 'padding-bottom'));\n\t\tvar width = boundingRect.right - boundingRect.left - paddingLeft - paddingRight;\n\t\tvar height = boundingRect.bottom - boundingRect.top - paddingTop - paddingBottom;\n\n\t\t// We divide by the current device pixel ratio, because the canvas is scaled up by that amount in each direction. However\n\t\t// the backend model is in unscaled coordinates. Since we are going to deal with our model coordinates, we go back here\n\t\tmouseX = Math.round((mouseX - boundingRect.left - paddingLeft) / (width) * canvas.width / chart.currentDevicePixelRatio);\n\t\tmouseY = Math.round((mouseY - boundingRect.top - paddingTop) / (height) * canvas.height / chart.currentDevicePixelRatio);\n\n\t\treturn {\n\t\t\tx: mouseX,\n\t\t\ty: mouseY\n\t\t};\n\n\t};\n\thelpers.addEvent = function(node, eventType, method) {\n\t\tif (node.addEventListener) {\n\t\t\tnode.addEventListener(eventType, method);\n\t\t} else if (node.attachEvent) {\n\t\t\tnode.attachEvent('on' + eventType, method);\n\t\t} else {\n\t\t\tnode['on' + eventType] = method;\n\t\t}\n\t};\n\thelpers.removeEvent = function(node, eventType, handler) {\n\t\tif (node.removeEventListener) {\n\t\t\tnode.removeEventListener(eventType, handler, false);\n\t\t} else if (node.detachEvent) {\n\t\t\tnode.detachEvent('on' + eventType, handler);\n\t\t} else {\n\t\t\tnode['on' + eventType] = helpers.noop;\n\t\t}\n\t};\n\n\t// Private helper function to convert max-width/max-height values that may be percentages into a number\n\tfunction parseMaxStyle(styleValue, node, parentProperty) {\n\t\tvar valueInPixels;\n\t\tif (typeof(styleValue) === 'string') {\n\t\t\tvalueInPixels = parseInt(styleValue, 10);\n\n\t\t\tif (styleValue.indexOf('%') !== -1) {\n\t\t\t\t// percentage * size in dimension\n\t\t\t\tvalueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n\t\t\t}\n\t\t} else {\n\t\t\tvalueInPixels = styleValue;\n\t\t}\n\n\t\treturn valueInPixels;\n\t}\n\n\t/**\n\t * Returns if the given value contains an effective constraint.\n\t * @private\n\t */\n\tfunction isConstrainedValue(value) {\n\t\treturn value !== undefined && value !== null && value !== 'none';\n\t}\n\n\t// Private helper to get a constraint dimension\n\t// @param domNode : the node to check the constraint on\n\t// @param maxStyle : the style that defines the maximum for the direction we are using (maxWidth / maxHeight)\n\t// @param percentageProperty : property of parent to use when calculating width as a percentage\n\t// @see http://www.nathanaeljones.com/blog/2013/reading-max-width-cross-browser\n\tfunction getConstraintDimension(domNode, maxStyle, percentageProperty) {\n\t\tvar view = document.defaultView;\n\t\tvar parentNode = domNode.parentNode;\n\t\tvar constrainedNode = view.getComputedStyle(domNode)[maxStyle];\n\t\tvar constrainedContainer = view.getComputedStyle(parentNode)[maxStyle];\n\t\tvar hasCNode = isConstrainedValue(constrainedNode);\n\t\tvar hasCContainer = isConstrainedValue(constrainedContainer);\n\t\tvar infinity = Number.POSITIVE_INFINITY;\n\n\t\tif (hasCNode || hasCContainer) {\n\t\t\treturn Math.min(\n\t\t\t\thasCNode? parseMaxStyle(constrainedNode, domNode, percentageProperty) : infinity,\n\t\t\t\thasCContainer? parseMaxStyle(constrainedContainer, parentNode, percentageProperty) : infinity);\n\t\t}\n\n\t\treturn 'none';\n\t}\n\t// returns Number or undefined if no constraint\n\thelpers.getConstraintWidth = function(domNode) {\n\t\treturn getConstraintDimension(domNode, 'max-width', 'clientWidth');\n\t};\n\t// returns Number or undefined if no constraint\n\thelpers.getConstraintHeight = function(domNode) {\n\t\treturn getConstraintDimension(domNode, 'max-height', 'clientHeight');\n\t};\n\thelpers.getMaximumWidth = function(domNode) {\n\t\tvar container = domNode.parentNode;\n\t\tvar paddingLeft = parseInt(helpers.getStyle(container, 'padding-left'), 10);\n\t\tvar paddingRight = parseInt(helpers.getStyle(container, 'padding-right'), 10);\n\t\tvar w = container.clientWidth - paddingLeft - paddingRight;\n\t\tvar cw = helpers.getConstraintWidth(domNode);\n\t\treturn isNaN(cw)? w : Math.min(w, cw);\n\t};\n\thelpers.getMaximumHeight = function(domNode) {\n\t\tvar container = domNode.parentNode;\n\t\tvar paddingTop = parseInt(helpers.getStyle(container, 'padding-top'), 10);\n\t\tvar paddingBottom = parseInt(helpers.getStyle(container, 'padding-bottom'), 10);\n\t\tvar h = container.clientHeight - paddingTop - paddingBottom;\n\t\tvar ch = helpers.getConstraintHeight(domNode);\n\t\treturn isNaN(ch)? h : Math.min(h, ch);\n\t};\n\thelpers.getStyle = function(el, property) {\n\t\treturn el.currentStyle ?\n\t\t\tel.currentStyle[property] :\n\t\t\tdocument.defaultView.getComputedStyle(el, null).getPropertyValue(property);\n\t};\n\thelpers.retinaScale = function(chart) {\n\t\tvar pixelRatio = chart.currentDevicePixelRatio = window.devicePixelRatio || 1;\n\t\tif (pixelRatio === 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar canvas = chart.canvas;\n\t\tvar height = chart.height;\n\t\tvar width = chart.width;\n\n\t\tcanvas.height = height * pixelRatio;\n\t\tcanvas.width = width * pixelRatio;\n\t\tchart.ctx.scale(pixelRatio, pixelRatio);\n\n\t\t// If no style has been set on the canvas, the render size is used as display size,\n\t\t// making the chart visually bigger, so let's enforce it to the \"correct\" values.\n\t\t// See https://github.com/chartjs/Chart.js/issues/3575\n\t\tcanvas.style.height = height + 'px';\n\t\tcanvas.style.width = width + 'px';\n\t};\n\t// -- Canvas methods\n\thelpers.clear = function(chart) {\n\t\tchart.ctx.clearRect(0, 0, chart.width, chart.height);\n\t};\n\thelpers.fontString = function(pixelSize, fontStyle, fontFamily) {\n\t\treturn fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\n\t};\n\thelpers.longestText = function(ctx, font, arrayOfThings, cache) {\n\t\tcache = cache || {};\n\t\tvar data = cache.data = cache.data || {};\n\t\tvar gc = cache.garbageCollect = cache.garbageCollect || [];\n\n\t\tif (cache.font !== font) {\n\t\t\tdata = cache.data = {};\n\t\t\tgc = cache.garbageCollect = [];\n\t\t\tcache.font = font;\n\t\t}\n\n\t\tctx.font = font;\n\t\tvar longest = 0;\n\t\thelpers.each(arrayOfThings, function(thing) {\n\t\t\t// Undefined strings and arrays should not be measured\n\t\t\tif (thing !== undefined && thing !== null && helpers.isArray(thing) !== true) {\n\t\t\t\tlongest = helpers.measureText(ctx, data, gc, longest, thing);\n\t\t\t} else if (helpers.isArray(thing)) {\n\t\t\t\t// if it is an array lets measure each element\n\t\t\t\t// to do maybe simplify this function a bit so we can do this more recursively?\n\t\t\t\thelpers.each(thing, function(nestedThing) {\n\t\t\t\t\t// Undefined strings and arrays should not be measured\n\t\t\t\t\tif (nestedThing !== undefined && nestedThing !== null && !helpers.isArray(nestedThing)) {\n\t\t\t\t\t\tlongest = helpers.measureText(ctx, data, gc, longest, nestedThing);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tvar gcLen = gc.length / 2;\n\t\tif (gcLen > arrayOfThings.length) {\n\t\t\tfor (var i = 0; i < gcLen; i++) {\n\t\t\t\tdelete data[gc[i]];\n\t\t\t}\n\t\t\tgc.splice(0, gcLen);\n\t\t}\n\t\treturn longest;\n\t};\n\thelpers.measureText = function(ctx, data, gc, longest, string) {\n\t\tvar textWidth = data[string];\n\t\tif (!textWidth) {\n\t\t\ttextWidth = data[string] = ctx.measureText(string).width;\n\t\t\tgc.push(string);\n\t\t}\n\t\tif (textWidth > longest) {\n\t\t\tlongest = textWidth;\n\t\t}\n\t\treturn longest;\n\t};\n\thelpers.numberOfLabelLines = function(arrayOfThings) {\n\t\tvar numberOfLines = 1;\n\t\thelpers.each(arrayOfThings, function(thing) {\n\t\t\tif (helpers.isArray(thing)) {\n\t\t\t\tif (thing.length > numberOfLines) {\n\t\t\t\t\tnumberOfLines = thing.length;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn numberOfLines;\n\t};\n\thelpers.drawRoundedRectangle = function(ctx, x, y, width, height, radius) {\n\t\tctx.beginPath();\n\t\tctx.moveTo(x + radius, y);\n\t\tctx.lineTo(x + width - radius, y);\n\t\tctx.quadraticCurveTo(x + width, y, x + width, y + radius);\n\t\tctx.lineTo(x + width, y + height - radius);\n\t\tctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\n\t\tctx.lineTo(x + radius, y + height);\n\t\tctx.quadraticCurveTo(x, y + height, x, y + height - radius);\n\t\tctx.lineTo(x, y + radius);\n\t\tctx.quadraticCurveTo(x, y, x + radius, y);\n\t\tctx.closePath();\n\t};\n\thelpers.color = function(c) {\n\t\tif (!color) {\n\t\t\tconsole.error('Color.js not found!');\n\t\t\treturn c;\n\t\t}\n\n\t\t/* global CanvasGradient */\n\t\tif (c instanceof CanvasGradient) {\n\t\t\treturn color(Chart.defaults.global.defaultColor);\n\t\t}\n\n\t\treturn color(c);\n\t};\n\thelpers.isArray = Array.isArray?\n\t\tfunction(obj) {\n\t\t\treturn Array.isArray(obj);\n\t\t} :\n\t\tfunction(obj) {\n\t\t\treturn Object.prototype.toString.call(obj) === '[object Array]';\n\t\t};\n\t// ! @see http://stackoverflow.com/a/14853974\n\thelpers.arrayEquals = function(a0, a1) {\n\t\tvar i, ilen, v0, v1;\n\n\t\tif (!a0 || !a1 || a0.length !== a1.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (i = 0, ilen=a0.length; i < ilen; ++i) {\n\t\t\tv0 = a0[i];\n\t\t\tv1 = a1[i];\n\n\t\t\tif (v0 instanceof Array && v1 instanceof Array) {\n\t\t\t\tif (!helpers.arrayEquals(v0, v1)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else if (v0 !== v1) {\n\t\t\t\t// NOTE: two different object instances will never be equal: {x:20} != {x:20}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t};\n\thelpers.callCallback = function(fn, args, _tArg) {\n\t\tif (fn && typeof fn.call === 'function') {\n\t\t\tfn.apply(_tArg, args);\n\t\t}\n\t};\n\thelpers.getHoverColor = function(colorValue) {\n\t\t/* global CanvasPattern */\n\t\treturn (colorValue instanceof CanvasPattern) ?\n\t\t\tcolorValue :\n\t\t\thelpers.color(colorValue).saturate(0.5).darken(0.1).rgbString();\n\t};\n};\n\n},{\"3\":3}],27:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\tvar helpers = Chart.helpers;\n\n\t/**\n\t * Helper function to get relative position for an event\n\t * @param {Event|IEvent} event - The event to get the position for\n\t * @param {Chart} chart - The chart\n\t * @returns {Point} the event position\n\t */\n\tfunction getRelativePosition(e, chart) {\n\t\tif (e.native) {\n\t\t\treturn {\n\t\t\t\tx: e.x,\n\t\t\t\ty: e.y\n\t\t\t};\n\t\t}\n\n\t\treturn helpers.getRelativePosition(e, chart);\n\t}\n\n\t/**\n\t * Helper function to traverse all of the visible elements in the chart\n\t * @param chart {chart} the chart\n\t * @param handler {Function} the callback to execute for each visible item\n\t */\n\tfunction parseVisibleItems(chart, handler) {\n\t\tvar datasets = chart.data.datasets;\n\t\tvar meta, i, j, ilen, jlen;\n\n\t\tfor (i = 0, ilen = datasets.length; i < ilen; ++i) {\n\t\t\tif (!chart.isDatasetVisible(i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmeta = chart.getDatasetMeta(i);\n\t\t\tfor (j = 0, jlen = meta.data.length; j < jlen; ++j) {\n\t\t\t\tvar element = meta.data[j];\n\t\t\t\tif (!element._view.skip) {\n\t\t\t\t\thandler(element);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Helper function to get the items that intersect the event position\n\t * @param items {ChartElement[]} elements to filter\n\t * @param position {Point} the point to be nearest to\n\t * @return {ChartElement[]} the nearest items\n\t */\n\tfunction getIntersectItems(chart, position) {\n\t\tvar elements = [];\n\n\t\tparseVisibleItems(chart, function(element) {\n\t\t\tif (element.inRange(position.x, position.y)) {\n\t\t\t\telements.push(element);\n\t\t\t}\n\t\t});\n\n\t\treturn elements;\n\t}\n\n\t/**\n\t * Helper function to get the items nearest to the event position considering all visible items in teh chart\n\t * @param chart {Chart} the chart to look at elements from\n\t * @param position {Point} the point to be nearest to\n\t * @param intersect {Boolean} if true, only consider items that intersect the position\n\t * @param distanceMetric {Function} Optional function to provide the distance between\n\t * @return {ChartElement[]} the nearest items\n\t */\n\tfunction getNearestItems(chart, position, intersect, distanceMetric) {\n\t\tvar minDistance = Number.POSITIVE_INFINITY;\n\t\tvar nearestItems = [];\n\n\t\tif (!distanceMetric) {\n\t\t\tdistanceMetric = helpers.distanceBetweenPoints;\n\t\t}\n\n\t\tparseVisibleItems(chart, function(element) {\n\t\t\tif (intersect && !element.inRange(position.x, position.y)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar center = element.getCenterPoint();\n\t\t\tvar distance = distanceMetric(position, center);\n\n\t\t\tif (distance < minDistance) {\n\t\t\t\tnearestItems = [element];\n\t\t\t\tminDistance = distance;\n\t\t\t} else if (distance === minDistance) {\n\t\t\t\t// Can have multiple items at the same distance in which case we sort by size\n\t\t\t\tnearestItems.push(element);\n\t\t\t}\n\t\t});\n\n\t\treturn nearestItems;\n\t}\n\n\tfunction indexMode(chart, e, options) {\n\t\tvar position = getRelativePosition(e, chart.chart);\n\t\tvar distanceMetric = function(pt1, pt2) {\n\t\t\treturn Math.abs(pt1.x - pt2.x);\n\t\t};\n\t\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\n\t\tvar elements = [];\n\n\t\tif (!items.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\tchart.data.datasets.forEach(function(dataset, datasetIndex) {\n\t\t\tif (chart.isDatasetVisible(datasetIndex)) {\n\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex),\n\t\t\t\t\telement = meta.data[items[0]._index];\n\n\t\t\t\t// don't count items that are skipped (null data)\n\t\t\t\tif (element && !element._view.skip) {\n\t\t\t\t\telements.push(element);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn elements;\n\t}\n\n\t/**\n\t * @interface IInteractionOptions\n\t */\n\t/**\n\t * If true, only consider items that intersect the point\n\t * @name IInterfaceOptions#boolean\n\t * @type Boolean\n\t */\n\n\t/**\n\t * Contains interaction related functions\n\t * @namespace Chart.Interaction\n\t */\n\tChart.Interaction = {\n\t\t// Helper function for different modes\n\t\tmodes: {\n\t\t\tsingle: function(chart, e) {\n\t\t\t\tvar position = getRelativePosition(e, chart.chart);\n\t\t\t\tvar elements = [];\n\n\t\t\t\tparseVisibleItems(chart, function(element) {\n\t\t\t\t\tif (element.inRange(position.x, position.y)) {\n\t\t\t\t\t\telements.push(element);\n\t\t\t\t\t\treturn elements;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn elements.slice(0, 1);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * @function Chart.Interaction.modes.label\n\t\t\t * @deprecated since version 2.4.0\n\t\t\t */\n\t\t\tlabel: indexMode,\n\n\t\t\t/**\n\t\t\t * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something\n\t\t\t * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item\n\t\t\t * @function Chart.Interaction.modes.index\n\t\t\t * @since v2.4.0\n\t\t\t * @param chart {chart} the chart we are returning items from\n\t\t\t * @param e {Event} the event we are find things at\n\t\t\t * @param options {IInteractionOptions} options to use during interaction\n\t\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t\t */\n\t\t\tindex: indexMode,\n\n\t\t\t/**\n\t\t\t * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something\n\t\t\t * If the options.intersect is false, we find the nearest item and return the items in that dataset\n\t\t\t * @function Chart.Interaction.modes.dataset\n\t\t\t * @param chart {chart} the chart we are returning items from\n\t\t\t * @param e {Event} the event we are find things at\n\t\t\t * @param options {IInteractionOptions} options to use during interaction\n\t\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t\t */\n\t\t\tdataset: function(chart, e, options) {\n\t\t\t\tvar position = getRelativePosition(e, chart.chart);\n\t\t\t\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false);\n\n\t\t\t\tif (items.length > 0) {\n\t\t\t\t\titems = chart.getDatasetMeta(items[0]._datasetIndex).data;\n\t\t\t\t}\n\n\t\t\t\treturn items;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * @function Chart.Interaction.modes.x-axis\n\t\t\t * @deprecated since version 2.4.0. Use index mode and intersect == true\n\t\t\t */\n\t\t\t'x-axis': function(chart, e) {\n\t\t\t\treturn indexMode(chart, e, true);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Point mode returns all elements that hit test based on the event position\n\t\t\t * of the event\n\t\t\t * @function Chart.Interaction.modes.intersect\n\t\t\t * @param chart {chart} the chart we are returning items from\n\t\t\t * @param e {Event} the event we are find things at\n\t\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t\t */\n\t\t\tpoint: function(chart, e) {\n\t\t\t\tvar position = getRelativePosition(e, chart.chart);\n\t\t\t\treturn getIntersectItems(chart, position);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * nearest mode returns the element closest to the point\n\t\t\t * @function Chart.Interaction.modes.intersect\n\t\t\t * @param chart {chart} the chart we are returning items from\n\t\t\t * @param e {Event} the event we are find things at\n\t\t\t * @param options {IInteractionOptions} options to use\n\t\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t\t */\n\t\t\tnearest: function(chart, e, options) {\n\t\t\t\tvar position = getRelativePosition(e, chart.chart);\n\t\t\t\tvar nearestItems = getNearestItems(chart, position, options.intersect);\n\n\t\t\t\t// We have multiple items at the same distance from the event. Now sort by smallest\n\t\t\t\tif (nearestItems.length > 1) {\n\t\t\t\t\tnearestItems.sort(function(a, b) {\n\t\t\t\t\t\tvar sizeA = a.getArea();\n\t\t\t\t\t\tvar sizeB = b.getArea();\n\t\t\t\t\t\tvar ret = sizeA - sizeB;\n\n\t\t\t\t\t\tif (ret === 0) {\n\t\t\t\t\t\t\t// if equal sort by dataset index\n\t\t\t\t\t\t\tret = a._datasetIndex - b._datasetIndex;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn ret;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Return only 1 item\n\t\t\t\treturn nearestItems.slice(0, 1);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * x mode returns the elements that hit-test at the current x coordinate\n\t\t\t * @function Chart.Interaction.modes.x\n\t\t\t * @param chart {chart} the chart we are returning items from\n\t\t\t * @param e {Event} the event we are find things at\n\t\t\t * @param options {IInteractionOptions} options to use\n\t\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t\t */\n\t\t\tx: function(chart, e, options) {\n\t\t\t\tvar position = getRelativePosition(e, chart.chart);\n\t\t\t\tvar items = [];\n\t\t\t\tvar intersectsItem = false;\n\n\t\t\t\tparseVisibleItems(chart, function(element) {\n\t\t\t\t\tif (element.inXRange(position.x)) {\n\t\t\t\t\t\titems.push(element);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (element.inRange(position.x, position.y)) {\n\t\t\t\t\t\tintersectsItem = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// If we want to trigger on an intersect and we don't have any items\n\t\t\t\t// that intersect the position, return nothing\n\t\t\t\tif (options.intersect && !intersectsItem) {\n\t\t\t\t\titems = [];\n\t\t\t\t}\n\t\t\t\treturn items;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * y mode returns the elements that hit-test at the current y coordinate\n\t\t\t * @function Chart.Interaction.modes.y\n\t\t\t * @param chart {chart} the chart we are returning items from\n\t\t\t * @param e {Event} the event we are find things at\n\t\t\t * @param options {IInteractionOptions} options to use\n\t\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\n\t\t\t */\n\t\t\ty: function(chart, e, options) {\n\t\t\t\tvar position = getRelativePosition(e, chart.chart);\n\t\t\t\tvar items = [];\n\t\t\t\tvar intersectsItem = false;\n\n\t\t\t\tparseVisibleItems(chart, function(element) {\n\t\t\t\t\tif (element.inYRange(position.y)) {\n\t\t\t\t\t\titems.push(element);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (element.inRange(position.x, position.y)) {\n\t\t\t\t\t\tintersectsItem = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// If we want to trigger on an intersect and we don't have any items\n\t\t\t\t// that intersect the position, return nothing\n\t\t\t\tif (options.intersect && !intersectsItem) {\n\t\t\t\t\titems = [];\n\t\t\t\t}\n\t\t\t\treturn items;\n\t\t\t}\n\t\t}\n\t};\n};\n\n},{}],28:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function() {\n\n\t// Occupy the global variable of Chart, and create a simple base class\n\tvar Chart = function(item, config) {\n\t\tthis.controller = new Chart.Controller(item, config, this);\n\t\treturn this.controller;\n\t};\n\n\t// Globally expose the defaults to allow for user updating/changing\n\tChart.defaults = {\n\t\tglobal: {\n\t\t\tresponsive: true,\n\t\t\tresponsiveAnimationDuration: 0,\n\t\t\tmaintainAspectRatio: true,\n\t\t\tevents: ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove'],\n\t\t\thover: {\n\t\t\t\tonHover: null,\n\t\t\t\tmode: 'nearest',\n\t\t\t\tintersect: true,\n\t\t\t\tanimationDuration: 400\n\t\t\t},\n\t\t\tonClick: null,\n\t\t\tdefaultColor: 'rgba(0,0,0,0.1)',\n\t\t\tdefaultFontColor: '#666',\n\t\t\tdefaultFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n\t\t\tdefaultFontSize: 12,\n\t\t\tdefaultFontStyle: 'normal',\n\t\t\tshowLines: true,\n\n\t\t\t// Element defaults defined in element extensions\n\t\t\telements: {},\n\n\t\t\t// Legend callback string\n\t\t\tlegendCallback: function(chart) {\n\t\t\t\tvar text = [];\n\t\t\t\ttext.push('<ul class=\"' + chart.id + '-legend\">');\n\t\t\t\tfor (var i = 0; i < chart.data.datasets.length; i++) {\n\t\t\t\t\ttext.push('<li><span style=\"background-color:' + chart.data.datasets[i].backgroundColor + '\"></span>');\n\t\t\t\t\tif (chart.data.datasets[i].label) {\n\t\t\t\t\t\ttext.push(chart.data.datasets[i].label);\n\t\t\t\t\t}\n\t\t\t\t\ttext.push('</li>');\n\t\t\t\t}\n\t\t\t\ttext.push('</ul>');\n\n\t\t\t\treturn text.join('');\n\t\t\t}\n\t\t}\n\t};\n\n\tChart.Chart = Chart;\n\n\treturn Chart;\n};\n\n},{}],29:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\t// The layout service is very self explanatory. It's responsible for the layout within a chart.\n\t// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need\n\t// It is this service's responsibility of carrying out that layout.\n\tChart.layoutService = {\n\t\tdefaults: {},\n\n\t\t// Register a box to a chartInstance. A box is simply a reference to an object that requires layout. eg. Scales, Legend, Plugins.\n\t\taddBox: function(chartInstance, box) {\n\t\t\tif (!chartInstance.boxes) {\n\t\t\t\tchartInstance.boxes = [];\n\t\t\t}\n\t\t\tchartInstance.boxes.push(box);\n\t\t},\n\n\t\tremoveBox: function(chartInstance, box) {\n\t\t\tif (!chartInstance.boxes) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchartInstance.boxes.splice(chartInstance.boxes.indexOf(box), 1);\n\t\t},\n\n\t\t// The most important function\n\t\tupdate: function(chartInstance, width, height) {\n\n\t\t\tif (!chartInstance) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar layoutOptions = chartInstance.options.layout;\n\t\t\tvar padding = layoutOptions ? layoutOptions.padding : null;\n\n\t\t\tvar leftPadding = 0;\n\t\t\tvar rightPadding = 0;\n\t\t\tvar topPadding = 0;\n\t\t\tvar bottomPadding = 0;\n\n\t\t\tif (!isNaN(padding)) {\n\t\t\t\t// options.layout.padding is a number. assign to all\n\t\t\t\tleftPadding = padding;\n\t\t\t\trightPadding = padding;\n\t\t\t\ttopPadding = padding;\n\t\t\t\tbottomPadding = padding;\n\t\t\t} else {\n\t\t\t\tleftPadding = padding.left || 0;\n\t\t\t\trightPadding = padding.right || 0;\n\t\t\t\ttopPadding = padding.top || 0;\n\t\t\t\tbottomPadding = padding.bottom || 0;\n\t\t\t}\n\n\t\t\tvar leftBoxes = helpers.where(chartInstance.boxes, function(box) {\n\t\t\t\treturn box.options.position === 'left';\n\t\t\t});\n\t\t\tvar rightBoxes = helpers.where(chartInstance.boxes, function(box) {\n\t\t\t\treturn box.options.position === 'right';\n\t\t\t});\n\t\t\tvar topBoxes = helpers.where(chartInstance.boxes, function(box) {\n\t\t\t\treturn box.options.position === 'top';\n\t\t\t});\n\t\t\tvar bottomBoxes = helpers.where(chartInstance.boxes, function(box) {\n\t\t\t\treturn box.options.position === 'bottom';\n\t\t\t});\n\n\t\t\t// Boxes that overlay the chartarea such as the radialLinear scale\n\t\t\tvar chartAreaBoxes = helpers.where(chartInstance.boxes, function(box) {\n\t\t\t\treturn box.options.position === 'chartArea';\n\t\t\t});\n\n\t\t\t// Ensure that full width boxes are at the very top / bottom\n\t\t\ttopBoxes.sort(function(a, b) {\n\t\t\t\treturn (b.options.fullWidth ? 1 : 0) - (a.options.fullWidth ? 1 : 0);\n\t\t\t});\n\t\t\tbottomBoxes.sort(function(a, b) {\n\t\t\t\treturn (a.options.fullWidth ? 1 : 0) - (b.options.fullWidth ? 1 : 0);\n\t\t\t});\n\n\t\t\t// Essentially we now have any number of boxes on each of the 4 sides.\n\t\t\t// Our canvas looks like the following.\n\t\t\t// The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and\n\t\t\t// B1 is the bottom axis\n\t\t\t// There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays\n\t\t\t// These locations are single-box locations only, when trying to register a chartArea location that is already taken,\n\t\t\t// an error will be thrown.\n\t\t\t//\n\t\t\t// |----------------------------------------------------|\n\t\t\t// | T1 (Full Width) |\n\t\t\t// |----------------------------------------------------|\n\t\t\t// | | | T2 | |\n\t\t\t// | |----|-------------------------------------|----|\n\t\t\t// | | | C1 | | C2 | |\n\t\t\t// | | |----| |----| |\n\t\t\t// | | | | |\n\t\t\t// | L1 | L2 | ChartArea (C0) | R1 |\n\t\t\t// | | | | |\n\t\t\t// | | |----| |----| |\n\t\t\t// | | | C3 | | C4 | |\n\t\t\t// | |----|-------------------------------------|----|\n\t\t\t// | | | B1 | |\n\t\t\t// |----------------------------------------------------|\n\t\t\t// | B2 (Full Width) |\n\t\t\t// |----------------------------------------------------|\n\t\t\t//\n\t\t\t// What we do to find the best sizing, we do the following\n\t\t\t// 1. Determine the minimum size of the chart area.\n\t\t\t// 2. Split the remaining width equally between each vertical axis\n\t\t\t// 3. Split the remaining height equally between each horizontal axis\n\t\t\t// 4. Give each layout the maximum size it can be. The layout will return it's minimum size\n\t\t\t// 5. Adjust the sizes of each axis based on it's minimum reported size.\n\t\t\t// 6. Refit each axis\n\t\t\t// 7. Position each axis in the final location\n\t\t\t// 8. Tell the chart the final location of the chart area\n\t\t\t// 9. Tell any axes that overlay the chart area the positions of the chart area\n\n\t\t\t// Step 1\n\t\t\tvar chartWidth = width - leftPadding - rightPadding;\n\t\t\tvar chartHeight = height - topPadding - bottomPadding;\n\t\t\tvar chartAreaWidth = chartWidth / 2; // min 50%\n\t\t\tvar chartAreaHeight = chartHeight / 2; // min 50%\n\n\t\t\t// Step 2\n\t\t\tvar verticalBoxWidth = (width - chartAreaWidth) / (leftBoxes.length + rightBoxes.length);\n\n\t\t\t// Step 3\n\t\t\tvar horizontalBoxHeight = (height - chartAreaHeight) / (topBoxes.length + bottomBoxes.length);\n\n\t\t\t// Step 4\n\t\t\tvar maxChartAreaWidth = chartWidth;\n\t\t\tvar maxChartAreaHeight = chartHeight;\n\t\t\tvar minBoxSizes = [];\n\n\t\t\tfunction getMinimumBoxSize(box) {\n\t\t\t\tvar minSize;\n\t\t\t\tvar isHorizontal = box.isHorizontal();\n\n\t\t\t\tif (isHorizontal) {\n\t\t\t\t\tminSize = box.update(box.options.fullWidth ? chartWidth : maxChartAreaWidth, horizontalBoxHeight);\n\t\t\t\t\tmaxChartAreaHeight -= minSize.height;\n\t\t\t\t} else {\n\t\t\t\t\tminSize = box.update(verticalBoxWidth, chartAreaHeight);\n\t\t\t\t\tmaxChartAreaWidth -= minSize.width;\n\t\t\t\t}\n\n\t\t\t\tminBoxSizes.push({\n\t\t\t\t\thorizontal: isHorizontal,\n\t\t\t\t\tminSize: minSize,\n\t\t\t\t\tbox: box,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\thelpers.each(leftBoxes.concat(rightBoxes, topBoxes, bottomBoxes), getMinimumBoxSize);\n\n\t\t\t// If a horizontal box has padding, we move the left boxes over to avoid ugly charts (see issue #2478)\n\t\t\tvar maxHorizontalLeftPadding = 0;\n\t\t\tvar maxHorizontalRightPadding = 0;\n\t\t\tvar maxVerticalTopPadding = 0;\n\t\t\tvar maxVerticalBottomPadding = 0;\n\n\t\t\thelpers.each(topBoxes.concat(bottomBoxes), function(horizontalBox) {\n\t\t\t\tif (horizontalBox.getPadding) {\n\t\t\t\t\tvar boxPadding = horizontalBox.getPadding();\n\t\t\t\t\tmaxHorizontalLeftPadding = Math.max(maxHorizontalLeftPadding, boxPadding.left);\n\t\t\t\t\tmaxHorizontalRightPadding = Math.max(maxHorizontalRightPadding, boxPadding.right);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\thelpers.each(leftBoxes.concat(rightBoxes), function(verticalBox) {\n\t\t\t\tif (verticalBox.getPadding) {\n\t\t\t\t\tvar boxPadding = verticalBox.getPadding();\n\t\t\t\t\tmaxVerticalTopPadding = Math.max(maxVerticalTopPadding, boxPadding.top);\n\t\t\t\t\tmaxVerticalBottomPadding = Math.max(maxVerticalBottomPadding, boxPadding.bottom);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// At this point, maxChartAreaHeight and maxChartAreaWidth are the size the chart area could\n\t\t\t// be if the axes are drawn at their minimum sizes.\n\t\t\t// Steps 5 & 6\n\t\t\tvar totalLeftBoxesWidth = leftPadding;\n\t\t\tvar totalRightBoxesWidth = rightPadding;\n\t\t\tvar totalTopBoxesHeight = topPadding;\n\t\t\tvar totalBottomBoxesHeight = bottomPadding;\n\n\t\t\t// Function to fit a box\n\t\t\tfunction fitBox(box) {\n\t\t\t\tvar minBoxSize = helpers.findNextWhere(minBoxSizes, function(minBox) {\n\t\t\t\t\treturn minBox.box === box;\n\t\t\t\t});\n\n\t\t\t\tif (minBoxSize) {\n\t\t\t\t\tif (box.isHorizontal()) {\n\t\t\t\t\t\tvar scaleMargin = {\n\t\t\t\t\t\t\tleft: Math.max(totalLeftBoxesWidth, maxHorizontalLeftPadding),\n\t\t\t\t\t\t\tright: Math.max(totalRightBoxesWidth, maxHorizontalRightPadding),\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\tbottom: 0\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// Don't use min size here because of label rotation. When the labels are rotated, their rotation highly depends\n\t\t\t\t\t\t// on the margin. Sometimes they need to increase in size slightly\n\t\t\t\t\t\tbox.update(box.options.fullWidth ? chartWidth : maxChartAreaWidth, chartHeight / 2, scaleMargin);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbox.update(minBoxSize.minSize.width, maxChartAreaHeight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update, and calculate the left and right margins for the horizontal boxes\n\t\t\thelpers.each(leftBoxes.concat(rightBoxes), fitBox);\n\n\t\t\thelpers.each(leftBoxes, function(box) {\n\t\t\t\ttotalLeftBoxesWidth += box.width;\n\t\t\t});\n\n\t\t\thelpers.each(rightBoxes, function(box) {\n\t\t\t\ttotalRightBoxesWidth += box.width;\n\t\t\t});\n\n\t\t\t// Set the Left and Right margins for the horizontal boxes\n\t\t\thelpers.each(topBoxes.concat(bottomBoxes), fitBox);\n\n\t\t\t// Figure out how much margin is on the top and bottom of the vertical boxes\n\t\t\thelpers.each(topBoxes, function(box) {\n\t\t\t\ttotalTopBoxesHeight += box.height;\n\t\t\t});\n\n\t\t\thelpers.each(bottomBoxes, function(box) {\n\t\t\t\ttotalBottomBoxesHeight += box.height;\n\t\t\t});\n\n\t\t\tfunction finalFitVerticalBox(box) {\n\t\t\t\tvar minBoxSize = helpers.findNextWhere(minBoxSizes, function(minSize) {\n\t\t\t\t\treturn minSize.box === box;\n\t\t\t\t});\n\n\t\t\t\tvar scaleMargin = {\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tright: 0,\n\t\t\t\t\ttop: totalTopBoxesHeight,\n\t\t\t\t\tbottom: totalBottomBoxesHeight\n\t\t\t\t};\n\n\t\t\t\tif (minBoxSize) {\n\t\t\t\t\tbox.update(minBoxSize.minSize.width, maxChartAreaHeight, scaleMargin);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Let the left layout know the final margin\n\t\t\thelpers.each(leftBoxes.concat(rightBoxes), finalFitVerticalBox);\n\n\t\t\t// Recalculate because the size of each layout might have changed slightly due to the margins (label rotation for instance)\n\t\t\ttotalLeftBoxesWidth = leftPadding;\n\t\t\ttotalRightBoxesWidth = rightPadding;\n\t\t\ttotalTopBoxesHeight = topPadding;\n\t\t\ttotalBottomBoxesHeight = bottomPadding;\n\n\t\t\thelpers.each(leftBoxes, function(box) {\n\t\t\t\ttotalLeftBoxesWidth += box.width;\n\t\t\t});\n\n\t\t\thelpers.each(rightBoxes, function(box) {\n\t\t\t\ttotalRightBoxesWidth += box.width;\n\t\t\t});\n\n\t\t\thelpers.each(topBoxes, function(box) {\n\t\t\t\ttotalTopBoxesHeight += box.height;\n\t\t\t});\n\t\t\thelpers.each(bottomBoxes, function(box) {\n\t\t\t\ttotalBottomBoxesHeight += box.height;\n\t\t\t});\n\n\t\t\t// We may be adding some padding to account for rotated x axis labels\n\t\t\tvar leftPaddingAddition = Math.max(maxHorizontalLeftPadding - totalLeftBoxesWidth, 0);\n\t\t\ttotalLeftBoxesWidth += leftPaddingAddition;\n\t\t\ttotalRightBoxesWidth += Math.max(maxHorizontalRightPadding - totalRightBoxesWidth, 0);\n\n\t\t\tvar topPaddingAddition = Math.max(maxVerticalTopPadding - totalTopBoxesHeight, 0);\n\t\t\ttotalTopBoxesHeight += topPaddingAddition;\n\t\t\ttotalBottomBoxesHeight += Math.max(maxVerticalBottomPadding - totalBottomBoxesHeight, 0);\n\n\t\t\t// Figure out if our chart area changed. This would occur if the dataset layout label rotation\n\t\t\t// changed due to the application of the margins in step 6. Since we can only get bigger, this is safe to do\n\t\t\t// without calling `fit` again\n\t\t\tvar newMaxChartAreaHeight = height - totalTopBoxesHeight - totalBottomBoxesHeight;\n\t\t\tvar newMaxChartAreaWidth = width - totalLeftBoxesWidth - totalRightBoxesWidth;\n\n\t\t\tif (newMaxChartAreaWidth !== maxChartAreaWidth || newMaxChartAreaHeight !== maxChartAreaHeight) {\n\t\t\t\thelpers.each(leftBoxes, function(box) {\n\t\t\t\t\tbox.height = newMaxChartAreaHeight;\n\t\t\t\t});\n\n\t\t\t\thelpers.each(rightBoxes, function(box) {\n\t\t\t\t\tbox.height = newMaxChartAreaHeight;\n\t\t\t\t});\n\n\t\t\t\thelpers.each(topBoxes, function(box) {\n\t\t\t\t\tif (!box.options.fullWidth) {\n\t\t\t\t\t\tbox.width = newMaxChartAreaWidth;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\thelpers.each(bottomBoxes, function(box) {\n\t\t\t\t\tif (!box.options.fullWidth) {\n\t\t\t\t\t\tbox.width = newMaxChartAreaWidth;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tmaxChartAreaHeight = newMaxChartAreaHeight;\n\t\t\t\tmaxChartAreaWidth = newMaxChartAreaWidth;\n\t\t\t}\n\n\t\t\t// Step 7 - Position the boxes\n\t\t\tvar left = leftPadding + leftPaddingAddition;\n\t\t\tvar top = topPadding + topPaddingAddition;\n\n\t\t\tfunction placeBox(box) {\n\t\t\t\tif (box.isHorizontal()) {\n\t\t\t\t\tbox.left = box.options.fullWidth ? leftPadding : totalLeftBoxesWidth;\n\t\t\t\t\tbox.right = box.options.fullWidth ? width - rightPadding : totalLeftBoxesWidth + maxChartAreaWidth;\n\t\t\t\t\tbox.top = top;\n\t\t\t\t\tbox.bottom = top + box.height;\n\n\t\t\t\t\t// Move to next point\n\t\t\t\t\ttop = box.bottom;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbox.left = left;\n\t\t\t\t\tbox.right = left + box.width;\n\t\t\t\t\tbox.top = totalTopBoxesHeight;\n\t\t\t\t\tbox.bottom = totalTopBoxesHeight + maxChartAreaHeight;\n\n\t\t\t\t\t// Move to next point\n\t\t\t\t\tleft = box.right;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thelpers.each(leftBoxes.concat(topBoxes), placeBox);\n\n\t\t\t// Account for chart width and height\n\t\t\tleft += maxChartAreaWidth;\n\t\t\ttop += maxChartAreaHeight;\n\n\t\t\thelpers.each(rightBoxes, placeBox);\n\t\t\thelpers.each(bottomBoxes, placeBox);\n\n\t\t\t// Step 8\n\t\t\tchartInstance.chartArea = {\n\t\t\t\tleft: totalLeftBoxesWidth,\n\t\t\t\ttop: totalTopBoxesHeight,\n\t\t\t\tright: totalLeftBoxesWidth + maxChartAreaWidth,\n\t\t\t\tbottom: totalTopBoxesHeight + maxChartAreaHeight\n\t\t\t};\n\n\t\t\t// Step 9\n\t\t\thelpers.each(chartAreaBoxes, function(box) {\n\t\t\t\tbox.left = chartInstance.chartArea.left;\n\t\t\t\tbox.top = chartInstance.chartArea.top;\n\t\t\t\tbox.right = chartInstance.chartArea.right;\n\t\t\t\tbox.bottom = chartInstance.chartArea.bottom;\n\n\t\t\t\tbox.update(maxChartAreaWidth, maxChartAreaHeight);\n\t\t\t});\n\t\t}\n\t};\n};\n\n},{}],30:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\tvar noop = helpers.noop;\n\n\tChart.defaults.global.legend = {\n\n\t\tdisplay: true,\n\t\tposition: 'top',\n\t\tfullWidth: true, // marks that this box should take the full width of the canvas (pushing down other boxes)\n\t\treverse: false,\n\n\t\t// a callback that will handle\n\t\tonClick: function(e, legendItem) {\n\t\t\tvar index = legendItem.datasetIndex;\n\t\t\tvar ci = this.chart;\n\t\t\tvar meta = ci.getDatasetMeta(index);\n\n\t\t\t// See controller.isDatasetVisible comment\n\t\t\tmeta.hidden = meta.hidden === null? !ci.data.datasets[index].hidden : null;\n\n\t\t\t// We hid a dataset ... rerender the chart\n\t\t\tci.update();\n\t\t},\n\n\t\tonHover: null,\n\n\t\tlabels: {\n\t\t\tboxWidth: 40,\n\t\t\tpadding: 10,\n\t\t\t// Generates labels shown in the legend\n\t\t\t// Valid properties to return:\n\t\t\t// text : text to display\n\t\t\t// fillStyle : fill of coloured box\n\t\t\t// strokeStyle: stroke of coloured box\n\t\t\t// hidden : if this legend item refers to a hidden item\n\t\t\t// lineCap : cap style for line\n\t\t\t// lineDash\n\t\t\t// lineDashOffset :\n\t\t\t// lineJoin :\n\t\t\t// lineWidth :\n\t\t\tgenerateLabels: function(chart) {\n\t\t\t\tvar data = chart.data;\n\t\t\t\treturn helpers.isArray(data.datasets) ? data.datasets.map(function(dataset, i) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttext: dataset.label,\n\t\t\t\t\t\tfillStyle: (!helpers.isArray(dataset.backgroundColor) ? dataset.backgroundColor : dataset.backgroundColor[0]),\n\t\t\t\t\t\thidden: !chart.isDatasetVisible(i),\n\t\t\t\t\t\tlineCap: dataset.borderCapStyle,\n\t\t\t\t\t\tlineDash: dataset.borderDash,\n\t\t\t\t\t\tlineDashOffset: dataset.borderDashOffset,\n\t\t\t\t\t\tlineJoin: dataset.borderJoinStyle,\n\t\t\t\t\t\tlineWidth: dataset.borderWidth,\n\t\t\t\t\t\tstrokeStyle: dataset.borderColor,\n\t\t\t\t\t\tpointStyle: dataset.pointStyle,\n\n\t\t\t\t\t\t// Below is extra data used for toggling the datasets\n\t\t\t\t\t\tdatasetIndex: i\n\t\t\t\t\t};\n\t\t\t\t}, this) : [];\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Helper function to get the box width based on the usePointStyle option\n\t * @param labelopts {Object} the label options on the legend\n\t * @param fontSize {Number} the label font size\n\t * @return {Number} width of the color box area\n\t */\n\tfunction getBoxWidth(labelOpts, fontSize) {\n\t\treturn labelOpts.usePointStyle ?\n\t\t\tfontSize * Math.SQRT2 :\n\t\t\tlabelOpts.boxWidth;\n\t}\n\n\tChart.Legend = Chart.Element.extend({\n\n\t\tinitialize: function(config) {\n\t\t\thelpers.extend(this, config);\n\n\t\t\t// Contains hit boxes for each dataset (in dataset order)\n\t\t\tthis.legendHitBoxes = [];\n\n\t\t\t// Are we in doughnut mode which has a different data type\n\t\t\tthis.doughnutMode = false;\n\t\t},\n\n\t\t// These methods are ordered by lifecycle. Utilities then follow.\n\t\t// Any function defined here is inherited by all legend types.\n\t\t// Any function can be extended by the legend type\n\n\t\tbeforeUpdate: noop,\n\t\tupdate: function(maxWidth, maxHeight, margins) {\n\t\t\tvar me = this;\n\n\t\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\n\t\t\tme.beforeUpdate();\n\n\t\t\t// Absorb the master measurements\n\t\t\tme.maxWidth = maxWidth;\n\t\t\tme.maxHeight = maxHeight;\n\t\t\tme.margins = margins;\n\n\t\t\t// Dimensions\n\t\t\tme.beforeSetDimensions();\n\t\t\tme.setDimensions();\n\t\t\tme.afterSetDimensions();\n\t\t\t// Labels\n\t\t\tme.beforeBuildLabels();\n\t\t\tme.buildLabels();\n\t\t\tme.afterBuildLabels();\n\n\t\t\t// Fit\n\t\t\tme.beforeFit();\n\t\t\tme.fit();\n\t\t\tme.afterFit();\n\t\t\t//\n\t\t\tme.afterUpdate();\n\n\t\t\treturn me.minSize;\n\t\t},\n\t\tafterUpdate: noop,\n\n\t\t//\n\n\t\tbeforeSetDimensions: noop,\n\t\tsetDimensions: function() {\n\t\t\tvar me = this;\n\t\t\t// Set the unconstrained dimension before label rotation\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\t// Reset position before calculating rotation\n\t\t\t\tme.width = me.maxWidth;\n\t\t\t\tme.left = 0;\n\t\t\t\tme.right = me.width;\n\t\t\t} else {\n\t\t\t\tme.height = me.maxHeight;\n\n\t\t\t\t// Reset position before calculating rotation\n\t\t\t\tme.top = 0;\n\t\t\t\tme.bottom = me.height;\n\t\t\t}\n\n\t\t\t// Reset padding\n\t\t\tme.paddingLeft = 0;\n\t\t\tme.paddingTop = 0;\n\t\t\tme.paddingRight = 0;\n\t\t\tme.paddingBottom = 0;\n\n\t\t\t// Reset minSize\n\t\t\tme.minSize = {\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0\n\t\t\t};\n\t\t},\n\t\tafterSetDimensions: noop,\n\n\t\t//\n\n\t\tbeforeBuildLabels: noop,\n\t\tbuildLabels: function() {\n\t\t\tvar me = this;\n\t\t\tvar labelOpts = me.options.labels;\n\t\t\tvar legendItems = labelOpts.generateLabels.call(me, me.chart);\n\n\t\t\tif (labelOpts.filter) {\n\t\t\t\tlegendItems = legendItems.filter(function(item) {\n\t\t\t\t\treturn labelOpts.filter(item, me.chart.data);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (me.options.reverse) {\n\t\t\t\tlegendItems.reverse();\n\t\t\t}\n\n\t\t\tme.legendItems = legendItems;\n\t\t},\n\t\tafterBuildLabels: noop,\n\n\t\t//\n\n\t\tbeforeFit: noop,\n\t\tfit: function() {\n\t\t\tvar me = this;\n\t\t\tvar opts = me.options;\n\t\t\tvar labelOpts = opts.labels;\n\t\t\tvar display = opts.display;\n\n\t\t\tvar ctx = me.ctx;\n\n\t\t\tvar globalDefault = Chart.defaults.global,\n\t\t\t\titemOrDefault = helpers.getValueOrDefault,\n\t\t\t\tfontSize = itemOrDefault(labelOpts.fontSize, globalDefault.defaultFontSize),\n\t\t\t\tfontStyle = itemOrDefault(labelOpts.fontStyle, globalDefault.defaultFontStyle),\n\t\t\t\tfontFamily = itemOrDefault(labelOpts.fontFamily, globalDefault.defaultFontFamily),\n\t\t\t\tlabelFont = helpers.fontString(fontSize, fontStyle, fontFamily);\n\n\t\t\t// Reset hit boxes\n\t\t\tvar hitboxes = me.legendHitBoxes = [];\n\n\t\t\tvar minSize = me.minSize;\n\t\t\tvar isHorizontal = me.isHorizontal();\n\n\t\t\tif (isHorizontal) {\n\t\t\t\tminSize.width = me.maxWidth; // fill all the width\n\t\t\t\tminSize.height = display ? 10 : 0;\n\t\t\t} else {\n\t\t\t\tminSize.width = display ? 10 : 0;\n\t\t\t\tminSize.height = me.maxHeight; // fill all the height\n\t\t\t}\n\n\t\t\t// Increase sizes here\n\t\t\tif (display) {\n\t\t\t\tctx.font = labelFont;\n\n\t\t\t\tif (isHorizontal) {\n\t\t\t\t\t// Labels\n\n\t\t\t\t\t// Width of each line of legend boxes. Labels wrap onto multiple lines when there are too many to fit on one\n\t\t\t\t\tvar lineWidths = me.lineWidths = [0];\n\t\t\t\t\tvar totalHeight = me.legendItems.length ? fontSize + (labelOpts.padding) : 0;\n\n\t\t\t\t\tctx.textAlign = 'left';\n\t\t\t\t\tctx.textBaseline = 'top';\n\n\t\t\t\t\thelpers.each(me.legendItems, function(legendItem, i) {\n\t\t\t\t\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\n\t\t\t\t\t\tvar width = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\n\n\t\t\t\t\t\tif (lineWidths[lineWidths.length - 1] + width + labelOpts.padding >= me.width) {\n\t\t\t\t\t\t\ttotalHeight += fontSize + (labelOpts.padding);\n\t\t\t\t\t\t\tlineWidths[lineWidths.length] = me.left;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Store the hitbox width and height here. Final position will be updated in `draw`\n\t\t\t\t\t\thitboxes[i] = {\n\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\twidth: width,\n\t\t\t\t\t\t\theight: fontSize\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tlineWidths[lineWidths.length - 1] += width + labelOpts.padding;\n\t\t\t\t\t});\n\n\t\t\t\t\tminSize.height += totalHeight;\n\n\t\t\t\t} else {\n\t\t\t\t\tvar vPadding = labelOpts.padding;\n\t\t\t\t\tvar columnWidths = me.columnWidths = [];\n\t\t\t\t\tvar totalWidth = labelOpts.padding;\n\t\t\t\t\tvar currentColWidth = 0;\n\t\t\t\t\tvar currentColHeight = 0;\n\t\t\t\t\tvar itemHeight = fontSize + vPadding;\n\n\t\t\t\t\thelpers.each(me.legendItems, function(legendItem, i) {\n\t\t\t\t\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize);\n\t\t\t\t\t\tvar itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;\n\n\t\t\t\t\t\t// If too tall, go to new column\n\t\t\t\t\t\tif (currentColHeight + itemHeight > minSize.height) {\n\t\t\t\t\t\t\ttotalWidth += currentColWidth + labelOpts.padding;\n\t\t\t\t\t\t\tcolumnWidths.push(currentColWidth); // previous column width\n\n\t\t\t\t\t\t\tcurrentColWidth = 0;\n\t\t\t\t\t\t\tcurrentColHeight = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Get max width\n\t\t\t\t\t\tcurrentColWidth = Math.max(currentColWidth, itemWidth);\n\t\t\t\t\t\tcurrentColHeight += itemHeight;\n\n\t\t\t\t\t\t// Store the hitbox width and height here. Final position will be updated in `draw`\n\t\t\t\t\t\thitboxes[i] = {\n\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\twidth: itemWidth,\n\t\t\t\t\t\t\theight: fontSize\n\t\t\t\t\t\t};\n\t\t\t\t\t});\n\n\t\t\t\t\ttotalWidth += currentColWidth;\n\t\t\t\t\tcolumnWidths.push(currentColWidth);\n\t\t\t\t\tminSize.width += totalWidth;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tme.width = minSize.width;\n\t\t\tme.height = minSize.height;\n\t\t},\n\t\tafterFit: noop,\n\n\t\t// Shared Methods\n\t\tisHorizontal: function() {\n\t\t\treturn this.options.position === 'top' || this.options.position === 'bottom';\n\t\t},\n\n\t\t// Actually draw the legend on the canvas\n\t\tdraw: function() {\n\t\t\tvar me = this;\n\t\t\tvar opts = me.options;\n\t\t\tvar labelOpts = opts.labels;\n\t\t\tvar globalDefault = Chart.defaults.global,\n\t\t\t\tlineDefault = globalDefault.elements.line,\n\t\t\t\tlegendWidth = me.width,\n\t\t\t\tlineWidths = me.lineWidths;\n\n\t\t\tif (opts.display) {\n\t\t\t\tvar ctx = me.ctx,\n\t\t\t\t\tcursor,\n\t\t\t\t\titemOrDefault = helpers.getValueOrDefault,\n\t\t\t\t\tfontColor = itemOrDefault(labelOpts.fontColor, globalDefault.defaultFontColor),\n\t\t\t\t\tfontSize = itemOrDefault(labelOpts.fontSize, globalDefault.defaultFontSize),\n\t\t\t\t\tfontStyle = itemOrDefault(labelOpts.fontStyle, globalDefault.defaultFontStyle),\n\t\t\t\t\tfontFamily = itemOrDefault(labelOpts.fontFamily, globalDefault.defaultFontFamily),\n\t\t\t\t\tlabelFont = helpers.fontString(fontSize, fontStyle, fontFamily);\n\n\t\t\t\t// Canvas setup\n\t\t\t\tctx.textAlign = 'left';\n\t\t\t\tctx.textBaseline = 'top';\n\t\t\t\tctx.lineWidth = 0.5;\n\t\t\t\tctx.strokeStyle = fontColor; // for strikethrough effect\n\t\t\t\tctx.fillStyle = fontColor; // render in correct colour\n\t\t\t\tctx.font = labelFont;\n\n\t\t\t\tvar boxWidth = getBoxWidth(labelOpts, fontSize),\n\t\t\t\t\thitboxes = me.legendHitBoxes;\n\n\t\t\t\t// current position\n\t\t\t\tvar drawLegendBox = function(x, y, legendItem) {\n\t\t\t\t\tif (isNaN(boxWidth) || boxWidth <= 0) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set the ctx for the box\n\t\t\t\t\tctx.save();\n\n\t\t\t\t\tctx.fillStyle = itemOrDefault(legendItem.fillStyle, globalDefault.defaultColor);\n\t\t\t\t\tctx.lineCap = itemOrDefault(legendItem.lineCap, lineDefault.borderCapStyle);\n\t\t\t\t\tctx.lineDashOffset = itemOrDefault(legendItem.lineDashOffset, lineDefault.borderDashOffset);\n\t\t\t\t\tctx.lineJoin = itemOrDefault(legendItem.lineJoin, lineDefault.borderJoinStyle);\n\t\t\t\t\tctx.lineWidth = itemOrDefault(legendItem.lineWidth, lineDefault.borderWidth);\n\t\t\t\t\tctx.strokeStyle = itemOrDefault(legendItem.strokeStyle, globalDefault.defaultColor);\n\t\t\t\t\tvar isLineWidthZero = (itemOrDefault(legendItem.lineWidth, lineDefault.borderWidth) === 0);\n\n\t\t\t\t\tif (ctx.setLineDash) {\n\t\t\t\t\t\t// IE 9 and 10 do not support line dash\n\t\t\t\t\t\tctx.setLineDash(itemOrDefault(legendItem.lineDash, lineDefault.borderDash));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (opts.labels && opts.labels.usePointStyle) {\n\t\t\t\t\t\t// Recalculate x and y for drawPoint() because its expecting\n\t\t\t\t\t\t// x and y to be center of figure (instead of top left)\n\t\t\t\t\t\tvar radius = fontSize * Math.SQRT2 / 2;\n\t\t\t\t\t\tvar offSet = radius / Math.SQRT2;\n\t\t\t\t\t\tvar centerX = x + offSet;\n\t\t\t\t\t\tvar centerY = y + offSet;\n\n\t\t\t\t\t\t// Draw pointStyle as legend symbol\n\t\t\t\t\t\tChart.canvasHelpers.drawPoint(ctx, legendItem.pointStyle, radius, centerX, centerY);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Draw box as legend symbol\n\t\t\t\t\t\tif (!isLineWidthZero) {\n\t\t\t\t\t\t\tctx.strokeRect(x, y, boxWidth, fontSize);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tctx.fillRect(x, y, boxWidth, fontSize);\n\t\t\t\t\t}\n\n\t\t\t\t\tctx.restore();\n\t\t\t\t};\n\t\t\t\tvar fillText = function(x, y, legendItem, textWidth) {\n\t\t\t\t\tctx.fillText(legendItem.text, boxWidth + (fontSize / 2) + x, y);\n\n\t\t\t\t\tif (legendItem.hidden) {\n\t\t\t\t\t\t// Strikethrough the text if hidden\n\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t\tctx.lineWidth = 2;\n\t\t\t\t\t\tctx.moveTo(boxWidth + (fontSize / 2) + x, y + (fontSize / 2));\n\t\t\t\t\t\tctx.lineTo(boxWidth + (fontSize / 2) + x + textWidth, y + (fontSize / 2));\n\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Horizontal\n\t\t\t\tvar isHorizontal = me.isHorizontal();\n\t\t\t\tif (isHorizontal) {\n\t\t\t\t\tcursor = {\n\t\t\t\t\t\tx: me.left + ((legendWidth - lineWidths[0]) / 2),\n\t\t\t\t\t\ty: me.top + labelOpts.padding,\n\t\t\t\t\t\tline: 0\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tcursor = {\n\t\t\t\t\t\tx: me.left + labelOpts.padding,\n\t\t\t\t\t\ty: me.top + labelOpts.padding,\n\t\t\t\t\t\tline: 0\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tvar itemHeight = fontSize + labelOpts.padding;\n\t\t\t\thelpers.each(me.legendItems, function(legendItem, i) {\n\t\t\t\t\tvar textWidth = ctx.measureText(legendItem.text).width,\n\t\t\t\t\t\twidth = boxWidth + (fontSize / 2) + textWidth,\n\t\t\t\t\t\tx = cursor.x,\n\t\t\t\t\t\ty = cursor.y;\n\n\t\t\t\t\tif (isHorizontal) {\n\t\t\t\t\t\tif (x + width >= legendWidth) {\n\t\t\t\t\t\t\ty = cursor.y += itemHeight;\n\t\t\t\t\t\t\tcursor.line++;\n\t\t\t\t\t\t\tx = cursor.x = me.left + ((legendWidth - lineWidths[cursor.line]) / 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (y + itemHeight > me.bottom) {\n\t\t\t\t\t\tx = cursor.x = x + me.columnWidths[cursor.line] + labelOpts.padding;\n\t\t\t\t\t\ty = cursor.y = me.top + labelOpts.padding;\n\t\t\t\t\t\tcursor.line++;\n\t\t\t\t\t}\n\n\t\t\t\t\tdrawLegendBox(x, y, legendItem);\n\n\t\t\t\t\thitboxes[i].left = x;\n\t\t\t\t\thitboxes[i].top = y;\n\n\t\t\t\t\t// Fill the actual label\n\t\t\t\t\tfillText(x, y, legendItem, textWidth);\n\n\t\t\t\t\tif (isHorizontal) {\n\t\t\t\t\t\tcursor.x += width + (labelOpts.padding);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcursor.y += itemHeight;\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle an event\n\t\t * @private\n\t\t * @param {IEvent} event - The event to handle\n\t\t * @return {Boolean} true if a change occured\n\t\t */\n\t\thandleEvent: function(e) {\n\t\t\tvar me = this;\n\t\t\tvar opts = me.options;\n\t\t\tvar type = e.type === 'mouseup' ? 'click' : e.type;\n\t\t\tvar changed = false;\n\n\t\t\tif (type === 'mousemove') {\n\t\t\t\tif (!opts.onHover) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else if (type === 'click') {\n\t\t\t\tif (!opts.onClick) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Chart event already has relative position in it\n\t\t\tvar x = e.x,\n\t\t\t\ty = e.y;\n\n\t\t\tif (x >= me.left && x <= me.right && y >= me.top && y <= me.bottom) {\n\t\t\t\t// See if we are touching one of the dataset boxes\n\t\t\t\tvar lh = me.legendHitBoxes;\n\t\t\t\tfor (var i = 0; i < lh.length; ++i) {\n\t\t\t\t\tvar hitBox = lh[i];\n\n\t\t\t\t\tif (x >= hitBox.left && x <= hitBox.left + hitBox.width && y >= hitBox.top && y <= hitBox.top + hitBox.height) {\n\t\t\t\t\t\t// Touching an element\n\t\t\t\t\t\tif (type === 'click') {\n\t\t\t\t\t\t\t// use e.native for backwards compatibility\n\t\t\t\t\t\t\topts.onClick.call(me, e.native, me.legendItems[i]);\n\t\t\t\t\t\t\tchanged = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (type === 'mousemove') {\n\t\t\t\t\t\t\t// use e.native for backwards compatibility\n\t\t\t\t\t\t\topts.onHover.call(me, e.native, me.legendItems[i]);\n\t\t\t\t\t\t\tchanged = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn changed;\n\t\t}\n\t});\n\n\tfunction createNewLegendAndAttach(chartInstance, legendOpts) {\n\t\tvar legend = new Chart.Legend({\n\t\t\tctx: chartInstance.chart.ctx,\n\t\t\toptions: legendOpts,\n\t\t\tchart: chartInstance\n\t\t});\n\t\tchartInstance.legend = legend;\n\t\tChart.layoutService.addBox(chartInstance, legend);\n\t}\n\n\t// Register the legend plugin\n\tChart.plugins.register({\n\t\tbeforeInit: function(chartInstance) {\n\t\t\tvar legendOpts = chartInstance.options.legend;\n\n\t\t\tif (legendOpts) {\n\t\t\t\tcreateNewLegendAndAttach(chartInstance, legendOpts);\n\t\t\t}\n\t\t},\n\t\tbeforeUpdate: function(chartInstance) {\n\t\t\tvar legendOpts = chartInstance.options.legend;\n\n\t\t\tif (legendOpts) {\n\t\t\t\tlegendOpts = helpers.configMerge(Chart.defaults.global.legend, legendOpts);\n\n\t\t\t\tif (chartInstance.legend) {\n\t\t\t\t\tchartInstance.legend.options = legendOpts;\n\t\t\t\t} else {\n\t\t\t\t\tcreateNewLegendAndAttach(chartInstance, legendOpts);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tChart.layoutService.removeBox(chartInstance, chartInstance.legend);\n\t\t\t\tdelete chartInstance.legend;\n\t\t\t}\n\t\t},\n\t\tafterEvent: function(chartInstance, e) {\n\t\t\tvar legend = chartInstance.legend;\n\t\t\tif (legend) {\n\t\t\t\tlegend.handleEvent(e);\n\t\t\t}\n\t\t}\n\t});\n};\n\n},{}],31:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.defaults.global.plugins = {};\n\n\t/**\n\t * The plugin service singleton\n\t * @namespace Chart.plugins\n\t * @since 2.1.0\n\t */\n\tChart.plugins = {\n\t\t/**\n\t\t * Globally registered plugins.\n\t\t * @private\n\t\t */\n\t\t_plugins: [],\n\n\t\t/**\n\t\t * This identifier is used to invalidate the descriptors cache attached to each chart\n\t\t * when a global plugin is registered or unregistered. In this case, the cache ID is\n\t\t * incremented and descriptors are regenerated during following API calls.\n\t\t * @private\n\t\t */\n\t\t_cacheId: 0,\n\n\t\t/**\n\t\t * Registers the given plugin(s) if not already registered.\n\t\t * @param {Array|Object} plugins plugin instance(s).\n\t\t */\n\t\tregister: function(plugins) {\n\t\t\tvar p = this._plugins;\n\t\t\t([]).concat(plugins).forEach(function(plugin) {\n\t\t\t\tif (p.indexOf(plugin) === -1) {\n\t\t\t\t\tp.push(plugin);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis._cacheId++;\n\t\t},\n\n\t\t/**\n\t\t * Unregisters the given plugin(s) only if registered.\n\t\t * @param {Array|Object} plugins plugin instance(s).\n\t\t */\n\t\tunregister: function(plugins) {\n\t\t\tvar p = this._plugins;\n\t\t\t([]).concat(plugins).forEach(function(plugin) {\n\t\t\t\tvar idx = p.indexOf(plugin);\n\t\t\t\tif (idx !== -1) {\n\t\t\t\t\tp.splice(idx, 1);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthis._cacheId++;\n\t\t},\n\n\t\t/**\n\t\t * Remove all registered plugins.\n\t\t * @since 2.1.5\n\t\t */\n\t\tclear: function() {\n\t\t\tthis._plugins = [];\n\t\t\tthis._cacheId++;\n\t\t},\n\n\t\t/**\n\t\t * Returns the number of registered plugins?\n\t\t * @returns {Number}\n\t\t * @since 2.1.5\n\t\t */\n\t\tcount: function() {\n\t\t\treturn this._plugins.length;\n\t\t},\n\n\t\t/**\n\t\t * Returns all registered plugin instances.\n\t\t * @returns {Array} array of plugin objects.\n\t\t * @since 2.1.5\n\t\t */\n\t\tgetAll: function() {\n\t\t\treturn this._plugins;\n\t\t},\n\n\t\t/**\n\t\t * Calls enabled plugins for `chart` on the specified hook and with the given args.\n\t\t * This method immediately returns as soon as a plugin explicitly returns false. The\n\t\t * returned value can be used, for instance, to interrupt the current action.\n\t\t * @param {Object} chart - The chart instance for which plugins should be called.\n\t\t * @param {String} hook - The name of the plugin method to call (e.g. 'beforeUpdate').\n\t\t * @param {Array} [args] - Extra arguments to apply to the hook call.\n\t\t * @returns {Boolean} false if any of the plugins return false, else returns true.\n\t\t */\n\t\tnotify: function(chart, hook, args) {\n\t\t\tvar descriptors = this.descriptors(chart);\n\t\t\tvar ilen = descriptors.length;\n\t\t\tvar i, descriptor, plugin, params, method;\n\n\t\t\tfor (i=0; i<ilen; ++i) {\n\t\t\t\tdescriptor = descriptors[i];\n\t\t\t\tplugin = descriptor.plugin;\n\t\t\t\tmethod = plugin[hook];\n\t\t\t\tif (typeof method === 'function') {\n\t\t\t\t\tparams = [chart].concat(args || []);\n\t\t\t\t\tparams.push(descriptor.options);\n\t\t\t\t\tif (method.apply(plugin, params) === false) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n\t\t * Returns descriptors of enabled plugins for the given chart.\n\t\t * @returns {Array} [{ plugin, options }]\n\t\t * @private\n\t\t */\n\t\tdescriptors: function(chart) {\n\t\t\tvar cache = chart._plugins || (chart._plugins = {});\n\t\t\tif (cache.id === this._cacheId) {\n\t\t\t\treturn cache.descriptors;\n\t\t\t}\n\n\t\t\tvar plugins = [];\n\t\t\tvar descriptors = [];\n\t\t\tvar config = (chart && chart.config) || {};\n\t\t\tvar defaults = Chart.defaults.global.plugins;\n\t\t\tvar options = (config.options && config.options.plugins) || {};\n\n\t\t\tthis._plugins.concat(config.plugins || []).forEach(function(plugin) {\n\t\t\t\tvar idx = plugins.indexOf(plugin);\n\t\t\t\tif (idx !== -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar id = plugin.id;\n\t\t\t\tvar opts = options[id];\n\t\t\t\tif (opts === false) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (opts === true) {\n\t\t\t\t\topts = helpers.clone(defaults[id]);\n\t\t\t\t}\n\n\t\t\t\tplugins.push(plugin);\n\t\t\t\tdescriptors.push({\n\t\t\t\t\tplugin: plugin,\n\t\t\t\t\toptions: opts || {}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tcache.descriptors = descriptors;\n\t\t\tcache.id = this._cacheId;\n\t\t\treturn descriptors;\n\t\t}\n\t};\n\n\t/**\n\t * Plugin extension hooks.\n\t * @interface IPlugin\n\t * @since 2.1.0\n\t */\n\t/**\n\t * @method IPlugin#beforeInit\n\t * @desc Called before initializing `chart`.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t */\n\t/**\n\t * @method IPlugin#afterInit\n\t * @desc Called after `chart` has been initialized and before the first update.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t */\n\t/**\n\t * @method IPlugin#beforeUpdate\n\t * @desc Called before updating `chart`. If any plugin returns `false`, the update\n\t * is cancelled (and thus subsequent render(s)) until another `update` is triggered.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t * @returns {Boolean} `false` to cancel the chart update.\n\t */\n\t/**\n\t * @method IPlugin#afterUpdate\n\t * @desc Called after `chart` has been updated and before rendering. Note that this\n\t * hook will not be called if the chart update has been previously cancelled.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t */\n\t/**\n\t * @method IPlugin#beforeDatasetsUpdate\n \t * @desc Called before updating the `chart` datasets. If any plugin returns `false`,\n\t * the datasets update is cancelled until another `update` is triggered.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t * @returns {Boolean} false to cancel the datasets update.\n\t * @since version 2.1.5\n\t */\n\t/**\n\t * @method IPlugin#afterDatasetsUpdate\n\t * @desc Called after the `chart` datasets have been updated. Note that this hook\n\t * will not be called if the datasets update has been previously cancelled.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t * @since version 2.1.5\n\t */\n\t/**\n\t * @method IPlugin#beforeLayout\n\t * @desc Called before laying out `chart`. If any plugin returns `false`,\n\t * the layout update is cancelled until another `update` is triggered.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t * @returns {Boolean} `false` to cancel the chart layout.\n\t */\n\t/**\n\t * @method IPlugin#afterLayout\n\t * @desc Called after the `chart` has been layed out. Note that this hook will not\n\t * be called if the layout update has been previously cancelled.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t */\n\t/**\n\t * @method IPlugin#beforeRender\n\t * @desc Called before rendering `chart`. If any plugin returns `false`,\n\t * the rendering is cancelled until another `render` is triggered.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t * @returns {Boolean} `false` to cancel the chart rendering.\n\t */\n\t/**\n\t * @method IPlugin#afterRender\n\t * @desc Called after the `chart` has been fully rendered (and animation completed). Note\n\t * that this hook will not be called if the rendering has been previously cancelled.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t */\n\t/**\n\t * @method IPlugin#beforeDraw\n\t * @desc Called before drawing `chart` at every animation frame specified by the given\n\t * easing value. If any plugin returns `false`, the frame drawing is cancelled until\n\t * another `render` is triggered.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Number} easingValue - The current animation value, between 0.0 and 1.0.\n\t * @param {Object} options - The plugin options.\n\t * @returns {Boolean} `false` to cancel the chart drawing.\n\t */\n\t/**\n\t * @method IPlugin#afterDraw\n\t * @desc Called after the `chart` has been drawn for the specific easing value. Note\n\t * that this hook will not be called if the drawing has been previously cancelled.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Number} easingValue - The current animation value, between 0.0 and 1.0.\n\t * @param {Object} options - The plugin options.\n\t */\n\t/**\n\t * @method IPlugin#beforeDatasetsDraw\n \t * @desc Called before drawing the `chart` datasets. If any plugin returns `false`,\n\t * the datasets drawing is cancelled until another `render` is triggered.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Number} easingValue - The current animation value, between 0.0 and 1.0.\n\t * @param {Object} options - The plugin options.\n\t * @returns {Boolean} `false` to cancel the chart datasets drawing.\n\t */\n\t/**\n\t * @method IPlugin#afterDatasetsDraw\n\t * @desc Called after the `chart` datasets have been drawn. Note that this hook\n\t * will not be called if the datasets drawing has been previously cancelled.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Number} easingValue - The current animation value, between 0.0 and 1.0.\n\t * @param {Object} options - The plugin options.\n\t */\n\t/**\n\t * @method IPlugin#beforeEvent\n \t * @desc Called before processing the specified `event`. If any plugin returns `false`,\n\t * the event will be discarded.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {IEvent} event - The event object.\n\t * @param {Object} options - The plugin options.\n\t */\n\t/**\n\t * @method IPlugin#afterEvent\n\t * @desc Called after the `event` has been consumed. Note that this hook\n\t * will not be called if the `event` has been previously discarded.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {IEvent} event - The event object.\n\t * @param {Object} options - The plugin options.\n\t */\n\t/**\n\t * @method IPlugin#resize\n\t * @desc Called after the chart as been resized.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Number} size - The new canvas display size (eq. canvas.style width & height).\n\t * @param {Object} options - The plugin options.\n\t */\n\t/**\n\t * @method IPlugin#destroy\n\t * @desc Called after the chart as been destroyed.\n\t * @param {Chart.Controller} chart - The chart instance.\n\t * @param {Object} options - The plugin options.\n\t */\n\n\t/**\n\t * Provided for backward compatibility, use Chart.plugins instead\n\t * @namespace Chart.pluginService\n\t * @deprecated since version 2.1.5\n\t * @todo remove at version 3\n\t * @private\n\t */\n\tChart.pluginService = Chart.plugins;\n\n\t/**\n\t * Provided for backward compatibility, inheriting from Chart.PlugingBase has no\n\t * effect, instead simply create/register plugins via plain JavaScript objects.\n\t * @interface Chart.PluginBase\n\t * @deprecated since version 2.5.0\n\t * @todo remove at version 3\n\t * @private\n\t */\n\tChart.PluginBase = helpers.inherits({});\n};\n\n},{}],32:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.defaults.scale = {\n\t\tdisplay: true,\n\t\tposition: 'left',\n\n\t\t// grid line settings\n\t\tgridLines: {\n\t\t\tdisplay: true,\n\t\t\tcolor: 'rgba(0, 0, 0, 0.1)',\n\t\t\tlineWidth: 1,\n\t\t\tdrawBorder: true,\n\t\t\tdrawOnChartArea: true,\n\t\t\tdrawTicks: true,\n\t\t\ttickMarkLength: 10,\n\t\t\tzeroLineWidth: 1,\n\t\t\tzeroLineColor: 'rgba(0,0,0,0.25)',\n\t\t\toffsetGridLines: false,\n\t\t\tborderDash: [],\n\t\t\tborderDashOffset: 0.0\n\t\t},\n\n\t\t// scale label\n\t\tscaleLabel: {\n\t\t\t// actual label\n\t\t\tlabelString: '',\n\n\t\t\t// display property\n\t\t\tdisplay: false\n\t\t},\n\n\t\t// label settings\n\t\tticks: {\n\t\t\tbeginAtZero: false,\n\t\t\tminRotation: 0,\n\t\t\tmaxRotation: 50,\n\t\t\tmirror: false,\n\t\t\tpadding: 0,\n\t\t\treverse: false,\n\t\t\tdisplay: true,\n\t\t\tautoSkip: true,\n\t\t\tautoSkipPadding: 0,\n\t\t\tlabelOffset: 0,\n\t\t\t// We pass through arrays to be rendered as multiline labels, we convert Others to strings here.\n\t\t\tcallback: Chart.Ticks.formatters.values\n\t\t}\n\t};\n\n\tfunction computeTextSize(context, tick, font) {\n\t\treturn helpers.isArray(tick) ?\n\t\t\thelpers.longestText(context, font, tick) :\n\t\t\tcontext.measureText(tick).width;\n\t}\n\n\tfunction parseFontOptions(options) {\n\t\tvar getValueOrDefault = helpers.getValueOrDefault;\n\t\tvar globalDefaults = Chart.defaults.global;\n\t\tvar size = getValueOrDefault(options.fontSize, globalDefaults.defaultFontSize);\n\t\tvar style = getValueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle);\n\t\tvar family = getValueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily);\n\n\t\treturn {\n\t\t\tsize: size,\n\t\t\tstyle: style,\n\t\t\tfamily: family,\n\t\t\tfont: helpers.fontString(size, style, family)\n\t\t};\n\t}\n\n\tChart.Scale = Chart.Element.extend({\n\t\t/**\n\t\t * Get the padding needed for the scale\n\t\t * @method getPadding\n\t\t * @private\n\t\t * @returns {Padding} the necessary padding\n\t\t */\n\t\tgetPadding: function() {\n\t\t\tvar me = this;\n\t\t\treturn {\n\t\t\t\tleft: me.paddingLeft || 0,\n\t\t\t\ttop: me.paddingTop || 0,\n\t\t\t\tright: me.paddingRight || 0,\n\t\t\t\tbottom: me.paddingBottom || 0\n\t\t\t};\n\t\t},\n\n\t\t// These methods are ordered by lifecyle. Utilities then follow.\n\t\t// Any function defined here is inherited by all scale types.\n\t\t// Any function can be extended by the scale type\n\n\t\tbeforeUpdate: function() {\n\t\t\thelpers.callCallback(this.options.beforeUpdate, [this]);\n\t\t},\n\t\tupdate: function(maxWidth, maxHeight, margins) {\n\t\t\tvar me = this;\n\n\t\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\n\t\t\tme.beforeUpdate();\n\n\t\t\t// Absorb the master measurements\n\t\t\tme.maxWidth = maxWidth;\n\t\t\tme.maxHeight = maxHeight;\n\t\t\tme.margins = helpers.extend({\n\t\t\t\tleft: 0,\n\t\t\t\tright: 0,\n\t\t\t\ttop: 0,\n\t\t\t\tbottom: 0\n\t\t\t}, margins);\n\t\t\tme.longestTextCache = me.longestTextCache || {};\n\n\t\t\t// Dimensions\n\t\t\tme.beforeSetDimensions();\n\t\t\tme.setDimensions();\n\t\t\tme.afterSetDimensions();\n\n\t\t\t// Data min/max\n\t\t\tme.beforeDataLimits();\n\t\t\tme.determineDataLimits();\n\t\t\tme.afterDataLimits();\n\n\t\t\t// Ticks\n\t\t\tme.beforeBuildTicks();\n\t\t\tme.buildTicks();\n\t\t\tme.afterBuildTicks();\n\n\t\t\tme.beforeTickToLabelConversion();\n\t\t\tme.convertTicksToLabels();\n\t\t\tme.afterTickToLabelConversion();\n\n\t\t\t// Tick Rotation\n\t\t\tme.beforeCalculateTickRotation();\n\t\t\tme.calculateTickRotation();\n\t\t\tme.afterCalculateTickRotation();\n\t\t\t// Fit\n\t\t\tme.beforeFit();\n\t\t\tme.fit();\n\t\t\tme.afterFit();\n\t\t\t//\n\t\t\tme.afterUpdate();\n\n\t\t\treturn me.minSize;\n\n\t\t},\n\t\tafterUpdate: function() {\n\t\t\thelpers.callCallback(this.options.afterUpdate, [this]);\n\t\t},\n\n\t\t//\n\n\t\tbeforeSetDimensions: function() {\n\t\t\thelpers.callCallback(this.options.beforeSetDimensions, [this]);\n\t\t},\n\t\tsetDimensions: function() {\n\t\t\tvar me = this;\n\t\t\t// Set the unconstrained dimension before label rotation\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\t// Reset position before calculating rotation\n\t\t\t\tme.width = me.maxWidth;\n\t\t\t\tme.left = 0;\n\t\t\t\tme.right = me.width;\n\t\t\t} else {\n\t\t\t\tme.height = me.maxHeight;\n\n\t\t\t\t// Reset position before calculating rotation\n\t\t\t\tme.top = 0;\n\t\t\t\tme.bottom = me.height;\n\t\t\t}\n\n\t\t\t// Reset padding\n\t\t\tme.paddingLeft = 0;\n\t\t\tme.paddingTop = 0;\n\t\t\tme.paddingRight = 0;\n\t\t\tme.paddingBottom = 0;\n\t\t},\n\t\tafterSetDimensions: function() {\n\t\t\thelpers.callCallback(this.options.afterSetDimensions, [this]);\n\t\t},\n\n\t\t// Data limits\n\t\tbeforeDataLimits: function() {\n\t\t\thelpers.callCallback(this.options.beforeDataLimits, [this]);\n\t\t},\n\t\tdetermineDataLimits: helpers.noop,\n\t\tafterDataLimits: function() {\n\t\t\thelpers.callCallback(this.options.afterDataLimits, [this]);\n\t\t},\n\n\t\t//\n\t\tbeforeBuildTicks: function() {\n\t\t\thelpers.callCallback(this.options.beforeBuildTicks, [this]);\n\t\t},\n\t\tbuildTicks: helpers.noop,\n\t\tafterBuildTicks: function() {\n\t\t\thelpers.callCallback(this.options.afterBuildTicks, [this]);\n\t\t},\n\n\t\tbeforeTickToLabelConversion: function() {\n\t\t\thelpers.callCallback(this.options.beforeTickToLabelConversion, [this]);\n\t\t},\n\t\tconvertTicksToLabels: function() {\n\t\t\tvar me = this;\n\t\t\t// Convert ticks to strings\n\t\t\tvar tickOpts = me.options.ticks;\n\t\t\tme.ticks = me.ticks.map(tickOpts.userCallback || tickOpts.callback);\n\t\t},\n\t\tafterTickToLabelConversion: function() {\n\t\t\thelpers.callCallback(this.options.afterTickToLabelConversion, [this]);\n\t\t},\n\n\t\t//\n\n\t\tbeforeCalculateTickRotation: function() {\n\t\t\thelpers.callCallback(this.options.beforeCalculateTickRotation, [this]);\n\t\t},\n\t\tcalculateTickRotation: function() {\n\t\t\tvar me = this;\n\t\t\tvar context = me.ctx;\n\t\t\tvar tickOpts = me.options.ticks;\n\n\t\t\t// Get the width of each grid by calculating the difference\n\t\t\t// between x offsets between 0 and 1.\n\t\t\tvar tickFont = parseFontOptions(tickOpts);\n\t\t\tcontext.font = tickFont.font;\n\n\t\t\tvar labelRotation = tickOpts.minRotation || 0;\n\n\t\t\tif (me.options.display && me.isHorizontal()) {\n\t\t\t\tvar originalLabelWidth = helpers.longestText(context, tickFont.font, me.ticks, me.longestTextCache);\n\t\t\t\tvar labelWidth = originalLabelWidth;\n\t\t\t\tvar cosRotation;\n\t\t\t\tvar sinRotation;\n\n\t\t\t\t// Allow 3 pixels x2 padding either side for label readability\n\t\t\t\tvar tickWidth = me.getPixelForTick(1) - me.getPixelForTick(0) - 6;\n\n\t\t\t\t// Max label rotation can be set or default to 90 - also act as a loop counter\n\t\t\t\twhile (labelWidth > tickWidth && labelRotation < tickOpts.maxRotation) {\n\t\t\t\t\tvar angleRadians = helpers.toRadians(labelRotation);\n\t\t\t\t\tcosRotation = Math.cos(angleRadians);\n\t\t\t\t\tsinRotation = Math.sin(angleRadians);\n\n\t\t\t\t\tif (sinRotation * originalLabelWidth > me.maxHeight) {\n\t\t\t\t\t\t// go back one step\n\t\t\t\t\t\tlabelRotation--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tlabelRotation++;\n\t\t\t\t\tlabelWidth = cosRotation * originalLabelWidth;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tme.labelRotation = labelRotation;\n\t\t},\n\t\tafterCalculateTickRotation: function() {\n\t\t\thelpers.callCallback(this.options.afterCalculateTickRotation, [this]);\n\t\t},\n\n\t\t//\n\n\t\tbeforeFit: function() {\n\t\t\thelpers.callCallback(this.options.beforeFit, [this]);\n\t\t},\n\t\tfit: function() {\n\t\t\tvar me = this;\n\t\t\t// Reset\n\t\t\tvar minSize = me.minSize = {\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0\n\t\t\t};\n\n\t\t\tvar opts = me.options;\n\t\t\tvar tickOpts = opts.ticks;\n\t\t\tvar scaleLabelOpts = opts.scaleLabel;\n\t\t\tvar gridLineOpts = opts.gridLines;\n\t\t\tvar display = opts.display;\n\t\t\tvar isHorizontal = me.isHorizontal();\n\n\t\t\tvar tickFont = parseFontOptions(tickOpts);\n\t\t\tvar scaleLabelFontSize = parseFontOptions(scaleLabelOpts).size * 1.5;\n\t\t\tvar tickMarkLength = opts.gridLines.tickMarkLength;\n\n\t\t\t// Width\n\t\t\tif (isHorizontal) {\n\t\t\t\t// subtract the margins to line up with the chartArea if we are a full width scale\n\t\t\t\tminSize.width = me.isFullWidth() ? me.maxWidth - me.margins.left - me.margins.right : me.maxWidth;\n\t\t\t} else {\n\t\t\t\tminSize.width = display && gridLineOpts.drawTicks ? tickMarkLength : 0;\n\t\t\t}\n\n\t\t\t// height\n\t\t\tif (isHorizontal) {\n\t\t\t\tminSize.height = display && gridLineOpts.drawTicks ? tickMarkLength : 0;\n\t\t\t} else {\n\t\t\t\tminSize.height = me.maxHeight; // fill all the height\n\t\t\t}\n\n\t\t\t// Are we showing a title for the scale?\n\t\t\tif (scaleLabelOpts.display && display) {\n\t\t\t\tif (isHorizontal) {\n\t\t\t\t\tminSize.height += scaleLabelFontSize;\n\t\t\t\t} else {\n\t\t\t\t\tminSize.width += scaleLabelFontSize;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Don't bother fitting the ticks if we are not showing them\n\t\t\tif (tickOpts.display && display) {\n\t\t\t\tvar largestTextWidth = helpers.longestText(me.ctx, tickFont.font, me.ticks, me.longestTextCache);\n\t\t\t\tvar tallestLabelHeightInLines = helpers.numberOfLabelLines(me.ticks);\n\t\t\t\tvar lineSpace = tickFont.size * 0.5;\n\n\t\t\t\tif (isHorizontal) {\n\t\t\t\t\t// A horizontal axis is more constrained by the height.\n\t\t\t\t\tme.longestLabelWidth = largestTextWidth;\n\n\t\t\t\t\tvar angleRadians = helpers.toRadians(me.labelRotation);\n\t\t\t\t\tvar cosRotation = Math.cos(angleRadians);\n\t\t\t\t\tvar sinRotation = Math.sin(angleRadians);\n\n\t\t\t\t\t// TODO - improve this calculation\n\t\t\t\t\tvar labelHeight = (sinRotation * largestTextWidth)\n\t\t\t\t\t\t+ (tickFont.size * tallestLabelHeightInLines)\n\t\t\t\t\t\t+ (lineSpace * tallestLabelHeightInLines);\n\n\t\t\t\t\tminSize.height = Math.min(me.maxHeight, minSize.height + labelHeight);\n\t\t\t\t\tme.ctx.font = tickFont.font;\n\n\t\t\t\t\tvar firstTick = me.ticks[0];\n\t\t\t\t\tvar firstLabelWidth = computeTextSize(me.ctx, firstTick, tickFont.font);\n\n\t\t\t\t\tvar lastTick = me.ticks[me.ticks.length - 1];\n\t\t\t\t\tvar lastLabelWidth = computeTextSize(me.ctx, lastTick, tickFont.font);\n\n\t\t\t\t\t// Ensure that our ticks are always inside the canvas. When rotated, ticks are right aligned which means that the right padding is dominated\n\t\t\t\t\t// by the font height\n\t\t\t\t\tif (me.labelRotation !== 0) {\n\t\t\t\t\t\tme.paddingLeft = opts.position === 'bottom'? (cosRotation * firstLabelWidth) + 3: (cosRotation * lineSpace) + 3; // add 3 px to move away from canvas edges\n\t\t\t\t\t\tme.paddingRight = opts.position === 'bottom'? (cosRotation * lineSpace) + 3: (cosRotation * lastLabelWidth) + 3;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tme.paddingLeft = firstLabelWidth / 2 + 3; // add 3 px to move away from canvas edges\n\t\t\t\t\t\tme.paddingRight = lastLabelWidth / 2 + 3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// A vertical axis is more constrained by the width. Labels are the dominant factor here, so get that length first\n\t\t\t\t\t// Account for padding\n\n\t\t\t\t\tif (tickOpts.mirror) {\n\t\t\t\t\t\tlargestTextWidth = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlargestTextWidth += me.options.ticks.padding;\n\t\t\t\t\t}\n\t\t\t\t\tminSize.width += largestTextWidth;\n\t\t\t\t\tme.paddingTop = tickFont.size / 2;\n\t\t\t\t\tme.paddingBottom = tickFont.size / 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tme.handleMargins();\n\n\t\t\tme.width = minSize.width;\n\t\t\tme.height = minSize.height;\n\t\t},\n\n\t\t/**\n\t\t * Handle margins and padding interactions\n\t\t * @private\n\t\t */\n\t\thandleMargins: function() {\n\t\t\tvar me = this;\n\t\t\tif (me.margins) {\n\t\t\t\tme.paddingLeft = Math.max(me.paddingLeft - me.margins.left, 0);\n\t\t\t\tme.paddingTop = Math.max(me.paddingTop - me.margins.top, 0);\n\t\t\t\tme.paddingRight = Math.max(me.paddingRight - me.margins.right, 0);\n\t\t\t\tme.paddingBottom = Math.max(me.paddingBottom - me.margins.bottom, 0);\n\t\t\t}\n\t\t},\n\n\t\tafterFit: function() {\n\t\t\thelpers.callCallback(this.options.afterFit, [this]);\n\t\t},\n\n\t\t// Shared Methods\n\t\tisHorizontal: function() {\n\t\t\treturn this.options.position === 'top' || this.options.position === 'bottom';\n\t\t},\n\t\tisFullWidth: function() {\n\t\t\treturn (this.options.fullWidth);\n\t\t},\n\n\t\t// Get the correct value. NaN bad inputs, If the value type is object get the x or y based on whether we are horizontal or not\n\t\tgetRightValue: function(rawValue) {\n\t\t\t// Null and undefined values first\n\t\t\tif (rawValue === null || typeof(rawValue) === 'undefined') {\n\t\t\t\treturn NaN;\n\t\t\t}\n\t\t\t// isNaN(object) returns true, so make sure NaN is checking for a number; Discard Infinite values\n\t\t\tif (typeof(rawValue) === 'number' && !isFinite(rawValue)) {\n\t\t\t\treturn NaN;\n\t\t\t}\n\t\t\t// If it is in fact an object, dive in one more level\n\t\t\tif (typeof(rawValue) === 'object') {\n\t\t\t\tif ((rawValue instanceof Date) || (rawValue.isValid)) {\n\t\t\t\t\treturn rawValue;\n\t\t\t\t}\n\t\t\t\treturn this.getRightValue(this.isHorizontal() ? rawValue.x : rawValue.y);\n\t\t\t}\n\n\t\t\t// Value is good, return it\n\t\t\treturn rawValue;\n\t\t},\n\n\t\t// Used to get the value to display in the tooltip for the data at the given index\n\t\t// function getLabelForIndex(index, datasetIndex)\n\t\tgetLabelForIndex: helpers.noop,\n\n\t\t// Used to get data value locations. Value can either be an index or a numerical value\n\t\tgetPixelForValue: helpers.noop,\n\n\t\t// Used to get the data value from a given pixel. This is the inverse of getPixelForValue\n\t\tgetValueForPixel: helpers.noop,\n\n\t\t// Used for tick location, should\n\t\tgetPixelForTick: function(index, includeOffset) {\n\t\t\tvar me = this;\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\tvar innerWidth = me.width - (me.paddingLeft + me.paddingRight);\n\t\t\t\tvar tickWidth = innerWidth / Math.max((me.ticks.length - ((me.options.gridLines.offsetGridLines) ? 0 : 1)), 1);\n\t\t\t\tvar pixel = (tickWidth * index) + me.paddingLeft;\n\n\t\t\t\tif (includeOffset) {\n\t\t\t\t\tpixel += tickWidth / 2;\n\t\t\t\t}\n\n\t\t\t\tvar finalVal = me.left + Math.round(pixel);\n\t\t\t\tfinalVal += me.isFullWidth() ? me.margins.left : 0;\n\t\t\t\treturn finalVal;\n\t\t\t}\n\t\t\tvar innerHeight = me.height - (me.paddingTop + me.paddingBottom);\n\t\t\treturn me.top + (index * (innerHeight / (me.ticks.length - 1)));\n\t\t},\n\n\t\t// Utility for getting the pixel location of a percentage of scale\n\t\tgetPixelForDecimal: function(decimal /* , includeOffset*/) {\n\t\t\tvar me = this;\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\tvar innerWidth = me.width - (me.paddingLeft + me.paddingRight);\n\t\t\t\tvar valueOffset = (innerWidth * decimal) + me.paddingLeft;\n\n\t\t\t\tvar finalVal = me.left + Math.round(valueOffset);\n\t\t\t\tfinalVal += me.isFullWidth() ? me.margins.left : 0;\n\t\t\t\treturn finalVal;\n\t\t\t}\n\t\t\treturn me.top + (decimal * me.height);\n\t\t},\n\n\t\tgetBasePixel: function() {\n\t\t\treturn this.getPixelForValue(this.getBaseValue());\n\t\t},\n\n\t\tgetBaseValue: function() {\n\t\t\tvar me = this;\n\t\t\tvar min = me.min;\n\t\t\tvar max = me.max;\n\n\t\t\treturn me.beginAtZero ? 0:\n\t\t\t\tmin < 0 && max < 0? max :\n\t\t\t\tmin > 0 && max > 0? min :\n\t\t\t\t0;\n\t\t},\n\n\t\t// Actually draw the scale on the canvas\n\t\t// @param {rectangle} chartArea : the area of the chart to draw full grid lines on\n\t\tdraw: function(chartArea) {\n\t\t\tvar me = this;\n\t\t\tvar options = me.options;\n\t\t\tif (!options.display) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar context = me.ctx;\n\t\t\tvar globalDefaults = Chart.defaults.global;\n\t\t\tvar optionTicks = options.ticks;\n\t\t\tvar gridLines = options.gridLines;\n\t\t\tvar scaleLabel = options.scaleLabel;\n\n\t\t\tvar isRotated = me.labelRotation !== 0;\n\t\t\tvar skipRatio;\n\t\t\tvar useAutoskipper = optionTicks.autoSkip;\n\t\t\tvar isHorizontal = me.isHorizontal();\n\n\t\t\t// figure out the maximum number of gridlines to show\n\t\t\tvar maxTicks;\n\t\t\tif (optionTicks.maxTicksLimit) {\n\t\t\t\tmaxTicks = optionTicks.maxTicksLimit;\n\t\t\t}\n\n\t\t\tvar tickFontColor = helpers.getValueOrDefault(optionTicks.fontColor, globalDefaults.defaultFontColor);\n\t\t\tvar tickFont = parseFontOptions(optionTicks);\n\n\t\t\tvar tl = gridLines.drawTicks ? gridLines.tickMarkLength : 0;\n\t\t\tvar borderDash = helpers.getValueOrDefault(gridLines.borderDash, globalDefaults.borderDash);\n\t\t\tvar borderDashOffset = helpers.getValueOrDefault(gridLines.borderDashOffset, globalDefaults.borderDashOffset);\n\n\t\t\tvar scaleLabelFontColor = helpers.getValueOrDefault(scaleLabel.fontColor, globalDefaults.defaultFontColor);\n\t\t\tvar scaleLabelFont = parseFontOptions(scaleLabel);\n\n\t\t\tvar labelRotationRadians = helpers.toRadians(me.labelRotation);\n\t\t\tvar cosRotation = Math.cos(labelRotationRadians);\n\t\t\tvar longestRotatedLabel = me.longestLabelWidth * cosRotation;\n\n\t\t\t// Make sure we draw text in the correct color and font\n\t\t\tcontext.fillStyle = tickFontColor;\n\n\t\t\tvar itemsToDraw = [];\n\n\t\t\tif (isHorizontal) {\n\t\t\t\tskipRatio = false;\n\n\t\t\t\t// Only calculate the skip ratio with the half width of longestRotateLabel if we got an actual rotation\n\t\t\t\t// See #2584\n\t\t\t\tif (isRotated) {\n\t\t\t\t\tlongestRotatedLabel /= 2;\n\t\t\t\t}\n\n\t\t\t\tif ((longestRotatedLabel + optionTicks.autoSkipPadding) * me.ticks.length > (me.width - (me.paddingLeft + me.paddingRight))) {\n\t\t\t\t\tskipRatio = 1 + Math.floor(((longestRotatedLabel + optionTicks.autoSkipPadding) * me.ticks.length) / (me.width - (me.paddingLeft + me.paddingRight)));\n\t\t\t\t}\n\n\t\t\t\t// if they defined a max number of optionTicks,\n\t\t\t\t// increase skipRatio until that number is met\n\t\t\t\tif (maxTicks && me.ticks.length > maxTicks) {\n\t\t\t\t\twhile (!skipRatio || me.ticks.length / (skipRatio || 1) > maxTicks) {\n\t\t\t\t\t\tif (!skipRatio) {\n\t\t\t\t\t\t\tskipRatio = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tskipRatio += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!useAutoskipper) {\n\t\t\t\t\tskipRatio = false;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tvar xTickStart = options.position === 'right' ? me.left : me.right - tl;\n\t\t\tvar xTickEnd = options.position === 'right' ? me.left + tl : me.right;\n\t\t\tvar yTickStart = options.position === 'bottom' ? me.top : me.bottom - tl;\n\t\t\tvar yTickEnd = options.position === 'bottom' ? me.top + tl : me.bottom;\n\n\t\t\thelpers.each(me.ticks, function(label, index) {\n\t\t\t\t// If the callback returned a null or undefined value, do not draw this line\n\t\t\t\tif (label === undefined || label === null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar isLastTick = me.ticks.length === index + 1;\n\n\t\t\t\t// Since we always show the last tick,we need may need to hide the last shown one before\n\t\t\t\tvar shouldSkip = (skipRatio > 1 && index % skipRatio > 0) || (index % skipRatio === 0 && index + skipRatio >= me.ticks.length);\n\t\t\t\tif (shouldSkip && !isLastTick || (label === undefined || label === null)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar lineWidth, lineColor;\n\t\t\t\tif (index === (typeof me.zeroLineIndex !== 'undefined' ? me.zeroLineIndex : 0)) {\n\t\t\t\t\t// Draw the first index specially\n\t\t\t\t\tlineWidth = gridLines.zeroLineWidth;\n\t\t\t\t\tlineColor = gridLines.zeroLineColor;\n\t\t\t\t} else {\n\t\t\t\t\tlineWidth = helpers.getValueAtIndexOrDefault(gridLines.lineWidth, index);\n\t\t\t\t\tlineColor = helpers.getValueAtIndexOrDefault(gridLines.color, index);\n\t\t\t\t}\n\n\t\t\t\t// Common properties\n\t\t\t\tvar tx1, ty1, tx2, ty2, x1, y1, x2, y2, labelX, labelY;\n\t\t\t\tvar textAlign = 'middle';\n\t\t\t\tvar textBaseline = 'middle';\n\n\t\t\t\tif (isHorizontal) {\n\n\t\t\t\t\tif (options.position === 'bottom') {\n\t\t\t\t\t\t// bottom\n\t\t\t\t\t\ttextBaseline = !isRotated? 'top':'middle';\n\t\t\t\t\t\ttextAlign = !isRotated? 'center': 'right';\n\t\t\t\t\t\tlabelY = me.top + tl;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// top\n\t\t\t\t\t\ttextBaseline = !isRotated? 'bottom':'middle';\n\t\t\t\t\t\ttextAlign = !isRotated? 'center': 'left';\n\t\t\t\t\t\tlabelY = me.bottom - tl;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar xLineValue = me.getPixelForTick(index) + helpers.aliasPixel(lineWidth); // xvalues for grid lines\n\t\t\t\t\tlabelX = me.getPixelForTick(index, gridLines.offsetGridLines) + optionTicks.labelOffset; // x values for optionTicks (need to consider offsetLabel option)\n\n\t\t\t\t\ttx1 = tx2 = x1 = x2 = xLineValue;\n\t\t\t\t\tty1 = yTickStart;\n\t\t\t\t\tty2 = yTickEnd;\n\t\t\t\t\ty1 = chartArea.top;\n\t\t\t\t\ty2 = chartArea.bottom;\n\t\t\t\t} else {\n\t\t\t\t\tvar isLeft = options.position === 'left';\n\t\t\t\t\tvar tickPadding = optionTicks.padding;\n\t\t\t\t\tvar labelXOffset;\n\n\t\t\t\t\tif (optionTicks.mirror) {\n\t\t\t\t\t\ttextAlign = isLeft ? 'left' : 'right';\n\t\t\t\t\t\tlabelXOffset = tickPadding;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttextAlign = isLeft ? 'right' : 'left';\n\t\t\t\t\t\tlabelXOffset = tl + tickPadding;\n\t\t\t\t\t}\n\n\t\t\t\t\tlabelX = isLeft ? me.right - labelXOffset : me.left + labelXOffset;\n\n\t\t\t\t\tvar yLineValue = me.getPixelForTick(index); // xvalues for grid lines\n\t\t\t\t\tyLineValue += helpers.aliasPixel(lineWidth);\n\t\t\t\t\tlabelY = me.getPixelForTick(index, gridLines.offsetGridLines);\n\n\t\t\t\t\ttx1 = xTickStart;\n\t\t\t\t\ttx2 = xTickEnd;\n\t\t\t\t\tx1 = chartArea.left;\n\t\t\t\t\tx2 = chartArea.right;\n\t\t\t\t\tty1 = ty2 = y1 = y2 = yLineValue;\n\t\t\t\t}\n\n\t\t\t\titemsToDraw.push({\n\t\t\t\t\ttx1: tx1,\n\t\t\t\t\tty1: ty1,\n\t\t\t\t\ttx2: tx2,\n\t\t\t\t\tty2: ty2,\n\t\t\t\t\tx1: x1,\n\t\t\t\t\ty1: y1,\n\t\t\t\t\tx2: x2,\n\t\t\t\t\ty2: y2,\n\t\t\t\t\tlabelX: labelX,\n\t\t\t\t\tlabelY: labelY,\n\t\t\t\t\tglWidth: lineWidth,\n\t\t\t\t\tglColor: lineColor,\n\t\t\t\t\tglBorderDash: borderDash,\n\t\t\t\t\tglBorderDashOffset: borderDashOffset,\n\t\t\t\t\trotation: -1 * labelRotationRadians,\n\t\t\t\t\tlabel: label,\n\t\t\t\t\ttextBaseline: textBaseline,\n\t\t\t\t\ttextAlign: textAlign\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// Draw all of the tick labels, tick marks, and grid lines at the correct places\n\t\t\thelpers.each(itemsToDraw, function(itemToDraw) {\n\t\t\t\tif (gridLines.display) {\n\t\t\t\t\tcontext.save();\n\t\t\t\t\tcontext.lineWidth = itemToDraw.glWidth;\n\t\t\t\t\tcontext.strokeStyle = itemToDraw.glColor;\n\t\t\t\t\tif (context.setLineDash) {\n\t\t\t\t\t\tcontext.setLineDash(itemToDraw.glBorderDash);\n\t\t\t\t\t\tcontext.lineDashOffset = itemToDraw.glBorderDashOffset;\n\t\t\t\t\t}\n\n\t\t\t\t\tcontext.beginPath();\n\n\t\t\t\t\tif (gridLines.drawTicks) {\n\t\t\t\t\t\tcontext.moveTo(itemToDraw.tx1, itemToDraw.ty1);\n\t\t\t\t\t\tcontext.lineTo(itemToDraw.tx2, itemToDraw.ty2);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (gridLines.drawOnChartArea) {\n\t\t\t\t\t\tcontext.moveTo(itemToDraw.x1, itemToDraw.y1);\n\t\t\t\t\t\tcontext.lineTo(itemToDraw.x2, itemToDraw.y2);\n\t\t\t\t\t}\n\n\t\t\t\t\tcontext.stroke();\n\t\t\t\t\tcontext.restore();\n\t\t\t\t}\n\n\t\t\t\tif (optionTicks.display) {\n\t\t\t\t\tcontext.save();\n\t\t\t\t\tcontext.translate(itemToDraw.labelX, itemToDraw.labelY);\n\t\t\t\t\tcontext.rotate(itemToDraw.rotation);\n\t\t\t\t\tcontext.font = tickFont.font;\n\t\t\t\t\tcontext.textBaseline = itemToDraw.textBaseline;\n\t\t\t\t\tcontext.textAlign = itemToDraw.textAlign;\n\n\t\t\t\t\tvar label = itemToDraw.label;\n\t\t\t\t\tif (helpers.isArray(label)) {\n\t\t\t\t\t\tfor (var i = 0, y = 0; i < label.length; ++i) {\n\t\t\t\t\t\t\t// We just make sure the multiline element is a string here..\n\t\t\t\t\t\t\tcontext.fillText('' + label[i], 0, y);\n\t\t\t\t\t\t\t// apply same lineSpacing as calculated @ L#320\n\t\t\t\t\t\t\ty += (tickFont.size * 1.5);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.fillText(label, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t\tcontext.restore();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (scaleLabel.display) {\n\t\t\t\t// Draw the scale label\n\t\t\t\tvar scaleLabelX;\n\t\t\t\tvar scaleLabelY;\n\t\t\t\tvar rotation = 0;\n\n\t\t\t\tif (isHorizontal) {\n\t\t\t\t\tscaleLabelX = me.left + ((me.right - me.left) / 2); // midpoint of the width\n\t\t\t\t\tscaleLabelY = options.position === 'bottom' ? me.bottom - (scaleLabelFont.size / 2) : me.top + (scaleLabelFont.size / 2);\n\t\t\t\t} else {\n\t\t\t\t\tvar isLeft = options.position === 'left';\n\t\t\t\t\tscaleLabelX = isLeft ? me.left + (scaleLabelFont.size / 2) : me.right - (scaleLabelFont.size / 2);\n\t\t\t\t\tscaleLabelY = me.top + ((me.bottom - me.top) / 2);\n\t\t\t\t\trotation = isLeft ? -0.5 * Math.PI : 0.5 * Math.PI;\n\t\t\t\t}\n\n\t\t\t\tcontext.save();\n\t\t\t\tcontext.translate(scaleLabelX, scaleLabelY);\n\t\t\t\tcontext.rotate(rotation);\n\t\t\t\tcontext.textAlign = 'center';\n\t\t\t\tcontext.textBaseline = 'middle';\n\t\t\t\tcontext.fillStyle = scaleLabelFontColor; // render in correct colour\n\t\t\t\tcontext.font = scaleLabelFont.font;\n\t\t\t\tcontext.fillText(scaleLabel.labelString, 0, 0);\n\t\t\t\tcontext.restore();\n\t\t\t}\n\n\t\t\tif (gridLines.drawBorder) {\n\t\t\t\t// Draw the line at the edge of the axis\n\t\t\t\tcontext.lineWidth = helpers.getValueAtIndexOrDefault(gridLines.lineWidth, 0);\n\t\t\t\tcontext.strokeStyle = helpers.getValueAtIndexOrDefault(gridLines.color, 0);\n\t\t\t\tvar x1 = me.left,\n\t\t\t\t\tx2 = me.right,\n\t\t\t\t\ty1 = me.top,\n\t\t\t\t\ty2 = me.bottom;\n\n\t\t\t\tvar aliasPixel = helpers.aliasPixel(context.lineWidth);\n\t\t\t\tif (isHorizontal) {\n\t\t\t\t\ty1 = y2 = options.position === 'top' ? me.bottom : me.top;\n\t\t\t\t\ty1 += aliasPixel;\n\t\t\t\t\ty2 += aliasPixel;\n\t\t\t\t} else {\n\t\t\t\t\tx1 = x2 = options.position === 'left' ? me.right : me.left;\n\t\t\t\t\tx1 += aliasPixel;\n\t\t\t\t\tx2 += aliasPixel;\n\t\t\t\t}\n\n\t\t\t\tcontext.beginPath();\n\t\t\t\tcontext.moveTo(x1, y1);\n\t\t\t\tcontext.lineTo(x2, y2);\n\t\t\t\tcontext.stroke();\n\t\t\t}\n\t\t}\n\t});\n};\n\n},{}],33:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.scaleService = {\n\t\t// Scale registration object. Extensions can register new scale types (such as log or DB scales) and then\n\t\t// use the new chart options to grab the correct scale\n\t\tconstructors: {},\n\t\t// Use a registration function so that we can move to an ES6 map when we no longer need to support\n\t\t// old browsers\n\n\t\t// Scale config defaults\n\t\tdefaults: {},\n\t\tregisterScaleType: function(type, scaleConstructor, defaults) {\n\t\t\tthis.constructors[type] = scaleConstructor;\n\t\t\tthis.defaults[type] = helpers.clone(defaults);\n\t\t},\n\t\tgetScaleConstructor: function(type) {\n\t\t\treturn this.constructors.hasOwnProperty(type) ? this.constructors[type] : undefined;\n\t\t},\n\t\tgetScaleDefaults: function(type) {\n\t\t\t// Return the scale defaults merged with the global settings so that we always use the latest ones\n\t\t\treturn this.defaults.hasOwnProperty(type) ? helpers.scaleMerge(Chart.defaults.scale, this.defaults[type]) : {};\n\t\t},\n\t\tupdateScaleDefaults: function(type, additions) {\n\t\t\tvar defaults = this.defaults;\n\t\t\tif (defaults.hasOwnProperty(type)) {\n\t\t\t\tdefaults[type] = helpers.extend(defaults[type], additions);\n\t\t\t}\n\t\t},\n\t\taddScalesToLayout: function(chartInstance) {\n\t\t\t// Adds each scale to the chart.boxes array to be sized accordingly\n\t\t\thelpers.each(chartInstance.scales, function(scale) {\n\t\t\t\tChart.layoutService.addBox(chartInstance, scale);\n\t\t\t});\n\t\t}\n\t};\n};\n\n},{}],34:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\t/**\n\t * Namespace to hold static tick generation functions\n\t * @namespace Chart.Ticks\n\t */\n\tChart.Ticks = {\n\t\t/**\n\t\t * Namespace to hold generators for different types of ticks\n\t\t * @namespace Chart.Ticks.generators\n\t\t */\n\t\tgenerators: {\n\t\t\t/**\n\t\t\t * Interface for the options provided to the numeric tick generator\n\t\t\t * @interface INumericTickGenerationOptions\n\t\t\t */\n\t\t\t/**\n\t\t\t * The maximum number of ticks to display\n\t\t\t * @name INumericTickGenerationOptions#maxTicks\n\t\t\t * @type Number\n\t\t\t */\n\t\t\t/**\n\t\t\t * The distance between each tick.\n\t\t\t * @name INumericTickGenerationOptions#stepSize\n\t\t\t * @type Number\n\t\t\t * @optional\n\t\t\t */\n\t\t\t/**\n\t\t\t * Forced minimum for the ticks. If not specified, the minimum of the data range is used to calculate the tick minimum\n\t\t\t * @name INumericTickGenerationOptions#min\n\t\t\t * @type Number\n\t\t\t * @optional\n\t\t\t */\n\t\t\t/**\n\t\t\t * The maximum value of the ticks. If not specified, the maximum of the data range is used to calculate the tick maximum\n\t\t\t * @name INumericTickGenerationOptions#max\n\t\t\t * @type Number\n\t\t\t * @optional\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Generate a set of linear ticks\n\t\t\t * @method Chart.Ticks.generators.linear\n\t\t\t * @param generationOptions {INumericTickGenerationOptions} the options used to generate the ticks\n\t\t\t * @param dataRange {IRange} the range of the data\n\t\t\t * @returns {Array<Number>} array of tick values\n\t\t\t */\n\t\t\tlinear: function(generationOptions, dataRange) {\n\t\t\t\tvar ticks = [];\n\t\t\t\t// To get a \"nice\" value for the tick spacing, we will use the appropriately named\n\t\t\t\t// \"nice number\" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks\n\t\t\t\t// for details.\n\n\t\t\t\tvar spacing;\n\t\t\t\tif (generationOptions.stepSize && generationOptions.stepSize > 0) {\n\t\t\t\t\tspacing = generationOptions.stepSize;\n\t\t\t\t} else {\n\t\t\t\t\tvar niceRange = helpers.niceNum(dataRange.max - dataRange.min, false);\n\t\t\t\t\tspacing = helpers.niceNum(niceRange / (generationOptions.maxTicks - 1), true);\n\t\t\t\t}\n\t\t\t\tvar niceMin = Math.floor(dataRange.min / spacing) * spacing;\n\t\t\t\tvar niceMax = Math.ceil(dataRange.max / spacing) * spacing;\n\n\t\t\t\t// If min, max and stepSize is set and they make an evenly spaced scale use it.\n\t\t\t\tif (generationOptions.min && generationOptions.max && generationOptions.stepSize) {\n\t\t\t\t\t// If very close to our whole number, use it.\n\t\t\t\t\tif (helpers.almostWhole((generationOptions.max - generationOptions.min) / generationOptions.stepSize, spacing / 1000)) {\n\t\t\t\t\t\tniceMin = generationOptions.min;\n\t\t\t\t\t\tniceMax = generationOptions.max;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar numSpaces = (niceMax - niceMin) / spacing;\n\t\t\t\t// If very close to our rounded value, use it.\n\t\t\t\tif (helpers.almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\n\t\t\t\t\tnumSpaces = Math.round(numSpaces);\n\t\t\t\t} else {\n\t\t\t\t\tnumSpaces = Math.ceil(numSpaces);\n\t\t\t\t}\n\n\t\t\t\t// Put the values into the ticks array\n\t\t\t\tticks.push(generationOptions.min !== undefined ? generationOptions.min : niceMin);\n\t\t\t\tfor (var j = 1; j < numSpaces; ++j) {\n\t\t\t\t\tticks.push(niceMin + (j * spacing));\n\t\t\t\t}\n\t\t\t\tticks.push(generationOptions.max !== undefined ? generationOptions.max : niceMax);\n\n\t\t\t\treturn ticks;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Generate a set of logarithmic ticks\n\t\t\t * @method Chart.Ticks.generators.logarithmic\n\t\t\t * @param generationOptions {INumericTickGenerationOptions} the options used to generate the ticks\n\t\t\t * @param dataRange {IRange} the range of the data\n\t\t\t * @returns {Array<Number>} array of tick values\n\t\t\t */\n\t\t\tlogarithmic: function(generationOptions, dataRange) {\n\t\t\t\tvar ticks = [];\n\t\t\t\tvar getValueOrDefault = helpers.getValueOrDefault;\n\n\t\t\t\t// Figure out what the max number of ticks we can support it is based on the size of\n\t\t\t\t// the axis area. For now, we say that the minimum tick spacing in pixels must be 50\n\t\t\t\t// We also limit the maximum number of ticks to 11 which gives a nice 10 squares on\n\t\t\t\t// the graph\n\t\t\t\tvar tickVal = getValueOrDefault(generationOptions.min, Math.pow(10, Math.floor(helpers.log10(dataRange.min))));\n\n\t\t\t\tvar endExp = Math.floor(helpers.log10(dataRange.max));\n\t\t\t\tvar endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp));\n\t\t\t\tvar exp;\n\t\t\t\tvar significand;\n\n\t\t\t\tif (tickVal === 0) {\n\t\t\t\t\texp = Math.floor(helpers.log10(dataRange.minNotZero));\n\t\t\t\t\tsignificand = Math.floor(dataRange.minNotZero / Math.pow(10, exp));\n\n\t\t\t\t\tticks.push(tickVal);\n\t\t\t\t\ttickVal = significand * Math.pow(10, exp);\n\t\t\t\t} else {\n\t\t\t\t\texp = Math.floor(helpers.log10(tickVal));\n\t\t\t\t\tsignificand = Math.floor(tickVal / Math.pow(10, exp));\n\t\t\t\t}\n\n\t\t\t\tdo {\n\t\t\t\t\tticks.push(tickVal);\n\n\t\t\t\t\t++significand;\n\t\t\t\t\tif (significand === 10) {\n\t\t\t\t\t\tsignificand = 1;\n\t\t\t\t\t\t++exp;\n\t\t\t\t\t}\n\n\t\t\t\t\ttickVal = significand * Math.pow(10, exp);\n\t\t\t\t} while (exp < endExp || (exp === endExp && significand < endSignificand));\n\n\t\t\t\tvar lastTick = getValueOrDefault(generationOptions.max, tickVal);\n\t\t\t\tticks.push(lastTick);\n\n\t\t\t\treturn ticks;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Namespace to hold formatters for different types of ticks\n\t\t * @namespace Chart.Ticks.formatters\n\t\t */\n\t\tformatters: {\n\t\t\t/**\n\t\t\t * Formatter for value labels\n\t\t\t * @method Chart.Ticks.formatters.values\n\t\t\t * @param value the value to display\n\t\t\t * @return {String|Array} the label to display\n\t\t\t */\n\t\t\tvalues: function(value) {\n\t\t\t\treturn helpers.isArray(value) ? value : '' + value;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Formatter for linear numeric ticks\n\t\t\t * @method Chart.Ticks.formatters.linear\n\t\t\t * @param tickValue {Number} the value to be formatted\n\t\t\t * @param index {Number} the position of the tickValue parameter in the ticks array\n\t\t\t * @param ticks {Array<Number>} the list of ticks being converted\n\t\t\t * @return {String} string representation of the tickValue parameter\n\t\t\t */\n\t\t\tlinear: function(tickValue, index, ticks) {\n\t\t\t\t// If we have lots of ticks, don't use the ones\n\t\t\t\tvar delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0];\n\n\t\t\t\t// If we have a number like 2.5 as the delta, figure out how many decimal places we need\n\t\t\t\tif (Math.abs(delta) > 1) {\n\t\t\t\t\tif (tickValue !== Math.floor(tickValue)) {\n\t\t\t\t\t\t// not an integer\n\t\t\t\t\t\tdelta = tickValue - Math.floor(tickValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar logDelta = helpers.log10(Math.abs(delta));\n\t\t\t\tvar tickString = '';\n\n\t\t\t\tif (tickValue !== 0) {\n\t\t\t\t\tvar numDecimal = -1 * Math.floor(logDelta);\n\t\t\t\t\tnumDecimal = Math.max(Math.min(numDecimal, 20), 0); // toFixed has a max of 20 decimal places\n\t\t\t\t\ttickString = tickValue.toFixed(numDecimal);\n\t\t\t\t} else {\n\t\t\t\t\ttickString = '0'; // never show decimal places for 0\n\t\t\t\t}\n\n\t\t\t\treturn tickString;\n\t\t\t},\n\n\t\t\tlogarithmic: function(tickValue, index, ticks) {\n\t\t\t\tvar remain = tickValue / (Math.pow(10, Math.floor(helpers.log10(tickValue))));\n\n\t\t\t\tif (tickValue === 0) {\n\t\t\t\t\treturn '0';\n\t\t\t\t} else if (remain === 1 || remain === 2 || remain === 5 || index === 0 || index === ticks.length - 1) {\n\t\t\t\t\treturn tickValue.toExponential();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\t};\n};\n\n},{}],35:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tChart.defaults.global.title = {\n\t\tdisplay: false,\n\t\tposition: 'top',\n\t\tfullWidth: true, // marks that this box should take the full width of the canvas (pushing down other boxes)\n\n\t\tfontStyle: 'bold',\n\t\tpadding: 10,\n\n\t\t// actual title\n\t\ttext: ''\n\t};\n\n\tvar noop = helpers.noop;\n\tChart.Title = Chart.Element.extend({\n\n\t\tinitialize: function(config) {\n\t\t\tvar me = this;\n\t\t\thelpers.extend(me, config);\n\n\t\t\t// Contains hit boxes for each dataset (in dataset order)\n\t\t\tme.legendHitBoxes = [];\n\t\t},\n\n\t\t// These methods are ordered by lifecycle. Utilities then follow.\n\n\t\tbeforeUpdate: noop,\n\t\tupdate: function(maxWidth, maxHeight, margins) {\n\t\t\tvar me = this;\n\n\t\t\t// Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)\n\t\t\tme.beforeUpdate();\n\n\t\t\t// Absorb the master measurements\n\t\t\tme.maxWidth = maxWidth;\n\t\t\tme.maxHeight = maxHeight;\n\t\t\tme.margins = margins;\n\n\t\t\t// Dimensions\n\t\t\tme.beforeSetDimensions();\n\t\t\tme.setDimensions();\n\t\t\tme.afterSetDimensions();\n\t\t\t// Labels\n\t\t\tme.beforeBuildLabels();\n\t\t\tme.buildLabels();\n\t\t\tme.afterBuildLabels();\n\n\t\t\t// Fit\n\t\t\tme.beforeFit();\n\t\t\tme.fit();\n\t\t\tme.afterFit();\n\t\t\t//\n\t\t\tme.afterUpdate();\n\n\t\t\treturn me.minSize;\n\n\t\t},\n\t\tafterUpdate: noop,\n\n\t\t//\n\n\t\tbeforeSetDimensions: noop,\n\t\tsetDimensions: function() {\n\t\t\tvar me = this;\n\t\t\t// Set the unconstrained dimension before label rotation\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\t// Reset position before calculating rotation\n\t\t\t\tme.width = me.maxWidth;\n\t\t\t\tme.left = 0;\n\t\t\t\tme.right = me.width;\n\t\t\t} else {\n\t\t\t\tme.height = me.maxHeight;\n\n\t\t\t\t// Reset position before calculating rotation\n\t\t\t\tme.top = 0;\n\t\t\t\tme.bottom = me.height;\n\t\t\t}\n\n\t\t\t// Reset padding\n\t\t\tme.paddingLeft = 0;\n\t\t\tme.paddingTop = 0;\n\t\t\tme.paddingRight = 0;\n\t\t\tme.paddingBottom = 0;\n\n\t\t\t// Reset minSize\n\t\t\tme.minSize = {\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0\n\t\t\t};\n\t\t},\n\t\tafterSetDimensions: noop,\n\n\t\t//\n\n\t\tbeforeBuildLabels: noop,\n\t\tbuildLabels: noop,\n\t\tafterBuildLabels: noop,\n\n\t\t//\n\n\t\tbeforeFit: noop,\n\t\tfit: function() {\n\t\t\tvar me = this,\n\t\t\t\tvalueOrDefault = helpers.getValueOrDefault,\n\t\t\t\topts = me.options,\n\t\t\t\tglobalDefaults = Chart.defaults.global,\n\t\t\t\tdisplay = opts.display,\n\t\t\t\tfontSize = valueOrDefault(opts.fontSize, globalDefaults.defaultFontSize),\n\t\t\t\tminSize = me.minSize;\n\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\tminSize.width = me.maxWidth; // fill all the width\n\t\t\t\tminSize.height = display ? fontSize + (opts.padding * 2) : 0;\n\t\t\t} else {\n\t\t\t\tminSize.width = display ? fontSize + (opts.padding * 2) : 0;\n\t\t\t\tminSize.height = me.maxHeight; // fill all the height\n\t\t\t}\n\n\t\t\tme.width = minSize.width;\n\t\t\tme.height = minSize.height;\n\n\t\t},\n\t\tafterFit: noop,\n\n\t\t// Shared Methods\n\t\tisHorizontal: function() {\n\t\t\tvar pos = this.options.position;\n\t\t\treturn pos === 'top' || pos === 'bottom';\n\t\t},\n\n\t\t// Actually draw the title block on the canvas\n\t\tdraw: function() {\n\t\t\tvar me = this,\n\t\t\t\tctx = me.ctx,\n\t\t\t\tvalueOrDefault = helpers.getValueOrDefault,\n\t\t\t\topts = me.options,\n\t\t\t\tglobalDefaults = Chart.defaults.global;\n\n\t\t\tif (opts.display) {\n\t\t\t\tvar fontSize = valueOrDefault(opts.fontSize, globalDefaults.defaultFontSize),\n\t\t\t\t\tfontStyle = valueOrDefault(opts.fontStyle, globalDefaults.defaultFontStyle),\n\t\t\t\t\tfontFamily = valueOrDefault(opts.fontFamily, globalDefaults.defaultFontFamily),\n\t\t\t\t\ttitleFont = helpers.fontString(fontSize, fontStyle, fontFamily),\n\t\t\t\t\trotation = 0,\n\t\t\t\t\ttitleX,\n\t\t\t\t\ttitleY,\n\t\t\t\t\ttop = me.top,\n\t\t\t\t\tleft = me.left,\n\t\t\t\t\tbottom = me.bottom,\n\t\t\t\t\tright = me.right,\n\t\t\t\t\tmaxWidth;\n\n\t\t\t\tctx.fillStyle = valueOrDefault(opts.fontColor, globalDefaults.defaultFontColor); // render in correct colour\n\t\t\t\tctx.font = titleFont;\n\n\t\t\t\t// Horizontal\n\t\t\t\tif (me.isHorizontal()) {\n\t\t\t\t\ttitleX = left + ((right - left) / 2); // midpoint of the width\n\t\t\t\t\ttitleY = top + ((bottom - top) / 2); // midpoint of the height\n\t\t\t\t\tmaxWidth = right - left;\n\t\t\t\t} else {\n\t\t\t\t\ttitleX = opts.position === 'left' ? left + (fontSize / 2) : right - (fontSize / 2);\n\t\t\t\t\ttitleY = top + ((bottom - top) / 2);\n\t\t\t\t\tmaxWidth = bottom - top;\n\t\t\t\t\trotation = Math.PI * (opts.position === 'left' ? -0.5 : 0.5);\n\t\t\t\t}\n\n\t\t\t\tctx.save();\n\t\t\t\tctx.translate(titleX, titleY);\n\t\t\t\tctx.rotate(rotation);\n\t\t\t\tctx.textAlign = 'center';\n\t\t\t\tctx.textBaseline = 'middle';\n\t\t\t\tctx.fillText(opts.text, 0, 0, maxWidth);\n\t\t\t\tctx.restore();\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction createNewTitleBlockAndAttach(chartInstance, titleOpts) {\n\t\tvar title = new Chart.Title({\n\t\t\tctx: chartInstance.chart.ctx,\n\t\t\toptions: titleOpts,\n\t\t\tchart: chartInstance\n\t\t});\n\t\tchartInstance.titleBlock = title;\n\t\tChart.layoutService.addBox(chartInstance, title);\n\t}\n\n\t// Register the title plugin\n\tChart.plugins.register({\n\t\tbeforeInit: function(chartInstance) {\n\t\t\tvar titleOpts = chartInstance.options.title;\n\n\t\t\tif (titleOpts) {\n\t\t\t\tcreateNewTitleBlockAndAttach(chartInstance, titleOpts);\n\t\t\t}\n\t\t},\n\t\tbeforeUpdate: function(chartInstance) {\n\t\t\tvar titleOpts = chartInstance.options.title;\n\n\t\t\tif (titleOpts) {\n\t\t\t\ttitleOpts = helpers.configMerge(Chart.defaults.global.title, titleOpts);\n\n\t\t\t\tif (chartInstance.titleBlock) {\n\t\t\t\t\tchartInstance.titleBlock.options = titleOpts;\n\t\t\t\t} else {\n\t\t\t\t\tcreateNewTitleBlockAndAttach(chartInstance, titleOpts);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tChart.layoutService.removeBox(chartInstance, chartInstance.titleBlock);\n\t\t\t\tdelete chartInstance.titleBlock;\n\t\t\t}\n\t\t}\n\t});\n};\n\n},{}],36:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\t/**\n \t * Helper method to merge the opacity into a color\n \t */\n\tfunction mergeOpacity(colorString, opacity) {\n\t\tvar color = helpers.color(colorString);\n\t\treturn color.alpha(opacity * color.alpha()).rgbaString();\n\t}\n\n\tChart.defaults.global.tooltips = {\n\t\tenabled: true,\n\t\tcustom: null,\n\t\tmode: 'nearest',\n\t\tposition: 'average',\n\t\tintersect: true,\n\t\tbackgroundColor: 'rgba(0,0,0,0.8)',\n\t\ttitleFontStyle: 'bold',\n\t\ttitleSpacing: 2,\n\t\ttitleMarginBottom: 6,\n\t\ttitleFontColor: '#fff',\n\t\ttitleAlign: 'left',\n\t\tbodySpacing: 2,\n\t\tbodyFontColor: '#fff',\n\t\tbodyAlign: 'left',\n\t\tfooterFontStyle: 'bold',\n\t\tfooterSpacing: 2,\n\t\tfooterMarginTop: 6,\n\t\tfooterFontColor: '#fff',\n\t\tfooterAlign: 'left',\n\t\tyPadding: 6,\n\t\txPadding: 6,\n\t\tcaretSize: 5,\n\t\tcornerRadius: 6,\n\t\tmultiKeyBackground: '#fff',\n\t\tdisplayColors: true,\n\t\tcallbacks: {\n\t\t\t// Args are: (tooltipItems, data)\n\t\t\tbeforeTitle: helpers.noop,\n\t\t\ttitle: function(tooltipItems, data) {\n\t\t\t\t// Pick first xLabel for now\n\t\t\t\tvar title = '';\n\t\t\t\tvar labels = data.labels;\n\t\t\t\tvar labelCount = labels ? labels.length : 0;\n\n\t\t\t\tif (tooltipItems.length > 0) {\n\t\t\t\t\tvar item = tooltipItems[0];\n\n\t\t\t\t\tif (item.xLabel) {\n\t\t\t\t\t\ttitle = item.xLabel;\n\t\t\t\t\t} else if (labelCount > 0 && item.index < labelCount) {\n\t\t\t\t\t\ttitle = labels[item.index];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn title;\n\t\t\t},\n\t\t\tafterTitle: helpers.noop,\n\n\t\t\t// Args are: (tooltipItems, data)\n\t\t\tbeforeBody: helpers.noop,\n\n\t\t\t// Args are: (tooltipItem, data)\n\t\t\tbeforeLabel: helpers.noop,\n\t\t\tlabel: function(tooltipItem, data) {\n\t\t\t\tvar datasetLabel = data.datasets[tooltipItem.datasetIndex].label || '';\n\t\t\t\treturn datasetLabel + ': ' + tooltipItem.yLabel;\n\t\t\t},\n\t\t\tlabelColor: function(tooltipItem, chartInstance) {\n\t\t\t\tvar meta = chartInstance.getDatasetMeta(tooltipItem.datasetIndex);\n\t\t\t\tvar activeElement = meta.data[tooltipItem.index];\n\t\t\t\tvar view = activeElement._view;\n\t\t\t\treturn {\n\t\t\t\t\tborderColor: view.borderColor,\n\t\t\t\t\tbackgroundColor: view.backgroundColor\n\t\t\t\t};\n\t\t\t},\n\t\t\tafterLabel: helpers.noop,\n\n\t\t\t// Args are: (tooltipItems, data)\n\t\t\tafterBody: helpers.noop,\n\n\t\t\t// Args are: (tooltipItems, data)\n\t\t\tbeforeFooter: helpers.noop,\n\t\t\tfooter: helpers.noop,\n\t\t\tafterFooter: helpers.noop\n\t\t}\n\t};\n\n\t// Helper to push or concat based on if the 2nd parameter is an array or not\n\tfunction pushOrConcat(base, toPush) {\n\t\tif (toPush) {\n\t\t\tif (helpers.isArray(toPush)) {\n\t\t\t\t// base = base.concat(toPush);\n\t\t\t\tArray.prototype.push.apply(base, toPush);\n\t\t\t} else {\n\t\t\t\tbase.push(toPush);\n\t\t\t}\n\t\t}\n\n\t\treturn base;\n\t}\n\n\t// Private helper to create a tooltip item model\n\t// @param element : the chart element (point, arc, bar) to create the tooltip item for\n\t// @return : new tooltip item\n\tfunction createTooltipItem(element) {\n\t\tvar xScale = element._xScale;\n\t\tvar yScale = element._yScale || element._scale; // handle radar || polarArea charts\n\t\tvar index = element._index,\n\t\t\tdatasetIndex = element._datasetIndex;\n\n\t\treturn {\n\t\t\txLabel: xScale ? xScale.getLabelForIndex(index, datasetIndex) : '',\n\t\t\tyLabel: yScale ? yScale.getLabelForIndex(index, datasetIndex) : '',\n\t\t\tindex: index,\n\t\t\tdatasetIndex: datasetIndex,\n\t\t\tx: element._model.x,\n\t\t\ty: element._model.y\n\t\t};\n\t}\n\n\t/**\n\t * Helper to get the reset model for the tooltip\n\t * @param tooltipOpts {Object} the tooltip options\n\t */\n\tfunction getBaseModel(tooltipOpts) {\n\t\tvar globalDefaults = Chart.defaults.global;\n\t\tvar getValueOrDefault = helpers.getValueOrDefault;\n\n\t\treturn {\n\t\t\t// Positioning\n\t\t\txPadding: tooltipOpts.xPadding,\n\t\t\tyPadding: tooltipOpts.yPadding,\n\t\t\txAlign: tooltipOpts.xAlign,\n\t\t\tyAlign: tooltipOpts.yAlign,\n\n\t\t\t// Body\n\t\t\tbodyFontColor: tooltipOpts.bodyFontColor,\n\t\t\t_bodyFontFamily: getValueOrDefault(tooltipOpts.bodyFontFamily, globalDefaults.defaultFontFamily),\n\t\t\t_bodyFontStyle: getValueOrDefault(tooltipOpts.bodyFontStyle, globalDefaults.defaultFontStyle),\n\t\t\t_bodyAlign: tooltipOpts.bodyAlign,\n\t\t\tbodyFontSize: getValueOrDefault(tooltipOpts.bodyFontSize, globalDefaults.defaultFontSize),\n\t\t\tbodySpacing: tooltipOpts.bodySpacing,\n\n\t\t\t// Title\n\t\t\ttitleFontColor: tooltipOpts.titleFontColor,\n\t\t\t_titleFontFamily: getValueOrDefault(tooltipOpts.titleFontFamily, globalDefaults.defaultFontFamily),\n\t\t\t_titleFontStyle: getValueOrDefault(tooltipOpts.titleFontStyle, globalDefaults.defaultFontStyle),\n\t\t\ttitleFontSize: getValueOrDefault(tooltipOpts.titleFontSize, globalDefaults.defaultFontSize),\n\t\t\t_titleAlign: tooltipOpts.titleAlign,\n\t\t\ttitleSpacing: tooltipOpts.titleSpacing,\n\t\t\ttitleMarginBottom: tooltipOpts.titleMarginBottom,\n\n\t\t\t// Footer\n\t\t\tfooterFontColor: tooltipOpts.footerFontColor,\n\t\t\t_footerFontFamily: getValueOrDefault(tooltipOpts.footerFontFamily, globalDefaults.defaultFontFamily),\n\t\t\t_footerFontStyle: getValueOrDefault(tooltipOpts.footerFontStyle, globalDefaults.defaultFontStyle),\n\t\t\tfooterFontSize: getValueOrDefault(tooltipOpts.footerFontSize, globalDefaults.defaultFontSize),\n\t\t\t_footerAlign: tooltipOpts.footerAlign,\n\t\t\tfooterSpacing: tooltipOpts.footerSpacing,\n\t\t\tfooterMarginTop: tooltipOpts.footerMarginTop,\n\n\t\t\t// Appearance\n\t\t\tcaretSize: tooltipOpts.caretSize,\n\t\t\tcornerRadius: tooltipOpts.cornerRadius,\n\t\t\tbackgroundColor: tooltipOpts.backgroundColor,\n\t\t\topacity: 0,\n\t\t\tlegendColorBackground: tooltipOpts.multiKeyBackground,\n\t\t\tdisplayColors: tooltipOpts.displayColors\n\t\t};\n\t}\n\n\t/**\n\t * Get the size of the tooltip\n\t */\n\tfunction getTooltipSize(tooltip, model) {\n\t\tvar ctx = tooltip._chart.ctx;\n\n\t\tvar height = model.yPadding * 2; // Tooltip Padding\n\t\tvar width = 0;\n\n\t\t// Count of all lines in the body\n\t\tvar body = model.body;\n\t\tvar combinedBodyLength = body.reduce(function(count, bodyItem) {\n\t\t\treturn count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length;\n\t\t}, 0);\n\t\tcombinedBodyLength += model.beforeBody.length + model.afterBody.length;\n\n\t\tvar titleLineCount = model.title.length;\n\t\tvar footerLineCount = model.footer.length;\n\t\tvar titleFontSize = model.titleFontSize,\n\t\t\tbodyFontSize = model.bodyFontSize,\n\t\t\tfooterFontSize = model.footerFontSize;\n\n\t\theight += titleLineCount * titleFontSize; // Title Lines\n\t\theight += titleLineCount ? (titleLineCount - 1) * model.titleSpacing : 0; // Title Line Spacing\n\t\theight += titleLineCount ? model.titleMarginBottom : 0; // Title's bottom Margin\n\t\theight += combinedBodyLength * bodyFontSize; // Body Lines\n\t\theight += combinedBodyLength ? (combinedBodyLength - 1) * model.bodySpacing : 0; // Body Line Spacing\n\t\theight += footerLineCount ? model.footerMarginTop : 0; // Footer Margin\n\t\theight += footerLineCount * (footerFontSize); // Footer Lines\n\t\theight += footerLineCount ? (footerLineCount - 1) * model.footerSpacing : 0; // Footer Line Spacing\n\n\t\t// Title width\n\t\tvar widthPadding = 0;\n\t\tvar maxLineWidth = function(line) {\n\t\t\twidth = Math.max(width, ctx.measureText(line).width + widthPadding);\n\t\t};\n\n\t\tctx.font = helpers.fontString(titleFontSize, model._titleFontStyle, model._titleFontFamily);\n\t\thelpers.each(model.title, maxLineWidth);\n\n\t\t// Body width\n\t\tctx.font = helpers.fontString(bodyFontSize, model._bodyFontStyle, model._bodyFontFamily);\n\t\thelpers.each(model.beforeBody.concat(model.afterBody), maxLineWidth);\n\n\t\t// Body lines may include some extra width due to the color box\n\t\twidthPadding = model.displayColors ? (bodyFontSize + 2) : 0;\n\t\thelpers.each(body, function(bodyItem) {\n\t\t\thelpers.each(bodyItem.before, maxLineWidth);\n\t\t\thelpers.each(bodyItem.lines, maxLineWidth);\n\t\t\thelpers.each(bodyItem.after, maxLineWidth);\n\t\t});\n\n\t\t// Reset back to 0\n\t\twidthPadding = 0;\n\n\t\t// Footer width\n\t\tctx.font = helpers.fontString(footerFontSize, model._footerFontStyle, model._footerFontFamily);\n\t\thelpers.each(model.footer, maxLineWidth);\n\n\t\t// Add padding\n\t\twidth += 2 * model.xPadding;\n\n\t\treturn {\n\t\t\twidth: width,\n\t\t\theight: height\n\t\t};\n\t}\n\n\t/**\n\t * Helper to get the alignment of a tooltip given the size\n\t */\n\tfunction determineAlignment(tooltip, size) {\n\t\tvar model = tooltip._model;\n\t\tvar chart = tooltip._chart;\n\t\tvar chartArea = tooltip._chartInstance.chartArea;\n\t\tvar xAlign = 'center';\n\t\tvar yAlign = 'center';\n\n\t\tif (model.y < size.height) {\n\t\t\tyAlign = 'top';\n\t\t} else if (model.y > (chart.height - size.height)) {\n\t\t\tyAlign = 'bottom';\n\t\t}\n\n\t\tvar lf, rf; // functions to determine left, right alignment\n\t\tvar olf, orf; // functions to determine if left/right alignment causes tooltip to go outside chart\n\t\tvar yf; // function to get the y alignment if the tooltip goes outside of the left or right edges\n\t\tvar midX = (chartArea.left + chartArea.right) / 2;\n\t\tvar midY = (chartArea.top + chartArea.bottom) / 2;\n\n\t\tif (yAlign === 'center') {\n\t\t\tlf = function(x) {\n\t\t\t\treturn x <= midX;\n\t\t\t};\n\t\t\trf = function(x) {\n\t\t\t\treturn x > midX;\n\t\t\t};\n\t\t} else {\n\t\t\tlf = function(x) {\n\t\t\t\treturn x <= (size.width / 2);\n\t\t\t};\n\t\t\trf = function(x) {\n\t\t\t\treturn x >= (chart.width - (size.width / 2));\n\t\t\t};\n\t\t}\n\n\t\tolf = function(x) {\n\t\t\treturn x + size.width > chart.width;\n\t\t};\n\t\torf = function(x) {\n\t\t\treturn x - size.width < 0;\n\t\t};\n\t\tyf = function(y) {\n\t\t\treturn y <= midY ? 'top' : 'bottom';\n\t\t};\n\n\t\tif (lf(model.x)) {\n\t\t\txAlign = 'left';\n\n\t\t\t// Is tooltip too wide and goes over the right side of the chart.?\n\t\t\tif (olf(model.x)) {\n\t\t\t\txAlign = 'center';\n\t\t\t\tyAlign = yf(model.y);\n\t\t\t}\n\t\t} else if (rf(model.x)) {\n\t\t\txAlign = 'right';\n\n\t\t\t// Is tooltip too wide and goes outside left edge of canvas?\n\t\t\tif (orf(model.x)) {\n\t\t\t\txAlign = 'center';\n\t\t\t\tyAlign = yf(model.y);\n\t\t\t}\n\t\t}\n\n\t\tvar opts = tooltip._options;\n\t\treturn {\n\t\t\txAlign: opts.xAlign ? opts.xAlign : xAlign,\n\t\t\tyAlign: opts.yAlign ? opts.yAlign : yAlign\n\t\t};\n\t}\n\n\t/**\n\t * @Helper to get the location a tooltip needs to be placed at given the initial position (via the vm) and the size and alignment\n\t */\n\tfunction getBackgroundPoint(vm, size, alignment) {\n\t\t// Background Position\n\t\tvar x = vm.x;\n\t\tvar y = vm.y;\n\n\t\tvar caretSize = vm.caretSize,\n\t\t\tcaretPadding = vm.caretPadding,\n\t\t\tcornerRadius = vm.cornerRadius,\n\t\t\txAlign = alignment.xAlign,\n\t\t\tyAlign = alignment.yAlign,\n\t\t\tpaddingAndSize = caretSize + caretPadding,\n\t\t\tradiusAndPadding = cornerRadius + caretPadding;\n\n\t\tif (xAlign === 'right') {\n\t\t\tx -= size.width;\n\t\t} else if (xAlign === 'center') {\n\t\t\tx -= (size.width / 2);\n\t\t}\n\n\t\tif (yAlign === 'top') {\n\t\t\ty += paddingAndSize;\n\t\t} else if (yAlign === 'bottom') {\n\t\t\ty -= size.height + paddingAndSize;\n\t\t} else {\n\t\t\ty -= (size.height / 2);\n\t\t}\n\n\t\tif (yAlign === 'center') {\n\t\t\tif (xAlign === 'left') {\n\t\t\t\tx += paddingAndSize;\n\t\t\t} else if (xAlign === 'right') {\n\t\t\t\tx -= paddingAndSize;\n\t\t\t}\n\t\t} else if (xAlign === 'left') {\n\t\t\tx -= radiusAndPadding;\n\t\t} else if (xAlign === 'right') {\n\t\t\tx += radiusAndPadding;\n\t\t}\n\n\t\treturn {\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\t}\n\n\tChart.Tooltip = Chart.Element.extend({\n\t\tinitialize: function() {\n\t\t\tthis._model = getBaseModel(this._options);\n\t\t},\n\n\t\t// Get the title\n\t\t// Args are: (tooltipItem, data)\n\t\tgetTitle: function() {\n\t\t\tvar me = this;\n\t\t\tvar opts = me._options;\n\t\t\tvar callbacks = opts.callbacks;\n\n\t\t\tvar beforeTitle = callbacks.beforeTitle.apply(me, arguments),\n\t\t\t\ttitle = callbacks.title.apply(me, arguments),\n\t\t\t\tafterTitle = callbacks.afterTitle.apply(me, arguments);\n\n\t\t\tvar lines = [];\n\t\t\tlines = pushOrConcat(lines, beforeTitle);\n\t\t\tlines = pushOrConcat(lines, title);\n\t\t\tlines = pushOrConcat(lines, afterTitle);\n\n\t\t\treturn lines;\n\t\t},\n\n\t\t// Args are: (tooltipItem, data)\n\t\tgetBeforeBody: function() {\n\t\t\tvar lines = this._options.callbacks.beforeBody.apply(this, arguments);\n\t\t\treturn helpers.isArray(lines) ? lines : lines !== undefined ? [lines] : [];\n\t\t},\n\n\t\t// Args are: (tooltipItem, data)\n\t\tgetBody: function(tooltipItems, data) {\n\t\t\tvar me = this;\n\t\t\tvar callbacks = me._options.callbacks;\n\t\t\tvar bodyItems = [];\n\n\t\t\thelpers.each(tooltipItems, function(tooltipItem) {\n\t\t\t\tvar bodyItem = {\n\t\t\t\t\tbefore: [],\n\t\t\t\t\tlines: [],\n\t\t\t\t\tafter: []\n\t\t\t\t};\n\t\t\t\tpushOrConcat(bodyItem.before, callbacks.beforeLabel.call(me, tooltipItem, data));\n\t\t\t\tpushOrConcat(bodyItem.lines, callbacks.label.call(me, tooltipItem, data));\n\t\t\t\tpushOrConcat(bodyItem.after, callbacks.afterLabel.call(me, tooltipItem, data));\n\n\t\t\t\tbodyItems.push(bodyItem);\n\t\t\t});\n\n\t\t\treturn bodyItems;\n\t\t},\n\n\t\t// Args are: (tooltipItem, data)\n\t\tgetAfterBody: function() {\n\t\t\tvar lines = this._options.callbacks.afterBody.apply(this, arguments);\n\t\t\treturn helpers.isArray(lines) ? lines : lines !== undefined ? [lines] : [];\n\t\t},\n\n\t\t// Get the footer and beforeFooter and afterFooter lines\n\t\t// Args are: (tooltipItem, data)\n\t\tgetFooter: function() {\n\t\t\tvar me = this;\n\t\t\tvar callbacks = me._options.callbacks;\n\n\t\t\tvar beforeFooter = callbacks.beforeFooter.apply(me, arguments);\n\t\t\tvar footer = callbacks.footer.apply(me, arguments);\n\t\t\tvar afterFooter = callbacks.afterFooter.apply(me, arguments);\n\n\t\t\tvar lines = [];\n\t\t\tlines = pushOrConcat(lines, beforeFooter);\n\t\t\tlines = pushOrConcat(lines, footer);\n\t\t\tlines = pushOrConcat(lines, afterFooter);\n\n\t\t\treturn lines;\n\t\t},\n\n\t\tupdate: function(changed) {\n\t\t\tvar me = this;\n\t\t\tvar opts = me._options;\n\n\t\t\t// Need to regenerate the model because its faster than using extend and it is necessary due to the optimization in Chart.Element.transition\n\t\t\t// that does _view = _model if ease === 1. This causes the 2nd tooltip update to set properties in both the view and model at the same time\n\t\t\t// which breaks any animations.\n\t\t\tvar existingModel = me._model;\n\t\t\tvar model = me._model = getBaseModel(opts);\n\t\t\tvar active = me._active;\n\n\t\t\tvar data = me._data;\n\t\t\tvar chartInstance = me._chartInstance;\n\n\t\t\t// In the case where active.length === 0 we need to keep these at existing values for good animations\n\t\t\tvar alignment = {\n\t\t\t\txAlign: existingModel.xAlign,\n\t\t\t\tyAlign: existingModel.yAlign\n\t\t\t};\n\t\t\tvar backgroundPoint = {\n\t\t\t\tx: existingModel.x,\n\t\t\t\ty: existingModel.y\n\t\t\t};\n\t\t\tvar tooltipSize = {\n\t\t\t\twidth: existingModel.width,\n\t\t\t\theight: existingModel.height\n\t\t\t};\n\t\t\tvar tooltipPosition = {\n\t\t\t\tx: existingModel.caretX,\n\t\t\t\ty: existingModel.caretY\n\t\t\t};\n\n\t\t\tvar i, len;\n\n\t\t\tif (active.length) {\n\t\t\t\tmodel.opacity = 1;\n\n\t\t\t\tvar labelColors = [];\n\t\t\t\ttooltipPosition = Chart.Tooltip.positioners[opts.position](active, me._eventPosition);\n\n\t\t\t\tvar tooltipItems = [];\n\t\t\t\tfor (i = 0, len = active.length; i < len; ++i) {\n\t\t\t\t\ttooltipItems.push(createTooltipItem(active[i]));\n\t\t\t\t}\n\n\t\t\t\t// If the user provided a filter function, use it to modify the tooltip items\n\t\t\t\tif (opts.filter) {\n\t\t\t\t\ttooltipItems = tooltipItems.filter(function(a) {\n\t\t\t\t\t\treturn opts.filter(a, data);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// If the user provided a sorting function, use it to modify the tooltip items\n\t\t\t\tif (opts.itemSort) {\n\t\t\t\t\ttooltipItems = tooltipItems.sort(function(a, b) {\n\t\t\t\t\t\treturn opts.itemSort(a, b, data);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Determine colors for boxes\n\t\t\t\thelpers.each(tooltipItems, function(tooltipItem) {\n\t\t\t\t\tlabelColors.push(opts.callbacks.labelColor.call(me, tooltipItem, chartInstance));\n\t\t\t\t});\n\n\t\t\t\t// Build the Text Lines\n\t\t\t\tmodel.title = me.getTitle(tooltipItems, data);\n\t\t\t\tmodel.beforeBody = me.getBeforeBody(tooltipItems, data);\n\t\t\t\tmodel.body = me.getBody(tooltipItems, data);\n\t\t\t\tmodel.afterBody = me.getAfterBody(tooltipItems, data);\n\t\t\t\tmodel.footer = me.getFooter(tooltipItems, data);\n\n\t\t\t\t// Initial positioning and colors\n\t\t\t\tmodel.x = Math.round(tooltipPosition.x);\n\t\t\t\tmodel.y = Math.round(tooltipPosition.y);\n\t\t\t\tmodel.caretPadding = helpers.getValueOrDefault(tooltipPosition.padding, 2);\n\t\t\t\tmodel.labelColors = labelColors;\n\n\t\t\t\t// data points\n\t\t\t\tmodel.dataPoints = tooltipItems;\n\n\t\t\t\t// We need to determine alignment of the tooltip\n\t\t\t\ttooltipSize = getTooltipSize(this, model);\n\t\t\t\talignment = determineAlignment(this, tooltipSize);\n\t\t\t\t// Final Size and Position\n\t\t\t\tbackgroundPoint = getBackgroundPoint(model, tooltipSize, alignment);\n\t\t\t} else {\n\t\t\t\tmodel.opacity = 0;\n\t\t\t}\n\n\t\t\tmodel.xAlign = alignment.xAlign;\n\t\t\tmodel.yAlign = alignment.yAlign;\n\t\t\tmodel.x = backgroundPoint.x;\n\t\t\tmodel.y = backgroundPoint.y;\n\t\t\tmodel.width = tooltipSize.width;\n\t\t\tmodel.height = tooltipSize.height;\n\n\t\t\t// Point where the caret on the tooltip points to\n\t\t\tmodel.caretX = tooltipPosition.x;\n\t\t\tmodel.caretY = tooltipPosition.y;\n\n\t\t\tme._model = model;\n\n\t\t\tif (changed && opts.custom) {\n\t\t\t\topts.custom.call(me, model);\n\t\t\t}\n\n\t\t\treturn me;\n\t\t},\n\t\tdrawCaret: function(tooltipPoint, size, opacity) {\n\t\t\tvar vm = this._view;\n\t\t\tvar ctx = this._chart.ctx;\n\t\t\tvar x1, x2, x3;\n\t\t\tvar y1, y2, y3;\n\t\t\tvar caretSize = vm.caretSize;\n\t\t\tvar cornerRadius = vm.cornerRadius;\n\t\t\tvar xAlign = vm.xAlign,\n\t\t\t\tyAlign = vm.yAlign;\n\t\t\tvar ptX = tooltipPoint.x,\n\t\t\t\tptY = tooltipPoint.y;\n\t\t\tvar width = size.width,\n\t\t\t\theight = size.height;\n\n\t\t\tif (yAlign === 'center') {\n\t\t\t\t// Left or right side\n\t\t\t\tif (xAlign === 'left') {\n\t\t\t\t\tx1 = ptX;\n\t\t\t\t\tx2 = x1 - caretSize;\n\t\t\t\t\tx3 = x1;\n\t\t\t\t} else {\n\t\t\t\t\tx1 = ptX + width;\n\t\t\t\t\tx2 = x1 + caretSize;\n\t\t\t\t\tx3 = x1;\n\t\t\t\t}\n\n\t\t\t\ty2 = ptY + (height / 2);\n\t\t\t\ty1 = y2 - caretSize;\n\t\t\t\ty3 = y2 + caretSize;\n\t\t\t} else {\n\t\t\t\tif (xAlign === 'left') {\n\t\t\t\t\tx1 = ptX + cornerRadius;\n\t\t\t\t\tx2 = x1 + caretSize;\n\t\t\t\t\tx3 = x2 + caretSize;\n\t\t\t\t} else if (xAlign === 'right') {\n\t\t\t\t\tx1 = ptX + width - cornerRadius;\n\t\t\t\t\tx2 = x1 - caretSize;\n\t\t\t\t\tx3 = x2 - caretSize;\n\t\t\t\t} else {\n\t\t\t\t\tx2 = ptX + (width / 2);\n\t\t\t\t\tx1 = x2 - caretSize;\n\t\t\t\t\tx3 = x2 + caretSize;\n\t\t\t\t}\n\n\t\t\t\tif (yAlign === 'top') {\n\t\t\t\t\ty1 = ptY;\n\t\t\t\t\ty2 = y1 - caretSize;\n\t\t\t\t\ty3 = y1;\n\t\t\t\t} else {\n\t\t\t\t\ty1 = ptY + height;\n\t\t\t\t\ty2 = y1 + caretSize;\n\t\t\t\t\ty3 = y1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tctx.fillStyle = mergeOpacity(vm.backgroundColor, opacity);\n\t\t\tctx.beginPath();\n\t\t\tctx.moveTo(x1, y1);\n\t\t\tctx.lineTo(x2, y2);\n\t\t\tctx.lineTo(x3, y3);\n\t\t\tctx.closePath();\n\t\t\tctx.fill();\n\t\t},\n\t\tdrawTitle: function(pt, vm, ctx, opacity) {\n\t\t\tvar title = vm.title;\n\n\t\t\tif (title.length) {\n\t\t\t\tctx.textAlign = vm._titleAlign;\n\t\t\t\tctx.textBaseline = 'top';\n\n\t\t\t\tvar titleFontSize = vm.titleFontSize,\n\t\t\t\t\ttitleSpacing = vm.titleSpacing;\n\n\t\t\t\tctx.fillStyle = mergeOpacity(vm.titleFontColor, opacity);\n\t\t\t\tctx.font = helpers.fontString(titleFontSize, vm._titleFontStyle, vm._titleFontFamily);\n\n\t\t\t\tvar i, len;\n\t\t\t\tfor (i = 0, len = title.length; i < len; ++i) {\n\t\t\t\t\tctx.fillText(title[i], pt.x, pt.y);\n\t\t\t\t\tpt.y += titleFontSize + titleSpacing; // Line Height and spacing\n\n\t\t\t\t\tif (i + 1 === title.length) {\n\t\t\t\t\t\tpt.y += vm.titleMarginBottom - titleSpacing; // If Last, add margin, remove spacing\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdrawBody: function(pt, vm, ctx, opacity) {\n\t\t\tvar bodyFontSize = vm.bodyFontSize;\n\t\t\tvar bodySpacing = vm.bodySpacing;\n\t\t\tvar body = vm.body;\n\n\t\t\tctx.textAlign = vm._bodyAlign;\n\t\t\tctx.textBaseline = 'top';\n\n\t\t\tvar textColor = mergeOpacity(vm.bodyFontColor, opacity);\n\t\t\tctx.fillStyle = textColor;\n\t\t\tctx.font = helpers.fontString(bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);\n\n\t\t\t// Before Body\n\t\t\tvar xLinePadding = 0;\n\t\t\tvar fillLineOfText = function(line) {\n\t\t\t\tctx.fillText(line, pt.x + xLinePadding, pt.y);\n\t\t\t\tpt.y += bodyFontSize + bodySpacing;\n\t\t\t};\n\n\t\t\t// Before body lines\n\t\t\thelpers.each(vm.beforeBody, fillLineOfText);\n\n\t\t\tvar drawColorBoxes = vm.displayColors;\n\t\t\txLinePadding = drawColorBoxes ? (bodyFontSize + 2) : 0;\n\n\t\t\t// Draw body lines now\n\t\t\thelpers.each(body, function(bodyItem, i) {\n\t\t\t\thelpers.each(bodyItem.before, fillLineOfText);\n\n\t\t\t\thelpers.each(bodyItem.lines, function(line) {\n\t\t\t\t\t// Draw Legend-like boxes if needed\n\t\t\t\t\tif (drawColorBoxes) {\n\t\t\t\t\t\t// Fill a white rect so that colours merge nicely if the opacity is < 1\n\t\t\t\t\t\tctx.fillStyle = mergeOpacity(vm.legendColorBackground, opacity);\n\t\t\t\t\t\tctx.fillRect(pt.x, pt.y, bodyFontSize, bodyFontSize);\n\n\t\t\t\t\t\t// Border\n\t\t\t\t\t\tctx.strokeStyle = mergeOpacity(vm.labelColors[i].borderColor, opacity);\n\t\t\t\t\t\tctx.strokeRect(pt.x, pt.y, bodyFontSize, bodyFontSize);\n\n\t\t\t\t\t\t// Inner square\n\t\t\t\t\t\tctx.fillStyle = mergeOpacity(vm.labelColors[i].backgroundColor, opacity);\n\t\t\t\t\t\tctx.fillRect(pt.x + 1, pt.y + 1, bodyFontSize - 2, bodyFontSize - 2);\n\n\t\t\t\t\t\tctx.fillStyle = textColor;\n\t\t\t\t\t}\n\n\t\t\t\t\tfillLineOfText(line);\n\t\t\t\t});\n\n\t\t\t\thelpers.each(bodyItem.after, fillLineOfText);\n\t\t\t});\n\n\t\t\t// Reset back to 0 for after body\n\t\t\txLinePadding = 0;\n\n\t\t\t// After body lines\n\t\t\thelpers.each(vm.afterBody, fillLineOfText);\n\t\t\tpt.y -= bodySpacing; // Remove last body spacing\n\t\t},\n\t\tdrawFooter: function(pt, vm, ctx, opacity) {\n\t\t\tvar footer = vm.footer;\n\n\t\t\tif (footer.length) {\n\t\t\t\tpt.y += vm.footerMarginTop;\n\n\t\t\t\tctx.textAlign = vm._footerAlign;\n\t\t\t\tctx.textBaseline = 'top';\n\n\t\t\t\tctx.fillStyle = mergeOpacity(vm.footerFontColor, opacity);\n\t\t\t\tctx.font = helpers.fontString(vm.footerFontSize, vm._footerFontStyle, vm._footerFontFamily);\n\n\t\t\t\thelpers.each(footer, function(line) {\n\t\t\t\t\tctx.fillText(line, pt.x, pt.y);\n\t\t\t\t\tpt.y += vm.footerFontSize + vm.footerSpacing;\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdrawBackground: function(pt, vm, ctx, tooltipSize, opacity) {\n\t\t\tctx.fillStyle = mergeOpacity(vm.backgroundColor, opacity);\n\t\t\thelpers.drawRoundedRectangle(ctx, pt.x, pt.y, tooltipSize.width, tooltipSize.height, vm.cornerRadius);\n\t\t\tctx.fill();\n\t\t},\n\t\tdraw: function() {\n\t\t\tvar ctx = this._chart.ctx;\n\t\t\tvar vm = this._view;\n\n\t\t\tif (vm.opacity === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar tooltipSize = {\n\t\t\t\twidth: vm.width,\n\t\t\t\theight: vm.height\n\t\t\t};\n\t\t\tvar pt = {\n\t\t\t\tx: vm.x,\n\t\t\t\ty: vm.y\n\t\t\t};\n\n\t\t\t// IE11/Edge does not like very small opacities, so snap to 0\n\t\t\tvar opacity = Math.abs(vm.opacity < 1e-3) ? 0 : vm.opacity;\n\n\t\t\tif (this._options.enabled) {\n\t\t\t\t// Draw Background\n\t\t\t\tthis.drawBackground(pt, vm, ctx, tooltipSize, opacity);\n\n\t\t\t\t// Draw Caret\n\t\t\t\tthis.drawCaret(pt, tooltipSize, opacity);\n\n\t\t\t\t// Draw Title, Body, and Footer\n\t\t\t\tpt.x += vm.xPadding;\n\t\t\t\tpt.y += vm.yPadding;\n\n\t\t\t\t// Titles\n\t\t\t\tthis.drawTitle(pt, vm, ctx, opacity);\n\n\t\t\t\t// Body\n\t\t\t\tthis.drawBody(pt, vm, ctx, opacity);\n\n\t\t\t\t// Footer\n\t\t\t\tthis.drawFooter(pt, vm, ctx, opacity);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle an event\n\t\t * @private\n\t\t * @param {IEvent} event - The event to handle\n\t\t * @returns {Boolean} true if the tooltip changed\n\t\t */\n\t\thandleEvent: function(e) {\n\t\t\tvar me = this;\n\t\t\tvar options = me._options;\n\t\t\tvar changed = false;\n\n\t\t\tme._lastActive = me._lastActive || [];\n\n\t\t\t// Find Active Elements for tooltips\n\t\t\tif (e.type === 'mouseout') {\n\t\t\t\tme._active = [];\n\t\t\t} else {\n\t\t\t\tme._active = me._chartInstance.getElementsAtEventForMode(e, options.mode, options);\n\t\t\t}\n\n\t\t\t// Remember Last Actives\n\t\t\tchanged = !helpers.arrayEquals(me._active, me._lastActive);\n\t\t\tme._lastActive = me._active;\n\n\t\t\tif (options.enabled || options.custom) {\n\t\t\t\tme._eventPosition = {\n\t\t\t\t\tx: e.x,\n\t\t\t\t\ty: e.y\n\t\t\t\t};\n\n\t\t\t\tvar model = me._model;\n\t\t\t\tme.update(true);\n\t\t\t\tme.pivot();\n\n\t\t\t\t// See if our tooltip position changed\n\t\t\t\tchanged |= (model.x !== me._model.x) || (model.y !== me._model.y);\n\t\t\t}\n\n\t\t\treturn changed;\n\t\t}\n\t});\n\n\t/**\n\t * @namespace Chart.Tooltip.positioners\n\t */\n\tChart.Tooltip.positioners = {\n\t\t/**\n\t\t * Average mode places the tooltip at the average position of the elements shown\n\t\t * @function Chart.Tooltip.positioners.average\n\t\t * @param elements {ChartElement[]} the elements being displayed in the tooltip\n\t\t * @returns {Point} tooltip position\n\t\t */\n\t\taverage: function(elements) {\n\t\t\tif (!elements.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar i, len;\n\t\t\tvar x = 0;\n\t\t\tvar y = 0;\n\t\t\tvar count = 0;\n\n\t\t\tfor (i = 0, len = elements.length; i < len; ++i) {\n\t\t\t\tvar el = elements[i];\n\t\t\t\tif (el && el.hasValue()) {\n\t\t\t\t\tvar pos = el.tooltipPosition();\n\t\t\t\t\tx += pos.x;\n\t\t\t\t\ty += pos.y;\n\t\t\t\t\t++count;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tx: Math.round(x / count),\n\t\t\t\ty: Math.round(y / count)\n\t\t\t};\n\t\t},\n\n\t\t/**\n\t\t * Gets the tooltip position nearest of the item nearest to the event position\n\t\t * @function Chart.Tooltip.positioners.nearest\n\t\t * @param elements {Chart.Element[]} the tooltip elements\n\t\t * @param eventPosition {Point} the position of the event in canvas coordinates\n\t\t * @returns {Point} the tooltip position\n\t\t */\n\t\tnearest: function(elements, eventPosition) {\n\t\t\tvar x = eventPosition.x;\n\t\t\tvar y = eventPosition.y;\n\n\t\t\tvar nearestElement;\n\t\t\tvar minDistance = Number.POSITIVE_INFINITY;\n\t\t\tvar i, len;\n\t\t\tfor (i = 0, len = elements.length; i < len; ++i) {\n\t\t\t\tvar el = elements[i];\n\t\t\t\tif (el && el.hasValue()) {\n\t\t\t\t\tvar center = el.getCenterPoint();\n\t\t\t\t\tvar d = helpers.distanceBetweenPoints(eventPosition, center);\n\n\t\t\t\t\tif (d < minDistance) {\n\t\t\t\t\t\tminDistance = d;\n\t\t\t\t\t\tnearestElement = el;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (nearestElement) {\n\t\t\t\tvar tp = nearestElement.tooltipPosition();\n\t\t\t\tx = tp.x;\n\t\t\t\ty = tp.y;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tx: x,\n\t\t\t\ty: y\n\t\t\t};\n\t\t}\n\t};\n};\n\n},{}],37:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers,\n\t\tglobalOpts = Chart.defaults.global;\n\n\tglobalOpts.elements.arc = {\n\t\tbackgroundColor: globalOpts.defaultColor,\n\t\tborderColor: '#fff',\n\t\tborderWidth: 2\n\t};\n\n\tChart.elements.Arc = Chart.Element.extend({\n\t\tinLabelRange: function(mouseX) {\n\t\t\tvar vm = this._view;\n\n\t\t\tif (vm) {\n\t\t\t\treturn (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2));\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tinRange: function(chartX, chartY) {\n\t\t\tvar vm = this._view;\n\n\t\t\tif (vm) {\n\t\t\t\tvar pointRelativePosition = helpers.getAngleFromPoint(vm, {\n\t\t\t\t\t\tx: chartX,\n\t\t\t\t\t\ty: chartY\n\t\t\t\t\t}),\n\t\t\t\t\tangle = pointRelativePosition.angle,\n\t\t\t\t\tdistance = pointRelativePosition.distance;\n\n\t\t\t\t// Sanitise angle range\n\t\t\t\tvar startAngle = vm.startAngle;\n\t\t\t\tvar endAngle = vm.endAngle;\n\t\t\t\twhile (endAngle < startAngle) {\n\t\t\t\t\tendAngle += 2.0 * Math.PI;\n\t\t\t\t}\n\t\t\t\twhile (angle > endAngle) {\n\t\t\t\t\tangle -= 2.0 * Math.PI;\n\t\t\t\t}\n\t\t\t\twhile (angle < startAngle) {\n\t\t\t\t\tangle += 2.0 * Math.PI;\n\t\t\t\t}\n\n\t\t\t\t// Check if within the range of the open/close angle\n\t\t\t\tvar betweenAngles = (angle >= startAngle && angle <= endAngle),\n\t\t\t\t\twithinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius);\n\n\t\t\t\treturn (betweenAngles && withinRadius);\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tgetCenterPoint: function() {\n\t\t\tvar vm = this._view;\n\t\t\tvar halfAngle = (vm.startAngle + vm.endAngle) / 2;\n\t\t\tvar halfRadius = (vm.innerRadius + vm.outerRadius) / 2;\n\t\t\treturn {\n\t\t\t\tx: vm.x + Math.cos(halfAngle) * halfRadius,\n\t\t\t\ty: vm.y + Math.sin(halfAngle) * halfRadius\n\t\t\t};\n\t\t},\n\t\tgetArea: function() {\n\t\t\tvar vm = this._view;\n\t\t\treturn Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2));\n\t\t},\n\t\ttooltipPosition: function() {\n\t\t\tvar vm = this._view;\n\n\t\t\tvar centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2),\n\t\t\t\trangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius;\n\t\t\treturn {\n\t\t\t\tx: vm.x + (Math.cos(centreAngle) * rangeFromCentre),\n\t\t\t\ty: vm.y + (Math.sin(centreAngle) * rangeFromCentre)\n\t\t\t};\n\t\t},\n\t\tdraw: function() {\n\n\t\t\tvar ctx = this._chart.ctx,\n\t\t\t\tvm = this._view,\n\t\t\t\tsA = vm.startAngle,\n\t\t\t\teA = vm.endAngle;\n\n\t\t\tctx.beginPath();\n\n\t\t\tctx.arc(vm.x, vm.y, vm.outerRadius, sA, eA);\n\t\t\tctx.arc(vm.x, vm.y, vm.innerRadius, eA, sA, true);\n\n\t\t\tctx.closePath();\n\t\t\tctx.strokeStyle = vm.borderColor;\n\t\t\tctx.lineWidth = vm.borderWidth;\n\n\t\t\tctx.fillStyle = vm.backgroundColor;\n\n\t\t\tctx.fill();\n\t\t\tctx.lineJoin = 'bevel';\n\n\t\t\tif (vm.borderWidth) {\n\t\t\t\tctx.stroke();\n\t\t\t}\n\t\t}\n\t});\n};\n\n},{}],38:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\tvar globalDefaults = Chart.defaults.global;\n\n\tChart.defaults.global.elements.line = {\n\t\ttension: 0.4,\n\t\tbackgroundColor: globalDefaults.defaultColor,\n\t\tborderWidth: 3,\n\t\tborderColor: globalDefaults.defaultColor,\n\t\tborderCapStyle: 'butt',\n\t\tborderDash: [],\n\t\tborderDashOffset: 0.0,\n\t\tborderJoinStyle: 'miter',\n\t\tcapBezierPoints: true,\n\t\tfill: true, // do we fill in the area between the line and its base axis\n\t};\n\n\tChart.elements.Line = Chart.Element.extend({\n\t\tdraw: function() {\n\t\t\tvar me = this;\n\t\t\tvar vm = me._view;\n\t\t\tvar spanGaps = vm.spanGaps;\n\t\t\tvar fillPoint = vm.scaleZero;\n\t\t\tvar loop = me._loop;\n\n\t\t\t// Handle different fill modes for cartesian lines\n\t\t\tif (!loop) {\n\t\t\t\tif (vm.fill === 'top') {\n\t\t\t\t\tfillPoint = vm.scaleTop;\n\t\t\t\t} else if (vm.fill === 'bottom') {\n\t\t\t\t\tfillPoint = vm.scaleBottom;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar ctx = me._chart.ctx;\n\t\t\tctx.save();\n\n\t\t\t// Helper function to draw a line to a point\n\t\t\tfunction lineToPoint(previousPoint, point) {\n\t\t\t\tvar pointVM = point._view;\n\t\t\t\tif (point._view.steppedLine === true) {\n\t\t\t\t\tctx.lineTo(pointVM.x, previousPoint._view.y);\n\t\t\t\t\tctx.lineTo(pointVM.x, pointVM.y);\n\t\t\t\t} else if (point._view.tension === 0) {\n\t\t\t\t\tctx.lineTo(pointVM.x, pointVM.y);\n\t\t\t\t} else {\n\t\t\t\t\tctx.bezierCurveTo(\n\t\t\t\t\t\tpreviousPoint._view.controlPointNextX,\n\t\t\t\t\t\tpreviousPoint._view.controlPointNextY,\n\t\t\t\t\t\tpointVM.controlPointPreviousX,\n\t\t\t\t\t\tpointVM.controlPointPreviousY,\n\t\t\t\t\t\tpointVM.x,\n\t\t\t\t\t\tpointVM.y\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar points = me._children.slice(); // clone array\n\t\t\tvar lastDrawnIndex = -1;\n\n\t\t\t// If we are looping, adding the first point again\n\t\t\tif (loop && points.length) {\n\t\t\t\tpoints.push(points[0]);\n\t\t\t}\n\n\t\t\tvar index, current, previous, currentVM;\n\n\t\t\t// Fill Line\n\t\t\tif (points.length && vm.fill) {\n\t\t\t\tctx.beginPath();\n\n\t\t\t\tfor (index = 0; index < points.length; ++index) {\n\t\t\t\t\tcurrent = points[index];\n\t\t\t\t\tprevious = helpers.previousItem(points, index);\n\t\t\t\t\tcurrentVM = current._view;\n\n\t\t\t\t\t// First point moves to it's starting position no matter what\n\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\tif (loop) {\n\t\t\t\t\t\t\tctx.moveTo(fillPoint.x, fillPoint.y);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tctx.moveTo(currentVM.x, fillPoint);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!currentVM.skip) {\n\t\t\t\t\t\t\tlastDrawnIndex = index;\n\t\t\t\t\t\t\tctx.lineTo(currentVM.x, currentVM.y);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprevious = lastDrawnIndex === -1 ? previous : points[lastDrawnIndex];\n\n\t\t\t\t\t\tif (currentVM.skip) {\n\t\t\t\t\t\t\t// Only do this if this is the first point that is skipped\n\t\t\t\t\t\t\tif (!spanGaps && lastDrawnIndex === (index - 1)) {\n\t\t\t\t\t\t\t\tif (loop) {\n\t\t\t\t\t\t\t\t\tctx.lineTo(fillPoint.x, fillPoint.y);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tctx.lineTo(previous._view.x, fillPoint);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (lastDrawnIndex !== (index - 1)) {\n\t\t\t\t\t\t\t\t// There was a gap and this is the first point after the gap. If we've never drawn a point, this is a special case.\n\t\t\t\t\t\t\t\t// If the first data point is NaN, then there is no real gap to skip\n\t\t\t\t\t\t\t\tif (spanGaps && lastDrawnIndex !== -1) {\n\t\t\t\t\t\t\t\t\t// We are spanning the gap, so simple draw a line to this point\n\t\t\t\t\t\t\t\t\tlineToPoint(previous, current);\n\t\t\t\t\t\t\t\t} else if (loop) {\n\t\t\t\t\t\t\t\t\tctx.lineTo(currentVM.x, currentVM.y);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tctx.lineTo(currentVM.x, fillPoint);\n\t\t\t\t\t\t\t\t\tctx.lineTo(currentVM.x, currentVM.y);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// Line to next point\n\t\t\t\t\t\t\t\tlineToPoint(previous, current);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlastDrawnIndex = index;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!loop && lastDrawnIndex !== -1) {\n\t\t\t\t\tctx.lineTo(points[lastDrawnIndex]._view.x, fillPoint);\n\t\t\t\t}\n\n\t\t\t\tctx.fillStyle = vm.backgroundColor || globalDefaults.defaultColor;\n\t\t\t\tctx.closePath();\n\t\t\t\tctx.fill();\n\t\t\t}\n\n\t\t\t// Stroke Line Options\n\t\t\tvar globalOptionLineElements = globalDefaults.elements.line;\n\t\t\tctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle;\n\n\t\t\t// IE 9 and 10 do not support line dash\n\t\t\tif (ctx.setLineDash) {\n\t\t\t\tctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash);\n\t\t\t}\n\n\t\t\tctx.lineDashOffset = vm.borderDashOffset || globalOptionLineElements.borderDashOffset;\n\t\t\tctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle;\n\t\t\tctx.lineWidth = vm.borderWidth || globalOptionLineElements.borderWidth;\n\t\t\tctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor;\n\n\t\t\t// Stroke Line\n\t\t\tctx.beginPath();\n\t\t\tlastDrawnIndex = -1;\n\n\t\t\tfor (index = 0; index < points.length; ++index) {\n\t\t\t\tcurrent = points[index];\n\t\t\t\tprevious = helpers.previousItem(points, index);\n\t\t\t\tcurrentVM = current._view;\n\n\t\t\t\t// First point moves to it's starting position no matter what\n\t\t\t\tif (index === 0) {\n\t\t\t\t\tif (!currentVM.skip) {\n\t\t\t\t\t\tctx.moveTo(currentVM.x, currentVM.y);\n\t\t\t\t\t\tlastDrawnIndex = index;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tprevious = lastDrawnIndex === -1 ? previous : points[lastDrawnIndex];\n\n\t\t\t\t\tif (!currentVM.skip) {\n\t\t\t\t\t\tif ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) {\n\t\t\t\t\t\t\t// There was a gap and this is the first point after the gap\n\t\t\t\t\t\t\tctx.moveTo(currentVM.x, currentVM.y);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Line to next point\n\t\t\t\t\t\t\tlineToPoint(previous, current);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastDrawnIndex = index;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tctx.stroke();\n\t\t\tctx.restore();\n\t\t}\n\t});\n};\n\n},{}],39:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers,\n\t\tglobalOpts = Chart.defaults.global,\n\t\tdefaultColor = globalOpts.defaultColor;\n\n\tglobalOpts.elements.point = {\n\t\tradius: 3,\n\t\tpointStyle: 'circle',\n\t\tbackgroundColor: defaultColor,\n\t\tborderWidth: 1,\n\t\tborderColor: defaultColor,\n\t\t// Hover\n\t\thitRadius: 1,\n\t\thoverRadius: 4,\n\t\thoverBorderWidth: 1\n\t};\n\n\tfunction xRange(mouseX) {\n\t\tvar vm = this._view;\n\t\treturn vm ? (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hitRadius, 2)) : false;\n\t}\n\n\tfunction yRange(mouseY) {\n\t\tvar vm = this._view;\n\t\treturn vm ? (Math.pow(mouseY - vm.y, 2) < Math.pow(vm.radius + vm.hitRadius, 2)) : false;\n\t}\n\n\tChart.elements.Point = Chart.Element.extend({\n\t\tinRange: function(mouseX, mouseY) {\n\t\t\tvar vm = this._view;\n\t\t\treturn vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false;\n\t\t},\n\n\t\tinLabelRange: xRange,\n\t\tinXRange: xRange,\n\t\tinYRange: yRange,\n\n\t\tgetCenterPoint: function() {\n\t\t\tvar vm = this._view;\n\t\t\treturn {\n\t\t\t\tx: vm.x,\n\t\t\t\ty: vm.y\n\t\t\t};\n\t\t},\n\t\tgetArea: function() {\n\t\t\treturn Math.PI * Math.pow(this._view.radius, 2);\n\t\t},\n\t\ttooltipPosition: function() {\n\t\t\tvar vm = this._view;\n\t\t\treturn {\n\t\t\t\tx: vm.x,\n\t\t\t\ty: vm.y,\n\t\t\t\tpadding: vm.radius + vm.borderWidth\n\t\t\t};\n\t\t},\n\t\tdraw: function(chartArea) {\n\t\t\tvar vm = this._view;\n\t\t\tvar model = this._model;\n\t\t\tvar ctx = this._chart.ctx;\n\t\t\tvar pointStyle = vm.pointStyle;\n\t\t\tvar radius = vm.radius;\n\t\t\tvar x = vm.x;\n\t\t\tvar y = vm.y;\n\t\t\tvar color = Chart.helpers.color;\n\t\t\tvar errMargin = 1.01; // 1.01 is margin for Accumulated error. (Especially Edge, IE.)\n\t\t\tvar ratio = 0;\n\n\t\t\tif (vm.skip) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tctx.strokeStyle = vm.borderColor || defaultColor;\n\t\t\tctx.lineWidth = helpers.getValueOrDefault(vm.borderWidth, globalOpts.elements.point.borderWidth);\n\t\t\tctx.fillStyle = vm.backgroundColor || defaultColor;\n\n\t\t\t// Cliping for Points.\n\t\t\t// going out from inner charArea?\n\t\t\tif ((chartArea !== undefined) && ((model.x < chartArea.left) || (chartArea.right*errMargin < model.x) || (model.y < chartArea.top) || (chartArea.bottom*errMargin < model.y))) {\n\t\t\t\t// Point fade out\n\t\t\t\tif (model.x < chartArea.left) {\n\t\t\t\t\tratio = (x - model.x) / (chartArea.left - model.x);\n\t\t\t\t} else if (chartArea.right*errMargin < model.x) {\n\t\t\t\t\tratio = (model.x - x) / (model.x - chartArea.right);\n\t\t\t\t} else if (model.y < chartArea.top) {\n\t\t\t\t\tratio = (y - model.y) / (chartArea.top - model.y);\n\t\t\t\t} else if (chartArea.bottom*errMargin < model.y) {\n\t\t\t\t\tratio = (model.y - y) / (model.y - chartArea.bottom);\n\t\t\t\t}\n\t\t\t\tratio = Math.round(ratio*100) / 100;\n\t\t\t\tctx.strokeStyle = color(ctx.strokeStyle).alpha(ratio).rgbString();\n\t\t\t\tctx.fillStyle = color(ctx.fillStyle).alpha(ratio).rgbString();\n\t\t\t}\n\n\t\t\tChart.canvasHelpers.drawPoint(ctx, pointStyle, radius, x, y);\n\t\t}\n\t});\n};\n\n},{}],40:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar globalOpts = Chart.defaults.global;\n\n\tglobalOpts.elements.rectangle = {\n\t\tbackgroundColor: globalOpts.defaultColor,\n\t\tborderWidth: 0,\n\t\tborderColor: globalOpts.defaultColor,\n\t\tborderSkipped: 'bottom'\n\t};\n\n\tfunction isVertical(bar) {\n\t\treturn bar._view.width !== undefined;\n\t}\n\n\t/**\n\t * Helper function to get the bounds of the bar regardless of the orientation\n\t * @private\n\t * @param bar {Chart.Element.Rectangle} the bar\n\t * @return {Bounds} bounds of the bar\n\t */\n\tfunction getBarBounds(bar) {\n\t\tvar vm = bar._view;\n\t\tvar x1, x2, y1, y2;\n\n\t\tif (isVertical(bar)) {\n\t\t\t// vertical\n\t\t\tvar halfWidth = vm.width / 2;\n\t\t\tx1 = vm.x - halfWidth;\n\t\t\tx2 = vm.x + halfWidth;\n\t\t\ty1 = Math.min(vm.y, vm.base);\n\t\t\ty2 = Math.max(vm.y, vm.base);\n\t\t} else {\n\t\t\t// horizontal bar\n\t\t\tvar halfHeight = vm.height / 2;\n\t\t\tx1 = Math.min(vm.x, vm.base);\n\t\t\tx2 = Math.max(vm.x, vm.base);\n\t\t\ty1 = vm.y - halfHeight;\n\t\t\ty2 = vm.y + halfHeight;\n\t\t}\n\n\t\treturn {\n\t\t\tleft: x1,\n\t\t\ttop: y1,\n\t\t\tright: x2,\n\t\t\tbottom: y2\n\t\t};\n\t}\n\n\tChart.elements.Rectangle = Chart.Element.extend({\n\t\tdraw: function() {\n\t\t\tvar ctx = this._chart.ctx;\n\t\t\tvar vm = this._view;\n\t\t\tvar left, right, top, bottom, signX, signY, borderSkipped;\n\t\t\tvar borderWidth = vm.borderWidth;\n\n\t\t\tif (!vm.horizontal) {\n\t\t\t\t// bar\n\t\t\t\tleft = vm.x - vm.width / 2;\n\t\t\t\tright = vm.x + vm.width / 2;\n\t\t\t\ttop = vm.y;\n\t\t\t\tbottom = vm.base;\n\t\t\t\tsignX = 1;\n\t\t\t\tsignY = bottom > top? 1: -1;\n\t\t\t\tborderSkipped = vm.borderSkipped || 'bottom';\n\t\t\t} else {\n\t\t\t\t// horizontal bar\n\t\t\t\tleft = vm.base;\n\t\t\t\tright = vm.x;\n\t\t\t\ttop = vm.y - vm.height / 2;\n\t\t\t\tbottom = vm.y + vm.height / 2;\n\t\t\t\tsignX = right > left? 1: -1;\n\t\t\t\tsignY = 1;\n\t\t\t\tborderSkipped = vm.borderSkipped || 'left';\n\t\t\t}\n\n\t\t\t// Canvas doesn't allow us to stroke inside the width so we can\n\t\t\t// adjust the sizes to fit if we're setting a stroke on the line\n\t\t\tif (borderWidth) {\n\t\t\t\t// borderWidth shold be less than bar width and bar height.\n\t\t\t\tvar barSize = Math.min(Math.abs(left - right), Math.abs(top - bottom));\n\t\t\t\tborderWidth = borderWidth > barSize? barSize: borderWidth;\n\t\t\t\tvar halfStroke = borderWidth / 2;\n\t\t\t\t// Adjust borderWidth when bar top position is near vm.base(zero).\n\t\t\t\tvar borderLeft = left + (borderSkipped !== 'left'? halfStroke * signX: 0);\n\t\t\t\tvar borderRight = right + (borderSkipped !== 'right'? -halfStroke * signX: 0);\n\t\t\t\tvar borderTop = top + (borderSkipped !== 'top'? halfStroke * signY: 0);\n\t\t\t\tvar borderBottom = bottom + (borderSkipped !== 'bottom'? -halfStroke * signY: 0);\n\t\t\t\t// not become a vertical line?\n\t\t\t\tif (borderLeft !== borderRight) {\n\t\t\t\t\ttop = borderTop;\n\t\t\t\t\tbottom = borderBottom;\n\t\t\t\t}\n\t\t\t\t// not become a horizontal line?\n\t\t\t\tif (borderTop !== borderBottom) {\n\t\t\t\t\tleft = borderLeft;\n\t\t\t\t\tright = borderRight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tctx.beginPath();\n\t\t\tctx.fillStyle = vm.backgroundColor;\n\t\t\tctx.strokeStyle = vm.borderColor;\n\t\t\tctx.lineWidth = borderWidth;\n\n\t\t\t// Corner points, from bottom-left to bottom-right clockwise\n\t\t\t// | 1 2 |\n\t\t\t// | 0 3 |\n\t\t\tvar corners = [\n\t\t\t\t[left, bottom],\n\t\t\t\t[left, top],\n\t\t\t\t[right, top],\n\t\t\t\t[right, bottom]\n\t\t\t];\n\n\t\t\t// Find first (starting) corner with fallback to 'bottom'\n\t\t\tvar borders = ['bottom', 'left', 'top', 'right'];\n\t\t\tvar startCorner = borders.indexOf(borderSkipped, 0);\n\t\t\tif (startCorner === -1) {\n\t\t\t\tstartCorner = 0;\n\t\t\t}\n\n\t\t\tfunction cornerAt(index) {\n\t\t\t\treturn corners[(startCorner + index) % 4];\n\t\t\t}\n\n\t\t\t// Draw rectangle from 'startCorner'\n\t\t\tvar corner = cornerAt(0);\n\t\t\tctx.moveTo(corner[0], corner[1]);\n\n\t\t\tfor (var i = 1; i < 4; i++) {\n\t\t\t\tcorner = cornerAt(i);\n\t\t\t\tctx.lineTo(corner[0], corner[1]);\n\t\t\t}\n\n\t\t\tctx.fill();\n\t\t\tif (borderWidth) {\n\t\t\t\tctx.stroke();\n\t\t\t}\n\t\t},\n\t\theight: function() {\n\t\t\tvar vm = this._view;\n\t\t\treturn vm.base - vm.y;\n\t\t},\n\t\tinRange: function(mouseX, mouseY) {\n\t\t\tvar inRange = false;\n\n\t\t\tif (this._view) {\n\t\t\t\tvar bounds = getBarBounds(this);\n\t\t\t\tinRange = mouseX >= bounds.left && mouseX <= bounds.right && mouseY >= bounds.top && mouseY <= bounds.bottom;\n\t\t\t}\n\n\t\t\treturn inRange;\n\t\t},\n\t\tinLabelRange: function(mouseX, mouseY) {\n\t\t\tvar me = this;\n\t\t\tif (!me._view) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar inRange = false;\n\t\t\tvar bounds = getBarBounds(me);\n\n\t\t\tif (isVertical(me)) {\n\t\t\t\tinRange = mouseX >= bounds.left && mouseX <= bounds.right;\n\t\t\t} else {\n\t\t\t\tinRange = mouseY >= bounds.top && mouseY <= bounds.bottom;\n\t\t\t}\n\n\t\t\treturn inRange;\n\t\t},\n\t\tinXRange: function(mouseX) {\n\t\t\tvar bounds = getBarBounds(this);\n\t\t\treturn mouseX >= bounds.left && mouseX <= bounds.right;\n\t\t},\n\t\tinYRange: function(mouseY) {\n\t\t\tvar bounds = getBarBounds(this);\n\t\t\treturn mouseY >= bounds.top && mouseY <= bounds.bottom;\n\t\t},\n\t\tgetCenterPoint: function() {\n\t\t\tvar vm = this._view;\n\t\t\tvar x, y;\n\t\t\tif (isVertical(this)) {\n\t\t\t\tx = vm.x;\n\t\t\t\ty = (vm.y + vm.base) / 2;\n\t\t\t} else {\n\t\t\t\tx = (vm.x + vm.base) / 2;\n\t\t\t\ty = vm.y;\n\t\t\t}\n\n\t\t\treturn {x: x, y: y};\n\t\t},\n\t\tgetArea: function() {\n\t\t\tvar vm = this._view;\n\t\t\treturn vm.width * Math.abs(vm.y - vm.base);\n\t\t},\n\t\ttooltipPosition: function() {\n\t\t\tvar vm = this._view;\n\t\t\treturn {\n\t\t\t\tx: vm.x,\n\t\t\t\ty: vm.y\n\t\t\t};\n\t\t}\n\t});\n\n};\n\n},{}],41:[function(require,module,exports){\n'use strict';\n\n// Chart.Platform implementation for targeting a web browser\nmodule.exports = function(Chart) {\n\tvar helpers = Chart.helpers;\n\n\t// DOM event types -> Chart.js event types.\n\t// Note: only events with different types are mapped.\n\t// https://developer.mozilla.org/en-US/docs/Web/Events\n\tvar eventTypeMap = {\n\t\t// Touch events\n\t\ttouchstart: 'mousedown',\n\t\ttouchmove: 'mousemove',\n\t\ttouchend: 'mouseup',\n\n\t\t// Pointer events\n\t\tpointerenter: 'mouseenter',\n\t\tpointerdown: 'mousedown',\n\t\tpointermove: 'mousemove',\n\t\tpointerup: 'mouseup',\n\t\tpointerleave: 'mouseout',\n\t\tpointerout: 'mouseout'\n\t};\n\n\t/**\n\t * The \"used\" size is the final value of a dimension property after all calculations have\n\t * been performed. This method uses the computed style of `element` but returns undefined\n\t * if the computed style is not expressed in pixels. That can happen in some cases where\n\t * `element` has a size relative to its parent and this last one is not yet displayed,\n\t * for example because of `display: none` on a parent node.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n\t * @returns {Number} Size in pixels or undefined if unknown.\n\t */\n\tfunction readUsedSize(element, property) {\n\t\tvar value = helpers.getStyle(element, property);\n\t\tvar matches = value && value.match(/(\\d+)px/);\n\t\treturn matches? Number(matches[1]) : undefined;\n\t}\n\n\t/**\n\t * Initializes the canvas style and render size without modifying the canvas display size,\n\t * since responsiveness is handled by the controller.resize() method. The config is used\n\t * to determine the aspect ratio to apply in case no explicit height has been specified.\n\t */\n\tfunction initCanvas(canvas, config) {\n\t\tvar style = canvas.style;\n\n\t\t// NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it\n\t\t// returns null or '' if no explicit value has been set to the canvas attribute.\n\t\tvar renderHeight = canvas.getAttribute('height');\n\t\tvar renderWidth = canvas.getAttribute('width');\n\n\t\t// Chart.js modifies some canvas values that we want to restore on destroy\n\t\tcanvas._chartjs = {\n\t\t\tinitial: {\n\t\t\t\theight: renderHeight,\n\t\t\t\twidth: renderWidth,\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: style.display,\n\t\t\t\t\theight: style.height,\n\t\t\t\t\twidth: style.width\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Force canvas to display as block to avoid extra space caused by inline\n\t\t// elements, which would interfere with the responsive resize process.\n\t\t// https://github.com/chartjs/Chart.js/issues/2538\n\t\tstyle.display = style.display || 'block';\n\n\t\tif (renderWidth === null || renderWidth === '') {\n\t\t\tvar displayWidth = readUsedSize(canvas, 'width');\n\t\t\tif (displayWidth !== undefined) {\n\t\t\t\tcanvas.width = displayWidth;\n\t\t\t}\n\t\t}\n\n\t\tif (renderHeight === null || renderHeight === '') {\n\t\t\tif (canvas.style.height === '') {\n\t\t\t\t// If no explicit render height and style height, let's apply the aspect ratio,\n\t\t\t\t// which one can be specified by the user but also by charts as default option\n\t\t\t\t// (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.\n\t\t\t\tcanvas.height = canvas.width / (config.options.aspectRatio || 2);\n\t\t\t} else {\n\t\t\t\tvar displayHeight = readUsedSize(canvas, 'height');\n\t\t\t\tif (displayWidth !== undefined) {\n\t\t\t\t\tcanvas.height = displayHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn canvas;\n\t}\n\n\tfunction createEvent(type, chart, x, y, native) {\n\t\treturn {\n\t\t\ttype: type,\n\t\t\tchart: chart,\n\t\t\tnative: native || null,\n\t\t\tx: x !== undefined? x : null,\n\t\t\ty: y !== undefined? y : null,\n\t\t};\n\t}\n\n\tfunction fromNativeEvent(event, chart) {\n\t\tvar type = eventTypeMap[event.type] || event.type;\n\t\tvar pos = helpers.getRelativePosition(event, chart);\n\t\treturn createEvent(type, chart, pos.x, pos.y, event);\n\t}\n\n\tfunction createResizer(handler) {\n\t\tvar iframe = document.createElement('iframe');\n\t\tiframe.className = 'chartjs-hidden-iframe';\n\t\tiframe.style.cssText =\n\t\t\t'display:block;'+\n\t\t\t'overflow:hidden;'+\n\t\t\t'border:0;'+\n\t\t\t'margin:0;'+\n\t\t\t'top:0;'+\n\t\t\t'left:0;'+\n\t\t\t'bottom:0;'+\n\t\t\t'right:0;'+\n\t\t\t'height:100%;'+\n\t\t\t'width:100%;'+\n\t\t\t'position:absolute;'+\n\t\t\t'pointer-events:none;'+\n\t\t\t'z-index:-1;';\n\n\t\t// Prevent the iframe to gain focus on tab.\n\t\t// https://github.com/chartjs/Chart.js/issues/3090\n\t\tiframe.tabIndex = -1;\n\n\t\t// If the iframe is re-attached to the DOM, the resize listener is removed because the\n\t\t// content is reloaded, so make sure to install the handler after the iframe is loaded.\n\t\t// https://github.com/chartjs/Chart.js/issues/3521\n\t\thelpers.addEvent(iframe, 'load', function() {\n\t\t\thelpers.addEvent(iframe.contentWindow || iframe, 'resize', handler);\n\n\t\t\t// The iframe size might have changed while loading, which can also\n\t\t\t// happen if the size has been changed while detached from the DOM.\n\t\t\thandler();\n\t\t});\n\n\t\treturn iframe;\n\t}\n\n\tfunction addResizeListener(node, listener, chart) {\n\t\tvar stub = node._chartjs = {\n\t\t\tticking: false\n\t\t};\n\n\t\t// Throttle the callback notification until the next animation frame.\n\t\tvar notify = function() {\n\t\t\tif (!stub.ticking) {\n\t\t\t\tstub.ticking = true;\n\t\t\t\thelpers.requestAnimFrame.call(window, function() {\n\t\t\t\t\tif (stub.resizer) {\n\t\t\t\t\t\tstub.ticking = false;\n\t\t\t\t\t\treturn listener(createEvent('resize', chart));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\t// Let's keep track of this added iframe and thus avoid DOM query when removing it.\n\t\tstub.resizer = createResizer(notify);\n\n\t\tnode.insertBefore(stub.resizer, node.firstChild);\n\t}\n\n\tfunction removeResizeListener(node) {\n\t\tif (!node || !node._chartjs) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar resizer = node._chartjs.resizer;\n\t\tif (resizer) {\n\t\t\tresizer.parentNode.removeChild(resizer);\n\t\t\tnode._chartjs.resizer = null;\n\t\t}\n\n\t\tdelete node._chartjs;\n\t}\n\n\treturn {\n\t\tacquireContext: function(item, config) {\n\t\t\tif (typeof item === 'string') {\n\t\t\t\titem = document.getElementById(item);\n\t\t\t} else if (item.length) {\n\t\t\t\t// Support for array based queries (such as jQuery)\n\t\t\t\titem = item[0];\n\t\t\t}\n\n\t\t\tif (item && item.canvas) {\n\t\t\t\t// Support for any object associated to a canvas (including a context2d)\n\t\t\t\titem = item.canvas;\n\t\t\t}\n\n\t\t\tif (item instanceof HTMLCanvasElement) {\n\t\t\t\t// To prevent canvas fingerprinting, some add-ons undefine the getContext\n\t\t\t\t// method, for example: https://github.com/kkapsner/CanvasBlocker\n\t\t\t\t// https://github.com/chartjs/Chart.js/issues/2807\n\t\t\t\tvar context = item.getContext && item.getContext('2d');\n\t\t\t\tif (context instanceof CanvasRenderingContext2D) {\n\t\t\t\t\tinitCanvas(item, config);\n\t\t\t\t\treturn context;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\n\t\treleaseContext: function(context) {\n\t\t\tvar canvas = context.canvas;\n\t\t\tif (!canvas._chartjs) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar initial = canvas._chartjs.initial;\n\t\t\t['height', 'width'].forEach(function(prop) {\n\t\t\t\tvar value = initial[prop];\n\t\t\t\tif (value === undefined || value === null) {\n\t\t\t\t\tcanvas.removeAttribute(prop);\n\t\t\t\t} else {\n\t\t\t\t\tcanvas.setAttribute(prop, value);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\thelpers.each(initial.style || {}, function(value, key) {\n\t\t\t\tcanvas.style[key] = value;\n\t\t\t});\n\n\t\t\t// The canvas render size might have been changed (and thus the state stack discarded),\n\t\t\t// we can't use save() and restore() to restore the initial state. So make sure that at\n\t\t\t// least the canvas context is reset to the default state by setting the canvas width.\n\t\t\t// https://www.w3.org/TR/2011/WD-html5-20110525/the-canvas-element.html\n\t\t\tcanvas.width = canvas.width;\n\n\t\t\tdelete canvas._chartjs;\n\t\t},\n\n\t\taddEventListener: function(chart, type, listener) {\n\t\t\tvar canvas = chart.chart.canvas;\n\t\t\tif (type === 'resize') {\n\t\t\t\t// Note: the resize event is not supported on all browsers.\n\t\t\t\taddResizeListener(canvas.parentNode, listener, chart.chart);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar stub = listener._chartjs || (listener._chartjs = {});\n\t\t\tvar proxies = stub.proxies || (stub.proxies = {});\n\t\t\tvar proxy = proxies[chart.id + '_' + type] = function(event) {\n\t\t\t\tlistener(fromNativeEvent(event, chart.chart));\n\t\t\t};\n\n\t\t\thelpers.addEvent(canvas, type, proxy);\n\t\t},\n\n\t\tremoveEventListener: function(chart, type, listener) {\n\t\t\tvar canvas = chart.chart.canvas;\n\t\t\tif (type === 'resize') {\n\t\t\t\t// Note: the resize event is not supported on all browsers.\n\t\t\t\tremoveResizeListener(canvas.parentNode, listener);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar stub = listener._chartjs || {};\n\t\t\tvar proxies = stub.proxies || {};\n\t\t\tvar proxy = proxies[chart.id + '_' + type];\n\t\t\tif (!proxy) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\thelpers.removeEvent(canvas, type, proxy);\n\t\t}\n\t};\n};\n\n},{}],42:[function(require,module,exports){\n'use strict';\n\n// By default, select the browser (DOM) platform.\n// @TODO Make possible to select another platform at build time.\nvar implementation = require(41);\n\nmodule.exports = function(Chart) {\n\t/**\n\t * @namespace Chart.platform\n\t * @see https://chartjs.gitbooks.io/proposals/content/Platform.html\n\t * @since 2.4.0\n\t */\n\tChart.platform = {\n\t\t/**\n\t\t * Called at chart construction time, returns a context2d instance implementing\n\t\t * the [W3C Canvas 2D Context API standard]{@link https://www.w3.org/TR/2dcontext/}.\n\t\t * @param {*} item - The native item from which to acquire context (platform specific)\n\t\t * @param {Object} options - The chart options\n\t\t * @returns {CanvasRenderingContext2D} context2d instance\n\t\t */\n\t\tacquireContext: function() {},\n\n\t\t/**\n\t\t * Called at chart destruction time, releases any resources associated to the context\n\t\t * previously returned by the acquireContext() method.\n\t\t * @param {CanvasRenderingContext2D} context - The context2d instance\n\t\t * @returns {Boolean} true if the method succeeded, else false\n\t\t */\n\t\treleaseContext: function() {},\n\n\t\t/**\n\t\t * Registers the specified listener on the given chart.\n\t\t * @param {Chart} chart - Chart from which to listen for event\n\t\t * @param {String} type - The ({@link IEvent}) type to listen for\n\t\t * @param {Function} listener - Receives a notification (an object that implements\n\t\t * the {@link IEvent} interface) when an event of the specified type occurs.\n\t\t */\n\t\taddEventListener: function() {},\n\n\t\t/**\n\t\t * Removes the specified listener previously registered with addEventListener.\n\t\t * @param {Chart} chart -Chart from which to remove the listener\n\t\t * @param {String} type - The ({@link IEvent}) type to remove\n\t\t * @param {Function} listener - The listener function to remove from the event target.\n\t\t */\n\t\tremoveEventListener: function() {}\n\t};\n\n\t/**\n\t * @interface IPlatform\n\t * Allows abstracting platform dependencies away from the chart\n\t * @borrows Chart.platform.acquireContext as acquireContext\n\t * @borrows Chart.platform.releaseContext as releaseContext\n\t * @borrows Chart.platform.addEventListener as addEventListener\n\t * @borrows Chart.platform.removeEventListener as removeEventListener\n\t */\n\n\t/**\n\t * @interface IEvent\n\t * @prop {String} type - The event type name, possible values are:\n\t * 'contextmenu', 'mouseenter', 'mousedown', 'mousemove', 'mouseup', 'mouseout',\n\t * 'click', 'dblclick', 'keydown', 'keypress', 'keyup' and 'resize'\n\t * @prop {*} native - The original native event (null for emulated events, e.g. 'resize')\n\t * @prop {Number} x - The mouse x position, relative to the canvas (null for incompatible events)\n\t * @prop {Number} y - The mouse y position, relative to the canvas (null for incompatible events)\n\t */\n\n\tChart.helpers.extend(Chart.platform, implementation(Chart));\n};\n\n},{\"41\":41}],43:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\t// Default config for a category scale\n\tvar defaultConfig = {\n\t\tposition: 'bottom'\n\t};\n\n\tvar DatasetScale = Chart.Scale.extend({\n\t\t/**\n\t\t* Internal function to get the correct labels. If data.xLabels or data.yLabels are defined, use those\n\t\t* else fall back to data.labels\n\t\t* @private\n\t\t*/\n\t\tgetLabels: function() {\n\t\t\tvar data = this.chart.data;\n\t\t\treturn (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels;\n\t\t},\n\t\t// Implement this so that\n\t\tdetermineDataLimits: function() {\n\t\t\tvar me = this;\n\t\t\tvar labels = me.getLabels();\n\t\t\tme.minIndex = 0;\n\t\t\tme.maxIndex = labels.length - 1;\n\t\t\tvar findIndex;\n\n\t\t\tif (me.options.ticks.min !== undefined) {\n\t\t\t\t// user specified min value\n\t\t\t\tfindIndex = helpers.indexOf(labels, me.options.ticks.min);\n\t\t\t\tme.minIndex = findIndex !== -1 ? findIndex : me.minIndex;\n\t\t\t}\n\n\t\t\tif (me.options.ticks.max !== undefined) {\n\t\t\t\t// user specified max value\n\t\t\t\tfindIndex = helpers.indexOf(labels, me.options.ticks.max);\n\t\t\t\tme.maxIndex = findIndex !== -1 ? findIndex : me.maxIndex;\n\t\t\t}\n\n\t\t\tme.min = labels[me.minIndex];\n\t\t\tme.max = labels[me.maxIndex];\n\t\t},\n\n\t\tbuildTicks: function() {\n\t\t\tvar me = this;\n\t\t\tvar labels = me.getLabels();\n\t\t\t// If we are viewing some subset of labels, slice the original array\n\t\t\tme.ticks = (me.minIndex === 0 && me.maxIndex === labels.length - 1) ? labels : labels.slice(me.minIndex, me.maxIndex + 1);\n\t\t},\n\n\t\tgetLabelForIndex: function(index, datasetIndex) {\n\t\t\tvar me = this;\n\t\t\tvar data = me.chart.data;\n\t\t\tvar isHorizontal = me.isHorizontal();\n\n\t\t\tif (data.yLabels && !isHorizontal) {\n\t\t\t\treturn me.getRightValue(data.datasets[datasetIndex].data[index]);\n\t\t\t}\n\t\t\treturn me.ticks[index - me.minIndex];\n\t\t},\n\n\t\t// Used to get data value locations. Value can either be an index or a numerical value\n\t\tgetPixelForValue: function(value, index, datasetIndex, includeOffset) {\n\t\t\tvar me = this;\n\t\t\t// 1 is added because we need the length but we have the indexes\n\t\t\tvar offsetAmt = Math.max((me.maxIndex + 1 - me.minIndex - ((me.options.gridLines.offsetGridLines) ? 0 : 1)), 1);\n\n\t\t\tif (value !== undefined && isNaN(index)) {\n\t\t\t\tvar labels = me.getLabels();\n\t\t\t\tvar idx = labels.indexOf(value);\n\t\t\t\tindex = idx !== -1 ? idx : index;\n\t\t\t}\n\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\tvar valueWidth = me.width / offsetAmt;\n\t\t\t\tvar widthOffset = (valueWidth * (index - me.minIndex));\n\n\t\t\t\tif (me.options.gridLines.offsetGridLines && includeOffset || me.maxIndex === me.minIndex && includeOffset) {\n\t\t\t\t\twidthOffset += (valueWidth / 2);\n\t\t\t\t}\n\n\t\t\t\treturn me.left + Math.round(widthOffset);\n\t\t\t}\n\t\t\tvar valueHeight = me.height / offsetAmt;\n\t\t\tvar heightOffset = (valueHeight * (index - me.minIndex));\n\n\t\t\tif (me.options.gridLines.offsetGridLines && includeOffset) {\n\t\t\t\theightOffset += (valueHeight / 2);\n\t\t\t}\n\n\t\t\treturn me.top + Math.round(heightOffset);\n\t\t},\n\t\tgetPixelForTick: function(index, includeOffset) {\n\t\t\treturn this.getPixelForValue(this.ticks[index], index + this.minIndex, null, includeOffset);\n\t\t},\n\t\tgetValueForPixel: function(pixel) {\n\t\t\tvar me = this;\n\t\t\tvar value;\n\t\t\tvar offsetAmt = Math.max((me.ticks.length - ((me.options.gridLines.offsetGridLines) ? 0 : 1)), 1);\n\t\t\tvar horz = me.isHorizontal();\n\t\t\tvar valueDimension = (horz ? me.width : me.height) / offsetAmt;\n\n\t\t\tpixel -= horz ? me.left : me.top;\n\n\t\t\tif (me.options.gridLines.offsetGridLines) {\n\t\t\t\tpixel -= (valueDimension / 2);\n\t\t\t}\n\n\t\t\tif (pixel <= 0) {\n\t\t\t\tvalue = 0;\n\t\t\t} else {\n\t\t\t\tvalue = Math.round(pixel / valueDimension);\n\t\t\t}\n\n\t\t\treturn value;\n\t\t},\n\t\tgetBasePixel: function() {\n\t\t\treturn this.bottom;\n\t\t}\n\t});\n\n\tChart.scaleService.registerScaleType('category', DatasetScale, defaultConfig);\n\n};\n\n},{}],44:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tvar defaultConfig = {\n\t\tposition: 'left',\n\t\tticks: {\n\t\t\tcallback: Chart.Ticks.formatters.linear\n\t\t}\n\t};\n\n\tvar LinearScale = Chart.LinearScaleBase.extend({\n\t\tdetermineDataLimits: function() {\n\t\t\tvar me = this;\n\t\t\tvar opts = me.options;\n\t\t\tvar chart = me.chart;\n\t\t\tvar data = chart.data;\n\t\t\tvar datasets = data.datasets;\n\t\t\tvar isHorizontal = me.isHorizontal();\n\n\t\t\tfunction IDMatches(meta) {\n\t\t\t\treturn isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;\n\t\t\t}\n\n\t\t\t// First Calculate the range\n\t\t\tme.min = null;\n\t\t\tme.max = null;\n\n\t\t\tvar hasStacks = opts.stacked;\n\t\t\tif (hasStacks === undefined) {\n\t\t\t\thelpers.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\t\tif (hasStacks) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) &&\n\t\t\t\t\t\tmeta.stack !== undefined) {\n\t\t\t\t\t\thasStacks = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (opts.stacked || hasStacks) {\n\t\t\t\tvar valuesPerStack = {};\n\n\t\t\t\thelpers.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\t\tvar key = [\n\t\t\t\t\t\tmeta.type,\n\t\t\t\t\t\t// we have a separate stack for stack=undefined datasets when the opts.stacked is undefined\n\t\t\t\t\t\t((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),\n\t\t\t\t\t\tmeta.stack\n\t\t\t\t\t].join('.');\n\n\t\t\t\t\tif (valuesPerStack[key] === undefined) {\n\t\t\t\t\t\tvaluesPerStack[key] = {\n\t\t\t\t\t\t\tpositiveValues: [],\n\t\t\t\t\t\t\tnegativeValues: []\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Store these per type\n\t\t\t\t\tvar positiveValues = valuesPerStack[key].positiveValues;\n\t\t\t\t\tvar negativeValues = valuesPerStack[key].negativeValues;\n\n\t\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\n\t\t\t\t\t\thelpers.each(dataset.data, function(rawValue, index) {\n\t\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\n\t\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpositiveValues[index] = positiveValues[index] || 0;\n\t\t\t\t\t\t\tnegativeValues[index] = negativeValues[index] || 0;\n\n\t\t\t\t\t\t\tif (opts.relativePoints) {\n\t\t\t\t\t\t\t\tpositiveValues[index] = 100;\n\t\t\t\t\t\t\t} else if (value < 0) {\n\t\t\t\t\t\t\t\tnegativeValues[index] += value;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpositiveValues[index] += value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\thelpers.each(valuesPerStack, function(valuesForType) {\n\t\t\t\t\tvar values = valuesForType.positiveValues.concat(valuesForType.negativeValues);\n\t\t\t\t\tvar minVal = helpers.min(values);\n\t\t\t\t\tvar maxVal = helpers.max(values);\n\t\t\t\t\tme.min = me.min === null ? minVal : Math.min(me.min, minVal);\n\t\t\t\t\tme.max = me.max === null ? maxVal : Math.max(me.max, maxVal);\n\t\t\t\t});\n\n\t\t\t} else {\n\t\t\t\thelpers.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\n\t\t\t\t\t\thelpers.each(dataset.data, function(rawValue, index) {\n\t\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\n\t\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (me.min === null) {\n\t\t\t\t\t\t\t\tme.min = value;\n\t\t\t\t\t\t\t} else if (value < me.min) {\n\t\t\t\t\t\t\t\tme.min = value;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (me.max === null) {\n\t\t\t\t\t\t\t\tme.max = value;\n\t\t\t\t\t\t\t} else if (value > me.max) {\n\t\t\t\t\t\t\t\tme.max = value;\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\n\t\t\t// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero\n\t\t\tthis.handleTickRangeOptions();\n\t\t},\n\t\tgetTickLimit: function() {\n\t\t\tvar maxTicks;\n\t\t\tvar me = this;\n\t\t\tvar tickOpts = me.options.ticks;\n\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\tmaxTicks = Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(me.width / 50));\n\t\t\t} else {\n\t\t\t\t// The factor of 2 used to scale the font size has been experimentally determined.\n\t\t\t\tvar tickFontSize = helpers.getValueOrDefault(tickOpts.fontSize, Chart.defaults.global.defaultFontSize);\n\t\t\t\tmaxTicks = Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(me.height / (2 * tickFontSize)));\n\t\t\t}\n\n\t\t\treturn maxTicks;\n\t\t},\n\t\t// Called after the ticks are built. We need\n\t\thandleDirectionalChanges: function() {\n\t\t\tif (!this.isHorizontal()) {\n\t\t\t\t// We are in a vertical orientation. The top value is the highest. So reverse the array\n\t\t\t\tthis.ticks.reverse();\n\t\t\t}\n\t\t},\n\t\tgetLabelForIndex: function(index, datasetIndex) {\n\t\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\n\t\t},\n\t\t// Utils\n\t\tgetPixelForValue: function(value) {\n\t\t\t// This must be called after fit has been run so that\n\t\t\t// this.left, this.top, this.right, and this.bottom have been defined\n\t\t\tvar me = this;\n\t\t\tvar start = me.start;\n\n\t\t\tvar rightValue = +me.getRightValue(value);\n\t\t\tvar pixel;\n\t\t\tvar range = me.end - start;\n\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\tpixel = me.left + (me.width / range * (rightValue - start));\n\t\t\t\treturn Math.round(pixel);\n\t\t\t}\n\n\t\t\tpixel = me.bottom - (me.height / range * (rightValue - start));\n\t\t\treturn Math.round(pixel);\n\t\t},\n\t\tgetValueForPixel: function(pixel) {\n\t\t\tvar me = this;\n\t\t\tvar isHorizontal = me.isHorizontal();\n\t\t\tvar innerDimension = isHorizontal ? me.width : me.height;\n\t\t\tvar offset = (isHorizontal ? pixel - me.left : me.bottom - pixel) / innerDimension;\n\t\t\treturn me.start + ((me.end - me.start) * offset);\n\t\t},\n\t\tgetPixelForTick: function(index) {\n\t\t\treturn this.getPixelForValue(this.ticksAsNumbers[index]);\n\t\t}\n\t});\n\tChart.scaleService.registerScaleType('linear', LinearScale, defaultConfig);\n\n};\n\n},{}],45:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers,\n\t\tnoop = helpers.noop;\n\n\tChart.LinearScaleBase = Chart.Scale.extend({\n\t\thandleTickRangeOptions: function() {\n\t\t\tvar me = this;\n\t\t\tvar opts = me.options;\n\t\t\tvar tickOpts = opts.ticks;\n\n\t\t\t// If we are forcing it to begin at 0, but 0 will already be rendered on the chart,\n\t\t\t// do nothing since that would make the chart weird. If the user really wants a weird chart\n\t\t\t// axis, they can manually override it\n\t\t\tif (tickOpts.beginAtZero) {\n\t\t\t\tvar minSign = helpers.sign(me.min);\n\t\t\t\tvar maxSign = helpers.sign(me.max);\n\n\t\t\t\tif (minSign < 0 && maxSign < 0) {\n\t\t\t\t\t// move the top up to 0\n\t\t\t\t\tme.max = 0;\n\t\t\t\t} else if (minSign > 0 && maxSign > 0) {\n\t\t\t\t\t// move the bottom down to 0\n\t\t\t\t\tme.min = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tickOpts.min !== undefined) {\n\t\t\t\tme.min = tickOpts.min;\n\t\t\t} else if (tickOpts.suggestedMin !== undefined) {\n\t\t\t\tme.min = Math.min(me.min, tickOpts.suggestedMin);\n\t\t\t}\n\n\t\t\tif (tickOpts.max !== undefined) {\n\t\t\t\tme.max = tickOpts.max;\n\t\t\t} else if (tickOpts.suggestedMax !== undefined) {\n\t\t\t\tme.max = Math.max(me.max, tickOpts.suggestedMax);\n\t\t\t}\n\n\t\t\tif (me.min === me.max) {\n\t\t\t\tme.max++;\n\n\t\t\t\tif (!tickOpts.beginAtZero) {\n\t\t\t\t\tme.min--;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tgetTickLimit: noop,\n\t\thandleDirectionalChanges: noop,\n\n\t\tbuildTicks: function() {\n\t\t\tvar me = this;\n\t\t\tvar opts = me.options;\n\t\t\tvar tickOpts = opts.ticks;\n\n\t\t\t// Figure out what the max number of ticks we can support it is based on the size of\n\t\t\t// the axis area. For now, we say that the minimum tick spacing in pixels must be 50\n\t\t\t// We also limit the maximum number of ticks to 11 which gives a nice 10 squares on\n\t\t\t// the graph. Make sure we always have at least 2 ticks\n\t\t\tvar maxTicks = me.getTickLimit();\n\t\t\tmaxTicks = Math.max(2, maxTicks);\n\n\t\t\tvar numericGeneratorOptions = {\n\t\t\t\tmaxTicks: maxTicks,\n\t\t\t\tmin: tickOpts.min,\n\t\t\t\tmax: tickOpts.max,\n\t\t\t\tstepSize: helpers.getValueOrDefault(tickOpts.fixedStepSize, tickOpts.stepSize)\n\t\t\t};\n\t\t\tvar ticks = me.ticks = Chart.Ticks.generators.linear(numericGeneratorOptions, me);\n\n\t\t\tme.handleDirectionalChanges();\n\n\t\t\t// At this point, we need to update our max and min given the tick values since we have expanded the\n\t\t\t// range of the scale\n\t\t\tme.max = helpers.max(ticks);\n\t\t\tme.min = helpers.min(ticks);\n\n\t\t\tif (tickOpts.reverse) {\n\t\t\t\tticks.reverse();\n\n\t\t\t\tme.start = me.max;\n\t\t\t\tme.end = me.min;\n\t\t\t} else {\n\t\t\t\tme.start = me.min;\n\t\t\t\tme.end = me.max;\n\t\t\t}\n\t\t},\n\t\tconvertTicksToLabels: function() {\n\t\t\tvar me = this;\n\t\t\tme.ticksAsNumbers = me.ticks.slice();\n\t\t\tme.zeroLineIndex = me.ticks.indexOf(0);\n\n\t\t\tChart.Scale.prototype.convertTicksToLabels.call(me);\n\t\t}\n\t});\n};\n\n},{}],46:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\n\tvar defaultConfig = {\n\t\tposition: 'left',\n\n\t\t// label settings\n\t\tticks: {\n\t\t\tcallback: Chart.Ticks.formatters.logarithmic\n\t\t}\n\t};\n\n\tvar LogarithmicScale = Chart.Scale.extend({\n\t\tdetermineDataLimits: function() {\n\t\t\tvar me = this;\n\t\t\tvar opts = me.options;\n\t\t\tvar tickOpts = opts.ticks;\n\t\t\tvar chart = me.chart;\n\t\t\tvar data = chart.data;\n\t\t\tvar datasets = data.datasets;\n\t\t\tvar getValueOrDefault = helpers.getValueOrDefault;\n\t\t\tvar isHorizontal = me.isHorizontal();\n\t\t\tfunction IDMatches(meta) {\n\t\t\t\treturn isHorizontal ? meta.xAxisID === me.id : meta.yAxisID === me.id;\n\t\t\t}\n\n\t\t\t// Calculate Range\n\t\t\tme.min = null;\n\t\t\tme.max = null;\n\t\t\tme.minNotZero = null;\n\n\t\t\tvar hasStacks = opts.stacked;\n\t\t\tif (hasStacks === undefined) {\n\t\t\t\thelpers.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\t\tif (hasStacks) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta) &&\n\t\t\t\t\t\tmeta.stack !== undefined) {\n\t\t\t\t\t\thasStacks = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (opts.stacked || hasStacks) {\n\t\t\t\tvar valuesPerStack = {};\n\n\t\t\t\thelpers.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\t\tvar key = [\n\t\t\t\t\t\tmeta.type,\n\t\t\t\t\t\t// we have a separate stack for stack=undefined datasets when the opts.stacked is undefined\n\t\t\t\t\t\t((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),\n\t\t\t\t\t\tmeta.stack\n\t\t\t\t\t].join('.');\n\n\t\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\n\t\t\t\t\t\tif (valuesPerStack[key] === undefined) {\n\t\t\t\t\t\t\tvaluesPerStack[key] = [];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\thelpers.each(dataset.data, function(rawValue, index) {\n\t\t\t\t\t\t\tvar values = valuesPerStack[key];\n\t\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\n\t\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvalues[index] = values[index] || 0;\n\n\t\t\t\t\t\t\tif (opts.relativePoints) {\n\t\t\t\t\t\t\t\tvalues[index] = 100;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// Don't need to split positive and negative since the log scale can't handle a 0 crossing\n\t\t\t\t\t\t\t\tvalues[index] += value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\thelpers.each(valuesPerStack, function(valuesForType) {\n\t\t\t\t\tvar minVal = helpers.min(valuesForType);\n\t\t\t\t\tvar maxVal = helpers.max(valuesForType);\n\t\t\t\t\tme.min = me.min === null ? minVal : Math.min(me.min, minVal);\n\t\t\t\t\tme.max = me.max === null ? maxVal : Math.max(me.max, maxVal);\n\t\t\t\t});\n\n\t\t\t} else {\n\t\t\t\thelpers.each(datasets, function(dataset, datasetIndex) {\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\t\t\t\t\tif (chart.isDatasetVisible(datasetIndex) && IDMatches(meta)) {\n\t\t\t\t\t\thelpers.each(dataset.data, function(rawValue, index) {\n\t\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\n\t\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (me.min === null) {\n\t\t\t\t\t\t\t\tme.min = value;\n\t\t\t\t\t\t\t} else if (value < me.min) {\n\t\t\t\t\t\t\t\tme.min = value;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (me.max === null) {\n\t\t\t\t\t\t\t\tme.max = value;\n\t\t\t\t\t\t\t} else if (value > me.max) {\n\t\t\t\t\t\t\t\tme.max = value;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (value !== 0 && (me.minNotZero === null || value < me.minNotZero)) {\n\t\t\t\t\t\t\t\tme.minNotZero = value;\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\n\t\t\tme.min = getValueOrDefault(tickOpts.min, me.min);\n\t\t\tme.max = getValueOrDefault(tickOpts.max, me.max);\n\n\t\t\tif (me.min === me.max) {\n\t\t\t\tif (me.min !== 0 && me.min !== null) {\n\t\t\t\t\tme.min = Math.pow(10, Math.floor(helpers.log10(me.min)) - 1);\n\t\t\t\t\tme.max = Math.pow(10, Math.floor(helpers.log10(me.max)) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tme.min = 1;\n\t\t\t\t\tme.max = 10;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tbuildTicks: function() {\n\t\t\tvar me = this;\n\t\t\tvar opts = me.options;\n\t\t\tvar tickOpts = opts.ticks;\n\n\t\t\tvar generationOptions = {\n\t\t\t\tmin: tickOpts.min,\n\t\t\t\tmax: tickOpts.max\n\t\t\t};\n\t\t\tvar ticks = me.ticks = Chart.Ticks.generators.logarithmic(generationOptions, me);\n\n\t\t\tif (!me.isHorizontal()) {\n\t\t\t\t// We are in a vertical orientation. The top value is the highest. So reverse the array\n\t\t\t\tticks.reverse();\n\t\t\t}\n\n\t\t\t// At this point, we need to update our max and min given the tick values since we have expanded the\n\t\t\t// range of the scale\n\t\t\tme.max = helpers.max(ticks);\n\t\t\tme.min = helpers.min(ticks);\n\n\t\t\tif (tickOpts.reverse) {\n\t\t\t\tticks.reverse();\n\n\t\t\t\tme.start = me.max;\n\t\t\t\tme.end = me.min;\n\t\t\t} else {\n\t\t\t\tme.start = me.min;\n\t\t\t\tme.end = me.max;\n\t\t\t}\n\t\t},\n\t\tconvertTicksToLabels: function() {\n\t\t\tthis.tickValues = this.ticks.slice();\n\n\t\t\tChart.Scale.prototype.convertTicksToLabels.call(this);\n\t\t},\n\t\t// Get the correct tooltip label\n\t\tgetLabelForIndex: function(index, datasetIndex) {\n\t\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\n\t\t},\n\t\tgetPixelForTick: function(index) {\n\t\t\treturn this.getPixelForValue(this.tickValues[index]);\n\t\t},\n\t\tgetPixelForValue: function(value) {\n\t\t\tvar me = this;\n\t\t\tvar innerDimension;\n\t\t\tvar pixel;\n\n\t\t\tvar start = me.start;\n\t\t\tvar newVal = +me.getRightValue(value);\n\t\t\tvar range;\n\t\t\tvar opts = me.options;\n\t\t\tvar tickOpts = opts.ticks;\n\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\trange = helpers.log10(me.end) - helpers.log10(start); // todo: if start === 0\n\t\t\t\tif (newVal === 0) {\n\t\t\t\t\tpixel = me.left;\n\t\t\t\t} else {\n\t\t\t\t\tinnerDimension = me.width;\n\t\t\t\t\tpixel = me.left + (innerDimension / range * (helpers.log10(newVal) - helpers.log10(start)));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Bottom - top since pixels increase downward on a screen\n\t\t\t\tinnerDimension = me.height;\n\t\t\t\tif (start === 0 && !tickOpts.reverse) {\n\t\t\t\t\trange = helpers.log10(me.end) - helpers.log10(me.minNotZero);\n\t\t\t\t\tif (newVal === start) {\n\t\t\t\t\t\tpixel = me.bottom;\n\t\t\t\t\t} else if (newVal === me.minNotZero) {\n\t\t\t\t\t\tpixel = me.bottom - innerDimension * 0.02;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpixel = me.bottom - innerDimension * 0.02 - (innerDimension * 0.98/ range * (helpers.log10(newVal)-helpers.log10(me.minNotZero)));\n\t\t\t\t\t}\n\t\t\t\t} else if (me.end === 0 && tickOpts.reverse) {\n\t\t\t\t\trange = helpers.log10(me.start) - helpers.log10(me.minNotZero);\n\t\t\t\t\tif (newVal === me.end) {\n\t\t\t\t\t\tpixel = me.top;\n\t\t\t\t\t} else if (newVal === me.minNotZero) {\n\t\t\t\t\t\tpixel = me.top + innerDimension * 0.02;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpixel = me.top + innerDimension * 0.02 + (innerDimension * 0.98/ range * (helpers.log10(newVal)-helpers.log10(me.minNotZero)));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\trange = helpers.log10(me.end) - helpers.log10(start);\n\t\t\t\t\tinnerDimension = me.height;\n\t\t\t\t\tpixel = me.bottom - (innerDimension / range * (helpers.log10(newVal) - helpers.log10(start)));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn pixel;\n\t\t},\n\t\tgetValueForPixel: function(pixel) {\n\t\t\tvar me = this;\n\t\t\tvar range = helpers.log10(me.end) - helpers.log10(me.start);\n\t\t\tvar value, innerDimension;\n\n\t\t\tif (me.isHorizontal()) {\n\t\t\t\tinnerDimension = me.width;\n\t\t\t\tvalue = me.start * Math.pow(10, (pixel - me.left) * range / innerDimension);\n\t\t\t} else { // todo: if start === 0\n\t\t\t\tinnerDimension = me.height;\n\t\t\t\tvalue = Math.pow(10, (me.bottom - pixel) * range / innerDimension) / me.start;\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t});\n\tChart.scaleService.registerScaleType('logarithmic', LogarithmicScale, defaultConfig);\n\n};\n\n},{}],47:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\tvar globalDefaults = Chart.defaults.global;\n\n\tvar defaultConfig = {\n\t\tdisplay: true,\n\n\t\t// Boolean - Whether to animate scaling the chart from the centre\n\t\tanimate: true,\n\t\tlineArc: false,\n\t\tposition: 'chartArea',\n\n\t\tangleLines: {\n\t\t\tdisplay: true,\n\t\t\tcolor: 'rgba(0, 0, 0, 0.1)',\n\t\t\tlineWidth: 1\n\t\t},\n\n\t\t// label settings\n\t\tticks: {\n\t\t\t// Boolean - Show a backdrop to the scale label\n\t\t\tshowLabelBackdrop: true,\n\n\t\t\t// String - The colour of the label backdrop\n\t\t\tbackdropColor: 'rgba(255,255,255,0.75)',\n\n\t\t\t// Number - The backdrop padding above & below the label in pixels\n\t\t\tbackdropPaddingY: 2,\n\n\t\t\t// Number - The backdrop padding to the side of the label in pixels\n\t\t\tbackdropPaddingX: 2,\n\n\t\t\tcallback: Chart.Ticks.formatters.linear\n\t\t},\n\n\t\tpointLabels: {\n\t\t\t// Number - Point label font size in pixels\n\t\t\tfontSize: 10,\n\n\t\t\t// Function - Used to convert point labels\n\t\t\tcallback: function(label) {\n\t\t\t\treturn label;\n\t\t\t}\n\t\t}\n\t};\n\n\tfunction getValueCount(scale) {\n\t\treturn !scale.options.lineArc ? scale.chart.data.labels.length : 0;\n\t}\n\n\tfunction getPointLabelFontOptions(scale) {\n\t\tvar pointLabelOptions = scale.options.pointLabels;\n\t\tvar fontSize = helpers.getValueOrDefault(pointLabelOptions.fontSize, globalDefaults.defaultFontSize);\n\t\tvar fontStyle = helpers.getValueOrDefault(pointLabelOptions.fontStyle, globalDefaults.defaultFontStyle);\n\t\tvar fontFamily = helpers.getValueOrDefault(pointLabelOptions.fontFamily, globalDefaults.defaultFontFamily);\n\t\tvar font = helpers.fontString(fontSize, fontStyle, fontFamily);\n\n\t\treturn {\n\t\t\tsize: fontSize,\n\t\t\tstyle: fontStyle,\n\t\t\tfamily: fontFamily,\n\t\t\tfont: font\n\t\t};\n\t}\n\n\tfunction measureLabelSize(ctx, fontSize, label) {\n\t\tif (helpers.isArray(label)) {\n\t\t\treturn {\n\t\t\t\tw: helpers.longestText(ctx, ctx.font, label),\n\t\t\t\th: (label.length * fontSize) + ((label.length - 1) * 1.5 * fontSize)\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tw: ctx.measureText(label).width,\n\t\t\th: fontSize\n\t\t};\n\t}\n\n\tfunction determineLimits(angle, pos, size, min, max) {\n\t\tif (angle === min || angle === max) {\n\t\t\treturn {\n\t\t\t\tstart: pos - (size / 2),\n\t\t\t\tend: pos + (size / 2)\n\t\t\t};\n\t\t} else if (angle < min || angle > max) {\n\t\t\treturn {\n\t\t\t\tstart: pos - size - 5,\n\t\t\t\tend: pos\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tstart: pos,\n\t\t\tend: pos + size + 5\n\t\t};\n\t}\n\n\t/**\n\t * Helper function to fit a radial linear scale with point labels\n\t */\n\tfunction fitWithPointLabels(scale) {\n\t\t/*\n\t\t * Right, this is really confusing and there is a lot of maths going on here\n\t\t * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9\n\t\t *\n\t\t * Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif\n\t\t *\n\t\t * Solution:\n\t\t *\n\t\t * We assume the radius of the polygon is half the size of the canvas at first\n\t\t * at each index we check if the text overlaps.\n\t\t *\n\t\t * Where it does, we store that angle and that index.\n\t\t *\n\t\t * After finding the largest index and angle we calculate how much we need to remove\n\t\t * from the shape radius to move the point inwards by that x.\n\t\t *\n\t\t * We average the left and right distances to get the maximum shape radius that can fit in the box\n\t\t * along with labels.\n\t\t *\n\t\t * Once we have that, we can find the centre point for the chart, by taking the x text protrusion\n\t\t * on each side, removing that from the size, halving it and adding the left x protrusion width.\n\t\t *\n\t\t * This will mean we have a shape fitted to the canvas, as large as it can be with the labels\n\t\t * and position it in the most space efficient manner\n\t\t *\n\t\t * https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif\n\t\t */\n\n\t\tvar plFont = getPointLabelFontOptions(scale);\n\n\t\t// Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.\n\t\t// Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points\n\t\tvar largestPossibleRadius = Math.min(scale.height / 2, scale.width / 2);\n\t\tvar furthestLimits = {\n\t\t\tl: scale.width,\n\t\t\tr: 0,\n\t\t\tt: scale.height,\n\t\t\tb: 0\n\t\t};\n\t\tvar furthestAngles = {};\n\t\tvar i;\n\t\tvar textSize;\n\t\tvar pointPosition;\n\n\t\tscale.ctx.font = plFont.font;\n\t\tscale._pointLabelSizes = [];\n\n\t\tvar valueCount = getValueCount(scale);\n\t\tfor (i = 0; i < valueCount; i++) {\n\t\t\tpointPosition = scale.getPointPosition(i, largestPossibleRadius);\n\t\t\ttextSize = measureLabelSize(scale.ctx, plFont.size, scale.pointLabels[i] || '');\n\t\t\tscale._pointLabelSizes[i] = textSize;\n\n\t\t\t// Add quarter circle to make degree 0 mean top of circle\n\t\t\tvar angleRadians = scale.getIndexAngle(i);\n\t\t\tvar angle = helpers.toDegrees(angleRadians) % 360;\n\t\t\tvar hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\n\t\t\tvar vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\n\n\t\t\tif (hLimits.start < furthestLimits.l) {\n\t\t\t\tfurthestLimits.l = hLimits.start;\n\t\t\t\tfurthestAngles.l = angleRadians;\n\t\t\t}\n\n\t\t\tif (hLimits.end > furthestLimits.r) {\n\t\t\t\tfurthestLimits.r = hLimits.end;\n\t\t\t\tfurthestAngles.r = angleRadians;\n\t\t\t}\n\n\t\t\tif (vLimits.start < furthestLimits.t) {\n\t\t\t\tfurthestLimits.t = vLimits.start;\n\t\t\t\tfurthestAngles.t = angleRadians;\n\t\t\t}\n\n\t\t\tif (vLimits.end > furthestLimits.b) {\n\t\t\t\tfurthestLimits.b = vLimits.end;\n\t\t\t\tfurthestAngles.b = angleRadians;\n\t\t\t}\n\t\t}\n\n\t\tscale.setReductions(largestPossibleRadius, furthestLimits, furthestAngles);\n\t}\n\n\t/**\n\t * Helper function to fit a radial linear scale with no point labels\n\t */\n\tfunction fit(scale) {\n\t\tvar largestPossibleRadius = Math.min(scale.height / 2, scale.width / 2);\n\t\tscale.drawingArea = Math.round(largestPossibleRadius);\n\t\tscale.setCenterPoint(0, 0, 0, 0);\n\t}\n\n\tfunction getTextAlignForAngle(angle) {\n\t\tif (angle === 0 || angle === 180) {\n\t\t\treturn 'center';\n\t\t} else if (angle < 180) {\n\t\t\treturn 'left';\n\t\t}\n\n\t\treturn 'right';\n\t}\n\n\tfunction fillText(ctx, text, position, fontSize) {\n\t\tif (helpers.isArray(text)) {\n\t\t\tvar y = position.y;\n\t\t\tvar spacing = 1.5 * fontSize;\n\n\t\t\tfor (var i = 0; i < text.length; ++i) {\n\t\t\t\tctx.fillText(text[i], position.x, y);\n\t\t\t\ty+= spacing;\n\t\t\t}\n\t\t} else {\n\t\t\tctx.fillText(text, position.x, position.y);\n\t\t}\n\t}\n\n\tfunction adjustPointPositionForLabelHeight(angle, textSize, position) {\n\t\tif (angle === 90 || angle === 270) {\n\t\t\tposition.y -= (textSize.h / 2);\n\t\t} else if (angle > 270 || angle < 90) {\n\t\t\tposition.y -= textSize.h;\n\t\t}\n\t}\n\n\tfunction drawPointLabels(scale) {\n\t\tvar ctx = scale.ctx;\n\t\tvar getValueOrDefault = helpers.getValueOrDefault;\n\t\tvar opts = scale.options;\n\t\tvar angleLineOpts = opts.angleLines;\n\t\tvar pointLabelOpts = opts.pointLabels;\n\n\t\tctx.lineWidth = angleLineOpts.lineWidth;\n\t\tctx.strokeStyle = angleLineOpts.color;\n\n\t\tvar outerDistance = scale.getDistanceFromCenterForValue(opts.reverse ? scale.min : scale.max);\n\n\t\t// Point Label Font\n\t\tvar plFont = getPointLabelFontOptions(scale);\n\n\t\tctx.textBaseline = 'top';\n\n\t\tfor (var i = getValueCount(scale) - 1; i >= 0; i--) {\n\t\t\tif (angleLineOpts.display) {\n\t\t\t\tvar outerPosition = scale.getPointPosition(i, outerDistance);\n\t\t\t\tctx.beginPath();\n\t\t\t\tctx.moveTo(scale.xCenter, scale.yCenter);\n\t\t\t\tctx.lineTo(outerPosition.x, outerPosition.y);\n\t\t\t\tctx.stroke();\n\t\t\t\tctx.closePath();\n\t\t\t}\n\t\t\t// Extra 3px out for some label spacing\n\t\t\tvar pointLabelPosition = scale.getPointPosition(i, outerDistance + 5);\n\n\t\t\t// Keep this in loop since we may support array properties here\n\t\t\tvar pointLabelFontColor = getValueOrDefault(pointLabelOpts.fontColor, globalDefaults.defaultFontColor);\n\t\t\tctx.font = plFont.font;\n\t\t\tctx.fillStyle = pointLabelFontColor;\n\n\t\t\tvar angleRadians = scale.getIndexAngle(i);\n\t\t\tvar angle = helpers.toDegrees(angleRadians);\n\t\t\tctx.textAlign = getTextAlignForAngle(angle);\n\t\t\tadjustPointPositionForLabelHeight(angle, scale._pointLabelSizes[i], pointLabelPosition);\n\t\t\tfillText(ctx, scale.pointLabels[i] || '', pointLabelPosition, plFont.size);\n\t\t}\n\t}\n\n\tfunction drawRadiusLine(scale, gridLineOpts, radius, index) {\n\t\tvar ctx = scale.ctx;\n\t\tctx.strokeStyle = helpers.getValueAtIndexOrDefault(gridLineOpts.color, index - 1);\n\t\tctx.lineWidth = helpers.getValueAtIndexOrDefault(gridLineOpts.lineWidth, index - 1);\n\n\t\tif (scale.options.lineArc) {\n\t\t\t// Draw circular arcs between the points\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(scale.xCenter, scale.yCenter, radius, 0, Math.PI * 2);\n\t\t\tctx.closePath();\n\t\t\tctx.stroke();\n\t\t} else {\n\t\t\t// Draw straight lines connecting each index\n\t\t\tvar valueCount = getValueCount(scale);\n\n\t\t\tif (valueCount === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tctx.beginPath();\n\t\t\tvar pointPosition = scale.getPointPosition(0, radius);\n\t\t\tctx.moveTo(pointPosition.x, pointPosition.y);\n\n\t\t\tfor (var i = 1; i < valueCount; i++) {\n\t\t\t\tpointPosition = scale.getPointPosition(i, radius);\n\t\t\t\tctx.lineTo(pointPosition.x, pointPosition.y);\n\t\t\t}\n\n\t\t\tctx.closePath();\n\t\t\tctx.stroke();\n\t\t}\n\t}\n\n\tfunction numberOrZero(param) {\n\t\treturn helpers.isNumber(param) ? param : 0;\n\t}\n\n\tvar LinearRadialScale = Chart.LinearScaleBase.extend({\n\t\tsetDimensions: function() {\n\t\t\tvar me = this;\n\t\t\tvar opts = me.options;\n\t\t\tvar tickOpts = opts.ticks;\n\t\t\t// Set the unconstrained dimension before label rotation\n\t\t\tme.width = me.maxWidth;\n\t\t\tme.height = me.maxHeight;\n\t\t\tme.xCenter = Math.round(me.width / 2);\n\t\t\tme.yCenter = Math.round(me.height / 2);\n\n\t\t\tvar minSize = helpers.min([me.height, me.width]);\n\t\t\tvar tickFontSize = helpers.getValueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize);\n\t\t\tme.drawingArea = opts.display ? (minSize / 2) - (tickFontSize / 2 + tickOpts.backdropPaddingY) : (minSize / 2);\n\t\t},\n\t\tdetermineDataLimits: function() {\n\t\t\tvar me = this;\n\t\t\tvar chart = me.chart;\n\t\t\tvar min = Number.POSITIVE_INFINITY;\n\t\t\tvar max = Number.NEGATIVE_INFINITY;\n\n\t\t\thelpers.each(chart.data.datasets, function(dataset, datasetIndex) {\n\t\t\t\tif (chart.isDatasetVisible(datasetIndex)) {\n\t\t\t\t\tvar meta = chart.getDatasetMeta(datasetIndex);\n\n\t\t\t\t\thelpers.each(dataset.data, function(rawValue, index) {\n\t\t\t\t\t\tvar value = +me.getRightValue(rawValue);\n\t\t\t\t\t\tif (isNaN(value) || meta.data[index].hidden) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmin = Math.min(value, min);\n\t\t\t\t\t\tmax = Math.max(value, max);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tme.min = (min === Number.POSITIVE_INFINITY ? 0 : min);\n\t\t\tme.max = (max === Number.NEGATIVE_INFINITY ? 0 : max);\n\n\t\t\t// Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero\n\t\t\tme.handleTickRangeOptions();\n\t\t},\n\t\tgetTickLimit: function() {\n\t\t\tvar tickOpts = this.options.ticks;\n\t\t\tvar tickFontSize = helpers.getValueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize);\n\t\t\treturn Math.min(tickOpts.maxTicksLimit ? tickOpts.maxTicksLimit : 11, Math.ceil(this.drawingArea / (1.5 * tickFontSize)));\n\t\t},\n\t\tconvertTicksToLabels: function() {\n\t\t\tvar me = this;\n\t\t\tChart.LinearScaleBase.prototype.convertTicksToLabels.call(me);\n\n\t\t\t// Point labels\n\t\t\tme.pointLabels = me.chart.data.labels.map(me.options.pointLabels.callback, me);\n\t\t},\n\t\tgetLabelForIndex: function(index, datasetIndex) {\n\t\t\treturn +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);\n\t\t},\n\t\tfit: function() {\n\t\t\tif (this.options.lineArc) {\n\t\t\t\tfit(this);\n\t\t\t} else {\n\t\t\t\tfitWithPointLabels(this);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Set radius reductions and determine new radius and center point\n\t\t * @private\n\t\t */\n\t\tsetReductions: function(largestPossibleRadius, furthestLimits, furthestAngles) {\n\t\t\tvar me = this;\n\t\t\tvar radiusReductionLeft = furthestLimits.l / Math.sin(furthestAngles.l);\n\t\t\tvar radiusReductionRight = Math.max(furthestLimits.r - me.width, 0) / Math.sin(furthestAngles.r);\n\t\t\tvar radiusReductionTop = -furthestLimits.t / Math.cos(furthestAngles.t);\n\t\t\tvar radiusReductionBottom = -Math.max(furthestLimits.b - me.height, 0) / Math.cos(furthestAngles.b);\n\n\t\t\tradiusReductionLeft = numberOrZero(radiusReductionLeft);\n\t\t\tradiusReductionRight = numberOrZero(radiusReductionRight);\n\t\t\tradiusReductionTop = numberOrZero(radiusReductionTop);\n\t\t\tradiusReductionBottom = numberOrZero(radiusReductionBottom);\n\n\t\t\tme.drawingArea = Math.min(\n\t\t\t\tMath.round(largestPossibleRadius - (radiusReductionLeft + radiusReductionRight) / 2),\n\t\t\t\tMath.round(largestPossibleRadius - (radiusReductionTop + radiusReductionBottom) / 2));\n\t\t\tme.setCenterPoint(radiusReductionLeft, radiusReductionRight, radiusReductionTop, radiusReductionBottom);\n\t\t},\n\t\tsetCenterPoint: function(leftMovement, rightMovement, topMovement, bottomMovement) {\n\t\t\tvar me = this;\n\t\t\tvar maxRight = me.width - rightMovement - me.drawingArea,\n\t\t\t\tmaxLeft = leftMovement + me.drawingArea,\n\t\t\t\tmaxTop = topMovement + me.drawingArea,\n\t\t\t\tmaxBottom = me.height - bottomMovement - me.drawingArea;\n\n\t\t\tme.xCenter = Math.round(((maxLeft + maxRight) / 2) + me.left);\n\t\t\tme.yCenter = Math.round(((maxTop + maxBottom) / 2) + me.top);\n\t\t},\n\n\t\tgetIndexAngle: function(index) {\n\t\t\tvar angleMultiplier = (Math.PI * 2) / getValueCount(this);\n\t\t\tvar startAngle = this.chart.options && this.chart.options.startAngle ?\n\t\t\t\tthis.chart.options.startAngle :\n\t\t\t\t0;\n\n\t\t\tvar startAngleRadians = startAngle * Math.PI * 2 / 360;\n\n\t\t\t// Start from the top instead of right, so remove a quarter of the circle\n\t\t\treturn index * angleMultiplier + startAngleRadians;\n\t\t},\n\t\tgetDistanceFromCenterForValue: function(value) {\n\t\t\tvar me = this;\n\n\t\t\tif (value === null) {\n\t\t\t\treturn 0; // null always in center\n\t\t\t}\n\n\t\t\t// Take into account half font size + the yPadding of the top value\n\t\t\tvar scalingFactor = me.drawingArea / (me.max - me.min);\n\t\t\tif (me.options.reverse) {\n\t\t\t\treturn (me.max - value) * scalingFactor;\n\t\t\t}\n\t\t\treturn (value - me.min) * scalingFactor;\n\t\t},\n\t\tgetPointPosition: function(index, distanceFromCenter) {\n\t\t\tvar me = this;\n\t\t\tvar thisAngle = me.getIndexAngle(index) - (Math.PI / 2);\n\t\t\treturn {\n\t\t\t\tx: Math.round(Math.cos(thisAngle) * distanceFromCenter) + me.xCenter,\n\t\t\t\ty: Math.round(Math.sin(thisAngle) * distanceFromCenter) + me.yCenter\n\t\t\t};\n\t\t},\n\t\tgetPointPositionForValue: function(index, value) {\n\t\t\treturn this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\n\t\t},\n\n\t\tgetBasePosition: function() {\n\t\t\tvar me = this;\n\t\t\tvar min = me.min;\n\t\t\tvar max = me.max;\n\n\t\t\treturn me.getPointPositionForValue(0,\n\t\t\t\tme.beginAtZero? 0:\n\t\t\t\tmin < 0 && max < 0? max :\n\t\t\t\tmin > 0 && max > 0? min :\n\t\t\t\t0);\n\t\t},\n\n\t\tdraw: function() {\n\t\t\tvar me = this;\n\t\t\tvar opts = me.options;\n\t\t\tvar gridLineOpts = opts.gridLines;\n\t\t\tvar tickOpts = opts.ticks;\n\t\t\tvar getValueOrDefault = helpers.getValueOrDefault;\n\n\t\t\tif (opts.display) {\n\t\t\t\tvar ctx = me.ctx;\n\n\t\t\t\t// Tick Font\n\t\t\t\tvar tickFontSize = getValueOrDefault(tickOpts.fontSize, globalDefaults.defaultFontSize);\n\t\t\t\tvar tickFontStyle = getValueOrDefault(tickOpts.fontStyle, globalDefaults.defaultFontStyle);\n\t\t\t\tvar tickFontFamily = getValueOrDefault(tickOpts.fontFamily, globalDefaults.defaultFontFamily);\n\t\t\t\tvar tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily);\n\n\t\t\t\thelpers.each(me.ticks, function(label, index) {\n\t\t\t\t\t// Don't draw a centre value (if it is minimum)\n\t\t\t\t\tif (index > 0 || opts.reverse) {\n\t\t\t\t\t\tvar yCenterOffset = me.getDistanceFromCenterForValue(me.ticksAsNumbers[index]);\n\t\t\t\t\t\tvar yHeight = me.yCenter - yCenterOffset;\n\n\t\t\t\t\t\t// Draw circular lines around the scale\n\t\t\t\t\t\tif (gridLineOpts.display && index !== 0) {\n\t\t\t\t\t\t\tdrawRadiusLine(me, gridLineOpts, yCenterOffset, index);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (tickOpts.display) {\n\t\t\t\t\t\t\tvar tickFontColor = getValueOrDefault(tickOpts.fontColor, globalDefaults.defaultFontColor);\n\t\t\t\t\t\t\tctx.font = tickLabelFont;\n\n\t\t\t\t\t\t\tif (tickOpts.showLabelBackdrop) {\n\t\t\t\t\t\t\t\tvar labelWidth = ctx.measureText(label).width;\n\t\t\t\t\t\t\t\tctx.fillStyle = tickOpts.backdropColor;\n\t\t\t\t\t\t\t\tctx.fillRect(\n\t\t\t\t\t\t\t\t\tme.xCenter - labelWidth / 2 - tickOpts.backdropPaddingX,\n\t\t\t\t\t\t\t\t\tyHeight - tickFontSize / 2 - tickOpts.backdropPaddingY,\n\t\t\t\t\t\t\t\t\tlabelWidth + tickOpts.backdropPaddingX * 2,\n\t\t\t\t\t\t\t\t\ttickFontSize + tickOpts.backdropPaddingY * 2\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tctx.textAlign = 'center';\n\t\t\t\t\t\t\tctx.textBaseline = 'middle';\n\t\t\t\t\t\t\tctx.fillStyle = tickFontColor;\n\t\t\t\t\t\t\tctx.fillText(label, me.xCenter, yHeight);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (!opts.lineArc) {\n\t\t\t\t\tdrawPointLabels(me);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\tChart.scaleService.registerScaleType('radialLinear', LinearRadialScale, defaultConfig);\n\n};\n\n},{}],48:[function(require,module,exports){\n/* global window: false */\n'use strict';\n\nvar moment = require(1);\nmoment = typeof(moment) === 'function' ? moment : window.moment;\n\nmodule.exports = function(Chart) {\n\n\tvar helpers = Chart.helpers;\n\tvar time = {\n\t\tunits: [{\n\t\t\tname: 'millisecond',\n\t\t\tsteps: [1, 2, 5, 10, 20, 50, 100, 250, 500]\n\t\t}, {\n\t\t\tname: 'second',\n\t\t\tsteps: [1, 2, 5, 10, 30]\n\t\t}, {\n\t\t\tname: 'minute',\n\t\t\tsteps: [1, 2, 5, 10, 30]\n\t\t}, {\n\t\t\tname: 'hour',\n\t\t\tsteps: [1, 2, 3, 6, 12]\n\t\t}, {\n\t\t\tname: 'day',\n\t\t\tsteps: [1, 2, 5]\n\t\t}, {\n\t\t\tname: 'week',\n\t\t\tmaxStep: 4\n\t\t}, {\n\t\t\tname: 'month',\n\t\t\tmaxStep: 3\n\t\t}, {\n\t\t\tname: 'quarter',\n\t\t\tmaxStep: 4\n\t\t}, {\n\t\t\tname: 'year',\n\t\t\tmaxStep: false\n\t\t}]\n\t};\n\n\tvar defaultConfig = {\n\t\tposition: 'bottom',\n\n\t\ttime: {\n\t\t\tparser: false, // false == a pattern string from http://momentjs.com/docs/#/parsing/string-format/ or a custom callback that converts its argument to a moment\n\t\t\tformat: false, // DEPRECATED false == date objects, moment object, callback or a pattern string from http://momentjs.com/docs/#/parsing/string-format/\n\t\t\tunit: false, // false == automatic or override with week, month, year, etc.\n\t\t\tround: false, // none, or override with week, month, year, etc.\n\t\t\tdisplayFormat: false, // DEPRECATED\n\t\t\tisoWeekday: false, // override week start day - see http://momentjs.com/docs/#/get-set/iso-weekday/\n\t\t\tminUnit: 'millisecond',\n\n\t\t\t// defaults to unit's corresponding unitFormat below or override using pattern string from http://momentjs.com/docs/#/displaying/format/\n\t\t\tdisplayFormats: {\n\t\t\t\tmillisecond: 'h:mm:ss.SSS a', // 11:20:01.123 AM,\n\t\t\t\tsecond: 'h:mm:ss a', // 11:20:01 AM\n\t\t\t\tminute: 'h:mm:ss a', // 11:20:01 AM\n\t\t\t\thour: 'MMM D, hA', // Sept 4, 5PM\n\t\t\t\tday: 'll', // Sep 4 2015\n\t\t\t\tweek: 'll', // Week 46, or maybe \"[W]WW - YYYY\" ?\n\t\t\t\tmonth: 'MMM YYYY', // Sept 2015\n\t\t\t\tquarter: '[Q]Q - YYYY', // Q3\n\t\t\t\tyear: 'YYYY' // 2015\n\t\t\t}\n\t\t},\n\t\tticks: {\n\t\t\tautoSkip: false\n\t\t}\n\t};\n\n\tvar TimeScale = Chart.Scale.extend({\n\t\tinitialize: function() {\n\t\t\tif (!moment) {\n\t\t\t\tthrow new Error('Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com');\n\t\t\t}\n\n\t\t\tChart.Scale.prototype.initialize.call(this);\n\t\t},\n\t\tgetLabelMoment: function(datasetIndex, index) {\n\t\t\tif (datasetIndex === null || index === null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (typeof this.labelMoments[datasetIndex] !== 'undefined') {\n\t\t\t\treturn this.labelMoments[datasetIndex][index];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\t\tgetLabelDiff: function(datasetIndex, index) {\n\t\t\tvar me = this;\n\t\t\tif (datasetIndex === null || index === null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (me.labelDiffs === undefined) {\n\t\t\t\tme.buildLabelDiffs();\n\t\t\t}\n\n\t\t\tif (typeof me.labelDiffs[datasetIndex] !== 'undefined') {\n\t\t\t\treturn me.labelDiffs[datasetIndex][index];\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\t\tgetMomentStartOf: function(tick) {\n\t\t\tvar me = this;\n\t\t\tif (me.options.time.unit === 'week' && me.options.time.isoWeekday !== false) {\n\t\t\t\treturn tick.clone().startOf('isoWeek').isoWeekday(me.options.time.isoWeekday);\n\t\t\t}\n\t\t\treturn tick.clone().startOf(me.tickUnit);\n\t\t},\n\t\tdetermineDataLimits: function() {\n\t\t\tvar me = this;\n\t\t\tme.labelMoments = [];\n\n\t\t\t// Only parse these once. If the dataset does not have data as x,y pairs, we will use\n\t\t\t// these\n\t\t\tvar scaleLabelMoments = [];\n\t\t\tif (me.chart.data.labels && me.chart.data.labels.length > 0) {\n\t\t\t\thelpers.each(me.chart.data.labels, function(label) {\n\t\t\t\t\tvar labelMoment = me.parseTime(label);\n\n\t\t\t\t\tif (labelMoment.isValid()) {\n\t\t\t\t\t\tif (me.options.time.round) {\n\t\t\t\t\t\t\tlabelMoment.startOf(me.options.time.round);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscaleLabelMoments.push(labelMoment);\n\t\t\t\t\t}\n\t\t\t\t}, me);\n\n\t\t\t\tme.firstTick = moment.min.call(me, scaleLabelMoments);\n\t\t\t\tme.lastTick = moment.max.call(me, scaleLabelMoments);\n\t\t\t} else {\n\t\t\t\tme.firstTick = null;\n\t\t\t\tme.lastTick = null;\n\t\t\t}\n\n\t\t\thelpers.each(me.chart.data.datasets, function(dataset, datasetIndex) {\n\t\t\t\tvar momentsForDataset = [];\n\t\t\t\tvar datasetVisible = me.chart.isDatasetVisible(datasetIndex);\n\n\t\t\t\tif (typeof dataset.data[0] === 'object' && dataset.data[0] !== null) {\n\t\t\t\t\thelpers.each(dataset.data, function(value) {\n\t\t\t\t\t\tvar labelMoment = me.parseTime(me.getRightValue(value));\n\n\t\t\t\t\t\tif (labelMoment.isValid()) {\n\t\t\t\t\t\t\tif (me.options.time.round) {\n\t\t\t\t\t\t\t\tlabelMoment.startOf(me.options.time.round);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmomentsForDataset.push(labelMoment);\n\n\t\t\t\t\t\t\tif (datasetVisible) {\n\t\t\t\t\t\t\t\t// May have gone outside the scale ranges, make sure we keep the first and last ticks updated\n\t\t\t\t\t\t\t\tme.firstTick = me.firstTick !== null ? moment.min(me.firstTick, labelMoment) : labelMoment;\n\t\t\t\t\t\t\t\tme.lastTick = me.lastTick !== null ? moment.max(me.lastTick, labelMoment) : labelMoment;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, me);\n\t\t\t\t} else {\n\t\t\t\t\t// We have no labels. Use the ones from the scale\n\t\t\t\t\tmomentsForDataset = scaleLabelMoments;\n\t\t\t\t}\n\n\t\t\t\tme.labelMoments.push(momentsForDataset);\n\t\t\t}, me);\n\n\t\t\t// Set these after we've done all the data\n\t\t\tif (me.options.time.min) {\n\t\t\t\tme.firstTick = me.parseTime(me.options.time.min);\n\t\t\t}\n\n\t\t\tif (me.options.time.max) {\n\t\t\t\tme.lastTick = me.parseTime(me.options.time.max);\n\t\t\t}\n\n\t\t\t// We will modify these, so clone for later\n\t\t\tme.firstTick = (me.firstTick || moment()).clone();\n\t\t\tme.lastTick = (me.lastTick || moment()).clone();\n\t\t},\n\t\tbuildLabelDiffs: function() {\n\t\t\tvar me = this;\n\t\t\tme.labelDiffs = [];\n\t\t\tvar scaleLabelDiffs = [];\n\t\t\t// Parse common labels once\n\t\t\tif (me.chart.data.labels && me.chart.data.labels.length > 0) {\n\t\t\t\thelpers.each(me.chart.data.labels, function(label) {\n\t\t\t\t\tvar labelMoment = me.parseTime(label);\n\n\t\t\t\t\tif (labelMoment.isValid()) {\n\t\t\t\t\t\tif (me.options.time.round) {\n\t\t\t\t\t\t\tlabelMoment.startOf(me.options.time.round);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscaleLabelDiffs.push(labelMoment.diff(me.firstTick, me.tickUnit, true));\n\t\t\t\t\t}\n\t\t\t\t}, me);\n\t\t\t}\n\n\t\t\thelpers.each(me.chart.data.datasets, function(dataset) {\n\t\t\t\tvar diffsForDataset = [];\n\n\t\t\t\tif (typeof dataset.data[0] === 'object' && dataset.data[0] !== null) {\n\t\t\t\t\thelpers.each(dataset.data, function(value) {\n\t\t\t\t\t\tvar labelMoment = me.parseTime(me.getRightValue(value));\n\n\t\t\t\t\t\tif (labelMoment.isValid()) {\n\t\t\t\t\t\t\tif (me.options.time.round) {\n\t\t\t\t\t\t\t\tlabelMoment.startOf(me.options.time.round);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdiffsForDataset.push(labelMoment.diff(me.firstTick, me.tickUnit, true));\n\t\t\t\t\t\t}\n\t\t\t\t\t}, me);\n\t\t\t\t} else {\n\t\t\t\t\t// We have no labels. Use common ones\n\t\t\t\t\tdiffsForDataset = scaleLabelDiffs;\n\t\t\t\t}\n\n\t\t\t\tme.labelDiffs.push(diffsForDataset);\n\t\t\t}, me);\n\t\t},\n\t\tbuildTicks: function() {\n\t\t\tvar me = this;\n\n\t\t\tme.ctx.save();\n\t\t\tvar tickFontSize = helpers.getValueOrDefault(me.options.ticks.fontSize, Chart.defaults.global.defaultFontSize);\n\t\t\tvar tickFontStyle = helpers.getValueOrDefault(me.options.ticks.fontStyle, Chart.defaults.global.defaultFontStyle);\n\t\t\tvar tickFontFamily = helpers.getValueOrDefault(me.options.ticks.fontFamily, Chart.defaults.global.defaultFontFamily);\n\t\t\tvar tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily);\n\t\t\tme.ctx.font = tickLabelFont;\n\n\t\t\tme.ticks = [];\n\t\t\tme.unitScale = 1; // How much we scale the unit by, ie 2 means 2x unit per step\n\t\t\tme.scaleSizeInUnits = 0; // How large the scale is in the base unit (seconds, minutes, etc)\n\n\t\t\t// Set unit override if applicable\n\t\t\tif (me.options.time.unit) {\n\t\t\t\tme.tickUnit = me.options.time.unit || 'day';\n\t\t\t\tme.displayFormat = me.options.time.displayFormats[me.tickUnit];\n\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.firstTick, me.tickUnit, true);\n\t\t\t\tme.unitScale = helpers.getValueOrDefault(me.options.time.unitStepSize, 1);\n\t\t\t} else {\n\t\t\t\t// Determine the smallest needed unit of the time\n\t\t\t\tvar innerWidth = me.isHorizontal() ? me.width : me.height;\n\n\t\t\t\t// Crude approximation of what the label length might be\n\t\t\t\tvar tempFirstLabel = me.tickFormatFunction(me.firstTick, 0, []);\n\t\t\t\tvar tickLabelWidth = me.ctx.measureText(tempFirstLabel).width;\n\t\t\t\tvar cosRotation = Math.cos(helpers.toRadians(me.options.ticks.maxRotation));\n\t\t\t\tvar sinRotation = Math.sin(helpers.toRadians(me.options.ticks.maxRotation));\n\t\t\t\ttickLabelWidth = (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation);\n\t\t\t\tvar labelCapacity = innerWidth / (tickLabelWidth);\n\n\t\t\t\t// Start as small as possible\n\t\t\t\tme.tickUnit = me.options.time.minUnit;\n\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.firstTick, me.tickUnit, true);\n\t\t\t\tme.displayFormat = me.options.time.displayFormats[me.tickUnit];\n\n\t\t\t\tvar unitDefinitionIndex = 0;\n\t\t\t\tvar unitDefinition = time.units[unitDefinitionIndex];\n\n\t\t\t\t// While we aren't ideal and we don't have units left\n\t\t\t\twhile (unitDefinitionIndex < time.units.length) {\n\t\t\t\t\t// Can we scale this unit. If `false` we can scale infinitely\n\t\t\t\t\tme.unitScale = 1;\n\n\t\t\t\t\tif (helpers.isArray(unitDefinition.steps) && Math.ceil(me.scaleSizeInUnits / labelCapacity) < helpers.max(unitDefinition.steps)) {\n\t\t\t\t\t\t// Use one of the predefined steps\n\t\t\t\t\t\tfor (var idx = 0; idx < unitDefinition.steps.length; ++idx) {\n\t\t\t\t\t\t\tif (unitDefinition.steps[idx] >= Math.ceil(me.scaleSizeInUnits / labelCapacity)) {\n\t\t\t\t\t\t\t\tme.unitScale = helpers.getValueOrDefault(me.options.time.unitStepSize, unitDefinition.steps[idx]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if ((unitDefinition.maxStep === false) || (Math.ceil(me.scaleSizeInUnits / labelCapacity) < unitDefinition.maxStep)) {\n\t\t\t\t\t\t// We have a max step. Scale this unit\n\t\t\t\t\t\tme.unitScale = helpers.getValueOrDefault(me.options.time.unitStepSize, Math.ceil(me.scaleSizeInUnits / labelCapacity));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Move to the next unit up\n\t\t\t\t\t\t++unitDefinitionIndex;\n\t\t\t\t\t\tunitDefinition = time.units[unitDefinitionIndex];\n\n\t\t\t\t\t\tme.tickUnit = unitDefinition.name;\n\t\t\t\t\t\tvar leadingUnitBuffer = me.firstTick.diff(me.getMomentStartOf(me.firstTick), me.tickUnit, true);\n\t\t\t\t\t\tvar trailingUnitBuffer = me.getMomentStartOf(me.lastTick.clone().add(1, me.tickUnit)).diff(me.lastTick, me.tickUnit, true);\n\t\t\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.firstTick, me.tickUnit, true) + leadingUnitBuffer + trailingUnitBuffer;\n\t\t\t\t\t\tme.displayFormat = me.options.time.displayFormats[unitDefinition.name];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar roundedStart;\n\n\t\t\t// Only round the first tick if we have no hard minimum\n\t\t\tif (!me.options.time.min) {\n\t\t\t\tme.firstTick = me.getMomentStartOf(me.firstTick);\n\t\t\t\troundedStart = me.firstTick;\n\t\t\t} else {\n\t\t\t\troundedStart = me.getMomentStartOf(me.firstTick);\n\t\t\t}\n\n\t\t\t// Only round the last tick if we have no hard maximum\n\t\t\tif (!me.options.time.max) {\n\t\t\t\tvar roundedEnd = me.getMomentStartOf(me.lastTick);\n\t\t\t\tvar delta = roundedEnd.diff(me.lastTick, me.tickUnit, true);\n\t\t\t\tif (delta < 0) {\n\t\t\t\t\t// Do not use end of because we need me to be in the next time unit\n\t\t\t\t\tme.lastTick = me.getMomentStartOf(me.lastTick.add(1, me.tickUnit));\n\t\t\t\t} else if (delta >= 0) {\n\t\t\t\t\tme.lastTick = roundedEnd;\n\t\t\t\t}\n\n\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.firstTick, me.tickUnit, true);\n\t\t\t}\n\n\t\t\t// Tick displayFormat override\n\t\t\tif (me.options.time.displayFormat) {\n\t\t\t\tme.displayFormat = me.options.time.displayFormat;\n\t\t\t}\n\n\t\t\t// first tick. will have been rounded correctly if options.time.min is not specified\n\t\t\tme.ticks.push(me.firstTick.clone());\n\n\t\t\t// For every unit in between the first and last moment, create a moment and add it to the ticks tick\n\t\t\tfor (var i = me.unitScale; i <= me.scaleSizeInUnits; i += me.unitScale) {\n\t\t\t\tvar newTick = roundedStart.clone().add(i, me.tickUnit);\n\n\t\t\t\t// Are we greater than the max time\n\t\t\t\tif (me.options.time.max && newTick.diff(me.lastTick, me.tickUnit, true) >= 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tme.ticks.push(newTick);\n\t\t\t}\n\n\t\t\t// Always show the right tick\n\t\t\tvar diff = me.ticks[me.ticks.length - 1].diff(me.lastTick, me.tickUnit);\n\t\t\tif (diff !== 0 || me.scaleSizeInUnits === 0) {\n\t\t\t\t// this is a weird case. If the <max> option is the same as the end option, we can't just diff the times because the tick was created from the roundedStart\n\t\t\t\t// but the last tick was not rounded.\n\t\t\t\tif (me.options.time.max) {\n\t\t\t\t\tme.ticks.push(me.lastTick.clone());\n\t\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.ticks[0], me.tickUnit, true);\n\t\t\t\t} else {\n\t\t\t\t\tme.ticks.push(me.lastTick.clone());\n\t\t\t\t\tme.scaleSizeInUnits = me.lastTick.diff(me.firstTick, me.tickUnit, true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tme.ctx.restore();\n\n\t\t\t// Invalidate label diffs cache\n\t\t\tme.labelDiffs = undefined;\n\t\t},\n\t\t// Get tooltip label\n\t\tgetLabelForIndex: function(index, datasetIndex) {\n\t\t\tvar me = this;\n\t\t\tvar label = me.chart.data.labels && index < me.chart.data.labels.length ? me.chart.data.labels[index] : '';\n\t\t\tvar value = me.chart.data.datasets[datasetIndex].data[index];\n\n\t\t\tif (value !== null && typeof value === 'object') {\n\t\t\t\tlabel = me.getRightValue(value);\n\t\t\t}\n\n\t\t\t// Format nicely\n\t\t\tif (me.options.time.tooltipFormat) {\n\t\t\t\tlabel = me.parseTime(label).format(me.options.time.tooltipFormat);\n\t\t\t}\n\n\t\t\treturn label;\n\t\t},\n\t\t// Function to format an individual tick mark\n\t\ttickFormatFunction: function(tick, index, ticks) {\n\t\t\tvar formattedTick = tick.format(this.displayFormat);\n\t\t\tvar tickOpts = this.options.ticks;\n\t\t\tvar callback = helpers.getValueOrDefault(tickOpts.callback, tickOpts.userCallback);\n\n\t\t\tif (callback) {\n\t\t\t\treturn callback(formattedTick, index, ticks);\n\t\t\t}\n\t\t\treturn formattedTick;\n\t\t},\n\t\tconvertTicksToLabels: function() {\n\t\t\tvar me = this;\n\t\t\tme.tickMoments = me.ticks;\n\t\t\tme.ticks = me.ticks.map(me.tickFormatFunction, me);\n\t\t},\n\t\tgetPixelForValue: function(value, index, datasetIndex) {\n\t\t\tvar me = this;\n\t\t\tvar offset = null;\n\t\t\tif (index !== undefined && datasetIndex !== undefined) {\n\t\t\t\toffset = me.getLabelDiff(datasetIndex, index);\n\t\t\t}\n\n\t\t\tif (offset === null) {\n\t\t\t\tif (!value || !value.isValid) {\n\t\t\t\t\t// not already a moment object\n\t\t\t\t\tvalue = me.parseTime(me.getRightValue(value));\n\t\t\t\t}\n\t\t\t\tif (value && value.isValid && value.isValid()) {\n\t\t\t\t\toffset = value.diff(me.firstTick, me.tickUnit, true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (offset !== null) {\n\t\t\t\tvar decimal = offset !== 0 ? offset / me.scaleSizeInUnits : offset;\n\n\t\t\t\tif (me.isHorizontal()) {\n\t\t\t\t\tvar valueOffset = (me.width * decimal);\n\t\t\t\t\treturn me.left + Math.round(valueOffset);\n\t\t\t\t}\n\n\t\t\t\tvar heightOffset = (me.height * decimal);\n\t\t\t\treturn me.top + Math.round(heightOffset);\n\t\t\t}\n\t\t},\n\t\tgetPixelForTick: function(index) {\n\t\t\treturn this.getPixelForValue(this.tickMoments[index], null, null);\n\t\t},\n\t\tgetValueForPixel: function(pixel) {\n\t\t\tvar me = this;\n\t\t\tvar innerDimension = me.isHorizontal() ? me.width : me.height;\n\t\t\tvar offset = (pixel - (me.isHorizontal() ? me.left : me.top)) / innerDimension;\n\t\t\toffset *= me.scaleSizeInUnits;\n\t\t\treturn me.firstTick.clone().add(moment.duration(offset, me.tickUnit).asSeconds(), 'seconds');\n\t\t},\n\t\tparseTime: function(label) {\n\t\t\tvar me = this;\n\t\t\tif (typeof me.options.time.parser === 'string') {\n\t\t\t\treturn moment(label, me.options.time.parser);\n\t\t\t}\n\t\t\tif (typeof me.options.time.parser === 'function') {\n\t\t\t\treturn me.options.time.parser(label);\n\t\t\t}\n\t\t\t// Date objects\n\t\t\tif (typeof label.getMonth === 'function' || typeof label === 'number') {\n\t\t\t\treturn moment(label);\n\t\t\t}\n\t\t\t// Moment support\n\t\t\tif (label.isValid && label.isValid()) {\n\t\t\t\treturn label;\n\t\t\t}\n\t\t\t// Custom parsing (return an instance of moment)\n\t\t\tif (typeof me.options.time.format !== 'string' && me.options.time.format.call) {\n\t\t\t\tconsole.warn('options.time.format is deprecated and replaced by options.time.parser. See http://nnnick.github.io/Chart.js/docs-v2/#scales-time-scale');\n\t\t\t\treturn me.options.time.format(label);\n\t\t\t}\n\t\t\t// Moment format parsing\n\t\t\treturn moment(label, me.options.time.format);\n\t\t}\n\t});\n\tChart.scaleService.registerScaleType('time', TimeScale, defaultConfig);\n\n};\n\n},{\"1\":1}]},{},[7])(7)\n});","/*\nCopyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.\nFor licensing, see LICENSE.md or http://ckeditor.com/license\n*/\n(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\\\\/])ckeditor\\.js(?:\\?.*|;.*)?$/i,e={timestamp:\"FB99\",version:\"4.5.6 (Standard)\",revision:\"91e81fe\",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:\"unloaded\",basePath:function(){var b=window.CKEDITOR_BASEPATH||\"\";if(!b)for(var c=document.getElementsByTagName(\"script\"),e=0;e<c.length;e++){var f=c[e].src.match(a);if(f){b=f[1];break}}-1==b.indexOf(\":/\")&&\"//\"!=\nb.slice(0,2)&&(b=0===b.indexOf(\"/\")?location.href.match(/^.*?:\\/\\/[^\\/]*/)[0]+b:location.href.match(/^[^\\?]*\\/(?:)/)[0]+b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable \"CKEDITOR_BASEPATH\" before creating editor instances.';return b}(),getUrl:function(a){-1==a.indexOf(\":/\")&&0!==a.indexOf(\"/\")&&(a=this.basePath+a);this.timestamp&&\"/\"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf(\"?\")?\"\\x26\":\"?\")+\"t\\x3d\"+this.timestamp);\nreturn a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener(\"DOMContentLoaded\",a,!1),b()):document.attachEvent&&\"complete\"===document.readyState&&(document.detachEvent(\"onreadystatechange\",a),b())}catch(f){}}function b(){for(var a;a=c.shift();)a()}var c=[];return function(f){function b(){try{document.documentElement.doScroll(\"left\")}catch(g){setTimeout(b,1);return}a()}c.push(f);\"complete\"===document.readyState&&setTimeout(a,1);if(1==c.length)if(document.addEventListener)document.addEventListener(\"DOMContentLoaded\",\na,!1),window.addEventListener(\"load\",a,!1);else if(document.attachEvent){document.attachEvent(\"onreadystatechange\",a);window.attachEvent(\"onload\",a);f=!1;try{f=!window.frameElement}catch(k){}document.documentElement.doScroll&&f&&b()}}}()},b=window.CKEDITOR_GETURL;if(b){var c=e.getUrl;e.getUrl=function(a){return b.call(e,a)||c.call(e,a)}}return e}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var e=CKEDITOR.event.prototype,b;for(b in e)null==a[b]&&(a[b]=e[b])},\nCKEDITOR.event.prototype=function(){function a(a){var d=e(this);return d[a]||(d[a]=new b(a))}var e=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var b=0,e=this.listeners;b<e.length;b++)if(e[b].fn==a)return b;return-1}};return{define:function(b,d){var e=a.call(this,b);CKEDITOR.tools.extend(e,d,!0)},on:function(b,d,e,l,f){function h(a,g,f,h){a={name:b,sender:this,editor:a,\ndata:g,listenerData:l,stop:f,cancel:h,removeListener:k};return!1===d.call(e,a)?!1:a.data}function k(){n.removeListener(b,d)}var g=a.call(this,b);if(0>g.getListenerIndex(d)){g=g.listeners;e||(e=this);isNaN(f)&&(f=10);var n=this;h.fn=d;h.priority=f;for(var q=g.length-1;0<=q;q--)if(g[q].priority<=f)return g.splice(q+1,0,h),{removeListener:k};g.unshift(h)}return{removeListener:k}},once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,\narguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},m=0,l=function(){m=1};return function(f,h,k){var g=e(this)[f];f=a;var n=m;a=m=0;if(g){var q=g.listeners;if(q.length)for(var q=q.slice(0),r,p=0;p<q.length;p++){if(g.errorProof)try{r=q[p].call(this,k,h,b,l)}catch(u){}else r=q[p].call(this,k,h,b,l);!1===r?m=1:\"undefined\"!=typeof r&&(h=r);if(a||m)break}}h=\nm?!1:\"undefined\"==typeof h?!0:h;a=f;m=n;return h}}(),fireOnce:function(a,b,m){b=this.fire(a,b,m);delete e(this)[a];return b},removeListener:function(a,b){var m=e(this)[a];if(m){var l=m.getListenerIndex(b);0<=l&&m.listeners.splice(l,1)}},removeAllListeners:function(){var a=e(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=e(this)[a])&&0<a.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=\nfunction(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),e=a.match(/edge[ \\/](\\d+.?\\d*)/),b=-1<a.indexOf(\"trident/\"),b=!(!e&&!b),b={ie:b,edge:!!e,webkit:!b&&\n-1<a.indexOf(\" applewebkit/\"),air:-1<a.indexOf(\" adobeair/\"),mac:-1<a.indexOf(\"macintosh\"),quirks:\"BackCompat\"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<a.indexOf(\"mobile\"),iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;return a!=b&&a!=\"[\"+b+\"]\"},secure:\"https:\"==location.protocol};b.gecko=\"Gecko\"==navigator.product&&!b.webkit&&!b.ie;b.webkit&&(-1<a.indexOf(\"chrome\")?b.chrome=\n!0:b.safari=!0);var c=0;b.ie&&(c=e?parseFloat(e[1]):b.quirks||!document.documentMode?parseFloat(a.match(/msie (\\d+)/)[1]):document.documentMode,b.ie9Compat=9==c,b.ie8Compat=8==c,b.ie7Compat=7==c,b.ie6Compat=7>c||b.quirks);b.gecko&&(e=a.match(/rv:([\\d\\.]+)/))&&(e=e[1].split(\".\"),c=1E4*e[0]+100*(e[1]||0)+1*(e[2]||0));b.air&&(c=parseFloat(a.match(/ adobeair\\/(\\d+)/)[1]));b.webkit&&(c=parseFloat(a.match(/ applewebkit\\/(\\d+)/)[1]));b.version=c;b.isCompatible=!(b.ie&&7>c)&&!(b.gecko&&4E4>c)&&!(b.webkit&&\n534>c);b.hidpi=2<=window.devicePixelRatio;b.needsBrFiller=b.gecko||b.webkit||b.ie&&10<c;b.needsNbspFiller=b.ie&&11>c;b.cssClass=\"cke_browser_\"+(b.ie?\"ie\":b.gecko?\"gecko\":b.webkit?\"webkit\":\"unknown\");b.quirks&&(b.cssClass+=\" cke_browser_quirks\");b.ie&&(b.cssClass+=\" cke_browser_ie\"+(b.quirks?\"6 cke_browser_iequirks\":b.version));b.air&&(b.cssClass+=\" cke_browser_air\");b.iOS&&(b.cssClass+=\" cke_browser_ios\");b.hidpi&&(b.cssClass+=\" cke_hidpi\");return b}()),\"unloaded\"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);\nCKEDITOR.loadFullCore=function(){if(\"basic_ready\"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement(\"script\");a.type=\"text/javascript\";a.src=CKEDITOR.basePath+\"ckeditor.js\";document.getElementsByTagName(\"head\")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status=\n\"basic_ready\",a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*e))})})();CKEDITOR.status=\"basic_loaded\"}(),\"use strict\",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(a,e){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire(\"log\",{type:\"warn\",errorCode:a,additionalData:e})},CKEDITOR.error=function(a,e){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire(\"log\",\n{type:\"error\",errorCode:a,additionalData:e})},CKEDITOR.on(\"log\",function(a){if(window.console&&window.console.log){var e=console[a.data.type]?a.data.type:\"log\",b=a.data.errorCode;if(a=a.data.additionalData)console[e](\"[CKEDITOR] Error code: \"+b+\".\",a);else console[e](\"[CKEDITOR] Error code: \"+b+\".\");console[e](\"[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-\"+b)}},null,null,999),CKEDITOR.dom={},function(){var a=[],e=CKEDITOR.env.gecko?\"-moz-\":\nCKEDITOR.env.webkit?\"-webkit-\":CKEDITOR.env.ie?\"-ms-\":\"\",b=/&/g,c=/>/g,d=/</g,m=/\"/g,l=/&(lt|gt|amp|quot|nbsp|shy|#\\d{1,5});/g,f={lt:\"\\x3c\",gt:\"\\x3e\",amp:\"\\x26\",quot:'\"',nbsp:\" \",shy:\"Â\"},h=function(a,g){return\"#\"==g[0]?String.fromCharCode(parseInt(g.slice(1),10)):f[g]};CKEDITOR.on(\"reset\",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,g){if(!a&&!g)return!0;if(!a||!g||a.length!=g.length)return!1;for(var b=0;b<a.length;b++)if(a[b]!=g[b])return!1;return!0},getIndex:function(a,g){for(var b=\n0;b<a.length;++b)if(g(a[b]))return b;return-1},clone:function(a){var g;if(a&&a instanceof Array){g=[];for(var b=0;b<a.length;b++)g[b]=CKEDITOR.tools.clone(a[b]);return g}if(null===a||\"object\"!=typeof a||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp||a.nodeType||a.window===a)return a;g=new a.constructor;for(b in a)g[b]=CKEDITOR.tools.clone(a[b]);return g},capitalize:function(a,g){return a.charAt(0).toUpperCase()+(g?a.slice(1):a.slice(1).toLowerCase())},\nextend:function(a){var g=arguments.length,b,f;\"boolean\"==typeof(b=arguments[g-1])?g--:\"boolean\"==typeof(b=arguments[g-2])&&(f=arguments[g-1],g-=2);for(var h=1;h<g;h++){var c=arguments[h],d;for(d in c)if(!0===b||null==a[d])if(!f||d in f)a[d]=c[d]}return a},prototypedCopy:function(a){var g=function(){};g.prototype=a;return new g},copy:function(a){var g={},b;for(b in a)g[b]=a[b];return g},isArray:function(a){return\"[object Array]\"==Object.prototype.toString.call(a)},isEmpty:function(a){for(var g in a)if(a.hasOwnProperty(g))return!1;\nreturn!0},cssVendorPrefix:function(a,g,b){if(b)return e+a+\":\"+g+\";\"+a+\":\"+g;b={};b[a]=g;b[e+a]=g;return b},cssStyleToDomStyle:function(){var a=document.createElement(\"div\").style,g=\"undefined\"!=typeof a.cssFloat?\"cssFloat\":\"undefined\"!=typeof a.styleFloat?\"styleFloat\":\"float\";return function(a){return\"float\"==a?g:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){a=[].concat(a);for(var g,b=[],f=0;f<a.length;f++)if(g=a[f])/@import|[{}]/.test(g)?b.push(\"\\x3cstyle\\x3e\"+\ng+\"\\x3c/style\\x3e\"):b.push('\\x3clink type\\x3d\"text/css\" rel\\x3dstylesheet href\\x3d\"'+g+'\"\\x3e');return b.join(\"\")},htmlEncode:function(a){return void 0===a||null===a?\"\":String(a).replace(b,\"\\x26amp;\").replace(c,\"\\x26gt;\").replace(d,\"\\x26lt;\")},htmlDecode:function(a){return a.replace(l,h)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(m,\"\\x26quot;\")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},transformPlainTextToHtml:function(a,g){var b=g==CKEDITOR.ENTER_BR,\nf=this.htmlEncode(a.replace(/\\r\\n/g,\"\\n\")),f=f.replace(/\\t/g,\"\\x26nbsp;\\x26nbsp; \\x26nbsp;\"),h=g==CKEDITOR.ENTER_P?\"p\":\"div\";if(!b){var c=/\\n{2}/g;if(c.test(f))var d=\"\\x3c\"+h+\"\\x3e\",e=\"\\x3c/\"+h+\"\\x3e\",f=d+f.replace(c,function(){return e+d})+e}f=f.replace(/\\n/g,\"\\x3cbr\\x3e\");b||(f=f.replace(new RegExp(\"\\x3cbr\\x3e(?\\x3d\\x3c/\"+h+\"\\x3e)\"),function(a){return CKEDITOR.tools.repeat(a,2)}));f=f.replace(/^ | $/g,\"\\x26nbsp;\");return f=f.replace(/(>|\\s) /g,function(a,g){return g+\"\\x26nbsp;\"}).replace(/ (?=<)/g,\n\"\\x26nbsp;\")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return\"cke_\"+this.getNextNumber()},getUniqueId:function(){for(var a=\"e\",g=0;8>g;g++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,g){var b=g(a);b.prototype=a.prototype;return b},setTimeout:function(a,g,b,f,h){h||(h=window);b||(b=h);return h.setTimeout(function(){f?a.apply(b,[].concat(f)):a.apply(b)},g||0)},trim:function(){var a=/(?:^[ \\t\\n\\r]+)|(?:[ \\t\\n\\r]+$)/g;\nreturn function(g){return g.replace(a,\"\")}}(),ltrim:function(){var a=/^[ \\t\\n\\r]+/g;return function(g){return g.replace(a,\"\")}}(),rtrim:function(){var a=/[ \\t\\n\\r]+$/g;return function(g){return g.replace(a,\"\")}}(),indexOf:function(a,g){if(\"function\"==typeof g)for(var b=0,f=a.length;b<f;b++){if(g(a[b]))return b}else{if(a.indexOf)return a.indexOf(g);b=0;for(f=a.length;b<f;b++)if(a[b]===g)return b}return-1},search:function(a,g){var b=CKEDITOR.tools.indexOf(a,g);return 0<=b?a[b]:null},bind:function(a,\ng){return function(){return a.apply(g,arguments)}},createClass:function(a){var g=a.$,b=a.base,f=a.privates||a._,h=a.proto;a=a.statics;!g&&(g=function(){b&&this.base.apply(this,arguments)});if(f)var c=g,g=function(){var a=this._||(this._={}),g;for(g in f){var b=f[g];a[g]=\"function\"==typeof b?CKEDITOR.tools.bind(b,this):b}c.apply(this,arguments)};b&&(g.prototype=this.prototypedCopy(b.prototype),g.prototype.constructor=g,g.base=b,g.baseProto=b.prototype,g.prototype.base=function(){this.base=b.prototype.base;\nb.apply(this,arguments);this.base=arguments.callee});h&&this.extend(g.prototype,h,!0);a&&this.extend(g,a,!0);return g},addFunction:function(b,g){return a.push(function(){return b.apply(g||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var g=a[b];return g&&g.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\\d+\\.?\\d*px$/,g;return function(b){g=CKEDITOR.tools.trim(b+\"\")+\"px\";return a.test(g)?g:b||\"\"}}(),convertToPx:function(){var a;\nreturn function(g){a||(a=CKEDITOR.dom.element.createFromHtml('\\x3cdiv style\\x3d\"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;\"\\x3e\\x3c/div\\x3e',CKEDITOR.document),CKEDITOR.document.getBody().append(a));return/%$/.test(g)?g:(a.setStyle(\"width\",g),a.$.clientWidth)}}(),repeat:function(a,g){return Array(g+1).join(a)},tryThese:function(){for(var a,g=0,b=arguments.length;g<b;g++){var f=arguments[g];try{a=f();break}catch(h){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join(\"-\")},\ndefer:function(a){return function(){var g=arguments,b=this;window.setTimeout(function(){a.apply(b,g)},0)}},normalizeCssText:function(a,g){var b=[],f,h=CKEDITOR.tools.parseCssText(a,!0,g);for(f in h)b.push(f+\":\"+h[f]);b.sort();return b.length?b.join(\";\")+\";\":\"\"},convertRgbToHex:function(a){return a.replace(/(?:rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\))/gi,function(a,b,f,h){a=[b,f,h];for(b=0;3>b;b++)a[b]=(\"0\"+parseInt(a[b],10).toString(16)).slice(-2);return\"#\"+a.join(\"\")})},parseCssText:function(a,\ng,b){var f={};b&&(b=new CKEDITOR.dom.element(\"span\"),b.setAttribute(\"style\",a),a=CKEDITOR.tools.convertRgbToHex(b.getAttribute(\"style\")||\"\"));if(!a||\";\"==a)return f;a.replace(/"/g,'\"').replace(/\\s*([^:;\\s]+)\\s*:\\s*([^;]+)\\s*(?=;|$)/g,function(a,b,h){g&&(b=b.toLowerCase(),\"font-family\"==b&&(h=h.toLowerCase().replace(/[\"']/g,\"\").replace(/\\s*,\\s*/g,\",\")),h=CKEDITOR.tools.trim(h));f[b]=h});return f},writeCssText:function(a,g){var b,f=[];for(b in a)f.push(b+\":\"+a[b]);g&&f.sort();return f.join(\"; \")},\nobjectCompare:function(a,g,b){var f;if(!a&&!g)return!0;if(!a||!g)return!1;for(f in a)if(a[f]!=g[f])return!1;if(!b)for(f in g)if(a[f]!=g[f])return!1;return!0},objectKeys:function(a){var g=[],b;for(b in a)g.push(b);return g},convertArrayToObject:function(a,g){var b={};1==arguments.length&&(g=!0);for(var f=0,h=a.length;f<h;++f)b[a[f]]=g;return b},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(g){a=a?a.replace(/.+?(?:\\.|$)/,\"\"):document.domain;if(!a)break;document.domain=\na}return!!a},eventsBuffer:function(a,g,b){function f(){c=(new Date).getTime();h=!1;b?g.call(b):g()}var h,c=0;return{input:function(){if(!h){var g=(new Date).getTime()-c;g<a?h=setTimeout(f,a-g):f()}},reset:function(){h&&clearTimeout(h);h=c=0}}},enableHtml5Elements:function(a,g){for(var b=\"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video\".split(\" \"),f=b.length,h;f--;)h=a.createElement(b[f]),\ng&&a.appendChild(h)},checkIfAnyArrayItemMatches:function(a,g){for(var b=0,f=a.length;b<f;++b)if(a[b].match(g))return!0;return!1},checkIfAnyObjectPropertyMatches:function(a,g){for(var b in a)if(b.match(g))return!0;return!1},transparentImageData:\"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\\x3d\\x3d\",getCookie:function(a){a=a.toLowerCase();for(var g=document.cookie.split(\";\"),b,f,h=0;h<g.length;h++)if(b=g[h].split(\"\\x3d\"),f=decodeURIComponent(CKEDITOR.tools.trim(b[0]).toLowerCase()),\nf===a)return decodeURIComponent(1<b.length?b[1]:\"\");return null},setCookie:function(a,g){document.cookie=encodeURIComponent(a)+\"\\x3d\"+encodeURIComponent(g)+\";path\\x3d/\"},getCsrfToken:function(){var a=CKEDITOR.tools.getCookie(\"ckCsrfToken\");if(!a||40!=a.length){var a=[],g=\"\";if(window.crypto&&window.crypto.getRandomValues)a=new Uint8Array(40),window.crypto.getRandomValues(a);else for(var b=0;40>b;b++)a.push(Math.floor(256*Math.random()));for(b=0;b<a.length;b++)var f=\"abcdefghijklmnopqrstuvwxyz0123456789\".charAt(a[b]%\n36),g=g+(.5<Math.random()?f.toUpperCase():f);a=g;CKEDITOR.tools.setCookie(\"ckCsrfToken\",a)}return a}}}(),CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,e=function(a,g){for(var b=CKEDITOR.tools.clone(a),f=1;f<arguments.length;f++){g=arguments[f];for(var h in g)delete b[h]}return b},b={},c={},d={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,\nul:1},m={command:1,link:1,meta:1,noscript:1,script:1,style:1},l={},f={\"#\":1},h={center:1,dir:1,noframes:1};a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,\"var\":1,video:1,wbr:1},f,{acronym:1,applet:1,basefont:1,\nbig:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,d,b,h);e={a:e(b,{a:1,button:1}),abbr:b,address:c,area:l,article:c,aside:c,audio:a({source:1,track:1},c),b:b,base:l,bdi:b,bdo:b,blockquote:c,body:c,br:l,button:e(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:l,colgroup:{col:1},command:l,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:c,dl:{dt:1,dd:1},dt:c,em:b,embed:l,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,\nh5:b,h6:b,head:a({title:1,base:1},m),header:c,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:l,html:a({head:1,body:1},c,m),i:b,iframe:f,img:l,input:l,ins:b,kbd:b,keygen:l,label:b,legend:b,li:c,link:l,main:c,map:c,mark:b,menu:a({li:1},c),meta:l,meter:e(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:f,output:b,p:b,param:l,pre:b,progress:e(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:f,section:c,select:{optgroup:1,\noption:1},small:b,source:l,span:b,strong:b,style:f,sub:b,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},b),sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:f,tfoot:{tr:1},th:c,thead:{tr:1},time:e(b,{time:1}),title:f,tr:{th:1,td:1},track:l,u:b,ul:{li:1},\"var\":b,video:a({source:1,track:1},c),wbr:l,acronym:b,applet:a({param:1},c),basefont:l,big:b,center:c,dialog:l,dir:{li:1},font:b,isindex:l,noframes:c,strike:b,tt:b};a(e,{$block:a({audio:1,dd:1,dt:1,figcaption:1,\nli:1,video:1},d,h),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,\ncol:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},e.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,\ncite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,\"var\":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,\nrp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return e}(),CKEDITOR.dom.event=function(a){this.$=a},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a+=CKEDITOR.CTRL;this.$.shiftKey&&(a+=CKEDITOR.SHIFT);this.$.altKey&&(a+=CKEDITOR.ALT);return a},preventDefault:function(a){var e=this.$;e.preventDefault?e.preventDefault():e.returnValue=!1;a&&this.stopPropagation()},stopPropagation:function(){var a=\nthis.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},getTarget:function(){var a=this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=\n4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.dom.domObject=function(a){a&&(this.$=a)},CKEDITOR.dom.domObject.prototype=function(){var a=function(a,b){return function(c){\"undefined\"!=typeof CKEDITOR&&a.fire(b,new CKEDITOR.dom.event(c))}};return{getPrivate:function(){var a;(a=this.getCustomData(\"_\"))||this.setCustomData(\"_\",a={});return a},on:function(e){var b=this.getCustomData(\"_cke_nativeListeners\");b||(b={},this.setCustomData(\"_cke_nativeListeners\",\nb));b[e]||(b=b[e]=a(this,e),this.$.addEventListener?this.$.addEventListener(e,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent(\"on\"+e,b));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var b=this.getCustomData(\"_cke_nativeListeners\"),c=b&&b[a];c&&(this.$.removeEventListener?this.$.removeEventListener(a,c,!1):this.$.detachEvent&&this.$.detachEvent(\"on\"+\na,c),delete b[a])}},removeAllListeners:function(){var a=this.getCustomData(\"_cke_nativeListeners\"),b;for(b in a){var c=a[b];this.$.detachEvent?this.$.detachEvent(\"on\"+b,c):this.$.removeEventListener&&this.$.removeEventListener(b,c,!1);delete a[b]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(a){var e={};CKEDITOR.on(\"reset\",function(){e={}});a.equals=function(a){try{return a&&a.$===this.$}catch(c){return!1}};a.setCustomData=function(a,c){var d=this.getUniqueId();(e[d]||(e[d]=\n{}))[a]=c;return this};a.getCustomData=function(a){var c=this.$[\"data-cke-expando\"];return(c=c&&e[c])&&a in c?c[a]:null};a.removeCustomData=function(a){var c=this.$[\"data-cke-expando\"],c=c&&e[c],d,m;c&&(d=c[a],m=a in c,delete c[a]);return m?d:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.$[\"data-cke-expando\"];a&&delete e[a]};a.getUniqueId=function(){return this.$[\"data-cke-expando\"]||(this.$[\"data-cke-expando\"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)}(CKEDITOR.dom.domObject.prototype),\nCKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?\"document\":a.nodeType==CKEDITOR.NODE_ELEMENT?\"element\":a.nodeType==CKEDITOR.NODE_TEXT?\"text\":a.nodeType==CKEDITOR.NODE_COMMENT?\"comment\":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?\"documentFragment\":\"domObject\"](a):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=\n0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,e){a.append(this,e);return a},clone:function(a,e){function b(c){c[\"data-cke-expando\"]&&(c[\"data-cke-expando\"]=!1);if(c.nodeType==CKEDITOR.NODE_ELEMENT||c.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(e||c.nodeType!=CKEDITOR.NODE_ELEMENT||c.removeAttribute(\"id\",!1),a){c=c.childNodes;\nfor(var d=0;d<c.length;d++)b(c[d])}}function c(b){if(b.type==CKEDITOR.NODE_ELEMENT||b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.getName();\":\"==d[0]&&b.renameNode(d.substring(1))}if(a)for(d=0;d<b.getChildCount();d++)c(b.getChild(d))}}var d=this.$.cloneNode(a);b(d);d=new CKEDITOR.dom.node(d);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&c(d);return d},hasPrevious:function(){return!!this.$.previousSibling},\nhasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var e=[],b=this.getDocument().$.documentElement,c=this.$;c&&c!=b;){var d=c.parentNode;d&&e.unshift(this.getIndex.call({$:c},a));c=d}return e},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||\nthis.$.parentNode.ownerDocument)},getIndex:function(a){function e(a,b){var f=b?a.nextSibling:a.previousSibling;return f&&f.nodeType==CKEDITOR.NODE_TEXT?f.nodeValue?f:e(f,b):null}var b=this.$,c=-1,d;if(!this.$.parentNode||a&&b.nodeType==CKEDITOR.NODE_TEXT&&!b.nodeValue&&!e(b)&&!e(b,!0))return-1;do if(!a||b==this.$||b.nodeType!=CKEDITOR.NODE_TEXT||!d&&b.nodeValue)c++,d=b.nodeType==CKEDITOR.NODE_TEXT;while(b=b.previousSibling);return c},getNextSourceNode:function(a,e,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=\n!a&&this.getFirst&&this.getFirst();var d;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getNext()}for(;!a&&(d=(d||this).getParent());){if(b&&!1===b(d,!0))return null;a=d.getNext()}return!a||b&&!1===b(a)?null:e&&e!=a.type?a.getNextSourceNode(!1,e,b):a},getPreviousSourceNode:function(a,e,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getLast&&this.getLast();var d;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getPrevious()}for(;!a&&\n(d=(d||this).getParent());){if(b&&!1===b(d,!0))return null;a=d.getPrevious()}return!a||b&&!1===b(a)?null:e&&a.type!=e?a.getPreviousSourceNode(!1,e,b):a},getPrevious:function(a){var e=this.$,b;do b=(e=e.previousSibling)&&10!=e.nodeType&&new CKEDITOR.dom.node(e);while(b&&a&&!a(b));return b},getNext:function(a){var e=this.$,b;do b=(e=e.nextSibling)&&new CKEDITOR.dom.node(e);while(b&&a&&!a(b));return b},getParent:function(a){var e=this.$.parentNode;return e&&(e.nodeType==CKEDITOR.NODE_ELEMENT||a&&e.nodeType==\nCKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(e):null},getParents:function(a){var e=this,b=[];do b[a?\"push\":\"unshift\"](e);while(e=e.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var e=this.contains?this:this.getParent();do if(e.contains(a))return e;while(e=e.getParent());return null},getPosition:function(a){var e=this.$,b=a.$;if(e.compareDocumentPosition)return e.compareDocumentPosition(b);if(e==b)return CKEDITOR.POSITION_IDENTICAL;\nif(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(e.contains){if(e.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(e))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if(\"sourceIndex\"in e)return 0>e.sourceIndex||0>b.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:e.sourceIndex<b.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}e=this.getAddress();a=a.getAddress();for(var b=Math.min(e.length,a.length),c=0;c<\nb;c++)if(e[c]!=a[c])return e[c]<a[c]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return e.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,e){var b=this.$,c,d;e||(b=b.parentNode);\"function\"==typeof a?(d=!0,c=a):(d=!1,c=function(b){b=\"string\"==typeof b.nodeName?b.nodeName.toLowerCase():\"\";return\"string\"==typeof a?b==a:b in a});for(;b;){if(c(d?new CKEDITOR.dom.node(b):b))return new CKEDITOR.dom.node(b);\ntry{b=b.parentNode}catch(m){b=null}}return null},hasAscendant:function(a,e){var b=this.$;e||(b=b.parentNode);for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==a)return!0;b=b.parentNode}return!1},move:function(a,e){a.append(this.remove(),e)},remove:function(a){var e=this.$,b=e.parentNode;if(b){if(a)for(;a=e.firstChild;)b.insertBefore(e.removeChild(a),e);b.removeChild(e)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&\n(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var e=CKEDITOR.tools.ltrim(a.getText()),b=a.getLength();if(e)e.length<b&&(a.split(b-e.length),this.$.removeChild(this.$.firstChild));else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a=this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var e=CKEDITOR.tools.rtrim(a.getText()),b=a.getLength();if(e)e.length<b&&(a.split(e.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{a.remove();continue}}break}CKEDITOR.env.needsBrFiller&&\n(a=this.$.lastChild)&&1==a.type&&\"br\"==a.nodeName.toLowerCase()&&a.parentNode.removeChild(a)},isReadOnly:function(a){var e=this;this.type!=CKEDITOR.NODE_ELEMENT&&(e=this.getParent());CKEDITOR.env.edge&&e&&e.is(\"textarea\",\"input\")&&(a=!0);if(!a&&e&&\"undefined\"!=typeof e.$.isContentEditable)return!(e.$.isContentEditable||e.data(\"cke-editable\"));for(;e;){if(e.data(\"cke-editable\"))return!1;if(e.hasAttribute(\"contenteditable\"))return\"false\"==e.getAttribute(\"contenteditable\");e=e.getParent()}return!0}}),\nCKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,e=\"CSS1Compat\"==a.compatMode;return{width:(e?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(e?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if(\"pageXOffset\"in a)return{x:a.pageXOffset||\n0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):null}}),CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);\nelse{var e=new CKEDITOR.dom.element(\"link\");e.setAttributes({rel:\"stylesheet\",type:\"text/css\",href:a});this.getHead().append(e)}},appendStyleText:function(a){if(this.$.createStyleSheet){var e=this.$.createStyleSheet(\"\");e.cssText=a}else{var b=new CKEDITOR.dom.element(\"style\",this);b.append(new CKEDITOR.dom.text(a,this));this.getHead().append(b)}return e||b.$.sheet},createElement:function(a,e){var b=new CKEDITOR.dom.element(a,this);e&&(e.attributes&&b.setAttributes(e.attributes),e.styles&&b.setStyles(e.styles));\nreturn b},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(e){return null}return new CKEDITOR.dom.element(a)},getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,e){for(var b=this.$.documentElement,c=0;b&&c<a.length;c++){var d=a[c];if(e)for(var m=-1,l=0;l<b.childNodes.length;l++){var f=b.childNodes[l];if(!0!==e||3!=f.nodeType||\n!f.previousSibling||3!=f.previousSibling.nodeType)if(m++,m==d){b=f;break}}else b=b.childNodes[d]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,e){CKEDITOR.env.ie&&8>=document.documentMode||!e||(a=e+\":\"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName(\"head\")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element(\"head\"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},\ngetDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open(\"text/html\",\"replace\");CKEDITOR.env.ie&&(a=a.replace(/(?:^\\s*<!DOCTYPE[^>]*?>)|^/i,'$\\x26\\n\\x3cscript data-cke-temp\\x3d\"1\"\\x3e('+CKEDITOR.tools.fixDomain+\")();\\x3c/script\\x3e\"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=\nthis.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData(\"html5ShivFrag\");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData(\"html5ShivFrag\",a));return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null}},CKEDITOR.dom.element=function(a,\ne){\"string\"==typeof a&&(a=(e?e.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a=\"string\"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,e){var b=new CKEDITOR.dom.element(\"div\",e);b.setHtml(a);return b.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(a,e,b,c){var d=\ne.getCustomData(\"list_marker_id\")||e.setCustomData(\"list_marker_id\",CKEDITOR.tools.getNextNumber()).getCustomData(\"list_marker_id\"),m=e.getCustomData(\"list_marker_names\")||e.setCustomData(\"list_marker_names\",{}).getCustomData(\"list_marker_names\");a[d]=e;m[b]=1;return e.setCustomData(b,c)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var e in a)CKEDITOR.dom.element.clearMarkers(a,a[e],1)},CKEDITOR.dom.element.clearMarkers=function(a,e,b){var c=e.getCustomData(\"list_marker_names\"),d=e.getCustomData(\"list_marker_id\"),\nm;for(m in c)e.removeCustomData(m);e.removeCustomData(\"list_marker_names\");b&&(e.removeCustomData(\"list_marker_id\"),delete a[d])},function(){function a(a,b){return-1<(\" \"+a+\" \").replace(m,\" \").indexOf(\" \"+b+\" \")}function e(a){var b=!0;a.$.id||(a.$.id=\"cke_tmp_\"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute(\"id\")}}function b(a,b){return\"#\"+a.$.id+\" \"+b.split(/,\\s*/).join(\", #\"+a.$.id+\" \")}function c(a){for(var b=0,c=0,g=l[a].length;c<g;c++)b+=parseInt(this.getComputedStyle(l[a][c])||\n0,10)||0;return b}var d=document.createElement(\"_\").classList,d=\"undefined\"!==typeof d&&null!==String(d.add).match(/\\[Native code\\]/gi),m=/[\\n\\t\\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:d?function(a){this.$.classList.add(a);return this}:function(b){var h=this.$.className;h&&(a(h,b)||(h+=\" \"+b));this.$.className=h||b;return this},removeClass:d?function(a){var b=this.$;b.classList.remove(a);b.className||b.removeAttribute(\"class\");return this}:function(b){var h=\nthis.getAttribute(\"class\");h&&a(h,b)&&((h=h.replace(new RegExp(\"(?:^|\\\\s+)\"+b+\"(?\\x3d\\\\s|$)\"),\"\").replace(/^\\s+/,\"\"))?this.setAttribute(\"class\",h):this.removeAttribute(\"class\"));return this},hasClass:function(b){return a(this.$.className,b)},append:function(a,b){\"string\"==typeof a&&(a=this.getDocument().createElement(a));b?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var b=new CKEDITOR.dom.element(\"div\",this.getDocument());\nb.setHtml(a);b.moveChildren(this)}else this.setHtml(a)},appendText:function(a){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is(\"br\")||(a=this.getDocument().createElement(\"br\"),CKEDITOR.env.gecko&&a.setAttribute(\"type\",\"_moz\"),this.append(a))}},breakParent:function(a,\nb){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(a);var g=c.extractContents(!1,b||!1);c.insertNode(this.remove());g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$):b!=a.$&&b.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(b){}}return function(b){b?CKEDITOR.tools.setTimeout(a,\n100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\\?[^>]*>/g,\"\"):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\\?[^>]*>/,\"\");var a=this.$.ownerDocument.createElement(\"div\");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&\n9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(b);b.innerHTML=a;c.removeChild(b);return a}catch(g){this.$.innerHTML=\"\";b=new CKEDITOR.dom.element(\"body\",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement(\"p\");a.innerHTML=\"x\";a=a.textContent;return function(b){this.$[a?\n\"textContent\":\"innerText\"]=b}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case \"class\":a=\"className\";break;case \"http-equiv\":a=\"httpEquiv\";break;case \"name\":return this.$.name;case \"tabindex\":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),a;case \"checked\":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?\"checked\":null;\ncase \"hspace\":case \"value\":return this.$[a];case \"style\":return this.$.style.cssText;case \"contenteditable\":case \"contentEditable\":return this.$.attributes.getNamedItem(\"contentEditable\").specified?this.$.getAttribute(\"contentEditable\"):null}return this.$.getAttribute(a,2)}:a}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(a){var b=this.getWindow().$.getComputedStyle(this.$,null);return b?\nb.getPropertyValue(a):\"\"}:function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var a=this.$.tabIndex;return 0!==a||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute(\"tabindex\"),10)?a:-1},getText:function(){return this.$.textContent||this.$.innerText||\"\"},getWindow:function(){return this.getDocument().getWindow()},\ngetId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var b=this.$.scopeName;\"HTML\"!=b&&(a=b.toLowerCase()+\":\"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;\n(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if(\"object\"==typeof arguments[0])return!!arguments[0][a];for(var b=0;b<arguments.length;b++)if(arguments[b]==a)return!0;return!1},isEditable:function(a){var b=this.getName();return this.isReadOnly()||\"none\"==this.getComputedStyle(\"display\")||\"hidden\"==this.getComputedStyle(\"visibility\")||CKEDITOR.dtd.$nonEditable[b]||\nCKEDITOR.dtd.$empty[b]||this.is(\"a\")&&(this.data(\"cke-saved-name\")||this.hasAttribute(\"name\"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[b]||CKEDITOR.dtd.span,!(!a||!a[\"#\"])):!0},isIdentical:function(a){var b=this.clone(0,1);a=a.clone(0,1);b.removeAttributes([\"_moz_dirty\",\"data-cke-expando\",\"data-cke-saved-href\",\"data-cke-saved-name\"]);a.removeAttributes([\"_moz_dirty\",\"data-cke-expando\",\"data-cke-saved-href\",\"data-cke-saved-name\"]);if(b.$.isEqualNode)return b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText),\na.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),b.$.isEqualNode(a.$);b=b.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is(\"a\")){var c=this.getParent();c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(b),b=c.getHtml(),c.setHtml(a),a=c.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&\"hidden\"!=this.getComputedStyle(\"visibility\"),b,c;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&\n(c=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(c)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var a=this.getChildren(),b=0,c=a.count();b<c;b++){var g=a.getItem(b);if(g.type!=CKEDITOR.NODE_ELEMENT||!g.data(\"cke-bookmark\"))if(g.type==CKEDITOR.NODE_ELEMENT&&!g.isEmptyInlineRemoveable()||g.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(g.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||\nCKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,b=0;b<a.length;b++){var c=a[b];switch(c.nodeName){case \"class\":if(this.getAttribute(\"class\"))return!0;case \"data-cke-expando\":continue;default:if(c.specified)return!0}}return!1}:function(){var a=this.$.attributes,b=a.length,c={\"data-cke-expando\":1,_moz_dirty:1};return 0<b&&(2<b||!c[a[0].nodeName]||2==b&&!c[a[1].nodeName])},hasAttribute:function(){function a(b){var c=this.$.attributes.getNamedItem(b);if(\"input\"==this.getName())switch(b){case \"class\":return 0<\nthis.$.className.length;case \"checked\":return!!this.$.checked;case \"value\":return b=this.getAttribute(\"type\"),\"checkbox\"==b||\"radio\"==b?\"on\"!=this.$.value:!!this.$.value}return c?c.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(b){return\"name\"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle(\"display\",\"none\")},moveChildren:function(a,b){var c=this.$;a=a.$;if(c!=a){var g;if(b)for(;g=c.lastChild;)a.insertBefore(c.removeChild(g),\na.firstChild);else for(;g=c.firstChild;)a.appendChild(c.removeChild(g))}},mergeSiblings:function(){function a(b,c,g){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var f=[];c.data(\"cke-bookmark\")||c.isEmptyInlineRemoveable();)if(f.push(c),c=g?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var d=g?b.getLast():b.getFirst();f.length;)f.shift().move(b,!g);c.moveChildren(b,!g);c.remove();d&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings()}}}return function(b){if(!1===\nb||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is(\"a\"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:\"\",visibility:\"\"})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,c){\"class\"==b?this.$.className=c:\"style\"==b?this.$.style.cssText=c:\"tabindex\"==b?this.$.tabIndex=c:\"checked\"==b?this.$.checked=c:\"contenteditable\"==b?a.call(this,\n\"contentEditable\",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if(\"src\"==b&&c.match(/^http:\\/\\//))try{a.apply(this,arguments)}catch(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?\nfunction(a){\"class\"==a?a=\"className\":\"tabindex\"==a?a=\"tabIndex\":\"contenteditable\"==a&&(a=\"contentEditable\");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=0;b<a.length;b++)this.removeAttribute(a[b]);else for(b in a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b=this.$.style;if(b.removeProperty||\"border\"!=a&&\"margin\"!=a&&\"padding\"!=a)b.removeProperty?b.removeProperty(a):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),\nthis.$.style.cssText||this.removeAttribute(\"style\");else{var c=[\"top\",\"left\",\"right\",\"bottom\"],g;\"border\"==a&&(g=[\"color\",\"style\",\"width\"]);for(var b=[],d=0;d<c.length;d++)if(g)for(var e=0;e<g.length;e++)b.push([a,c[d],g[e]].join(\"-\"));else b.push([a,c[d]].join(\"-\"));for(a=0;a<b.length;a++)this.removeStyle(b[a])}},setStyle:function(a,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,a[b]);return this},setOpacity:function(a){CKEDITOR.env.ie&&\n9>CKEDITOR.env.version?(a=Math.round(100*a),this.setStyle(\"filter\",100<=a?\"\":\"progid:DXImageTransform.Microsoft.Alpha(opacity\\x3d\"+a+\")\")):this.setStyle(\"opacity\",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix(\"user-select\",\"none\"));if(CKEDITOR.env.ie){this.setAttribute(\"unselectable\",\"on\");for(var a,b=this.getElementsByTag(\"*\"),c=0,g=b.count();c<g;c++)a=b.getItem(c),a.setAttribute(\"unselectable\",\"on\")}},getPositionedAncestor:function(){for(var a=this;\"html\"!=a.getName();){if(\"static\"!=\na.getComputedStyle(\"position\"))return a;a=a.getParent()}return null},getDocumentPosition:function(a){var b=0,c=0,g=this.getDocument(),d=g.getBody(),e=\"BackCompat\"==g.$.compatMode;if(document.documentElement.getBoundingClientRect){var m=this.$.getBoundingClientRect(),l=g.$.documentElement,u=l.clientTop||d.$.clientTop||0,v=l.clientLeft||d.$.clientLeft||0,w=!0;CKEDITOR.env.ie&&(w=g.getDocumentElement().contains(this),g=g.getBody().contains(this),w=e&&g||!e&&w);w&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&\n12<=CKEDITOR.env.version?(b=d.$.scrollLeft||l.scrollLeft,c=d.$.scrollTop||l.scrollTop):(c=e?d.$:l,b=c.scrollLeft,c=c.scrollTop),b=m.left+b-v,c=m.top+c-u)}else for(u=this,v=null;u&&\"body\"!=u.getName()&&\"html\"!=u.getName();){b+=u.$.offsetLeft-u.$.scrollLeft;c+=u.$.offsetTop-u.$.scrollTop;u.equals(this)||(b+=u.$.clientLeft||0,c+=u.$.clientTop||0);for(;v&&!v.equals(u);)b-=v.$.scrollLeft,c-=v.$.scrollTop,v=v.getParent();v=u;u=(m=u.$.offsetParent)?new CKEDITOR.dom.element(m):null}a&&(m=this.getWindow(),\nu=a.getWindow(),!m.equals(u)&&m.$.frameElement&&(a=(new CKEDITOR.dom.element(m.$.frameElement)).getDocumentPosition(a),b+=a.x,c+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||e||(b+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:b,y:c}},scrollIntoView:function(a){var b=this.getParent();if(b){do if((b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is(\"body\")&&this.scrollIntoParent(b,a,1),b.is(\"html\")){var c=\nb.getWindow();try{var g=c.$.frameElement;g&&(b=new CKEDITOR.dom.element(g))}catch(d){}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var g,d,e,m;function l(b,g){/body|html/.test(a.getName())?a.getWindow().$.scrollBy(b,g):(a.$.scrollLeft+=b,a.$.scrollTop+=g)}function u(a,b){var g={x:0,y:0};if(!a.is(w?\"body\":\"html\")){var c=a.$.getBoundingClientRect();g.x=c.left;g.y=c.top}c=a.getWindow();c.equals(b)||(c=u(CKEDITOR.dom.element.get(c.$.frameElement),b),g.x+=c.x,g.y+=c.y);return g}function v(a,\nb){return parseInt(a.getComputedStyle(\"margin-\"+b)||0,10)||0}!a&&(a=this.getWindow());e=a.getDocument();var w=\"BackCompat\"==e.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=w?e.getBody():e.getDocumentElement());e=a.getWindow();d=u(this,e);var z=u(a,e),B=this.$.offsetHeight;g=this.$.offsetWidth;var t=a.$.clientHeight,y=a.$.clientWidth;e=d.x-v(this,\"left\")-z.x||0;m=d.y-v(this,\"top\")-z.y||0;g=d.x+g+v(this,\"right\")-(z.x+y)||0;d=d.y+B+v(this,\"bottom\")-(z.y+t)||0;(0>m||0<d)&&l(0,!0===b?m:!1===b?d:0>\nm?m:d);c&&(0>e||0<g)&&l(0>e?e:g,0)},setState:function(a,b,c){b=b||\"cke\";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+\"_on\");this.removeClass(b+\"_off\");this.removeClass(b+\"_disabled\");c&&this.setAttribute(\"aria-pressed\",!0);c&&this.removeAttribute(\"aria-disabled\");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+\"_disabled\");this.removeClass(b+\"_off\");this.removeClass(b+\"_on\");c&&this.setAttribute(\"aria-disabled\",!0);c&&this.removeAttribute(\"aria-pressed\");break;default:this.addClass(b+\n\"_off\"),this.removeClass(b+\"_on\"),this.removeClass(b+\"_disabled\"),c&&this.removeAttribute(\"aria-pressed\"),c&&this.removeAttribute(\"aria-disabled\")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var c=this.$.attributes;b=b||{};for(var g=0;g<c.length;g++){var d=c[g],e=d.nodeName.toLowerCase(),m;if(!(e in b))if(\"checked\"==e&&(m=this.getAttribute(e)))a.setAttribute(e,\nm);else if(!CKEDITOR.env.ie||this.hasAttribute(e))m=this.getAttribute(e),null===m&&(m=d.nodeValue),a.setAttribute(e,m)}\"\"!==this.$.style.cssText&&(a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument();a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a);this.moveChildren(a);this.getParent(!0)&&this.$.parentNode.replaceChild(a.$,this.$);a.$[\"data-cke-expando\"]=this.$[\"data-cke-expando\"];this.$=a.$;delete this.getName}},getChild:function(){function a(b,\nc){var g=b.childNodes;if(0<=c&&c<g.length)return g[c]}return function(b){var c=this.$;if(b.slice)for(b=b.slice();0<b.length&&c;)c=a(c,b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass(\"cke_enable_context_menu\")}this.on(\"contextmenu\",function(b){b.data.getTarget().getAscendant(a,!0)||b.data.preventDefault()})},getDirection:function(a){return a?\nthis.getComputedStyle(\"direction\")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||\"ltr\":this.getStyle(\"direction\")||this.getAttribute(\"dir\")},data:function(a,b){a=\"data-\"+a;if(void 0===b)return this.getAttribute(a);!1===b?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(){var a=CKEDITOR.instances,b,c;for(b in a)if(c=a[b],c.element.equals(this)&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return c;return null},find:function(a){var c=\ne(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b(this,a)));c();return a},findOne:function(a){var c=e(this);a=this.$.querySelector(b(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var g=a(this);if(!1!==g){c=this.getChildren();for(var d=0;d<c.count();d++)g=c.getItem(d),g.type==CKEDITOR.NODE_ELEMENT?g.forEach(a,b):b&&g.type!=b||a(g)}}});var l={width:[\"border-left-width\",\"border-right-width\",\"padding-left\",\"padding-right\"],height:[\"border-top-width\",\n\"border-bottom-width\",\"padding-top\",\"padding-bottom\"]};CKEDITOR.dom.element.prototype.setSize=function(a,b,d){\"number\"==typeof b&&(!d||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(b-=c.call(this,a)),this.setStyle(a,b+\"px\"))};CKEDITOR.dom.element.prototype.getSize=function(a,b){var d=Math.max(this.$[\"offset\"+CKEDITOR.tools.capitalize(a)],this.$[\"client\"+CKEDITOR.tools.capitalize(a)])||0;b&&(d-=c.call(this,a));return d}}(),CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?\na.$.createDocumentFragment():a},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)},getHtml:function(){var a=new CKEDITOR.dom.element(\"div\");this.clone(1,1).appendTo(a);return a.getHtml().replace(/\\s*data-cke-expando=\".*?\"/g,\"\")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,\nmoveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),function(){function a(a,b){var g=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(g.collapsed)return this.end(),null;g.optimize()}var c,d=g.startContainer;c=g.endContainer;var f=g.startOffset,k=g.endOffset,h,e=this.guard,n=this.type,m=a?\"getPreviousSourceNode\":\"getNextSourceNode\";if(!a&&!this._.guardLTR){var l=c.type==CKEDITOR.NODE_ELEMENT?\nc:c.getParent(),A=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(k):c.getNext();this._.guardLTR=function(a,b){return(!b||!l.equals(a))&&(!A||!a.equals(A))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(g.root))}}if(a&&!this._.guardRTL){var D=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),G=d.type==CKEDITOR.NODE_ELEMENT?f?d.getChild(f-1):null:d.getPrevious();this._.guardRTL=function(a,b){return(!b||!D.equals(a))&&(!G||!a.equals(G))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(g.root))}}var F=a?this._.guardRTL:\nthis._.guardLTR;h=e?function(a,b){return!1===F(a,b)?!1:e(a,b)}:F;this.current?c=this.current[m](!1,n,h):(a?c.type==CKEDITOR.NODE_ELEMENT&&(c=0<k?c.getChild(k-1):!1===h(c,!0)?null:c.getPreviousSourceNode(!0,n,h)):(c=d,c.type==CKEDITOR.NODE_ELEMENT&&((c=c.getChild(f))||(c=!1===h(d,!0)?null:d.getNextSourceNode(!0,n,h)))),c&&!1===h(c)&&(c=null));for(;c&&!this._.end;){this.current=c;if(!this.evaluator||!1!==this.evaluator(c)){if(!b)return c}else if(b&&this.evaluator)return!1;c=c[m](!1,n,h)}this.end();\nreturn this.current=null}function e(b){for(var g,c=null;g=a.call(this,b);)c=g;return c}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return!1!==a.call(this,0,1)},checkBackward:function(){return!1!==a.call(this,1,1)},lastForward:function(){return e.call(this)},lastBackward:function(){return e.call(this,1)},reset:function(){delete this.current;\nthis._={}}}});var b={block:1,\"list-item\":1,table:1,\"table-row-group\":1,\"table-header-group\":1,\"table-footer-group\":1,\"table-row\":1,\"table-column-group\":1,\"table-column\":1,\"table-cell\":1,\"table-caption\":1},c={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return\"none\"!=this.getComputedStyle(\"float\")||this.getComputedStyle(\"position\")in c||!b[this.getComputedStyle(\"display\")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==\nCKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function g(a){return a&&a.getName&&\"span\"==a.getName()&&a.data(\"cke-bookmark\")}return function(c){var d,f;d=c&&c.type!=CKEDITOR.NODE_ELEMENT&&(f=c.getParent())&&g(f);d=a?d:d||g(c);return!!(b^d)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var g;b&&b.type==CKEDITOR.NODE_TEXT&&(g=!CKEDITOR.tools.trim(b.getText())||\nCKEDITOR.env.webkit&&\"​\"==b.getText());return!!(a^g)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces(),g=CKEDITOR.env.webkit?1:0;return function(c){b(c)?c=1:(c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent()),c=c.$.offsetWidth<=g);return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(g){return!!(b^g.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!m(a)&&!l(a)}return function(g){var c=CKEDITOR.env.needsBrFiller?g.is&&g.is(\"br\"):\ng.getText&&d.test(g.getText());c&&(c=g.getParent(),g=g.getNext(b),c=c.isBlockBoundary()&&(!g||g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()));return!!(a^c)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute(\"data-cke-temp\");return!!(a^b)}};var d=/^[\\t\\r\\n ]*(?: |\\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),l=CKEDITOR.dom.walker.bookmark(),f=CKEDITOR.dom.walker.temp(),h=function(a){return l(a)||m(a)||a.type==CKEDITOR.NODE_ELEMENT&&\na.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=function(a){return function(b){b=m(b)||l(b)||f(b);return!!(a^b)}};var k=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(b){for(var g=0,c=b.getChildCount();g<c;++g)if(!k(b.getChild(g)))return!!a;return!a}};var g=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var b={},g;for(g in a)CKEDITOR.dtd[g][\"#\"]&&(b[g]=1);return b}(CKEDITOR.dtd.$block),\n{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(a){return function(b){b=k(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is(\"hr\")||\"false\"==b.getAttribute(\"contenteditable\")||!CKEDITOR.env.needsBrFiller&&b.is(n)&&g(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(h(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is(\"br\"):a.getText&&d.test(a.getText()))?a:!1}}(),\nCKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var e=a instanceof CKEDITOR.dom.document;this.document=e?a:a.getDocument();this.root=e?a.getBody():a},function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function e(a,b,c,d,f){function k(a,b,g,c){var d=g?a.getPrevious():a.getNext();if(c&&m)return d;t||c?b.append(a.clone(!0,f),g):(a.remove(),\nl&&b.append(a));return d}function h(){var a,b,g,c=Math.min(E.length,N.length);for(a=0;a<c;a++)if(b=E[a],g=N[a],!b.equals(g))return a;return a-1}function e(){var b=R-1,c=F&&I&&!y.equals(C);b<P-1||b<T-1||c?(c?a.moveToPosition(C,CKEDITOR.POSITION_BEFORE_START):T==b+1&&G?a.moveToPosition(N[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(N[b+1],CKEDITOR.POSITION_BEFORE_START),d&&(b=E[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(c=CKEDITOR.dom.element.createFromHtml('\\x3cspan data-cke-bookmark\\x3d\"1\" style\\x3d\"display:none\"\\x3e\\x26nbsp;\\x3c/span\\x3e',\na.document),c.insertAfter(b),b.mergeSiblings(!1),a.moveToBookmark({startNode:c}))):a.collapse(!0)}a.optimizeBookmark();var m=0===b,l=1==b,t=2==b;b=t||l;var y=a.startContainer,C=a.endContainer,x=a.startOffset,A=a.endOffset,D,G,F,I,H,K;if(t&&C.type==CKEDITOR.NODE_TEXT&&y.equals(C))y=a.document.createText(y.substring(x,A)),c.append(y);else{C.type==CKEDITOR.NODE_TEXT?t?K=!0:C=C.split(A):0<C.getChildCount()?A>=C.getChildCount()?(C=C.getChild(A-1),G=!0):C=C.getChild(A):I=G=!0;y.type==CKEDITOR.NODE_TEXT?\nt?H=!0:y.split(x):0<y.getChildCount()?0===x?(y=y.getChild(x),D=!0):y=y.getChild(x-1):F=D=!0;for(var E=y.getParents(),N=C.getParents(),R=h(),P=E.length-1,T=N.length-1,O=c,Y,M,W,U=-1,J=R;J<=P;J++){M=E[J];W=M.getNext();for(J!=P||M.equals(N[J])&&P<T?b&&(Y=O.append(M.clone(0,f))):D?k(M,O,!1,F):H&&O.append(a.document.createText(M.substring(x)));W;){if(W.equals(N[J])){U=J;break}W=k(W,O)}O=Y}O=c;for(J=R;J<=T;J++)if(c=N[J],W=c.getPrevious(),c.equals(E[J]))b&&(O=O.getChild(0));else{J!=T||c.equals(E[J])&&T<\nP?b&&(Y=O.append(c.clone(0,f))):G?k(c,O,!1,I):K&&O.append(a.document.createText(c.substring(0,A)));if(J>U)for(;W;)W=k(W,O,!0);O=Y}t||e()}}function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(f){return c(f)||b(f)?!0:d(f)&&!a?a=!0:f.type==CKEDITOR.NODE_TEXT&&(f.hasAscendant(\"pre\")||CKEDITOR.tools.trim(f.getText()).length)||f.type==CKEDITOR.NODE_ELEMENT&&!f.is(m)?!1:!0}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),\nc=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?!0:!a&&l(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function d(a){return function(){var b;return this[a?\"getPreviousNode\":\"getNextNode\"](function(a){!b&&k(a)&&(b=a);return h(a)&&!(l(a)&&a.equals(b))})}}var m={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,\"var\":1},l=CKEDITOR.dom.walker.bogus(),\nf=/^[\\t\\r\\n ]*(?: |\\xa0)$/,h=CKEDITOR.dom.walker.editable(),k=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),\nthis.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,2,b,!1,\"undefined\"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||e(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,1,c,a,\"undefined\"==typeof b?!0:b);return c},createBookmark:function(a){var b,c,d,f,k=this.collapsed;b=this.document.createElement(\"span\");\nb.data(\"cke-bookmark\",1);b.setStyle(\"display\",\"none\");b.setHtml(\"\\x26nbsp;\");a&&(d=\"cke_bm_\"+CKEDITOR.tools.getNextNumber(),b.setAttribute(\"id\",d+(k?\"C\":\"S\")));k||(c=b.clone(),c.setHtml(\"\\x26nbsp;\"),a&&c.setAttribute(\"id\",d+\"E\"),f=this.clone(),f.collapse(),f.insertNode(c));f=this.clone();f.collapse(!0);f.insertNode(b);c?(this.setStartAfter(b),this.setEndBefore(c)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(k?\"C\":\"S\"):b,endNode:a?d+\"E\":c,serializable:a,collapsed:k}},createBookmark2:function(){function a(g){var c=\ng.container,d=g.offset,f;f=c;var k=d;f=f.type!=CKEDITOR.NODE_ELEMENT||0===k||k==f.getChildCount()?0:f.getChild(k-1).type==CKEDITOR.NODE_TEXT&&f.getChild(k).type==CKEDITOR.NODE_TEXT;f&&(c=c.getChild(d-1),d=c.getLength());c.type==CKEDITOR.NODE_ELEMENT&&1<d&&(d=c.getChild(d-1).getIndex(!0)+1);if(c.type==CKEDITOR.NODE_TEXT){f=c;for(k=0;(f=f.getPrevious())&&f.type==CKEDITOR.NODE_TEXT;)k+=f.getLength();f=k;c.getText()?d+=f:(k=c.getPrevious(b),f?(d=f,c=k?k.getNext():c.getParent().getFirst()):(c=c.getParent(),\nd=k?k.getIndex(!0)+1:0))}g.container=c;g.offset=d}var b=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(b){var c=this.collapsed,d={container:this.startContainer,offset:this.startOffset},f={container:this.endContainer,offset:this.endOffset};b&&(a(d),c||a(f));return{start:d.container.getAddress(b),end:c?null:f.container.getAddress(b),startOffset:d.offset,endOffset:f.offset,normalized:b,collapsed:c,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,\na.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(!0)}else b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode,a=c?this.document.getById(a.endNode):a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,f;if(a.type==CKEDITOR.NODE_ELEMENT)if(f=\na.getChildCount(),f>c)a=a.getChild(c);else if(1>f)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(f=b.getChildCount(),f>d)b=b.getChild(d).getPreviousSourceNode(!0);else if(1>f)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=\nthis.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},\noptimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is(\"span\")&&a.data(\"cke-bookmark\")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is(\"span\")&&b.data(\"cke-bookmark\")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,f=this.collapsed;if((!a||f)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var k=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?\nthis.setEnd(k,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(f){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;b||f||!c||c.type!=CKEDITOR.NODE_TEXT||(d?(d>=c.getLength()||c.split(d),d=c.getIndex()+1):d=c.getIndex(),c=c.getParent(),this.setEnd(c,d))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute(\"contenteditable\")?null:a}var d=new RegExp(/[^\\s\\ufeff]/);\nswitch(a){case CKEDITOR.ENLARGE_INLINE:var f=1;case CKEDITOR.ENLARGE_ELEMENT:var k=function(a,b){var c=new CKEDITOR.dom.range(e);c.setStart(a,b);c.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),g;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=c.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;D=g!=a?g.getText():g.substring(b);if(d.test(D))return!1}return!0};if(this.collapsed)break;var h=this.getCommonAncestor(),e=this.root,m,l,t,y,\nC,x=!1,A,D;A=this.startContainer;var G=this.startOffset;A.type==CKEDITOR.NODE_TEXT?(G&&(A=!CKEDITOR.tools.trim(A.substring(0,G)).length&&A,x=!!A),A&&((y=A.getPrevious())||(t=A.getParent()))):(G&&(y=A.getChild(G-1)||A.getLast()),y||(t=A));for(t=c(t);t||y;){if(t&&!y){!C&&t.equals(h)&&(C=!0);if(f?t.isBlockBoundary():!e.contains(t))break;x&&\"inline\"==t.getComputedStyle(\"display\")||(x=!1,C?m=t:this.setStartBefore(t));y=t.getPrevious()}for(;y;)if(A=!1,y.type==CKEDITOR.NODE_COMMENT)y=y.getPrevious();else{if(y.type==\nCKEDITOR.NODE_TEXT)D=y.getText(),d.test(D)&&(y=null),A=/[\\s\\ufeff]$/.test(D);else if((y.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&y.is(\"br\"))&&!y.data(\"cke-bookmark\"))if(x&&CKEDITOR.dtd.$removeEmpty[y.getName()]){D=y.getText();if(d.test(D))y=null;else for(var G=y.$.getElementsByTagName(\"*\"),F=0,I;I=G[F++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){y=null;break}y&&(A=!!D.length)}else y=null;A&&(x?C?m=t:t&&this.setStartBefore(t):x=!0);if(y){A=y.getPrevious();if(!t&&!A){t=y;y=null;break}y=\nA}else t=null}t&&(t=c(t.getParent()))}A=this.endContainer;G=this.endOffset;t=y=null;C=x=!1;A.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(A.substring(G)).length?x=!0:(x=!A.getLength(),G==A.getLength()?(y=A.getNext())||(t=A.getParent()):k(A,G)&&(t=A.getParent())):(y=A.getChild(G))||(t=A);for(;t||y;){if(t&&!y){!C&&t.equals(h)&&(C=!0);if(f?t.isBlockBoundary():!e.contains(t))break;x&&\"inline\"==t.getComputedStyle(\"display\")||(x=!1,C?l=t:t&&this.setEndAfter(t));y=t.getNext()}for(;y;){A=!1;if(y.type==CKEDITOR.NODE_TEXT)D=\ny.getText(),k(y,0)||(y=null),A=/^[\\s\\ufeff]/.test(D);else if(y.type==CKEDITOR.NODE_ELEMENT){if((0<y.$.offsetWidth||b&&y.is(\"br\"))&&!y.data(\"cke-bookmark\"))if(x&&CKEDITOR.dtd.$removeEmpty[y.getName()]){D=y.getText();if(d.test(D))y=null;else for(G=y.$.getElementsByTagName(\"*\"),F=0;I=G[F++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){y=null;break}y&&(A=!!D.length)}else y=null}else A=1;A&&x&&(C?l=t:this.setEndAfter(t));if(y){A=y.getNext();if(!t&&!A){t=y;y=null;break}y=A}else t=null}t&&(t=\nc(t.getParent()))}m&&l&&(h=m.contains(l)?l:m,this.setStartBefore(h),this.setEndAfter(h));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:t=new CKEDITOR.dom.range(this.root);e=this.root;t.setStartAt(e,CKEDITOR.POSITION_AFTER_START);t.setEnd(this.startContainer,this.startOffset);t=new CKEDITOR.dom.walker(t);var H,K,E=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),N=null,R=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&\"false\"==\na.getAttribute(\"contenteditable\"))if(N){if(N.equals(a)){N=null;return}}else N=a;else if(N)return;var b=E(a);b||(H=a);return b},f=function(a){var b=R(a);!b&&a.is&&a.is(\"br\")&&(K=a);return b};t.guard=R;t=t.lastBackward();H=H||e;this.setStartAt(H,!H.is(\"br\")&&(!t&&this.checkStartOfBlock()||t&&H.contains(t))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){t=this.clone();t=new CKEDITOR.dom.walker(t);var P=CKEDITOR.dom.walker.whitespaces(),T=CKEDITOR.dom.walker.bookmark();\nt.evaluator=function(a){return!P(a)&&!T(a)};if((t=t.previous())&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(\"br\"))break}t=this.clone();t.collapse();t.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);t=new CKEDITOR.dom.walker(t);t.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?f:R;H=N=K=null;t=t.lastForward();H=H||e;this.setEndAt(H,!t&&this.checkEndOfBlock()||t&&H.contains(t)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);K&&this.setEndAfter(K)}},shrink:function(a,b,c){if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;\nvar d=this.clone(),f=this.startContainer,k=this.endContainer,h=this.startOffset,e=this.endOffset,m=1,l=1;f&&f.type==CKEDITOR.NODE_TEXT&&(h?h>=f.getLength()?d.setStartAfter(f):(d.setStartBefore(f),m=0):d.setStartBefore(f));k&&k.type==CKEDITOR.NODE_TEXT&&(e?e>=k.getLength()?d.setEndAfter(k):(d.setEndAfter(k),l=0):d.setEndBefore(k));var d=new CKEDITOR.dom.walker(d),t=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};\nvar y;d.guard=function(b,d){if(t(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(y)||!1===c&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute(\"contenteditable\"))return!1;d||b.type!=CKEDITOR.NODE_ELEMENT||(y=b);return!0};m&&(f=d[a==CKEDITOR.SHRINK_ELEMENT?\"lastForward\":\"next\"]())&&this.setStartAt(f,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);l&&(d.reset(),(d=d[a==CKEDITOR.SHRINK_ELEMENT?\"lastBackward\":\n\"previous\"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!m&&!l)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,\na.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=c;this.endContainer||(this._setEndContainer(b),this.endOffset=c);a(this)},setEnd:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);\nthis.endOffset=c;this.startContainer||(this._setStartContainer(b),this.startOffset=c);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==\nCKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;\ncase CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var f=d.getBogus();f&&f.remove();d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),\nf=c.block,k=d.block,h=null;if(!c.blockLimit.equals(d.blockLimit))return null;\"br\"!=a&&(f||(f=this.fixBlock(!0,a),k=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),k||(k=this.fixBlock(!1,a)));c=f&&this.checkStartOfBlock();d=k&&this.checkEndOfBlock();this.deleteContents();f&&f.equals(k)&&(d?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(k,CKEDITOR.POSITION_AFTER_END),k=null):c?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,\nCKEDITOR.POSITION_BEFORE_START),f=null):(k=this.splitElement(f,b||!1),f.is(\"ul\",\"ol\")||f.appendBogus()));return{previousBlock:f,nextBlock:k,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:h}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);c.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(g){return function(a){return b(a)||\nc(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||g.is(\"table\")&&a.is(\"caption\")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),d=this[b?\"endPath\":\"startPath\"](),f=d.block||d.blockLimit,k;f&&!f.equals(d.root)&&!f.getFirst(a(f));)k=f.getParent(),this[b?\"setEndAt\":\"setStartAt\"](f,CKEDITOR.POSITION_AFTER_END),f.remove(1),f=k;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,\nthis.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var d=b==CKEDITOR.START,f=this.clone();f.collapse(d);f[d?\"setStartAt\":\"setEndAt\"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.evaluator=c(d);return f[d?\"checkBackward\":\"checkForward\"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,\nc)),f.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(c)),f.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,\nthis.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);\nc.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if(\"false\"==b.getAttribute(\"contentEditable\")&&!b.data(\"cke-editable\"))return 0;if(b.is(\"html\")||\"true\"==b.getAttribute(\"contentEditable\")&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,\nb?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&f.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is(\"br\")&&this.endContainer&&\nthis.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if(\"false\"==a.getAttribute(\"contenteditable\")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var d=a,h=c,e=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(!1)&&(e=d[b?\"getLast\":\"getFirst\"](k));h||e||(e=d[b?\"getPrevious\":\"getNext\"](k));a=e}return!!c},moveToClosestEditablePosition:function(a,b){var c,d=0,f,k,h=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),\nc.moveToPosition(a,h[b?0:1])):c=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))d=1;else if(f=c[b?\"getNextEditableNode\":\"getPreviousEditableNode\"]())d=1,(k=f.type==CKEDITOR.NODE_ELEMENT)&&f.is(CKEDITOR.dtd.$block)&&\"false\"==f.getAttribute(\"contenteditable\")?(c.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(f,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&k&&f.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(f,0),c.collapse()):c.moveToPosition(f,h[b?1:0]);d&&this.moveToRange(c);\nreturn!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();\na.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:d(),getPreviousEditableNode:d(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml(\"\\x3cspan\\x3e\\x26nbsp;\\x3c/span\\x3e\",this.document),\nb,c,d,f=this.clone();f.optimize();(d=f.startContainer.type==CKEDITOR.NODE_TEXT)?(c=f.startContainer.getText(),b=f.startContainer.split(f.startOffset),a.insertAfter(f.startContainer)):f.insertNode(a);a.scrollIntoView();d&&(f.startContainer.setText(c),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=\n4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,\"use strict\",function(){function a(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function e(a){var b=[];a.forEach(function(a){if(\"true\"==a.getAttribute(\"contenteditable\"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}\nfunction b(a,c,d,f){a:{null==f&&(f=e(d));for(var h;h=f.shift();)if(h.getDtd().p){f={element:h,remaining:f};break a}f=null}if(!f)return 0;if((h=CKEDITOR.filter.instances[f.element.data(\"cke-filter\")])&&!h.check(c))return b(a,c,d,f.remaining);c=new CKEDITOR.dom.range(f.element);c.selectNodeContents(f.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=h;a._.nestedEditable={element:f.element,container:d,remaining:f.remaining,iterator:c};\nreturn 1}function c(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var d=/^[\\r\\n\\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),f=function(a){return m(a)&&l(a)},h={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var g,e,l,r,p;a=a||\"p\";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,g;\nthis.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var u=this.range.clone();e=u.startPath();var v=u.endPath(),w=!u.collapsed&&c(u,e.block),z=!u.collapsed&&c(u,v.block,1);u.shrink(CKEDITOR.SHRINK_ELEMENT,!0);w&&u.setStartAt(e.block,CKEDITOR.POSITION_BEFORE_END);\nz&&u.setEndAt(v.block,CKEDITOR.POSITION_AFTER_START);e=u.endContainer.hasAscendant(\"pre\",!0)||u.startContainer.hasAscendant(\"pre\",!0);u.enlarge(this.forceBrBreak&&!e||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);u.collapsed||(e=new CKEDITOR.dom.walker(u.clone()),v=CKEDITOR.dom.walker.bookmark(!0,!0),e.evaluator=v,this._.nextNode=e.next(),e=new CKEDITOR.dom.walker(u.clone()),e.evaluator=v,e=e.previous(),this._.lastNode=e.getNextSourceNode(!0,null,u.root),this._.lastNode&&\nthis._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(v=this.range.clone(),v.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),v.checkEndOfBlock()&&(v=new CKEDITOR.dom.elementPath(v.endContainer,v.root),this._.lastNode=(v.block||v.blockLimit).getNextSourceNode(!0))),this._.lastNode&&u.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=u.document.createText(\"\"),this._.lastNode.insertAfter(e)),\nu=null);this._.started=1;e=u}v=this._.nextNode;u=this._.lastNode;for(this._.nextNode=null;v;){var w=0,z=v.hasAscendant(\"pre\"),B=v.type!=CKEDITOR.NODE_ELEMENT,t=0;if(B)v.type==CKEDITOR.NODE_TEXT&&d.test(v.getText())&&(B=0);else{var y=v.getName();if(CKEDITOR.dtd.$block[y]&&\"false\"==v.getAttribute(\"contenteditable\")){g=v;b(this,a,g);break}else if(v.isBlockBoundary(this.forceBrBreak&&!z&&{br:1})){if(\"br\"==y)B=1;else if(!e&&!v.getChildCount()&&\"hr\"!=y){g=v;l=v.equals(u);break}e&&(e.setEndAt(v,CKEDITOR.POSITION_BEFORE_START),\n\"br\"!=y&&(this._.nextNode=v));w=1}else{if(v.getFirst()){e||(e=this.range.clone(),e.setStartAt(v,CKEDITOR.POSITION_BEFORE_START));v=v.getFirst();continue}B=1}}B&&!e&&(e=this.range.clone(),e.setStartAt(v,CKEDITOR.POSITION_BEFORE_START));l=(!w||B)&&v.equals(u);if(e&&!w)for(;!v.getNext(f)&&!l;){y=v.getParent();if(y.isBlockBoundary(this.forceBrBreak&&!z&&{br:1})){w=1;B=0;l||y.equals(u);e.setEndAt(y,CKEDITOR.POSITION_BEFORE_END);break}v=y;B=1;l=v.equals(u);t=1}B&&e.setEndAt(v,CKEDITOR.POSITION_AFTER_END);\nv=this._getNextSourceNode(v,t,u);if((l=!v)||w&&e)break}if(!g){if(!e)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(e.startContainer,e.root);v=g.blockLimit;w={div:1,th:1,td:1};g=g.block;!g&&v&&!this.enforceRealBlocks&&w[v.getName()]&&e.checkStartOfBlock()&&e.checkEndOfBlock()&&!v.equals(e.root)?g=v:!g||this.enforceRealBlocks&&g.is(h)?(g=this.range.document.createElement(a),e.extractContents().appendTo(g),g.trim(),e.insertNode(g),r=p=!0):\n\"li\"!=g.getName()?e.checkStartOfBlock()&&e.checkEndOfBlock()||(g=g.clone(!1),e.extractContents().appendTo(g),g.trim(),p=e.splitBlock(),r=!p.wasStartOfBlock,p=!p.wasEndOfBlock,e.insertNode(g)):l||(this._.nextNode=g.equals(u)?null:this._getNextSourceNode(e.getBoundaryNodes().endNode,1,u))}r&&(r=g.getPrevious())&&r.type==CKEDITOR.NODE_ELEMENT&&(\"br\"==r.getName()?r.remove():r.getLast()&&\"br\"==r.getLast().$.nodeName.toLowerCase()&&r.getLast().remove());p&&(r=g.getLast())&&r.type==CKEDITOR.NODE_ELEMENT&&\n\"br\"==r.getName()&&(!CKEDITOR.env.needsBrFiller||r.getPrevious(m)||r.getNext(m))&&r.remove();this._.nextNode||(this._.nextNode=l||g.equals(u)||!u?null:this._getNextSourceNode(g,1,u));return g},_getNextSourceNode:function(a,b,c){function d(a){return!(a.equals(c)||a.equals(f))}var f=this.range.root;for(a=a.getNextSourceNode(b,null,d);!m(a);)a=a.getNextSourceNode(b,null,d);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,e){this.uiItems=\n[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire(\"exec\")?!0:!1!==e.exec.call(this,a,b)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire(\"refresh\",{editor:a,path:b})?!0:e.refresh&&!1!==e.refresh.apply(this,\narguments)};var b;this.checkAllowed=function(c){return c||\"boolean\"!=typeof b?b=a.activeFilter.checkFeature(this):b};CKEDITOR.tools.extend(this,e,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!e.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&\"undefined\"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},\nsetState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire(\"state\");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:\"config.js\",autoUpdateElement:!0,\nlanguage:\"\",defaultLanguage:\"en\",contentsLangDirection:\"\",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:\"\\x3c!DOCTYPE html\\x3e\",bodyId:\"\",bodyClass:\"\",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl(\"contents.css\"),extraPlugins:\"\",removePlugins:\"\",protectedSource:[],tabIndex:0,width:\"\",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,c,d,g){var f,e;a=[];for(f in b){e=b[f];e=\"boolean\"==typeof e?\n{}:\"function\"==typeof e?{match:e}:F(e);\"$\"!=f.charAt(0)&&(e.elements=f);c&&(e.featureName=c.toLowerCase());var k=e;k.elements=l(k.elements,/\\s+/)||null;k.propertiesOnly=k.propertiesOnly||!0===k.elements;var h=/\\s*,\\s*/,m=void 0;for(m in K){k[m]=l(k[m],h)||null;var t=k,y=E[m],u=l(k[E[m]],h),B=k[m],v=[],n=!0,C=void 0;u?n=!1:u={};for(C in B)\"!\"==C.charAt(0)&&(C=C.slice(1),v.push(C),u[C]=!0,n=!1);for(;C=v.pop();)B[C]=B[\"!\"+C],delete B[\"!\"+C];t[y]=(n?!1:u)||null}k.match=k.match||null;d.push(e);a.push(e)}b=\ng.elements;g=g.generic;var p;c=0;for(d=a.length;c<d;++c){f=F(a[c]);e=!0===f.classes||!0===f.styles||!0===f.attributes;k=f;m=y=h=void 0;for(h in K)k[h]=w(k[h]);t=!0;for(m in E){h=E[m];y=k[h];u=[];B=void 0;for(B in y)-1<B.indexOf(\"*\")?u.push(new RegExp(\"^\"+B.replace(/\\*/g,\".*\")+\"$\")):u.push(B);y=u;y.length&&(k[h]=y,t=!1)}k.nothingRequired=t;k.noProperties=!(k.attributes||k.classes||k.styles);if(!0===f.elements||null===f.elements)g[e?\"unshift\":\"push\"](f);else for(p in k=f.elements,delete f.elements,\nk)if(b[p])b[p][e?\"unshift\":\"push\"](f);else b[p]=[f]}}function e(a,c,d,g){if(!a.match||a.match(c))if(g||f(a,c))if(a.propertiesOnly||(d.valid=!0),d.allAttributes||(d.allAttributes=b(a.attributes,c.attributes,d.validAttributes)),d.allStyles||(d.allStyles=b(a.styles,c.styles,d.validStyles)),!d.allClasses){a=a.classes;c=c.classes;g=d.validClasses;if(a)if(!0===a)a=!0;else{for(var e=0,k=c.length,h;e<k;++e)h=c[e],g[h]||(g[h]=a(h));a=!1}else a=!1;d.allClasses=a}}function b(a,b,c){if(!a)return!1;if(!0===a)return!0;\nfor(var d in b)c[d]||(c[d]=a(d));return!1}function c(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=d(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=d(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var g=!1,f=!0===a,e=b.length;e--;)if(f||a(b[e]))b.splice(e,1),g=!0;a=g}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function d(a,b){if(!a)return!1;var c=!1,d=!0===a,g;for(g in b)if(d||a(g))delete b[g],c=!0;return c}function m(a,\nb,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function l(a,b){if(!a)return!1;if(!0===a)return a;if(\"string\"==typeof a)return a=I(a),\"*\"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var c={},d=0,g;for(g in a)c[g]=a[g],d++;return d?c:!1}function f(a,b){if(a.nothingRequired)return!0;var c,d,g,f;if(g=a.requiredClasses)for(f=b.classes,c=0;c<g.length;++c)if(d=g[c],\"string\"==\ntypeof d){if(-1==CKEDITOR.tools.indexOf(f,d))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(f,d))return!1;return h(b.styles,a.requiredStyles)&&h(b.attributes,a.requiredAttributes)}function h(a,b){if(!b)return!0;for(var c=0,d;c<b.length;++c)if(d=b[c],\"string\"==typeof d){if(!(d in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return!1;return!0}function k(a){if(!a)return{};a=a.split(/\\s*,\\s*/).sort();for(var b={};a.length;)b[a.shift()]=\"cke-test\";return b}function g(a){var b,\nc,d,g,f={},e=1;for(a=I(a);b=a.match(N);)(c=b[2])?(d=n(c,\"styles\"),g=n(c,\"attrs\"),c=n(c,\"classes\")):d=g=c=null,f[\"$\"+e++]={elements:b[1],classes:c,styles:d,attributes:g},a=a.slice(b[0].length);return f}function n(a,b){var c=a.match(R[b]);return c?I(c[1]):null}function q(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes[\"class\"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||\"\",1));a.classes||(a.classes=c?c.split(/\\s+/):[])}function r(a,b,d,g){var f=0,k;g.toHtml&&(b.name=b.name.replace(P,\n\"$1\"));if(g.doCallbacks&&a.elementCallbacks){a:{k=a.elementCallbacks;for(var h=0,m=k.length,t;h<m;++h)if(t=k[h](b)){k=t;break a}k=void 0}if(k)return k}if(g.doTransform&&(k=a._.transformations[b.name])){q(b);for(h=0;h<k.length;++h)y(a,b,k[h]);u(b)}if(g.doFilter){a:{h=b.name;m=a._;a=m.allowedRules.elements[h];k=m.allowedRules.generic;h=m.disallowedRules.elements[h];m=m.disallowedRules.generic;t=g.skipRequired;var l={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,\nallStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},E,B;if(a||k){q(b);if(h)for(E=0,B=h.length;E<B;++E)if(!1===c(h[E],b,l)){a=null;break a}if(m)for(E=0,B=m.length;E<B;++E)c(m[E],b,l);if(a)for(E=0,B=a.length;E<B;++E)e(a[E],b,l,t);if(k)for(E=0,B=k.length;E<B;++E)e(k[E],b,l,t);a=l}else a=null}if(!a||!a.valid)return d.push(b),1;B=a.validAttributes;var w=a.validStyles;k=a.validClasses;var h=b.attributes,C=b.styles,m=b.classes;t=b.classBackup;var n=b.styleBackup,p,x,A=[],l=[],z=/^data-cke-/;\nE=!1;delete h.style;delete h[\"class\"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(p in h)B[p]||(z.test(p)?p==(x=p.replace(/^data-cke-saved-/,\"\"))||B[x]||(delete h[p],E=!0):(delete h[p],E=!0));if(!a.allStyles||a.hadInvalidStyle){for(p in C)a.allStyles||w[p]?A.push(p+\":\"+C[p]):E=!0;A.length&&(h.style=A.sort().join(\"; \"))}else n&&(h.style=n);if(!a.allClasses||a.hadInvalidClass){for(p=0;p<m.length;++p)(a.allClasses||k[m[p]])&&l.push(m[p]);l.length&&(h[\"class\"]=l.sort().join(\" \"));\nt&&l.length<t.split(/\\s+/).length&&(E=!0)}else t&&(h[\"class\"]=t);E&&(f=1);if(!g.skipFinalValidation&&!v(b))return d.push(b),1}g.toHtml&&(b.name=b.name.replace(T,\"cke:$1\"));return f}function p(a){var b=[],c;for(c in a)-1<c.indexOf(\"*\")&&b.push(c.replace(/\\*/g,\".*\"));return b.length?new RegExp(\"^(?:\"+b.join(\"|\")+\")$\"):null}function u(a){var b=a.attributes,c;delete b.style;delete b[\"class\"];if(c=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=c;a.classes.length&&(b[\"class\"]=a.classes.sort().join(\" \"))}\nfunction v(a){switch(a.name){case \"a\":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case \"img\":if(!a.attributes.src)return!1}return!0}function w(a){if(!a)return!1;if(!0===a)return!0;var b=p(a);return function(c){return c in a||b&&c.match(b)}}function z(){return new CKEDITOR.htmlParser.element(\"br\")}function B(a){return a.type==CKEDITOR.NODE_ELEMENT&&(\"br\"==a.name||G.$block[a.name])}function t(a,b,c){var d=a.name;if(G.$empty[d]||!a.children.length)\"hr\"==d&&\"br\"==b?a.replaceWith(z()):\n(a.parent&&c.push({check:\"it\",el:a.parent}),a.remove());else if(G.$block[d]||\"tr\"==d)if(\"br\"==b)a.previous&&!B(a.previous)&&(b=z(),b.insertBefore(a)),a.next&&!B(a.next)&&(b=z(),b.insertAfter(a)),a.replaceWithChildren();else{var d=a.children,g;b:{g=G[b];for(var f=0,e=d.length,k;f<e;++f)if(k=d[f],k.type==CKEDITOR.NODE_ELEMENT&&!g[k.name]){g=!1;break b}g=!0}if(g)a.name=b,a.attributes={},c.push({check:\"parent-down\",el:a});else{g=a.parent;for(var f=g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||\"body\"==g.name,\nh,m,e=d.length;0<e;)k=d[--e],f&&(k.type==CKEDITOR.NODE_TEXT||k.type==CKEDITOR.NODE_ELEMENT&&G.$inline[k.name])?(h||(h=new CKEDITOR.htmlParser.element(b),h.insertAfter(a),c.push({check:\"parent-down\",el:h})),h.add(k,0)):(h=null,m=G[g.name]||G.span,k.insertAfter(a),g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||k.type!=CKEDITOR.NODE_ELEMENT||m[k.name]||c.push({check:\"el-up\",el:k}));a.remove()}}else d in{style:1,script:1}?a.remove():(a.parent&&c.push({check:\"it\",el:a.parent}),a.replaceWithChildren())}function y(a,\nb,c){var d,g;for(d=0;d<c.length;++d)if(g=c[d],!(g.check&&!a.check(g.check,!1)||g.left&&!g.left(b))){g.right(b,O);break}}function C(a,b){var c=b.getDefinition(),d=c.attributes,g=c.styles,f,k,e,h;if(a.name!=c.element)return!1;for(f in d)if(\"class\"==f)for(c=d[f].split(/\\s+/),e=a.classes.join(\"|\");h=c.pop();){if(-1==e.indexOf(h))return!1}else if(a.attributes[f]!=d[f])return!1;for(k in g)if(a.styles[k]!=g[k])return!1;return!0}function x(a,b){var c,d;\"string\"==typeof a?c=a:a instanceof CKEDITOR.style?d=\na:(c=a[0],d=a[1]);return[{element:c,left:d,right:function(a,c){c.transform(a,b)}}]}function A(a){return function(b){return C(b,a)}}function D(a){return function(b,c){c[a](b)}}var G=CKEDITOR.dtd,F=CKEDITOR.tools.copy,I=CKEDITOR.tools.trim,H=[\"\",\"p\",\"br\",\"div\"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){this.allowedContent=[];this.disallowedContent=[];this.elementCallbacks=null;this.disabled=!1;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},\ndisallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=!0;var b=a.config.allowedContent;!0===b?this.disabled=!0:(b||(this.customConfig=!1),this.allow(b,\"config\",1),this.allow(a.config.extraAllowedContent,\"extra\",1),this.allow(H[a.enterMode]+\" \"+H[a.shiftEnterMode],\"default\",1),this.disallow(a.config.disallowedContent))}else this.customConfig=!1,this.allow(a,\"default\",1)};\nCKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,c,d){if(!m(this,b,d))return!1;var f,k;if(\"string\"==typeof b)b=g(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),c,d);f=b.getDefinition();b={};d=f.attributes;b[f.element]=f={styles:f.styles,requiredStyles:f.styles&&CKEDITOR.tools.objectKeys(f.styles)};d&&(d=F(d),f.classes=d[\"class\"]?d[\"class\"].split(/\\s+/):null,f.requiredClasses=f.classes,delete d[\"class\"],\nf.attributes=d,f.requiredAttributes=d&&CKEDITOR.tools.objectKeys(d))}else if(CKEDITOR.tools.isArray(b)){for(f=0;f<b.length;++f)k=this.allow(b[f],c,d);return k}a(this,b,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,d){if(this.disabled)return!1;var g=this,f=[],k=this.editor&&this.editor.config.protectedSource,e,h=!1,m={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if(\"off\"==a.attributes[\"data-cke-filter\"])return!1;\nif(!b||\"span\"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join(\"|\").indexOf(\"data-cke-\"))if(e=r(g,a,f,m),e&1)h=!0;else if(e&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\\{cke_protected\\}(?!\\{C\\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\\{cke_protected\\}/,\"\"));c=[];var t,l,E;if(k)for(l=0;l<k.length;++l)if((E=d.match(k[l]))&&E[0].length==d.length){c=!0;break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(t=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&\nr(g,t,c,m);c=!c.length}c||f.push(a)}},null,!0);f.length&&(h=!0);var l;a=[];d=H[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var E;c=f.pop();)c.type==CKEDITOR.NODE_ELEMENT?t(c,d,a):c.remove();for(;l=a.pop();)if(c=l.el,c.parent)switch(E=G[c.parent.name]||G.span,l.check){case \"it\":G.$removeEmpty[c.name]&&!c.children.length?t(c,d,a):v(c)||t(c,d,a);break;case \"el-up\":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||E[c.name]||t(c,d,a);break;case \"parent-down\":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||\nE[c.name]||t(c.parent,d,a)}return h},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!m(this,b,!0))return!1;\"string\"==typeof b&&(b=g(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,c,d=[],g;for(b=0;b<a.length&&!g;++b)c=a[b],(\"string\"==typeof c||c instanceof\nCKEDITOR.style)&&this.check(c)&&(g=c);if(g){for(b=0;b<a.length;++b)d.push(x(a[b],g));this.addTransformations(d)}}},addElementCallback:function(a){this.elementCallbacks||(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?\nthis.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,g;for(g=0;g<a.length;++g){b=a[g];var f=void 0,k=void 0,e=void 0,h=void 0,m=void 0,t=void 0;c=[];for(k=0;k<b.length;++k)e=b[k],\"string\"==typeof e?(e=e.split(/\\s*:\\s*/),h=e[0],m=null,t=e[1]):(h=e.check,m=e.left,t=e.right),f||(f=e,f=f.element?f.element:h?h.match(/^([a-z0-9]+)/i)[0]:f.left.getDefinition().element),m instanceof CKEDITOR.style&&(m=A(m)),c.push({check:h==f?null:h,left:m,\nright:\"string\"==typeof t?D(t):t});b=f;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,b,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,c))return!0;return!1}var f,e;if(\"string\"==typeof a){e=a+\"\\x3c\"+(!1===b?\"0\":\"1\")+(c?\"1\":\"0\")+\"\\x3e\";if(e in this._.cachedChecks)return this._.cachedChecks[e];d=g(a).$1;f=d.styles;var h=d.classes;d.name=d.elements;d.classes=h=h?h.split(/\\s*,\\s*/):[];d.styles=k(f);d.attributes=k(d.attributes);d.children=[];h.length&&\n(d.attributes[\"class\"]=h.join(\" \"));f&&(d.attributes.style=CKEDITOR.tools.writeCssText(d.styles));f=d}else d=a.getDefinition(),f=d.styles,h=d.attributes||{},f?(f=F(f),h.style=CKEDITOR.tools.writeCssText(f,!0)):f={},f={name:d.element,attributes:h,classes:h[\"class\"]?h[\"class\"].split(/\\s+/):[],styles:f,children:[]};var h=CKEDITOR.tools.clone(f),m=[],t;if(!1!==b&&(t=this._.transformations[f.name])){for(d=0;d<t.length;++d)y(this,f,t[d]);u(f)}r(this,h,m,{doFilter:!0,doTransform:!1!==b,skipRequired:!c,skipFinalValidation:!c});\nb=0<m.length?!1:CKEDITOR.tools.objectCompare(f.attributes,h.attributes,!0)?!0:!1;\"string\"==typeof a&&(this._.cachedChecks[e]=b);return b},getAllowedEnterMode:function(){var a=[\"p\",\"div\",\"br\"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var f=a.slice(),g;if(this.check(H[c]))return c;for(d||(f=f.reverse());g=f.pop();)if(this.check(g))return b[g];return CKEDITOR.ENTER_BR}}(),destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;\ndelete this.disallowedContent}};var K={styles:1,attributes:1,classes:1},E={styles:\"requiredStyles\",attributes:\"requiredAttributes\",classes:\"requiredClasses\"},N=/^([a-z0-9\\-*\\s]+)((?:\\s*\\{[!\\w\\-,\\s\\*]+\\}\\s*|\\s*\\[[!\\w\\-,\\s\\*]+\\]\\s*|\\s*\\([!\\w\\-,\\s\\*]+\\)\\s*){0,3})(?:;\\s*|$)/i,R={styles:/{([^}]+)}/,attrs:/\\[([^\\]]+)\\]/,classes:/\\(([^\\)]+)\\)/},P=/^cke:(object|embed|param)$/,T=/^(object|embed|param)$/,O=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,\"width\");this.lengthToStyle(a,\n\"height\")},sizeToAttribute:function(a){this.lengthToAttribute(a,\"width\");this.lengthToAttribute(a,\"height\")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];d&&(/^\\d+$/.test(d)&&(d+=\"px\"),a.styles[c]=d)}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],f=d&&d.match(/^(\\d+)(?:\\.\\d*)?px$/);f?a.attributes[c]=f[1]:\"cke-test\"==d&&(a.attributes[c]=\"cke-test\")}delete a.styles[b]},alignmentToStyle:function(a){if(!(\"float\"in\na.styles)){var b=a.attributes.align;if(\"left\"==b||\"right\"==b)a.styles[\"float\"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!(\"align\"in a.attributes)){var b=a.styles[\"float\"];if(\"left\"==b||\"right\"==b)a.attributes.align=b}delete a.styles[\"float\"]},matchesStyle:C,transform:function(a,b){if(\"string\"==typeof b)a.name=b;else{var c=b.getDefinition(),d=c.styles,f=c.attributes,g,h,k,e;a.name=c.element;for(g in f)if(\"class\"==g)for(c=a.classes.join(\"|\"),k=f[g].split(/\\s+/);e=k.pop();)-1==\nc.indexOf(e)&&a.classes.push(e);else a.attributes[g]=f[g];for(h in d)a.styles[h]=d[h]}}}}(),function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);a&&(this.currentActive=a);this.hasFocus||this._.locked||((a=CKEDITOR.currentInstance)&&a.focusManager.blur(1),this.hasFocus=\n!0,(a=this._.editor.container)&&a.addClass(\"cke_focus\"),this._.editor.fire(\"focus\"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function e(){if(this.hasFocus){this.hasFocus=!1;var a=this._.editor.container;a&&a.removeClass(\"cke_focus\");this._.editor.fire(\"blur\")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?e.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;\ne.call(this)},b,this)}},add:function(a,e){var b=a.getCustomData(\"focusmanager\");if(!b||b!=this){b&&b.remove(a);var b=\"focus\",c=\"blur\";e&&(CKEDITOR.env.ie?(b=\"focusin\",c=\"focusout\"):CKEDITOR.event.useCapture=1);var d={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,d.focus,this);a.on(c,d.blur,this);e&&(CKEDITOR.event.useCapture=0);a.setCustomData(\"focusmanager\",this);a.setCustomData(\"focusmanager_handlers\",d)}},remove:function(a){a.removeCustomData(\"focusmanager\");\nvar e=a.removeCustomData(\"focusmanager_handlers\");a.removeListener(\"blur\",e.blur);a.removeListener(\"focus\",e.focus)}}}(),CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this},function(){var a,e=function(b){b=b.data;var d=b.getKeystroke(),e=this.keystrokes[d],l=this._.editor;a=!1===l.fire(\"key\",{keyCode:d,domEvent:b});a||(e&&(a=!1!==l.execCommand(e,{from:\"keystrokeHandler\"})),a||(a=!!this.blockedKeystrokes[d]));\na&&b.preventDefault(!0);return!a},b=function(b){a&&(a=!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on(\"keydown\",e,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on(\"keypress\",b,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,\"en-au\":1,\"en-ca\":1,\"en-gb\":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,\"fr-ca\":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,\nnb:1,nl:1,no:1,pl:1,\"pt-br\":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,\"sr-latn\":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,\"zh-cn\":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,e,b){a&&CKEDITOR.lang.languages[a]||(a=this.detect(e,a));var c=this;e=function(){c[a].dir=c.rtl[a]?\"rtl\":\"ltr\";b(a,c[a])};this[a]?e():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(\"lang/\"+a+\".js\"),e,this)},detect:function(a,e){var b=this.languages;e=e||navigator.userLanguage||navigator.language||a;var c=e.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),\nd=c[1],c=c[2];b[d+\"-\"+c]?d=d+\"-\"+c:b[d]||(d=null);CKEDITOR.lang.detect=d?function(){return d}:function(a){return a};return d||a}}}(),CKEDITOR.scriptLoader=function(){var a={},e={};return{load:function(b,c,d,m){var l=\"string\"==typeof b;l&&(b=[b]);d||(d=CKEDITOR);var f=b.length,h=[],k=[],g=function(a){c&&(l?c.call(d,a):c.call(d,h,k))};if(0===f)g(!0);else{var n=function(a,b){(b?h:k).push(a);0>=--f&&(m&&CKEDITOR.document.getDocumentElement().removeStyle(\"cursor\"),g(b))},q=function(b,c){a[b]=1;var d=e[b];\ndelete e[b];for(var f=0;f<d.length;f++)d[f](b,c)},r=function(b){if(a[b])n(b,!0);else{var d=e[b]||(e[b]=[]);d.push(n);if(!(1<d.length)){var f=new CKEDITOR.dom.element(\"script\");f.setAttributes({type:\"text/javascript\",src:b});c&&(CKEDITOR.env.ie&&11>CKEDITOR.env.version?f.$.onreadystatechange=function(){if(\"loaded\"==f.$.readyState||\"complete\"==f.$.readyState)f.$.onreadystatechange=null,q(b,!0)}:(f.$.onload=function(){setTimeout(function(){q(b,!0)},0)},f.$.onerror=function(){q(b,!1)}));f.appendTo(CKEDITOR.document.getHead())}}};\nm&&CKEDITOR.document.getDocumentElement().setStyle(\"cursor\",\"wait\");for(var p=0;p<f;p++)r(b[p])}},queue:function(){function a(){var b;(b=c[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var c=[];return function(d,e){var l=this;c.push({scriptUrl:d,callback:function(){e&&e.apply(this,arguments);c.shift();a.call(l)}});1==c.length&&a.call(this)}}()}}(),CKEDITOR.resourceManager=function(a,e){this.basePath=a;this.fileName=e;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},\nCKEDITOR.resourceManager.prototype={add:function(a,e){if(this.registered[a])throw Error('[CKEDITOR.resourceManager.add] The resource name \"'+a+'\" is already registered.');var b=this.registered[a]=e||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+\"Ready\",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var e=this.externals[a];return CKEDITOR.getUrl(e&&e.dir||this.basePath+a+\"/\")},getFilePath:function(a){var e=this.externals[a];\nreturn CKEDITOR.getUrl(this.getPath(a)+(e?e.file:this.fileName+\".js\"))},addExternal:function(a,e,b){a=a.split(\",\");for(var c=0;c<a.length;c++){var d=a[c];b||(e=e.replace(/[^\\/]+$/,function(a){b=a;return\"\"}));this.externals[d]={dir:e,file:b||this.fileName+\".js\"}}},load:function(a,e,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var c=this.loaded,d=this.registered,m=[],l={},f={},h=0;h<a.length;h++){var k=a[h];if(k)if(c[k]||d[k])f[k]=this.get(k);else{var g=this.getFilePath(k);m.push(g);g in l||(l[g]=\n[]);l[g].push(k)}}CKEDITOR.scriptLoader.load(m,function(a,d){if(d.length)throw Error('[CKEDITOR.resourceManager.load] Resource name \"'+l[d[0]].join(\",\")+'\" was not found at \"'+d[0]+'\".');for(var g=0;g<a.length;g++)for(var h=l[a[g]],k=0;k<h.length;k++){var m=h[k];f[m]=this.get(m);c[m]=1}e.call(b,f)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager(\"plugins/\",\"plugin\"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var e={};return function(b,c,d){var m={},l=function(b){a.call(this,\nb,function(a){CKEDITOR.tools.extend(m,a);var b=[],f;for(f in a){var n=a[f],q=n&&n.requires;if(!e[f]){if(n.icons)for(var r=n.icons.split(\",\"),p=r.length;p--;)CKEDITOR.skin.addIcon(r[p],n.path+\"icons/\"+(CKEDITOR.env.hidpi&&n.hidpi?\"hidpi/\":\"\")+r[p]+\".png\");e[f]=1}if(q)for(q.split&&(q=q.split(\",\")),n=0;n<q.length;n++)m[q[n]]||b.push(q[n])}if(b.length)l.call(this,b);else{for(f in m)n=m[f],n.onLoad&&!n.onLoad._called&&(!1===n.onLoad()&&delete m[f],n.onLoad._called=1);c&&c.call(d||window,m)}},this)};l.call(this,\nb)}}),CKEDITOR.plugins.setLang=function(a,e,b){var c=this.get(a);a=c.langEntries||(c.langEntries={});c=c.lang||(c.lang=[]);c.split&&(c=c.split(\",\"));-1==CKEDITOR.tools.indexOf(c,e)&&c.push(e);a[e]=b},CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(a,e,b){b.name=a.toLowerCase();var c=this.items[a]={type:e,command:b.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(c,\nb)},get:function(a){return this.instances[a]},create:function(a){var e=this.items[a],b=e&&this._.handlers[e.type],c=e&&e.command&&this.editor.getCommand(e.command),b=b&&b.create.apply(this,e.args);this.instances[a]=b;c&&c.uiItems.push(b);b&&!b.type&&(b.type=e.type);return b},addHandler:function(a,e){this._.handlers[a]=e},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+\"_\"+a}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function a(a,\nd,g){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==d){if(!(d instanceof CKEDITOR.dom.element))throw Error(\"Expect element of type CKEDITOR.dom.element.\");if(!g)throw Error(\"One of the element modes must be specified.\");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g==CKEDITOR.ELEMENT_MODE_INLINE)throw Error(\"Inline element mode is not supported on IE quirks.\");if(!b(d,g))throw Error('The specified element mode is not supported on element: \"'+d.getName()+'\".');this.element=d;this.elementMode=\ng;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(d.getId()||d.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||e();this.id=CKEDITOR.tools.getNextId();this.status=\"unloaded\";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on(\"readOnly\",c);this.on(\"selectionChange\",\nfunction(a){m(this,a.data.path)});this.on(\"activeFilterChange\",function(){m(this,this.elementPath(),!0)});this.on(\"mode\",c);this.on(\"instanceReady\",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire(\"instanceCreated\",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){\"destroyed\"!==this.status?f(this,a):CKEDITOR.warn(\"editor-incorrect-destroy\")},0,this)}function e(){do var a=\"editor\"+ ++r;while(CKEDITOR.instances[a]);return a}function b(a,b){return b==CKEDITOR.ELEMENT_MODE_INLINE?\na.is(CKEDITOR.dtd.$editable)||a.is(\"textarea\"):b==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function c(){var a=this.commands,b;for(b in a)d(this,a[b])}function d(a,b){b[b.startDisabled?\"disable\":a.readOnly&&!b.readOnly?\"disable\":b.modes[a.mode]?\"enable\":\"disable\"]()}function m(a,b,c){if(b){var d,f,g=a.commands;for(f in g)d=g[f],(c||d.contextSensitive)&&d.refresh(a,b)}}function l(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),c=p[b]||(p[b]={});c.fn?\n(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&l(a)||a.fireOnce(\"customConfigLoaded\")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};l(a)});return!0}function f(a,b){a.on(\"customConfigLoaded\",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}c=a.config;a.readOnly=c.readOnly?!0:a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is(\"textarea\")?a.element.hasAttribute(\"disabled\")||\na.element.hasAttribute(\"readonly\"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.element.hasAttribute(\"disabled\")||a.element.hasAttribute(\"readonly\"):!1;a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is(\"textarea\")||CKEDITOR.dtd[a.element.getName()].p):!1;a.tabIndex=c.tabIndex||a.element&&a.element.getAttribute(\"tabindex\")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:c.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:\nc.shiftEnterMode;c.skin&&(CKEDITOR.skinName=c.skin);a.fireOnce(\"configLoaded\");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);h(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);l(a)||a.fireOnce(\"customConfigLoaded\")}function h(a){CKEDITOR.skin.loadPart(\"editor\",function(){k(a)})}function k(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);\na.title=\"string\"==typeof d||!1===d?d:[a.lang.editor,a.name].join(\", \");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire(\"langLoaded\");g(a)})}function g(a){a.getStylesSet(function(b){a.once(\"loaded\",function(){a.fire(\"stylesSet\",{styles:b})},null,null,1);n(a)})}function n(a){var b=a.config,c=b.plugins,d=b.extraPlugins,f=b.removePlugins;if(d)var g=new RegExp(\"(?:^|,)(?:\"+d.replace(/\\s*,\\s*/g,\"|\")+\n\")(?\\x3d,|$)\",\"g\"),c=c.replace(g,\"\"),c=c+(\",\"+d);if(f)var e=new RegExp(\"(?:^|,)(?:\"+f.replace(/\\s*,\\s*/g,\"|\")+\")(?\\x3d,|$)\",\"g\"),c=c.replace(e,\"\");CKEDITOR.env.air&&(c+=\",adobeair\");CKEDITOR.plugins.load(c.split(\",\"),function(c){var d=[],f=[],g=[];a.plugins=c;for(var h in c){var k=c[h],m=k.lang,t=null,l=k.requires,E;CKEDITOR.tools.isArray(l)&&(l=l.join(\",\"));if(l&&(E=l.match(e)))for(;l=E.pop();)CKEDITOR.error(\"editor-plugin-required\",{plugin:l.replace(\",\",\"\"),requiredBy:h});m&&!a.lang[h]&&(m.split&&\n(m=m.split(\",\")),0<=CKEDITOR.tools.indexOf(m,a.langCode)?t=a.langCode:(t=a.langCode.replace(/-.*/,\"\"),t=t!=a.langCode&&0<=CKEDITOR.tools.indexOf(m,t)?t:0<=CKEDITOR.tools.indexOf(m,\"en\")?\"en\":m[0]),k.langEntries&&k.langEntries[t]?(a.lang[h]=k.langEntries[t],t=null):g.push(CKEDITOR.getUrl(k.path+\"lang/\"+t+\".js\")));f.push(t);d.push(k)}CKEDITOR.scriptLoader.load(g,function(){for(var c=[\"beforeInit\",\"init\",\"afterInit\"],g=0;g<c.length;g++)for(var e=0;e<d.length;e++){var k=d[e];0===g&&f[e]&&k.lang&&k.langEntries&&\n(a.lang[k.name]=k.langEntries[f[e]]);if(k[c[g]])k[c[g]](a)}a.fireOnce(\"pluginsLoaded\");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(e=0;e<a.config.blockedKeystrokes.length;e++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[e]]=1;a.status=\"loaded\";a.fireOnce(\"loaded\");CKEDITOR.fire(\"instanceLoaded\",null,a)})})}function q(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));\na.is(\"textarea\")?a.setValue(b):a.setHtml(b);return!0}return!1}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var r=0,p={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){b.name=a.toLowerCase();var c=new CKEDITOR.command(this,b);this.mode&&d(this,c);return this.commands[a]=c},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!d.getValue()&&!1===c.fire(\"required\")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&a.apply)}var c=this,d=\nc.element,f=new CKEDITOR.dom.element(d.$.form);d.is(\"textarea\")&&f&&(f.on(\"submit\",a),b(f.$.submit)&&(f.$.submit=CKEDITOR.tools.override(f.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}})),c.on(\"destroy\",function(){f.removeListener(\"submit\",a)}))},destroy:function(a){this.fire(\"beforeDestroy\");!a&&q.call(this);this.editable(null);this.filter&&(this.filter.destroy(),delete this.filter);delete this.activeFilter;this.status=\"destroyed\";this.fire(\"destroy\");this.removeAllListeners();\nCKEDITOR.remove(this);CKEDITOR.fire(\"instanceDestroyed\",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),d={name:a,commandData:b,command:c};return c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire(\"beforeCommandExec\",d)&&(d.returnValue=c.exec(d.commandData),\n!c.async&&!1!==this.fire(\"afterCommandExec\",d))?d.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire(\"beforeGetData\");var b=this._.data;\"string\"!=typeof b&&(b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is(\"textarea\")?b.getValue():b.getHtml():\"\");b={dataValue:b};!a&&this.fire(\"getData\",b);return b.dataValue},getSnapshot:function(){var a=this.fire(\"getSnapshot\");\"string\"!=typeof a&&(a=(a=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?\na.is(\"textarea\")?a.getValue():a.getHtml():\"\");return a},loadSnapshot:function(a){this.fire(\"loadSnapshot\",a)},setData:function(a,b,c){var d=!0,f=b;b&&\"object\"==typeof b&&(c=b.internal,f=b.callback,d=!b.noSnapshot);!c&&d&&this.fire(\"saveSnapshot\");if(f||!c)this.once(\"dataReady\",function(a){!c&&d&&this.fire(\"saveSnapshot\");f&&f.call(a.editor)});a={dataValue:a};!c&&this.fire(\"setData\",a);this._.data=a.dataValue;!c&&this.fire(\"afterSetData\",a)},setReadOnly:function(a){a=null==a||a;this.readOnly!=a&&(this.readOnly=\na,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire(\"readOnly\"))},insertHtml:function(a,b,c){this.fire(\"insertHtml\",{dataValue:a,mode:b,range:c})},insertText:function(a){this.fire(\"insertText\",a)},insertElement:function(a){this.fire(\"insertElement\",a)},getSelectedHtml:function(a){var b=this.editable(),c=this.getSelection(),c=c&&c.getRanges();if(!b||!c||0===c.length)return null;b=b.getHtmlFromRange(c[0]);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var c=\nthis.editable(),d=this.getSelection().getRanges();if(!c||0===d.length)return null;d=d[0];c=c.extractHtmlFromRange(d,b);b||this.getSelection().selectRanges([d]);return a?c.getHtml():c},focus:function(){this.fire(\"beforeFocus\")},checkDirty:function(){return\"ready\"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return q.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?\narguments[0]:[[].slice.call(arguments,0)],c,d,f=b.length;f--;)c=b[f],d=0,CKEDITOR.tools.isArray(c)&&(d=c[1],c=c[0]),d?a[c]=d:delete a[c]},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){a||(a=this.filter);this.activeFilter!==a&&(this.activeFilter=a,this.fire(\"activeFilterChange\"),a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,\nb){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode=a,this.activeShiftEnterMode=b,this.fire(\"activeEnterModeChange\")},showNotification:function(a){alert(a)}})}(),CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)--\\x3e)|(?:([^\\/\\s>]+)((?:\\s+[\\w\\-:.]+(?:\\s*=\\s*?(?:(?:\"[^\"]*\")|(?:'[^']*')|[^\\s\"'\\/>]+))?)*)[\\S\\s]*?(\\/?)>))/g}},\nfunction(){var a=/([\\w\\-:.]+)(?:(?:\\s*=\\s*(?:(?:\"([^\"]*)\")|(?:'([^']*)')|([^\\s>]+)))|(?=\\s|$))/g,e={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var c,d,m=0,l;c=this._.htmlPartsRegex.exec(b);){d=c.index;if(d>m)if(m=b.substring(m,d),l)l.push(m);else this.onText(m);\nm=this._.htmlPartsRegex.lastIndex;if(d=c[1])if(d=d.toLowerCase(),l&&CKEDITOR.dtd.$cdata[d]&&(this.onCDATA(l.join(\"\")),l=null),!l){this.onTagClose(d);continue}if(l)l.push(c[0]);else if(d=c[3]){if(d=d.toLowerCase(),!/=\"/.test(d)){var f={},h,k=c[4];c=!!c[5];if(k)for(;h=a.exec(k);){var g=h[1].toLowerCase();h=h[2]||h[3]||h[4]||\"\";f[g]=!h&&e[g]?g:CKEDITOR.tools.htmlDecodeAttr(h)}this.onTagOpen(d,f,c);!l&&CKEDITOR.dtd.$cdata[d]&&(l=[])}}else if(d=c[2])this.onComment(d)}if(b.length>m)this.onText(b.substring(m,\nb.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push(\"\\x3c\",a)},openTagClose:function(a,e){e?this._.output.push(\" /\\x3e\"):this._.output.push(\"\\x3e\")},attribute:function(a,e){\"string\"==typeof e&&(e=CKEDITOR.tools.htmlEncodeAttr(e));this._.output.push(\" \",a,'\\x3d\"',e,'\"')},closeTag:function(a){this._.output.push(\"\\x3c/\",a,\"\\x3e\")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push(\"\\x3c!--\",\na,\"--\\x3e\")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var e=this._.output.join(\"\");a&&this.reset();return e}}}),\"use strict\",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,e=CKEDITOR.tools.indexOf(a,this),b=this.previous,c=this.next;b&&(b.next=c);c&&(c.previous=b);a.splice(e,1);this.parent=null},replaceWith:function(a){var e=this.parent.children,\nb=CKEDITOR.tools.indexOf(e,this),c=a.previous=this.previous,d=a.next=this.next;c&&(c.next=a);d&&(d.previous=a);e[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var e=a.parent.children,b=CKEDITOR.tools.indexOf(e,a),c=a.next;e.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;c&&(c.previous=this);this.parent=a.parent},insertBefore:function(a){var e=a.parent.children,b=CKEDITOR.tools.indexOf(e,a);e.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=\nthis);a.previous=this;this.parent=a.parent},getAscendant:function(a){var e=\"function\"==typeof a?a:\"string\"==typeof a?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&&b.type==CKEDITOR.NODE_ELEMENT;){if(e(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}}(),\"use strict\",CKEDITOR.htmlParser.comment=\nfunction(a){this.value=a;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,e){var b=this.value;if(!(b=a.onComment(e,b,this)))return this.remove(),!1;if(\"string\"!=typeof b)return this.replaceWith(b),!1;this.value=b;return!0},writeHtml:function(a,e){e&&this.filter(e);a.comment(this.value)}}),\"use strict\",function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=\nCKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,e){if(!(this.value=a.onText(e,this.value,this)))return this.remove(),!1},writeHtml:function(a,e){e&&this.filter(e);a.text(this.value)}})}(),\"use strict\",function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})}(),\"use strict\",\nCKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function a(a){return a.attributes[\"data-cke-survive\"]?!1:\"a\"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var e=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},c=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),d={ul:\"li\",\nol:\"li\",dl:\"dd\",table:\"tbody\",tbody:\"tr\",thead:\"tr\",tfoot:\"tr\",tr:\"td\"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,l,f){function h(a){var b;if(0<v.length)for(var c=0;c<v.length;c++){var d=v[c],f=d.name,g=CKEDITOR.dtd[f],e=z.name&&CKEDITOR.dtd[z.name];e&&!e[f]||a&&g&&!g[a]&&CKEDITOR.dtd[a]?f==z.name&&(n(z,z.parent,1),c--):(b||(k(),b=1),d=d.clone(),d.parent=z,z=d,v.splice(c,1),c--)}}function k(){for(;w.length;)n(w.shift(),z)}function g(a){if(a._.isBlockLike&&\"pre\"!=a.name&&\"textarea\"!=a.name){var b=\na.children.length,c=a.children[b-1],d;c&&c.type==CKEDITOR.NODE_TEXT&&((d=CKEDITOR.tools.rtrim(c.value))?c.value=d:a.children.length=b-1)}}function n(b,c,d){c=c||z||u;var e=z;void 0===b.previous&&(q(c,b)&&(z=c,p.onTagOpen(f,{}),b.returnPoint=c=z),g(b),a(b)&&!b.children.length||c.add(b),\"pre\"==b.name&&(t=!1),\"textarea\"==b.name&&(B=!1));b.returnPoint?(z=b.returnPoint,delete b.returnPoint):z=d?c:e}function q(a,b){if((a==u||\"body\"==a.name)&&f&&(!a.name||CKEDITOR.dtd[a.name][f])){var c,d;return(c=b.attributes&&\n(d=b.attributes[\"data-cke-real-element-type\"])?d:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function r(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||\"dt\"==a&&\"dd\"==b||\"dd\"==a&&\"dt\"==b:!1}var p=new CKEDITOR.htmlParser,u=l instanceof CKEDITOR.htmlParser.element?l:\"string\"==typeof l?new CKEDITOR.htmlParser.element(l):new CKEDITOR.htmlParser.fragment,v=[],w=[],z=u,B=\"textarea\"==u.name,t=\"pre\"==u.name;p.onTagOpen=\nfunction(d,f,g,m){f=new CKEDITOR.htmlParser.element(d,f);f.isUnknown&&g&&(f.isEmpty=!0);f.isOptionalClose=m;if(a(f))v.push(f);else{if(\"pre\"==d)t=!0;else{if(\"br\"==d&&t){z.add(new CKEDITOR.htmlParser.text(\"\\n\"));return}\"textarea\"==d&&(B=!0)}if(\"br\"==d)w.push(f);else{for(;!(m=(g=z.name)?CKEDITOR.dtd[g]||(z._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c,f.isUnknown||z.isUnknown||m[d]);)if(z.isOptionalClose)p.onTagClose(g);else if(d in b&&g in b)g=z.children,(g=g[g.length-1])&&\"li\"==g.name||n(g=new CKEDITOR.htmlParser.element(\"li\"),\nz),!f.returnPoint&&(f.returnPoint=z),z=g;else if(d in CKEDITOR.dtd.$listItem&&!r(d,g))p.onTagOpen(\"li\"==d?\"ul\":\"dl\",{},0,1);else if(g in e&&!r(d,g))!f.returnPoint&&(f.returnPoint=z),z=z.parent;else if(g in CKEDITOR.dtd.$inline&&v.unshift(z),z.parent)n(z,z.parent,1);else{f.isOrphan=1;break}h(d);k();f.parent=z;f.isEmpty?n(f):z=f}}};p.onTagClose=function(a){for(var b=v.length-1;0<=b;b--)if(a==v[b].name){v.splice(b,1);return}for(var c=[],d=[],g=z;g!=u&&g.name!=a;)g._.isBlockLike||d.unshift(g),c.push(g),\ng=g.returnPoint||g.parent;if(g!=u){for(b=0;b<c.length;b++){var e=c[b];n(e,e.parent)}z=g;g._.isBlockLike&&k();n(g,g.parent);g==z&&(z=z.parent);v=v.concat(d)}\"body\"==a&&(f=!1)};p.onText=function(a){if(!(z._.hasInlineStarted&&!w.length||t||B)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var b=z.name,g=b?CKEDITOR.dtd[b]||(z._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!B&&!g[\"#\"]&&b in e)p.onTagOpen(d[b]||\"\"),p.onText(a);else{k();h();t||B||(a=a.replace(/[\\t\\r\\n ]{2,}|[\\t\\r\\n]/g,\" \"));a=\nnew CKEDITOR.htmlParser.text(a);if(q(z,a))this.onTagOpen(f,{},0,1);z.add(a)}};p.onCDATA=function(a){z.add(new CKEDITOR.htmlParser.cdata(a))};p.onComment=function(a){k();h();z.add(new CKEDITOR.htmlParser.comment(a))};p.parse(m);for(k();z!=u;)n(z,z.parent,1);g(u);return u};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=0<b?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT&&(c.value=CKEDITOR.tools.rtrim(c.value),\n0===c.value.length)){this.children.pop();this.add(a);return}c.next=a}a.previous=c;a.parent=this;this.children.splice(b,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,!1,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;\nfor(b=0;b<this.children.length;b++)!1===this.children[b].filter(a,c)&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var d=this.getFilterContext();if(c&&!this.parent&&b)b.onRoot(d,this);b&&this.filterChildren(b,!1,d);b=0;c=this.children;for(d=c.length;b<d;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var d=a(this);if(!1!==d){c=this.children;for(var e=0;e<c.length;e++)d=c[e],d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,\nb):b&&d.type!=b||a(d)}},getFilterContext:function(a){return a||{}}}}(),\"use strict\",function(){function a(){this.rules=[]}function e(b,c,d,e){var l,f;for(l in c)(f=b[l])||(f=b[l]=new a),f.add(c[l],d,e)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;b&&this.addRules(b,10)},\nproto:{addRules:function(a,c){var d;\"number\"==typeof c?d=c:c&&\"priority\"in c&&(d=c.priority);\"number\"!=typeof d&&(d=10);\"object\"!=typeof c&&(c={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,d,c);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,d,c);a.elements&&e(this.elementsRules,a.elements,d,c);a.attributes&&e(this.attributesRules,a.attributes,d,c);a.text&&this.textRules.add(a.text,d,c);a.comment&&this.commentRules.add(a.comment,d,c);a.root&&this.rootRules.add(a.root,\nd,c)},applyTo:function(a){a.filter(this)},onElementName:function(a,c){return this.elementNameRules.execOnName(a,c)},onAttributeName:function(a,c){return this.attributeNameRules.execOnName(a,c)},onText:function(a,c,d){return this.textRules.exec(a,c,d)},onComment:function(a,c,d){return this.commentRules.exec(a,c,d)},onRoot:function(a,c){return this.rootRules.exec(a,c)},onElement:function(a,c){for(var d=[this.elementsRules[\"^\"],this.elementsRules[c.name],this.elementsRules.$],e,l=0;3>l;l++)if(e=d[l]){e=\ne.exec(a,c,this);if(!1===e)return null;if(e&&e!=c)return this.onNode(a,e);if(c.parent&&!c.name)break}return c},onNode:function(a,c){var d=c.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,c.value)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value)):null},onAttribute:function(a,c,d,e){return(d=this.attributesRules[d])?d.exec(a,e,c,this):e}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype=\n{add:function(a,c,d){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:d})},addMany:function(a,c,d){for(var e=[this.findIndex(c),0],l=0,f=a.length;l<f;l++)e.push({value:a[l],priority:c,options:d});this.rules.splice.apply(this.rules,e)},findIndex:function(a){for(var c=this.rules,d=c.length-1;0<=d&&a<c[d].priority;)d--;return d+1},exec:function(a,c){var d=c instanceof CKEDITOR.htmlParser.node||c instanceof CKEDITOR.htmlParser.fragment,e=Array.prototype.slice.call(arguments,1),l=this.rules,\nf=l.length,h,k,g,n;for(n=0;n<f;n++)if(d&&(h=c.type,k=c.name),g=l[n],!(a.nonEditable&&!g.options.applyToAll||a.nestedEditable&&g.options.excludeNestedEditable)){g=g.value.apply(null,e);if(!1===g||d&&g&&(g.name!=k||g.type!=h))return g;null!=g&&(e[0]=c=g)}return c},execOnName:function(a,c){for(var d=0,e=this.rules,l=e.length,f;c&&d<l;d++)f=e[d],a.nonEditable&&!f.options.applyToAll||a.nestedEditable&&f.options.excludeNestedEditable||(c=c.replace(f.value[0],f.value[1]));return c}}}(),function(){function a(a,\nf){function g(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(\" \"):new CKEDITOR.htmlParser.element(\"br\",{\"data-cke-bogus\":1})}function e(a,d){return function(f){if(f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=[],h=b(f),t,l;if(h)for(k(h,1)&&e.push(h);h;)m(h)&&(t=c(h))&&k(t)&&((l=c(t))&&!m(l)?e.push(t):(g(E).insertAfter(t),t.remove())),h=h.previous;for(h=0;h<e.length;h++)e[h].remove();if(e=!a||!1!==(\"function\"==typeof d?d(f):d))E||CKEDITOR.env.needsBrFiller||f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?\nE||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||f.name in CKEDITOR.dtd.tr||f.name in CKEDITOR.dtd.$listItem)?(e=b(f),e=!e||\"form\"==f.name&&\"input\"==e.name):e=!1:e=!1;e&&f.add(g(a))}}}function k(a,b){if((!E||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&\"br\"==a.name&&!a.attributes[\"data-cke-eol\"])return!0;var c;return a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(v))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),a.value=c[0]),!CKEDITOR.env.needsBrFiller&&\nE&&(!b||a.parent.name in B)||!E&&((c=a.previous)&&\"br\"==c.name||!c||m(c)))?!0:!1}var h={elements:{}},E=\"html\"==f,B=CKEDITOR.tools.extend({},t),y;for(y in B)\"#\"in z[y]||delete B[y];for(y in B)h.elements[y]=e(E,a.config.fillEmptyBlocks);h.root=e(E,!1);h.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var f=b.attributes;if(\"data-cke-bogus\"in f||\"data-cke-eol\"in f)delete f[\"data-cke-bogus\"];else{for(f=b.next;f&&d(f);)f=f.next;var e=c(b);!f&&m(b.parent)?l(b.parent,\ng(a)):m(f)&&e&&!m(e)&&g(a).insertBefore(f)}}}}(E);return h}function e(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?\"div\":\"p\":!1}function b(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function c(a){for(a=a.previous;a&&d(a);)a=a.previous;return a}function d(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes[\"data-cke-bookmark\"]}function m(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in\nt||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function l(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;c&&(c.next=b,b.previous=c)}function f(a){a=a.attributes;\"false\"!=a.contenteditable&&(a[\"data-cke-editable\"]=a.contenteditable?\"true\":1);a.contenteditable=\"false\"}function h(a){a=a.attributes;switch(a[\"data-cke-editable\"]){case \"true\":a.contenteditable=\"true\";break;case \"1\":delete a.contenteditable}}function k(a){return a.replace(D,function(a,b,c){return\"\\x3c\"+b+c.replace(G,\nfunction(a,b){return F.test(b)&&-1==c.indexOf(\"data-cke-saved-\"+b)?\" data-cke-saved-\"+a+\" data-cke-\"+CKEDITOR.rnd+\"-\"+a:a})+\"\\x3e\"})}function g(a,b){return a.replace(b,function(a,b,c){0===a.indexOf(\"\\x3ctextarea\")&&(a=b+r(c).replace(/</g,\"\\x26lt;\").replace(/>/g,\"\\x26gt;\")+\"\\x3c/textarea\\x3e\");return\"\\x3ccke:encoded\\x3e\"+encodeURIComponent(a)+\"\\x3c/cke:encoded\\x3e\"})}function n(a){return a.replace(K,function(a,b){return decodeURIComponent(b)})}function q(a){return a.replace(/\\x3c!--(?!{cke_protected})[\\s\\S]+?--\\x3e/g,\nfunction(a){return\"\\x3c!--\"+w+\"{C}\"+encodeURIComponent(a).replace(/--/g,\"%2D%2D\")+\"--\\x3e\"})}function r(a){return a.replace(/\\x3c!--\\{cke_protected\\}\\{C\\}([\\s\\S]+?)--\\x3e/g,function(a,b){return decodeURIComponent(b)})}function p(a,b){var c=b._.dataStore;return a.replace(/\\x3c!--\\{cke_protected\\}([\\s\\S]+?)--\\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\\{cke_protected_(\\d+)\\}/g,function(a,b){return c&&c[b]||\"\"})}function u(a,b){var c=[],d=b.config.protectedSource,f=b._.dataStore||(b._.dataStore=\n{id:1}),g=/<\\!--\\{cke_temp(comment)?\\}(\\d*?)--\\x3e/g,d=[/<script[\\s\\S]*?(<\\/script>|$)/gi,/<noscript[\\s\\S]*?<\\/noscript>/gi,/<meta[\\s\\S]*?\\/?>/gi].concat(d);a=a.replace(/\\x3c!--[\\s\\S]*?--\\x3e/g,function(a){return\"\\x3c!--{cke_tempcomment}\"+(c.push(a)-1)+\"--\\x3e\"});for(var e=0;e<d.length;e++)a=a.replace(d[e],function(a){a=a.replace(g,function(a,b,d){return c[d]});return/cke_temp(comment)?/.test(a)?a:\"\\x3c!--{cke_temp}\"+(c.push(a)-1)+\"--\\x3e\"});a=a.replace(g,function(a,b,d){return\"\\x3c!--\"+w+(b?\"{C}\":\n\"\")+encodeURIComponent(c[d]).replace(/--/g,\"%2D%2D\")+\"--\\x3e\"});a=a.replace(/<\\w+(?:\\s+(?:(?:[^\\s=>]+\\s*=\\s*(?:[^'\"\\s>]+|'[^']*'|\"[^\"]*\"))|[^\\s=\\/>]+))+\\s*\\/?>/g,function(a){return a.replace(/\\x3c!--\\{cke_protected\\}([^>]*)--\\x3e/g,function(a,b){f[f.id]=decodeURIComponent(b);return\"{cke_protected_\"+f.id++ +\"}\"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\\s\\S]*?)<\\/\\1>/g,function(a,c,d,f){return\"\\x3c\"+c+d+\"\\x3e\"+p(r(f),b)+\"\\x3c/\"+c+\"\\x3e\"})}CKEDITOR.htmlDataProcessor=function(b){var c,\nd,f=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(y);c.addRules(C,{applyToAll:!0});c.addRules(a(b,\"data\"),{applyToAll:!0});d.addRules(x);d.addRules(A,{applyToAll:!0});d.addRules(a(b,\"html\"),{applyToAll:!0});b.on(\"toHtml\",function(a){a=a.data;var c=a.dataValue,d,c=u(c,b),c=g(c,H),c=k(c),c=g(c,I),c=c.replace(E,\"$1cke:$2\"),c=c.replace(R,\"\\x3ccke:$1$2\\x3e\\x3c/cke:$1\\x3e\"),\nc=c.replace(/(<pre\\b[^>]*>)(\\r\\n|\\n)/g,\"$1$2$2\"),c=c.replace(/([^a-z0-9<\\-])(on\\w{3,})(?!>)/gi,\"$1data-cke-\"+CKEDITOR.rnd+\"-$2\");d=a.context||b.editable().getName();var f;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&\"pre\"==d&&(d=\"div\",c=\"\\x3cpre\\x3e\"+c+\"\\x3c/pre\\x3e\",f=1);d=b.document.createElement(d);d.setHtml(\"a\"+c);c=d.getHtml().substr(1);c=c.replace(new RegExp(\"data-cke-\"+CKEDITOR.rnd+\"-\",\"ig\"),\"\");f&&(c=c.replace(/^<pre>|<\\/pre>$/gi,\"\"));c=c.replace(N,\"$1$2\");c=n(c);c=r(c);d=!1===a.fixForBody?!1:\ne(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,d);d&&(f=c,!f.children.length&&CKEDITOR.dtd[f.name][d]&&(d=new CKEDITOR.htmlParser.element(d),f.add(d)));a.dataValue=c},null,null,5);b.on(\"toHtml\",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire(\"dataFiltered\")},null,null,6);b.on(\"toHtml\",function(a){a.data.dataValue.filterChildren(f.dataFilter,!0)},null,null,10);b.on(\"toHtml\",function(a){a=a.data;var b=a.dataValue,\nc=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=q(b)},null,null,15);b.on(\"toDataFormat\",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\\/?>/i,\"\"));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,e(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on(\"toDataFormat\",function(a){a.data.dataValue.filterChildren(f.htmlFilter,!0)},null,null,10);b.on(\"toDataFormat\",function(a){a.data.filter.applyTo(a.data.dataValue,\n!1,!0)},null,null,11);b.on(\"toDataFormat\",function(a){var c=a.data.dataValue,d=f.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=r(c);c=p(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var f=this.editor,g,e,k,h;b&&\"object\"==typeof b?(g=b.context,c=b.fixForBody,d=b.dontFilter,e=b.filter,k=b.enterMode,h=b.protectedWhitespaces):g=b;g||null===g||(g=f.editable().getName());return f.fire(\"toHtml\",{dataValue:a,context:g,fixForBody:c,dontFilter:d,\nfilter:e||f.filter,enterMode:k||f.enterMode,protectedWhitespaces:h}).dataValue},toDataFormat:function(a,b){var c,d,f;b&&(c=b.context,d=b.filter,f=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire(\"toDataFormat\",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:f||this.editor.enterMode}).dataValue}};var v=/(?: |\\xa0)$/,w=\"{cke_protected}\",z=CKEDITOR.dtd,B=\"caption colgroup col thead tfoot tbody\".split(\" \"),t=CKEDITOR.tools.extend({},z.$blockLimit,\nz.$block),y={elements:{input:f,textarea:f}},C={attributeNames:[[/^on/,\"data-cke-pa-on\"],[/^data-cke-expando$/,\"\"]]},x={elements:{embed:function(a){var b=a.parent;if(b&&\"object\"==b.name){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes[\"data-cke-saved-name\"]))return!1}}},A={elementNames:[[/^cke:/,\"\"],[/^\\?xml:namespace$/,\"\"]],attributeNames:[[/^data-cke-(saved|pa)-/,\n\"\"],[/^data-cke-.*/,\"\"],[\"hidefocus\",\"\"]],elements:{$:function(a){var b=a.attributes;if(b){if(b[\"data-cke-temp\"])return!1;for(var c=[\"name\",\"href\",\"src\"],d,f=0;f<c.length;f++)d=\"data-cke-saved-\"+c[f],d in b&&delete b[c[f]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,d;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(B,a.name),d=CKEDITOR.tools.indexOf(B,b.name));-1<c&&-1<d&&c!=d||(c=a.parent?a.getIndex():-1,d=b.parent?b.getIndex():-1);return c>d?\n1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){\"Apple-style-span\"==a.attributes[\"class\"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes[\"class\"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type=\"text/css\")},title:function(a){var b=a.children[0];!b&&l(a,b=new CKEDITOR.htmlParser.text);\nb.value=a.attributes[\"data-cke-title\"]||\"\"},input:h,textarea:h},attributes:{\"class\":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\\s+)cke_[^\\s]*/g,\"\"))||!1}}};CKEDITOR.env.ie&&(A.attributes.style=function(a){return a.replace(/(^|;)([^\\:]+)/g,function(a){return a.toLowerCase()})});var D=/<(a|area|img|input|source)\\b([^>]*)>/gi,G=/([\\w-:]+)\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|(?:[^ \"'>]+))/gi,F=/^(href|src|name)$/i,I=/(?:<style(?=[ >])[^>]*>[\\s\\S]*?<\\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,\nH=/(<textarea(?=[ >])[^>]*>)([\\s\\S]*?)(?:<\\/textarea>)/gi,K=/<cke:encoded>([^<]*)<\\/cke:encoded>/gi,E=/(<\\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,N=/(<\\/?)cke:((?:html|body|head|title)[^>]*>)/gi,R=/<cke:(param|embed)([^>]*?)\\/?>(?!\\s*<\\/cke:\\1)/gi}(),\"use strict\",CKEDITOR.htmlParser.element=function(a,e){this.name=a;this.attributes=e||{};this.children=[];var b=a||\"\",c=b.match(/^cke:(.*)/);c&&(b=c[1]);b=!!(CKEDITOR.dtd.$nonBodyContent[b]||CKEDITOR.dtd.$block[b]||CKEDITOR.dtd.$listItem[b]||\nCKEDITOR.dtd.$tableContent[b]||CKEDITOR.dtd.$nonEditable[b]||\"br\"==b);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}},CKEDITOR.htmlParser.cssStyle=function(a){var e={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||\"\").replace(/"/g,'\"').replace(/\\s*([^ :;]+)\\s*:\\s*([^;]+)\\s*(?=;|$)/g,function(a,c,d){\"font-family\"==c&&(d=d.replace(/[\"']/g,\"\"));e[c.toLowerCase()]=d});return{rules:e,populate:function(a){var c=\nthis.toString();c&&(a instanceof CKEDITOR.dom.element?a.setAttribute(\"style\",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c)},toString:function(){var a=[],c;for(c in e)e[c]&&a.push(c,\":\",e[c],\";\");return a.join(\"\")}}},function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&(\"string\"==typeof a?b.name==a:b.name in a)}}var e=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=\nCKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var e=this,l,f;b=e.getFilterContext(b);if(b.off)return!0;if(!e.parent)a.onRoot(b,e);for(;;){l=e.name;if(!(f=a.onElementName(b,l)))return this.remove(),!1;e.name=f;if(!(e=a.onElement(b,e)))return this.remove(),!1;if(e!==this)return this.replaceWith(e),!1;if(e.name==l)break;if(e.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(e),\n!1;if(!e.name)return this.replaceWithChildren(),!1}l=e.attributes;var h,k;for(h in l){for(f=l[h];;)if(k=a.onAttributeName(b,h))if(k!=h)delete l[h],h=k;else break;else{delete l[h];break}k&&(!1===(f=a.onAttribute(b,e,k,f))?delete l[k]:l[k]=f)}e.isEmpty||this.filterChildren(a,!1,b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var m=this.name,l=[],f=this.attributes,h,k;a.openTag(m,f);for(h in f)l.push([h,f[h]]);a.sortAttributes&&l.sort(e);h=0;for(k=l.length;h<k;h++)f=\nl[h],a.attribute(f[0],f[1]);a.openTagClose(m,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(m)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;\"function\"!=typeof b&&(b=a(b));for(var d=0,e=this.children.length;d<e;++d)if(b(this.children[d]))return this.children[d];return null},getHtml:function(){var a=\nnew CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children;for(var b=0,e=a.length;b<e;++b)a[b].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),e=this.clone(),l=0;l<b.length;++l)b[l].parent=e;e.children=b;b[0]&&(b[0].previous=null);0<a&&(this.children[a-\n1].next=null);this.parent.add(e,this.getIndex()+1);return e},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes[\"class\"]||\"\";this.attributes[\"class\"]=b+(b?\" \":\"\")+a}},removeClass:function(a){var b=this.attributes[\"class\"];b&&((b=CKEDITOR.tools.trim(b.replace(new RegExp(\"(?:\\\\s+|^)\"+a+\"(?:\\\\s+|$)\"),\" \")))?this.attributes[\"class\"]=b:delete this.attributes[\"class\"])},hasClass:function(a){var b=this.attributes[\"class\"];return b?(new RegExp(\"(?:^|\\\\s)\"+a+\"(?\\x3d\\\\s|$)\")).test(b):!1},getFilterContext:function(a){var b=\n[];a||(a={off:!1,nonEditable:!1,nestedEditable:!1});a.off||\"off\"!=this.attributes[\"data-cke-processor\"]||b.push(\"off\",!0);a.nonEditable||\"false\"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&\"true\"==this.attributes.contenteditable&&b.push(\"nestedEditable\",!0):b.push(\"nonEditable\",!0);if(b.length){a=CKEDITOR.tools.copy(a);for(var e=0;e<b.length;e+=2)a[b[e]]=b[e+1]}return a}},!0)}(),function(){var a={},e=/{([^}]+)}/g,b=/([\\\\'])/g,c=/\\n/g,d=/\\r/g;CKEDITOR.template=function(m){if(a[m])this.output=\na[m];else{var l=m.replace(b,\"\\\\$1\").replace(c,\"\\\\n\").replace(d,\"\\\\r\").replace(e,function(a,b){return\"',data['\"+b+\"']\\x3d\\x3dundefined?'{\"+b+\"}':data['\"+b+\"'],'\"});this.output=a[m]=Function(\"data\",\"buffer\",\"return buffer?buffer.push('\"+l+\"'):['\"+l+\"'].join('');\")}}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(a){CKEDITOR.instances[a.name]=a;a.on(\"focus\",function(){CKEDITOR.currentInstance!=a&&(CKEDITOR.currentInstance=\na,CKEDITOR.fire(\"currentInstance\"))});a.on(\"blur\",function(){CKEDITOR.currentInstance==a&&(CKEDITOR.currentInstance=null,CKEDITOR.fire(\"currentInstance\"))});CKEDITOR.fire(\"instance\",null,a)},CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]},function(){var a={};CKEDITOR.addTemplate=function(e,b){var c=a[e];if(c)return c;c={name:e,source:b};CKEDITOR.fire(\"template\",c);return a[e]=new CKEDITOR.template(c.source)};CKEDITOR.getTemplate=function(e){return a[e]}}(),function(){var a=[];CKEDITOR.addCss=\nfunction(e){a.push(e)};CKEDITOR.getCss=function(){return a.join(\"\\n\")}}(),CKEDITOR.on(\"instanceDestroyed\",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire(\"reset\")}),CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(a,e){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance \"'+a.getEditor().name+'\" is already attached to the provided element.';var b=new CKEDITOR.editor(e,\na,CKEDITOR.ELEMENT_MODE_INLINE),c=a.is(\"textarea\")?a:null;c?(b.setData(c.getValue(),null,!0),a=CKEDITOR.dom.element.createFromHtml('\\x3cdiv contenteditable\\x3d\"'+!!b.readOnly+'\" class\\x3d\"cke_textarea_inline\"\\x3e'+c.getValue()+\"\\x3c/div\\x3e\",CKEDITOR.document),a.insertAfter(c),c.hide(),c.$.form&&b._attachToForm()):b.setData(a.getHtml(),null,!0);b.on(\"loaded\",function(){b.fire(\"uiReady\");b.editable(a);b.container=a;b.ui.contentsElement=a;b.setData(b.getData(1));b.resetDirty();b.fire(\"contentDom\");\nb.mode=\"wysiwyg\";b.fire(\"mode\");b.status=\"ready\";b.fireOnce(\"instanceReady\");CKEDITOR.fire(\"instanceReady\",null,b)},null,null,1E4);b.on(\"destroy\",function(){c&&(b.container.clearCustomData(),b.container.remove(),c.show());b.element.clearCustomData();delete b.element});return b};CKEDITOR.inlineAll=function(){var a,e,b;for(b in CKEDITOR.dtd.$editable)for(var c=CKEDITOR.document.getElementsByTag(b),d=0,m=c.count();d<m;d++)a=c.getItem(d),\"true\"==a.getAttribute(\"contenteditable\")&&(e={element:a,config:{}},\n!1!==CKEDITOR.fire(\"inline\",e)&&CKEDITOR.inline(a,e.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass=\"ckeditor\",function(){function a(a,d,m,l){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance \"'+a.getEditor().name+'\" is already attached to the provided element.';var f=new CKEDITOR.editor(d,a,l);l==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle(\"visibility\",\"hidden\"),f._.required=\na.hasAttribute(\"required\"),a.removeAttribute(\"required\"));m&&f.setData(m,null,!0);f.on(\"loaded\",function(){b(f);l==CKEDITOR.ELEMENT_MODE_REPLACE&&f.config.autoUpdateElement&&a.$.form&&f._attachToForm();f.setMode(f.config.startupMode,function(){f.resetDirty();f.status=\"ready\";f.fireOnce(\"instanceReady\");CKEDITOR.fire(\"instanceReady\",null,f)})});f.on(\"destroy\",e);return f}function e(){var a=this.container,b=this.element;a&&(a.clearCustomData(),a.remove());b&&(b.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&\n(b.show(),this._.required&&b.setAttribute(\"required\",\"required\")),delete this.element)}function b(a){var b=a.name,e=a.element,l=a.elementMode,f=a.fire(\"uiSpace\",{space:\"top\",html:\"\"}).html,h=a.fire(\"uiSpace\",{space:\"bottom\",html:\"\"}).html,k=new CKEDITOR.template('\\x3c{outerEl} id\\x3d\"cke_{name}\" class\\x3d\"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'\" dir\\x3d\"{langDir}\" lang\\x3d\"{langCode}\" role\\x3d\"application\"'+(a.title?' aria-labelledby\\x3d\"cke_{name}_arialbl\"':\n\"\")+\"\\x3e\"+(a.title?'\\x3cspan id\\x3d\"cke_{name}_arialbl\" class\\x3d\"cke_voice_label\"\\x3e{voiceLabel}\\x3c/span\\x3e':\"\")+'\\x3c{outerEl} class\\x3d\"cke_inner cke_reset\" role\\x3d\"presentation\"\\x3e{topHtml}\\x3c{outerEl} id\\x3d\"{contentId}\" class\\x3d\"cke_contents cke_reset\" role\\x3d\"presentation\"\\x3e\\x3c/{outerEl}\\x3e{bottomHtml}\\x3c/{outerEl}\\x3e\\x3c/{outerEl}\\x3e'),b=CKEDITOR.dom.element.createFromHtml(k.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:f?'\\x3cspan id\\x3d\"'+\na.ui.spaceId(\"top\")+'\" class\\x3d\"cke_top cke_reset_all\" role\\x3d\"presentation\" style\\x3d\"height:auto\"\\x3e'+f+\"\\x3c/span\\x3e\":\"\",contentId:a.ui.spaceId(\"contents\"),bottomHtml:h?'\\x3cspan id\\x3d\"'+a.ui.spaceId(\"bottom\")+'\" class\\x3d\"cke_bottom cke_reset_all\" role\\x3d\"presentation\"\\x3e'+h+\"\\x3c/span\\x3e\":\"\",outerEl:CKEDITOR.env.ie?\"span\":\"div\"}));l==CKEDITOR.ELEMENT_MODE_REPLACE?(e.hide(),b.insertAfter(e)):e.append(b);a.container=b;a.ui.contentsElement=a.ui.space(\"contents\");f&&a.ui.space(\"top\").unselectable();\nh&&a.ui.space(\"bottom\").unselectable();e=a.config.width;l=a.config.height;e&&b.setStyle(\"width\",CKEDITOR.tools.cssLength(e));l&&a.ui.space(\"contents\").setStyle(\"height\",CKEDITOR.tools.cssLength(l));b.disableContextMenu();CKEDITOR.env.webkit&&b.on(\"focus\",function(){a.focus()});a.fireOnce(\"uiReady\")}CKEDITOR.replace=function(b,d){return a(b,d,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b,d,e){return a(b,d,e,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=\ndocument.getElementsByTagName(\"textarea\"),b=0;b<a.length;b++){var e=null,l=a[b];if(l.name||l.id){if(\"string\"==typeof arguments[0]){if(!(new RegExp(\"(?:^|\\\\s)\"+arguments[0]+\"(?:$|\\\\s)\")).test(l.className))continue}else if(\"function\"==typeof arguments[0]&&(e={},!1===arguments[0](l,e)))continue;this.replace(l,e)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var e=this,l=this._.modes;if(a!=e.mode&&l&&l[a]){e.fire(\"beforeSetMode\",\na);if(e.mode){var f=e.checkDirty(),l=e._.previousModeData,h,k=0;e.fire(\"beforeModeUnload\");e.editable(0);e._.previousMode=e.mode;e._.previousModeData=h=e.getData(1);\"source\"==e.mode&&l==h&&(e.fire(\"lockSnapshot\",{forceUpdate:!0}),k=1);e.ui.space(\"contents\").setHtml(\"\");e.mode=\"\"}else e._.previousModeData=e.getData(1);this._.modes[a](function(){e.mode=a;void 0!==f&&!f&&e.resetDirty();k?e.fire(\"unlockSnapshot\"):\"wysiwyg\"==a&&e.fire(\"saveSnapshot\");setTimeout(function(){e.fire(\"mode\");b&&b.call(e)},\n0)})}};CKEDITOR.editor.prototype.resize=function(a,b,e,l){var f=this.container,h=this.ui.space(\"contents\"),k=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;l=l?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass(\"cke_inner\")}):f;l.setSize(\"width\",a,!0);k&&(k.style.width=\"1%\");var g=(l.$.offsetHeight||0)-(h.$.clientHeight||0),f=Math.max(b-(e?0:g),0);b=e?b+g:b;h.setStyle(\"height\",f+\"px\");k&&(k.style.width=\"100%\");this.fire(\"resize\",{outerHeight:b,\ncontentsHeight:f,outerWidth:a||l.getSize(\"width\")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space(\"contents\"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode=\"wysiwyg\",function(){function a(a){var b=a.editor,d=a.data.path,f=d.blockLimit,g=a.data.selection,k=g.getRanges()[0],h;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(g=e(g,d))g.appendBogus(),h=CKEDITOR.env.ie;\nl(b,d.block,f)&&k.collapsed&&!k.getCommonAncestor().isReadOnly()&&(d=k.clone(),d.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),f=new CKEDITOR.dom.walker(d),f.guard=function(a){return!c(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!f.checkForward()||d.checkStartOfBlock()&&d.checkEndOfBlock())&&(b=k.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?\"div\":\"p\"),CKEDITOR.env.needsBrFiller||(b=b.getFirst(c))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?: |\\xa0)$/)&&b.remove(),\nh=1,a.cancel());h&&k.select()}function e(a,b){if(a.isFake)return 0;var d=b.block||b.blockLimit,f=d&&d.getLast(c);if(!(!d||!d.isBlockBoundary()||f&&f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary()||d.is(\"pre\")||d.getBogus()))return d}function b(a){var b=a.data.getTarget();b.is(\"input\")&&(b=b.getAttribute(\"type\"),\"submit\"!=b&&\"reset\"!=b||a.data.preventDefault())}function c(a){return g(a)&&n(a)}function d(a,b){return function(c){var d=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;\n(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(b.equals(d)||b.contains(d))||a.call(this,c)}}function m(a){function b(a){return function(b,f){f&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(g)&&(d=b);if(!(f||!c(b)||a&&r(b)))return!1}}var d,f=a.getRanges()[0];a=a.root;var g={table:1,ul:1,ol:1,dl:1};if(f.startPath().contains(g)){var e=f.clone();e.collapse(1);e.setStartAt(a,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(e);a.guard=b();a.checkBackward();if(d)return e=f.clone(),\ne.collapse(),e.setEndAt(d,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(e),a.guard=b(!0),d=!1,a.checkForward(),d}return null}function l(a,b,c){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&\"true\"==b.getAttribute(\"contenteditable\"))}function f(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?\"div\":\"p\":!1}function h(a){var b=a.editor;b.getSelection().scrollIntoView();\nsetTimeout(function(){b.fire(\"saveSnapshot\")},0)}function k(a,b,c){var d=a.getCommonAncestor(b);for(b=a=c?b:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)b=a;b.remove()}CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status=\"unloaded\";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),this.contains(a))){a.focus();\nreturn}try{this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?\"setActive\":\"focus\"]()}catch(b){if(!CKEDITOR.env.ie)throw b;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,b){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a=\"focus\"==a?\"focusin\":\"focusout\",b=d(b,this),c[0]=a,c[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,c)},\nattachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,1),b=a.on.apply(a,b);this._.listeners.push(b);return b},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)a.hasOwnProperty(c)&&(b=a[c],null!==b?this.setAttribute(c,b):this.removeAttribute(c))},attachClass:function(a){var b=this.getCustomData(\"classes\");this.hasClass(a)||\n(!b&&(b=[]),b.push(a),this.setCustomData(\"classes\",b),this.addClass(a))},changeAttr:function(a,b){var c=this.getAttribute(a);b!==c&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=c),this.setAttribute(a,b))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),\"text\")},transformPlainTextToHtml:function(a){var b=this.editor.getSelection().getStartElement().hasAscendant(\"pre\",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;\nreturn CKEDITOR.tools.transformPlainTextToHtml(a,b)},insertHtml:function(a,b,c){var d=this.editor;d.focus();d.fire(\"saveSnapshot\");c||(c=d.getSelection().getRanges()[0]);u(this,b||\"html\",a,c);c.select();h(this);this.editor.fire(\"afterInsertHtml\",{})},insertHtmlIntoRange:function(a,b,c){u(this,c||\"html\",a,b);this.editor.fire(\"afterInsertHtml\",{intoRange:b})},insertElement:function(a,b){var d=this.editor;d.focus();d.fire(\"saveSnapshot\");var f=d.activeEnterMode,d=d.getSelection(),g=a.getName(),g=CKEDITOR.dtd.$block[g];\nb||(b=d.getRanges()[0]);this.insertElementIntoRange(a,b)&&(b.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),g&&((g=a.getNext(function(a){return c(a)&&!r(a)}))&&g.type==CKEDITOR.NODE_ELEMENT&&g.is(CKEDITOR.dtd.$block)?g.getDtd()[\"#\"]?b.moveToElementEditStart(g):b.moveToElementEditEnd(a):g||f==CKEDITOR.ENTER_BR||(g=b.fixBlock(!0,f==CKEDITOR.ENTER_DIV?\"div\":\"p\"),b.moveToElementEditStart(g))));d.selectRanges([b]);h(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,\nb){var c=this.editor,d=c.config.enterMode,f=a.getName(),g=CKEDITOR.dtd.$block[f];if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})&&v(b);var e,k;if(g)for(;(e=b.getCommonAncestor(0,1))&&(k=CKEDITOR.dtd[e.getName()])&&(!k||!k[f]);)e.getName()in CKEDITOR.dtd.span?b.splitElement(e):b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(e),b.collapse(!0),e.remove()):b.splitBlock(d==CKEDITOR.ENTER_DIV?\n\"div\":\"p\",c.editable());b.insertNode(a);return!0},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();\"unloaded\"==this.status&&(this.status=\"ready\");this.editor.fire(\"dataReady\")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute(\"contenteditable\",!a)},detach:function(){this.removeClass(\"cke_editable\");this.status=\"detached\";var a=this.editor;this._.detach();\ndelete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},fixInitialSelection:function(){function a(){var b=c.getDocument().$,d=b.getSelection(),f;a:if(d.anchorNode&&d.anchorNode==c.$)f=!0;else{if(CKEDITOR.env.webkit&&(f=c.getDocument().getActive())&&f.equals(c)&&!d.anchorNode){f=!0;break a}f=void 0}f&&(f=new CKEDITOR.dom.range(c),f.moveToElementEditStart(c),b=b.createRange(),b.setStart(f.startContainer.$,f.startOffset),b.collapse(!0),d.removeAllRanges(),\nd.addRange(b))}function b(){var a=c.getDocument().$,d=a.selection,f=c.getDocument().getActive();\"None\"==d.type&&f.equals(c)&&(d=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),d.moveToElementEditStart(c),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),a.moveToElementText(d.$),a.collapse(!0),a.select())}var c=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once(\"focus\",\nfunction(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};w.eol.detect(a,this);w.bogus.exclude(a);w.cell.shrink(a);a.fragment=a.range.cloneContents();w.tree.rebuild(a,this);w.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=z,d={range:a,doc:a.document},f=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),f;a.enlarge(CKEDITOR.ENLARGE_INLINE,\n1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var g=this.editor.createRange();g.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=g.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();\nc.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this);if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag(\"span\"),g=0,e;if(d)for(;e=d.getItem(g++);)if(!n(e)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),q(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();\nreturn f},setup:function(){var a=this.editor;this.attachListener(a,\"beforeGetData\",function(){var b=this.getData();this.is(\"textarea\")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(p,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,\"getSnapshot\",function(a){a.data=this.getData(1)},this);this.attachListener(a,\"afterSetData\",function(){this.setData(a.getData(1))},this);this.attachListener(a,\"loadSnapshot\",function(a){this.setData(a.data,1)},this);this.attachListener(a,\n\"beforeFocus\",function(){var b=a.getSelection();(b=b&&b.getNative())&&\"Control\"==b.type||this.focus()},this);this.attachListener(a,\"insertHtml\",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,\"insertElement\",function(a){this.insertElement(a.data)},this);this.attachListener(a,\"insertText\",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass(\"cke_editable\");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass(\"cke_editable_inline\"):\na.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass(\"cke_editable_themed\");this.attachClass(\"cke_contents_\"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on(\"blur\",function(){this.hasFocus=!1},null,null,-1);this.on(\"focus\",function(){this.hasFocus=!0},null,null,-1);a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once(\"contentDom\",\nfunction(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr(\"tabindex\",a.tabIndex);if(!this.is(\"textarea\")){a.document=this.getDocument();a.window=this.getWindow();var d=a.document;this.changeAttr(\"spellcheck\",!a.config.disableNativeSpellChecker);var f=a.config.contentsLangDirection;this.getDirection(1)!=f&&this.changeAttr(\"dir\",f);var e=CKEDITOR.getCss();e&&(f=d.getHead(),f.getCustomData(\"stylesheet\")||(e=d.appendStyleText(e),e=new CKEDITOR.dom.element(e.ownerNode||e.owningElement),\nf.setCustomData(\"stylesheet\",e),e.data(\"cke-temp\",1)));f=d.getCustomData(\"stylesheet_ref\")||0;d.setCustomData(\"stylesheet_ref\",f+1);this.setCustomData(\"cke_includeReadonly\",!a.config.disableReadonlyStyling);this.attachListener(this,\"click\",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains(\"a\");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var h={8:1,46:1};this.attachListener(a,\"key\",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d;if(c in\nh){b=a.getSelection();var f,e=b.getRanges()[0],k=e.startPath(),l,E,t,c=8==c;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(f=b.getSelectedElement())||(f=m(b))?(a.fire(\"saveSnapshot\"),e.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f.remove(),e.select(),a.fire(\"saveSnapshot\"),d=1):e.collapsed&&((l=k.block)&&(t=l[c?\"getPrevious\":\"getNext\"](g))&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(\"table\")&&e[c?\"checkStartOfBlock\":\"checkEndOfBlock\"]()?(a.fire(\"saveSnapshot\"),e[c?\"checkEndOfBlock\":\"checkStartOfBlock\"]()&&\nl.remove(),e[\"moveToElementEdit\"+(c?\"End\":\"Start\")](t),e.select(),a.fire(\"saveSnapshot\"),d=1):k.blockLimit&&k.blockLimit.is(\"td\")&&(E=k.blockLimit.getAscendant(\"table\"))&&e.checkBoundaryOfElement(E,c?CKEDITOR.START:CKEDITOR.END)&&(t=E[c?\"getPrevious\":\"getNext\"](g))?(a.fire(\"saveSnapshot\"),e[\"moveToElementEdit\"+(c?\"End\":\"Start\")](t),e.checkStartOfBlock()&&e.checkEndOfBlock()?t.remove():e.select(),a.fire(\"saveSnapshot\"),d=1):(E=k.contains([\"td\",\"th\",\"caption\"]))&&e.checkBoundaryOfElement(E,c?CKEDITOR.START:\nCKEDITOR.END)&&(d=1))}return!d});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,\"keyup\",function(b){b.data.getKeystroke()in h&&!this.getFirst(c)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,\"dblclick\",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire(\"doubleclick\",b)});CKEDITOR.env.ie&&this.attachListener(this,\"click\",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge||\nthis.attachListener(this,\"mousedown\",function(b){var c=b.data.getTarget();c.is(\"img\",\"hr\",\"input\",\"textarea\",\"select\")&&!c.isReadOnly()&&(a.getSelection().selectElement(c),c.is(\"input\",\"textarea\",\"select\")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,\"mouseup\",function(b){(b=b.data.getTarget())&&b.is(\"img\")&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,\"mouseup\",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getOuterHtml().replace(p,\n\"\"))){var c=a.createRange();c.moveToElementEditStart(b);c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,\"click\",function(a){a.data.getTarget().is(\"input\",\"select\")&&a.data.preventDefault()}),this.attachListener(this,\"mouseup\",function(a){a.data.getTarget().is(\"input\",\"textarea\")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,\"key\",function(b){if(a.readOnly)return!0;b=b.data.domEvent.getKey();if(b in h){var c=8==b,d=a.getSelection().getRanges()[0];b=d.startPath();\nif(d.collapsed)a:{var f=b.block;if(f&&d[c?\"checkStartOfBlock\":\"checkEndOfBlock\"]()&&d.moveToClosestEditablePosition(f,!c)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var g=d.startContainer.getChild(d.startOffset-(c?1:0));if(g&&g.type==CKEDITOR.NODE_ELEMENT&&g.is(\"hr\")){a.fire(\"saveSnapshot\");g.remove();b=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(f))b=void 0;else{a.fire(\"saveSnapshot\");var e;(e=(c?d:f).getBogus())&&e.remove();e=a.getSelection();g=e.createBookmarks();\n(c?f:d).moveChildren(c?d:f,!1);b.lastElement.mergeSiblings();k(f,d,!c);e.selectBookmarks(g);b=!0}}else b=!1}else c=d,e=b.block,d=c.endPath().block,e&&d&&!e.equals(d)?(a.fire(\"saveSnapshot\"),(f=e.getBogus())&&f.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),d.getParent()&&(d.moveChildren(e,!1),b.lastElement.mergeSiblings(),k(e,d,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),\"\"===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),b=!0):b=!1;if(!b)return;\na.getSelection().scrollIntoView();a.fire(\"saveSnapshot\");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData(\"classes\"))for(;a.length;)this.removeClass(a.pop());if(!this.is(\"textarea\")){a=this.getDocument();var b=a.getHead();if(b.getCustomData(\"stylesheet\")){var c=a.getCustomData(\"stylesheet_ref\");--c?a.setCustomData(\"stylesheet_ref\",c):(a.removeCustomData(\"stylesheet_ref\"),b.removeCustomData(\"stylesheet\").remove())}}this.editor.fire(\"contentDomUnload\");\ndelete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on(\"instanceLoaded\",function(b){var c=b.editor;c.on(\"insertElement\",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is(\"input\")||a.is(\"textarea\"))&&(\"false\"!=a.getAttribute(\"contentEditable\")&&a.data(\"cke-editable\",a.hasAttribute(\"contenteditable\")?\n\"true\":\"1\"),a.setAttribute(\"contentEditable\",!1))});c.on(\"selectionChange\",function(b){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire(\"lockSnapshot\"),a(b),c.fire(\"unlockSnapshot\"),!d&&c.resetDirty())}})});CKEDITOR.on(\"instanceCreated\",function(a){var b=a.editor;b.on(\"mode\",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr(\"role\",\"textbox\");a.changeAttr(\"aria-label\",c);c&&a.changeAttr(\"title\",c);var d=b.fire(\"ariaEditorHelpLabel\",{}).label;\nif(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?\"top\":\"contents\"))){var f=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\\x3cspan id\\x3d\"'+f+'\" class\\x3d\"cke_voice_label\"\\x3e'+d+\"\\x3c/span\\x3e\");c.append(d);a.changeAttr(\"aria-describedby\",f)}}})});CKEDITOR.addCss(\".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}\");var g=CKEDITOR.dom.walker.whitespaces(!0),n=CKEDITOR.dom.walker.bookmark(!1,!0),q=CKEDITOR.dom.walker.empty(),\nr=CKEDITOR.dom.walker.bogus(),p=/(^|<body\\b[^>]*>)\\s*<(p|div|address|h\\d|center|pre)[^>]*>\\s*(?:<br[^>]*>| |\\u00A0| )?\\s*(:?<\\/\\2>)?\\s*(?=$|<\\/body>)/gi,u=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var f,g,e,k,h=[],l=d.range.startContainer;f=d.range.startPath();for(var l=m[l.getName()],n=0,w=c.getChildren(),v=w.count(),p=-1,y=-1,u=0,C=f.contains(m.$list);n<v;++n)f=w.getItem(n),a(f)?(e=f.getName(),C&&e in CKEDITOR.dtd.$list?h=h.concat(b(f,d)):(k=!!l[e],\n\"br\"!=e||!f.data(\"cke-eol\")||n&&n!=v-1||(u=(g=n?h[n-1].node:w.getItem(n+1))&&(!a(g)||!g.is(\"br\")),g=g&&a(g)&&m.$block[g.getName()]),-1!=p||k||(p=n),k||(y=n),h.push({isElement:1,isLineBreak:u,isBlock:f.isBlockBoundary(),hasBlockSibling:g,node:f,name:e,allowed:k}),g=u=0)):h.push({isElement:0,node:f,allowed:1});-1<p&&(h[p].firstNotAllowed=1);-1<y&&(h[y].lastNotAllowed=1);return h}function d(b,c){var f=[],g=b.getChildren(),e=g.count(),k,h=0,l=m[c],t=!b.is(m.$inline)||b.is(\"br\");for(t&&f.push(\" \");h<e;h++)k=\ng.getItem(h),a(k)&&!k.is(l)?f=f.concat(d(k,c)):f.push(k);t&&f.push(\" \");return f}function g(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function e(b){return b&&a(b)&&(b.is(m.$removeEmpty)||b.is(\"a\")&&!b.isBlockBoundary())}function k(b,c,d,f){var g=b.clone(),e,h;g.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(e=(new CKEDITOR.dom.walker(g)).next())&&a(e)&&n[e.getName()]&&(h=e.getPrevious())&&a(h)&&!h.getParent().equals(b.startContainer)&&d.contains(h)&&f.contains(e)&&e.isIdentical(h)&&\n(e.moveChildren(h),e.remove(),k(b,c,d,f))}function h(b,c){function d(b,c){if(c.isBlock&&c.isElement&&!c.node.is(\"br\")&&a(b)&&b.is(\"br\"))return b.remove(),1}var f=c.endContainer.getChild(c.endOffset),g=c.endContainer.getChild(c.endOffset-1);f&&d(f,b[b.length-1]);g&&d(g,b[0])&&(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var m=CKEDITOR.dtd,n={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},w={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},v=CKEDITOR.tools.extend({},\nm.$inline);delete v.br;return function(n,E,p,u){var r=n.editor,z=!1;\"unfiltered_html\"==E&&(E=\"html\",z=!0);if(!u.checkReadOnly()){var q=(new CKEDITOR.dom.elementPath(u.startContainer,u.root)).blockLimit||u.root;n={type:E,dontFilter:z,editable:n,editor:r,range:u,blockLimit:q,mergeCandidates:[],zombies:[]};E=n.range;u=n.mergeCandidates;var F,M;\"text\"==n.type&&E.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(F=CKEDITOR.dom.element.createFromHtml(\"\\x3cspan\\x3e\\x26nbsp;\\x3c/span\\x3e\",E.document),E.insertNode(F),\nE.setStartAfter(F));z=new CKEDITOR.dom.elementPath(E.startContainer);n.endPath=q=new CKEDITOR.dom.elementPath(E.endContainer);if(!E.collapsed){var r=q.block||q.blockLimit,W=E.getCommonAncestor();r&&!r.equals(W)&&!r.contains(W)&&E.checkEndOfBlock()&&n.zombies.push(r);E.deleteContents()}for(;(M=g(E))&&a(M)&&M.isBlockBoundary()&&z.contains(M);)E.moveToPosition(M,CKEDITOR.POSITION_BEFORE_END);k(E,n.blockLimit,z,q);F&&(E.setEndBefore(F),E.collapse(),F.remove());F=E.startPath();if(r=F.contains(e,!1,1))E.splitElement(r),\nn.inlineStylesRoot=r,n.inlineStylesPeak=F.lastElement;F=E.createBookmark();(r=F.startNode.getPrevious(c))&&a(r)&&e(r)&&u.push(r);(r=F.startNode.getNext(c))&&a(r)&&e(r)&&u.push(r);for(r=F.startNode;(r=r.getParent())&&e(r);)u.push(r);E.moveToBookmark(F);if(F=p){F=n.range;if(\"text\"==n.type&&n.inlineStylesRoot){M=n.inlineStylesPeak;E=M.getDocument().createText(\"{cke-peak}\");for(u=n.inlineStylesRoot.getParent();!M.equals(u);)E=E.appendTo(M.clone()),M=M.getParent();p=E.getOuterHtml().split(\"{cke-peak}\").join(p)}M=\nn.blockLimit.getName();if(/^\\s+|\\s+$/.test(p)&&\"span\"in CKEDITOR.dtd[M]){var U='\\x3cspan data-cke-marker\\x3d\"1\"\\x3e\\x26nbsp;\\x3c/span\\x3e';p=U+p+U}p=n.editor.dataProcessor.toHtml(p,{context:null,fixForBody:!1,protectedWhitespaces:!!U,dontFilter:n.dontFilter,filter:n.editor.activeFilter,enterMode:n.editor.activeEnterMode});M=F.document.createElement(\"body\");M.setHtml(p);U&&(M.getFirst().remove(),M.getLast().remove());if((U=F.startPath().block)&&(1!=U.getChildCount()||!U.getBogus()))a:{var J;if(1==\nM.getChildCount()&&a(J=M.getFirst())&&J.is(w)&&!J.hasAttribute(\"contenteditable\")){U=J.getElementsByTag(\"*\");F=0;for(u=U.count();F<u;F++)if(E=U.getItem(F),!E.is(v))break a;J.moveChildren(J.getParent(1));J.remove()}}n.dataWrapper=M;F=p}if(F){J=n.range;F=J.document;var L;M=n.blockLimit;u=0;var S,U=[],Q,aa;p=r=0;var V,da;E=J.startContainer;var z=n.endPath.elements[0],ba,q=z.getPosition(E),W=!!z.getCommonAncestor(E)&&q!=CKEDITOR.POSITION_IDENTICAL&&!(q&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);\nE=b(n.dataWrapper,n);for(h(E,J);u<E.length;u++){q=E[u];if(L=q.isLineBreak){L=J;V=M;var X=void 0,ea=void 0;q.hasBlockSibling?L=1:(X=L.startContainer.getAscendant(m.$block,1))&&X.is({div:1,p:1})?(ea=X.getPosition(V),ea==CKEDITOR.POSITION_IDENTICAL||ea==CKEDITOR.POSITION_CONTAINS?L=0:(V=L.splitElement(X),L.moveToPosition(V,CKEDITOR.POSITION_AFTER_START),L=1)):L=0}if(L)p=0<u;else{L=J.startPath();!q.isBlock&&l(n.editor,L.block,L.blockLimit)&&(aa=f(n.editor))&&(aa=F.createElement(aa),aa.appendBogus(),J.insertNode(aa),\nCKEDITOR.env.needsBrFiller&&(S=aa.getBogus())&&S.remove(),J.moveToPosition(aa,CKEDITOR.POSITION_BEFORE_END));if((L=J.startPath().block)&&!L.equals(Q)){if(S=L.getBogus())S.remove(),U.push(L);Q=L}q.firstNotAllowed&&(r=1);if(r&&q.isElement){L=J.startContainer;for(V=null;L&&!m[L.getName()][q.name];){if(L.equals(M)){L=null;break}V=L;L=L.getParent()}if(L)V&&(da=J.splitElement(V),n.zombies.push(da),n.zombies.push(V));else{V=M.getName();ba=!u;L=u==E.length-1;V=d(q.node,V);for(var X=[],ea=V.length,ca=0,ga=\nvoid 0,fa=0,ia=-1;ca<ea;ca++)ga=V[ca],\" \"==ga?(fa||ba&&!ca||(X.push(new CKEDITOR.dom.text(\" \")),ia=X.length),fa=1):(X.push(ga),fa=0);L&&ia==X.length&&X.pop();ba=X}}if(ba){for(;L=ba.pop();)J.insertNode(L);ba=0}else J.insertNode(q.node);q.lastNotAllowed&&u<E.length-1&&((da=W?z:da)&&J.setEndAt(da,CKEDITOR.POSITION_AFTER_START),r=0);J.collapse()}}1!=E.length?S=!1:(S=E[0],S=S.isElement&&\"false\"==S.node.getAttribute(\"contenteditable\"));S&&(p=!0,L=E[0].node,J.setStartAt(L,CKEDITOR.POSITION_BEFORE_START),\nJ.setEndAt(L,CKEDITOR.POSITION_AFTER_END));n.dontMoveCaret=p;n.bogusNeededBlocks=U}S=n.range;var Z;da=n.bogusNeededBlocks;for(ba=S.createBookmark();Q=n.zombies.pop();)Q.getParent()&&(aa=S.clone(),aa.moveToElementEditStart(Q),aa.removeEmptyBlocksAtEnd());if(da)for(;Q=da.pop();)CKEDITOR.env.needsBrFiller?Q.appendBogus():Q.append(S.document.createText(\" \"));for(;Q=n.mergeCandidates.pop();)Q.mergeSiblings();S.moveToBookmark(ba);if(!n.dontMoveCaret){for(Q=g(S);Q&&a(Q)&&!Q.is(m.$empty);){if(Q.isBlockBoundary())S.moveToPosition(Q,\nCKEDITOR.POSITION_BEFORE_END);else{if(e(Q)&&Q.getHtml().match(/(\\s| )$/g)){Z=null;break}Z=S.clone();Z.moveToPosition(Q,CKEDITOR.POSITION_BEFORE_END)}Q=Q.getLast(c)}Z&&S.moveToRange(Z)}}}}(),v=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c);a.append(c,d);return c}\nfunction c(a){var b=a.count(),d;for(b;0<b--;)d=a.getItem(b),CKEDITOR.tools.trim(d.getHtml())||(d.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var f=d.startContainer,g=f.getAscendant(\"table\",1),e=!1;c(g.getElementsByTag(\"td\"));c(g.getElementsByTag(\"th\"));g=d.clone();g.setStart(f,0);g=a(g).lastBackward();g||(g=d.clone(),g.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),e=!0);g||(g=f);g.is(\"table\")?(d.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),\nd.collapse(!0),g.remove()):(g.is({tbody:1,thead:1,tfoot:1})&&(g=b(g,\"tr\",e)),g.is(\"tr\")&&(g=b(g,g.getParent().is(\"thead\")?\"th\":\"td\",e)),(f=g.getBogus())&&f.remove(),d.moveToPosition(g,e?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}(),w={eol:{detect:function(a,b){var c=a.range,d=c.clone(),f=c.clone(),g=new CKEDITOR.dom.elementPath(c.startContainer,b),e=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);f.collapse();g.block&&d.checkBoundaryOfElement(g.block,CKEDITOR.END)&&\n(c.setStartAfter(g.block),a.prependEolBr=1);e.block&&f.checkBoundaryOfElement(e.block,CKEDITOR.START)&&(c.setEndBefore(e.block),a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),d;a.appendEolBr&&(d=this.createEolBr(c),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(c),1)},createEolBr:function(a){return a.createElement(\"br\",{attributes:{\"data-cke-eol\":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;\n!b||!r(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),f=new CKEDITOR.dom.elementPath(d,b),g=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),e;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(f.blockLimit.is({tr:1,table:1})){var k=f.contains(\"table\").getParent();e=function(a){return!a.equals(k)}}else if(f.block&&f.block.is(CKEDITOR.dtd.$listItem)&&(g=g.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),\n!g.equals(c))){var h=f.contains(CKEDITOR.dtd.$list).getParent();e=function(a){return!a.equals(h)}}e||(e=function(a){return!a.equals(f.block)&&!a.equals(f.blockLimit)});this.rebuildFragment(a,b,d,e)},rebuildFragment:function(a,b,c,d){for(var f;c&&!c.equals(b)&&d(c);)f=c.clone(0,1),a.fragment.appendTo(f),a.fragment=f,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,d=a.startOffset,f=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is(\"tr\")&&++d==\nf&&a.shrink(CKEDITOR.SHRINK_TEXT)}}},z=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?\"insertBefore\":\"insertAfter\"](d)}function b(c,d,f){a(d);a(f,1);for(var g;g=f.getNext();)g.insertAfter(d),d=g;q(c)&&c.remove()}function c(a,b){var d=new CKEDITOR.dom.range(a);d.setStartAfter(b.startNode);d.setEndBefore(b.endNode);return d}return{list:{detectMerge:function(a,b){var d=c(b,a.bookmark),f=d.startPath(),g=d.endPath(),e=f.contains(CKEDITOR.dtd.$list),k=g.contains(CKEDITOR.dtd.$list);\na.mergeList=e&&k&&e.getParent().equals(k.getParent())&&!e.equals(k);a.mergeListItems=f.block&&g.block&&f.block.is(CKEDITOR.dtd.$listItem)&&g.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=d.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,f=a.mergeListBookmark.endNode,g=new CKEDITOR.dom.elementPath(d,c),e=new CKEDITOR.dom.elementPath(f,\nc);if(a.mergeList){var k=g.contains(CKEDITOR.dtd.$list),h=e.contains(CKEDITOR.dtd.$list);k.equals(h)||(h.moveChildren(k),h.remove())}a.mergeListItems&&(g=g.contains(CKEDITOR.dtd.$listItem),e=e.contains(CKEDITOR.dtd.$listItem),g.equals(e)||b(e,d,f));d.remove();f.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},\nmerge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,f=a.mergeBlockBookmark.endNode,g=new CKEDITOR.dom.elementPath(d,c),e=new CKEDITOR.dom.elementPath(f,c),g=g.block,e=e.block;g&&e&&!g.equals(e)&&b(e,d,f);d.remove();f.remove()}}},table:function(){function a(c){var f=[],g,e=new CKEDITOR.dom.walker(c),k=c.startPath().contains(d),h=c.endPath().contains(d),m={};e.guard=function(a,e){if(a.type==CKEDITOR.NODE_ELEMENT){var l=\"visited_\"+(e?\"out\":\"in\");if(a.getCustomData(l))return;\nCKEDITOR.dom.element.setMarker(m,a,l,1)}if(e&&k&&a.equals(k))g=c.clone(),g.setEndAt(k,CKEDITOR.POSITION_BEFORE_END),f.push(g);else if(!e&&h&&a.equals(h))g=c.clone(),g.setStartAt(h,CKEDITOR.POSITION_AFTER_START),f.push(g);else{if(l=!e)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!k||b(a,k))&&(!h||b(a,h));l&&(g=c.clone(),g.selectNodeContents(a),f.push(g))}};e.lastForward();CKEDITOR.dom.element.clearAllMarkers(m);return f}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,\nf=a.getPosition(c);return f===CKEDITOR.POSITION_IDENTICAL?!1:0===(f&d)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),f=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++f};c.checkForward();if(1<f){var c=b.startPath().contains(\"table\"),g=b.endPath().contains(\"table\");c&&g&&b.checkBoundaryOfElement(c,CKEDITOR.START)&&b.checkBoundaryOfElement(g,CKEDITOR.END)&&(b=a.range.clone(),\nb.setStartBefore(c),b.setEndAfter(g),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(f,g){var e=c(g,f.bookmark),k=e.clone(),h,m,l=e.getCommonAncestor();l.is(CKEDITOR.dtd.$tableContent)&&!l.is(d)&&(l=l.getAscendant(\"table\",!0));m=l;l=new CKEDITOR.dom.elementPath(e.startContainer,m);m=new CKEDITOR.dom.elementPath(e.endContainer,m);l=l.contains(\"table\");m=m.contains(\"table\");if(l||m)l&&m&&b(l,m)?(f.tableSurroundingRange=k,k.setStartAt(l,CKEDITOR.POSITION_AFTER_END),k.setEndAt(m,CKEDITOR.POSITION_BEFORE_START),\nk=e.clone(),k.setEndAt(l,CKEDITOR.POSITION_AFTER_END),h=e.clone(),h.setStartAt(m,CKEDITOR.POSITION_BEFORE_START),h=a(k).concat(a(h))):l?m||(f.tableSurroundingRange=k,k.setStartAt(l,CKEDITOR.POSITION_AFTER_END),e.setEndAt(l,CKEDITOR.POSITION_AFTER_END)):(f.tableSurroundingRange=k,k.setEndAt(m,CKEDITOR.POSITION_BEFORE_START),e.setStartAt(m,CKEDITOR.POSITION_AFTER_START)),f.tableContentsRanges=h?h:a(e)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),q(b.startContainer)&&\nb.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,c=a.range.clone(),b=b.createElement(\"p\");b.insertBefore(a.purgeTableBookmark.startNode);c.moveToBookmark(a.purgeTableBookmark);c.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},\nfixUneditableRangePosition:function(a){a.startContainer.getDtd()[\"#\"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var c=b.startPath(),d;l(a,c.block,c.blockLimit)&&(d=f(a))&&(d=b.document.createElement(d),d.appendBogus(),b.insertNode(d),b.moveToPosition(d,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function a(){var a=this._.fakeSelection,b;a&&(b=this.getSelection(1),b&&b.isHidden()||(a.reset(),a=0));if(!a&&(a=b||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;\nthis.fire(\"selectionCheck\",a);b=this.elementPath();b.compare(this._.selectionPreviousPath)||(CKEDITOR.env.webkit&&(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=b,this.fire(\"selectionChange\",{selection:a,path:b}))}function e(){p=!0;r||(b.call(this),r=CKEDITOR.tools.setTimeout(b,200,this))}function b(){r=null;p&&(CKEDITOR.tools.setTimeout(a,0,this),p=!1)}function c(a){return u(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function d(a){function b(c,\nd){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()[\"moveToElementEdit\"+(d?\"End\":\"Start\")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var d=a.startContainer,f=a.getPreviousNode(c,null,d),g=a.getNextNode(c,null,d);return b(f)||b(g,1)||!(f||g||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()&&d.getBogus())?!0:!1}function m(a){return a.getCustomData(\"cke-fillingChar\")}function l(a,b){var c=a&&a.removeCustomData(\"cke-fillingChar\");if(c){if(!1!==b){var d,g=a.getDocument().getSelection().getNative(),\ne=g&&\"None\"!=g.type&&g.getRangeAt(0);1<c.getLength()&&e&&e.intersectsNode(c.$)&&(d=h(g),e=g.focusNode==c.$&&0<g.focusOffset,g.anchorNode==c.$&&0<g.anchorOffset&&d[0].offset--,e&&d[1].offset--)}c.setText(f(c.getText()));d&&k(a.getDocument().$,d)}}function f(a){return a.replace(/\\u200B( )?/g,function(a){return a[1]?\" \":\"\"})}function h(a){return[{node:a.anchorNode,offset:a.anchorOffset},{node:a.focusNode,offset:a.focusOffset}]}function k(a,b){var c=a.getSelection(),d=a.createRange();d.setStart(b[0].node,\nb[0].offset);d.collapse(!0);c.removeAllRanges();c.addRange(d);c.extend(b[1].node,b[1].offset)}function g(a){var b=CKEDITOR.dom.element.createFromHtml('\\x3cdiv data-cke-hidden-sel\\x3d\"1\" data-cke-temp\\x3d\"1\" style\\x3d\"'+(CKEDITOR.env.ie?\"display:none\":\"position:fixed;top:0;left:-1000px\")+'\"\\x3e\\x26nbsp;\\x3c/div\\x3e',a.document);a.fire(\"lockSnapshot\");a.editable().append(b);var c=a.getSelection(1),d=a.createRange(),f=c.root.on(\"selectionchange\",function(a){a.cancel()},null,null,0);d.setStartAt(b,CKEDITOR.POSITION_AFTER_START);\nd.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([d]);f.removeListener();a.fire(\"unlockSnapshot\");a._.hiddenSelectionContainer=b}function n(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var f=a.getSelection().getRanges(),g=f[0];1==f.length&&g.collapsed&&(d=g[38>d?\"getPreviousEditableNode\":\"getNextEditableNode\"]())&&d.type==CKEDITOR.NODE_ELEMENT&&\"false\"==d.getAttribute(\"contenteditable\")&&(a.getSelection().fake(d),c.data.preventDefault(),c.cancel())}}}\nfunction q(a){for(var b=0;b<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var d=c.startContainer,f;d&&!((f=d.type==CKEDITOR.NODE_ELEMENT)&&d.is(\"body\")||!d.isReadOnly());)f&&\"false\"==d.getAttribute(\"contentEditable\")&&c.setStartAfter(d),d=d.getParent();d=c.startContainer;f=c.endContainer;var g=c.startOffset,e=c.endOffset,k=c.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(g>=d.getLength()?k.setStartAfter(d):k.setStartBefore(d));\nf&&f.type==CKEDITOR.NODE_TEXT&&(e?k.setEndAfter(f):k.setEndBefore(f));d=new CKEDITOR.dom.walker(k);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var f=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(k.endContainer)&CKEDITOR.POSITION_CONTAINS||(f.setStartAfter(d),f.collapsed||a.splice(b+1,0,f));return!0}return!1};d.next()}}return a}var r,p,u=CKEDITOR.dom.walker.invisible(1),v=function(){function a(b){return function(a){var c=a.editor.createRange();\nc.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return!1}}function b(a){return function(b){var c=b.editor,d=c.createRange(),f;(f=d.moveToClosestEditablePosition(b.selected,a))||(f=d.moveToClosestEditablePosition(b.selected,!a));f&&c.getSelection().selectRanges([d]);c.fire(\"saveSnapshot\");b.selected.remove();f||(d.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([d]));c.fire(\"saveSnapshot\");return!1}}var c=a(),d=a(1);return{37:c,38:c,\n39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on(\"instanceCreated\",function(b){function c(){var a=d.getSelection();a&&a.removeAllRanges()}var d=b.editor;d.on(\"contentDom\",function(){function b(){p=new CKEDITOR.dom.selection(d.getSelection());p.lock()}function c(){g.removeListener(\"mouseup\",c);m.removeListener(\"mouseup\",c);var a=CKEDITOR.document.$.selection,b=a.createRange();\"None\"!=a.type&&b.parentElement().ownerDocument==f.$&&b.select()}var f=d.document,g=CKEDITOR.document,k=d.editable(),h=f.getBody(),m=\nf.getDocumentElement(),t=k.isInline(),E,p;CKEDITOR.env.gecko&&k.attachListener(k,\"focus\",function(a){a.removeListener();0!==E&&(a=d.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==k.$&&(a=d.createRange(),a.moveToElementEditStart(k),a.select())},null,null,-2);k.attachListener(k,CKEDITOR.env.webkit?\"DOMFocusIn\":\"focus\",function(){E&&CKEDITOR.env.webkit&&(E=d._.previousActive&&d._.previousActive.equals(f.getActive()));d.unlockSelection(E);E=0},null,null,-1);k.attachListener(k,\"mousedown\",function(){E=\n0});if(CKEDITOR.env.ie||t)w?k.attachListener(k,\"beforedeactivate\",b,null,null,-1):k.attachListener(d,\"selectionCheck\",b,null,null,-1),k.attachListener(k,CKEDITOR.env.webkit?\"DOMFocusOut\":\"blur\",function(){d.lockSelection(p);E=1},null,null,-1),k.attachListener(k,\"mousedown\",function(){E=0});if(CKEDITOR.env.ie&&!t){var v;k.attachListener(k,\"mousedown\",function(a){2==a.data.$.button&&((a=d.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(v=d.window.getScrollPosition()))});k.attachListener(k,\n\"mouseup\",function(a){2==a.data.$.button&&v&&(d.document.$.documentElement.scrollLeft=v.x,d.document.$.documentElement.scrollTop=v.y);v=null});if(\"BackCompat\"!=f.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)m.on(\"mousedown\",function(a){function b(a){a=a.data.$;if(d){var c=h.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(f){}d.setEndPoint(0>e.compareEndPoints(\"StartToStart\",c)?\"EndToEnd\":\"StartToStart\",c);d.select()}}function c(){m.removeListener(\"mousemove\",b);\ng.removeListener(\"mouseup\",c);m.removeListener(\"mouseup\",c);d.select()}a=a.data;if(a.getTarget().is(\"html\")&&a.$.y<m.$.clientHeight&&a.$.x<m.$.clientWidth){var d=h.$.createTextRange();try{d.moveToPoint(a.$.clientX,a.$.clientY)}catch(f){}var e=d.duplicate();m.on(\"mousemove\",b);g.on(\"mouseup\",c);m.on(\"mouseup\",c)}});if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)m.on(\"mousedown\",function(a){a.data.getTarget().is(\"html\")&&(g.on(\"mouseup\",c),m.on(\"mouseup\",c))})}}k.attachListener(k,\"selectionchange\",\na,d);k.attachListener(k,\"keyup\",e,d);k.attachListener(k,CKEDITOR.env.webkit?\"DOMFocusIn\":\"focus\",function(){d.forceNextSelectionCheck();d.selectionChange(1)});if(t&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var u;k.attachListener(k,\"mousedown\",function(){u=1});k.attachListener(f.getDocumentElement(),\"mouseup\",function(){u&&e.call(d);u=0})}else k.attachListener(CKEDITOR.env.ie?k:f.getDocumentElement(),\"mouseup\",e,d);CKEDITOR.env.webkit&&k.attachListener(f,\"keydown\",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:l(k)}},\nnull,null,-1);k.attachListener(k,\"keydown\",n(d),null,null,-1)});d.on(\"setData\",function(){d.unlockSelection();CKEDITOR.env.webkit&&c()});d.on(\"contentDomUnload\",function(){d.unlockSelection()});if(CKEDITOR.env.ie9Compat)d.on(\"beforeDestroy\",c,null,null,9);d.on(\"dataReady\",function(){delete d._.fakeSelection;delete d._.hiddenSelectionContainer;d.selectionChange(1)});d.on(\"loadSnapshot\",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=d.editable().getLast(a);b&&b.hasAttribute(\"data-cke-hidden-sel\")&&\n(b.remove(),CKEDITOR.env.gecko&&(a=d.editable().getFirst(a))&&a.is(\"br\")&&a.getAttribute(\"_moz_editor_bogus_node\")&&a.remove())},null,null,100);d.on(\"key\",function(a){if(\"wysiwyg\"==d.mode){var b=d.getSelection();if(b.isFake){var c=v[a.data.keyCode];if(c)return c({editor:d,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});CKEDITOR.on(\"instanceReady\",function(a){function b(){var a=d.editable();if(a&&(a=m(a))){var c=d.document.$.getSelection();\"None\"==c.type||c.anchorNode!=a.$&&c.focusNode!=\na.$||(e=h(c));g=a.getText();a.setText(f(g))}}function c(){var a=d.editable();a&&(a=m(a))&&(a.setText(g),e&&(k(d.document.$,e),e=null))}var d=a.editor,g,e;CKEDITOR.env.webkit&&(d.on(\"selectionChange\",function(){var a=d.editable(),b=m(a);b&&(b.getCustomData(\"ready\")?l(a):b.setCustomData(\"ready\",1))},null,null,-1),d.on(\"beforeSetMode\",function(){l(d.editable())},null,null,-1),d.on(\"beforeUndoImage\",b),d.on(\"afterUndoImage\",c),d.on(\"beforeGetData\",b,null,null,0),d.on(\"getData\",c))});CKEDITOR.editor.prototype.selectionChange=\nfunction(b){(b?a:e).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&\"wysiwyg\"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;\nreturn b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;\nCKEDITOR.SELECTION_ELEMENT=3;var w=\"function\"!=typeof window.getSelection,z=1;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:z++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var d,\nf;if(a)if(a.getRangeAt)d=(f=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(f.commonAncestorContainer);else{try{f=a.createRange()}catch(g){}d=f&&CKEDITOR.dom.element.get(f.item&&f.item(0)||f.parentElement())}if(!d||d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText=\"\",this._.cache.ranges=new CKEDITOR.dom.rangeList;\nreturn this};var B={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=w?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:w?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;\n\"Text\"==d&&(b=CKEDITOR.SELECTION_TEXT);\"Control\"==d&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(f){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),d=c.startContainer;d==c.endContainer&&1==d.nodeType&&1==c.endOffset-c.startOffset&&B[d.childNodes[c.startOffset].nodeName.toLowerCase()]&&\n(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=w?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var f=d.children,g,e,k=b.duplicate(),h=0,m=f.length-1,l=-1,n,p;h<=m;)if(l=Math.floor((h+m)/2),g=f[l],k.moveToElementText(g),n=k.compareEndPoints(\"StartToStart\",b),0<n)m=l-1;else if(0>n)h=l+1;else return{container:d,offset:a(g)};\nif(-1==l||l==f.length-1&&0>n){k.moveToElementText(d);k.setEndPoint(\"StartToStart\",b);k=k.text.replace(/(\\r\\n|\\r)/g,\"\\n\").length;f=d.childNodes;if(!k)return g=f[f.length-1],g.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:f.length}:{container:g,offset:g.nodeValue.length};for(d=f.length;0<k&&0<d;)e=f[--d],e.nodeType==CKEDITOR.NODE_TEXT&&(p=e,k-=e.nodeValue.length);return{container:p,offset:-k}}k.collapse(0<n?!0:!1);k.setEndPoint(0<n?\"StartToStart\":\"EndToStart\",b);k=k.text.replace(/(\\r\\n|\\r)/g,\"\\n\").length;\nif(!k)return{container:d,offset:a(g)+(0<n?0:1)};for(;0<k;)try{e=g[0<n?\"previousSibling\":\"nextSibling\"],e.nodeType==CKEDITOR.NODE_TEXT&&(k-=e.nodeValue.length,p=e),g=e}catch(w){return{container:d,offset:a(g)}}return{container:p,offset:0<n?-k:p.nodeValue.length+k}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),d=b(c,!0),a.setStart(new CKEDITOR.dom.node(d.container),d.offset),d=b(c),\na.setEnd(new CKEDITOR.dom.node(d.container),d.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],f=0;f<c.length;f++){for(var g=c.item(f),e=g.parentNode,k=0,a=new CKEDITOR.dom.range(this.root);k<e.childNodes.length&&e.childNodes[k]!=g;k++);a.setStart(new CKEDITOR.dom.node(e),k);a.setEnd(new CKEDITOR.dom.node(e),k+1);d.push(a)}return d}return[]}}():function(){var a=\n[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var f=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(f.startContainer),f.startOffset);b.setEnd(new CKEDITOR.dom.node(f.endContainer),f.endOffset);a.push(b)}return a};return function(b){var c=this._.cache,d=c.ranges;d||(c.ranges=d=new CKEDITOR.dom.rangeList(a.call(this)));return b?q(new CKEDITOR.dom.rangeList(d.slice())):d}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;\nvar b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed)b=c.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(c.optimize();b=c.startContainer,c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary();)c.setStartAfter(b);b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();if((b=b.getChild(c.startOffset))&&b.type==\nCKEDITOR.NODE_ELEMENT)for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;)b=c,c=c.getFirst();else b=c.startContainer}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,f=2;f&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&B[c.getName()]&&\n(d=c));f--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var b=this.getNative(),b=w?\"Control\"==b.type?\"\":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=\nthis.getSelectedElement(),c=!b&&this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();a&&(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant(\"body\",1)&&(d?this.fake(b):b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty();a.fire(\"lockSnapshot\");b.remove();a.fire(\"unlockSnapshot\");!c&&\na.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn(\"selection-fake-reset\");this.rev=z++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,b=b&&b._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,c,f=0;f<a.length;++f)c=a[f],c.endContainer.equals(b)&&(c.endOffset=Math.min(c.endOffset,b.getChildCount()));if(a.length)if(this.isLocked){var g=CKEDITOR.document.getActive();\nthis.unlock();this.selectRanges(a);this.lock();g&&!g.equals(this.root)&&g.focus()}else{var e;a:{var k,h;if(1==a.length&&!(h=a[0]).collapsed&&(e=h.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&(h=h.clone(),h.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(k=h.getEnclosedNode())&&k.type==CKEDITOR.NODE_ELEMENT&&(e=k),\"false\"==e.getAttribute(\"contenteditable\")))break a;e=void 0}if(e)this.fake(e);else{if(w){h=CKEDITOR.dom.walker.whitespaces(!0);k=/\\ufeff|\\u00a0/;b={table:1,tbody:1,tr:1};1<a.length&&(e=a[a.length-\n1],a[0].setEnd(e.endContainer,e.endOffset));e=a[0];a=e.collapsed;var m,n,p;if((c=e.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in B&&(!c.is(\"a\")||!c.getText()))try{p=c.$.createControlRange();p.addElement(c.$);p.select();return}catch(E){}if(e.startContainer.type==CKEDITOR.NODE_ELEMENT&&e.startContainer.getName()in b||e.endContainer.type==CKEDITOR.NODE_ELEMENT&&e.endContainer.getName()in b)e.shrink(CKEDITOR.NODE_ELEMENT,!0),a=e.collapsed;p=e.createBookmark();b=p.startNode;a||(g=p.endNode);\np=e.document.$.body.createTextRange();p.moveToElementText(b.$);p.moveStart(\"character\",1);g?(k=e.document.$.body.createTextRange(),k.moveToElementText(g.$),p.setEndPoint(\"EndToEnd\",k),p.moveEnd(\"character\",-1)):(m=b.getNext(h),n=b.hasAscendant(\"pre\"),m=!(m&&m.getText&&m.getText().match(k))&&(n||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is(\"br\")),n=e.document.createElement(\"span\"),n.setHtml(\"\\x26#65279;\"),n.insertBefore(b),m&&e.document.createText(\"\").insertBefore(b));e.setStartBefore(b);\nb.remove();a?(m?(p.moveStart(\"character\",-1),p.select(),e.document.$.selection.clear()):p.select(),e.moveToPosition(n,CKEDITOR.POSITION_BEFORE_START),n.remove()):(e.setEndBefore(g),g.remove(),p.select())}else{g=this.getNative();if(!g)return;this.removeAllRanges();for(p=0;p<a.length;p++){if(p<a.length-1&&(m=a[p],n=a[p+1],k=m.clone(),k.setStart(m.endContainer,m.endOffset),k.setEnd(n.startContainer,n.startOffset),!k.collapsed&&(k.shrink(CKEDITOR.NODE_ELEMENT,!0),e=k.getCommonAncestor(),k=k.getEnclosedNode(),\ne.isReadOnly()||k&&k.isReadOnly()))){n.setStart(m.startContainer,m.startOffset);a.splice(p--,1);continue}e=a[p];n=this.document.$.createRange();e.collapsed&&CKEDITOR.env.webkit&&d(e)&&(m=this.root,l(m,!1),k=m.getDocument().createText(\"​\"),m.setCustomData(\"cke-fillingChar\",k),e.insertNode(k),(m=k.getNext())&&!k.getPrevious()&&m.type==CKEDITOR.NODE_ELEMENT&&\"br\"==m.getName()?(l(this.root),e.moveToPosition(m,CKEDITOR.POSITION_BEFORE_START)):e.moveToPosition(k,CKEDITOR.POSITION_AFTER_END));n.setStart(e.startContainer.$,\ne.startOffset);try{n.setEnd(e.endContainer.$,e.endOffset)}catch(v){if(0<=v.toString().indexOf(\"NS_ERROR_ILLEGAL_VALUE\"))e.collapse(1),n.setEnd(e.endContainer.$,e.endOffset);else throw v;}g.addRange(n)}}this.reset();this.root.fire(\"selectionchange\")}}},fake:function(a){var b=this.root.editor;this.reset();g(b);var c=this._.cache,d=new CKEDITOR.dom.range(this.root);d.setStartBefore(a);d.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(d);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT;\nc.selectedText=c.nativeSel=null;this.isFake=1;this.rev=z++;b._.fakeSelection=this;this.root.fire(\"selectionchange\")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data(\"cke-hidden-sel\"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=\n[],c,d=0;d<a.length;d++){var f=new CKEDITOR.dom.range(this.root);f.moveToBookmark(a[d]);b.push(f)}a.isFake&&(c=b[0].getEnclosedNode(),c&&c.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn(\"selection-not-fake\"),a.isFake=0));a.isFake?this.fake(c):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},\nremoveAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[w?\"empty\":\"removeAllRanges\"]()}catch(b){}this.reset()}}}}(),\"use strict\",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function a(a,b){for(var c,d;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute(\"data-nostyle\"))c=a;else if(!d){var f=a.getAttribute(\"contentEditable\");\"false\"==f?c=a:\"true\"==f&&(d=1)}return c}function e(a,b,c,d){return(a.getPosition(b)|d)==d&&\n(!c.childRule||c.childRule(a))}function b(c){var f=c.document;if(c.collapsed)f=w(this,f),c.insertNode(f),c.moveToPosition(f,CKEDITOR.POSITION_BEFORE_END);else{var g=this.element,k=this._.definition,h,m=k.ignoreReadonly,l=m||k.includeReadonly;null==l&&(l=c.root.getCustomData(\"cke_includeReadonly\"));var n=CKEDITOR.dtd[g];n||(h=!0,n=CKEDITOR.dtd.span);c.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.trim();var v=c.createBookmark(),u=v.startNode,r=v.endNode,z=u,t;if(!m){var q=c.getCommonAncestor(),m=a(u,q),q=a(r,\nq);m&&(z=m.getNextSourceNode(!0));q&&(r=q)}for(z.getPosition(r)==CKEDITOR.POSITION_FOLLOWING&&(z=0);z;){m=!1;if(z.equals(r))z=null,m=!0;else{var B=z.type==CKEDITOR.NODE_ELEMENT?z.getName():null,q=B&&\"false\"==z.getAttribute(\"contentEditable\"),y=B&&z.getAttribute(\"data-nostyle\");if(B&&z.data(\"cke-bookmark\")){z=z.getNextSourceNode(!0);continue}if(q&&l&&CKEDITOR.dtd.$block[B])for(var C=z,x=d(C),A=void 0,D=x.length,G=0,C=D&&new CKEDITOR.dom.range(C.getDocument());G<D;++G){var A=x[G],ga=CKEDITOR.filter.instances[A.data(\"cke-filter\")];\nif(ga?ga.check(this):1)C.selectNodeContents(A),b.call(this,C)}x=B?!n[B]||y?0:q&&!l?0:e(z,r,k,H):1;if(x)if(A=z.getParent(),x=k,D=g,G=h,!A||!(A.getDtd()||CKEDITOR.dtd.span)[D]&&!G||x.parentRule&&!x.parentRule(A))m=!0;else{if(t||B&&CKEDITOR.dtd.$removeEmpty[B]&&(z.getPosition(r)|H)!=H||(t=c.clone(),t.setStartBefore(z)),B=z.type,B==CKEDITOR.NODE_TEXT||q||B==CKEDITOR.NODE_ELEMENT&&!z.getChildCount()){for(var B=z,fa;(m=!B.getNext(F))&&(fa=B.getParent(),n[fa.getName()])&&e(fa,u,k,K);)B=fa;t.setEndAfter(B)}}else m=\n!0;z=z.getNextSourceNode(y||q)}if(m&&t&&!t.collapsed){for(var m=w(this,f),q=m.hasAttributes(),y=t.getCommonAncestor(),B={},x={},A={},D={},I,Z,ha;m&&y;){if(y.getName()==g){for(I in k.attributes)!D[I]&&(ha=y.getAttribute(Z))&&(m.getAttribute(I)==ha?x[I]=1:D[I]=1);for(Z in k.styles)!A[Z]&&(ha=y.getStyle(Z))&&(m.getStyle(Z)==ha?B[Z]=1:A[Z]=1)}y=y.getParent()}for(I in x)m.removeAttribute(I);for(Z in B)m.removeStyle(Z);q&&!m.hasAttributes()&&(m=null);m?(t.extractContents().appendTo(m),t.insertNode(m),p.call(this,\nm),m.mergeSiblings(),CKEDITOR.env.ie||m.$.normalize()):(m=new CKEDITOR.dom.element(\"span\"),t.extractContents().appendTo(m),t.insertNode(m),p.call(this,m),m.remove(!0));t=null}}c.moveToBookmark(v);c.shrink(CKEDITOR.SHRINK_TEXT);c.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function c(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(m.getParent()),f=null,g=null,e=0;e<a.elements.length;e++){var k=a.elements[e];if(k==a.block||k==a.blockLimit)break;l.checkElementRemovable(k,\n!0)&&(f=k)}for(e=0;e<c.elements.length;e++){k=c.elements[e];if(k==c.block||k==c.blockLimit)break;l.checkElementRemovable(k,!0)&&(g=k)}g&&m.breakParent(g);f&&d.breakParent(f)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=a.createBookmark(),d=c.startNode;if(a.collapsed){for(var f=new CKEDITOR.dom.elementPath(d.getParent(),a.root),g,e=0,k;e<f.elements.length&&(k=f.elements[e])&&k!=f.block&&k!=f.blockLimit;e++)if(this.checkElementRemovable(k)){var h;a.collapsed&&(a.checkBoundaryOfElement(k,CKEDITOR.END)||\n(h=a.checkBoundaryOfElement(k,CKEDITOR.START)))?(g=k,g.match=h?\"start\":\"end\"):(k.mergeSiblings(),k.is(this.element)?r.call(this,k):u(k,t(this)[k.getName()]))}if(g){k=d;for(e=0;;e++){h=f.elements[e];if(h.equals(g))break;else if(h.match)continue;else h=h.clone();h.append(k);k=h}k[\"start\"==g.match?\"insertBefore\":\"insertAfter\"](g)}}else{var m=c.endNode,l=this;b();for(f=d;!f.equals(m);)g=f.getNextSourceNode(),f.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(f)&&(f.getName()==this.element?r.call(this,\nf):u(f,t(this)[f.getName()]),g.type==CKEDITOR.NODE_ELEMENT&&g.contains(d)&&(b(),g=d.getNext())),f=g}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function d(a){var b=[];a.forEach(function(a){if(\"true\"==a.getAttribute(\"contenteditable\"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function m(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&z(a,this)}function l(a){var b=a.getCommonAncestor(!0,\n!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var f in b.styles)b.styles.hasOwnProperty(f)&&a.removeStyle(f)}}function f(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var d,f=a.document,g;d=c.getNextParagraph();)!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):\n1)&&(g=w(this,f,d),k(d,g));a.moveToBookmark(b)}function h(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,f;d=c.getNextParagraph();)this.checkElementRemovable(d)&&(d.is(\"pre\")?((f=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?\"p\":\"div\"))&&d.copyAttributes(f),k(d,f)):r.call(this,d));a.moveToBookmark(b)}function k(a,b){var c=!b;c&&(b=a.getDocument().createElement(\"div\"),\na.copyAttributes(b));var d=b&&b.is(\"pre\"),f=a.is(\"pre\"),e=!d&&f;if(d&&!f){f=b;(e=a.getBogus())&&e.remove();e=a.getHtml();e=n(e,/(?:^[ \\t\\n\\r]+)|(?:[ \\t\\n\\r]+$)/g,\"\");e=e.replace(/[ \\t\\r\\n]*(<br[^>]*>)[ \\t\\r\\n]*/gi,\"$1\");e=e.replace(/([ \\t\\n\\r]+| )/g,\" \");e=e.replace(/<br\\b[^>]*>/gi,\"\\n\");if(CKEDITOR.env.ie){var k=a.getDocument().createElement(\"div\");k.append(f);f.$.outerHTML=\"\\x3cpre\\x3e\"+e+\"\\x3c/pre\\x3e\";f.copyAttributes(k.getFirst());f=k.getFirst().remove()}else f.setHtml(e);b=f}else e?b=q(c?\n[a.getHtml()]:g(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,h;(h=c.getPrevious(I))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is(\"pre\")&&(d=n(h.getHtml(),/\\n$/,\"\")+\"\\n\\n\"+n(c.getHtml(),/^\\n/,\"\"),CKEDITOR.env.ie?c.$.outerHTML=\"\\x3cpre\\x3e\"+d+\"\\x3c/pre\\x3e\":c.setHtml(d),h.remove())}else c&&v(b)}function g(a){var b=[];n(a.getOuterHtml(),/(\\S\\s*)\\n(?:\\s|(<span[^>]+data-cke-bookmark.*?\\/span>))*\\n(?!$)/gi,function(a,b,c){return b+\"\\x3c/pre\\x3e\"+c+\"\\x3cpre\\x3e\"}).replace(/<pre\\b.*?>([\\s\\S]*?)<\\/pre>/gi,function(a,\nc){b.push(c)});return b}function n(a,b,c){var d=\"\",f=\"\";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\\/span>)|(<span[^>]+data-cke-bookmark.*?\\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(f=c);return\"\"});return d+a.replace(b,c)+f}function q(a,b){var c;1<a.length&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var d=0;d<a.length;d++){var f=a[d],f=f.replace(/(\\r\\n|\\r)/g,\"\\n\"),f=n(f,/^[ \\t]*\\n/,\"\"),f=n(f,/\\n$/,\"\"),f=n(f,/^[ \\t]+|[ \\t]+$/g,function(a,b){return 1==a.length?\"\\x26nbsp;\":b?\" \"+CKEDITOR.tools.repeat(\"\\x26nbsp;\",\na.length-1):CKEDITOR.tools.repeat(\"\\x26nbsp;\",a.length-1)+\" \"}),f=f.replace(/\\n/g,\"\\x3cbr\\x3e\"),f=f.replace(/[ \\t]{2,}/g,function(a){return CKEDITOR.tools.repeat(\"\\x26nbsp;\",a.length-1)+\" \"});if(c){var g=b.clone();g.setHtml(f);c.append(g)}else b.setHtml(f)}return c||b}function r(a,b){var c=this._.definition,d=c.attributes,c=c.styles,f=t(this)[a.getName()],g=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),e;for(e in d)if(\"class\"!=e&&!this._.definition.fullMatch||a.getAttribute(e)==y(e,d[e]))b&&\n\"data-\"==e.slice(0,5)||(g=a.hasAttribute(e),a.removeAttribute(e));for(var k in c)this._.definition.fullMatch&&a.getStyle(k)!=y(k,c[k],!0)||(g=g||!!a.getStyle(k),a.removeStyle(k));u(a,f,x[a.getName()]);g&&(this._.definition.alwaysRemoveElement?v(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?v(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?\"p\":\"div\"))}function p(a){for(var b=t(this),c=a.getElementsByTag(this.element),d,f=c.count();0<=--f;)d=c.getItem(f),\nd.isReadOnly()||r.call(this,d,!0);for(var g in b)if(g!=this.element)for(c=a.getElementsByTag(g),f=c.count()-1;0<=f;f--)d=c.getItem(f),d.isReadOnly()||u(d,b[g])}function u(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var f=b[d][0],g;if(g=a.getAttribute(f)){var e=b[d][1];(null===e||e.test&&e.test(g)||\"string\"==typeof e&&g==e)&&a.removeAttribute(f)}}c||v(a)}function v(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(I),d=a.getNext(I);!c||c.type!=CKEDITOR.NODE_TEXT&&\nc.isBlockBoundary({br:1})||a.append(\"br\",1);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append(\"br\");a.remove(!0)}else c=a.getFirst(),d=a.getLast(),a.remove(!0),c&&(c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings(),d&&!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings())}function w(a,b,c){var d;d=a.element;\"*\"==d&&(d=\"span\");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=z(d,a);b.getCustomData(\"doc_processing_style\")&&d.hasAttribute(\"id\")?d.removeAttribute(\"id\"):\nb.setCustomData(\"doc_processing_style\",1);return d}function z(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var f in d)a.setAttribute(f,d[f]);c&&a.setAttribute(\"style\",c);return a}function B(a,b){for(var c in a)a[c]=a[c].replace(G,function(a,c){return b[c]})}function t(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var f=c[d],g,e;\"string\"==typeof f?\ng=f.toLowerCase():(g=f.element?f.element.toLowerCase():a.element,e=f.attributes);f=b[g]||(b[g]={});if(e){var f=f.attributes=f.attributes||[],k;for(k in e)f.push([k.toLowerCase(),e[k]])}}}return b}function y(a,b,c){var d=new CKEDITOR.dom.element(\"span\");d[c?\"setStyle\":\"setAttribute\"](a,b);return d[c?\"getStyle\":\"getAttribute\"](a)}function C(a,b,c){var d=a.document,f=a.getRanges();b=b?this.removeFromRange:this.applyToRange;for(var g,e=f.createIterator();g=e.getNextRange();)b.call(this,g,c);a.selectRanges(f);\nd.removeCustomData(\"doc_processing_style\")}var x={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},A={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},D=/\\s*(?:;\\s*|$)/,G=/#\\((.+?)\\)/g,F=CKEDITOR.dom.walker.bookmark(0,1),I=CKEDITOR.dom.walker.whitespaces(1);\nCKEDITOR.style=function(a,b){if(\"string\"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;c&&c.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style)),delete c.style);b&&(a=CKEDITOR.tools.clone(a),B(a.attributes,b),B(a.styles,b));c=this.element=a.element?\"string\"==typeof a.element?a.element.toLowerCase():a.element:\"*\";this.type=a.type||(x[c]?CKEDITOR.STYLE_BLOCK:A[c]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);\"object\"==typeof this.element&&\n(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return C.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);C.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return C.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;\nb||(this._.enterMode=a.activeEnterMode);C.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?f:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?c:this.type==CKEDITOR.STYLE_BLOCK?h:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.removeFromRange(a)},applyToObject:function(a){z(a,this)},\ncheckActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,d=0,f;d<c.length;d++)if(f=c[d],this.type!=CKEDITOR.STYLE_INLINE||f!=a.block&&f!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var g=f.getName();if(!(\"string\"==typeof this.element?g==this.element:g in this.element))continue}if(this.checkElementRemovable(f,!0,b))return!0}}return!1},checkApplicable:function(a,\nb,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(a,b){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return!1;var d=a.getName();if(\"string\"==typeof this.element?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return!0;if(d=c._AC)c=d;else{var d={},f=0,g=c.attributes;\nif(g)for(var e in g)f++,d[e]=g[e];if(e=CKEDITOR.style.getStyleText(c))d.style||f++,d.style=e;d._length=f;c=c._AC=d}if(c._length){for(var k in c)if(\"_length\"!=k){f=a.getAttribute(k)||\"\";if(\"style\"==k)a:{d=c[k];\"string\"==typeof d&&(d=CKEDITOR.tools.parseCssText(d));\"string\"==typeof f&&(f=CKEDITOR.tools.parseCssText(f,!0));e=void 0;for(e in d)if(!(e in f)||f[e]!=d[e]&&\"inherit\"!=d[e]&&\"inherit\"!=f[e]){d=!1;break a}d=!0}else d=c[k]==f;if(d){if(!b)return!0}else if(b)return!1}if(b)return!0}else return!0}return!1},\ncheckElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return!0;if(b=t(this)[a.getName()]){var d;if(!(b=b.attributes))return!0;for(c=0;c<b.length;c++)if(d=b[c][0],d=a.getAttribute(d)){var f=b[c][1];if(null===f)return!0;if(\"string\"==typeof f){if(d==f)return!0}else if(f.test(d))return!0}}return!1},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;\"bdo\"==d&&(d=\"span\");var c=[\"\\x3c\",d],f=b.attributes;if(f)for(var g in f)c.push(\" \",g,'\\x3d\"',f[g],'\"');(f=CKEDITOR.style.getStyleText(b))&&\nc.push(' style\\x3d\"',f,'\"');c.push(\"\\x3e\",a||b.name,\"\\x3c/\",d,\"\\x3e\");return c.join(\"\")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||\"\",d=\"\";c.length&&(c=c.replace(D,\";\"));for(var f in b){var g=b[f],e=(f+\":\"+g).replace(D,\";\");\"inherit\"==g?d+=e:c+=e}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=\nfunction(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=b};var H=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,K=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(a,e){this.requiredContent=this.allowedContent=\nthis.style=a;CKEDITOR.tools.extend(this,e,!0)},CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager(\"\",\"stylesSet\"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(a,e,b){CKEDITOR.stylesSet.addExternal(a,e,\"\");CKEDITOR.stylesSet.load(a,b)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,\n{attachStyleStateChange:function(a,e){var b=this._.styleStateChangeCallbacks;b||(b=this._.styleStateChangeCallbacks=[],this.on(\"selectionChange\",function(a){for(var d=0;d<b.length;d++){var e=b[d],l=e.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;e.fn.call(this,l)}}));b.push({style:a,fn:e})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);else{var e=this,b=\ne.config.stylesCombo_stylesSet||e.config.stylesSet;if(!1===b)a(null);else if(b instanceof Array)e._.stylesDefinitions=b,a(b);else{b||(b=\"default\");var b=b.split(\":\"),c=b[0];CKEDITOR.stylesSet.addExternal(c,b[1]?b.slice(1).join(\":\"):CKEDITOR.getUrl(\"styles.js\"),\"\");CKEDITOR.stylesSet.load(c,function(b){e._.stylesDefinitions=b[c];a(e._.stylesDefinitions)})}}}}),CKEDITOR.dom.comment=function(a,e){\"string\"==typeof a&&(a=(e?e.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.comment.prototype=\nnew CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return\"\\x3c!--\"+this.$.nodeValue+\"--\\x3e\"}}),\"use strict\",function(){var a={},e={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(e[b]=1);CKEDITOR.dom.elementPath=function(b,d){var m=null,l=null,f=[],h=b,k;d=d||b.getDocument().getBody();do if(h.type==CKEDITOR.NODE_ELEMENT){f.push(h);\nif(!this.lastElement&&(this.lastElement=h,h.is(CKEDITOR.dtd.$object)||\"false\"==h.getAttribute(\"contenteditable\")))continue;if(h.equals(d))break;if(!l&&(k=h.getName(),\"true\"==h.getAttribute(\"contenteditable\")?l=h:!m&&e[k]&&(m=h),a[k])){if(k=!m&&\"div\"==k){a:{k=h.getChildren();for(var g=0,n=k.count();g<n;g++){var q=k.getItem(g);if(q.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[q.getName()]){k=!0;break a}}k=!1}k=!k}k?m=h:l=h}}while(h=h.getParent());l||(l=d);this.block=m;this.blockLimit=l;this.root=\nd;this.elements=f}}(),CKEDITOR.dom.elementPath.prototype={compare:function(a){var e=this.elements;a=a&&a.elements;if(!a||e.length!=a.length)return!1;for(var b=0;b<e.length;b++)if(!e[b].equals(a[b]))return!1;return!0},contains:function(a,e,b){var c;\"string\"==typeof a&&(c=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?c=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?c=function(b){return-1<CKEDITOR.tools.indexOf(a,b.getName())}:\"function\"==typeof a?c=a:\"object\"==typeof a&&\n(c=function(b){return b.getName()in a});var d=this.elements,m=d.length;e&&m--;b&&(d=Array.prototype.slice.call(d,0),d.reverse());for(e=0;e<m;e++)if(c(d[e]))return d[e];return null},isContextFor:function(a){var e;return a in CKEDITOR.dtd.$block?(e=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!e.getDtd()[a]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(a,e){\"string\"==typeof a&&\n(a=(e?e.$:document).createTextNode(a));this.$=a},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},split:function(a){var e=this.$.parentNode,b=e.childNodes.length,c=this.getLength(),d=this.getDocument(),m=new CKEDITOR.dom.text(this.$.splitText(a),d);e.childNodes.length==b&&(a>=c?(m=d.createText(\"\"),\nm.insertAfter(this)):(a=d.createText(\"\"),a.insertAfter(m),a.remove()));return m},substring:function(a,e){return\"number\"!=typeof e?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,e)}}),function(){function a(a,c,d){var e=a.serializable,l=c[d?\"endContainer\":\"startContainer\"],f=d?\"endOffset\":\"startOffset\",h=e?c.document.getById(a.startNode):a.startNode;a=e?c.document.getById(a.endNode):a.endNode;l.equals(h.getPrevious())?(c.startOffset=c.startOffset-l.getLength()-a.getPrevious().getLength(),l=\na.getNext()):l.equals(a.getPrevious())&&(c.startOffset-=l.getLength(),l=a.getNext());l.equals(h.getParent())&&c[f]++;l.equals(a.getParent())&&c[f]++;c[d?\"endContainer\":\"startContainer\"]=l;return c}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,e)};var e={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),d=[],e;return{getNextRange:function(l){e=void 0===e?0:e+1;var f=\na[e];if(f&&1<a.length){if(!e)for(var h=a.length-1;0<=h;h--)d.unshift(a[h].createBookmark(!0));if(l)for(var k=0;a[e+k+1];){var g=f.document;l=0;h=g.getById(d[k].endNode);for(g=g.getById(d[k+1].startNode);;){h=h.getNextSourceNode(!1);if(g.equals(h))l=1;else if(c(h)||h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary())continue;break}if(!l)break;k++}for(f.moveToBookmark(d.shift());k--;)h=a[++e],h.moveToBookmark(d.shift()),f.setEnd(h.endContainer,h.endOffset)}return f}}},createBookmarks:function(b){for(var c=\n[],d,e=0;e<this.length;e++){c.push(d=this[e].createBookmark(b,!0));for(var l=e+1;l<this.length;l++)this[l]=a(d,this[l]),this[l]=a(d,this[l],!0)}return c},createBookmarks2:function(a){for(var c=[],d=0;d<this.length;d++)c.push(this[d].createBookmark2(a));return c},moveToBookmarks:function(a){for(var c=0;c<this.length;c++)this[c].moveToBookmark(a[c])}}}(),function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(\",\")[1]||\"skins/\"+CKEDITOR.skinName.split(\",\")[0]+\"/\")}function e(b){var c=\nCKEDITOR.skin[\"ua_\"+b],d=CKEDITOR.env;if(c)for(var c=c.split(\",\").sort(function(a,b){return a>b?-1:1}),f=0,e;f<c.length;f++)if(e=c[f],d.ie&&(e.replace(/^ie/,\"\")==d.version||d.quirks&&\"iequirks\"==e)&&(e=\"ie\"),d[e]){b+=\"_\"+c[f];break}return CKEDITOR.getUrl(a()+b+\".css\")}function b(a,b){m[a]||(CKEDITOR.document.appendStyleSheet(e(a)),m[a]=1);b&&b()}function c(a){var b=a.getById(l);b||(b=a.getHead().append(\"style\"),b.setAttribute(\"id\",l),b.setAttribute(\"type\",\"text/css\"));return b}function d(a,b,c){var d,\nf,e;if(CKEDITOR.env.webkit)for(b=b.split(\"}\").slice(0,-1),f=0;f<b.length;f++)b[f]=b[f].split(\"{\");for(var h=0;h<a.length;h++)if(CKEDITOR.env.webkit)for(f=0;f<b.length;f++){e=b[f][1];for(d=0;d<c.length;d++)e=e.replace(c[d][0],c[d][1]);a[h].$.sheet.addRule(b[f][0],e)}else{e=b;for(d=0;d<c.length;d++)e=e.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[h].$.styleSheet.cssText+=e:a[h].$.innerHTML+=e}}var m={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(\",\")[0]?\nCKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+\"skin.js\"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(e(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||\"16px\"})},getIconStyle:function(a,b,c,d,f){var e;a&&(a=a.toLowerCase(),b&&(e=this.icons[a+\"-rtl\"]),e||(e=this.icons[a]));a=c||e&&e.path||\"\";d=d||e&&e.offset;f=f||e&&e.bgsize||\"16px\";a&&(a=a.replace(/'/g,\"\\\\'\"));return a&&\"background-image:url('\"+CKEDITOR.getUrl(a)+\n\"');background-position:0 \"+d+\"px;background-size:\"+f+\";\"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=c(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,e=\"\",k=\"\";\"function\"==typeof c&&(e=c(this,\"editor\"),k=c(this,\"panel\"));a=[[h,a]];d([b],e,a);d(f,k,a)}).call(this,a)}});var l=\"cke_ui_color\",f=[],h=/\\$color/g;CKEDITOR.on(\"instanceLoaded\",function(a){if(!CKEDITOR.env.ie||\n!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag(\"iframe\").getItem(0).getFrameDocument();if(!a.getById(\"cke_ui_color\")){a=c(a);f.push(a);var e=b.getUiColor();e&&d([a],CKEDITOR.skin.chameleon(b,\"panel\"),[[h,e]])}};b.on(\"panelShow\",a);b.on(\"menuShow\",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\\x3cdiv style\\x3d\"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue\"\\x3e\\x3c/div\\x3e',\nCKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var e=a.getComputedStyle(\"border-top-color\"),b=a.getComputedStyle(\"border-right-color\");CKEDITOR.env.hc=!(!e||e!=b)}catch(c){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=\" cke_hc\");CKEDITOR.document.appendStyleText(\".cke{visibility:hidden;}\");CKEDITOR.status=\"loaded\";CKEDITOR.fireOnce(\"loaded\");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,e=0;e<a.length;e++)CKEDITOR.editor.prototype.constructor.apply(a[e][0],\na[e][1]),CKEDITOR.add(a[e][0])}(),CKEDITOR.skin.name=\"moono\",CKEDITOR.skin.ua_editor=\"ie,iequirks,ie7,ie8,gecko\",CKEDITOR.skin.ua_dialog=\"ie,iequirks,ie7,ie8\",CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,b){for(var e=a.match(/[^#]./g),l=0;3>l;l++){var f=l,h;h=parseInt(e[l],16);h=(\"0\"+(0>b?0|h*(1+b):0|h+(255-h)*b).toString(16)).slice(-2);e[f]=h}return\"#\"+e.join(\"\")}}(),e=function(){var a=new CKEDITOR.template(\"background:#{to};background-image:linear-gradient(to bottom,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\\x3d0,startColorstr\\x3d'{from}',endColorstr\\x3d'{to}');\");\nreturn function(b,e){return a.output({from:b,to:e})}}(),b={editor:new CKEDITOR.template(\"{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] \"),\npanel:new CKEDITOR.template(\".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] \")};\nreturn function(c,d){var m=c.uiColor,m={id:\".\"+c.id,defaultBorder:a(m,-.1),defaultGradient:e(a(m,.9),m),lightGradient:e(a(m,1),a(m,.7)),mediumGradient:e(a(m,.8),a(m,.5)),ckeButtonOn:e(a(m,.6),a(m,.7)),ckeResizer:a(m,-.4),ckeToolbarSeparator:a(m,.5),ckeColorauto:a(m,.8),dialogBody:a(m,.7),dialogTabSelected:e(\"#FFFFFF\",\"#FFFFFF\"),dialogTabSelectedBorder:\"#FFF\",elementsPathColor:a(m,-.6),elementsPathBg:m,menubuttonIcon:a(m,.5),menubuttonIconHover:a(m,.3)};return b[d].output(m).replace(/\\[/g,\"{\").replace(/\\]/g,\n\"}\")}}(),CKEDITOR.plugins.add(\"dialogui\",{onLoad:function(){var a=function(a){this._||(this._={});this._[\"default\"]=this._.initValue=a[\"default\"]||\"\";this._.required=a.required||!1;for(var b=[this._],c=1;c<arguments.length;c++)b.push(arguments[c]);b.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},e={build:function(a,b,c){return new CKEDITOR.ui.dialog.textInput(a,b,c)}},b={build:function(a,b,c){return new CKEDITOR.ui.dialog[b.type](a,b,c)}},c={isChanged:function(){return this.getValue()!=\nthis.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._[\"default\"]},getInitValue:function(){return this._.initValue}},d=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){this._.domOnChangeRegistered||(a.on(\"load\",function(){this.getInputElement().on(\"change\",function(){a.parts.dialog.isVisible()&&this.fire(\"change\",{value:this.getValue()})},\nthis)},this),this._.domOnChangeRegistered=!0);this.on(\"change\",b)}},!0),m=/^on([A-Z]\\w+)/,l=function(a){for(var b in a)(m.test(b)||\"title\"==b||\"type\"==b)&&delete a[b];return a},f=function(a){a=a.data.getKeystroke();a==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker(\"ltr\"):a==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker(\"rtl\")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,c,d,f){if(!(4>arguments.length)){var e=a.call(this,c);e.labelId=CKEDITOR.tools.getNextId()+\n\"_label\";this._.children=[];var m={role:c.role||\"presentation\"};c.includeLabel&&(m[\"aria-labelledby\"]=e.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,c,d,\"div\",null,m,function(){var a=[],d=c.required?\" cke_required\":\"\";\"horizontal\"!=c.labelLayout?a.push('\\x3clabel class\\x3d\"cke_dialog_ui_labeled_label'+d+'\" ',' id\\x3d\"'+e.labelId+'\"',e.inputId?' for\\x3d\"'+e.inputId+'\"':\"\",(c.labelStyle?' style\\x3d\"'+c.labelStyle+'\"':\"\")+\"\\x3e\",c.label,\"\\x3c/label\\x3e\",'\\x3cdiv class\\x3d\"cke_dialog_ui_labeled_content\"',\nc.controlStyle?' style\\x3d\"'+c.controlStyle+'\"':\"\",' role\\x3d\"presentation\"\\x3e',f.call(this,b,c),\"\\x3c/div\\x3e\"):(d={type:\"hbox\",widths:c.widths,padding:0,children:[{type:\"html\",html:'\\x3clabel class\\x3d\"cke_dialog_ui_labeled_label'+d+'\" id\\x3d\"'+e.labelId+'\" for\\x3d\"'+e.inputId+'\"'+(c.labelStyle?' style\\x3d\"'+c.labelStyle+'\"':\"\")+\"\\x3e\"+CKEDITOR.tools.htmlEncode(c.label)+\"\\x3c/label\\x3e\"},{type:\"html\",html:'\\x3cspan class\\x3d\"cke_dialog_ui_labeled_content\"'+(c.controlStyle?' style\\x3d\"'+c.controlStyle+\n'\"':\"\")+\"\\x3e\"+f.call(this,b,c)+\"\\x3c/span\\x3e\"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,d,a));return a.join(\"\")})}},textInput:function(b,c,d){if(!(3>arguments.length)){a.call(this,c);var e=this._.inputId=CKEDITOR.tools.getNextId()+\"_textInput\",m={\"class\":\"cke_dialog_ui_input_\"+c.type,id:e,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(m.maxlength=c.maxLength);c.size&&(m.size=c.size);c.inputStyle&&(m.style=c.inputStyle);var l=this,p=!1;b.on(\"load\",function(){l.getInputElement().on(\"keydown\",\nfunction(a){13==a.data.getKeystroke()&&(p=!0)});l.getInputElement().on(\"keyup\",function(a){13==a.data.getKeystroke()&&p&&(b.getButton(\"ok\")&&setTimeout(function(){b.getButton(\"ok\").click()},0),p=!1);l.bidi&&f.call(l,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){var a=['\\x3cdiv class\\x3d\"cke_dialog_ui_input_',c.type,'\" role\\x3d\"presentation\"'];c.width&&a.push('style\\x3d\"width:'+c.width+'\" ');a.push(\"\\x3e\\x3cinput \");m[\"aria-labelledby\"]=this._.labelId;this._.required&&\n(m[\"aria-required\"]=this._.required);for(var b in m)a.push(b+'\\x3d\"'+m[b]+'\" ');a.push(\" /\\x3e\\x3c/div\\x3e\");return a.join(\"\")})}},textarea:function(b,c,d){if(!(3>arguments.length)){a.call(this,c);var e=this,m=this._.inputId=CKEDITOR.tools.getNextId()+\"_textarea\",l={};c.validate&&(this.validate=c.validate);l.rows=c.rows||5;l.cols=c.cols||20;l[\"class\"]=\"cke_dialog_ui_input_textarea \"+(c[\"class\"]||\"\");\"undefined\"!=typeof c.inputStyle&&(l.style=c.inputStyle);c.dir&&(l.dir=c.dir);if(e.bidi)b.on(\"load\",\nfunction(){e.getInputElement().on(\"keyup\",f)},e);CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){l[\"aria-labelledby\"]=this._.labelId;this._.required&&(l[\"aria-required\"]=this._.required);var a=['\\x3cdiv class\\x3d\"cke_dialog_ui_input_textarea\" role\\x3d\"presentation\"\\x3e\\x3ctextarea id\\x3d\"',m,'\" '],b;for(b in l)a.push(b+'\\x3d\"'+CKEDITOR.tools.htmlEncode(l[b])+'\" ');a.push(\"\\x3e\",CKEDITOR.tools.htmlEncode(e._[\"default\"]),\"\\x3c/textarea\\x3e\\x3c/div\\x3e\");return a.join(\"\")})}},checkbox:function(b,\nc,d){if(!(3>arguments.length)){var f=a.call(this,c,{\"default\":!!c[\"default\"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,c,d,\"span\",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+\"_checkbox\":CKEDITOR.tools.getNextId()+\"_checkbox\"},!0),d=[],e=CKEDITOR.tools.getNextId()+\"_label\",g={\"class\":\"cke_dialog_ui_checkbox_input\",type:\"checkbox\",\"aria-labelledby\":e};l(a);c[\"default\"]&&(g.checked=\"checked\");\"undefined\"!=typeof a.inputStyle&&(a.style=a.inputStyle);\nf.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,d,\"input\",null,g);d.push(' \\x3clabel id\\x3d\"',e,'\" for\\x3d\"',g.id,'\"'+(c.labelStyle?' style\\x3d\"'+c.labelStyle+'\"':\"\")+\"\\x3e\",CKEDITOR.tools.htmlEncode(c.label),\"\\x3c/label\\x3e\");return d.join(\"\")})}},radio:function(b,c,d){if(!(3>arguments.length)){a.call(this,c);this._[\"default\"]||(this._[\"default\"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var f=[],e=this;c.role=\"radiogroup\";c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,\nb,c,d,function(){for(var a=[],d=[],g=(c.id?c.id:CKEDITOR.tools.getNextId())+\"_radio\",m=0;m<c.items.length;m++){var w=c.items[m],z=void 0!==w[2]?w[2]:w[0],B=void 0!==w[1]?w[1]:w[0],t=CKEDITOR.tools.getNextId()+\"_radio_input\",y=t+\"_label\",t=CKEDITOR.tools.extend({},c,{id:t,title:null,type:null},!0),z=CKEDITOR.tools.extend({},t,{title:z},!0),C={type:\"radio\",\"class\":\"cke_dialog_ui_radio_input\",name:g,value:B,\"aria-labelledby\":y},x=[];e._[\"default\"]==B&&(C.checked=\"checked\");l(t);l(z);\"undefined\"!=typeof t.inputStyle&&\n(t.style=t.inputStyle);t.keyboardFocusable=!0;f.push(new CKEDITOR.ui.dialog.uiElement(b,t,x,\"input\",null,C));x.push(\" \");new CKEDITOR.ui.dialog.uiElement(b,z,x,\"label\",null,{id:y,\"for\":C.id},w[0]);a.push(x.join(\"\"))}new CKEDITOR.ui.dialog.hbox(b,f,a,d);return d.join(\"\")});this._.children=f}},button:function(b,c,d){if(arguments.length){\"function\"==typeof c&&(c=c(b.getParentEditor()));a.call(this,c,{disabled:c.disabled||!1});CKEDITOR.event.implementOn(this);var f=this;b.on(\"load\",function(){var a=this.getElement();\n(function(){a.on(\"click\",function(a){f.click();a.data.preventDefault()});a.on(\"keydown\",function(a){a.data.getKeystroke()in{32:1}&&(f.click(),a.data.preventDefault())})})();a.unselectable()},this);var e=CKEDITOR.tools.extend({},c);delete e.style;var m=CKEDITOR.tools.getNextId()+\"_label\";CKEDITOR.ui.dialog.uiElement.call(this,b,e,d,\"a\",null,{style:c.style,href:\"javascript:void(0)\",title:c.label,hidefocus:\"true\",\"class\":c[\"class\"],role:\"button\",\"aria-labelledby\":m},'\\x3cspan id\\x3d\"'+m+'\" class\\x3d\"cke_dialog_ui_button\"\\x3e'+\nCKEDITOR.tools.htmlEncode(c.label)+\"\\x3c/span\\x3e\")}},select:function(b,c,d){if(!(3>arguments.length)){var f=a.call(this,c);c.validate&&(this.validate=c.validate);f.inputId=CKEDITOR.tools.getNextId()+\"_select\";CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+\"_select\":CKEDITOR.tools.getNextId()+\"_select\"},!0),d=[],e=[],g={id:f.inputId,\"class\":\"cke_dialog_ui_input_select\",\"aria-labelledby\":this._.labelId};d.push('\\x3cdiv class\\x3d\"cke_dialog_ui_input_',\nc.type,'\" role\\x3d\"presentation\"');c.width&&d.push('style\\x3d\"width:'+c.width+'\" ');d.push(\"\\x3e\");void 0!==c.size&&(g.size=c.size);void 0!==c.multiple&&(g.multiple=c.multiple);l(a);for(var m=0,w;m<c.items.length&&(w=c.items[m]);m++)e.push('\\x3coption value\\x3d\"',CKEDITOR.tools.htmlEncode(void 0!==w[1]?w[1]:w[0]).replace(/\"/g,\"\\x26quot;\"),'\" /\\x3e ',CKEDITOR.tools.htmlEncode(w[0]));\"undefined\"!=typeof a.inputStyle&&(a.style=a.inputStyle);f.select=new CKEDITOR.ui.dialog.uiElement(b,a,d,\"select\",null,\ng,e.join(\"\"));d.push(\"\\x3c/div\\x3e\");return d.join(\"\")})}},file:function(b,c,d){if(!(3>arguments.length)){void 0===c[\"default\"]&&(c[\"default\"]=\"\");var f=CKEDITOR.tools.extend(a.call(this,c),{definition:c,buttons:[]});c.validate&&(this.validate=c.validate);b.on(\"load\",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass(\"cke_dialog_ui_input_file\")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){f.frameId=CKEDITOR.tools.getNextId()+\"_fileInput\";var a=['\\x3ciframe frameborder\\x3d\"0\" allowtransparency\\x3d\"0\" class\\x3d\"cke_dialog_ui_input_file\" role\\x3d\"presentation\" id\\x3d\"',\nf.frameId,'\" title\\x3d\"',c.label,'\" src\\x3d\"javascript:void('];a.push(CKEDITOR.env.ie?\"(function(){\"+encodeURIComponent(\"document.open();(\"+CKEDITOR.tools.fixDomain+\")();document.close();\")+\"})()\":\"0\");a.push(')\"\\x3e\\x3c/iframe\\x3e');return a.join(\"\")})}},fileButton:function(b,c,d){var f=this;if(!(3>arguments.length)){a.call(this,c);c.validate&&(this.validate=c.validate);var e=CKEDITOR.tools.extend({},c),m=e.onClick;e.className=(e.className?e.className+\" \":\"\")+\"cke_dialog_ui_button\";e.onClick=function(a){var d=\nc[\"for\"];m&&!1===m.call(this,a)||(b.getContentElement(d[0],d[1]).submit(),this.disable())};b.on(\"load\",function(){b.getContentElement(c[\"for\"][0],c[\"for\"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,b,e,d)}},html:function(){var a=/^\\s*<[\\w:]+\\s+([^>]*)?>/,b=/^(\\s*<[\\w:]+(?:\\s+[^>]*)?)((?:.|\\r|\\n)+)$/,c=/\\/$/;return function(d,f,e){if(!(3>arguments.length)){var m=[],l=f.html;\"\\x3c\"!=l.charAt(0)&&(l=\"\\x3cspan\\x3e\"+l+\"\\x3c/span\\x3e\");var v=f.focus;if(v){var w=this.focus;this.focus=function(){(\"function\"==\ntypeof v?v:w).call(this);this.fire(\"focus\")};f.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,d,f,m,\"span\",null,null,\"\");m=m.join(\"\").match(a);l=l.match(b)||[\"\",\"\",\"\"];c.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]=\"/\"+l[2]);e.push([l[1],\" \",m[1]||\"\",l[2]].join(\"\"))}}}(),fieldset:function(a,b,c,d,f){var e=f.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,f,d,\"fieldset\",null,null,function(){var a=[];e&&a.push(\"\\x3clegend\"+\n(f.labelStyle?' style\\x3d\"'+f.labelStyle+'\"':\"\")+\"\\x3e\"+e+\"\\x3c/legend\\x3e\");for(var b=0;b<c.length;b++)a.push(c[b]);return a.join(\"\")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(a){var b=CKEDITOR.document.getById(this._.labelId);1>b.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a=\nCKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?\"\":a.getChild(0).getText()},eventProcessors:d},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire(\"click\",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass(\"cke_disabled\")},disable:function(){this._.disabled=!0;this.getElement().addClass(\"cke_disabled\")},isVisible:function(){return this.getElement().getFirst().isVisible()},\nisEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on(\"click\",function(){b.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},\nfocus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&(b.$.focus(),b.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(a){if(this.bidi){var b=a&&a.charAt(0);(b=\"‪\"==b?\"ltr\":\"‫\"==b?\"rtl\":null)&&(a=a.slice(1));this.setDirectionMarker(b)}a||(a=\"\");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},\ngetValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var b=this.getDirectionMarker();b&&(a=(\"ltr\"==b?\"‪\":\"‫\")+a)}return a},setDirectionMarker:function(a){var b=this.getInputElement();a?b.setAttributes({dir:a,\"data-cke-dir-marker\":a}):this.getDirectionMarker()&&b.removeAttributes([\"dir\",\"data-cke-dir-marker\"])},getDirectionMarker:function(){return this.getInputElement().data(\"cke-dir-marker\")},keyboardFocusable:!0},c,!0);CKEDITOR.ui.dialog.textarea.prototype=\nnew CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,b,c){var d=new CKEDITOR.dom.element(\"option\",this.getDialog().getParentEditor().document),f=this.getInputElement().$;d.$.text=a;d.$.value=void 0===b||null===b?a:b;void 0===c||null===c?CKEDITOR.env.ie?f.add(d.$):f.add(d.$,null):f.add(d.$,c);return this},remove:function(a){this.getInputElement().$.remove(a);\nreturn this},clear:function(){for(var a=this.getInputElement().$;0<a.length;)a.remove(0);return this},keyboardFocusable:!0},c,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(a,b){this.getInputElement().$.checked=a;!b&&this.fire(\"change\",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,\nb){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return d.onChange.apply(this,arguments);a.on(\"load\",function(){var a=this._.checkbox.getElement();a.on(\"propertychange\",function(b){b=b.data.$;\"checked\"==b.propertyName&&this.fire(\"change\",{value:a.$.checked})},this)},this);this.on(\"change\",b);return null}},keyboardFocusable:!0},c,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,b){for(var c=this._.children,d,f=0;f<c.length&&(d=c[f]);f++)d.getElement().$.checked=\nd.getValue()==a;!b&&this.fire(\"change\",{value:a})},getValue:function(){for(var a=this._.children,b=0;b<a.length;b++)if(a[b].getElement().$.checked)return a[b].getValue();return null},accessKeyUp:function(){var a=this._.children,b;for(b=0;b<a.length;b++)if(a[b].getElement().$.checked){a[b].getElement().focus();return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return d.onChange.apply(this,arguments);a.on(\"load\",function(){for(var a=\nthis._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on(\"propertychange\",function(a){a=a.data.$;\"checked\"==a.propertyName&&this.$.checked&&b.fire(\"change\",{value:this.getAttribute(\"value\")})})},this);this.on(\"change\",b);return null}}},c,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,c,{getInputElement:function(){var a=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<a.$.forms.length?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):\nthis.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var b=/^on([A-Z]\\w+)/,c,d=function(a,b,c,d){a.on(\"formLoaded\",function(){a.getInputElement().on(c,d,a)})},f;for(f in a)if(c=f.match(b))this.eventProcessors[f]?this.eventProcessors[f].call(this,this._.dialog,a[f]):d(this,this._.dialog,c[1].toLowerCase(),a[f]);return this},reset:function(){function a(){c.$.open();\nvar h=\"\";d.size&&(h=d.size-(CKEDITOR.env.ie?7:0));var z=b.frameId+\"_input\";c.$.write(['\\x3chtml dir\\x3d\"'+l+'\" lang\\x3d\"'+v+'\"\\x3e\\x3chead\\x3e\\x3ctitle\\x3e\\x3c/title\\x3e\\x3c/head\\x3e\\x3cbody style\\x3d\"margin: 0; overflow: hidden; background: transparent;\"\\x3e','\\x3cform enctype\\x3d\"multipart/form-data\" method\\x3d\"POST\" dir\\x3d\"'+l+'\" lang\\x3d\"'+v+'\" action\\x3d\"',CKEDITOR.tools.htmlEncode(d.action),'\"\\x3e\\x3clabel id\\x3d\"',b.labelId,'\" for\\x3d\"',z,'\" style\\x3d\"display:none\"\\x3e',CKEDITOR.tools.htmlEncode(d.label),\n'\\x3c/label\\x3e\\x3cinput style\\x3d\"width:100%\" id\\x3d\"',z,'\" aria-labelledby\\x3d\"',b.labelId,'\" type\\x3d\"file\" name\\x3d\"',CKEDITOR.tools.htmlEncode(d.id||\"cke_upload\"),'\" size\\x3d\"',CKEDITOR.tools.htmlEncode(0<h?h:\"\"),'\" /\\x3e\\x3c/form\\x3e\\x3c/body\\x3e\\x3c/html\\x3e\\x3cscript\\x3e',CKEDITOR.env.ie?\"(\"+CKEDITOR.tools.fixDomain+\")();\":\"\",\"window.parent.CKEDITOR.tools.callFunction(\"+e+\");\",\"window.onbeforeunload \\x3d function() {window.parent.CKEDITOR.tools.callFunction(\"+m+\")}\",\"\\x3c/script\\x3e\"].join(\"\"));\nc.$.close();for(h=0;h<f.length;h++)f[h].enable()}var b=this._,c=CKEDITOR.document.getById(b.frameId).getFrameDocument(),d=b.definition,f=b.buttons,e=this.formLoadedNumber,m=this.formUnloadNumber,l=b.dialog._.editor.lang.dir,v=b.dialog._.editor.langCode;e||(e=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire(\"formLoaded\")},this),m=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on(\"destroy\",function(){CKEDITOR.tools.removeFunction(e);\nCKEDITOR.tools.removeFunction(m)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||\"\"},setInitValue:function(){this._.initValue=\"\"},eventProcessors:{onChange:function(a,b){this._.domOnChangeRegistered||(this.on(\"formLoaded\",function(){this.getInputElement().on(\"change\",function(){this.fire(\"change\",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on(\"change\",b)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=\nnew CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement(\"text\",e);CKEDITOR.dialog.addUIElement(\"password\",e);CKEDITOR.dialog.addUIElement(\"textarea\",b);CKEDITOR.dialog.addUIElement(\"checkbox\",b);CKEDITOR.dialog.addUIElement(\"radio\",b);CKEDITOR.dialog.addUIElement(\"button\",b);CKEDITOR.dialog.addUIElement(\"select\",b);CKEDITOR.dialog.addUIElement(\"file\",b);CKEDITOR.dialog.addUIElement(\"fileButton\",b);CKEDITOR.dialog.addUIElement(\"html\",\nb);CKEDITOR.dialog.addUIElement(\"fieldset\",{build:function(a,b,c){for(var d=b.children,f,e=[],m=[],l=0;l<d.length&&(f=d[l]);l++){var v=[];e.push(v);m.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,v))}return new CKEDITOR.ui.dialog[b.type](a,m,e,c,b)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function a(){for(var a=this._.tabIdList.length,\nb=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function e(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function b(a,b){for(var c=a.$.getElementsByTagName(\"input\"),d=0,f=c.length;d<f;d++){var e=new CKEDITOR.dom.element(c[d]);\n\"text\"==e.getAttribute(\"type\").toLowerCase()&&(b?(e.setAttribute(\"value\",e.getCustomData(\"fake_value\")||\"\"),e.removeCustomData(\"fake_value\")):(e.setCustomData(\"fake_value\",e.getAttribute(\"value\")),e.setAttribute(\"value\",\"\")))}}function c(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute(\"aria-invalid\"):c.setAttribute(\"aria-invalid\",!0));a||(this.select?this.select():this.focus());b&&alert(b);this.fire(\"validated\",{valid:a,msg:b})}function d(){var a=this.getInputElement();a&&a.removeAttribute(\"aria-invalid\")}\nfunction m(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate(\"dialog\",u).output({id:CKEDITOR.tools.getNextNumber(),editorId:a.id,langDir:a.lang.dir,langCode:a.langCode,editorDialogClass:\"cke_editor_\"+a.name.replace(/\\./g,\"\\\\.\")+\"_dialog\",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?\"cke_hidpi\":\"\"})),c=b.getChild([0,0,0,0,0]),d=c.getChild(0),f=c.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c);!CKEDITOR.env.ie||CKEDITOR.env.quirks||\nCKEDITOR.env.edge||(a=\"javascript:void(function(){\"+encodeURIComponent(\"document.open();(\"+CKEDITOR.tools.fixDomain+\")();document.close();\")+\"}())\",CKEDITOR.dom.element.createFromHtml('\\x3ciframe frameBorder\\x3d\"0\" class\\x3d\"cke_iframe_shim\" src\\x3d\"'+a+'\" tabIndex\\x3d\"-1\"\\x3e\\x3c/iframe\\x3e').appendTo(c.getParent()));d.unselectable();f.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:d,close:f,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer:c.getChild([3,0,1,0])}}}function l(a,\nb,c){this.element=b;this.focusIndex=c;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute(\"disabled\")&&b.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};b.on(\"keydown\",function(a){a.data.getKeystroke()in{32:1,13:1}&&this.fire(\"click\")});b.on(\"focus\",function(){this.fire(\"mouseover\")});b.on(\"blur\",function(){this.fire(\"mouseout\")})}function f(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on(\"resize\",b);a.on(\"hide\",function(){c.removeListener(\"resize\",\nb)})}function h(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function k(a){function b(c){var k=a.getSize(),m=CKEDITOR.document.getWindow().getViewPaneSize(),l=c.data.$.screenX,n=c.data.$.screenY,w=l-d.x,v=n-d.y;d={x:l,y:n};f.x+=w;f.y+=v;a.move(f.x+h[3]<g?-h[3]:f.x-h[1]>m.width-k.width-g?m.width-k.width+(\"rtl\"==e.lang.dir?0:h[1]):f.x,f.y+h[0]<g?-h[0]:f.y-h[2]>m.height-k.height-g?m.height-k.height+h[2]:f.y,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener(\"mousemove\",\nb);CKEDITOR.document.removeListener(\"mouseup\",c);if(CKEDITOR.env.ie6Compat){var a=x.getChild(0).getFrameDocument();a.removeListener(\"mousemove\",b);a.removeListener(\"mouseup\",c)}}var d=null,f=null,e=a.getParentEditor(),g=e.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];\"undefined\"==typeof g&&(g=20);a.parts.title.on(\"mousedown\",function(e){d={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on(\"mousemove\",b);CKEDITOR.document.on(\"mouseup\",c);f=a.getPosition();if(CKEDITOR.env.ie6Compat){var g=\nx.getChild(0).getFrameDocument();g.on(\"mousemove\",b);g.on(\"mouseup\",c)}e.data.preventDefault()},a)}function g(a){function b(c){var n=\"rtl\"==e.lang.dir,w=l.width,v=l.height,p=w+(c.data.$.screenX-m.x)*(n?-1:1)*(a._.moved?1:2),z=v+(c.data.$.screenY-m.y)*(a._.moved?1:2),t=a._.element.getFirst(),t=n&&t.getComputedStyle(\"right\"),u=a.getPosition();u.y+z>k.height&&(z=k.height-u.y);(n?t:u.x)+p>k.width&&(p=k.width-(n?t:u.x));if(f==CKEDITOR.DIALOG_RESIZE_WIDTH||f==CKEDITOR.DIALOG_RESIZE_BOTH)w=Math.max(d.minWidth||\n0,p-g);if(f==CKEDITOR.DIALOG_RESIZE_HEIGHT||f==CKEDITOR.DIALOG_RESIZE_BOTH)v=Math.max(d.minHeight||0,z-h);a.resize(w,v);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener(\"mouseup\",c);CKEDITOR.document.removeListener(\"mousemove\",b);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=x.getChild(0).getFrameDocument();a.removeListener(\"mouseup\",c);a.removeListener(\"mousemove\",b)}}var d=a.definition,f=d.resizable;if(f!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(),\ng,h,k,m,l,n,w=CKEDITOR.tools.addFunction(function(d){l=a.getSize();var f=a.parts.contents;f.$.getElementsByTagName(\"iframe\").length&&(n=CKEDITOR.dom.element.createFromHtml('\\x3cdiv class\\x3d\"cke_dialog_resize_cover\" style\\x3d\"height: 100%; position: absolute; width: 100%;\"\\x3e\\x3c/div\\x3e'),f.append(n));h=l.height-a.parts.contents.getSize(\"height\",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));g=l.width-a.parts.contents.getSize(\"width\",1);m={x:d.screenX,y:d.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();\nCKEDITOR.document.on(\"mousemove\",b);CKEDITOR.document.on(\"mouseup\",c);CKEDITOR.env.ie6Compat&&(f=x.getChild(0).getFrameDocument(),f.on(\"mousemove\",b),f.on(\"mouseup\",c));d.preventDefault&&d.preventDefault()});a.on(\"load\",function(){var b=\"\";f==CKEDITOR.DIALOG_RESIZE_WIDTH?b=\" cke_resizer_horizontal\":f==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=\" cke_resizer_vertical\");b=CKEDITOR.dom.element.createFromHtml('\\x3cdiv class\\x3d\"cke_resizer'+b+\" cke_resizer_\"+e.lang.dir+'\" title\\x3d\"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+\n'\" onmousedown\\x3d\"CKEDITOR.tools.callFunction('+w+', event )\"\\x3e'+(\"ltr\"==e.lang.dir?\"â—¢\":\"â—£\")+\"\\x3c/div\\x3e\");a.parts.footer.append(b,1)});e.on(\"destroy\",function(){CKEDITOR.tools.removeFunction(w)})}}function n(a){a.data.preventDefault(1)}function q(a){var b=CKEDITOR.document.getWindow(),c=a.config,d=c.dialog_backgroundCoverColor||\"white\",f=c.dialog_backgroundCoverOpacity,e=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(d,f,e),g=C[c];g?g.show():(e=['\\x3cdiv tabIndex\\x3d\"-1\" style\\x3d\"position: ',CKEDITOR.env.ie6Compat?\n\"absolute\":\"fixed\",\"; z-index: \",e,\"; top: 0px; left: 0px; \",CKEDITOR.env.ie6Compat?\"\":\"background-color: \"+d,'\" class\\x3d\"cke_dialog_background_cover\"\\x3e'],CKEDITOR.env.ie6Compat&&(d=\"\\x3chtml\\x3e\\x3cbody style\\x3d\\\\'background-color:\"+d+\";\\\\'\\x3e\\x3c/body\\x3e\\x3c/html\\x3e\",e.push('\\x3ciframe hidefocus\\x3d\"true\" frameborder\\x3d\"0\" id\\x3d\"cke_dialog_background_iframe\" src\\x3d\"javascript:'),e.push(\"void((function(){\"+encodeURIComponent(\"document.open();(\"+CKEDITOR.tools.fixDomain+\")();document.write( '\"+\nd+\"' );document.close();\")+\"})())\"),e.push('\" style\\x3d\"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\\x3d0)\"\\x3e\\x3c/iframe\\x3e')),e.push(\"\\x3c/div\\x3e\"),g=CKEDITOR.dom.element.createFromHtml(e.join(\"\")),g.setOpacity(void 0!==f?f:.5),g.on(\"keydown\",n),g.on(\"keypress\",n),g.on(\"keyup\",n),g.appendTo(CKEDITOR.document.getBody()),C[c]=g);a.focusManager.add(g);x=g;a=function(){var a=b.getViewPaneSize();g.setStyles({width:a.width+\"px\",height:a.height+\n\"px\"})};var h=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;g.setStyles({left:a.x+\"px\",top:a.y+\"px\"});if(c){do a=c.getPosition(),c.move(a.x,a.y);while(c=c._.parentDialog)}};y=a;b.on(\"resize\",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus();if(CKEDITOR.env.ie6Compat){var k=function(){h();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){k.prevScrollHandler=window.onscroll||function(){};window.onscroll=k},0);h()}}function r(a){x&&(a.focusManager.remove(x),\na=CKEDITOR.document.getWindow(),x.hide(),a.removeListener(\"resize\",y),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),y=null)}var p=CKEDITOR.tools.cssLength,u='\\x3cdiv class\\x3d\"cke_reset_all {editorId} {editorDialogClass} {hidpi}\" dir\\x3d\"{langDir}\" lang\\x3d\"{langCode}\" role\\x3d\"dialog\" aria-labelledby\\x3d\"cke_dialog_title_{id}\"\\x3e\\x3ctable class\\x3d\"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}\" style\\x3d\"position:absolute\" role\\x3d\"presentation\"\\x3e\\x3ctr\\x3e\\x3ctd role\\x3d\"presentation\"\\x3e\\x3cdiv class\\x3d\"cke_dialog_body\" role\\x3d\"presentation\"\\x3e\\x3cdiv id\\x3d\"cke_dialog_title_{id}\" class\\x3d\"cke_dialog_title\" role\\x3d\"presentation\"\\x3e\\x3c/div\\x3e\\x3ca id\\x3d\"cke_dialog_close_button_{id}\" class\\x3d\"cke_dialog_close_button\" href\\x3d\"javascript:void(0)\" title\\x3d\"{closeTitle}\" role\\x3d\"button\"\\x3e\\x3cspan class\\x3d\"cke_label\"\\x3eX\\x3c/span\\x3e\\x3c/a\\x3e\\x3cdiv id\\x3d\"cke_dialog_tabs_{id}\" class\\x3d\"cke_dialog_tabs\" role\\x3d\"tablist\"\\x3e\\x3c/div\\x3e\\x3ctable class\\x3d\"cke_dialog_contents\" role\\x3d\"presentation\"\\x3e\\x3ctr\\x3e\\x3ctd id\\x3d\"cke_dialog_contents_{id}\" class\\x3d\"cke_dialog_contents_body\" role\\x3d\"presentation\"\\x3e\\x3c/td\\x3e\\x3c/tr\\x3e\\x3ctr\\x3e\\x3ctd id\\x3d\"cke_dialog_footer_{id}\" class\\x3d\"cke_dialog_footer\" role\\x3d\"presentation\"\\x3e\\x3c/td\\x3e\\x3c/tr\\x3e\\x3c/table\\x3e\\x3c/div\\x3e\\x3c/td\\x3e\\x3c/tr\\x3e\\x3c/table\\x3e\\x3c/div\\x3e';\nCKEDITOR.dialog=function(b,f){function h(){var a=x._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function l(a){var b=x._.focusList;a=a||0;if(!(1>b.length)){var c=x._.currentFocusIndex;x._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var f=c,e=1<x._.pageCount;do{f+=a;if(e&&!x._.tabBarMode&&(f==b.length||-1==f)){x._.tabBarMode=!0;x._.tabs[x._.currentTabId][0].focus();\nx._.currentFocusIndex=-1;return}f=(f+b.length)%b.length;if(f==c)break}while(a&&!b[f].isFocusable());b[f].focus();\"text\"==b[f].type&&b[f].select()}}function n(c){if(x==CKEDITOR.dialog._.currentTop){var d=c.data.getKeystroke(),f=\"rtl\"==b.lang.dir,g=[37,38,39,40];q=y=0;if(9==d||d==CKEDITOR.SHIFT+9)l(d==CKEDITOR.SHIFT+9?-1:1),q=1;else if(d==CKEDITOR.ALT+121&&!x._.tabBarMode&&1<x.getPageCount())x._.tabBarMode=!0,x._.tabs[x._.currentTabId][0].focus(),x._.currentFocusIndex=-1,q=1;else if(-1!=CKEDITOR.tools.indexOf(g,\nd)&&x._.tabBarMode)d=-1!=CKEDITOR.tools.indexOf([f?39:37,38],d)?a.call(x):e.call(x),x.selectPage(d),x._.tabs[d][0].focus(),q=1;else if(13!=d&&32!=d||!x._.tabBarMode)if(13==d)d=c.data.getTarget(),d.is(\"a\",\"button\",\"select\",\"textarea\")||d.is(\"input\")&&\"button\"==d.$.type||((d=this.getButton(\"ok\"))&&CKEDITOR.tools.setTimeout(d.click,0,d),q=1),y=1;else if(27==d)(d=this.getButton(\"cancel\"))?CKEDITOR.tools.setTimeout(d.click,0,d):!1!==this.fire(\"cancel\",{hide:!0}).hide&&this.hide(),y=1;else return;else this.selectPage(this._.currentTabId),\nthis._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1),q=1;w(c)}}function w(a){q?a.data.preventDefault(1):y&&a.data.stopPropagation()}var p=CKEDITOR.dialog._.dialogDefinitions[f],z=CKEDITOR.tools.clone(v),u=b.config.dialog_buttonsOrder||\"OS\",r=b.lang.dir,B={},q,y;(\"OS\"==u&&CKEDITOR.env.mac||\"rtl\"==u&&\"ltr\"==r||\"ltr\"==u&&\"rtl\"==r)&&z.buttons.reverse();p=CKEDITOR.tools.extend(p(b),z);p=CKEDITOR.tools.clone(p);p=new t(this,p);z=m(b);this._={editor:b,element:z.element,name:f,contentSize:{width:0,height:0},\nsize:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1};this.parts=z.parts;CKEDITOR.tools.setTimeout(function(){b.fire(\"ariaWidget\",this.parts.contents)},0,this);z={position:CKEDITOR.env.ie6Compat?\"absolute\":\"fixed\",top:0,visibility:\"hidden\"};z[\"rtl\"==r?\"right\":\"left\"]=0;this.parts.dialog.setStyles(z);CKEDITOR.event.call(this);this.definition=p=CKEDITOR.fire(\"dialogDefinition\",\n{name:f,definition:p},b).definition;if(!(\"removeDialogTabs\"in b._)&&b.config.removeDialogTabs){z=b.config.removeDialogTabs.split(\";\");for(r=0;r<z.length;r++)if(u=z[r].split(\":\"),2==u.length){var C=u[0];B[C]||(B[C]=[]);B[C].push(u[1])}b._.removeDialogTabs=B}if(b._.removeDialogTabs&&(B=b._.removeDialogTabs[f]))for(r=0;r<B.length;r++)p.removeContents(B[r]);if(p.onLoad)this.on(\"load\",p.onLoad);if(p.onShow)this.on(\"show\",p.onShow);if(p.onHide)this.on(\"hide\",p.onHide);if(p.onOk)this.on(\"ok\",function(a){b.fire(\"saveSnapshot\");\nsetTimeout(function(){b.fire(\"saveSnapshot\")},0);!1===p.onOk.call(this,a)&&(a.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(p.onCancel)this.on(\"cancel\",function(a){!1===p.onCancel.call(this,a)&&(a.data.hide=!1)});var x=this,A=function(a){var b=x._.contents,c=!1,d;for(d in b)for(var f in b[d])if(c=a.call(this,b[d][f]))return};this.on(\"ok\",function(a){A(function(b){if(b.validate){var d=b.validate(this),f=\"string\"==typeof d||!1===d;f&&(a.data.hide=!1,a.stop());c.call(b,!f,\"string\"==typeof d?\nd:void 0);return f}})},this,null,0);this.on(\"cancel\",function(a){A(function(c){if(c.isChanged())return b.config.dialog_noConfirmCancel||confirm(b.lang.common.confirmCancel)||(a.data.hide=!1),!0})},this,null,0);this.parts.close.on(\"click\",function(a){!1!==this.fire(\"cancel\",{hide:!0}).hide&&this.hide();a.data.preventDefault()},this);this.changeFocus=l;var D=this._.element;b.focusManager.add(D,1);this.on(\"show\",function(){D.on(\"keydown\",n,this);if(CKEDITOR.env.gecko)D.on(\"keypress\",w,this)});this.on(\"hide\",\nfunction(){D.removeListener(\"keydown\",n);CKEDITOR.env.gecko&&D.removeListener(\"keypress\",w);A(function(a){d.apply(a)})});this.on(\"iframeAdded\",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on(\"keydown\",n,this,null,0)});this.on(\"show\",function(){h();var a=1<x._.pageCount;b.config.dialog_startupFocusTab&&a?(x._.tabBarMode=!0,x._.tabs[x._.currentTabId][0].focus(),x._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=a?-1:this._.focusList.length-1,p.onFocus?\n(a=p.onFocus.call(this))&&a.focus():l(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on(\"load\",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);k(this);g(this);(new CKEDITOR.dom.text(p.title,CKEDITOR.document)).appendTo(this.parts.title);for(r=0;r<p.contents.length;r++)(B=p.contents[r])&&this.addPage(B);this.parts.tabs.on(\"click\",function(a){var b=a.data.getTarget();b.hasClass(\"cke_dialog_tab\")&&(b=b.$.id,this.selectPage(b.substring(4,b.lastIndexOf(\"_\"))),\nthis._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1)),a.data.preventDefault())},this);r=[];B=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:\"hbox\",className:\"cke_dialog_footer_buttons\",widths:[],children:p.buttons},r).getChild();this.parts.footer.setHtml(r.join(\"\"));for(r=0;r<B.length;r++)this._.buttons[B[r].id]=B[r]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){this._.contentSize&&this._.contentSize.width==\na&&this._.contentSize.height==b||(CKEDITOR.dialog.fire(\"resize\",{dialog:this,width:a,height:b},this._.editor),this.fire(\"resize\",{width:a,height:b},this._.editor),this.parts.contents.setStyles({width:a+\"px\",height:b+\"px\"}),\"rtl\"==this._.editor.lang.dir&&this._.position&&(this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle(\"right\"),10)),this._.contentSize={width:a,height:b})}}(),getSize:function(){var a=this._.element.getFirst();\nreturn{width:a.$.offsetWidth||0,height:a.$.offsetHeight||0}},move:function(a,b,c){var d=this._.element.getFirst(),f=\"rtl\"==this._.editor.lang.dir,e=\"fixed\"==d.getComputedStyle(\"position\");CKEDITOR.env.ie&&d.setStyle(\"zoom\",\"100%\");e&&this._.position&&this._.position.x==a&&this._.position.y==b||(this._.position={x:a,y:b},e||(e=CKEDITOR.document.getWindow().getScrollPosition(),a+=e.x,b+=e.y),f&&(e=this.getSize(),a=CKEDITOR.document.getWindow().getViewPaneSize().width-e.width-a),b={top:(0<b?b:0)+\"px\"},\nb[f?\"right\":\"left\"]=(0<a?a:0)+\"px\",d.setStyles(b),c&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,b=this.definition;a.getParent()&&a.getParent().equals(CKEDITOR.document.getBody())?a.setStyle(\"display\",\"block\"):a.appendTo(CKEDITOR.document.getBody());this.resize(this._.contentSize&&this._.contentSize.width||b.width||b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);\nnull===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex);this._.element.getFirst().setStyle(\"z-index\",CKEDITOR.dialog._.currentZIndex+=10);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,q(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this);\na.on(\"keydown\",D);a.on(\"keyup\",G);this._.hasFocus=!1;for(var c in b.contents)if(b.contents[c]){var a=b.contents[c],d=this._.tabs[a.id],e=a.requiredContent,g=0;if(d){for(var h in this._.contents[a.id]){var k=this._.contents[a.id][h];\"hbox\"!=k.type&&\"vbox\"!=k.type&&k.getInputElement()&&(k.requiredContent&&!this._.editor.activeFilter.check(k.requiredContent)?k.disable():(k.enable(),g++))}!g||e&&!this._.editor.activeFilter.check(e)?d[0].addClass(\"cke_dialog_tab_disabled\"):d[0].removeClass(\"cke_dialog_tab_disabled\")}}CKEDITOR.tools.setTimeout(function(){this.layout();\nf(this);this.parts.dialog.setStyle(\"visibility\",\"\");this.fireOnce(\"load\",{});CKEDITOR.ui.fire(\"ready\",this);this.fire(\"show\",{});this._.editor.fire(\"dialogShow\",this);this._.parentDialog||this._.editor.focusManager.lock();this.foreach(function(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var a=this.parts.dialog,b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),d=(c.width-b.width)/2,f=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(0<f?f:0)>c.height||\nb.width+(0<d?d:0)>c.width?a.setStyle(\"position\",\"absolute\"):a.setStyle(\"position\",\"fixed\"));this.move(this._.moved?this._.position.x:d,this._.moved?this._.position.y:f)},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);return this},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},\ncommitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire(\"hide\",{});this._.editor.fire(\"dialogHide\",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle(\"display\",\"none\");this.parts.dialog.setStyle(\"visibility\",\"hidden\");for(I(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();\nif(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle(\"z-index\",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else r(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener(\"keydown\",D);a.removeListener(\"keyup\",G);var c=this._.editor;c.focus();setTimeout(function(){c.focusManager.unlock();CKEDITOR.env.iOS&&c.window.focus()},0)}delete this._.parentDialog;\nthis.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title\\x3d\"'+CKEDITOR.tools.htmlEncode(a.label)+'\"':\"\",d=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:\"vbox\",className:\"cke_dialog_page_contents\",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||\"width: 100%;\"},b),f=this._.contents[a.id]={},e=d.getChild(),\ng=0;d=e.shift();)d.notAllowed||\"hbox\"==d.type||\"vbox\"==d.type||g++,f[d.id]=d,\"function\"==typeof d.getChild&&e.push.apply(e,d.getChild());g||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(\"\"));b.setAttribute(\"role\",\"tabpanel\");d=CKEDITOR.env;f=\"cke_\"+a.id+\"_\"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\\x3ca class\\x3d\"cke_dialog_tab\"',0<this._.pageCount?\" cke_last\":\"cke_first\",c,a.hidden?' style\\x3d\"display:none\"':\"\",' id\\x3d\"',f,'\"',d.gecko&&!d.hc?\"\":' href\\x3d\"javascript:void(0)\"',\n' tabIndex\\x3d\"-1\" hidefocus\\x3d\"true\" role\\x3d\"tab\"\\x3e',a.label,\"\\x3c/a\\x3e\"].join(\"\"));b.setAttribute(\"aria-labelledby\",f);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;this._.lastTab=c;this.updateStyle();b.setAttribute(\"name\",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);a.accessKey&&(F(this,this,\"CTRL+\"+a.accessKey,K,H),this._.accessKeyMap[\"CTRL+\"+a.accessKey]=a.id)}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass(\"cke_dialog_tab_disabled\")&&\n!1!==this.fire(\"selectPage\",{page:a,currentPage:this._.currentTabId})){for(var c in this._.tabs){var d=this._.tabs[c][0],f=this._.tabs[c][1];c!=a&&(d.removeClass(\"cke_dialog_tab_selected\"),f.hide());f.setAttribute(\"aria-hidden\",c!=a)}var e=this._.tabs[a];e[0].addClass(\"cke_dialog_tab_selected\");CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(b(e[1]),e[1].show(),setTimeout(function(){b(e[1],1)},0)):e[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},\nupdateStyle:function(){this.parts.dialog[(1===this._.pageCount?\"add\":\"remove\")+\"Class\"](\"cke_single_page\")},hidePage:function(b){var c=this._.tabs[b]&&this._.tabs[b][0];c&&1!=this._.pageCount&&c.isVisible()&&(b==this._.currentTabId&&this.selectPage(a.call(this)),c.hide(),this._.pageCount--,this.updateStyle())},showPage:function(a){if(a=this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},\ngetContentElement:function(a,b){var c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},\ngetSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,b){if(\"undefined\"==typeof b)b=this._.focusList.length,this._.focusList.push(new l(this,a,b));else{this._.focusList.splice(b,0,new l(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,c={attributes:{\"class\":\"cke_dialog_spinner\"},\nstyles:{\"float\":\"rtl\"==b?\"right\":\"left\"}};c.styles[\"margin-\"+(\"rtl\"==b?\"left\":\"right\")]=\"8px\";this.parts.spinner=CKEDITOR.document.createElement(\"div\",c);this.parts.spinner.setHtml(\"\\x26#8987;\");this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show();this.getButton(\"ok\").disable()}else a==CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton(\"ok\").enable());this.fire(\"state\",a)}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(a,b){this._.dialogDefinitions[a]&&\n\"function\"!=typeof b||(this._.dialogDefinitions[a]=b)},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},isTabEnabled:function(a,b,c){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp(\"(?:^|;)\"+b+\":\"+c+\"(?:$|;)\",\"i\")))},okButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:\"ok\",type:\"button\",label:a.lang.common.ok,\"class\":\"cke_dialog_ui_button_ok\",onClick:function(a){a=a.data.dialog;!1!==a.fire(\"ok\",\n{hide:!0}).hide&&a.hide()}},b,!0)};a.type=\"button\";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:\"button\"},!0)};return a}(),cancelButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:\"cancel\",type:\"button\",label:a.lang.common.cancel,\"class\":\"cke_dialog_ui_button_cancel\",onClick:function(a){a=a.data.dialog;!1!==a.fire(\"cancel\",{hide:!0}).hide&&a.hide()}},b,!0)};a.type=\"button\";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,\nb)},{type:\"button\"},!0)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var v={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},w=function(a,b,c){for(var d=0,f;f=a[d];d++)if(f.id==b||c&&f[c]&&(f=w(f[c],\nb,c)))return f;return null},z=function(a,b,c,d,f){if(c){for(var e=0,g;g=a[e];e++){if(g.id==c)return a.splice(e,0,b),b;if(d&&g[d]&&(g=z(g[d],b,c,d,!0)))return g}if(f)return null}a.push(b);return b},B=function(a,b,c){for(var d=0,f;f=a[d];d++){if(f.id==b)return a.splice(d,1);if(c&&f[c]&&(f=B(f[c],b,c)))return f}return null},t=function(a,b){this.dialog=a;for(var c=b.contents,d=0,f;f=c[d];d++)c[d]=f&&new h(a,f);CKEDITOR.tools.extend(this,b)};t.prototype={getContents:function(a){return w(this.contents,\na)},getButton:function(a){return w(this.buttons,a)},addContents:function(a,b){return z(this.contents,a,b)},addButton:function(a,b){return z(this.buttons,a,b)},removeContents:function(a){B(this.contents,a)},removeButton:function(a){B(this.buttons,a)}};h.prototype={get:function(a){return w(this.elements,a,\"children\")},add:function(a,b){return z(this.elements,a,b,\"children\")},remove:function(a){B(this.elements,a,\"children\")}};var y,C={},x,A={},D=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=\na.data.$.altKey,d=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode);(b=A[(b?\"CTRL+\":\"\")+(c?\"ALT+\":\"\")+(d?\"SHIFT+\":\"\")+f])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())},G=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode);(b=A[(b?\"CTRL+\":\"\")+(c?\"ALT+\":\"\")+(d?\"SHIFT+\":\"\")+f])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),\na.data.preventDefault()))},F=function(a,b,c,d,f){(A[c]||(A[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:f||a.accessKeyUp,keydown:d||a.accessKeyDown})},I=function(a){for(var b in A){for(var c=A[b],d=c.length-1;0<=d;d--)c[d].dialog!=a&&c[d].uiElement!=a||c.splice(d,1);0===c.length&&delete A[b]}},H=function(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},K=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,d,f,e,g){if(!(4>arguments.length)){var k=(d.call?d(b):d)||\"div\",\nh=[\"\\x3c\",k,\" \"],m=(f&&f.call?f(b):f)||{},l=(e&&e.call?e(b):e)||{},n=(g&&g.call?g.call(this,a,b):g)||\"\",w=this.domId=l.id||CKEDITOR.tools.getNextId()+\"_uiElement\";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(m.display=\"none\",this.notAllowed=!0);l.id=w;var v={};b.type&&(v[\"cke_dialog_ui_\"+b.type]=1);b.className&&(v[b.className]=1);b.disabled&&(v.cke_disabled=1);for(var p=l[\"class\"]&&l[\"class\"].split?l[\"class\"].split(\" \"):[],w=0;w<p.length;w++)p[w]&&(v[p[w]]=1);p=[];for(w in v)p.push(w);\nl[\"class\"]=p.join(\" \");b.title&&(l.title=b.title);v=(b.style||\"\").split(\";\");b.align&&(p=b.align,m[\"margin-left\"]=\"left\"==p?0:\"auto\",m[\"margin-right\"]=\"right\"==p?0:\"auto\");for(w in m)v.push(w+\":\"+m[w]);b.hidden&&v.push(\"display:none\");for(w=v.length-1;0<=w;w--)\"\"===v[w]&&v.splice(w,1);0<v.length&&(l.style=(l.style?l.style+\"; \":\"\")+v.join(\"; \"));for(w in l)h.push(w+'\\x3d\"'+CKEDITOR.tools.htmlEncode(l[w])+'\" ');h.push(\"\\x3e\",n,\"\\x3c/\",k,\"\\x3e\");c.push(h.join(\"\"));(this._||(this._={})).dialog=a;\"boolean\"==\ntypeof b.isChanged&&(this.isChanged=function(){return b.isChanged});\"function\"==typeof b.isChanged&&(this.isChanged=b.isChanged);\"function\"==typeof b.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,b.setValue.call(this,c))}}));\"function\"==typeof b.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return b.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(b);\nthis.accessKeyUp&&this.accessKeyDown&&b.accessKey&&F(this,a,\"CTRL+\"+b.accessKey);var z=this;a.on(\"load\",function(){var b=z.getInputElement();if(b){var c=z.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?\"cke_dialog_ui_focused\":\"\";b.on(\"focus\",function(){a._.tabBarMode=!1;a._.hasFocus=!0;z.fire(\"focus\");c&&this.addClass(c)});b.on(\"blur\",function(){z.fire(\"blur\");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=\na._.focusList.push(this)-1,this.on(\"focus\",function(){a._.currentFocusIndex=z.focusIndex}))}},hbox:function(a,b,c,d,f){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,g=f&&f.widths||null,k=f&&f.height||null,h,m={role:\"presentation\"};f&&f.align&&(m.align=f.align);CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:\"hbox\"},d,\"table\",{},m,function(){var a=['\\x3ctbody\\x3e\\x3ctr class\\x3d\"cke_dialog_ui_hbox\"\\x3e'];for(h=0;h<c.length;h++){var b=\"cke_dialog_ui_hbox_child\",d=[];0===h&&\n(b=\"cke_dialog_ui_hbox_first\");h==c.length-1&&(b=\"cke_dialog_ui_hbox_last\");a.push('\\x3ctd class\\x3d\"',b,'\" role\\x3d\"presentation\" ');g?g[h]&&d.push(\"width:\"+p(g[h])):d.push(\"width:\"+Math.floor(100/c.length)+\"%\");k&&d.push(\"height:\"+p(k));f&&void 0!==f.padding&&d.push(\"padding:\"+p(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e[h].align&&d.push(\"text-align:\"+e[h].align);0<d.length&&a.push('style\\x3d\"'+d.join(\"; \")+'\" ');a.push(\"\\x3e\",c[h],\"\\x3c/td\\x3e\")}a.push(\"\\x3c/tr\\x3e\\x3c/tbody\\x3e\");return a.join(\"\")})}},\nvbox:function(a,b,c,d,f){if(!(3>arguments.length)){this._||(this._={});var e=this._.children=b,g=f&&f.width||null,h=f&&f.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:\"vbox\"},d,\"div\",null,{role:\"presentation\"},function(){var b=['\\x3ctable role\\x3d\"presentation\" cellspacing\\x3d\"0\" border\\x3d\"0\" '];b.push('style\\x3d\"');f&&f.expand&&b.push(\"height:100%;\");b.push(\"width:\"+p(g||\"100%\"),\";\");CKEDITOR.env.webkit&&b.push(\"float:none;\");b.push('\"');b.push('align\\x3d\"',CKEDITOR.tools.htmlEncode(f&&\nf.align||(\"ltr\"==a.getParentEditor().lang.dir?\"left\":\"right\")),'\" ');b.push(\"\\x3e\\x3ctbody\\x3e\");for(var d=0;d<c.length;d++){var k=[];b.push('\\x3ctr\\x3e\\x3ctd role\\x3d\"presentation\" ');g&&k.push(\"width:\"+p(g||\"100%\"));h?k.push(\"height:\"+p(h[d])):f&&f.expand&&k.push(\"height:\"+Math.floor(100/c.length)+\"%\");f&&void 0!==f.padding&&k.push(\"padding:\"+p(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e[d].align&&k.push(\"text-align:\"+e[d].align);0<k.length&&b.push('style\\x3d\"',k.join(\"; \"),'\" ');b.push(' class\\x3d\"cke_dialog_ui_vbox_child\"\\x3e',\nc[d],\"\\x3c/td\\x3e\\x3c/tr\\x3e\")}b.push(\"\\x3c/tbody\\x3e\\x3c/table\\x3e\");return b.join(\"\")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){this.getInputElement().setValue(a);!b&&this.fire(\"change\",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var a=\nthis.getInputElement();(a=a.getParent())&&-1==a.$.className.search(\"cke_dialog_page_contents\"););if(!a)return this;a=a.getAttribute(\"name\");this._.dialog._.currentTabId!=a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(a){var b=/^on([A-Z]\\w+)/,c,d=function(a,b,c,d){b.on(\"load\",function(){a.getInputElement().on(c,d,a)})},f;for(f in a)if(c=f.match(b))this.eventProcessors[f]?this.eventProcessors[f].call(this,\nthis._.dialog,a[f]):d(this,this._.dialog,c[1].toLowerCase(),a[f]);return this},eventProcessors:{onLoad:function(a,b){a.on(\"load\",b,this)},onShow:function(a,b){a.on(\"show\",b,this)},onHide:function(a,b){a.on(\"hide\",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var a=this.getElement();this.getInputElement().setAttribute(\"disabled\",\"true\");a.addClass(\"cke_disabled\")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute(\"disabled\");\na.removeClass(\"cke_disabled\")},isEnabled:function(){return!this.getElement().hasClass(\"cke_disabled\")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(a){if(1>arguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?\nthis._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,c){for(var d=b.children,f,e=[],g=[],h=0;h<d.length&&(f=d[h]);h++){var k=[];e.push(k);g.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,k))}return new CKEDITOR.ui.dialog[b.type](a,g,e,c,b)}};CKEDITOR.dialog.addUIElement(\"hbox\",a);CKEDITOR.dialog.addUIElement(\"vbox\",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;\nCKEDITOR.tools.extend(this,b,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){a.openDialog(this.dialogName)},canUndo:!1,editorFocus:1};(function(){var a=/^([a]|[^a])+$/,b=/^\\d*$/,c=/^\\d*(?:\\.\\d+)?$/,d=/^(((\\d*(\\.\\d+))|(\\d*))(px|\\%)?)?$/,f=/^(((\\d*(\\.\\d+))|(\\d*))(px|em|ex|in|cm|mm|pt|pc|\\%)?)?$/i,e=/^(\\s*[\\w-]+\\s*:\\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(){var b=this&&this.getValue?this.getValue():\na[0],c,d=CKEDITOR.VALIDATE_AND,f=[],e;for(e=0;e<a.length;e++)if(\"function\"==typeof a[e])f.push(a[e]);else break;e<a.length&&\"string\"==typeof a[e]&&(c=a[e],e++);e<a.length&&\"number\"==typeof a[e]&&(d=a[e]);var g=d==CKEDITOR.VALIDATE_AND?!0:!1;for(e=0;e<f.length;e++)g=d==CKEDITOR.VALIDATE_AND?g&&f[e](b):g||f[e](b);return g?!0:c}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return a.test(c)?!0:b}},notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,\na)},number:function(a){return this.regex(c,a)},cssLength:function(a){return this.functions(function(a){return f.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on(\"instanceDestroyed\",\nfunction(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in C)C[c].remove();C={}}a=a.editor._.storedDialogs;for(var d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,d=CKEDITOR.dialog._.dialogDefinitions[a];null===CKEDITOR.dialog._.currentTop&&q(this);if(\"function\"==typeof d)c=this._.storedDialogs||(this._.storedDialogs={}),c=c[a]||(c[a]=new CKEDITOR.dialog(this,a)),b&&b.call(c,\nc),c.show();else{if(\"failed\"==d)throw r(this),Error('[CKEDITOR.dialog.openDialog] Dialog \"'+a+'\" failed when loading definition.');\"string\"==typeof d&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(d),function(){\"function\"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]=\"failed\");this.openDialog(a,b)},this,0,1)}CKEDITOR.skin.loadPart(\"dialog\");return c}})}(),CKEDITOR.plugins.add(\"dialog\",{requires:\"dialogui\",init:function(a){a.on(\"doubleclick\",function(e){e.data.dialog&&\na.openDialog(e.data.dialog)},null,null,999)}}),function(){CKEDITOR.plugins.add(\"a11yhelp\",{requires:\"dialog\",availableLangs:{af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,en:1,\"en-gb\":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,\"fr-ca\":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,pl:1,pt:1,\"pt-br\":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,\"sr-latn\":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,\"zh-cn\":1},init:function(a){var e=this;a.addCommand(\"a11yHelp\",{exec:function(){var b=\na.langCode,b=e.availableLangs[b]?b:e.availableLangs[b.replace(/-.*/,\"\")]?b.replace(/-.*/,\"\"):\"en\";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e.path+\"dialogs/lang/\"+b+\".js\"),function(){a.lang.a11yhelp=e.langEntries[b];a.openDialog(\"a11yHelp\")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});a.setKeystroke(CKEDITOR.ALT+48,\"a11yHelp\");CKEDITOR.dialog.add(\"a11yHelp\",this.path+\"dialogs/a11yhelp.js\");a.on(\"ariaEditorHelpLabel\",function(b){b.data.label=a.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add(\"about\",\n{requires:\"dialog\",init:function(a){var e=a.addCommand(\"about\",new CKEDITOR.dialogCommand(\"about\"));e.modes={wysiwyg:1,source:1};e.canUndo=!1;e.readOnly=1;a.ui.addButton&&a.ui.addButton(\"About\",{label:a.lang.about.title,command:\"about\",toolbar:\"about\"});CKEDITOR.dialog.add(\"about\",this.path+\"dialogs/about.js\")}}),CKEDITOR.plugins.add(\"basicstyles\",{init:function(a){var e=0,b=function(b,d,h,k){if(k){k=new CKEDITOR.style(k);var g=c[h];g.unshift(k);a.attachStyleStateChange(k,function(b){!a.readOnly&&\na.getCommand(h).setState(b)});a.addCommand(h,new CKEDITOR.styleCommand(k,{contentForms:g}));a.ui.addButton&&a.ui.addButton(b,{label:d,command:h,toolbar:\"basicstyles,\"+(e+=10)})}},c={bold:[\"strong\",\"b\",[\"span\",function(a){a=a.styles[\"font-weight\"];return\"bold\"==a||700<=+a}]],italic:[\"em\",\"i\",[\"span\",function(a){return\"italic\"==a.styles[\"font-style\"]}]],underline:[\"u\",[\"span\",function(a){return\"underline\"==a.styles[\"text-decoration\"]}]],strike:[\"s\",\"strike\",[\"span\",function(a){return\"line-through\"==\na.styles[\"text-decoration\"]}]],subscript:[\"sub\"],superscript:[\"sup\"]},d=a.config,m=a.lang.basicstyles;b(\"Bold\",m.bold,\"bold\",d.coreStyles_bold);b(\"Italic\",m.italic,\"italic\",d.coreStyles_italic);b(\"Underline\",m.underline,\"underline\",d.coreStyles_underline);b(\"Strike\",m.strike,\"strike\",d.coreStyles_strike);b(\"Subscript\",m.subscript,\"subscript\",d.coreStyles_subscript);b(\"Superscript\",m.superscript,\"superscript\",d.coreStyles_superscript);a.setKeystroke([[CKEDITOR.CTRL+66,\"bold\"],[CKEDITOR.CTRL+73,\"italic\"],\n[CKEDITOR.CTRL+85,\"underline\"]])}}),CKEDITOR.config.coreStyles_bold={element:\"strong\",overrides:\"b\"},CKEDITOR.config.coreStyles_italic={element:\"em\",overrides:\"i\"},CKEDITOR.config.coreStyles_underline={element:\"u\"},CKEDITOR.config.coreStyles_strike={element:\"s\",overrides:\"strike\"},CKEDITOR.config.coreStyles_subscript={element:\"sub\"},CKEDITOR.config.coreStyles_superscript={element:\"sup\"},function(){var a={exec:function(a){var b=a.getCommand(\"blockquote\").state,c=a.getSelection(),d=c&&c.getRanges()[0];\nif(d){var m=c.createBookmarks();if(CKEDITOR.env.ie){var l=m[0].startNode,f=m[0].endNode,h;if(l&&\"blockquote\"==l.getParent().getName())for(h=l;h=h.getNext();)if(h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){l.move(h,!0);break}if(f&&\"blockquote\"==f.getParent().getName())for(h=f;h=h.getPrevious();)if(h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){f.move(h);break}}var k=d.createIterator();k.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(b==CKEDITOR.TRISTATE_OFF){for(l=[];b=k.getNextParagraph();)l.push(b);\n1>l.length&&(b=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?\"p\":\"div\"),f=m.shift(),d.insertNode(b),b.append(new CKEDITOR.dom.text(\"\",a.document)),d.moveToBookmark(f),d.selectNodeContents(b),d.collapse(!0),f=d.createBookmark(),l.push(b),m.unshift(f));h=l[0].getParent();d=[];for(f=0;f<l.length;f++)b=l[f],h=h.getCommonAncestor(b.getParent());for(b={table:1,tbody:1,tr:1,ol:1,ul:1};b[h.getName()];)h=h.getParent();for(f=null;0<l.length;){for(b=l.shift();!b.getParent().equals(h);)b=b.getParent();\nb.equals(f)||d.push(b);f=b}for(;0<d.length;)if(b=d.shift(),\"blockquote\"==b.getName()){for(f=new CKEDITOR.dom.documentFragment(a.document);b.getFirst();)f.append(b.getFirst().remove()),l.push(f.getLast());f.replace(b)}else l.push(b);d=a.document.createElement(\"blockquote\");for(d.insertBefore(l[0]);0<l.length;)b=l.shift(),d.append(b)}else if(b==CKEDITOR.TRISTATE_ON){f=[];for(h={};b=k.getNextParagraph();){for(l=d=null;b.getParent();){if(\"blockquote\"==b.getParent().getName()){d=b.getParent();l=b;break}b=\nb.getParent()}d&&l&&!l.getCustomData(\"blockquote_moveout\")&&(f.push(l),CKEDITOR.dom.element.setMarker(h,l,\"blockquote_moveout\",!0))}CKEDITOR.dom.element.clearAllMarkers(h);b=[];l=[];for(h={};0<f.length;)k=f.shift(),d=k.getParent(),k.getPrevious()?k.getNext()?(k.breakParent(k.getParent()),l.push(k.getNext())):k.remove().insertAfter(d):k.remove().insertBefore(d),d.getCustomData(\"blockquote_processed\")||(l.push(d),CKEDITOR.dom.element.setMarker(h,d,\"blockquote_processed\",!0)),b.push(k);CKEDITOR.dom.element.clearAllMarkers(h);\nfor(f=l.length-1;0<=f;f--){d=l[f];a:{h=d;for(var k=0,g=h.getChildCount(),n=void 0;k<g&&(n=h.getChild(k));k++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){h=!1;break a}h=!0}h&&d.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(d=!0;b.length;)if(k=b.shift(),\"div\"==k.getName()){f=new CKEDITOR.dom.documentFragment(a.document);!d||!k.getPrevious()||k.getPrevious().type==CKEDITOR.NODE_ELEMENT&&k.getPrevious().isBlockBoundary()||f.append(a.document.createElement(\"br\"));for(d=k.getNext()&&\n!(k.getNext().type==CKEDITOR.NODE_ELEMENT&&k.getNext().isBlockBoundary());k.getFirst();)k.getFirst().remove().appendTo(f);d&&f.append(a.document.createElement(\"br\"));f.replace(k);d=!1}}c.selectBookmarks(m);a.focus()}},refresh:function(a,b){this.setState(a.elementPath(b.block||b.blockLimit).contains(\"blockquote\",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:\"blockquote\",allowedContent:\"blockquote\",requiredContent:\"blockquote\"};CKEDITOR.plugins.add(\"blockquote\",{init:function(e){e.blockless||\n(e.addCommand(\"blockquote\",a),e.ui.addButton&&e.ui.addButton(\"Blockquote\",{label:e.lang.blockquote.toolbar,command:\"blockquote\",toolbar:\"blocks,10\"}))}})}(),\"use strict\",function(){function a(a,b,c){b.type||(b.type=\"auto\");if(c&&!1===a.fire(\"beforePaste\",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;b.dataValue||(b.dataValue=\"\");if(CKEDITOR.env.gecko&&\"drop\"==b.method&&a.toolbox)a.once(\"afterPaste\",function(){a.toolbox.focus()});return a.fire(\"paste\",b)}function e(b){function c(){var a=b.editable();\nif(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(a){b.readOnly&&\"cut\"==a.name||A.initPasteDataTransfer(a,b);a.data.preventDefault()};a.on(\"copy\",d);a.on(\"cut\",d);a.on(\"cut\",function(){b.readOnly||b.extractSelectedHtml()},null,null,999)}a.on(A.mainPasteEvent,function(a){\"beforepaste\"==A.mainPasteEvent&&D||y(a)});\"beforepaste\"==A.mainPasteEvent&&(a.on(\"paste\",function(a){G||(e(),a.data.preventDefault(),y(a),k(\"paste\")||b.openDialog(\"paste\"))}),a.on(\"contextmenu\",h,null,null,0),\na.on(\"beforepaste\",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||h()},null,null,0));a.on(\"beforecut\",function(){!D&&m(b)});var f;a.attachListener(CKEDITOR.env.ie?a:b.document.getDocumentElement(),\"mouseup\",function(){f=setTimeout(function(){C()},0)});b.on(\"destroy\",function(){clearTimeout(f)});a.on(\"keyup\",C)}function d(a){return{type:a,canUndo:\"cut\"==a,startDisabled:!0,exec:function(){\"cut\"==this.type&&m();var a;var c=this.type;if(CKEDITOR.env.ie)a=k(c);else try{a=b.document.$.execCommand(c,\n!1,null)}catch(d){a=!1}a||b.showNotification(b.lang.clipboard[this.type+\"Error\"]);return a}}}function f(){return{canUndo:!1,async:!0,exec:function(b,c){var d=function(c,d){c&&a(b,c,!!d);b.fire(\"afterCommandExec\",{name:\"paste\",command:f,returnValue:!!c})},f=this;\"string\"==typeof c?d({dataValue:c,method:\"paste\",dataTransfer:A.initPasteDataTransfer()},1):b.getClipboardData(d)}}}function e(){G=1;setTimeout(function(){G=0},100)}function h(){D=1;setTimeout(function(){D=0},10)}function k(a){var c=b.document,\nd=c.getBody(),f=!1,e=function(){f=!0};d.on(a,e);7<CKEDITOR.env.version?c.$.execCommand(a):c.$.selection.createRange().execCommand(a);d.removeListener(a,e);return f}function m(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),c,d,f;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=a.getSelectedElement())&&(d=a.getRanges()[0],f=b.document.createText(\"\"),f.insertBefore(c),d.setStartBefore(f),d.setEndAfter(c),a.selectRanges([d]),setTimeout(function(){c.getParent()&&(f.remove(),a.selectElement(c))},\n0))}}function l(a,c){var d=b.document,f=b.editable(),e=function(a){a.cancel()},h;if(!d.getById(\"cke_pastebin\")){var k=b.getSelection(),m=k.createBookmarks();CKEDITOR.env.ie&&k.root.fire(\"selectionchange\");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!f.is(\"body\")||CKEDITOR.env.ie?\"div\":\"body\",d);n.setAttributes({id:\"cke_pastebin\",\"data-cke-temp\":\"1\"});var w=0,d=d.getWindow();CKEDITOR.env.webkit?(f.append(n),n.addClass(\"cke_editable\"),f.is(\"body\")||(w=\"static\"!=f.getComputedStyle(\"position\")?\nf:CKEDITOR.dom.element.get(f.$.offsetParent),w=w.getDocumentPosition().y)):f.getAscendant(CKEDITOR.env.ie?\"body\":\"html\",1).append(n);n.setStyles({position:\"absolute\",top:d.getScrollPosition().y-w+10+\"px\",width:\"1px\",height:Math.max(1,d.getViewPaneSize().height-20)+\"px\",overflow:\"hidden\",margin:0,padding:0});CKEDITOR.env.safari&&n.setStyles(CKEDITOR.tools.cssVendorPrefix(\"user-select\",\"text\"));(w=n.getParent().isReadOnly())?(n.setOpacity(0),n.setAttribute(\"contenteditable\",!0)):n.setStyle(\"ltr\"==b.config.contentsLangDirection?\n\"left\":\"right\",\"-1000px\");b.on(\"selectionChange\",e,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)h=f.once(\"blur\",e,null,null,-100);w&&n.focus();w=new CKEDITOR.dom.range(n);w.selectNodeContents(n);var v=w.select();CKEDITOR.env.ie&&(h=f.once(\"blur\",function(){b.lockSelection(v)}));var p=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=p);h&&h.removeListener();CKEDITOR.env.ie&&f.focus();k.selectBookmarks(m);\nn.remove();var a;CKEDITOR.env.webkit&&(a=n.getFirst())&&a.is&&a.hasClass(\"Apple-style-span\")&&(n=a);b.removeListener(\"selectionChange\",e);c(n.getHtml())},0)}}function B(){if(\"paste\"==A.mainPasteEvent)return b.fire(\"beforePaste\",{type:\"auto\",method:\"paste\"}),!1;b.focus();e();var a=b.focusManager;a.lock();if(b.editable().fire(A.mainPasteEvent)&&!k(\"paste\"))return a.unlock(),!1;a.unlock();return!0}function t(a){if(\"wysiwyg\"==b.mode)switch(a.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:a=\nb.editable();e();\"paste\"==A.mainPasteEvent&&a.fire(\"beforepaste\");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:b.fire(\"saveSnapshot\"),setTimeout(function(){b.fire(\"saveSnapshot\")},50)}}function y(c){var d={type:\"auto\",method:\"paste\",dataTransfer:A.initPasteDataTransfer(c)};d.dataTransfer.cacheData();var f=!1!==b.fire(\"beforePaste\",d);f&&A.canClipboardApiBeTrusted(d.dataTransfer,b)?(c.data.preventDefault(),setTimeout(function(){a(b,d)},0)):l(c,function(c){d.dataValue=c.replace(/<span[^>]+data-cke-bookmark[^<]*?<\\/span>/ig,\n\"\");f&&a(b,d)})}function C(){if(\"wysiwyg\"==b.mode){var a=x(\"paste\");b.getCommand(\"cut\").setState(x(\"cut\"));b.getCommand(\"copy\").setState(x(\"copy\"));b.getCommand(\"paste\").setState(a);b.fire(\"pasteState\",a)}}function x(a){if(F&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if(\"paste\"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();var c=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var A=CKEDITOR.plugins.clipboard,\nD=0,G=0,F=0;(function(){b.on(\"key\",t);b.on(\"contentDom\",c);b.on(\"selectionChange\",function(a){F=a.data.selection.getRanges()[0].checkReadOnly();C()});b.contextMenu&&b.contextMenu.addListener(function(a,b){F=b.getRanges()[0].checkReadOnly();return{cut:x(\"cut\"),copy:x(\"copy\"),paste:x(\"paste\")}})})();(function(){function a(c,d,f,e,h){var k=b.lang.clipboard[d];b.addCommand(d,f);b.ui.addButton&&b.ui.addButton(c,{label:k,command:d,toolbar:\"clipboard,\"+e});b.addMenuItems&&b.addMenuItem(d,{label:k,command:d,\ngroup:\"clipboard\",order:h})}a(\"Cut\",\"cut\",d(\"cut\"),10,1);a(\"Copy\",\"copy\",d(\"copy\"),20,4);a(\"Paste\",\"paste\",f(),30,8)})();b.getClipboardData=function(a,c){function d(a){a.removeListener();a.cancel();c(a.data)}function f(a){a.removeListener();a.cancel();m=!0;c({type:k,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:\"paste\"})}function e(){this.customTitle=a&&a.title}var h=!1,k=\"auto\",m=!1;c||(c=a,a=null);b.on(\"paste\",d,null,null,0);b.on(\"beforePaste\",function(a){a.removeListener();\nh=!0;k=a.data.type},null,null,1E3);!1===B()&&(b.removeListener(\"paste\",d),h&&b.fire(\"pasteDialog\",e)?(b.on(\"pasteDialogCommit\",f),b.on(\"dialogHide\",function(a){a.removeListener();a.data.removeListener(\"pasteDialogCommit\",f);setTimeout(function(){m||c(null)},10)})):c(null))}}function b(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(<div><br( ?\\/)?><\\/div>|<div>[^<]*<\\/div>)*$/gi))return\"html\"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|<br( ?\\/)?>)*$/gi)&&!a.match(/^(<p>([^<]|<br( ?\\/)?>)*<\\/p>|(\\r\\n))*$/gi))return\"html\"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|<br( ?\\/)?>)*$/gi))return\"html\"}else return\"html\";\nreturn\"htmlifiedtext\"}function c(a,b){function c(a){return CKEDITOR.tools.repeat(\"\\x3c/p\\x3e\\x3cp\\x3e\",~~(a/2))+(1==a%2?\"\\x3cbr\\x3e\":\"\")}b=b.replace(/\\s+/g,\" \").replace(/> +</g,\"\\x3e\\x3c\").replace(/<br ?\\/>/gi,\"\\x3cbr\\x3e\");b=b.replace(/<\\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1<b.indexOf(\"\\x3cdiv\\x3e\")&&(b=b.replace(/^(<div>(<br>|)<\\/div>)(?!$|(<div>(<br>|)<\\/div>))/g,\"\\x3cbr\\x3e\").replace(/^(<div>(<br>|)<\\/div>){2}(?!$)/g,\"\\x3cdiv\\x3e\\x3c/div\\x3e\"),\nb.match(/<div>(<br>|)<\\/div>/)&&(b=\"\\x3cp\\x3e\"+b.replace(/(<div>(<br>|)<\\/div>)+/g,function(a){return c(a.split(\"\\x3c/div\\x3e\\x3cdiv\\x3e\").length+1)})+\"\\x3c/p\\x3e\"),b=b.replace(/<\\/div><div>/g,\"\\x3cbr\\x3e\"),b=b.replace(/<\\/?div>/g,\"\"));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,\"\\x3cbr\\x3e\")),-1<b.indexOf(\"\\x3cbr\\x3e\\x3cbr\\x3e\")&&(b=\"\\x3cp\\x3e\"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+\"\\x3c/p\\x3e\"));return l(a,b)}function d(){function a(){var b=\n{},c;for(c in CKEDITOR.dtd)\"$\"!=c.charAt(0)&&\"div\"!=c&&\"span\"!=c&&(b[c]=1);return b}var b={};return{get:function(c){return\"plain-text\"==c?b.plainText||(b.plainText=new CKEDITOR.filter(\"br\")):\"semantic-content\"==c?((c=b.semanticContent)||(c=new CKEDITOR.filter,c.allow({$1:{elements:a(),attributes:!0,styles:!1,classes:!1}}),c=b.semanticContent=c),c):c?new CKEDITOR.filter(c):null}}}function m(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,\na.activeEnterMode);b.writeHtml(d);return d.getHtml()}function l(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat(\"\\x3cbr\\x3e\",a.length/7*2)}).replace(/<\\/?p>/g,\"\"):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\\/)?p>/g,\"\\x3c$1div\\x3e\"));return b}function f(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect=\"none\"}function h(b){var c=CKEDITOR.plugins.clipboard;b.on(\"contentDom\",function(){function d(c,f,e){f.select();a(b,{dataTransfer:e,\nmethod:\"drop\"},1);e.sourceEditor.fire(\"saveSnapshot\");e.sourceEditor.editable().extractHtmlFromRange(c);e.sourceEditor.getSelection().selectRanges([c]);e.sourceEditor.fire(\"saveSnapshot\")}function f(d,e){d.select();a(b,{dataTransfer:e,method:\"drop\"},1);c.resetDragDataTransfer()}function e(a,c,d){var f={$:a.data.$,target:a.data.getTarget()};c&&(f.dragRange=c);d&&(f.dropRange=d);!1===b.fire(a.name,f)&&a.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}\nvar k=b.editable(),m=CKEDITOR.plugins.clipboard.getDropTarget(b),l=b.ui.space(\"top\"),B=b.ui.space(\"bottom\");c.preventDefaultDropOnElement(l);c.preventDefaultDropOnElement(B);k.attachListener(m,\"dragstart\",e);k.attachListener(b,\"dragstart\",c.resetDragDataTransfer,c,null,1);k.attachListener(b,\"dragstart\",function(a){c.initDragDataTransfer(a,b)},null,null,2);k.attachListener(b,\"dragstart\",function(){var a=c.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=\na?h(a.startContainer):null,c.dragEndContainerChildCount=a?h(a.endContainer):null)},null,null,100);k.attachListener(m,\"dragend\",e);k.attachListener(b,\"dragend\",c.initDragDataTransfer,c,null,1);k.attachListener(b,\"dragend\",c.resetDragDataTransfer,c,null,100);k.attachListener(m,\"dragover\",function(a){var b=a.data.getTarget();b&&b.is&&b.is(\"html\")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains(\"Files\")&&a.data.preventDefault()});\nk.attachListener(m,\"drop\",function(a){if(!a.data.$.defaultPrevented){a.data.preventDefault();var d=a.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is(\"html\")){var d=c.getRangeAtDropPosition(a,b),f=c.dragRange;d&&e(a,f,d)}}},null,null,9999);k.attachListener(b,\"drop\",c.initDragDataTransfer,c,null,1);k.attachListener(b,\"drop\",function(a){if(a=a.data){var e=a.dropRange,k=a.dragRange,h=a.dataTransfer;h.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(k,\ne,h,b)},0):h.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d(k,e,h):f(e,h)}},null,null,9999)})}CKEDITOR.plugins.add(\"clipboard\",{requires:\"dialog\",init:function(a){var f,k=d();a.config.forcePasteAsPlainText?f=\"plain-text\":a.config.pasteFilter?f=a.config.pasteFilter:!CKEDITOR.env.webkit||\"pasteFilter\"in a.config||(f=\"semantic-content\");a.pasteFilter=k.get(f);e(a);h(a);CKEDITOR.dialog.add(\"paste\",CKEDITOR.getUrl(this.path+\"dialogs/paste.js\"));a.on(\"paste\",function(b){b.data.dataTransfer||\n(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var c=b.data.dataTransfer,d=c.getData(\"text/html\");if(d)b.data.dataValue=d,b.data.type=\"html\";else if(d=c.getData(\"text/plain\"))b.data.dataValue=a.editable().transformPlainTextToHtml(d),b.data.type=\"text\"}},null,null,1);a.on(\"paste\",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;-1<b.indexOf(\"Apple-\")&&(b=b.replace(/<span class=\"Apple-converted-space\"> <\\/span>/gi,\" \"),\"html\"!=a.data.type&&(b=b.replace(/<span class=\"Apple-tab-span\"[^>]*>([^<]*)<\\/span>/gi,\nfunction(a,b){return b.replace(/\\t/g,\"\\x26nbsp;\\x26nbsp; \\x26nbsp;\")})),-1<b.indexOf('\\x3cbr class\\x3d\"Apple-interchange-newline\"\\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing=\"html\",b=b.replace(/<br class=\"Apple-interchange-newline\">/,\"\")),b=b.replace(/(<[^>]+) class=\"Apple-[^\"]*\"/gi,\"$1\"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,f,e=new CKEDITOR.dom.element(\"div\");for(e.setHtml(b);1==e.getChildCount()&&(d=e.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass(\"cke_editable\")||\nd.hasClass(\"cke_contents\"));)e=f=d;f&&(b=f.getHtml().replace(/<br>$/i,\"\"))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\\r\\n)?<(\\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing=\"html\",\"\\x3c\"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\\/(\\w+)><div><br><\\/div>$/,function(b,d){return d in c?(a.data.endsWithEOL=1,\"\\x3c/\"+d+\"\\x3e\"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\\s)<br>$/,\"$1\"));a.data.dataValue=b},null,null,3);a.on(\"paste\",function(d){d=d.data;var f=d.type,e=d.dataValue,h,l=a.config.clipboard_defaultContentType||\n\"html\",n=d.dataTransfer.getTransferType(a);h=\"html\"==f||\"html\"==d.preSniffing?\"html\":b(e);\"htmlifiedtext\"==h&&(e=c(a.config,e));\"text\"==f&&\"html\"==h?e=m(a,e,k.get(\"plain-text\")):n==CKEDITOR.DATA_TRANSFER_EXTERNAL&&a.pasteFilter&&!d.dontFilter&&(e=m(a,e,a.pasteFilter));d.startsWithEOL&&(e='\\x3cbr data-cke-eol\\x3d\"1\"\\x3e'+e);d.endsWithEOL&&(e+='\\x3cbr data-cke-eol\\x3d\"1\"\\x3e');\"auto\"==f&&(f=\"html\"==h||\"html\"==l?\"html\":\"text\");d.type=f;d.dataValue=e;delete d.preSniffing;delete d.startsWithEOL;delete d.endsWithEOL},\nnull,null,6);a.on(\"paste\",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire(\"afterPaste\")},0))},null,null,1E3);a.on(\"pasteDialog\",function(b){setTimeout(function(){a.openDialog(\"paste\",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?\n\"beforepaste\":\"paste\",canClipboardApiBeTrusted:function(a,b){return a.getTransferType(b)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!a.isEmpty()||CKEDITOR.env.gecko&&(a.getData(\"text/html\")||a.getFilesCount())?!0:!1},getDropTarget:function(a){var b=a.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,d){function f(a,c,d){var e=a;e.type==CKEDITOR.NODE_TEXT&&(e=a.getParent());if(e.equals(c)&&d!=c.getChildCount())return a=\nb.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var e=b.startContainer;\"number\"==typeof d&&\"number\"==typeof c&&e.type==CKEDITOR.NODE_ELEMENT&&(f(a.startContainer,e,c)||f(a.endContainer,e,d))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,d=b.endOffset;return a.endContainer.equals(c)&&\na.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()<d||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(b,c,d,f){var e=CKEDITOR.plugins.clipboard,k=f.editable(),h,m;f.fire(\"saveSnapshot\");f.fire(\"lockSnapshot\",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,c,e.dragStartContainerChildCount,e.dragEndContainerChildCount);(m=this.isDropRangeAffectedByDragRange(b,c))||(h=b.createBookmark(!1));\ne=c.clone().createBookmark(!1);m&&(h=b.createBookmark(!1));b=h.startNode;c=h.endNode;m=e.startNode;c&&b.getPosition(m)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(m)&CKEDITOR.POSITION_FOLLOWING&&m.insertBefore(b);b=f.createRange();b.moveToBookmark(h);k.extractHtmlFromRange(b,1);c=f.createRange();c.moveToBookmark(e);a(f,{dataTransfer:d,method:\"drop\",range:c},1);f.fire(\"unlockSnapshot\")},getRangeAtDropPosition:function(a,b){var c=a.data.$,d=c.clientX,f=c.clientY,e=b.getSelection(!0).getRanges()[0],h=\nb.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint)c=b.document.$.caretRangeFromPoint(d,f),h.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),h.collapse(!0);else if(c.rangeParent)h.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&e&&b.editable().hasFocus)return e;if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var k=!1,m=0;20>m&&\n!k;m++){if(!k)try{c.moveToPoint(d,f-m),k=!0}catch(l){}if(!k)try{c.moveToPoint(d,f+m),k=!0}catch(t){}}if(k){var y=\"cke-temp-\"+(new Date).getTime();c.pasteHTML('\\x3cspan id\\x3d\"'+y+'\"\\x3e​\\x3c/span\\x3e');var C=b.document.getById(y);h.moveToPosition(C,CKEDITOR.POSITION_BEFORE_START);C.remove()}else{var x=b.document.$.elementFromPoint(d,f),A=new CKEDITOR.dom.element(x),D;if(A.equals(b.editable())||\"html\"==A.getName())return e&&e.startContainer&&!e.startContainer.equals(b.editable())?e:null;D=A.getClientRect();\nd<D.left?h.setStartAt(A,CKEDITOR.POSITION_AFTER_START):h.setStartAt(A,CKEDITOR.POSITION_BEFORE_END);h.collapse(!0)}}catch(G){return null}}else return null}return h},initDragDataTransfer:function(a,b){var c=a.data.$?a.data.$.dataTransfer:null,d=new this.dataTransfer(c,b);c?this.dragData&&d.id==this.dragData.id?d=this.dragData:this.dragData=d:this.dragData?d=this.dragData:this.dragData=d;a.data.dataTransfer=d},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,b){if(this.isCustomCopyCutSupported&&\na&&a.data&&a.data.$){var c=new this.dataTransfer(a.data.$.clipboardData,b);this.copyCutData&&c.id==this.copyCutData.id?(c=this.copyCutData,c.$=a.data.$.clipboardData):this.copyCutData=c;return c}return new this.dataTransfer(null,b)},preventDefaultDropOnElement:function(a){a&&a.on(\"dragover\",f)}};var k=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?\"cke/id\":\"Text\";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\\s\\S]*?)>([\\s\\S]*)<\\/body>/i,\nfragmentRegExp:/\\x3c!--(?:Start|End)Fragment--\\x3e/g,data:{},files:[],normalizeType:function(a){a=a.toLowerCase();return\"text\"==a||\"text/plain\"==a?\"Text\":\"url\"==a?\"URL\":a}};this.id=this.getData(k);this.id||(this.id=\"Text\"==k?\"\":\"cke-\"+CKEDITOR.tools.getUniqueId());if(\"Text\"!=k)try{this.$.setData(k,this.id)}catch(c){}b&&(this.sourceEditor=b,this.setData(\"text/html\",b.getSelectedHtml(1)),\"Text\"==k||this.getData(\"text/plain\")||this.setData(\"text/plain\",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL=\n1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a){a=this._.normalizeType(a);var b=this._.data[a];if(void 0===b||null===b||\"\"===b)try{b=this.$.getData(a)}catch(c){}if(void 0===b||null===b||\"\"===b)b=\"\";\"text/html\"==a?(b=b.replace(this._.metaRegExp,\"\"),(a=this._.bodyRegExp.exec(b))&&a.length&&(b=a[1],b=b.replace(this._.fragmentRegExp,\"\"))):\"Text\"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&\"file://\"==b.substring(0,\n7)&&(b=\"\");return b},setData:function(a,b){a=this._.normalizeType(a);this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||\"URL\"==a||\"Text\"==a){\"Text\"==k&&\"Text\"==a&&(this.id=b);try{this.$.setData(a,b)}catch(c){}}},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(c){c=b._.normalizeType(c);var d=b.getData(c);d&&(b._.data[c]=\nd)}if(this.$){var b=this,c,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c<this.$.types.length;c++)a(this.$.types[c])}else a(\"Text\"),a(\"URL\");d=this._getImageFromClipboard();if(this.$&&this.$.files||d){this._.files=[];for(c=0;c<this.$.files.length;c++)this._.files.push(this.$.files[c]);0===this._.files.length&&d&&this._.files.push(d)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:\nthis._getImageFromClipboard()?1:0},getFile:function(a){return this._.files.length?this._.files[a]:this.$&&this.$.files&&this.$.files.length?this.$.files[a]:0===a?this._getImageFromClipboard():void 0},isEmpty:function(){var a={},b;if(this.getFilesCount())return!1;for(b in this._.data)a[b]=1;if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var c=0;c<this.$.types.length;c++)a[this.$.types[c]]=1}else a.Text=1,a.URL=1;\"Text\"!=k&&(a[k]=0);for(b in a)if(a[b]&&\"\"!==\nthis.getData(b))return!1;return!0},_getImageFromClipboard:function(){var a;if(this.$&&this.$.items&&this.$.items[0])try{if((a=this.$.items[0].getAsFile())&&a.type)return a}catch(b){}}}}(),function(){CKEDITOR.plugins.add(\"panel\",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL=\"panel\";CKEDITOR.ui.panel=function(a,b){b&&CKEDITOR.tools.extend(this,b);CKEDITOR.tools.extend(this,{className:\"\",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=\na;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(a){return new CKEDITOR.ui.panel(a)}};var a=CKEDITOR.addTemplate(\"panel\",'\\x3cdiv lang\\x3d\"{langCode}\" id\\x3d\"{id}\" dir\\x3d{dir} class\\x3d\"cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}\" style\\x3d\"z-index:{z-index}\" role\\x3d\"presentation\"\\x3e{frame}\\x3c/div\\x3e'),e=CKEDITOR.addTemplate(\"panel-frame\",'\\x3ciframe id\\x3d\"{id}\" class\\x3d\"cke_panel_frame\" role\\x3d\"presentation\" frameborder\\x3d\"0\" src\\x3d\"{src}\"\\x3e\\x3c/iframe\\x3e'),\nb=CKEDITOR.addTemplate(\"panel-frame-inner\",'\\x3c!DOCTYPE html\\x3e\\x3chtml class\\x3d\"cke_panel_container {env}\" dir\\x3d\"{dir}\" lang\\x3d\"{langCode}\"\\x3e\\x3chead\\x3e{css}\\x3c/head\\x3e\\x3cbody class\\x3d\"cke_{dir}\" style\\x3d\"margin:0;padding:0\" onload\\x3d\"{onload}\"\\x3e\\x3c/body\\x3e\\x3c/html\\x3e');CKEDITOR.ui.panel.prototype={render:function(c,d){this.getHolderElement=function(){var a=this._.holder;if(!a){if(this.isFramed){var a=this.document.getById(this.id+\"_frame\"),c=a.getParent(),a=a.getFrameDocument();\nCKEDITOR.env.iOS&&c.setStyles({overflow:\"scroll\",\"-webkit-overflow-scrolling\":\"touch\"});c=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0;if(this.onLoad)this.onLoad()},this));a.write(b.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:\"window.parent.CKEDITOR.tools.callFunction(\"+c+\");\"},m)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on(\"keydown\",function(a){var b=a.data.getKeystroke(),c=this.document.getById(this.id).getAttribute(\"dir\");this._.onKeyDown&&\n!1===this._.onKeyDown(b)?a.data.preventDefault():(27==b||b==(\"rtl\"==c?39:37))&&this.onEscape&&!1===this.onEscape(b)&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(c)}else a=this.document.getById(this.id);this._.holder=a}return a};var m={editorId:c.id,id:this.id,langCode:c.langCode,dir:c.lang.dir,cls:this.className,frame:\"\",env:CKEDITOR.env.cssClass,\"z-index\":c.config.baseFloatZIndex+1};if(this.isFramed){var l=CKEDITOR.env.air?\"javascript:void(0)\":\nCKEDITOR.env.ie?\"javascript:void(function(){\"+encodeURIComponent(\"document.open();(\"+CKEDITOR.tools.fixDomain+\")();document.close();\")+\"}())\":\"\";m.frame=e.output({id:this.id+\"_frame\",src:l})}l=a.output(m);d&&d.push(l);return l},addBlock:function(a,b){b=this._.blocks[a]=b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),b);this._.currentBlock||this.showBlock(a);return b},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var b=\nthis._.currentBlock,e=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+\"_frame\");b&&b.hide();this._.currentBlock=a;CKEDITOR.fire(\"ariaWidget\",e);a._.focusIndex=-1;this._.onKeyDown=a.onKeyDown&&CKEDITOR.tools.bind(a.onKeyDown,a);a.show();return a},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(a,b){this.element=a.append(a.getDocument().createElement(\"div\",{attributes:{tabindex:-1,\"class\":\"cke_panel_block\"},\nstyles:{display:\"none\"}}));b&&CKEDITOR.tools.extend(this,b);this.element.setAttributes({role:this.attributes.role||\"presentation\",\"aria-label\":this.attributes[\"aria-label\"],title:this.attributes.title||this.attributes[\"aria-label\"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(a){-1!=a&&(a=this.element.getElementsByTag(\"a\").getItem(this._.focusIndex=a),CKEDITOR.env.webkit&&a.getDocument().getWindow().focus(),a.focus(),this.onMark&&this.onMark(a))}},proto:{show:function(){this.element.setStyle(\"display\",\n\"\")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle(\"display\",\"none\")},onKeyDown:function(a,b){var e=this.keys[a];switch(e){case \"next\":for(var l=this._.focusIndex,e=this.element.getElementsByTag(\"a\"),f;f=e.getItem(++l);)if(f.getAttribute(\"_cke_focus\")&&f.$.offsetWidth){this._.focusIndex=l;f.focus();break}return f||b?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case \"prev\":l=this._.focusIndex;for(e=this.element.getElementsByTag(\"a\");0<l&&(f=e.getItem(--l));){if(f.getAttribute(\"_cke_focus\")&&\nf.$.offsetWidth){this._.focusIndex=l;f.focus();break}f=null}return f||b?!1:(this._.focusIndex=e.count(),this.onKeyDown(a,1));case \"click\":case \"mouseup\":return l=this._.focusIndex,(f=0<=l&&this.element.getElementsByTag(\"a\").getItem(l))&&(f.$[e]?f.$[e]():f.$[\"on\"+e]()),!1}return!0}}})}(),CKEDITOR.plugins.add(\"floatpanel\",{requires:\"panel\"}),function(){function a(a,c,d,m,l){l=CKEDITOR.tools.genKey(c.getUniqueId(),d.getUniqueId(),a.lang.dir,a.uiColor||\"\",m.css||\"\",l||\"\");var f=e[l];f||(f=e[l]=new CKEDITOR.ui.panel(c,\nm),f.element=d.append(CKEDITOR.dom.element.createFromHtml(f.render(a),c)),f.element.setStyles({display:\"none\",position:\"absolute\"}));return f}var e={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(b,c,d,e){function l(){g.hide()}d.forceIFrame=1;d.toolbarRelated&&b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(c=CKEDITOR.document.getById(\"cke_\"+b.name));var f=c.getDocument();e=a(b,f,c,d,e||0);var h=e.element,k=h.getFirst(),g=this;h.disableContextMenu();this.element=h;this._={editor:b,\npanel:e,parentElement:c,definition:d,document:f,iframe:k,children:[],dir:b.lang.dir,showBlockParams:null};b.on(\"mode\",l);b.on(\"resize\",l);f.getWindow().on(\"resize\",function(){this.reposition()},this)},proto:{addBlock:function(a,c){return this._.panel.addBlock(a,c)},addListBlock:function(a,c){return this._.panel.addListBlock(a,c)},getBlock:function(a){return this._.panel.getBlock(a)},showBlock:function(a,c,d,e,l,f){var h=this._.panel,k=h.showBlock(a);this._.showBlockParams=[].slice.call(arguments);\nthis.allowBlur(!1);var g=this._.editor.editable();this._.returnFocus=g.hasFocus?g:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,g=this._.iframe,g=CKEDITOR.env.ie&&!CKEDITOR.env.edge?g:new CKEDITOR.dom.window(g.$.contentWindow),q=n.getDocument(),r=this._.parentElement.getPositionedAncestor(),p=c.getDocumentPosition(q),q=r?r.getDocumentPosition(q):{x:0,y:0},u=\"rtl\"==this._.dir,v=p.x+(e||0)-q.x,w=p.y+(l||0)-q.y;!u||1!=d&&4!=d?u||2!=d&&3!=d||(v+=c.$.offsetWidth-\n1):v+=c.$.offsetWidth;if(3==d||4==d)w+=c.$.offsetHeight-1;this._.panel._.offsetParentId=c.getId();n.setStyles({top:w+\"px\",left:0,display:\"\"});n.setOpacity(0);n.getFirst().removeStyle(\"width\");this._.editor.focusManager.add(g);this._.blurSet||(CKEDITOR.event.useCapture=!0,g.on(\"blur\",function(a){function b(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=\nCKEDITOR.tools.setTimeout(b,0,this)):b.call(this))},this),g.on(\"focus\",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(g.on(\"touchstart\",function(){clearTimeout(this._.hideTimeout)},this),g.on(\"touchend\",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);h.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&!1===this.onEscape(a))return!1},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){var a=\nn;a.removeStyle(\"width\");if(k.autoSize){var b=k.element.getDocument(),b=(CKEDITOR.env.webkit?k.element:b.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle(\"width\",b+10+\"px\");b=k.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle(\"height\",b+\"px\");h._.currentBlock.element.setStyle(\"display\",\"none\").removeStyle(\"display\")}else a.removeStyle(\"height\");\nu&&(v-=n.$.offsetWidth);n.setStyle(\"left\",v+\"px\");var b=h.element.getWindow(),a=n.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,d=a.height||a.bottom-a.top,e=u?a.right:b.width-a.left,g=u?b.width-a.right:a.left;u?e<c&&(v=g>c?v+c:b.width>c?v-a.left:v-a.right+b.width):e<c&&(v=g>c?v-c:b.width>c?v-a.right+b.width:v-a.left);c=a.top;b.height-a.top<d&&(w=c>d?w-d:b.height>d?w-a.bottom+b.height:w-a.top);CKEDITOR.env.ie&&(b=a=new CKEDITOR.dom.element(n.$.offsetParent),\"html\"==b.getName()&&\n(b=b.getDocument().getBody()),\"rtl\"==b.getComputedStyle(\"direction\")&&(v=CKEDITOR.env.ie8Compat?v-2*n.getDocument().getDocumentElement().$.scrollLeft:v-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),m;(m=a.getCustomData(\"activePanel\"))&&m.onHide&&m.onHide.call(this,1);a.setCustomData(\"activePanel\",this);n.setStyles({top:w+\"px\",left:v+\"px\"});n.setOpacity(1);f&&f()},this);h.isLoaded?a():h.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;\nthis.focus();k.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.editor.fire(\"panelShow\",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||\nthis._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is(\"a\")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle(\"display\",\"none\");this.visible=0;this.element.getFirst().removeCustomData(\"activePanel\");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),\na.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire(\"panelHide\",this)}},allowBlur:function(a){var c=this._.panel;void 0!==a&&(c.allowBlur=a);return c.allowBlur},showAsChild:function(a,c,d,e,l,f){if(this._.activeChild!=a||a._.panel._.offsetParentId!=d.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(c,d,e,l,f),this.blur(),\n(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=\"\"},100)},hideChild:function(a){var c=this._.activeChild;c&&(delete c.onHide,delete this._.activeChild,c.hide(),a&&this.focus())}}});CKEDITOR.on(\"instanceDestroyed\",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),c;for(c in e){var d=e[c];a?d.destroy():d.element.hide()}a&&(e={})})}(),CKEDITOR.plugins.add(\"menu\",{requires:\"floatpanel\",beforeInit:function(a){for(var e=a.config.menu_groups.split(\",\"),\nb=a._.menuGroups={},c=a._.menuItems={},d=0;d<e.length;d++)b[e[d]]=d+1;a.addMenuGroup=function(a,c){b[a]=c||100};a.addMenuItem=function(a,d){b[d.group]&&(c[a]=new CKEDITOR.menuItem(this,a,d))};a.addMenuItems=function(a){for(var b in a)this.addMenuItem(b,a[b])};a.getMenuItem=function(a){return c[a]};a.removeMenuItem=function(a){delete c[a]}}}),function(){function a(a){a.sort(function(a,b){return a.group<b.group?-1:a.group>b.group?1:a.order<b.order?-1:a.order>b.order?1:0})}var e='\\x3cspan class\\x3d\"cke_menuitem\"\\x3e\\x3ca id\\x3d\"{id}\" class\\x3d\"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}\" href\\x3d\"{href}\" title\\x3d\"{title}\" tabindex\\x3d\"-1\"_cke_focus\\x3d1 hidefocus\\x3d\"true\" role\\x3d\"{role}\" aria-haspopup\\x3d\"{hasPopup}\" aria-disabled\\x3d\"{disabled}\" {ariaChecked}';\nCKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\\x3d\"return false;\"');CKEDITOR.env.gecko&&(e+=' onblur\\x3d\"this.style.cssText \\x3d this.style.cssText;\"');var e=e+(' onmouseover\\x3d\"CKEDITOR.tools.callFunction({hoverFn},{index});\" onmouseout\\x3d\"CKEDITOR.tools.callFunction({moveOutFn},{index});\" '+(CKEDITOR.env.ie?'onclick\\x3d\"return false;\" onmouseup':\"onclick\")+'\\x3d\"CKEDITOR.tools.callFunction({clickFn},{index}); return false;\"\\x3e'),b=CKEDITOR.addTemplate(\"menuItem\",e+'\\x3cspan class\\x3d\"cke_menubutton_inner\"\\x3e\\x3cspan class\\x3d\"cke_menubutton_icon\"\\x3e\\x3cspan class\\x3d\"cke_button_icon cke_button__{iconName}_icon\" style\\x3d\"{iconStyle}\"\\x3e\\x3c/span\\x3e\\x3c/span\\x3e\\x3cspan class\\x3d\"cke_menubutton_label\"\\x3e{label}\\x3c/span\\x3e{arrowHtml}\\x3c/span\\x3e\\x3c/a\\x3e\\x3c/span\\x3e'),\nc=CKEDITOR.addTemplate(\"menuArrow\",'\\x3cspan class\\x3d\"cke_menuarrow\"\\x3e\\x3cspan\\x3e{label}\\x3c/span\\x3e\\x3c/span\\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var c=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath(\"editor\")],level:this._.level-1,block:{}}),f=c.block.attributes=c.attributes||{};!f.role&&(f.role=\"menu\");this._.panelDefinition=\nc},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),c=this.editor.elementPath(),f=this._.listeners;this.removeAll();for(var e=0;e<f.length;e++){var k=f[e](b,a,c);if(k)for(var g in k){var n=this.editor.getMenuItem(g);!n||n.command&&!this.editor.getCommand(n.command).state||(n.state=k[g],this.add(n))}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):\n27==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,c=this.items[a];if(c=c.getItems&&c.getItems()){b?b.removeAll():(b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),b.parent=this,b._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var f in c){var e=this.editor.getMenuItem(f);e&&(e.state=c[f],b.add(e))}var k=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+\nString(a));setTimeout(function(){b.show(k,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){a.order||(a.order=this.items.length);this.items.push(a)},removeAll:function(){this.items=[]},show:function(b,c,e,f){if(!this.parent&&(this._.onShow(),!this.items.length))return;c=c||(\"rtl\"==this.editor.lang.dir?2:1);var h=this.items,k=this.editor,g=this._.panel,n=this._.element;if(!g){g=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);\ng.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);g.onShow=function(){g._.panel.getHolderElement().getParent().addClass(\"cke\").addClass(\"cke_reset_all\")};g.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);n=g.addBlock(this.id,this._.panelDefinition.block);n.autoSize=!0;var q=n.keys;q[40]=\"next\";q[9]=\"next\";q[38]=\"prev\";q[CKEDITOR.SHIFT+9]=\"prev\";q[\"rtl\"==k.lang.dir?37:39]=CKEDITOR.env.ie?\"mouseup\":\"click\";q[32]=CKEDITOR.env.ie?\"mouseup\":\n\"click\";CKEDITOR.env.ie&&(q[13]=\"mouseup\");n=this._.element=n.element;q=n.getDocument();q.getBody().setStyle(\"overflow\",\"hidden\");q.getElementsByTag(\"html\").getItem(0).setStyle(\"overflow\",\"hidden\");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,k.config.menu_subMenuDelay||400,this,[a])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);\nthis._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}a(h);for(var q=k.elementPath(),q=['\\x3cdiv class\\x3d\"cke_menu'+(q&&q.direction()!=k.lang.dir?\" cke_mixed_dir_content\":\"\")+'\" role\\x3d\"presentation\"\\x3e'],r=h.length,p=r&&h[0].group,u=0;u<r;u++){var v=h[u];p!=v.group&&(q.push('\\x3cdiv class\\x3d\"cke_menuseparator\" role\\x3d\"separator\"\\x3e\\x3c/div\\x3e'),\np=v.group);v.render(this,u,q)}q.push(\"\\x3c/div\\x3e\");n.setHtml(q.join(\"\"));CKEDITOR.ui.fire(\"ready\",this);this.parent?this.parent._.panel.showAsChild(g,this.id,b,c,e,f):g.showBlock(this.id,b,c,e,f);k.fire(\"menuShow\",[g])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,c){CKEDITOR.tools.extend(this,c,{order:0,className:\"cke_menubutton__\"+b});this.group=\na._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(a,e,l){var f=a.id+String(e),h=\"undefined\"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,k=\"\",g=h==CKEDITOR.TRISTATE_ON?\"on\":h==CKEDITOR.TRISTATE_DISABLED?\"disabled\":\"off\";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(k=' aria-checked\\x3d\"'+(h==CKEDITOR.TRISTATE_ON?\"true\":\"false\")+'\"');var n=this.getItems,q=\"\\x26#\"+(\"rtl\"==this.editor.lang.dir?\"9668\":\"9658\")+\";\",r=this.name;this.icon&&!/\\./.test(this.icon)&&(r=\nthis.icon);a={id:f,name:this.name,iconName:r,label:this.label,cls:this.className||\"\",state:g,hasPopup:n?\"true\":\"false\",disabled:h==CKEDITOR.TRISTATE_DISABLED,title:this.label,href:\"javascript:void('\"+(this.label||\"\").replace(\"'\")+\"')\",hoverFn:a._.itemOverFn,moveOutFn:a._.itemOutFn,clickFn:a._.itemClickFn,index:e,iconStyle:CKEDITOR.skin.getIconStyle(r,\"rtl\"==this.editor.lang.dir,r==this.icon?null:this.icon,this.iconOffset),arrowHtml:n?c.output({label:q}):\"\",role:this.role?this.role:\"menuitem\",ariaChecked:k};\nb.output(a,l)}}})}(),CKEDITOR.config.menu_groups=\"clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div\",CKEDITOR.plugins.add(\"contextmenu\",{requires:\"menu\",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(a){this.base.call(this,a,{panel:{className:\"cke_menu_panel\",attributes:{\"aria-label\":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,\ne){a.on(\"contextmenu\",function(a){a=a.data;var c=CKEDITOR.env.webkit?b:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!e||!c){a.preventDefault();if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var c=this.editor,l=(new CKEDITOR.dom.elementPath(a.getTarget(),c.editable())).contains(function(a){return a.hasAttribute(\"contenteditable\")},!0);l&&\"false\"==l.getAttribute(\"contenteditable\")&&c.getSelection().fake(l)}var l=a.getTarget().getDocument(),f=a.getTarget().getDocument().getDocumentElement(),c=!l.equals(CKEDITOR.document),\nl=l.getWindow().getScrollPosition(),h=c?a.$.clientX:a.$.pageX||l.x+a.$.clientX,k=c?a.$.clientY:a.$.pageY||l.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(f,null,h,k)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var b,c=function(){b=0};a.on(\"keydown\",function(a){b=CKEDITOR.env.mac?a.data.$.metaKey:a.data.$.ctrlKey});a.on(\"keyup\",c);a.on(\"contextmenu\",c)}},open:function(a,e,b,c){this.editor.focus();a=a||CKEDITOR.document.getDocumentElement();this.editor.selectionChange(1);\nthis.show(a,e,b,c)}}})},beforeInit:function(a){var e=a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.on(\"contentDom\",function(){e.addTarget(a.editable(),!1!==a.config.browserContextMenuOnCtrl)});a.addCommand(\"contextMenu\",{exec:function(){a.contextMenu.open(a.document.getBody())}});a.setKeystroke(CKEDITOR.SHIFT+121,\"contextMenu\");a.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,\"contextMenu\")}}),function(){function a(a,b){function l(b){b=g.list[b];if(b.equals(a.editable())||\"true\"==b.getAttribute(\"contenteditable\")){var c=\na.createRange();c.selectNodeContents(b);c.select()}else a.getSelection().selectElement(b);a.focus()}function f(){k&&k.setHtml('\\x3cspan class\\x3d\"cke_path_empty\"\\x3e\\x26nbsp;\\x3c/span\\x3e');delete g.list}var h=a.ui.spaceId(\"path\"),k,g=a._.elementsPath,n=g.idBase;b.html+='\\x3cspan id\\x3d\"'+h+'_label\" class\\x3d\"cke_voice_label\"\\x3e'+a.lang.elementspath.eleLabel+'\\x3c/span\\x3e\\x3cspan id\\x3d\"'+h+'\" class\\x3d\"cke_path\" role\\x3d\"group\" aria-labelledby\\x3d\"'+h+'_label\"\\x3e\\x3cspan class\\x3d\"cke_path_empty\"\\x3e\\x26nbsp;\\x3c/span\\x3e\\x3c/span\\x3e';\na.on(\"uiReady\",function(){var b=a.ui.space(\"path\");b&&a.focusManager.add(b,1)});g.onClick=l;var q=CKEDITOR.tools.addFunction(l),r=CKEDITOR.tools.addFunction(function(b,c){var f=g.idBase,e;c=new CKEDITOR.dom.event(c);e=\"rtl\"==a.lang.dir;switch(c.getKeystroke()){case e?39:37:case 9:return(e=CKEDITOR.document.getById(f+(b+1)))||(e=CKEDITOR.document.getById(f+\"0\")),e.focus(),!1;case e?37:39:case CKEDITOR.SHIFT+9:return(e=CKEDITOR.document.getById(f+(b-1)))||(e=CKEDITOR.document.getById(f+(g.list.length-\n1))),e.focus(),!1;case 27:return a.focus(),!1;case 13:case 32:return l(b),!1}return!0});a.on(\"selectionChange\",function(){for(var b=[],f=g.list=[],e=[],m=g.filters,l=!0,B=a.elementPath().elements,t,y=B.length;y--;){var C=B[y],x=0;t=C.data(\"cke-display-name\")?C.data(\"cke-display-name\"):C.data(\"cke-real-element-type\")?C.data(\"cke-real-element-type\"):C.getName();(l=C.hasAttribute(\"contenteditable\")?\"true\"==C.getAttribute(\"contenteditable\"):l)||C.hasAttribute(\"contenteditable\")||(x=1);for(var A=0;A<m.length;A++){var D=\nm[A](C,t);if(!1===D){x=1;break}t=D||t}x||(f.unshift(C),e.unshift(t))}f=f.length;for(m=0;m<f;m++)t=e[m],l=a.lang.elementspath.eleTitle.replace(/%1/,t),t=c.output({id:n+m,label:l,text:t,jsTitle:\"javascript:void('\"+t+\"')\",index:m,keyDownFn:r,clickFn:q}),b.unshift(t);k||(k=CKEDITOR.document.getById(h));e=k;e.setHtml(b.join(\"\")+'\\x3cspan class\\x3d\"cke_path_empty\"\\x3e\\x26nbsp;\\x3c/span\\x3e');a.fire(\"elementsPathUpdate\",{space:e})});a.on(\"readOnly\",f);a.on(\"contentDomUnload\",f);a.addCommand(\"elementsPathFocus\",\ne.toolbarFocus);a.setKeystroke(CKEDITOR.ALT+122,\"elementsPathFocus\")}var e={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+\"0\"))&&a.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},b=\"\";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(b+=' onkeypress\\x3d\"return false;\"');CKEDITOR.env.gecko&&(b+=' onblur\\x3d\"this.style.cssText \\x3d this.style.cssText;\"');var c=CKEDITOR.addTemplate(\"pathItem\",'\\x3ca id\\x3d\"{id}\" href\\x3d\"{jsTitle}\" tabindex\\x3d\"-1\" class\\x3d\"cke_path_item\" title\\x3d\"{label}\"'+\nb+' hidefocus\\x3d\"true\" onkeydown\\x3d\"return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );\" onclick\\x3d\"CKEDITOR.tools.callFunction({clickFn},{index}); return false;\" role\\x3d\"button\" aria-label\\x3d\"{label}\"\\x3e{text}\\x3c/a\\x3e');CKEDITOR.plugins.add(\"elementspath\",{init:function(b){b._.elementsPath={idBase:\"cke_elementspath_\"+CKEDITOR.tools.getNextNumber()+\"_\",filters:[]};b.on(\"uiSpace\",function(c){\"bottom\"==c.data.space&&a(b,c.data)})}})}(),function(){function a(a,d){var m,l;d.on(\"refresh\",\nfunction(a){var c=[e],d;for(d in a.data.states)c.push(a.data.states[d]);this.setState(CKEDITOR.tools.search(c,b)?b:e)},d,null,100);d.on(\"exec\",function(b){m=a.getSelection();l=m.createBookmarks(1);b.data||(b.data={});b.data.done=!1},d,null,0);d.on(\"exec\",function(){a.forceNextSelectionCheck();m.selectBookmarks(l)},d,null,100)}var e=CKEDITOR.TRISTATE_DISABLED,b=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add(\"indent\",{init:function(b){var d=CKEDITOR.plugins.indent.genericDefinition;a(b,b.addCommand(\"indent\",\nnew d(!0)));a(b,b.addCommand(\"outdent\",new d));b.ui.addButton&&(b.ui.addButton(\"Indent\",{label:b.lang.indent.indent,command:\"indent\",directional:!0,toolbar:\"indent,20\"}),b.ui.addButton(\"Outdent\",{label:b.lang.indent.outdent,command:\"outdent\",directional:!0,toolbar:\"indent,10\"}));b.on(\"dirChanged\",function(a){var d=b.createRange(),f=a.data.node;d.setStartBefore(f);d.setEndAfter(f);for(var e=new CKEDITOR.dom.walker(d),k;k=e.next();)if(k.type==CKEDITOR.NODE_ELEMENT)if(!k.equals(f)&&k.getDirection())d.setStartAfter(k),\ne=new CKEDITOR.dom.walker(d);else{var g=b.config.indentClasses;if(g)for(var n=\"ltr\"==a.data.dir?[\"_rtl\",\"\"]:[\"\",\"_rtl\"],q=0;q<g.length;q++)k.hasClass(g[q]+n[0])&&(k.removeClass(g[q]+n[0]),k.addClass(g[q]+n[1]));g=k.getStyle(\"margin-right\");n=k.getStyle(\"margin-left\");g?k.setStyle(\"margin-left\",g):k.removeStyle(\"margin-left\");n?k.setStyle(\"margin-right\",n):k.removeStyle(\"margin-right\")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},\nspecificDefinition:function(a,b,e){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!e;this.relatedGlobal=e?\"indent\":\"outdent\";this.indentKey=e?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,b){a.on(\"pluginsLoaded\",function(){for(var a in b)(function(a,b){var c=a.getCommand(b.relatedGlobal),d;for(d in b.jobs)c.on(\"exec\",function(c){c.data.done||(a.fire(\"lockSnapshot\"),b.execJob(a,d)&&(c.data.done=!0),a.fire(\"unlockSnapshot\"),\nCKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,d),c.on(\"refresh\",function(c){c.data.states||(c.data.states={});c.data.states[b.name+\"@\"+d]=b.refreshJob(a,d,c.data.path)},this,null,d);a.addFeature(b)})(this,b[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:\"p\",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,b){var m=this.jobs[b];if(m.state!=e)return m.exec.call(this,a)},refreshJob:function(a,b,m){b=this.jobs[b];a.activeFilter.checkFeature(this)?\nb.state=b.refresh.call(this,a,m):b.state=e;return b.state},getContext:function(a){return a.contains(this.context)}}}(),function(){function a(a){function c(e){for(var h=r.startContainer,l=r.endContainer;h&&!h.getParent().equals(e);)h=h.getParent();for(;l&&!l.getParent().equals(e);)l=l.getParent();if(!h||!l)return!1;for(var p=h,h=[],u=!1;!u;)p.equals(l)&&(u=!0),h.push(p),p=p.getNext();if(1>h.length)return!1;p=e.getParents(!0);for(l=0;l<p.length;l++)if(p[l].getName&&m[p[l].getName()]){e=p[l];break}for(var p=\nd.isIndent?1:-1,l=h[0],h=h[h.length-1],u=CKEDITOR.plugins.list.listToArray(e,g),y=u[h.getCustomData(\"listarray_index\")].indent,l=l.getCustomData(\"listarray_index\");l<=h.getCustomData(\"listarray_index\");l++)if(u[l].indent+=p,0<p){var q=u[l].parent;u[l].parent=new CKEDITOR.dom.element(q.getName(),q.getDocument())}for(l=h.getCustomData(\"listarray_index\")+1;l<u.length&&u[l].indent>y;l++)u[l].indent+=p;h=CKEDITOR.plugins.list.arrayToList(u,g,null,a.config.enterMode,e.getDirection());if(!d.isIndent){var x;\nif((x=e.getParent())&&x.is(\"li\"))for(var p=h.listNode.getChildren(),A=[],D,l=p.count()-1;0<=l;l--)(D=p.getItem(l))&&D.is&&D.is(\"li\")&&A.push(D)}h&&h.listNode.replace(e);if(A&&A.length)for(l=0;l<A.length;l++){for(D=e=A[l];(D=D.getNext())&&D.is&&D.getName()in m;)CKEDITOR.env.needsNbspFiller&&!e.getFirst(b)&&e.append(r.document.createText(\" \")),e.append(D);e.insertAfter(x)}h&&a.fire(\"contentDomInvalidated\");return!0}for(var d=this,g=this.database,m=this.context,l=a.getSelection(),l=(l&&l.getRanges()).createIterator(),\nr;r=l.getNextRange();){for(var p=r.getCommonAncestor();p&&(p.type!=CKEDITOR.NODE_ELEMENT||!m[p.getName()]);){if(a.editable().equals(p)){p=!1;break}p=p.getParent()}p||(p=r.startPath().contains(m))&&r.setEndAt(p,CKEDITOR.POSITION_BEFORE_END);if(!p){var u=r.getEnclosedNode();u&&u.type==CKEDITOR.NODE_ELEMENT&&u.getName()in m&&(r.setStartAt(u,CKEDITOR.POSITION_AFTER_START),r.setEndAt(u,CKEDITOR.POSITION_BEFORE_END),p=u)}p&&r.startContainer.type==CKEDITOR.NODE_ELEMENT&&r.startContainer.getName()in m&&(u=\nnew CKEDITOR.dom.walker(r),u.evaluator=e,r.startContainer=u.next());p&&r.endContainer.type==CKEDITOR.NODE_ELEMENT&&r.endContainer.getName()in m&&(u=new CKEDITOR.dom.walker(r),u.evaluator=e,r.endContainer=u.previous());if(p)return c(p)}return 0}function e(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(\"li\")}function b(a){return c(a)&&d(a)}var c=CKEDITOR.dom.walker.whitespaces(!0),d=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add(\"indentlist\",\n{requires:\"indent\",init:function(b){function c(b){d.specificDefinition.apply(this,arguments);this.requiredContent=[\"ul\",\"ol\"];b.on(\"key\",function(a){if(\"wysiwyg\"==b.mode&&a.data.keyCode==this.indentKey){var c=this.getContext(b.elementPath());!c||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,b.elementPath(),c)||(b.execCommand(this.relatedGlobal),a.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),d=CKEDITOR.plugins.indentList.firstItemInPath(this.context,\nb,c);return c&&this.isIndent&&!d?l:m}:function(a,b){return!this.getContext(b)||this.isIndent?m:l},exec:CKEDITOR.tools.bind(a,this)}}var d=CKEDITOR.plugins.indent;d.registerCommands(b,{indentlist:new c(b,\"indentlist\",!0),outdentlist:new c(b,\"outdentlist\")});CKEDITOR.tools.extend(c.prototype,d.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,c){var d=b.contains(e);c||(c=b.contains(a));return c&&d&&d.equals(c.getFirst(e))}}(),\nfunction(){function a(a,b,c){function d(c){if(!(!(l=k[c?\"getFirst\":\"getLast\"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?\"getPrevious\":\"getNext\"](CKEDITOR.dom.walker.invisible(!0)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement(\"br\")[c?\"insertBefore\":\"insertAfter\"](l)}for(var f=CKEDITOR.plugins.list.listToArray(b.root,c),e=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant(\"li\",!0))&&!h.getCustomData(\"list_item_processed\")&&(e.push(h),CKEDITOR.dom.element.setMarker(c,\nh,\"list_item_processed\",!0))}h=null;for(g=0;g<e.length;g++)h=e[g].getCustomData(\"listarray_index\"),f[h].indent=-1;for(g=h+1;g<f.length;g++)if(f[g].indent>f[g-1].indent+1){e=f[g-1].indent+1-f[g].indent;for(h=f[g].indent;f[g]&&f[g].indent>=h;)f[g].indent+=e,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(f,c,null,a.config.enterMode,b.root.getAttribute(\"dir\")).listNode,l,m;d(!0);d();k.replace(b.root);a.fire(\"contentDomInvalidated\")}function e(a,b){this.name=a;this.context=this.type=b;this.allowedContent=\nb+\" li\";this.requiredContent=b}function b(a,b,c,d){for(var f,e;f=a[d?\"getLast\":\"getFirst\"](r);)(e=f.getDirection(1))!==b.getDirection(1)&&f.setAttribute(\"dir\",e),f.remove(),c?f[d?\"insertBefore\":\"insertAfter\"](c):b.append(f,d)}function c(a){function c(d){var f=a[d?\"getPrevious\":\"getNext\"](g);f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(a.getName())&&(b(a,f,null,!d),a.remove(),a=f)}c();c(1)}function d(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&\nCKEDITOR.dtd[a.getName()][\"#\"]}function m(a,d,f){a.fire(\"saveSnapshot\");f.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var e=f.extractContents();d.trim(!1,!0);var h=d.createBookmark(),k=new CKEDITOR.dom.elementPath(d.startContainer),m=k.block,k=k.lastElement.getAscendant(\"li\",1)||m,r=new CKEDITOR.dom.elementPath(f.startContainer),q=r.contains(CKEDITOR.dtd.$listItem),r=r.contains(CKEDITOR.dtd.$list);m?(m=m.getBogus())&&m.remove():r&&(m=r.getPrevious(g))&&n(m)&&m.remove();(m=e.getLast())&&m.type==CKEDITOR.NODE_ELEMENT&&\nm.is(\"br\")&&m.remove();(m=d.startContainer.getChild(d.startOffset))?e.insertBefore(m):d.startContainer.append(e);q&&(e=l(q))&&(k.contains(q)?(b(e,q.getParent(),q),e.remove()):k.append(e));for(;f.checkStartOfBlock()&&f.checkEndOfBlock();){r=f.startPath();e=r.block;if(!e)break;e.is(\"li\")&&(k=e.getParent(),e.equals(k.getLast(g))&&e.equals(k.getFirst(g))&&(e=k));f.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove()}f=f.clone();e=a.editable();f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);\nf.evaluator=function(a){return g(a)&&!n(a)};(f=f.next())&&f.type==CKEDITOR.NODE_ELEMENT&&f.getName()in CKEDITOR.dtd.$list&&c(f);d.moveToBookmark(h);d.select();a.fire(\"saveSnapshot\")}function l(a){return(a=a.getLast(g))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in f?a:null}var f={ol:1,ul:1},h=CKEDITOR.dom.walker.whitespaces(),k=CKEDITOR.dom.walker.bookmark(),g=function(a){return!(h(a)||k(a))},n=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,d,e){if(!f[a.getName()])return[];\nd||(d=0);c||(c=[]);for(var g=0,h=a.getChildCount();g<h;g++){var k=a.getChild(g);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(k,b,c,d+1);if(\"li\"==k.$.nodeName.toLowerCase()){var m={parent:a,indent:d,element:k,contents:[]};e?m.grandparent=e:(m.grandparent=a.getParent(),m.grandparent&&\"li\"==m.grandparent.$.nodeName.toLowerCase()&&(m.grandparent=m.grandparent.getParent()));b&&CKEDITOR.dom.element.setMarker(b,k,\"listarray_index\",c.length);c.push(m);\nfor(var l=0,n=k.getChildCount(),r;l<n;l++)r=k.getChild(l),r.type==CKEDITOR.NODE_ELEMENT&&f[r.getName()]?CKEDITOR.plugins.list.listToArray(r,b,c,d+1,m.grandparent):m.contents.push(r)}}return c},arrayToList:function(a,b,c,d,e){c||(c=0);if(!a||a.length<c+1)return null;for(var h,m=a[c].parent.getDocument(),l=new CKEDITOR.dom.documentFragment(m),n=null,r=c,q=Math.max(a[c].indent,0),D=null,G,F,I=d==CKEDITOR.ENTER_P?\"p\":\"div\";;){var H=a[r];h=H.grandparent;G=H.element.getDirection(1);if(H.indent==q){n&&a[r].parent.getName()==\nn.getName()||(n=a[r].parent.clone(!1,1),e&&n.setAttribute(\"dir\",e),l.append(n));D=n.append(H.element.clone(0,1));G!=n.getDirection(1)&&D.setAttribute(\"dir\",G);for(h=0;h<H.contents.length;h++)D.append(H.contents[h].clone(1,1));r++}else if(H.indent==Math.max(q,0)+1)H=a[r-1].element.getDirection(1),r=CKEDITOR.plugins.list.arrayToList(a,null,r,d,H!=G?G:null),!D.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=m.$.documentMode&&D.append(m.createText(\" \")),D.append(r.listNode),r=r.nextIndex;else if(-1==\nH.indent&&!c&&h){f[h.getName()]?(D=H.element.clone(!1,!0),G!=h.getDirection(1)&&D.setAttribute(\"dir\",G)):D=new CKEDITOR.dom.documentFragment(m);var n=h.getDirection(1)!=G,K=H.element,E=K.getAttribute(\"class\"),N=K.getAttribute(\"style\"),R=D.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(d!=CKEDITOR.ENTER_BR||n||N||E),P,T=H.contents.length,O;for(h=0;h<T;h++)if(P=H.contents[h],k(P)&&1<T)R?O=P.clone(1,1):D.append(P.clone(1,1));else if(P.type==CKEDITOR.NODE_ELEMENT&&P.isBlockBoundary()){n&&!P.getDirection()&&\nP.setAttribute(\"dir\",G);F=P;var Y=K.getAttribute(\"style\");Y&&F.setAttribute(\"style\",Y.replace(/([^;])$/,\"$1;\")+(F.getAttribute(\"style\")||\"\"));E&&P.addClass(E);F=null;O&&(D.append(O),O=null);D.append(P.clone(1,1))}else R?(F||(F=m.createElement(I),D.append(F),n&&F.setAttribute(\"dir\",G)),N&&F.setAttribute(\"style\",N),E&&F.setAttribute(\"class\",E),O&&(F.append(O),O=null),F.append(P.clone(1,1))):D.append(P.clone(1,1));O&&((F||D).append(O),O=null);D.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&r!=a.length-1&&(CKEDITOR.env.needsBrFiller&&\n(G=D.getLast())&&G.type==CKEDITOR.NODE_ELEMENT&&G.is(\"br\")&&G.remove(),(G=D.getLast(g))&&G.type==CKEDITOR.NODE_ELEMENT&&G.is(CKEDITOR.dtd.$block)||D.append(m.createElement(\"br\")));G=D.$.nodeName.toLowerCase();\"div\"!=G&&\"p\"!=G||D.appendBogus();l.append(D);n=null;r++}else return null;F=null;if(a.length<=r||Math.max(a[r].indent,0)<q)break}if(b)for(a=l.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(c=a,m=e=d=void 0,d=c.getDirection()))){for(e=\nc.getParent();e&&!(m=e.getDirection());)e=e.getParent();d==m&&c.removeAttribute(\"dir\")}a=a.getNextSourceNode()}return{listNode:l,nextIndex:r}}};var q=/^h[1-6]$/,r=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);e.prototype={exec:function(b){this.refresh(b,b.elementPath());var d=b.config,e=b.getSelection(),h=e&&e.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var k=b.editable();if(k.getFirst(g)){var m=1==h.length&&h[0];(d=m&&m.getEnclosedNode())&&d.is&&this.type==d.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else d.enterMode==\nCKEDITOR.ENTER_BR?k.appendBogus():h[0].fixBlock(1,d.enterMode==CKEDITOR.ENTER_P?\"p\":\"div\"),e.selectRanges(h)}for(var d=e.createBookmarks(!0),k=[],l={},h=h.createIterator(),n=0;(m=h.getNextRange())&&++n;){var r=m.getBoundaryNodes(),x=r.startNode,A=r.endNode;x.type==CKEDITOR.NODE_ELEMENT&&\"td\"==x.getName()&&m.setStartAt(r.startNode,CKEDITOR.POSITION_AFTER_START);A.type==CKEDITOR.NODE_ELEMENT&&\"td\"==A.getName()&&m.setEndAt(r.endNode,CKEDITOR.POSITION_BEFORE_END);m=m.createIterator();for(m.forceBrBreak=\nthis.state==CKEDITOR.TRISTATE_OFF;r=m.getNextParagraph();)if(!r.getCustomData(\"list_block\")){CKEDITOR.dom.element.setMarker(l,r,\"list_block\",1);for(var D=b.elementPath(r),x=D.elements,A=0,D=D.blockLimit,G,F=x.length-1;0<=F&&(G=x[F]);F--)if(f[G.getName()]&&D.contains(G)){D.removeCustomData(\"list_group_object_\"+n);(x=G.getCustomData(\"list_group_object\"))?x.contents.push(r):(x={root:G,contents:[r]},k.push(x),CKEDITOR.dom.element.setMarker(l,G,\"list_group_object\",x));A=1;break}A||(A=D,A.getCustomData(\"list_group_object_\"+\nn)?A.getCustomData(\"list_group_object_\"+n).contents.push(r):(x={root:A,contents:[r]},CKEDITOR.dom.element.setMarker(l,A,\"list_group_object_\"+n,x),k.push(x)))}}for(G=[];0<k.length;)if(x=k.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(f[x.root.getName()]){h=b;n=x;x=l;m=G;A=CKEDITOR.plugins.list.listToArray(n.root,x);D=[];for(r=0;r<n.contents.length;r++)F=n.contents[r],(F=F.getAscendant(\"li\",!0))&&!F.getCustomData(\"list_item_processed\")&&(D.push(F),CKEDITOR.dom.element.setMarker(x,F,\"list_item_processed\",\n!0));for(var F=n.root.getDocument(),I=void 0,H=void 0,r=0;r<D.length;r++){var K=D[r].getCustomData(\"listarray_index\"),I=A[K].parent;I.is(this.type)||(H=F.createElement(this.type),I.copyAttributes(H,{start:1,type:1}),H.removeStyle(\"list-style-type\"),A[K].parent=H)}x=CKEDITOR.plugins.list.arrayToList(A,x,null,h.config.enterMode);A=void 0;D=x.listNode.getChildCount();for(r=0;r<D&&(A=x.listNode.getChild(r));r++)A.getName()==this.type&&m.push(A);x.listNode.replace(n.root);h.fire(\"contentDomInvalidated\")}else{A=\nb;m=x;r=G;D=m.contents;h=m.root.getDocument();n=[];1==D.length&&D[0].equals(m.root)&&(x=h.createElement(\"div\"),D[0].moveChildren&&D[0].moveChildren(x),D[0].append(x),D[0]=x);m=m.contents[0].getParent();for(F=0;F<D.length;F++)m=m.getCommonAncestor(D[F].getParent());I=A.config.useComputedState;A=x=void 0;I=void 0===I||I;for(F=0;F<D.length;F++)for(H=D[F];K=H.getParent();){if(K.equals(m)){n.push(H);!A&&H.getDirection()&&(A=1);H=H.getDirection(I);null!==x&&(x=x&&x!=H?null:H);break}H=K}if(!(1>n.length)){D=\nn[n.length-1].getNext();F=h.createElement(this.type);r.push(F);for(I=r=void 0;n.length;)r=n.shift(),I=h.createElement(\"li\"),H=r,H.is(\"pre\")||q.test(H.getName())||\"false\"==H.getAttribute(\"contenteditable\")?r.appendTo(I):(r.copyAttributes(I),x&&r.getDirection()&&(I.removeStyle(\"direction\"),I.removeAttribute(\"dir\")),r.moveChildren(I),r.remove()),I.appendTo(F);x&&A&&F.setAttribute(\"dir\",x);D?F.insertBefore(D):F.appendTo(m)}}else this.state==CKEDITOR.TRISTATE_ON&&f[x.root.getName()]&&a.call(this,b,x,l);\nfor(F=0;F<G.length;F++)c(G[F]);CKEDITOR.dom.element.clearAllMarkers(l);e.selectBookmarks(d);b.focus()},refresh:function(a,b){var c=b.contains(f,1),d=b.blockLimit||b.root;c&&d.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add(\"list\",{requires:\"indentlist\",init:function(a){a.blockless||(a.addCommand(\"numberedlist\",new e(\"numberedlist\",\"ol\")),a.addCommand(\"bulletedlist\",new e(\"bulletedlist\",\"ul\")),a.ui.addButton&&\n(a.ui.addButton(\"NumberedList\",{label:a.lang.list.numberedlist,command:\"numberedlist\",directional:!0,toolbar:\"list,10\"}),a.ui.addButton(\"BulletedList\",{label:a.lang.list.bulletedlist,command:\"bulletedlist\",directional:!0,toolbar:\"list,20\"})),a.on(\"key\",function(b){var c=b.data.domEvent.getKey(),e;if(\"wysiwyg\"==a.mode&&c in{8:1,46:1}){var h=a.getSelection().getRanges()[0],k=h&&h.startPath();if(h&&h.collapsed){var r=8==c,q=a.editable(),C=new CKEDITOR.dom.walker(h.clone());C.evaluator=function(a){return g(a)&&\n!n(a)};C.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is(\"table\"))};c=h.clone();if(r){var x;(x=k.contains(f))&&h.checkBoundaryOfElement(x,CKEDITOR.START)&&(x=x.getParent())&&x.is(\"li\")&&(x=l(x))?(e=x,x=x.getPrevious(g),c.moveToPosition(x&&n(x)?x:e,CKEDITOR.POSITION_BEFORE_START)):(C.range.setStartAt(q,CKEDITOR.POSITION_AFTER_START),C.range.setEnd(h.startContainer,h.startOffset),(x=C.previous())&&x.type==CKEDITOR.NODE_ELEMENT&&(x.getName()in f||x.is(\"li\"))&&(x.is(\"li\")||(C.range.selectNodeContents(x),\nC.reset(),C.evaluator=d,x=C.previous()),e=x,c.moveToElementEditEnd(e),c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(e)m(a,c,h),b.cancel();else{var A=k.contains(f);A&&h.checkBoundaryOfElement(A,CKEDITOR.START)&&(e=A.getFirst(g),h.checkBoundaryOfElement(e,CKEDITOR.START)&&(x=A.getPrevious(g),l(e)?x&&(h.moveToElementEditEnd(x),h.select()):a.execCommand(\"outdent\"),b.cancel()))}}else if(e=k.contains(\"li\")){if(C.range.setEndAt(q,CKEDITOR.POSITION_BEFORE_END),r=(q=e.getLast(g))&&\nd(q)?q:e,k=0,(x=C.next())&&x.type==CKEDITOR.NODE_ELEMENT&&x.getName()in f&&x.equals(q)?(k=1,x=C.next()):h.checkBoundaryOfElement(r,CKEDITOR.END)&&(k=2),k&&x){h=h.clone();h.moveToElementEditStart(x);if(1==k&&(c.optimize(),!c.startContainer.equals(e))){for(e=c.startContainer;e.is(CKEDITOR.dtd.$inline);)A=e,e=e.getParent();A&&c.moveToPosition(A,CKEDITOR.POSITION_AFTER_END)}2==k&&(c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END),h.endPath().block&&h.moveToPosition(h.endPath().block,CKEDITOR.POSITION_AFTER_START));\nm(a,c,h);b.cancel()}}else C.range.setEndAt(q,CKEDITOR.POSITION_BEFORE_END),(x=C.next())&&x.type==CKEDITOR.NODE_ELEMENT&&x.is(f)&&(x=x.getFirst(g),k.block&&h.checkStartOfBlock()&&h.checkEndOfBlock()?(k.block.remove(),h.moveToElementEditStart(x),h.select()):l(x)?(h.moveToElementEditStart(x),h.select()):(h=h.clone(),h.moveToElementEditStart(x),m(a,c,h)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})}(),function(){function a(a,b,c){c=a.config.forceEnterMode||c;\"wysiwyg\"==a.mode&&(b||\n(b=a.activeEnterMode),a.elementPath().isContextFor(\"p\")||(b=CKEDITOR.ENTER_BR,c=1),a.fire(\"saveSnapshot\"),b==CKEDITOR.ENTER_BR?l(a,b,null,c):f(a,b,null,c),a.fire(\"saveSnapshot\"))}function e(a){a=a.getSelection().getRanges(!0);for(var b=a.length-1;0<b;b--)a[b].deleteContents();return a[0]}function b(a){var b=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&\"true\"==a.getAttribute(\"contenteditable\")},!0);if(a.root.equals(b))return a;b=new CKEDITOR.dom.range(b);b.moveToRange(a);\nreturn b}CKEDITOR.plugins.add(\"enterkey\",{init:function(b){b.addCommand(\"enter\",{modes:{wysiwyg:1},editorFocus:!1,exec:function(b){a(b)}});b.addCommand(\"shiftEnter\",{modes:{wysiwyg:1},editorFocus:!1,exec:function(b){a(b,b.activeShiftEnterMode,1)}});b.setKeystroke([[13,\"enter\"],[CKEDITOR.SHIFT+13,\"shiftEnter\"]])}});var c=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(a,f,m,q){if(m=m||e(a)){m=b(m);var r=m.document,p=m.checkStartOfBlock(),\nu=m.checkEndOfBlock(),v=a.elementPath(m.startContainer),w=v.block,z=f==CKEDITOR.ENTER_DIV?\"div\":\"p\",B;if(p&&u){if(w&&(w.is(\"li\")||w.getParent().is(\"li\"))){w.is(\"li\")||(w=w.getParent());m=w.getParent();B=m.getParent();q=!w.hasPrevious();var t=!w.hasNext(),z=a.getSelection(),y=z.createBookmarks(),p=w.getDirection(1),u=w.getAttribute(\"class\"),C=w.getAttribute(\"style\"),x=B.getDirection(1)!=p;a=a.enterMode!=CKEDITOR.ENTER_BR||x||C||u;if(B.is(\"li\"))q||t?(q&&t&&m.remove(),w[t?\"insertAfter\":\"insertBefore\"](B)):\nw.breakParent(B);else{if(a)if(v.block.is(\"li\")?(B=r.createElement(f==CKEDITOR.ENTER_P?\"p\":\"div\"),x&&B.setAttribute(\"dir\",p),C&&B.setAttribute(\"style\",C),u&&B.setAttribute(\"class\",u),w.moveChildren(B)):B=v.block,q||t)B[q?\"insertBefore\":\"insertAfter\"](m);else w.breakParent(m),B.insertAfter(m);else if(w.appendBogus(!0),q||t)for(;r=w[q?\"getFirst\":\"getLast\"]();)r[q?\"insertBefore\":\"insertAfter\"](m);else for(w.breakParent(m);r=w.getLast();)r.insertAfter(m);w.remove()}z.selectBookmarks(y);return}if(w&&w.getParent().is(\"blockquote\")){w.breakParent(w.getParent());\nw.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||w.getPrevious().remove();w.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||w.getNext().remove();m.moveToElementEditStart(w);m.select();return}}else if(w&&w.is(\"pre\")&&!u){l(a,f,m,q);return}if(p=m.splitBlock(z)){f=p.previousBlock;w=p.nextBlock;v=p.wasStartOfBlock;a=p.wasEndOfBlock;w?(y=w.getParent(),y.is(\"li\")&&(w.breakParent(y),w.move(w.getNext(),1))):f&&(y=f.getParent())&&y.is(\"li\")&&(f.breakParent(y),y=f.getNext(),m.moveToElementEditStart(y),\nf.move(f.getPrevious()));if(v||a){if(f){if(f.is(\"li\")||!h.test(f.getName())&&!f.is(\"pre\"))B=f.clone()}else w&&(B=w.clone());B?q&&!B.is(\"li\")&&B.renameNode(z):y&&y.is(\"li\")?B=y:(B=r.createElement(z),f&&(t=f.getDirection())&&B.setAttribute(\"dir\",t));if(r=p.elementPath)for(q=0,z=r.elements.length;q<z;q++){y=r.elements[q];if(y.equals(r.block)||y.equals(r.blockLimit))break;CKEDITOR.dtd.$removeEmpty[y.getName()]&&(y=y.clone(),B.moveChildren(y),B.append(y))}B.appendBogus();B.getParent()||m.insertNode(B);\nB.is(\"li\")&&B.removeAttribute(\"value\");!CKEDITOR.env.ie||!v||a&&f.getChildCount()||(m.moveToElementEditStart(a?f:B),m.select());m.moveToElementEditStart(v&&!a?w:B)}else w.is(\"li\")&&(B=m.clone(),B.selectNodeContents(w),B=new CKEDITOR.dom.walker(B),B.evaluator=function(a){return!(d(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(y=B.next())&&y.type==CKEDITOR.NODE_ELEMENT&&y.is(\"ul\",\"ol\")&&(CKEDITOR.env.needsBrFiller?r.createElement(\"br\"):\nr.createText(\" \")).insertBefore(y)),w&&m.moveToElementEditStart(w);m.select();m.scrollIntoView()}}},enterBr:function(a,b,c,d){if(c=c||e(a)){var m=c.document,l=c.checkEndOfBlock(),u=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),v=u.block,w=v&&u.block.getName();d||\"li\"!=w?(!d&&l&&h.test(w)?(l=v.getDirection())?(m=m.createElement(\"div\"),m.setAttribute(\"dir\",l),m.insertAfter(v),c.setStart(m,0)):(m.createElement(\"br\").insertAfter(v),CKEDITOR.env.gecko&&m.createText(\"\").insertAfter(v),\nc.setStartAt(v.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a=\"pre\"==w&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?m.createText(\"\\r\"):m.createElement(\"br\"),c.deleteContents(),c.insertNode(a),CKEDITOR.env.needsBrFiller?(m.createText(\"\").insertAfter(a),l&&(v||u.blockLimit).appendBogus(),a.getNext().$.nodeValue=\"\",c.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):c.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),c.collapse(!0),c.select(),c.scrollIntoView()):\nf(a,b,c,d)}}};var m=CKEDITOR.plugins.enterkey,l=m.enterBr,f=m.enterBlock,h=/^h[1-6]$/}(),function(){function a(a,b){var c={},d=[],m={nbsp:\" \",shy:\"Â\",gt:\"\\x3e\",lt:\"\\x3c\",amp:\"\\x26\",apos:\"'\",quot:'\"'};a=a.replace(/\\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,f){var e=b?\"\\x26\"+f+\";\":m[f];c[e]=b?m[f]:\"\\x26\"+f+\";\";d.push(e);return\"\"});if(!b&&a){a=a.split(\",\");var l=document.createElement(\"div\"),f;l.innerHTML=\"\\x26\"+a.join(\";\\x26\")+\";\";f=l.innerHTML;l=null;for(l=0;l<f.length;l++){var h=f.charAt(l);\nc[h]=\"\\x26\"+a[l]+\";\";d.push(h)}}c.regex=d.join(b?\"|\":\"\");return c}CKEDITOR.plugins.add(\"entities\",{afterInit:function(e){function b(a){return h[a]}function c(a){return\"force\"!=d.entities_processNumerical&&l[a]?l[a]:\"\\x26#\"+a.charCodeAt(0)+\";\"}var d=e.config;if(e=(e=e.dataProcessor)&&e.htmlFilter){var m=[];!1!==d.basicEntities&&m.push(\"nbsp,gt,lt,amp\");d.entities&&(m.length&&m.push(\"quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro\"),\nd.entities_latin&&m.push(\"Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml\"),d.entities_greek&&m.push(\"Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv\"),\nd.entities_additional&&m.push(d.entities_additional));var l=a(m.join(\",\")),f=l.regex?\"[\"+l.regex+\"]\":\"a^\";delete l.regex;d.entities&&d.entities_processNumerical&&(f=\"[^ -~]|\"+f);var f=new RegExp(f,\"g\"),h=a(\"nbsp,gt,lt,amp,shy\",!0),k=new RegExp(h.regex,\"g\");e.addRules({text:function(a){return a.replace(k,b).replace(f,c)}},{applyToAll:!0,excludeNestedEditable:!0})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,\nCKEDITOR.config.entities_additional=\"#39\",CKEDITOR.plugins.add(\"popup\"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(a,e,b,c){e=e||\"80%\";b=b||\"70%\";\"string\"==typeof e&&1<e.length&&\"%\"==e.substr(e.length-1,1)&&(e=parseInt(window.screen.width*parseInt(e,10)/100,10));\"string\"==typeof b&&1<b.length&&\"%\"==b.substr(b.length-1,1)&&(b=parseInt(window.screen.height*parseInt(b,10)/100,10));640>e&&(e=640);420>b&&(b=420);var d=parseInt((window.screen.height-b)/2,10),m=parseInt((window.screen.width-\ne)/2,10);c=(c||\"location\\x3dno,menubar\\x3dno,toolbar\\x3dno,dependent\\x3dyes,minimizable\\x3dno,modal\\x3dyes,alwaysRaised\\x3dyes,resizable\\x3dyes,scrollbars\\x3dyes\")+\",width\\x3d\"+e+\",height\\x3d\"+b+\",top\\x3d\"+d+\",left\\x3d\"+m;var l=window.open(\"\",null,c,!0);if(!l)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(\" chrome/\")&&(l.moveTo(m,d),l.resizeTo(e,b)),l.focus(),l.location.href=a}catch(f){window.open(a,null,c,!0)}return!0}}),function(){function a(a,b){var c=[];if(b)for(var d in b)c.push(d+\n\"\\x3d\"+encodeURIComponent(b[d]));else return a;return a+(-1!=a.indexOf(\"?\")?\"\\x26\":\"?\")+c.join(\"\\x26\")}function e(a){a+=\"\";return a.charAt(0).toUpperCase()+a.substr(1)}function b(){var b=this.getDialog(),c=b.getParentEditor();c._.filebrowserSe=this;var d=c.config[\"filebrowser\"+e(b.getName())+\"WindowWidth\"]||c.config.filebrowserWindowWidth||\"80%\",b=c.config[\"filebrowser\"+e(b.getName())+\"WindowHeight\"]||c.config.filebrowserWindowHeight||\"70%\",f=this.filebrowser.params||{};f.CKEditor=c.name;f.CKEditorFuncNum=\nc._.filebrowserFn;f.langCode||(f.langCode=c.langCode);f=a(this.filebrowser.url,f);c.popup(f,d,b,c.config.filebrowserWindowFeatures||c.config.fileBrowserWindowFeatures)}function c(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return a.getContentElement(this[\"for\"][0],this[\"for\"][1]).getInputElement().$.value&&a.getContentElement(this[\"for\"][0],this[\"for\"][1]).getAction()?!0:!1}function d(b,c,d){var f=d.params||{};f.CKEditor=b.name;f.CKEditorFuncNum=b._.filebrowserFn;f.langCode||\n(f.langCode=b.langCode);c.action=a(d.url,f);c.filebrowser=d}function m(a,f,g,l){if(l&&l.length)for(var q,r=l.length;r--;)if(q=l[r],\"hbox\"!=q.type&&\"vbox\"!=q.type&&\"fieldset\"!=q.type||m(a,f,g,q.children),q.filebrowser)if(\"string\"==typeof q.filebrowser&&(q.filebrowser={action:\"fileButton\"==q.type?\"QuickUpload\":\"Browse\",target:q.filebrowser}),\"Browse\"==q.filebrowser.action){var p=q.filebrowser.url;void 0===p&&(p=a.config[\"filebrowser\"+e(f)+\"BrowseUrl\"],void 0===p&&(p=a.config.filebrowserBrowseUrl));\np&&(q.onClick=b,q.filebrowser.url=p,q.hidden=!1)}else if(\"QuickUpload\"==q.filebrowser.action&&q[\"for\"]&&(p=q.filebrowser.url,void 0===p&&(p=a.config[\"filebrowser\"+e(f)+\"UploadUrl\"],void 0===p&&(p=a.config.filebrowserUploadUrl)),p)){var u=q.onClick;q.onClick=function(a){var b=a.sender;if(u&&!1===u.call(b,a))return!1;if(c.call(b,a)){a=b.getDialog().getContentElement(this[\"for\"][0],this[\"for\"][1]).getInputElement();if(b=new CKEDITOR.dom.element(a.$.form))(a=b.$.elements.ckCsrfToken)?a=new CKEDITOR.dom.element(a):\n(a=new CKEDITOR.dom.element(\"input\"),a.setAttributes({name:\"ckCsrfToken\",type:\"hidden\"}),b.append(a)),a.setAttribute(\"value\",CKEDITOR.tools.getCsrfToken());return!0}return!1};q.filebrowser.url=p;q.hidden=!1;d(a,g.getContents(q[\"for\"][0]).get(q[\"for\"][1]),q.filebrowser)}}function l(a,b,c){if(-1!==c.indexOf(\";\")){c=c.split(\";\");for(var d=0;d<c.length;d++)if(l(a,b,c[d]))return!0;return!1}return(a=a.getContents(b).get(c).filebrowser)&&a.url}function f(a,b){var c=this._.filebrowserSe.getDialog(),d=this._.filebrowserSe[\"for\"],\nf=this._.filebrowserSe.filebrowser.onSelect;d&&c.getContentElement(d[0],d[1]).reset();if(\"function\"!=typeof b||!1!==b.call(this._.filebrowserSe))if(!f||!1!==f.call(this._.filebrowserSe,a,b))if(\"string\"==typeof b&&b&&alert(b),a&&(d=this._.filebrowserSe,c=d.getDialog(),d=d.filebrowser.target||null))if(d=d.split(\":\"),f=c.getContentElement(d[0],d[1]))f.setValue(a),c.selectPage(d[0])}CKEDITOR.plugins.add(\"filebrowser\",{requires:\"popup\",init:function(a){a._.filebrowserFn=CKEDITOR.tools.addFunction(f,a);\na.on(\"destroy\",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on(\"dialogDefinition\",function(a){if(a.editor.plugins.filebrowser)for(var b=a.data.definition,c,d=0;d<b.contents.length;++d)if(c=b.contents[d])m(a.editor,a.data.name,b,c.elements),c.hidden&&c.filebrowser&&(c.hidden=!l(b,c.id,c.filebrowser))})}(),function(){function a(a){var d=a.config,m=a.fire(\"uiSpace\",{space:\"top\",html:\"\"}).html,l=function(){function f(a,c,d){h.setStyle(c,b(d));h.setStyle(\"position\",a)}function g(a){var b=\nm.getDocumentPosition();switch(a){case \"top\":f(\"absolute\",\"top\",b.y-z-y);break;case \"pin\":f(\"fixed\",\"top\",x);break;case \"bottom\":f(\"absolute\",\"top\",b.y+(v.height||v.bottom-v.top)+y)}k=a}var k,m,u,v,w,z,B,t=d.floatSpaceDockedOffsetX||0,y=d.floatSpaceDockedOffsetY||0,C=d.floatSpacePinnedOffsetX||0,x=d.floatSpacePinnedOffsetY||0;return function(f){if(m=a.editable()){var n=f&&\"focus\"==f.name;n&&h.show();a.fire(\"floatingSpaceLayout\",{show:n});h.removeStyle(\"left\");h.removeStyle(\"right\");u=h.getClientRect();\nv=m.getClientRect();w=e.getViewPaneSize();z=u.height;B=\"pageXOffset\"in e.$?e.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;k?(z+y<=v.top?g(\"top\"):z+y>w.height-v.bottom?g(\"pin\"):g(\"bottom\"),f=w.width/2,f=d.floatSpacePreferRight?\"right\":0<v.left&&v.right<w.width&&v.width>u.width?\"rtl\"==d.contentsLangDirection?\"right\":\"left\":f-v.left>v.right-f?\"left\":\"right\",u.width>w.width?(f=\"left\",n=0):(n=\"left\"==f?0<v.left?v.left:0:v.right<w.width?w.width-v.right:0,n+u.width>w.width&&(f=\"left\"==f?\n\"right\":\"left\",n=0)),h.setStyle(f,b((\"pin\"==k?C:t)+n+(\"pin\"==k?0:\"left\"==f?B:-B)))):(k=\"pin\",g(\"pin\"),l(f))}}}();if(m){var f=new CKEDITOR.template('\\x3cdiv id\\x3d\"cke_{name}\" class\\x3d\"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'\" dir\\x3d\"{langDir}\" title\\x3d\"'+(CKEDITOR.env.gecko?\" \":\"\")+'\" lang\\x3d\"{langCode}\" role\\x3d\"application\" style\\x3d\"{style}\"'+(a.title?' aria-labelledby\\x3d\"cke_{name}_arialbl\"':\" \")+\"\\x3e\"+(a.title?'\\x3cspan id\\x3d\"cke_{name}_arialbl\" class\\x3d\"cke_voice_label\"\\x3e{voiceLabel}\\x3c/span\\x3e':\n\" \")+'\\x3cdiv class\\x3d\"cke_inner\"\\x3e\\x3cdiv id\\x3d\"{topId}\" class\\x3d\"cke_top\" role\\x3d\"presentation\"\\x3e{content}\\x3c/div\\x3e\\x3c/div\\x3e\\x3c/div\\x3e'),h=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(f.output({content:m,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:\"display:none;z-index:\"+(d.baseFloatZIndex-1),topId:a.ui.spaceId(\"top\"),voiceLabel:a.title}))),k=CKEDITOR.tools.eventsBuffer(500,l),g=CKEDITOR.tools.eventsBuffer(100,l);h.unselectable();h.on(\"mousedown\",\nfunction(a){a=a.data;a.getTarget().hasAscendant(\"a\",1)||a.preventDefault()});a.on(\"focus\",function(b){l(b);a.on(\"change\",k.input);e.on(\"scroll\",g.input);e.on(\"resize\",g.input)});a.on(\"blur\",function(){h.hide();a.removeListener(\"change\",k.input);e.removeListener(\"scroll\",g.input);e.removeListener(\"resize\",g.input)});a.on(\"destroy\",function(){e.removeListener(\"scroll\",g.input);e.removeListener(\"resize\",g.input);h.clearCustomData();h.remove()});a.focusManager.hasFocus&&h.show();a.focusManager.add(h,\n1)}}var e=CKEDITOR.document.getWindow(),b=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add(\"floatingspace\",{init:function(b){b.on(\"loaded\",function(){a(this)},null,null,20)}})}(),CKEDITOR.plugins.add(\"listblock\",{requires:\"panel\",onLoad:function(){var a=CKEDITOR.addTemplate(\"panel-list\",'\\x3cul role\\x3d\"presentation\" class\\x3d\"cke_panel_list\"\\x3e{items}\\x3c/ul\\x3e'),e=CKEDITOR.addTemplate(\"panel-list-item\",'\\x3cli id\\x3d\"{id}\" class\\x3d\"cke_panel_listItem\" role\\x3dpresentation\\x3e\\x3ca id\\x3d\"{id}_option\" _cke_focus\\x3d1 hidefocus\\x3dtrue title\\x3d\"{title}\" href\\x3d\"javascript:void(\\'{val}\\')\" {onclick}\\x3d\"CKEDITOR.tools.callFunction({clickFn},\\'{val}\\'); return false;\" role\\x3d\"option\"\\x3e{text}\\x3c/a\\x3e\\x3c/li\\x3e'),\nb=CKEDITOR.addTemplate(\"panel-list-group\",'\\x3ch1 id\\x3d\"{id}\" class\\x3d\"cke_panel_grouptitle\" role\\x3d\"presentation\" \\x3e{label}\\x3c/h1\\x3e'),c=/\\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var c=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&(c[\"aria-multiselectable\"]=!0);!c.role&&\n(c.role=\"listbox\");this.base.apply(this,arguments);this.element.setAttribute(\"role\",c.role);c=this.keys;c[40]=\"next\";c[9]=\"next\";c[38]=\"prev\";c[CKEDITOR.SHIFT+9]=\"prev\";c[32]=CKEDITOR.env.ie?\"mouseup\":\"click\";CKEDITOR.env.ie&&(c[13]=\"mouseup\");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var b=a.output({items:this._.pendingList.join(\"\")});this._.pendingList=[];this._.pendingHtml.push(b);delete this._.started}},getClick:function(){this._.click||\n(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,b,l){var f=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=f;var h;h=CKEDITOR.tools.htmlEncodeAttr(a).replace(c,\"\\\\'\");a={id:f,val:h,onclick:CKEDITOR.env.ie?'onclick\\x3d\"return false;\" onmouseup':\"onclick\",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(l||a),text:b||a};\nthis._.pendingList.push(e.output(a))},startGroup:function(a){this._.close();var c=CKEDITOR.tools.getNextId();this._.groups[a]=c;this._.pendingHtml.push(b.output({id:c,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(\"\"));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle(\"display\",\n\"none\"),b&&\"ul\"==b.getName()&&b.setStyle(\"display\",\"none\"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle(\"display\",\"none\")},showAll:function(){var a=this._.items,b=this._.groups,c=this.element.getDocument(),f;for(f in a)c.getById(a[f]).setStyle(\"display\",\"\");for(var e in b)a=c.getById(b[e]),f=a.getNext(),a.setStyle(\"display\",\"\"),f&&\"ul\"==f.getName()&&f.setStyle(\"display\",\"\")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var b=this.element.getDocument().getById(a);\nb.addClass(\"cke_selected\");this.element.getDocument().getById(a+\"_option\").setAttribute(\"aria-selected\",!0);this.onMark&&this.onMark(b)},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var c=b.getById(a);c.removeClass(\"cke_selected\");b.getById(a+\"_option\").removeAttribute(\"aria-selected\");this.onUnmark&&this.onUnmark(c)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),c;for(c in a){var f=a[c];b.getById(f).removeClass(\"cke_selected\");b.getById(f+\"_option\").removeAttribute(\"aria-selected\")}this.onUnmark&&\nthis.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass(\"cke_selected\")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag(\"a\"),c,f=-1;if(a)for(c=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++f);){if(a.equals(c)){this._.focusIndex=f;break}}else this.element.focus();c&&setTimeout(function(){c.focus()},0)}}})}}),function(){var a='\\x3ca id\\x3d\"{id}\" class\\x3d\"cke_button cke_button__{name} cke_button_{state} {cls}\"'+\n(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?\"\":\" href\\x3d\\\"javascript:void('{titleJs}')\\\"\")+' title\\x3d\"{title}\" tabindex\\x3d\"-1\" hidefocus\\x3d\"true\" role\\x3d\"button\" aria-labelledby\\x3d\"{id}_label\" aria-haspopup\\x3d\"{hasArrow}\" aria-disabled\\x3d\"{ariaDisabled}\"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\\x3d\"return false;\"');CKEDITOR.env.gecko&&(a+=' onblur\\x3d\"this.style.cssText \\x3d this.style.cssText;\"');var a=a+(' onkeydown\\x3d\"return CKEDITOR.tools.callFunction({keydownFn},event);\" onfocus\\x3d\"return CKEDITOR.tools.callFunction({focusFn},event);\" '+\n(CKEDITOR.env.ie?'onclick\\x3d\"return false;\" onmouseup':\"onclick\")+'\\x3d\"CKEDITOR.tools.callFunction({clickFn},this);return false;\"\\x3e\\x3cspan class\\x3d\"cke_button_icon cke_button__{iconName}_icon\" style\\x3d\"{style}\"'),a=a+'\\x3e\\x26nbsp;\\x3c/span\\x3e\\x3cspan id\\x3d\"{id}_label\" class\\x3d\"cke_button_label cke_button__{name}_label\" aria-hidden\\x3d\"false\"\\x3e{label}\\x3c/span\\x3e{arrowHtml}\\x3c/a\\x3e',e=CKEDITOR.addTemplate(\"buttonArrow\",'\\x3cspan class\\x3d\"cke_button_arrow\"\\x3e'+(CKEDITOR.env.hc?\"\\x26#9660;\":\n\"\")+\"\\x3c/span\\x3e\"),b=CKEDITOR.addTemplate(\"button\",a);CKEDITOR.plugins.add(\"button\",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON=\"button\";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,d){function m(){var b=a.mode;\nb&&(b=this.modes[b]?void 0!==u[b]?u[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var l=CKEDITOR.env,f=this._.id=CKEDITOR.tools.getNextId(),h=\"\",k=this.command,g;this._.editor=a;var n={id:f,button:this,editor:a,focus:function(){CKEDITOR.document.getById(f).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},q=CKEDITOR.tools.addFunction(function(a){if(n.onkey)return a=\nnew CKEDITOR.dom.event(a),!1!==n.onkey(n,a.getKeystroke())}),r=CKEDITOR.tools.addFunction(function(a){var b;n.onfocus&&(b=!1!==n.onfocus(n,new CKEDITOR.dom.event(a)));return b}),p=0;n.clickFn=g=CKEDITOR.tools.addFunction(function(){p&&(a.unlockSelection(1),p=0);n.execute();l.iOS&&a.focus()});if(this.modes){var u={};a.on(\"beforeModeUnload\",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(u[a.mode]=this._.state)},this);a.on(\"activeFilterChange\",m,this);a.on(\"mode\",m,this);!this.readOnly&&\na.on(\"readOnly\",m,this)}else k&&(k=a.getCommand(k))&&(k.on(\"state\",function(){this.setState(k.state)},this),h+=k.state==CKEDITOR.TRISTATE_ON?\"on\":k.state==CKEDITOR.TRISTATE_DISABLED?\"disabled\":\"off\");if(this.directional)a.on(\"contentDirChanged\",function(b){var d=CKEDITOR.document.getById(this._.id),f=d.getFirst();b=b.data;b!=a.lang.dir?d.addClass(\"cke_\"+b):d.removeClass(\"cke_ltr\").removeClass(\"cke_rtl\");f.setAttribute(\"style\",CKEDITOR.skin.getIconStyle(w,\"rtl\"==b,this.icon,this.iconOffset))},this);\nk||(h+=\"off\");var v=this.name||this.command,w=v;this.icon&&!/\\./.test(this.icon)&&(w=this.icon,this.icon=null);h={id:f,name:v,iconName:w,label:this.label,cls:this.className||\"\",state:h,ariaDisabled:\"disabled\"==h?\"true\":\"false\",title:this.title,titleJs:l.gecko&&!l.hc?\"\":(this.title||\"\").replace(\"'\",\"\"),hasArrow:this.hasArrow?\"true\":\"false\",keydownFn:q,focusFn:r,clickFn:g,style:CKEDITOR.skin.getIconStyle(w,\"rtl\"==a.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow?e.output():\"\"};b.output(h,\nd);if(this.onRender)this.onRender();return n},setState:function(a){if(this._.state==a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,\"cke_button\"),a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute(\"aria-disabled\",!0):b.removeAttribute(\"aria-disabled\"),this.hasArrow?(a=a==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+\"_label\").setText(a)):a==CKEDITOR.TRISTATE_ON?b.setAttribute(\"aria-pressed\",\n!0):b.removeAttribute(\"aria-pressed\"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),CKEDITOR.plugins.add(\"richcombo\",{requires:\"floatpanel,listblock,button\",beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),\nfunction(){var a='\\x3cspan id\\x3d\"{id}\" class\\x3d\"cke_combo cke_combo__{name} {cls}\" role\\x3d\"presentation\"\\x3e\\x3cspan id\\x3d\"{id}_label\" class\\x3d\"cke_combo_label\"\\x3e{label}\\x3c/span\\x3e\\x3ca class\\x3d\"cke_combo_button\" title\\x3d\"{title}\" tabindex\\x3d\"-1\"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?\"\":\" href\\x3d\\\"javascript:void('{titleJs}')\\\"\")+' hidefocus\\x3d\"true\" role\\x3d\"button\" aria-labelledby\\x3d\"{id}_label\" aria-haspopup\\x3d\"true\"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\\x3d\"return false;\"');\nCKEDITOR.env.gecko&&(a+=' onblur\\x3d\"this.style.cssText \\x3d this.style.cssText;\"');var a=a+(' onkeydown\\x3d\"return CKEDITOR.tools.callFunction({keydownFn},event,this);\" onfocus\\x3d\"return CKEDITOR.tools.callFunction({focusFn},event);\" '+(CKEDITOR.env.ie?'onclick\\x3d\"return false;\" onmouseup':\"onclick\")+'\\x3d\"CKEDITOR.tools.callFunction({clickFn},this);return false;\"\\x3e\\x3cspan id\\x3d\"{id}_text\" class\\x3d\"cke_combo_text cke_combo_inlinelabel\"\\x3e{label}\\x3c/span\\x3e\\x3cspan class\\x3d\"cke_combo_open\"\\x3e\\x3cspan class\\x3d\"cke_combo_arrow\"\\x3e'+\n(CKEDITOR.env.hc?\"\\x26#9660;\":CKEDITOR.env.air?\"\\x26nbsp;\":\"\")+\"\\x3c/span\\x3e\\x3c/span\\x3e\\x3c/a\\x3e\\x3c/span\\x3e\"),e=CKEDITOR.addTemplate(\"combo\",a);CKEDITOR.UI_RICHCOMBO=\"richcombo\";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className=\"cke_combopanel\";\na.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{}}},proto:{renderHtml:function(a){var c=[];this.render(a,c);return c.join(\"\")},render:function(a,c){function d(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var c=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(c=CKEDITOR.TRISTATE_DISABLED);this.setState(c);this.setValue(\"\");c!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var m=\nCKEDITOR.env,l=\"cke_\"+this.id,f=CKEDITOR.tools.addFunction(function(c){q&&(a.unlockSelection(1),q=0);k.execute(c)},this),h=this,k={id:l,combo:this,focus:function(){CKEDITOR.document.getById(l).getChild(1).focus()},execute:function(c){var d=h._;if(d.state!=CKEDITOR.TRISTATE_DISABLED)if(h.createPanel(a),d.on)d.panel.hide();else{h.commit();var f=h.getValue();f?d.list.mark(f):d.list.unmarkAll();d.panel.showBlock(h.id,new CKEDITOR.dom.element(c),4)}},clickFn:f};a.on(\"activeFilterChange\",d,this);a.on(\"mode\",\nd,this);a.on(\"selectionChange\",d,this);!this.readOnly&&a.on(\"readOnly\",d,this);var g=CKEDITOR.tools.addFunction(function(c,d){c=new CKEDITOR.dom.event(c);var e=c.getKeystroke();if(40==e)a.once(\"panelShow\",function(a){a.data._.panel._.currentBlock.onKeyDown(40)});switch(e){case 13:case 32:case 40:CKEDITOR.tools.callFunction(f,d);break;default:k.onkey(k,e)}c.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){k.onfocus&&k.onfocus()}),q=0;k.keyDownFn=g;m={id:l,name:this.name||this.command,label:this.label,\ntitle:this.title,cls:this.className||\"\",titleJs:m.gecko&&!m.hc?\"\":(this.title||\"\").replace(\"'\",\"\"),keydownFn:g,focusFn:n,clickFn:f};e.output(m,c);if(this.onRender)this.onRender();return k},createPanel:function(a){if(!this._.panel){var c=this._.panelDefinition,d=this._.panelDefinition.block,e=c.parent||CKEDITOR.document.getBody(),l=\"cke_combopanel__\"+this.name,f=new CKEDITOR.ui.floatPanel(a,e,c),h=f.addListBlock(this.id,d),k=this;f.onShow=function(){this.element.addClass(l);k.setState(CKEDITOR.TRISTATE_ON);\nk._.on=1;k.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(k.onOpen)k.onOpen();a.once(\"panelShow\",function(){h.focus(!h.multiSelect&&k.getValue())})};f.onHide=function(c){this.element.removeClass(l);k.setState(k.modes&&k.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);k._.on=0;if(!c&&k.onClose)k.onClose()};f.onEscape=function(){f.hide(1)};h.onClick=function(a,b){k.onClick&&k.onClick.call(k,a,b);f.hide()};this._.panel=f;this._.list=h;f.getBlock(this.id).onHide=function(){k._.on=\n0;k.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,c){this._.value=a;var d=this.document.getById(\"cke_\"+this.id+\"_text\");d&&(a||c?d.removeClass(\"cke_combo_inlinelabel\"):(c=this.label,d.addClass(\"cke_combo_inlinelabel\")),d.setText(\"undefined\"!=typeof c?c:a))},getValue:function(){return this._.value||\"\"},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},\nshowAll:function(){this._.list.showAll()},add:function(a,c,d){this._.items[a]=d||a;this._.list.add(a,c,d)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire(\"ready\",this));this._.committed=1},setState:function(a){if(this._.state!=a){var c=this.document.getById(\"cke_\"+this.id);c.setState(a,\"cke_combo\");a==CKEDITOR.TRISTATE_DISABLED?c.setAttribute(\"aria-disabled\",!0):c.removeAttribute(\"aria-disabled\");this._.state=\na}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,c){this.add(a,CKEDITOR.UI_RICHCOMBO,c)}}(),CKEDITOR.plugins.add(\"format\",{requires:\"richcombo\",init:function(a){if(!a.blockless){for(var e=\na.config,b=a.lang.format,c=e.format_tags.split(\";\"),d={},m=0,l=[],f=0;f<c.length;f++){var h=c[f],k=new CKEDITOR.style(e[\"format_\"+h]);if(!a.filter.customConfig||a.filter.check(k))m++,d[h]=k,d[h]._.enterMode=a.config.enterMode,l.push(k)}0!==m&&a.ui.addRichCombo(\"Format\",{label:b.label,title:b.panelTitle,toolbar:\"styles,20\",allowedContent:l,panel:{css:[CKEDITOR.skin.getPath(\"editor\")].concat(e.contentsCss),multiSelect:!1,attributes:{\"aria-label\":b.panelTitle}},init:function(){this.startGroup(b.panelTitle);\nfor(var a in d){var c=b[\"tag_\"+a];this.add(a,d[a].buildPreview(c),c)}},onClick:function(b){a.focus();a.fire(\"saveSnapshot\");b=d[b];var c=a.elementPath();a[b.checkActive(c,a)?\"removeStyle\":\"applyStyle\"](b);setTimeout(function(){a.fire(\"saveSnapshot\")},0)},onRender:function(){a.on(\"selectionChange\",function(b){var c=this.getValue();b=b.data.path;this.refresh();for(var f in d)if(d[f].checkActive(b,a)){f!=c&&this.setValue(f,a.lang.format[\"tag_\"+f]);return}this.setValue(\"\")},this)},onOpen:function(){this.showAll();\nfor(var b in d)a.activeFilter.check(d[b])||this.hideItem(b)},refresh:function(){var b=a.elementPath();if(b){if(b.isContextFor(\"p\"))for(var c in d)if(a.activeFilter.check(d[c]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags=\"p;h1;h2;h3;h4;h5;h6;pre;address;div\",CKEDITOR.config.format_p={element:\"p\"},CKEDITOR.config.format_div={element:\"div\"},CKEDITOR.config.format_pre={element:\"pre\"},CKEDITOR.config.format_address={element:\"address\"},CKEDITOR.config.format_h1=\n{element:\"h1\"},CKEDITOR.config.format_h2={element:\"h2\"},CKEDITOR.config.format_h3={element:\"h3\"},CKEDITOR.config.format_h4={element:\"h4\"},CKEDITOR.config.format_h5={element:\"h5\"},CKEDITOR.config.format_h6={element:\"h6\"},function(){var a={canUndo:!1,exec:function(a){var b=a.document.createElement(\"hr\");a.insertElement(b)},allowedContent:\"hr\",requiredContent:\"hr\"};CKEDITOR.plugins.add(\"horizontalrule\",{init:function(e){e.blockless||(e.addCommand(\"horizontalrule\",a),e.ui.addButton&&e.ui.addButton(\"HorizontalRule\",\n{label:e.lang.horizontalrule.toolbar,command:\"horizontalrule\",toolbar:\"insert,40\"}))}})}(),CKEDITOR.plugins.add(\"htmlwriter\",{init:function(a){var e=new CKEDITOR.htmlWriter;e.forceSimpleAmpersand=a.config.forceSimpleAmpersand;e.indentationChars=a.config.dataIndentationChars||\"\\t\";a.dataProcessor.writer=e}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars=\"\\t\";this.selfClosingEnd=\" /\\x3e\";this.lineBreakChars=\"\\n\";this.sortAttributes=\n1;this._.indent=0;this._.indentation=\"\";this._.inPre=0;this._.rules={};var a=CKEDITOR.dtd,e;for(e in CKEDITOR.tools.extend({},a.$nonBodyContent,a.$block,a.$listItem,a.$tableContent))this.setRules(e,{indent:!a[e][\"#\"],breakBeforeOpen:1,breakBeforeClose:!a[e][\"#\"],breakAfterClose:1,needsSpace:e in a.$block&&!(e in{li:1,dt:1,dd:1})});this.setRules(\"br\",{breakAfterOpen:1});this.setRules(\"title\",{indent:0,breakAfterOpen:0});this.setRules(\"style\",{indent:0,breakBeforeClose:1});this.setRules(\"pre\",{breakAfterOpen:1,\nindent:0})},proto:{openTag:function(a){var e=this._.rules[a];this._.afterCloser&&e&&e.needsSpace&&this._.needsSpace&&this._.output.push(\"\\n\");this._.indent?this.indentation():e&&e.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push(\"\\x3c\",a);this._.afterCloser=0},openTagClose:function(a,e){var b=this._.rules[a];e?(this._.output.push(this.selfClosingEnd),b&&b.breakAfterClose&&(this._.needsSpace=b.needsSpace)):(this._.output.push(\"\\x3e\"),b&&b.indent&&(this._.indentation+=this.indentationChars));\nb&&b.breakAfterOpen&&this.lineBreak();\"pre\"==a&&(this._.inPre=1)},attribute:function(a,e){\"string\"==typeof e&&(this.forceSimpleAmpersand&&(e=e.replace(/&/g,\"\\x26\")),e=CKEDITOR.tools.htmlEncodeAttr(e));this._.output.push(\" \",a,'\\x3d\"',e,'\"')},closeTag:function(a){var e=this._.rules[a];e&&e.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():e&&e.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push(\"\\x3c/\",a,\n\"\\x3e\");\"pre\"==a&&(this._.inPre=0);e&&e.breakAfterClose&&(this.lineBreak(),this._.needsSpace=e.needsSpace);this._.afterCloser=1},text:function(a){this._.indent&&(this.indentation(),!this._.inPre&&(a=CKEDITOR.tools.ltrim(a)));this._.output.push(a)},comment:function(a){this._.indent&&this.indentation();this._.output.push(\"\\x3c!--\",a,\"--\\x3e\")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&\nthis._.output.push(this._.indentation);this._.indent=0},reset:function(){this._.output=[];this._.indent=0;this._.indentation=\"\";this._.afterCloser=0;this._.inPre=0},setRules:function(a,e){var b=this._.rules[a];b?CKEDITOR.tools.extend(b,e,!0):this._.rules[a]=e}}}),function(){function a(a,c){c||(c=a.getSelection().getSelectedElement());if(c&&c.is(\"img\")&&!c.data(\"cke-realelement\")&&!c.isReadOnly())return c}function e(a){var c=a.getStyle(\"float\");if(\"inherit\"==c||\"none\"==c)c=0;c||(c=a.getAttribute(\"align\"));\nreturn c}CKEDITOR.plugins.add(\"image\",{requires:\"dialog\",init:function(b){if(!b.plugins.image2){CKEDITOR.dialog.add(\"image\",this.path+\"dialogs/image.js\");var c=\"img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}\";CKEDITOR.dialog.isTabEnabled(b,\"image\",\"advanced\")&&(c=\"img[alt,dir,id,lang,longdesc,!src,title]{*}(*)\");b.addCommand(\"image\",new CKEDITOR.dialogCommand(\"image\",{allowedContent:c,requiredContent:\"img[alt,src]\",contentTransformations:[[\"img{width}: sizeToStyle\",\n\"img[width]: sizeToAttribute\"],[\"img{float}: alignmentToStyle\",\"img[align]: alignmentToAttribute\"]]}));b.ui.addButton&&b.ui.addButton(\"Image\",{label:b.lang.common.image,command:\"image\",toolbar:\"insert,10\"});b.on(\"doubleclick\",function(a){var b=a.data.element;!b.is(\"img\")||b.data(\"cke-realelement\")||b.isReadOnly()||(a.data.dialog=\"image\")});b.addMenuItems&&b.addMenuItems({image:{label:b.lang.image.menu,command:\"image\",group:\"image\"}});b.contextMenu&&b.contextMenu.addListener(function(c){if(a(b,c))return{image:CKEDITOR.TRISTATE_OFF}})}},\nafterInit:function(b){function c(c){var m=b.getCommand(\"justify\"+c);if(m){if(\"left\"==c||\"right\"==c)m.on(\"exec\",function(m){var f=a(b),h;f&&(h=e(f),h==c?(f.removeStyle(\"float\"),c==e(f)&&f.removeAttribute(\"align\")):f.setStyle(\"float\",c),m.cancel())});m.on(\"refresh\",function(m){var f=a(b);f&&(f=e(f),this.setState(f==c?CKEDITOR.TRISTATE_ON:\"right\"==c||\"left\"==c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),m.cancel())})}}b.plugins.image2||(c(\"left\"),c(\"right\"),c(\"center\"),c(\"block\"))}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=\n!0,function(){function a(a,b){var d=c.exec(a),e=c.exec(b);if(d){if(!d[2]&&\"px\"==e[2])return e[1];if(\"px\"==d[2]&&!e[2])return e[1]+\"px\"}return b}var e=CKEDITOR.htmlParser.cssStyle,b=CKEDITOR.tools.cssLength,c=/^((?:\\d*(?:\\.\\d+))|(?:\\d+))(.*)?$/i,d={elements:{$:function(b){var c=b.attributes;if((c=(c=(c=c&&c[\"data-cke-realelement\"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(c)))&&c.children[0])&&b.attributes[\"data-cke-resizable\"]){var d=(new e(b)).rules;b=c.attributes;var h=d.width,\nd=d.height;h&&(b.width=a(b.width,h));d&&(b.height=a(b.height,d))}return c}}};CKEDITOR.plugins.add(\"fakeobjects\",{init:function(a){a.filter.allow(\"img[!data-cke-realelement,src,alt,title](*){*}\",\"fakeobjects\")},afterInit:function(a){(a=(a=a.dataProcessor)&&a.htmlFilter)&&a.addRules(d,{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(a,c,d,h){var k=this.lang.fakeobjects,k=k[d]||k.unknown;c={\"class\":c,\"data-cke-realelement\":encodeURIComponent(a.getOuterHtml()),\"data-cke-real-node-type\":a.type,\nalt:k,title:k,align:a.getAttribute(\"align\")||\"\"};CKEDITOR.env.hc||(c.src=CKEDITOR.tools.transparentImageData);d&&(c[\"data-cke-real-element-type\"]=d);h&&(c[\"data-cke-resizable\"]=h,d=new e,h=a.getAttribute(\"width\"),a=a.getAttribute(\"height\"),h&&(d.rules.width=b(h)),a&&(d.rules.height=b(a)),d.populate(c));return this.document.createElement(\"img\",{attributes:c})};CKEDITOR.editor.prototype.createFakeParserElement=function(a,c,d,h){var k=this.lang.fakeobjects,k=k[d]||k.unknown,g;g=new CKEDITOR.htmlParser.basicWriter;\na.writeHtml(g);g=g.getHtml();c={\"class\":c,\"data-cke-realelement\":encodeURIComponent(g),\"data-cke-real-node-type\":a.type,alt:k,title:k,align:a.attributes.align||\"\"};CKEDITOR.env.hc||(c.src=CKEDITOR.tools.transparentImageData);d&&(c[\"data-cke-real-element-type\"]=d);h&&(c[\"data-cke-resizable\"]=h,h=a.attributes,a=new e,d=h.width,h=h.height,void 0!==d&&(a.rules.width=b(d)),void 0!==h&&(a.rules.height=b(h)),a.populate(c));return new CKEDITOR.htmlParser.element(\"img\",c)};CKEDITOR.editor.prototype.restoreRealElement=\nfunction(b){if(b.data(\"cke-real-node-type\")!=CKEDITOR.NODE_ELEMENT)return null;var c=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(b.data(\"cke-realelement\")),this.document);if(b.data(\"cke-resizable\")){var d=b.getStyle(\"width\");b=b.getStyle(\"height\");d&&c.setAttribute(\"width\",a(c.getAttribute(\"width\"),d));b&&c.setAttribute(\"height\",a(c.getAttribute(\"height\"),b))}return c}}(),\"use strict\",function(){function a(a){return a.replace(/'/g,\"\\\\$\\x26\")}function e(a){for(var b,c=a.length,d=[],f=0;f<\nc;f++)b=a.charCodeAt(f),d.push(b);return\"String.fromCharCode(\"+d.join(\",\")+\")\"}function b(b,c){var d=b.plugins.link,f=d.compiledProtectionFunction.params,e,g;g=[d.compiledProtectionFunction.name,\"(\"];for(var h=0;h<f.length;h++)d=f[h].toLowerCase(),e=c[d],0<h&&g.push(\",\"),g.push(\"'\",e?a(encodeURIComponent(c[d])):\"\",\"'\");g.push(\")\");return g.join(\"\")}function c(a){a=a.config.emailProtection||\"\";var b;a&&\"encode\"!=a&&(b={},a.replace(/^([^(]+)\\(([^)]+)\\)$/,function(a,c,d){b.name=c;b.params=[];d.replace(/[^,\\s]+/g,\nfunction(a){b.params.push(a)})}));return b}CKEDITOR.plugins.add(\"link\",{requires:\"dialog,fakeobjects\",onLoad:function(){function a(b){return c.replace(/%1/g,\"rtl\"==b?\"right\":\"left\").replace(/%2/g,\"cke_contents_\"+b)}var b=\"background:url(\"+CKEDITOR.getUrl(this.path+\"images\"+(CKEDITOR.env.hidpi?\"/hidpi\":\"\")+\"/anchor.png\")+\") no-repeat %1 center;border:1px dotted #00f;background-size:16px;\",c=\".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{\"+\nb+\"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{\"+b+\"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}\";CKEDITOR.addCss(a(\"ltr\")+a(\"rtl\"))},init:function(a){var b=\"a[!href]\";CKEDITOR.dialog.isTabEnabled(a,\"link\",\"advanced\")&&(b=b.replace(\"]\",\",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type]{*}(*)\"));CKEDITOR.dialog.isTabEnabled(a,\"link\",\"target\")&&(b=b.replace(\"]\",\",target,onclick]\"));a.addCommand(\"link\",new CKEDITOR.dialogCommand(\"link\",{allowedContent:b,requiredContent:\"a[href]\"}));\na.addCommand(\"anchor\",new CKEDITOR.dialogCommand(\"anchor\",{allowedContent:\"a[!name,id]\",requiredContent:\"a[name]\"}));a.addCommand(\"unlink\",new CKEDITOR.unlinkCommand);a.addCommand(\"removeAnchor\",new CKEDITOR.removeAnchorCommand);a.setKeystroke(CKEDITOR.CTRL+76,\"link\");a.ui.addButton&&(a.ui.addButton(\"Link\",{label:a.lang.link.toolbar,command:\"link\",toolbar:\"links,10\"}),a.ui.addButton(\"Unlink\",{label:a.lang.link.unlink,command:\"unlink\",toolbar:\"links,20\"}),a.ui.addButton(\"Anchor\",{label:a.lang.link.anchor.toolbar,\ncommand:\"anchor\",toolbar:\"links,30\"}));CKEDITOR.dialog.add(\"link\",this.path+\"dialogs/link.js\");CKEDITOR.dialog.add(\"anchor\",this.path+\"dialogs/anchor.js\");a.on(\"doubleclick\",function(b){var c=CKEDITOR.plugins.link.getSelectedLink(a)||b.data.element;c.isReadOnly()||(c.is(\"a\")?(b.data.dialog=!c.getAttribute(\"name\")||c.getAttribute(\"href\")&&c.getChildCount()?\"link\":\"anchor\",b.data.link=c):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,c)&&(b.data.dialog=\"anchor\"))},null,null,0);a.on(\"doubleclick\",function(b){b.data.dialog in\n{link:1,anchor:1}&&b.data.link&&a.getSelection().selectElement(b.data.link)},null,null,20);a.addMenuItems&&a.addMenuItems({anchor:{label:a.lang.link.anchor.menu,command:\"anchor\",group:\"anchor\",order:1},removeAnchor:{label:a.lang.link.anchor.remove,command:\"removeAnchor\",group:\"anchor\",order:5},link:{label:a.lang.link.menu,command:\"link\",group:\"link\",order:1},unlink:{label:a.lang.link.unlink,command:\"unlink\",group:\"link\",order:5}});a.contextMenu&&a.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;\nb=CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b);if(!b&&!(b=CKEDITOR.plugins.link.getSelectedLink(a)))return null;var c={};b.getAttribute(\"href\")&&b.getChildCount()&&(c={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF});b&&b.hasAttribute(\"name\")&&(c.anchor=c.removeAnchor=CKEDITOR.TRISTATE_OFF);return c});this.compiledProtectionFunction=c(a)},afterInit:function(a){a.dataProcessor.dataFilter.addRules({elements:{a:function(b){return b.attributes.name?b.children.length?null:a.createFakeParserElement(b,\n\"cke_anchor\",\"anchor\"):null}}});var b=a._.elementsPath&&a._.elementsPath.filters;b&&b.push(function(b,c){if(\"a\"==c&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b)||b.getAttribute(\"name\")&&(!b.getAttribute(\"href\")||!b.getChildCount())))return\"anchor\"})}});var d=/^javascript:/,m=/^mailto:([^?]+)(?:\\?(.+))?$/,l=/subject=([^;?:@&=$,\\/]*)/i,f=/body=([^;?:@&=$,\\/]*)/i,h=/^#(.*)$/,k=/^((?:http|https|ftp|news):\\/\\/)?(.*)$/,g=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\\(location\\.href='mailto:'\\+String\\.fromCharCode\\(([^)]+)\\)(?:\\+'(.*)')?\\)$/,\nq=/^javascript:([^(]+)\\(([^)]+)\\)$/,r=/\\s*window.open\\(\\s*this\\.href\\s*,\\s*(?:'([^']*)'|null)\\s*,\\s*'([^']*)'\\s*\\)\\s*;\\s*return\\s*false;*\\s*/,p=/(?:^|,)([^=]+)=(\\d+|yes|no)/gi,u={id:\"advId\",dir:\"advLangDir\",accessKey:\"advAccessKey\",name:\"advName\",lang:\"advLangCode\",tabindex:\"advTabIndex\",title:\"advTitle\",type:\"advContentType\",\"class\":\"advCSSClasses\",charset:\"advCharset\",style:\"advStyles\",rel:\"advRel\"};CKEDITOR.plugins.link={getSelectedLink:function(a){var b=a.getSelection(),c=b.getSelectedElement();\nreturn c&&c.is(\"a\")?c:(b=b.getRanges()[0])?(b.shrink(CKEDITOR.SHRINK_TEXT),a.elementPath(b.getCommonAncestor()).contains(\"a\",1)):null},getEditorAnchors:function(a){for(var b=a.editable(),c=b.isInline()&&!a.plugins.divarea?a.document:b,b=c.getElementsByTag(\"a\"),c=c.getElementsByTag(\"img\"),d=[],f=0,e;e=b.getItem(f++);)(e.data(\"cke-saved-name\")||e.hasAttribute(\"name\"))&&d.push({name:e.data(\"cke-saved-name\")||e.getAttribute(\"name\"),id:e.getAttribute(\"id\")});for(f=0;e=c.getItem(f++);)(e=this.tryRestoreFakeAnchor(a,\ne))&&d.push({name:e.getAttribute(\"name\"),id:e.getAttribute(\"id\")});return d},fakeAnchor:!0,tryRestoreFakeAnchor:function(a,b){if(b&&b.data(\"cke-real-element-type\")&&\"anchor\"==b.data(\"cke-real-element-type\")){var c=a.restoreRealElement(b);if(c.data(\"cke-saved-name\"))return c}},parseLinkAttributes:function(a,b){var c=b&&(b.data(\"cke-saved-href\")||b.getAttribute(\"href\"))||\"\",e=a.plugins.link.compiledProtectionFunction,t=a.config.emailProtection,y,C={};c.match(d)&&(\"encode\"==t?c=c.replace(n,function(a,\nb,c){c=c||\"\";return\"mailto:\"+String.fromCharCode.apply(String,b.split(\",\"))+c.replace(/\\\\'/g,\"'\")}):t&&c.replace(q,function(a,b,c){if(b==e.name){C.type=\"email\";a=C.email={};b=/(^')|('$)/g;c=c.match(/[^,\\s]+/g);for(var d=c.length,f,g,h=0;h<d;h++)f=decodeURIComponent,g=c[h].replace(b,\"\").replace(/\\\\'/g,\"'\"),g=f(g),f=e.params[h].toLowerCase(),a[f]=g;a.address=[a.name,a.domain].join(\"@\")}}));if(!C.type)if(t=c.match(h))C.type=\"anchor\",C.anchor={},C.anchor.name=C.anchor.id=t[1];else if(t=c.match(m)){y=\nc.match(l);c=c.match(f);C.type=\"email\";var x=C.email={};x.address=t[1];y&&(x.subject=decodeURIComponent(y[1]));c&&(x.body=decodeURIComponent(c[1]))}else c&&(y=c.match(k))&&(C.type=\"url\",C.url={},C.url.protocol=y[1],C.url.url=y[2]);if(b){if(c=b.getAttribute(\"target\"))C.target={type:c.match(g)?c:\"frame\",name:c};else if(c=(c=b.data(\"cke-pa-onclick\")||b.getAttribute(\"onclick\"))&&c.match(r))for(C.target={type:\"popup\",name:c[1]};t=p.exec(c[2]);)\"yes\"!=t[2]&&\"1\"!=t[2]||t[1]in{height:1,width:1,top:1,left:1}?\nisFinite(t[2])&&(C.target[t[1]]=t[2]):C.target[t[1]]=!0;var c={},A;for(A in u)(t=b.getAttribute(A))&&(c[u[A]]=t);if(A=b.data(\"cke-saved-name\")||c.advName)c.advName=A;CKEDITOR.tools.isEmpty(c)||(C.advanced=c)}return C},getLinkAttributes:function(c,d){var f=c.config.emailProtection||\"\",g={};switch(d.type){case \"url\":var f=d.url&&void 0!==d.url.protocol?d.url.protocol:\"http://\",h=d.url&&CKEDITOR.tools.trim(d.url.url)||\"\";g[\"data-cke-saved-href\"]=0===h.indexOf(\"/\")?h:f+h;break;case \"anchor\":f=d.anchor&&\nd.anchor.id;g[\"data-cke-saved-href\"]=\"#\"+(d.anchor&&d.anchor.name||f||\"\");break;case \"email\":var k=d.email,h=k.address;switch(f){case \"\":case \"encode\":var m=encodeURIComponent(k.subject||\"\"),l=encodeURIComponent(k.body||\"\"),k=[];m&&k.push(\"subject\\x3d\"+m);l&&k.push(\"body\\x3d\"+l);k=k.length?\"?\"+k.join(\"\\x26\"):\"\";\"encode\"==f?(f=[\"javascript:void(location.href\\x3d'mailto:'+\",e(h)],k&&f.push(\"+'\",a(k),\"'\"),f.push(\")\")):f=[\"mailto:\",h,k];break;default:f=h.split(\"@\",2),k.name=f[0],k.domain=f[1],f=[\"javascript:\",\nb(c,k)]}g[\"data-cke-saved-href\"]=f.join(\"\")}if(d.target)if(\"popup\"==d.target.type){for(var f=[\"window.open(this.href, '\",d.target.name||\"\",\"', '\"],n=\"resizable status location toolbar menubar fullscreen scrollbars dependent\".split(\" \"),h=n.length,m=function(a){d.target[a]&&n.push(a+\"\\x3d\"+d.target[a])},k=0;k<h;k++)n[k]+=d.target[n[k]]?\"\\x3dyes\":\"\\x3dno\";m(\"width\");m(\"left\");m(\"height\");m(\"top\");f.push(n.join(\",\"),\"'); return false;\");g[\"data-cke-pa-onclick\"]=f.join(\"\")}else\"notSet\"!=d.target.type&&\nd.target.name&&(g.target=d.target.name);if(d.advanced){for(var p in u)(f=d.advanced[u[p]])&&(g[p]=f);g.name&&(g[\"data-cke-saved-name\"]=g.name)}g[\"data-cke-saved-href\"]&&(g.href=g[\"data-cke-saved-href\"]);p={target:1,onclick:1,\"data-cke-pa-onclick\":1,\"data-cke-saved-name\":1};d.advanced&&CKEDITOR.tools.extend(p,u);for(var r in g)delete p[r];return{set:g,removed:CKEDITOR.tools.objectKeys(p)}}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(a){var b=new CKEDITOR.style({element:\"a\",\ntype:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});a.removeStyle(b)},refresh:function(a,b){var c=b.lastElement&&b.lastElement.getAscendant(\"a\",!0);c&&\"a\"==c.getName()&&c.getAttribute(\"href\")&&c.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1,requiredContent:\"a[href]\"};CKEDITOR.removeAnchorCommand=function(){};CKEDITOR.removeAnchorCommand.prototype={exec:function(a){var b=a.getSelection(),c=b.createBookmarks(),d;if(b&&\n(d=b.getSelectedElement())&&(d.getChildCount()?d.is(\"a\"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,d)))d.remove(1);else if(d=CKEDITOR.plugins.link.getSelectedLink(a))d.hasAttribute(\"href\")?(d.removeAttributes({name:1,\"data-cke-saved-name\":1}),d.removeClass(\"cke_anchor\")):d.remove(1);b.selectBookmarks(c)},requiredContent:\"a[name]\"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0})}(),\"use strict\",function(){function a(a,b,c){return n(b)&&n(c)&&c.equals(b.getNext(function(a){return!(ba(a)||\nX(a)||q(a))}))}function e(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function b(a){var b=a.element;if(b&&n(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var c=l(b);if(\"true\"==c.getAttribute(\"contenteditable\"))return b;if(c.is(a.triggers))return c}return null}function c(a,b,c){t(a,b);t(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function d(a,b,c){return b=b[c?\"getPrevious\":\"getNext\"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!ba(b)||\nn(b)&&!q(b)&&!g(a,b)})}function m(a,b,c){return a>b&&a<c}function l(a,b){if(a.data(\"cke-editable\"))return null;for(b||(a=a.getParent());a&&!a.data(\"cke-editable\");){if(a.hasAttribute(\"contenteditable\"))return a;a=a.getParent()}return null}function f(a){var b=a.doc,c=G('\\x3cspan contenteditable\\x3d\"false\" style\\x3d\"'+Q+\"position:absolute;border-top:1px dashed \"+a.boxColor+'\"\\x3e\\x3c/span\\x3e',b),d=CKEDITOR.getUrl(this.path+\"images/\"+(F.hidpi?\"hidpi/\":\"\")+\"icon\"+(a.rtl?\"-rtl\":\"\")+\".png\");A(c,{attach:function(){this.wrap.getParent()||\nthis.wrap.appendTo(a.editable,!0);return this},lineChildren:[A(G('\\x3cspan title\\x3d\"'+a.editor.lang.magicline.title+'\" contenteditable\\x3d\"false\"\\x3e\\x26#8629;\\x3c/span\\x3e',b),{base:Q+\"height:17px;width:17px;\"+(a.rtl?\"left\":\"right\")+\":17px;background:url(\"+d+\") center no-repeat \"+a.boxColor+\";cursor:pointer;\"+(F.hc?\"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;\":\"\")+(F.hidpi?\"background-size: 9px 10px;\":\"\"),looks:[\"top:-8px; border-radius: 2px;\",\"top:-17px; border-radius: 2px 2px 0px 0px;\",\n\"top:-1px; border-radius: 0px 0px 2px 2px;\"]}),A(G(V,b),{base:aa+\"left:0px;border-left-color:\"+a.boxColor+\";\",looks:[\"border-width:8px 0 8px 8px;top:-8px\",\"border-width:8px 0 0 8px;top:-8px\",\"border-width:0 0 8px 8px;top:0px\"]}),A(G(V,b),{base:aa+\"right:0px;border-right-color:\"+a.boxColor+\";\",looks:[\"border-width:8px 8px 8px 0;top:-8px\",\"border-width:8px 8px 0 0;top:-8px\",\"border-width:0 8px 8px 0;top:0px\"]})],detach:function(){this.wrap.getParent()&&this.wrap.remove();return this},mouseNear:function(){t(a,\nthis);var b=a.holdDistance,c=this.size;return c&&m(a.mouse.y,c.top-b,c.bottom+b)&&m(a.mouse.x,c.left-b,c.right+b)?!0:!1},place:function(){var b=a.view,c=a.editable,d=a.trigger,f=d.upper,e=d.lower,g=f||e,h=g.getParent(),k={};this.trigger=d;f&&t(a,f,!0);e&&t(a,e,!0);t(a,h,!0);a.inInlineMode&&y(a,!0);h.equals(c)?(k.left=b.scroll.x,k.right=-b.scroll.x,k.width=\"\"):(k.left=g.size.left-g.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=g.size.outerWidth+g.size.margin.left+\ng.size.margin.right+b.scroll.x,k.right=\"\");f&&e?k.top=f.size.margin.bottom===e.size.margin.top?0|f.size.bottom+f.size.margin.bottom/2:f.size.margin.bottom<e.size.margin.top?f.size.bottom+f.size.margin.bottom:f.size.bottom+f.size.margin.bottom-e.size.margin.top:f?e||(k.top=f.size.bottom+f.size.margin.bottom):k.top=e.size.top-e.size.margin.top;d.is(T)||m(k.top,b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(T)):d.is(O)||m(k.top,b.pane.bottom-5,b.pane.bottom+15)?(k.top=a.inInlineMode?\nb.editable.height+b.editable.padding.top+b.editable.padding.bottom:b.pane.bottom-1,this.look(O)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),this.look(Y));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);for(var l in k)k[l]=CKEDITOR.tools.cssLength(k[l]);this.setStyles(k)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute(\"style\",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new D(\"span\",\na.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);c.look(Y);c.appendTo(c.wrap);c.unselectable();c.lineChildren[0].on(\"mouseup\",function(b){c.detach();h(a,function(b){var c=a.line.trigger;b[c.is(E)?\"insertBefore\":\"insertAfter\"](c.is(E)?c.lower:c.upper)},!0);a.editor.focus();F.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});c.on(\"mousedown\",function(a){a.data.preventDefault(!0)});a.line=c}function h(a,b,c){var d=new CKEDITOR.dom.range(a.doc),\nf=a.editor,e;F.ie&&a.enterMode==CKEDITOR.ENTER_BR?e=a.doc.createText(M):(e=(e=l(a.element,!0))&&e.data(\"cke-enter-mode\")||a.enterMode,e=new D(K[e],a.doc),e.is(\"br\")||a.doc.createText(M).appendTo(e));c&&f.fire(\"saveSnapshot\");b(e);d.moveToPosition(e,CKEDITOR.POSITION_AFTER_START);f.getSelection().selectRanges([d]);a.hotNode=e;c&&f.fire(\"saveSnapshot\")}function k(a,c){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function f(b){var d=F.ie&&9>F.version?\" \":M,e=a.hotNode&&a.hotNode.getText()==d&&\na.element.equals(a.hotNode)&&a.lastCmdDirection===!!c;h(a,function(d){e&&a.hotNode&&a.hotNode.remove();d[c?\"insertAfter\":\"insertBefore\"](b);d.setAttributes({\"data-cke-magicline-hot\":1,\"data-cke-magicline-dir\":!!c});a.lastCmdDirection=!!c});F.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(e){e=e.getSelection().getStartElement();var g;e=e.getAscendant(L,1);if(!u(a,e)&&e&&!e.equals(a.editable)&&!e.contains(a.editable)){(g=l(e))&&\"false\"==g.getAttribute(\"contenteditable\")&&\n(e=g);a.element=e;g=d(a,e,!c);var h;n(g)&&g.is(a.triggers)&&g.is(J)&&(!d(a,g,!c)||(h=d(a,g,!c))&&n(h)&&h.is(a.triggers))?f(g):(h=b(a,e),n(h)&&(d(a,h,!c)?(e=d(a,h,!c))&&n(e)&&e.is(a.triggers)&&f(h):f(h)))}}}()}}function g(a,b){if(!b||b.type!=CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function q(a){if(!n(a))return!1;var b;(b=r(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle(\"float\")]&&\n!b[a.getAttribute(\"align\")])):b=!1);return b}function r(a){return!!{absolute:1,fixed:1}[a.getComputedStyle(\"position\")]}function p(a,b){return n(b)?b.is(a.triggers):null}function u(a,b){if(!b)return!1;for(var c=b.getParents(1),d=c.length;d--;)for(var f=a.tabuList.length;f--;)if(c[d].hasAttribute(a.tabuList[f]))return!0;return!1}function v(a,b,c){b=b[c?\"getLast\":\"getFirst\"](function(b){return a.isRelevant(b)&&!b.is(U)});if(!b)return!1;t(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function w(a){var b=\na.editable,c=a.mouse,d=a.view,f=a.triggerOffset;y(a);var h=c.y>(a.inInlineMode?d.editable.top+d.editable.height/2:Math.min(d.editable.height,d.pane.height)/2),b=b[h?\"getLast\":\"getFirst\"](function(a){return!(ba(a)||X(a))});if(!b)return null;g(a,b)&&(b=a.line.wrap[h?\"getPrevious\":\"getNext\"](function(a){return!(ba(a)||X(a))}));if(!n(b)||q(b)||!p(a,b))return null;t(a,b);return!h&&0<=b.size.top&&m(c.y,0,b.size.top+f)?(a=a.inInlineMode||0===d.scroll.y?T:Y,new e([null,b,E,P,a])):h&&b.size.bottom<=d.pane.height&&\nm(c.y,b.size.bottom-f,d.pane.height)?(a=a.inInlineMode||m(b.size.bottom,d.pane.height-f,d.pane.height)?O:Y,new e([b,null,N,P,a])):null}function z(a){var c=a.mouse,f=a.view,g=a.triggerOffset,h=b(a);if(!h)return null;t(a,h);var g=Math.min(g,0|h.size.outerHeight/2),k=[],l,r;if(m(c.y,h.size.top-1,h.size.top+g))r=!1;else if(m(c.y,h.size.bottom-g,h.size.bottom+1))r=!0;else return null;if(q(h)||v(a,h,r)||h.getParent().is(W))return null;var u=d(a,h,!r);if(u){if(u&&u.type==CKEDITOR.NODE_TEXT)return null;if(n(u)){if(q(u)||\n!p(a,u)||u.getParent().is(W))return null;k=[u,h][r?\"reverse\":\"concat\"]().concat([R,P])}}else h.equals(a.editable[r?\"getLast\":\"getFirst\"](a.isRelevant))?(y(a),r&&m(c.y,h.size.bottom-g,f.pane.height)&&m(h.size.bottom,f.pane.height-g,f.pane.height)?l=O:m(c.y,0,h.size.top+g)&&(l=T)):l=Y,k=[null,h][r?\"reverse\":\"concat\"]().concat([r?N:E,P,l,h.equals(a.editable[r?\"getLast\":\"getFirst\"](a.isRelevant))?r?O:T:Y]);return 0 in k?new e(k):null}function B(a,b,c,d){for(var f=b.getDocumentPosition(),e={},g={},h={},\nk={},m=ca.length;m--;)e[ca[m]]=parseInt(b.getComputedStyle.call(b,\"border-\"+ca[m]+\"-width\"),10)||0,h[ca[m]]=parseInt(b.getComputedStyle.call(b,\"padding-\"+ca[m]),10)||0,g[ca[m]]=parseInt(b.getComputedStyle.call(b,\"margin-\"+ca[m]),10)||0;c&&!d||C(a,d);k.top=f.y-(c?0:a.view.scroll.y);k.left=f.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+e.top+e.bottom);k.width=k.outerWidth-(h.left+h.right+e.left+e.right);k.bottom=k.top+k.outerHeight;\nk.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,left:b.$.scrollLeft});return A({border:e,padding:h,margin:g,ignoreScroll:c},k,!0)}function t(a,b,c){if(!n(b))return b.size=null;if(!b.size)b.size={};else if(b.size.ignoreScroll==c&&b.size.date>new Date-S)return null;return A(b.size,B(a,b,c),{date:+new Date},!0)}function y(a,b){a.view.editable=B(a,a.editable,b,!0)}function C(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-S)){var d=a.win,c=d.getScrollPosition(),\nd=d.getViewPaneSize();A(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},!0)}}function x(a,b,c,d){for(var f=d,g=d,h=0,k=!1,m=!1,l=a.view.pane.height,n=a.mouse;n.y+h<l&&0<n.y-h;){k||(k=b(f,d));m||(m=b(g,d));!k&&0<n.y-h&&(f=c(a,{x:n.x,y:n.y-h}));!m&&n.y+h<l&&(g=c(a,{x:n.x,y:n.y+h}));if(k&&m)break;h+=2}return new e([f,g,null,null])}CKEDITOR.plugins.add(\"magicline\",\n{init:function(a){var c=a.config,m=c.magicline_triggerOffset||30,l={editor:a,enterMode:c.enterMode,triggerOffset:m,holdDistance:0|m*(c.magicline_holdDistance||.5),boxColor:c.magicline_color||\"#ff0000\",rtl:\"rtl\"==c.contentsLangDirection,tabuList:[\"data-cke-hidden-sel\"].concat(c.magicline_tabuList||[]),triggers:c.magicline_everywhere?L:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},p,v,t;l.isRelevant=function(a){return n(a)&&!g(l,a)&&!q(a)};a.on(\"contentDom\",function(){var m=a.editable(),\nn=a.document,q=a.window;A(l,{editable:m,inInlineMode:m.isInline(),doc:n,win:q,hotNode:null},!0);l.boundary=l.inInlineMode?l.editable:l.doc.getDocumentElement();m.is(H.$inline)||(l.inInlineMode&&!r(m)&&m.setStyles({position:\"relative\",top:null,left:null}),f.call(this,l),C(l),m.attachListener(a,\"beforeUndoImage\",function(){l.line.detach()}),m.attachListener(a,\"beforeGetData\",function(){l.line.wrap.getParent()&&(l.line.detach(),a.once(\"getData\",function(){l.line.attach()},null,null,1E3))},null,null,\n0),m.attachListener(l.inInlineMode?n:n.getWindow().getFrame(),\"mouseout\",function(b){if(\"wysiwyg\"==a.mode)if(l.inInlineMode){var c=b.data.$.clientX;b=b.data.$.clientY;C(l);y(l,!0);var d=l.view.editable,f=l.view.scroll;c>d.left-f.x&&c<d.right-f.x&&b>d.top-f.y&&b<d.bottom-f.y||(clearTimeout(t),t=null,l.line.detach())}else clearTimeout(t),t=null,l.line.detach()}),m.attachListener(m,\"keyup\",function(){l.hiddenMode=0}),m.attachListener(m,\"keydown\",function(b){if(\"wysiwyg\"==a.mode)switch(b.data.getKeystroke()){case 2228240:case 16:l.hiddenMode=\n1,l.line.detach()}}),m.attachListener(l.inInlineMode?m:n,\"mousemove\",function(b){v=!0;if(\"wysiwyg\"==a.mode&&!a.readOnly&&!t){var c={x:b.data.$.clientX,y:b.data.$.clientY};t=setTimeout(function(){l.mouse=c;t=l.trigger=null;C(l);v&&!l.hiddenMode&&a.focusManager.hasFocus&&!l.line.mouseNear()&&(l.element=da(l,!0))&&((l.trigger=w(l)||z(l)||ea(l))&&!u(l,l.trigger.upper||l.trigger.lower)?l.line.attach().place():(l.trigger=null,l.line.detach()),v=!1)},30)}}),m.attachListener(q,\"scroll\",function(){\"wysiwyg\"==\na.mode&&(l.line.detach(),F.webkit&&(l.hiddenMode=1,clearTimeout(p),p=setTimeout(function(){l.mouseDown||(l.hiddenMode=0)},50)))}),m.attachListener(I?n:q,\"mousedown\",function(){\"wysiwyg\"==a.mode&&(l.line.detach(),l.hiddenMode=1,l.mouseDown=1)}),m.attachListener(I?n:q,\"mouseup\",function(){l.hiddenMode=0;l.mouseDown=0}),a.addCommand(\"accessPreviousSpace\",k(l)),a.addCommand(\"accessNextSpace\",k(l,!0)),a.setKeystroke([[c.magicline_keystrokePrevious,\"accessPreviousSpace\"],[c.magicline_keystrokeNext,\"accessNextSpace\"]]),\na.on(\"loadSnapshot\",function(){var b,c,d,f;for(f in{p:1,br:1,div:1})for(b=a.document.getElementsByTag(f),d=b.count();d--;)if((c=b.getItem(d)).data(\"cke-magicline-hot\")){l.hotNode=c;l.lastCmdDirection=\"true\"===c.data(\"cke-magicline-dir\")?!0:!1;return}}),this.backdoor={accessFocusSpace:h,boxTrigger:e,isLine:g,getAscendantTrigger:b,getNonEmptyNeighbour:d,getSize:B,that:l,triggerEdge:z,triggerEditable:w,triggerExpand:ea})},this)}});var A=CKEDITOR.tools.extend,D=CKEDITOR.dom.element,G=D.createFromHtml,\nF=CKEDITOR.env,I=CKEDITOR.env.ie&&9>CKEDITOR.env.version,H=CKEDITOR.dtd,K={},E=128,N=64,R=32,P=16,T=4,O=2,Y=1,M=\" \",W=H.$listItem,U=H.$tableContent,J=A({},H.$nonEditable,H.$empty),L=H.$block,S=100,Q=\"width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;\",aa=Q+\"border-color:transparent;display:block;border-style:solid;\",V=\"\\x3cspan\\x3e\"+M+\"\\x3c/span\\x3e\";K[CKEDITOR.ENTER_BR]=\"br\";K[CKEDITOR.ENTER_P]=\"p\";K[CKEDITOR.ENTER_DIV]=\n\"div\";e.prototype={set:function(a,b,c){this.properties=a+b+(c||Y);return this},is:function(a){return(this.properties&a)==a}};var da=function(){function a(b,c){var d=b.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(b,c,d){if(!b.mouse)return null;var f=b.doc,e=b.line.wrap;d=d||b.mouse;var h=a(f,d);c&&g(b,h)&&(e.hide(),h=a(f,d),e.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||F.ie&&9>F.version&&!b.boundary.equals(h)&&!b.boundary.contains(h)?\nnull:h}}(),ba=CKEDITOR.dom.walker.whitespaces(),X=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),ea=function(){function b(f){var e=f.element,g,h,k;if(!n(e)||e.contains(f.editable)||e.isReadOnly())return null;k=x(f,function(a,b){return!b.equals(a)},function(a,b){return da(a,!0,b)},e);g=k.upper;h=k.lower;if(a(f,g,h))return k.set(R,8);if(g&&e.contains(g))for(;!g.getParent().equals(e);)g=g.getParent();else g=e.getFirst(function(a){return d(f,a)});if(h&&e.contains(h))for(;!h.getParent().equals(e);)h=\nh.getParent();else h=e.getLast(function(a){return d(f,a)});if(!g||!h)return null;t(f,g);t(f,h);if(!m(f.mouse.y,g.size.top,h.size.bottom))return null;for(var e=Number.MAX_VALUE,l,p,r,u;h&&!h.equals(g)&&(p=g.getNext(f.isRelevant));)l=Math.abs(c(f,g,p)-f.mouse.y),l<e&&(e=l,r=g,u=p),g=p,t(f,g);if(!r||!u||!m(f.mouse.y,r.size.top,u.size.bottom))return null;k.upper=r;k.lower=u;return k.set(R,8)}function d(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||X(b)||q(b)||g(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&\nb.is(\"br\"))}return function(c){var d=b(c),f;if(f=d){f=d.upper;var e=d.lower;f=!f||!e||q(e)||q(f)||e.equals(f)||f.equals(e)||e.contains(f)||f.contains(e)?!1:p(c,f)&&p(c,e)&&a(c,f,e)?!0:!1}return f?d:null}}(),ca=[\"top\",\"left\",\"right\",\"bottom\"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function a(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||\"form\"!=a.getName())return[];for(var b=[],c=[\"style\",\n\"className\"],d=0;d<c.length;d++){var e=a.$.elements.namedItem(c[d]);e&&(e=new CKEDITOR.dom.element(e),b.push([e,e.nextSibling]),e.remove())}return b}function e(a,b){if(a&&a.type==CKEDITOR.NODE_ELEMENT&&\"form\"==a.getName()&&0<b.length)for(var c=b.length-1;0<=c;c--){var d=b[c][0],e=b[c][1];e?d.insertBefore(e):d.appendTo(a)}}function b(b,c){var d=a(b),h={},k=b.$;c||(h[\"class\"]=k.className||\"\",k.className=\"\");h.inline=k.style.cssText||\"\";c||(k.style.cssText=\"position: static; overflow: visible\");e(d);\nreturn h}function c(b,c){var d=a(b),h=b.$;\"class\"in c&&(h.className=c[\"class\"]);\"inline\"in c&&(h.style.cssText=c.inline);e(d)}function d(a){if(!a.editable().isInline()){var b=CKEDITOR.instances,c;for(c in b){var d=b[c];\"wysiwyg\"!=d.mode||d.readOnly||(d=d.document.getBody(),d.setAttribute(\"contentEditable\",!1),d.setAttribute(\"contentEditable\",!0))}a.editable().hasFocus&&(a.toolbox.focus(),a.focus())}}CKEDITOR.plugins.add(\"maximize\",{init:function(a){function e(){var b=k.getViewPaneSize();a.resize(b.width,\nb.height,null,!0)}if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var f=a.lang,h=CKEDITOR.document,k=h.getWindow(),g,n,q,r=CKEDITOR.TRISTATE_OFF;a.addCommand(\"maximize\",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var p=a.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass(\"cke_inner\")}),u=a.ui.space(\"contents\");if(\"wysiwyg\"==a.mode){var v=a.getSelection();g=v&&v.getRanges();n=k.getScrollPosition()}else{var w=a.editable().$;\ng=!CKEDITOR.env.ie&&[w.selectionStart,w.selectionEnd];n=[w.scrollLeft,w.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){k.on(\"resize\",e);q=k.getScrollPosition();for(v=a.container;v=v.getParent();)v.setCustomData(\"maximize_saved_styles\",b(v)),v.setStyle(\"z-index\",a.config.baseFloatZIndex-5);u.setCustomData(\"maximize_saved_styles\",b(u,!0));p.setCustomData(\"maximize_saved_styles\",b(p,!0));u={overflow:CKEDITOR.env.webkit?\"\":\"hidden\",width:0,height:0};h.getDocumentElement().setStyles(u);!CKEDITOR.env.gecko&&\nh.getDocumentElement().setStyle(\"position\",\"fixed\");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||h.getBody().setStyles(u);CKEDITOR.env.ie?setTimeout(function(){k.$.scrollTo(0,0)},0):k.$.scrollTo(0,0);p.setStyle(\"position\",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?\"fixed\":\"absolute\");p.$.offsetLeft;p.setStyles({\"z-index\":a.config.baseFloatZIndex-5,left:\"0px\",top:\"0px\"});p.addClass(\"cke_maximized\");e();u=p.getDocumentPosition();p.setStyles({left:-1*u.x+\"px\",top:-1*u.y+\"px\"});CKEDITOR.env.gecko&&d(a)}else if(this.state==\nCKEDITOR.TRISTATE_ON){k.removeListener(\"resize\",e);for(var v=[u,p],z=0;z<v.length;z++)c(v[z],v[z].getCustomData(\"maximize_saved_styles\")),v[z].removeCustomData(\"maximize_saved_styles\");for(v=a.container;v=v.getParent();)c(v,v.getCustomData(\"maximize_saved_styles\")),v.removeCustomData(\"maximize_saved_styles\");CKEDITOR.env.ie?setTimeout(function(){k.$.scrollTo(q.x,q.y)},0):k.$.scrollTo(q.x,q.y);p.removeClass(\"cke_maximized\");CKEDITOR.env.webkit&&(p.setStyle(\"display\",\"inline\"),setTimeout(function(){p.setStyle(\"display\",\n\"block\")},0));a.fire(\"resize\",{outerHeight:a.container.$.offsetHeight,contentsHeight:u.$.offsetHeight,outerWidth:a.container.$.offsetWidth})}this.toggleState();if(v=this.uiItems[0])u=this.state==CKEDITOR.TRISTATE_OFF?f.maximize.maximize:f.maximize.minimize,v=CKEDITOR.document.getById(v._.id),v.getChild(1).setHtml(u),v.setAttribute(\"title\",u),v.setAttribute(\"href\",'javascript:void(\"'+u+'\");');\"wysiwyg\"==a.mode?g?(CKEDITOR.env.gecko&&d(a),a.getSelection().selectRanges(g),(w=a.getSelection().getStartElement())&&\nw.scrollIntoView(!0)):k.$.scrollTo(n.x,n.y):(g&&(w.selectionStart=g[0],w.selectionEnd=g[1]),w.scrollLeft=n[0],w.scrollTop=n[1]);g=n=null;r=this.state;a.fire(\"maximize\",this.state)},canUndo:!1});a.ui.addButton&&a.ui.addButton(\"Maximize\",{label:f.maximize.maximize,command:\"maximize\",toolbar:\"tools,10\"});a.on(\"mode\",function(){var b=a.getCommand(\"maximize\");b.setState(b.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:r)},null,null,100)}}})}(),function(){function a(a,c,d){var e=CKEDITOR.cleanWord;\ne?d():(a=CKEDITOR.getUrl(a.config.pasteFromWordCleanupFile||c+\"filter/default.js\"),CKEDITOR.scriptLoader.load(a,d,null,!0));return!e}function e(a){a.data.type=\"html\"}CKEDITOR.plugins.add(\"pastefromword\",{requires:\"clipboard\",init:function(b){var c=0,d=this.path;b.addCommand(\"pastefromword\",{canUndo:!1,async:!0,exec:function(a){var b=this;c=1;a.once(\"beforePaste\",e);a.getClipboardData({title:a.lang.pastefromword.title},function(c){c&&a.fire(\"paste\",{type:\"html\",dataValue:c.dataValue,method:\"paste\",\ndataTransfer:CKEDITOR.plugins.clipboard.initPasteDataTransfer()});a.fire(\"afterCommandExec\",{name:\"pastefromword\",command:b,returnValue:!!c})})}});b.ui.addButton&&b.ui.addButton(\"PasteFromWord\",{label:b.lang.pastefromword.toolbar,command:\"pastefromword\",toolbar:\"clipboard,50\"});b.on(\"pasteState\",function(a){b.getCommand(\"pastefromword\").setState(a.data)});b.on(\"paste\",function(e){var l=e.data,f=l.dataValue;if(f&&(c||/(class=\\\"?Mso|style=\\\"[^\\\"]*\\bmso\\-|w:WordDocument)/.test(f))){l.dontFilter=!0;var h=\na(b,d,function(){if(h)b.fire(\"paste\",l);else if(!b.config.pasteFromWordPromptCleanup||c||confirm(b.lang.pastefromword.confirmCleanup))l.dataValue=CKEDITOR.cleanWord(f,b);c=0});h&&e.cancel()}},null,null,3)}})}(),function(){var a={canUndo:!1,async:!0,exec:function(e){e.getClipboardData({title:e.lang.pastetext.title},function(b){b&&e.fire(\"paste\",{type:\"text\",dataValue:b.dataValue,method:\"paste\",dataTransfer:CKEDITOR.plugins.clipboard.initPasteDataTransfer()});e.fire(\"afterCommandExec\",{name:\"pastetext\",\ncommand:a,returnValue:!!b})})}};CKEDITOR.plugins.add(\"pastetext\",{requires:\"clipboard\",init:function(e){e.addCommand(\"pastetext\",a);e.ui.addButton&&e.ui.addButton(\"PasteText\",{label:e.lang.pastetext.button,command:\"pastetext\",toolbar:\"clipboard,40\"});if(e.config.forcePasteAsPlainText)e.on(\"beforePaste\",function(a){\"html\"!=a.data.type&&(a.data.type=\"text\")});e.on(\"pasteState\",function(a){e.getCommand(\"pastetext\").setState(a.data)})}})}(),CKEDITOR.plugins.add(\"removeformat\",{init:function(a){a.addCommand(\"removeFormat\",\nCKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton&&a.ui.addButton(\"RemoveFormat\",{label:a.lang.removeformat.toolbar,command:\"removeFormat\",toolbar:\"cleanup,10\"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){for(var e=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp(\"^(?:\"+a.config.removeFormatTags.replace(/,/g,\"|\")+\")$\",\"i\")),b=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(\",\")),c=CKEDITOR.plugins.removeformat.filter,\nd=a.getSelection().getRanges(),m=d.createIterator(),l=function(a){return a.type==CKEDITOR.NODE_ELEMENT},f;f=m.getNextRange();){f.collapsed||f.enlarge(CKEDITOR.ENLARGE_ELEMENT);var h=f.createBookmark(),k=h.startNode,g=h.endNode,n=function(b){for(var d=a.elementPath(b),f=d.elements,g=1,h;(h=f[g])&&!h.equals(d.block)&&!h.equals(d.blockLimit);g++)e.test(h.getName())&&c(a,h)&&b.breakParent(h)};n(k);if(g)for(n(g),k=k.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);k&&!k.equals(g);)if(k.isReadOnly()){if(k.getPosition(g)&\nCKEDITOR.POSITION_CONTAINS)break;k=k.getNext(l)}else n=k.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),\"img\"==k.getName()&&k.data(\"cke-realelement\")||!c(a,k)||(e.test(k.getName())?k.remove(1):(k.removeAttributes(b),a.fire(\"removeFormatCleanup\",k))),k=n;f.moveToBookmark(h)}a.forceNextSelectionCheck();a.getSelection().selectRanges(d)}}},filter:function(a,e){for(var b=a._.removeFormatFilters||[],c=0;c<b.length;c++)if(!1===b[c](e))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){this._.removeFormatFilters||\n(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(a)},CKEDITOR.config.removeFormatTags=\"b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var\",CKEDITOR.config.removeFormatAttributes=\"class,style,lang,width,height,align,hspace,valign\",CKEDITOR.plugins.add(\"resize\",{init:function(a){function e(b){var d=h.width,e=h.height,l=d+(b.data.$.screenX-f.x)*(\"rtl\"==m?-1:1);b=e+(b.data.$.screenY-f.y);k&&(d=Math.max(c.resize_minWidth,Math.min(l,c.resize_maxWidth)));\ng&&(e=Math.max(c.resize_minHeight,Math.min(b,c.resize_maxHeight)));a.resize(k?d:null,e)}function b(){CKEDITOR.document.removeListener(\"mousemove\",e);CKEDITOR.document.removeListener(\"mouseup\",b);a.document&&(a.document.removeListener(\"mousemove\",e),a.document.removeListener(\"mouseup\",b))}var c=a.config,d=a.ui.spaceId(\"resizer\"),m=a.element?a.element.getDirection(1):\"ltr\";!c.resize_dir&&(c.resize_dir=\"vertical\");void 0===c.resize_maxWidth&&(c.resize_maxWidth=3E3);void 0===c.resize_maxHeight&&(c.resize_maxHeight=\n3E3);void 0===c.resize_minWidth&&(c.resize_minWidth=750);void 0===c.resize_minHeight&&(c.resize_minHeight=250);if(!1!==c.resize_enabled){var l=null,f,h,k=(\"both\"==c.resize_dir||\"horizontal\"==c.resize_dir)&&c.resize_minWidth!=c.resize_maxWidth,g=(\"both\"==c.resize_dir||\"vertical\"==c.resize_dir)&&c.resize_minHeight!=c.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(d){l||(l=a.getResizable());h={width:l.$.offsetWidth||0,height:l.$.offsetHeight||0};f={x:d.screenX,y:d.screenY};c.resize_minWidth>\nh.width&&(c.resize_minWidth=h.width);c.resize_minHeight>h.height&&(c.resize_minHeight=h.height);CKEDITOR.document.on(\"mousemove\",e);CKEDITOR.document.on(\"mouseup\",b);a.document&&(a.document.on(\"mousemove\",e),a.document.on(\"mouseup\",b));d.preventDefault&&d.preventDefault()});a.on(\"destroy\",function(){CKEDITOR.tools.removeFunction(n)});a.on(\"uiSpace\",function(b){if(\"bottom\"==b.data.space){var c=\"\";k&&!g&&(c=\" cke_resizer_horizontal\");!k&&g&&(c=\" cke_resizer_vertical\");var f='\\x3cspan id\\x3d\"'+d+'\" class\\x3d\"cke_resizer'+\nc+\" cke_resizer_\"+m+'\" title\\x3d\"'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'\" onmousedown\\x3d\"CKEDITOR.tools.callFunction('+n+', event)\"\\x3e'+(\"ltr\"==m?\"â—¢\":\"â—£\")+\"\\x3c/span\\x3e\";\"ltr\"==m&&\"ltr\"==c?b.data.html+=f:b.data.html=f+b.data.html}},a,null,100);a.on(\"maximize\",function(b){a.ui.space(\"resizer\")[b.data==CKEDITOR.TRISTATE_ON?\"hide\":\"show\"]()})}}}),CKEDITOR.plugins.add(\"menubutton\",{requires:\"button,menu\",onLoad:function(){var a=function(a){var b=this._,c=b.menu;b.state!==CKEDITOR.TRISTATE_DISABLED&&\n(b.on&&c?c.hide():(b.previousState=b.state,c||(c=b.menu=new CKEDITOR.menu(a,{panel:{className:\"cke_menu_panel\",attributes:{\"aria-label\":a.lang.common.options}}}),c.onHide=CKEDITOR.tools.bind(function(){var c=this.command?a.getCommand(this.command).modes:this.modes;this.setState(!c||c[a.mode]?b.previousState:CKEDITOR.TRISTATE_DISABLED);b.on=0},this),this.onMenu&&c.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),b.on=1,setTimeout(function(){c.show(CKEDITOR.document.getById(b.id),4)},0)))};\nCKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(e){delete e.panel;this.base(e);this.hasArrow=!0;this.click=a},statics:{handler:{create:function(a){return new CKEDITOR.ui.menuButton(a)}}}})},beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON=\"menubutton\",\"use strict\",CKEDITOR.plugins.add(\"scayt\",{requires:\"menubutton,dialog\",tabToOpen:null,dialogName:\"scaytDialog\",init:function(a){var e=this,\nb=CKEDITOR.plugins.scayt;this.bindEvents(a);this.parseConfig(a);this.addRule(a);CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+\"dialogs/options.js\"));this.addMenuItems(a);var c=a.lang.scayt,d=CKEDITOR.env;a.ui.add(\"Scayt\",CKEDITOR.UI_MENUBUTTON,{label:c.text_title,title:a.plugins.wsc?a.lang.wsc.title:c.text_title,modes:{wysiwyg:!(d.ie&&(8>d.version||d.quirks))},toolbar:\"spellchecker,20\",refresh:function(){var c=a.ui.instances.Scayt.getState();a.scayt&&(c=b.state.scayt[a.name]?CKEDITOR.TRISTATE_ON:\nCKEDITOR.TRISTATE_OFF);a.fire(\"scaytButtonState\",c)},onRender:function(){var b=this;a.on(\"scaytButtonState\",function(a){void 0!==typeof a.data&&b.setState(a.data)})},onMenu:function(){var c=a.scayt;a.getMenuItem(\"scaytToggle\").label=a.lang.scayt[c&&b.state.scayt[a.name]?\"btn_disable\":\"btn_enable\"];c={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,\nscaytAbout:c?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:a.plugins.wsc?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};a.config.scayt_uiTabs[0]||delete c.scaytOptions;a.config.scayt_uiTabs[1]||delete c.scaytLangs;a.config.scayt_uiTabs[2]||delete c.scaytDict;return c}});a.contextMenu&&a.addMenuItems&&(a.contextMenu.addListener(function(b,c){var d=a.scayt,h,k;d&&(k=d.getSelectionNode())&&(h=e.menuGenerator(a,k),d.showBanner(\".\"+a.contextMenu._.definition.panel.className.split(\" \").join(\" .\")));\nreturn h}),a.contextMenu._.onHide=CKEDITOR.tools.override(a.contextMenu._.onHide,function(b){return function(){var c=a.scayt;c&&c.hideBanner();return b.apply(this)}}))},addMenuItems:function(a){var e=this,b=CKEDITOR.plugins.scayt;a.addMenuGroup(\"scaytButton\");for(var c=a.config.scayt_contextMenuItemsOrder.split(\"|\"),d=0;d<c.length;d++)c[d]=\"scayt_\"+c[d];if((c=[\"grayt_description\",\"grayt_suggest\",\"grayt_control\"].concat(c))&&c.length)for(d=0;d<c.length;d++)a.addMenuGroup(c[d],d-10);a.addCommand(\"scaytToggle\",\n{exec:function(a){var c=a.scayt;b.state.scayt[a.name]=!b.state.scayt[a.name];!0===b.state.scayt[a.name]?c||b.createScayt(a):c&&b.destroy(a)}});a.addCommand(\"scaytAbout\",{exec:function(a){a.scayt.tabToOpen=\"about\";a.lockSelection();a.openDialog(e.dialogName)}});a.addCommand(\"scaytOptions\",{exec:function(a){a.scayt.tabToOpen=\"options\";a.lockSelection();a.openDialog(e.dialogName)}});a.addCommand(\"scaytLangs\",{exec:function(a){a.scayt.tabToOpen=\"langs\";a.lockSelection();a.openDialog(e.dialogName)}});\na.addCommand(\"scaytDict\",{exec:function(a){a.scayt.tabToOpen=\"dictionaries\";a.lockSelection();a.openDialog(e.dialogName)}});c={scaytToggle:{label:a.lang.scayt.btn_enable,group:\"scaytButton\",command:\"scaytToggle\"},scaytAbout:{label:a.lang.scayt.btn_about,group:\"scaytButton\",command:\"scaytAbout\"},scaytOptions:{label:a.lang.scayt.btn_options,group:\"scaytButton\",command:\"scaytOptions\"},scaytLangs:{label:a.lang.scayt.btn_langs,group:\"scaytButton\",command:\"scaytLangs\"},scaytDict:{label:a.lang.scayt.btn_dictionaries,\ngroup:\"scaytButton\",command:\"scaytDict\"}};a.plugins.wsc&&(c.WSC={label:a.lang.wsc.toolbar,group:\"scaytButton\",onClick:function(){var b=CKEDITOR.plugins.scayt,c=a.scayt,d=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.container.getText():a.document.getBody().getText();(d=d.replace(/\\s/g,\"\"))?(c&&b.state.scayt[a.name]&&c.setMarkupPaused&&c.setMarkupPaused(!0),a.lockSelection(),a.execCommand(\"checkspell\")):alert(\"Nothing to check!\")}});a.addMenuItems(c)},bindEvents:function(a){var e=CKEDITOR.plugins.scayt,\nb=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE,c=function(){e.destroy(a)},d=function(){!e.state.scayt[a.name]||a.readOnly||a.scayt||e.createScayt(a)},m=function(){var c=a.editable();c.attachListener(c,\"focus\",function(c){CKEDITOR.plugins.scayt&&!a.scayt&&setTimeout(d,0);c=CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[a.name]&&a.scayt;var f,e;if((b||c)&&a._.savedSelection){c=a._.savedSelection.getSelectedElement();c=!c&&a._.savedSelection.getRanges();for(var l=0;l<c.length;l++)e=c[l],\"string\"===\ntypeof e.startContainer.$.nodeValue&&(f=e.startContainer.getText().length,(f<e.startOffset||f<e.endOffset)&&a.unlockSelection(!1))}},this,null,-10)},l=function(){b?a.config.scayt_inlineModeImmediateMarkup?d():(a.on(\"blur\",function(){setTimeout(c,0)}),a.on(\"focus\",d),a.focusManager.hasFocus&&d()):d();m();var f=a.editable();f.attachListener(f,\"mousedown\",function(b){b=b.data.getTarget();var c=a.widgets&&a.widgets.getByElement(b);c&&(c.wrapper=b.getAscendant(function(a){return a.hasAttribute(\"data-cke-widget-wrapper\")},\n!0))},this,null,-10)};a.on(\"contentDom\",l);a.on(\"beforeCommandExec\",function(b){var c=a.scayt,d=null,g=!1,l=!0;b.data.name in e.options.disablingCommandExec&&\"wysiwyg\"==a.mode?c&&(e.destroy(a),a.fire(\"scaytButtonState\",CKEDITOR.TRISTATE_DISABLED)):\"bold\"!==b.data.name&&\"italic\"!==b.data.name&&\"underline\"!==b.data.name&&\"strike\"!==b.data.name&&\"subscript\"!==b.data.name&&\"superscript\"!==b.data.name&&\"enter\"!==b.data.name&&\"cut\"!==b.data.name&&\"language\"!==b.data.name||!c||(\"cut\"===b.data.name&&(l=!1,\ng=!0),\"language\"===b.data.name&&(d=(d=a.plugins.language.getCurrentLangElement(a))&&d.$,g=!0),a.fire(\"reloadMarkupScayt\",{removeOptions:{removeInside:l,forceBookmark:g,selectionNode:d},timeout:0}))});a.on(\"beforeSetMode\",function(b){if(\"source\"==b.data){if(b=a.scayt)e.destroy(a),a.fire(\"scaytButtonState\",CKEDITOR.TRISTATE_DISABLED);a.document&&a.document.getBody().removeAttribute(\"_jquid\")}});a.on(\"afterCommandExec\",function(b){\"wysiwyg\"!=a.mode||\"undo\"!=b.data.name&&\"redo\"!=b.data.name||setTimeout(function(){var b=\na.scayt,c=b&&b.getScaytLangList();c&&c.ltr&&c.rtl&&b.fire(\"startSpellCheck, startGrammarCheck\")},250)});a.on(\"readOnly\",function(b){var c;b&&(c=a.scayt,!0===b.editor.readOnly?c&&c.fire(\"removeMarkupInDocument\",{}):c?c.fire(\"startSpellCheck, startGrammarCheck\"):\"wysiwyg\"==b.editor.mode&&!0===e.state.scayt[b.editor.name]&&(e.createScayt(a),b.editor.fire(\"scaytButtonState\",CKEDITOR.TRISTATE_ON)))});a.on(\"beforeDestroy\",c);a.on(\"setData\",function(){c();(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE||a.plugins.divarea)&&\nl()},this,null,50);a.on(\"reloadMarkupScayt\",function(b){var c=b.data&&b.data.removeOptions;setTimeout(function(){var b=a.scayt,d=b&&b.getScaytLangList();d&&d.ltr&&d.rtl&&(a.document.fire(\"keydown\",new CKEDITOR.dom.event({keyCode:37})),b.removeMarkupInSelectionNode(c),b.fire(\"startSpellCheck, startGrammarCheck\"))},b.data&&b.data.timeout||0)});a.on(\"insertElement\",function(){a.fire(\"reloadMarkupScayt\",{removeOptions:{forceBookmark:!0}})},this,null,50);a.on(\"insertHtml\",function(){a.fire(\"reloadMarkupScayt\")},\nthis,null,50);a.on(\"insertText\",function(){a.fire(\"reloadMarkupScayt\")},this,null,50);a.on(\"scaytDialogShown\",function(b){b.data.selectPage(a.scayt.tabToOpen)})},parseConfig:function(a){var e=CKEDITOR.plugins.scayt;e.replaceOldOptionsNames(a.config);\"boolean\"!==typeof a.config.scayt_autoStartup&&(a.config.scayt_autoStartup=!1);e.state.scayt[a.name]=a.config.scayt_autoStartup;\"boolean\"!==typeof a.config.grayt_autoStartup&&(a.config.grayt_autoStartup=!1);\"boolean\"!==typeof a.config.scayt_inlineModeImmediateMarkup&&\n(a.config.scayt_inlineModeImmediateMarkup=!1);e.state.grayt[a.name]=a.config.grayt_autoStartup;a.config.scayt_contextCommands||(a.config.scayt_contextCommands=\"ignore|ignoreall|add\");a.config.scayt_contextMenuItemsOrder||(a.config.scayt_contextMenuItemsOrder=\"suggest|moresuggest|control\");a.config.scayt_sLang||(a.config.scayt_sLang=\"en_US\");if(void 0===a.config.scayt_maxSuggestions||\"number\"!=typeof a.config.scayt_maxSuggestions||0>a.config.scayt_maxSuggestions)a.config.scayt_maxSuggestions=5;if(void 0===\na.config.scayt_minWordLength||\"number\"!=typeof a.config.scayt_minWordLength||1>a.config.scayt_minWordLength)a.config.scayt_minWordLength=4;if(void 0===a.config.scayt_customDictionaryIds||\"string\"!==typeof a.config.scayt_customDictionaryIds)a.config.scayt_customDictionaryIds=\"\";if(void 0===a.config.scayt_userDictionaryName||\"string\"!==typeof a.config.scayt_userDictionaryName)a.config.scayt_userDictionaryName=null;if(\"string\"===typeof a.config.scayt_uiTabs&&3===a.config.scayt_uiTabs.split(\",\").length){var b=\n[],c=[];a.config.scayt_uiTabs=a.config.scayt_uiTabs.split(\",\");CKEDITOR.tools.search(a.config.scayt_uiTabs,function(a){1===Number(a)||0===Number(a)?(c.push(!0),b.push(Number(a))):c.push(!1)});null===CKEDITOR.tools.search(c,!1)?a.config.scayt_uiTabs=b:a.config.scayt_uiTabs=[1,1,1]}else a.config.scayt_uiTabs=[1,1,1];\"string\"!=typeof a.config.scayt_serviceProtocol&&(a.config.scayt_serviceProtocol=null);\"string\"!=typeof a.config.scayt_serviceHost&&(a.config.scayt_serviceHost=null);\"string\"!=typeof a.config.scayt_servicePort&&\n(a.config.scayt_servicePort=null);\"string\"!=typeof a.config.scayt_servicePath&&(a.config.scayt_servicePath=null);a.config.scayt_moreSuggestions||(a.config.scayt_moreSuggestions=\"on\");\"string\"!==typeof a.config.scayt_customerId&&(a.config.scayt_customerId=\"1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2\");\"string\"!==typeof a.config.scayt_srcUrl&&(e=document.location.protocol,e=-1!=e.search(/https?:/)?e:\"http:\",a.config.scayt_srcUrl=e+\"//svc.webspellchecker.net/spellcheck31/lf/scayt3/ckscayt/ckscayt.js\");\n\"boolean\"!==typeof CKEDITOR.config.scayt_handleCheckDirty&&(CKEDITOR.config.scayt_handleCheckDirty=!0);\"boolean\"!==typeof CKEDITOR.config.scayt_handleUndoRedo&&(CKEDITOR.config.scayt_handleUndoRedo=!0);CKEDITOR.config.scayt_handleUndoRedo=CKEDITOR.plugins.undo?CKEDITOR.config.scayt_handleUndoRedo:!1;\"boolean\"!==typeof a.config.scayt_multiLanguageMode&&(a.config.scayt_multiLanguageMode=!1);\"object\"!==typeof a.config.scayt_multiLanguageStyles&&(a.config.scayt_multiLanguageStyles={});a.config.scayt_ignoreAllCapsWords&&\n\"boolean\"!==typeof a.config.scayt_ignoreAllCapsWords&&(a.config.scayt_ignoreAllCapsWords=!1);a.config.scayt_ignoreDomainNames&&\"boolean\"!==typeof a.config.scayt_ignoreDomainNames&&(a.config.scayt_ignoreDomainNames=!1);a.config.scayt_ignoreWordsWithMixedCases&&\"boolean\"!==typeof a.config.scayt_ignoreWordsWithMixedCases&&(a.config.scayt_ignoreWordsWithMixedCases=!1);a.config.scayt_ignoreWordsWithNumbers&&\"boolean\"!==typeof a.config.scayt_ignoreWordsWithNumbers&&(a.config.scayt_ignoreWordsWithNumbers=\n!1);if(a.config.scayt_disableOptionsStorage){var e=CKEDITOR.tools.isArray(a.config.scayt_disableOptionsStorage)?a.config.scayt_disableOptionsStorage:\"string\"===typeof a.config.scayt_disableOptionsStorage?[a.config.scayt_disableOptionsStorage]:void 0,d=\"all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers\".split(\" \"),m=[\"lang\",\"ignore-all-caps-words\",\"ignore-domain-names\",\"ignore-words-with-mixed-cases\",\"ignore-words-with-numbers\"],l=CKEDITOR.tools.search,\nf=CKEDITOR.tools.indexOf;a.config.scayt_disableOptionsStorage=function(a){for(var b=[],c=0;c<a.length;c++){var e=a[c],q=!!l(a,\"options\");if(!l(d,e)||q&&l(m,function(a){if(\"lang\"===a)return!1}))return;l(m,e)&&m.splice(f(m,e),1);if(\"all\"===e||q&&l(a,\"lang\"))return[];\"options\"===e&&(m=[\"lang\"])}return b=b.concat(m)}(e)}},addRule:function(a){var e=CKEDITOR.plugins.scayt,b=a.dataProcessor,c=b&&b.htmlFilter,d=a._.elementsPath&&a._.elementsPath.filters,b=b&&b.dataFilter,m=a.addRemoveFormatFilter,l=function(b){if(a.scayt&&\n(b.hasAttribute(e.options.data_attribute_name)||b.hasAttribute(e.options.problem_grammar_data_attribute)))return!1},f=function(b){var c=!0;a.scayt&&(b.hasAttribute(e.options.data_attribute_name)||b.hasAttribute(e.options.problem_grammar_data_attribute))&&(c=!1);return c};d&&d.push(l);b&&b.addRules({elements:{span:function(a){var b=a.hasClass(e.options.misspelled_word_class)&&a.attributes[e.options.data_attribute_name],c=a.hasClass(e.options.problem_grammar_class)&&a.attributes[e.options.problem_grammar_data_attribute];\ne&&(b||c)&&delete a.name;return a}}});c&&c.addRules({elements:{span:function(a){var b=a.hasClass(e.options.misspelled_word_class)&&a.attributes[e.options.data_attribute_name],c=a.hasClass(e.options.problem_grammar_class)&&a.attributes[e.options.problem_grammar_data_attribute];e&&(b||c)&&delete a.name;return a}}});m&&m.call(a,f)},scaytMenuDefinition:function(a){var e=this;a=a.scayt;return{scayt:{scayt_ignore:{label:a.getLocal(\"btn_ignore\"),group:\"scayt_control\",order:1,exec:function(a){a.scayt.ignoreWord()}},\nscayt_ignoreall:{label:a.getLocal(\"btn_ignoreAll\"),group:\"scayt_control\",order:2,exec:function(a){a.scayt.ignoreAllWords()}},scayt_add:{label:a.getLocal(\"btn_addWord\"),group:\"scayt_control\",order:3,exec:function(a){var c=a.scayt;setTimeout(function(){c.addWordToUserDictionary()},10)}},scayt_option:{label:a.getLocal(\"btn_options\"),group:\"scayt_control\",order:4,exec:function(a){a.scayt.tabToOpen=\"options\";a.lockSelection();a.openDialog(e.dialogName)},verification:function(a){return 1==a.config.scayt_uiTabs[0]?\n!0:!1}},scayt_language:{label:a.getLocal(\"btn_langs\"),group:\"scayt_control\",order:5,exec:function(a){a.scayt.tabToOpen=\"langs\";a.lockSelection();a.openDialog(e.dialogName)},verification:function(a){return 1==a.config.scayt_uiTabs[1]?!0:!1}},scayt_dictionary:{label:a.getLocal(\"btn_dictionaries\"),group:\"scayt_control\",order:6,exec:function(a){a.scayt.tabToOpen=\"dictionaries\";a.lockSelection();a.openDialog(e.dialogName)},verification:function(a){return 1==a.config.scayt_uiTabs[2]?!0:!1}},scayt_about:{label:a.getLocal(\"btn_about\"),\ngroup:\"scayt_control\",order:7,exec:function(a){a.scayt.tabToOpen=\"about\";a.lockSelection();a.openDialog(e.dialogName)}}},grayt:{grayt_problemdescription:{label:\"Grammar problem description\",group:\"grayt_description\",order:1,state:CKEDITOR.TRISTATE_DISABLED,exec:function(a){}},grayt_ignore:{label:a.getLocal(\"btn_ignore\"),group:\"grayt_control\",order:2,exec:function(a){a.scayt.ignorePhrase()}}}}},buildSuggestionMenuItems:function(a,e,b){var c={},d={},m=b?\"word\":\"phrase\",l=b?\"startGrammarCheck\":\"startSpellCheck\",\nf=a.scayt;if(0<e.length&&\"no_any_suggestions\"!==e[0])if(b)for(b=0;b<e.length;b++){var h=\"scayt_suggest_\"+CKEDITOR.plugins.scayt.suggestions[b].replace(\" \",\"_\");a.addCommand(h,this.createCommand(CKEDITOR.plugins.scayt.suggestions[b],m,l));b<a.config.scayt_maxSuggestions?(a.addMenuItem(h,{label:e[b],command:h,group:\"scayt_suggest\",order:b+1}),c[h]=CKEDITOR.TRISTATE_OFF):(a.addMenuItem(h,{label:e[b],command:h,group:\"scayt_moresuggest\",order:b+1}),d[h]=CKEDITOR.TRISTATE_OFF,\"on\"===a.config.scayt_moreSuggestions&&\n(a.addMenuItem(\"scayt_moresuggest\",{label:f.getLocal(\"btn_moreSuggestions\"),group:\"scayt_moresuggest\",order:10,getItems:function(){return d}}),c.scayt_moresuggest=CKEDITOR.TRISTATE_OFF))}else for(b=0;b<e.length;b++)h=\"grayt_suggest_\"+CKEDITOR.plugins.scayt.suggestions[b].replace(\" \",\"_\"),a.addCommand(h,this.createCommand(CKEDITOR.plugins.scayt.suggestions[b],m,l)),a.addMenuItem(h,{label:e[b],command:h,group:\"grayt_suggest\",order:b+1}),c[h]=CKEDITOR.TRISTATE_OFF;else c.no_scayt_suggest=CKEDITOR.TRISTATE_DISABLED,\na.addCommand(\"no_scayt_suggest\",{exec:function(){}}),a.addMenuItem(\"no_scayt_suggest\",{label:f.getLocal(\"btn_noSuggestions\")||\"no_scayt_suggest\",command:\"no_scayt_suggest\",group:\"scayt_suggest\",order:0});return c},menuGenerator:function(a,e){var b=a.scayt,c=this.scaytMenuDefinition(a),d={},m=a.config.scayt_contextCommands.split(\"|\"),l=e.getAttribute(b.getLangAttribute())||b.getLang(),f,h;f=b.isScaytNode(e);h=b.isGraytNode(e);f?(c=c.scayt,d=e.getAttribute(b.getScaytNodeAttributeName()),b.fire(\"getSuggestionsList\",\n{lang:l,word:d}),d=this.buildSuggestionMenuItems(a,CKEDITOR.plugins.scayt.suggestions,f)):h&&(c=c.grayt,d=e.getAttribute(b.getGraytNodeAttributeName()),h=b.getProblemDescriptionText(d,l),c.grayt_problemdescription&&h&&(c.grayt_problemdescription.label=h),b.fire(\"getGrammarSuggestionsList\",{lang:l,phrase:d}),d=this.buildSuggestionMenuItems(a,CKEDITOR.plugins.scayt.suggestions,f));if(f&&\"off\"==a.config.scayt_contextCommands)return d;for(var k in c)f&&-1==CKEDITOR.tools.indexOf(m,k.replace(\"scayt_\",\n\"\"))&&\"all\"!=a.config.scayt_contextCommands||(d[k]=\"undefined\"!=typeof c[k].state?c[k].state:CKEDITOR.TRISTATE_OFF,\"function\"!==typeof c[k].verification||c[k].verification(a)||delete d[k],a.addCommand(k,{exec:c[k].exec}),a.addMenuItem(k,{label:a.lang.scayt[c[k].label]||c[k].label,command:k,group:c[k].group,order:c[k].order}));return d},createCommand:function(a,e,b){return{exec:function(c){c=c.scayt;var d={};d[e]=a;c.replaceSelectionNode(d);\"startGrammarCheck\"===b&&c.removeMarkupInSelectionNode({grammarOnly:!0});\nc.fire(b)}}}}),CKEDITOR.plugins.scayt={state:{scayt:{},grayt:{}},suggestions:[],loadingHelper:{loadOrder:[]},isLoading:!1,options:{disablingCommandExec:{source:!0,newpage:!0,templates:!0},data_attribute_name:\"data-scayt-word\",misspelled_word_class:\"scayt-misspell-word\",problem_grammar_data_attribute:\"data-grayt-phrase\",problem_grammar_class:\"gramm-problem\"},backCompatibilityMap:{scayt_service_protocol:\"scayt_serviceProtocol\",scayt_service_host:\"scayt_serviceHost\",scayt_service_port:\"scayt_servicePort\",\nscayt_service_path:\"scayt_servicePath\",scayt_customerid:\"scayt_customerId\"},replaceOldOptionsNames:function(a){for(var e in a)e in this.backCompatibilityMap&&(a[this.backCompatibilityMap[e]]=a[e],delete a[e])},createScayt:function(a){var e=this,b=CKEDITOR.plugins.scayt;this.loadScaytLibrary(a,function(a){var d=a.window&&a.window.getFrame()||a.editable();d?(d={lang:a.config.scayt_sLang,container:d.$,customDictionary:a.config.scayt_customDictionaryIds,userDictionaryName:a.config.scayt_userDictionaryName,\nlocalization:a.langCode,customer_id:a.config.scayt_customerId,debug:a.config.scayt_debug,data_attribute_name:e.options.data_attribute_name,misspelled_word_class:e.options.misspelled_word_class,problem_grammar_data_attribute:e.options.problem_grammar_data_attribute,problem_grammar_class:e.options.problem_grammar_class,\"options-to-restore\":a.config.scayt_disableOptionsStorage,focused:a.editable().hasFocus,ignoreElementsRegex:a.config.scayt_elementsToIgnore,minWordLength:a.config.scayt_minWordLength,\nmultiLanguageMode:a.config.scayt_multiLanguageMode,multiLanguageStyles:a.config.scayt_multiLanguageStyles,graytAutoStartup:b.state.grayt[a.name]},a.config.scayt_serviceProtocol&&(d.service_protocol=a.config.scayt_serviceProtocol),a.config.scayt_serviceHost&&(d.service_host=a.config.scayt_serviceHost),a.config.scayt_servicePort&&(d.service_port=a.config.scayt_servicePort),a.config.scayt_servicePath&&(d.service_path=a.config.scayt_servicePath),\"boolean\"===typeof a.config.scayt_ignoreAllCapsWords&&(d[\"ignore-all-caps-words\"]=\na.config.scayt_ignoreAllCapsWords),\"boolean\"===typeof a.config.scayt_ignoreDomainNames&&(d[\"ignore-domain-names\"]=a.config.scayt_ignoreDomainNames),\"boolean\"===typeof a.config.scayt_ignoreWordsWithMixedCases&&(d[\"ignore-words-with-mixed-cases\"]=a.config.scayt_ignoreWordsWithMixedCases),\"boolean\"===typeof a.config.scayt_ignoreWordsWithNumbers&&(d[\"ignore-words-with-numbers\"]=a.config.scayt_ignoreWordsWithNumbers),d=new SCAYT.CKSCAYT(d,function(){},function(){}),d.subscribe(\"suggestionListSend\",function(a){for(var b=\n{},c=[],d=0;d<a.suggestionList.length;d++)b[\"word_\"+a.suggestionList[d]]||(b[\"word_\"+a.suggestionList[d]]=a.suggestionList[d],c.push(a.suggestionList[d]));CKEDITOR.plugins.scayt.suggestions=c}),d.subscribe(\"selectionIsChanged\",function(b){a.getSelection().isLocked&&a.lockSelection()}),d.subscribe(\"graytStateChanged\",function(d){b.state.grayt[a.name]=d.state}),a.scayt=d,a.fire(\"scaytButtonState\",a.readOnly?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_ON)):b.state.scayt[a.name]=!1})},destroy:function(a){a.scayt&&\na.scayt.destroy();delete a.scayt;a.fire(\"scaytButtonState\",CKEDITOR.TRISTATE_OFF)},loadScaytLibrary:function(a,e){var b=this,c,d;this.loadingHelper[a.name]||(\"undefined\"===typeof window.SCAYT||\"function\"!==typeof window.SCAYT.CKSCAYT?(this.loadingHelper[a.name]=e,this.loadingHelper.loadOrder.push(a.name),c=new Date,c=c.getTime(),d=a.config.scayt_srcUrl,d+=0<=d.indexOf(\"?\")?\"\":\"?\"+c,this.loadingHelper.ckscaytLoading||(CKEDITOR.scriptLoader.load(d,function(a){if(a){CKEDITOR.fireOnce(\"scaytReady\");for(var c=\n0;c<b.loadingHelper.loadOrder.length;c++){a=b.loadingHelper.loadOrder[c];if(\"function\"===typeof b.loadingHelper[a])b.loadingHelper[a](CKEDITOR.instances[a]);delete b.loadingHelper[a]}b.loadingHelper.loadOrder=[]}}),this.loadingHelper.ckscaytLoading=!0)):window.SCAYT&&\"function\"===typeof window.SCAYT.CKSCAYT&&(CKEDITOR.fireOnce(\"scaytReady\"),a.scayt||\"function\"===typeof e&&e(a)))}},CKEDITOR.on(\"dialogDefinition\",function(a){var e=a.data.name;a=a.data.definition.dialog;if(\"scaytDialog\"===e)a.on(\"cancel\",\nfunction(a){return!1},this,null,-1);if(\"checkspell\"===e)a.on(\"cancel\",function(a){a=a.sender&&a.sender.getParentEditor();var c=CKEDITOR.plugins.scayt,d=a.scayt;d&&c.state.scayt[a.name]&&d.setMarkupPaused&&d.setMarkupPaused(!1);a.unlockSelection()},this,null,-2);if(\"link\"===e)a.on(\"ok\",function(a){var c=a.sender&&a.sender.getParentEditor();c&&setTimeout(function(){c.fire(\"reloadMarkupScayt\",{removeOptions:{removeInside:!0,forceBookmark:!0},timeout:0})},0)})}),CKEDITOR.on(\"scaytReady\",function(){if(!0===\nCKEDITOR.config.scayt_handleCheckDirty){var a=CKEDITOR.editor.prototype;a.checkDirty=CKEDITOR.tools.override(a.checkDirty,function(a){return function(){var c=null,d=this.scayt;if(CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt){if(c=\"ready\"==this.status)var e=d.removeMarkupFromString(this.getSnapshot()),d=d.removeMarkupFromString(this._.previousValue),c=c&&d!==e}else c=a.call(this);return c}});a.resetDirty=CKEDITOR.tools.override(a.resetDirty,function(a){return function(){var c=\nthis.scayt;CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt?this._.previousValue=c.removeMarkupFromString(this.getSnapshot()):a.call(this)}})}if(!0===CKEDITOR.config.scayt_handleUndoRedo){var a=CKEDITOR.plugins.undo.Image.prototype,e=\"function\"==typeof a.equalsContent?\"equalsContent\":\"equals\";a[e]=CKEDITOR.tools.override(a[e],function(a){return function(c){var d=c.editor.scayt,e=this.contents,l=c.contents,f=null;CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[c.editor.name]&&\nc.editor.scayt&&(this.contents=d.removeMarkupFromString(e)||\"\",c.contents=d.removeMarkupFromString(l)||\"\");f=a.apply(this,arguments);this.contents=e;c.contents=l;return f}})}}),function(){var a={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var b=this.state==CKEDITOR.TRISTATE_ON?\"attachClass\":\"removeClass\";a.editable()[b](\"cke_show_borders\")}}};CKEDITOR.plugins.add(\"showborders\",{modes:{wysiwyg:1},onLoad:function(){var a;\na=(CKEDITOR.env.ie6Compat?[\".%1 table.%2,\",\".%1 table.%2 td, .%1 table.%2 th\",\"{\",\"border : #d3d3d3 1px dotted\",\"}\"]:\".%1 table.%2,;.%1 table.%2 \\x3e tr \\x3e td, .%1 table.%2 \\x3e tr \\x3e th,;.%1 table.%2 \\x3e tbody \\x3e tr \\x3e td, .%1 table.%2 \\x3e tbody \\x3e tr \\x3e th,;.%1 table.%2 \\x3e thead \\x3e tr \\x3e td, .%1 table.%2 \\x3e thead \\x3e tr \\x3e th,;.%1 table.%2 \\x3e tfoot \\x3e tr \\x3e td, .%1 table.%2 \\x3e tfoot \\x3e tr \\x3e th;{;border : #d3d3d3 1px dotted;}\".split(\";\")).join(\"\").replace(/%2/g,\n\"cke_show_border\").replace(/%1/g,\"cke_show_borders \");CKEDITOR.addCss(a)},init:function(e){var b=e.addCommand(\"showborders\",a);b.canUndo=!1;!1!==e.config.startupShowBorders&&b.setState(CKEDITOR.TRISTATE_ON);e.on(\"mode\",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(e)},null,null,100);e.on(\"contentDom\",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(e)});e.on(\"removeFormatCleanup\",function(a){a=a.data;e.getCommand(\"showborders\").state==CKEDITOR.TRISTATE_ON&&a.is(\"table\")&&(!a.hasAttribute(\"border\")||\n0>=parseInt(a.getAttribute(\"border\"),10))&&a.addClass(\"cke_show_border\")})},afterInit:function(a){var b=a.dataProcessor;a=b&&b.dataFilter;b=b&&b.htmlFilter;a&&a.addRules({elements:{table:function(a){a=a.attributes;var b=a[\"class\"],e=parseInt(a.border,10);e&&!(0>=e)||b&&-1!=b.indexOf(\"cke_show_border\")||(a[\"class\"]=(b||\"\")+\" cke_show_border\")}}});b&&b.addRules({elements:{table:function(a){a=a.attributes;var b=a[\"class\"];b&&(a[\"class\"]=b.replace(\"cke_show_border\",\"\").replace(/\\s{2}/,\" \").replace(/^\\s+|\\s+$/,\n\"\"))}}})}});CKEDITOR.on(\"dialogDefinition\",function(a){var b=a.data.name;if(\"table\"==b||\"tableProperties\"==b)if(a=a.data.definition,b=a.getContents(\"info\").get(\"txtBorder\"),b.commit=CKEDITOR.tools.override(b.commit,function(a){return function(b,e){a.apply(this,arguments);var l=parseInt(this.getValue(),10);e[!l||0>=l?\"addClass\":\"removeClass\"](\"cke_show_border\")}}),a=(a=a.getContents(\"advanced\"))&&a.get(\"advCSSClasses\"))a.setup=CKEDITOR.tools.override(a.setup,function(a){return function(){a.apply(this,\narguments);this.setValue(this.getValue().replace(/cke_show_border/,\"\"))}}),a.commit=CKEDITOR.tools.override(a.commit,function(a){return function(b,e){a.apply(this,arguments);parseInt(e.getAttribute(\"border\"),10)||e.addClass(\"cke_show_border\")}})})}(),function(){CKEDITOR.plugins.add(\"sourcearea\",{init:function(e){function b(){var a=d&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle(\"height\",this.getParent().$.clientHeight+\"px\");this.setStyle(\"width\",this.getParent().$.clientWidth+\n\"px\");this.show();a&&this.focus()}if(e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var c=CKEDITOR.plugins.sourcearea;e.addMode(\"source\",function(c){var d=e.ui.space(\"contents\").getDocument().createElement(\"textarea\");d.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?\"99%\":\"100%\",height:\"100%\",resize:\"none\",outline:\"none\",\"text-align\":\"left\"},CKEDITOR.tools.cssVendorPrefix(\"tab-size\",e.config.sourceAreaTabSize||4)));d.setAttribute(\"dir\",\"ltr\");d.addClass(\"cke_source\").addClass(\"cke_reset\").addClass(\"cke_enable_context_menu\");\ne.ui.space(\"contents\").append(d);d=e.editable(new a(e,d));d.setData(e.getData(1));CKEDITOR.env.ie&&(d.attachListener(e,\"resize\",b,d),d.attachListener(CKEDITOR.document.getWindow(),\"resize\",b,d),CKEDITOR.tools.setTimeout(b,0,d));e.fire(\"ariaWidget\",this);c()});e.addCommand(\"source\",c.commands.source);e.ui.addButton&&e.ui.addButton(\"Source\",{label:e.lang.sourcearea.toolbar,command:\"source\",toolbar:\"mode,10\"});e.on(\"mode\",function(){e.getCommand(\"source\").setState(\"source\"==e.mode?CKEDITOR.TRISTATE_ON:\nCKEDITOR.TRISTATE_OFF)});var d=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var a=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);this.status=\"ready\";this.editor.fire(\"dataReady\")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(a){this[(a?\"set\":\"remove\")+\"Attribute\"](\"readOnly\",\"readonly\")},detach:function(){a.baseProto.detach.call(this);this.clearCustomData();\nthis.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(a){\"wysiwyg\"==a.mode&&a.fire(\"saveSnapshot\");a.getCommand(\"source\").setState(CKEDITOR.TRISTATE_DISABLED);a.setMode(\"source\"==a.mode?\"wysiwyg\":\"source\")},canUndo:!1}}},CKEDITOR.plugins.add(\"specialchar\",{availableLangs:{af:1,ar:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,en:1,\"en-gb\":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fr:1,\"fr-ca\":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,\nku:1,lt:1,lv:1,nb:1,nl:1,no:1,pl:1,pt:1,\"pt-br\":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,\"zh-cn\":1},requires:\"dialog\",init:function(a){var e=this;CKEDITOR.dialog.add(\"specialchar\",this.path+\"dialogs/specialchar.js\");a.addCommand(\"specialchar\",{exec:function(){var b=a.langCode,b=e.availableLangs[b]?b:e.availableLangs[b.replace(/-.*/,\"\")]?b.replace(/-.*/,\"\"):\"en\";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e.path+\"dialogs/lang/\"+b+\".js\"),function(){CKEDITOR.tools.extend(a.lang.specialchar,\ne.langEntries[b]);a.openDialog(\"specialchar\")})},modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton(\"SpecialChar\",{label:a.lang.specialchar.toolbar,command:\"specialchar\",toolbar:\"insert,50\"})}}),CKEDITOR.config.specialChars=\"! \\x26quot; # $ % \\x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \\x26lt; \\x3d \\x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \\x26euro; \\x26lsquo; \\x26rsquo; \\x26ldquo; \\x26rdquo; \\x26ndash; \\x26mdash; \\x26iexcl; \\x26cent; \\x26pound; \\x26curren; \\x26yen; \\x26brvbar; \\x26sect; \\x26uml; \\x26copy; \\x26ordf; \\x26laquo; \\x26not; \\x26reg; \\x26macr; \\x26deg; \\x26sup2; \\x26sup3; \\x26acute; \\x26micro; \\x26para; \\x26middot; \\x26cedil; \\x26sup1; \\x26ordm; \\x26raquo; \\x26frac14; \\x26frac12; \\x26frac34; \\x26iquest; \\x26Agrave; \\x26Aacute; \\x26Acirc; \\x26Atilde; \\x26Auml; \\x26Aring; \\x26AElig; \\x26Ccedil; \\x26Egrave; \\x26Eacute; \\x26Ecirc; \\x26Euml; \\x26Igrave; \\x26Iacute; \\x26Icirc; \\x26Iuml; \\x26ETH; \\x26Ntilde; \\x26Ograve; \\x26Oacute; \\x26Ocirc; \\x26Otilde; \\x26Ouml; \\x26times; \\x26Oslash; \\x26Ugrave; \\x26Uacute; \\x26Ucirc; \\x26Uuml; \\x26Yacute; \\x26THORN; \\x26szlig; \\x26agrave; \\x26aacute; \\x26acirc; \\x26atilde; \\x26auml; \\x26aring; \\x26aelig; \\x26ccedil; \\x26egrave; \\x26eacute; \\x26ecirc; \\x26euml; \\x26igrave; \\x26iacute; \\x26icirc; \\x26iuml; \\x26eth; \\x26ntilde; \\x26ograve; \\x26oacute; \\x26ocirc; \\x26otilde; \\x26ouml; \\x26divide; \\x26oslash; \\x26ugrave; \\x26uacute; \\x26ucirc; \\x26uuml; \\x26yacute; \\x26thorn; \\x26yuml; \\x26OElig; \\x26oelig; \\x26#372; \\x26#374 \\x26#373 \\x26#375; \\x26sbquo; \\x26#8219; \\x26bdquo; \\x26hellip; \\x26trade; \\x26#9658; \\x26bull; \\x26rarr; \\x26rArr; \\x26hArr; \\x26diams; \\x26asymp;\".split(\" \"),\nfunction(){CKEDITOR.plugins.add(\"stylescombo\",{requires:\"richcombo\",init:function(a){var e=a.config,b=a.lang.stylescombo,c={},d=[],m=[];a.on(\"stylesSet\",function(b){if(b=b.data.styles){for(var f,h,k,g=0,n=b.length;g<n;g++)(f=b[g],a.blockless&&f.element in CKEDITOR.dtd.$block||(h=f.name,f=new CKEDITOR.style(f),a.filter.customConfig&&!a.filter.check(f)))||(f._name=h,f._.enterMode=e.enterMode,f._.type=k=f.assignedTo||f.type,f._.weight=g+1E3*(k==CKEDITOR.STYLE_OBJECT?1:k==CKEDITOR.STYLE_BLOCK?2:3),c[h]=\nf,d.push(f),m.push(f));d.sort(function(a,b){return a._.weight-b._.weight})}});a.ui.addRichCombo(\"Styles\",{label:b.label,title:b.panelTitle,toolbar:\"styles,10\",allowedContent:m,panel:{css:[CKEDITOR.skin.getPath(\"editor\")].concat(e.contentsCss),multiSelect:!0,attributes:{\"aria-label\":b.panelTitle}},init:function(){var a,c,e,k,g,m;g=0;for(m=d.length;g<m;g++)a=d[g],c=a._name,k=a._.type,k!=e&&(this.startGroup(b[\"panelTitle\"+String(k)]),e=k),this.add(c,a.type==CKEDITOR.STYLE_OBJECT?c:a.buildPreview(),c);\nthis.commit()},onClick:function(b){a.focus();a.fire(\"saveSnapshot\");b=c[b];var d=a.elementPath();a[b.checkActive(d,a)?\"removeStyle\":\"applyStyle\"](b);a.fire(\"saveSnapshot\")},onRender:function(){a.on(\"selectionChange\",function(b){var d=this.getValue();b=b.data.path.elements;for(var e=0,k=b.length,g;e<k;e++){g=b[e];for(var m in c)if(c[m].checkElementRemovable(g,!0,a)){m!=d&&this.setValue(m);return}}this.setValue(\"\")},this)},onOpen:function(){var d=a.getSelection().getSelectedElement(),d=a.elementPath(d),\nf=[0,0,0,0];this.showAll();this.unmarkAll();for(var e in c){var k=c[e],g=k._.type;k.checkApplicable(d,a,a.activeFilter)?f[g]++:this.hideItem(e);k.checkActive(d,a)&&this.mark(e)}f[CKEDITOR.STYLE_BLOCK]||this.hideGroup(b[\"panelTitle\"+String(CKEDITOR.STYLE_BLOCK)]);f[CKEDITOR.STYLE_INLINE]||this.hideGroup(b[\"panelTitle\"+String(CKEDITOR.STYLE_INLINE)]);f[CKEDITOR.STYLE_OBJECT]||this.hideGroup(b[\"panelTitle\"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var b=a.elementPath();if(b){for(var d in c)if(c[d].checkApplicable(b,\na,a.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){c={};d=[]}})}})}(),function(){function a(a){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(b){if(b.editable().hasFocus){var c=b.getSelection(),f;if(f=(new CKEDITOR.dom.elementPath(c.getCommonAncestor(),c.root)).contains({td:1,th:1},1)){var c=b.createRange(),e=CKEDITOR.tools.tryThese(function(){var b=f.getParent().$.cells[f.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=\nf.getParent(),b=b.getAscendant(\"table\").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(e||a)if(e)e=new CKEDITOR.dom.element(e),c.moveToElementEditStart(e),c.checkStartOfBlock()&&c.checkEndOfBlock()||c.selectNodeContents(e);else return!0;else{for(var k=f.getAscendant(\"table\").$,e=f.getParent().$.cells,k=new CKEDITOR.dom.element(k.insertRow(-1),b.document),g=0,n=e.length;g<n;g++)k.append((new CKEDITOR.dom.element(e[g],b.document)).clone(!1,!1)).appendBogus();c.moveToElementEditStart(k)}c.select(!0);\nreturn!0}}return!1}}}var e={editorFocus:!1,modes:{wysiwyg:1,source:1}},b={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},c={exec:function(a){a.container.focusPrevious(!0,a.tabIndex)}};CKEDITOR.plugins.add(\"tab\",{init:function(d){for(var m=!1!==d.config.enableTabKeyTools,l=d.config.tabSpaces||0,f=\"\";l--;)f+=\" \";if(f)d.on(\"key\",function(a){9==a.data.keyCode&&(d.insertText(f),a.cancel())});if(m)d.on(\"key\",function(a){(9==a.data.keyCode&&d.execCommand(\"selectNextCell\")||a.data.keyCode==CKEDITOR.SHIFT+\n9&&d.execCommand(\"selectPreviousCell\"))&&a.cancel()});d.addCommand(\"blur\",CKEDITOR.tools.extend(b,e));d.addCommand(\"blurBack\",CKEDITOR.tools.extend(c,e));d.addCommand(\"selectNextCell\",a());d.addCommand(\"selectPreviousCell\",a(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(a,e){var b=void 0===e?this.getTabIndex():e,c,d,m,l,f,h;if(0>=b)for(f=this.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);f;){if(f.isVisible()&&0===f.getTabIndex()){m=f;break}f=f.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(f=\nthis.getDocument().getBody().getFirst();f=f.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!c)if(!d&&f.equals(this)){if(d=!0,a){if(!(f=f.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;c=1}}else d&&!this.contains(f)&&(c=1);if(f.isVisible()&&!(0>(h=f.getTabIndex()))){if(c&&h==b){m=f;break}h>b&&(!m||!l||h<l)?(m=f,l=h):m||0!==h||(m=f,l=h)}}m&&m.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(a,e){for(var b=void 0===e?this.getTabIndex():e,c,d,m,l=0,f,h=this.getDocument().getBody().getLast();h=\nh.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!c)if(!d&&h.equals(this)){if(d=!0,a){if(!(h=h.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;c=1}}else d&&!this.contains(h)&&(c=1);if(h.isVisible()&&!(0>(f=h.getTabIndex())))if(0>=b){if(c&&0===f){m=h;break}f>l&&(m=h,l=f)}else{if(c&&f==b){m=h;break}f<b&&(!m||f>l)&&(m=h,l=f)}}m&&m.focus()},CKEDITOR.plugins.add(\"table\",{requires:\"dialog\",init:function(a){function e(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,\nb){this.setState(b.contains(\"table\",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var b=a.lang.table;a.addCommand(\"table\",new CKEDITOR.dialogCommand(\"table\",{context:\"table\",allowedContent:\"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];\"+(a.plugins.dialogadvtab?\"table\"+a.plugins.dialogadvtab.allowedContent():\"\"),requiredContent:\"table\",contentTransformations:[[\"table{width}: sizeToStyle\",\"table[width]: sizeToAttribute\"]]}));\na.addCommand(\"tableProperties\",new CKEDITOR.dialogCommand(\"tableProperties\",e()));a.addCommand(\"tableDelete\",e({exec:function(a){var b=a.elementPath().contains(\"table\",1);if(b){var e=b.getParent(),l=a.editable();1!=e.getChildCount()||e.is(\"td\",\"th\")||e.equals(l)||(b=e);a=a.createRange();a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton(\"Table\",{label:b.toolbar,command:\"table\",toolbar:\"insert,30\"});CKEDITOR.dialog.add(\"table\",this.path+\"dialogs/table.js\");\nCKEDITOR.dialog.add(\"tableProperties\",this.path+\"dialogs/table.js\");a.addMenuItems&&a.addMenuItems({table:{label:b.menu,command:\"tableProperties\",group:\"table\",order:5},tabledelete:{label:b.deleteTable,command:\"tableDelete\",group:\"table\",order:1}});a.on(\"doubleclick\",function(a){a.data.element.is(\"table\")&&(a.data.dialog=\"tableProperties\")});a.contextMenu&&a.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function a(a){function b(a){0<\nc.length||a.type!=CKEDITOR.NODE_ELEMENT||!q.test(a.getName())||a.getCustomData(\"selected_cell\")||(CKEDITOR.dom.element.setMarker(d,a,\"selected_cell\",!0),c.push(a))}a=a.getRanges();for(var c=[],d={},f=0;f<a.length;f++){var e=a[f];if(e.collapsed)e=e.getCommonAncestor(),(e=e.getAscendant(\"td\",!0)||e.getAscendant(\"th\",!0))&&c.push(e);else{var e=new CKEDITOR.dom.walker(e),g;for(e.guard=b;g=e.next();)g.type==CKEDITOR.NODE_ELEMENT&&g.is(CKEDITOR.dtd.table)||(g=g.getAscendant(\"td\",!0)||g.getAscendant(\"th\",\n!0))&&!g.getCustomData(\"selected_cell\")&&(CKEDITOR.dom.element.setMarker(d,g,\"selected_cell\",!0),c.push(g))}}CKEDITOR.dom.element.clearAllMarkers(d);return c}function e(b,c){for(var d=a(b),f=d[0],e=f.getAscendant(\"table\"),f=f.getDocument(),g=d[0].getParent(),h=g.$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(e.$.rows[k]),h=c?h:k,g=c?g:d,d=CKEDITOR.tools.buildTableMap(e),e=d[h],h=c?d[h-1]:d[h+1],d=d[0].length,f=f.createElement(\"tr\"),k=0;e[k]&&k<d;k++){var l;\n1<e[k].rowSpan&&h&&e[k]==h[k]?(l=e[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(e[k])).clone(),l.removeAttribute(\"rowSpan\"),l.appendBogus(),f.append(l),l=l.$);k+=l.colSpan-1}c?f.insertBefore(g):f.insertAfter(g)}function b(c){if(c instanceof CKEDITOR.dom.selection){var d=a(c),f=d[0].getAscendant(\"table\"),e=CKEDITOR.tools.buildTableMap(f);c=d[0].getParent().$.rowIndex;for(var d=d[d.length-1],g=d.getParent().$.rowIndex+d.$.rowSpan-1,d=[],h=c;h<=g;h++){for(var k=e[h],l=new CKEDITOR.dom.element(f.$.rows[h]),\nm=0;m<k.length;m++){var n=new CKEDITOR.dom.element(k[m]),q=n.getParent().$.rowIndex;1==n.$.rowSpan?n.remove():(--n.$.rowSpan,q==h&&(q=e[h+1],q[m-1]?n.insertAfter(new CKEDITOR.dom.element(q[m-1])):(new CKEDITOR.dom.element(f.$.rows[h+1])).append(n,1)));m+=n.$.colSpan-1}d.push(l)}e=f.$.rows;f=new CKEDITOR.dom.element(e[g+1]||(0<c?e[c-1]:null)||f.$.parentNode);for(h=d.length;0<=h;h--)b(d[h]);return f}c instanceof CKEDITOR.dom.element&&(f=c.getAscendant(\"table\"),1==f.$.rows.length?f.remove():c.remove());\nreturn null}function c(a,b){for(var c=b?Infinity:0,d=0;d<a.length;d++){var f;f=a[d];for(var e=b,g=f.getParent().$.cells,h=0,k=0;k<g.length;k++){var l=g[k],h=h+(e?1:l.colSpan);if(l==f.$)break}f=h-1;if(b?f<c:f>c)c=f}return c}function d(b,d){for(var f=a(b),e=f[0].getAscendant(\"table\"),g=c(f,1),f=c(f),g=d?g:f,h=CKEDITOR.tools.buildTableMap(e),e=[],f=[],k=h.length,l=0;l<k;l++)e.push(h[l][g]),f.push(d?h[l][g-1]:h[l][g+1]);for(l=0;l<k;l++)e[l]&&(1<e[l].colSpan&&f[l]==e[l]?(g=e[l],g.colSpan+=1):(g=(new CKEDITOR.dom.element(e[l])).clone(),\ng.removeAttribute(\"colSpan\"),g.appendBogus(),g[d?\"insertBefore\":\"insertAfter\"].call(g,new CKEDITOR.dom.element(e[l])),g=g.$),l+=g.rowSpan-1)}function m(a,b){var c=a.getStartElement();if(c=c.getAscendant(\"td\",1)||c.getAscendant(\"th\",1)){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function l(b){if(b instanceof CKEDITOR.dom.selection){b=a(b);var c=b[0]&&b[0].getAscendant(\"table\"),d;a:{var e=0;d=b.length-1;for(var g={},h,k;h=b[e++];)CKEDITOR.dom.element.setMarker(g,h,\"delete_cell\",\n!0);for(e=0;h=b[e++];)if((k=h.getPrevious())&&!k.getCustomData(\"delete_cell\")||(k=h.getNext())&&!k.getCustomData(\"delete_cell\")){CKEDITOR.dom.element.clearAllMarkers(g);d=k;break a}CKEDITOR.dom.element.clearAllMarkers(g);k=b[0].getParent();(k=k.getPrevious())?d=k.getLast():(k=b[d].getParent(),d=(k=k.getNext())?k.getChild(0):null)}for(k=b.length-1;0<=k;k--)l(b[k]);d?f(d,!0):c&&c.remove()}else b instanceof CKEDITOR.dom.element&&(c=b.getParent(),1==c.getChildCount()?c.remove():b.remove())}function f(a,\nb){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c[\"moveToElementEdit\"+(b?\"End\":\"Start\")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function h(a,b,c){a=a[b];if(\"undefined\"==typeof c)return a;for(b=0;a&&b<a.length;b++){if(c.is&&a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?-1:null}function k(b,c,d){var f=a(b),e;if((c?1!=f.length:2>f.length)||(e=b.getCommonAncestor())&&\ne.type==CKEDITOR.NODE_ELEMENT&&e.is(\"table\"))return!1;var g;b=f[0];e=b.getAscendant(\"table\");var k=CKEDITOR.tools.buildTableMap(e),l=k.length,m=k[0].length,n=b.getParent().$.rowIndex,q=h(k,n,b);if(c){var A;try{var D=parseInt(b.getAttribute(\"rowspan\"),10)||1;g=parseInt(b.getAttribute(\"colspan\"),10)||1;A=k[\"up\"==c?n-D:\"down\"==c?n+D:n][\"left\"==c?q-g:\"right\"==c?q+g:q]}catch(G){return!1}if(!A||b.$==A)return!1;f[\"up\"==c||\"left\"==c?\"unshift\":\"push\"](new CKEDITOR.dom.element(A))}c=b.getDocument();var F=n,\nD=A=0,I=!d&&new CKEDITOR.dom.documentFragment(c),H=0;for(c=0;c<f.length;c++){g=f[c];var K=g.getParent(),E=g.getFirst(),N=g.$.colSpan,R=g.$.rowSpan,K=K.$.rowIndex,P=h(k,K,g),H=H+N*R,D=Math.max(D,P-q+N);A=Math.max(A,K-n+R);d||(N=g,(R=N.getBogus())&&R.remove(),N.trim(),g.getChildren().count()&&(K==F||!E||E.isBlockBoundary&&E.isBlockBoundary({br:1})||(F=I.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!F||F.is&&F.is(\"br\")||I.append(\"br\")),g.moveChildren(I)),c?g.remove():g.setHtml(\"\"));F=K}if(d)return A*\nD==H;I.moveChildren(b);b.appendBogus();D>=m?b.removeAttribute(\"rowSpan\"):b.$.rowSpan=A;A>=l?b.removeAttribute(\"colSpan\"):b.$.colSpan=D;d=new CKEDITOR.dom.nodeList(e.$.rows);f=d.count();for(c=f-1;0<=c;c--)e=d.getItem(c),e.$.cells.length||(e.remove(),f++);return b}function g(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],f=d.getParent(),e=f.getAscendant(\"table\"),g=CKEDITOR.tools.buildTableMap(e),k=f.$.rowIndex,l=h(g,k,d),m=d.$.rowSpan,n;if(1<m){n=Math.ceil(m/2);for(var m=Math.floor(m/\n2),f=k+n,e=new CKEDITOR.dom.element(e.$.rows[f]),g=h(g,f),q,f=d.clone(),k=0;k<g.length;k++)if(q=g[k],q.parentNode==e.$&&k>l){f.insertBefore(new CKEDITOR.dom.element(q));break}else q=null;q||e.append(f)}else for(m=n=1,e=f.clone(),e.insertAfter(f),e.append(f=d.clone()),q=h(g,k),l=0;l<q.length;l++)q[l].rowSpan++;f.appendBogus();d.$.rowSpan=n;f.$.rowSpan=m;1==n&&d.removeAttribute(\"rowSpan\");1==m&&f.removeAttribute(\"rowSpan\");return f}function n(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=\nd[0],f=d.getParent(),e=f.getAscendant(\"table\"),e=CKEDITOR.tools.buildTableMap(e),g=h(e,f.$.rowIndex,d),k=d.$.colSpan;if(1<k)f=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=f=1,l=[],m=0;m<e.length;m++){var n=e[m];l.push(n[g]);1<n[g].rowSpan&&(m+=n[g].rowSpan-1)}for(e=0;e<l.length;e++)l[e].colSpan++}e=d.clone();e.insertAfter(d);e.appendBogus();d.$.colSpan=f;e.$.colSpan=k;1==f&&d.removeAttribute(\"colSpan\");1==k&&e.removeAttribute(\"colSpan\");return e}var q=/^(?:td|th)$/;CKEDITOR.plugins.tabletools=\n{requires:\"table,dialog,contextmenu\",init:function(c){function h(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function u(a,b){var d=c.addCommand(a,b);c.addFeature(d)}var q=c.lang.table;u(\"cellProperties\",new CKEDITOR.dialogCommand(\"cellProperties\",h({allowedContent:\"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]\",\nrequiredContent:\"table\"})));CKEDITOR.dialog.add(\"cellProperties\",this.path+\"dialogs/tableCell.js\");u(\"rowDelete\",h({requiredContent:\"table\",exec:function(a){a=a.getSelection();f(b(a))}}));u(\"rowInsertBefore\",h({requiredContent:\"table\",exec:function(a){a=a.getSelection();e(a,!0)}}));u(\"rowInsertAfter\",h({requiredContent:\"table\",exec:function(a){a=a.getSelection();e(a)}}));u(\"columnDelete\",h({requiredContent:\"table\",exec:function(b){b=b.getSelection();b=a(b);var c=b[0],d=b[b.length-1];b=c.getAscendant(\"table\");\nfor(var e=CKEDITOR.tools.buildTableMap(b),g,h,k=[],l=0,m=e.length;l<m;l++)for(var n=0,p=e[l].length;n<p;n++)e[l][n]==c.$&&(g=n),e[l][n]==d.$&&(h=n);for(l=g;l<=h;l++)for(n=0;n<e.length;n++)d=e[n],c=new CKEDITOR.dom.element(b.$.rows[n]),d=new CKEDITOR.dom.element(d[l]),d.$&&(1==d.$.colSpan?d.remove():--d.$.colSpan,n+=d.$.rowSpan-1,c.$.cells.length||k.push(c));h=b.$.rows[0]&&b.$.rows[0].cells;g=new CKEDITOR.dom.element(h[g]||(g?h[g-1]:b.$.parentNode));k.length==m&&b.remove();g&&f(g,!0)}}));u(\"columnInsertBefore\",\nh({requiredContent:\"table\",exec:function(a){a=a.getSelection();d(a,!0)}}));u(\"columnInsertAfter\",h({requiredContent:\"table\",exec:function(a){a=a.getSelection();d(a)}}));u(\"cellDelete\",h({requiredContent:\"table\",exec:function(a){a=a.getSelection();l(a)}}));u(\"cellMerge\",h({allowedContent:\"td[colspan,rowspan]\",requiredContent:\"td[colspan,rowspan]\",exec:function(a){f(k(a.getSelection()),!0)}}));u(\"cellMergeRight\",h({allowedContent:\"td[colspan]\",requiredContent:\"td[colspan]\",exec:function(a){f(k(a.getSelection(),\n\"right\"),!0)}}));u(\"cellMergeDown\",h({allowedContent:\"td[rowspan]\",requiredContent:\"td[rowspan]\",exec:function(a){f(k(a.getSelection(),\"down\"),!0)}}));u(\"cellVerticalSplit\",h({allowedContent:\"td[rowspan]\",requiredContent:\"td[rowspan]\",exec:function(a){f(n(a.getSelection()))}}));u(\"cellHorizontalSplit\",h({allowedContent:\"td[colspan]\",requiredContent:\"td[colspan]\",exec:function(a){f(g(a.getSelection()))}}));u(\"cellInsertBefore\",h({requiredContent:\"table\",exec:function(a){a=a.getSelection();m(a,!0)}}));\nu(\"cellInsertAfter\",h({requiredContent:\"table\",exec:function(a){a=a.getSelection();m(a)}}));c.addMenuItems&&c.addMenuItems({tablecell:{label:q.cell.menu,group:\"tablecell\",order:1,getItems:function(){var b=c.getSelection(),d=a(b);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:k(b,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:k(b,\"right\",!0)?CKEDITOR.TRISTATE_OFF:\nCKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:k(b,\"down\",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:n(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:g(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:0<d.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:q.cell.insertBefore,group:\"tablecell\",command:\"cellInsertBefore\",order:5},tablecell_insertAfter:{label:q.cell.insertAfter,\ngroup:\"tablecell\",command:\"cellInsertAfter\",order:10},tablecell_delete:{label:q.cell.deleteCell,group:\"tablecell\",command:\"cellDelete\",order:15},tablecell_merge:{label:q.cell.merge,group:\"tablecell\",command:\"cellMerge\",order:16},tablecell_merge_right:{label:q.cell.mergeRight,group:\"tablecell\",command:\"cellMergeRight\",order:17},tablecell_merge_down:{label:q.cell.mergeDown,group:\"tablecell\",command:\"cellMergeDown\",order:18},tablecell_split_horizontal:{label:q.cell.splitHorizontal,group:\"tablecell\",\ncommand:\"cellHorizontalSplit\",order:19},tablecell_split_vertical:{label:q.cell.splitVertical,group:\"tablecell\",command:\"cellVerticalSplit\",order:20},tablecell_properties:{label:q.cell.title,group:\"tablecellproperties\",command:\"cellProperties\",order:21},tablerow:{label:q.row.menu,group:\"tablerow\",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:q.row.insertBefore,\ngroup:\"tablerow\",command:\"rowInsertBefore\",order:5},tablerow_insertAfter:{label:q.row.insertAfter,group:\"tablerow\",command:\"rowInsertAfter\",order:10},tablerow_delete:{label:q.row.deleteRow,group:\"tablerow\",command:\"rowDelete\",order:15},tablecolumn:{label:q.column.menu,group:\"tablecolumn\",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:q.column.insertBefore,\ngroup:\"tablecolumn\",command:\"columnInsertBefore\",order:5},tablecolumn_insertAfter:{label:q.column.insertAfter,group:\"tablecolumn\",command:\"columnInsertAfter\",order:10},tablecolumn_delete:{label:q.column.deleteColumn,group:\"tablecolumn\",command:\"columnDelete\",order:15}});c.contextMenu&&c.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getSelectedCells:a};\nCKEDITOR.plugins.add(\"tabletools\",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(a){a=a.$.rows;for(var e=-1,b=[],c=0;c<a.length;c++){e++;!b[e]&&(b[e]=[]);for(var d=-1,m=0;m<a[c].cells.length;m++){var l=a[c].cells[m];for(d++;b[e][d];)d++;for(var f=isNaN(l.colSpan)?1:l.colSpan,l=isNaN(l.rowSpan)?1:l.rowSpan,h=0;h<l;h++){b[e+h]||(b[e+h]=[]);for(var k=0;k<f;k++)b[e+h][d+k]=a[c].cells[m]}d+=f-1}}return b},function(){function a(a){function b(){for(var g=c(),h=CKEDITOR.tools.clone(a.config.toolbarGroups)||\ne(a),k=0;k<h.length;k++){var m=h[k];if(\"/\"!=m){\"string\"==typeof m&&(m=h[k]={name:m});var u,v=m.groups;if(v)for(var w=0;w<v.length;w++)u=v[w],(u=g[u])&&f(m,u);(u=g[m.name])&&f(m,u)}}return h}function c(){var b={},f,e,g;for(f in a.ui.items)e=a.ui.items[f],g=e.toolbar||\"others\",g=g.split(\",\"),e=g[0],g=parseInt(g[1]||-1,10),b[e]||(b[e]=[]),b[e].push({name:f,order:g});for(e in b)b[e]=b[e].sort(function(a,b){return a.order==b.order?0:0>b.order?-1:0>a.order?1:a.order<b.order?-1:1});return b}function f(b,\nc){if(c.length){b.items?b.items.push(a.ui.create(\"-\")):b.items=[];for(var f;f=c.shift();)f=\"string\"==typeof f?f:f.name,k&&-1!=CKEDITOR.tools.indexOf(k,f)||(f=a.ui.create(f))&&a.addFeature(f)&&b.items.push(f)}}function h(a){var b=[],c,d,e;for(c=0;c<a.length;++c)d=a[c],e={},\"/\"==d?b.push(d):CKEDITOR.tools.isArray(d)?(f(e,CKEDITOR.tools.clone(d)),b.push(e)):d.items&&(f(e,CKEDITOR.tools.clone(d.items)),e.name=d.name,b.push(e));return b}var k=a.config.removeButtons,k=k&&k.split(\",\"),g=a.config.toolbar;\n\"string\"==typeof g&&(g=a.config[\"toolbar_\"+g]);return a.toolbar=g?h(g):b()}function e(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:\"document\",groups:[\"mode\",\"document\",\"doctools\"]},{name:\"clipboard\",groups:[\"clipboard\",\"undo\"]},{name:\"editing\",groups:[\"find\",\"selection\",\"spellchecker\"]},{name:\"forms\"},\"/\",{name:\"basicstyles\",groups:[\"basicstyles\",\"cleanup\"]},{name:\"paragraph\",groups:[\"list\",\"indent\",\"blocks\",\"align\",\"bidi\"]},{name:\"links\"},{name:\"insert\"},\"/\",{name:\"styles\"},{name:\"colors\"},\n{name:\"tools\"},{name:\"others\"},{name:\"about\"}])}var b=function(){this.toolbars=[];this.focusCommandExecuted=!1};b.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var c=0,f;f=b.items[c++];)if(f.focus){f.focus();return}};var c={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(a){a.toolbox&&(a.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus())}};CKEDITOR.plugins.add(\"toolbar\",{requires:\"button\",init:function(d){var e,\nl=function(a,b){var c,g=\"rtl\"==d.lang.dir,n=d.config.toolbarGroupCycling,q=g?37:39,g=g?39:37,n=void 0===n||n;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!c||!c.items.length;)if(c=9==b?(c?c.next:a.toolbar.next)||d.toolbox.toolbars[0]:(c?c.previous:a.toolbar.previous)||d.toolbox.toolbars[d.toolbox.toolbars.length-1],c.items.length)for(a=c.items[e?c.items.length-1:0];a&&!a.focus;)(a=e?a.previous:a.next)||(c=0);a&&a.focus();return!1;case q:c=a;do c=c.next,!c&&n&&(c=a.toolbar.items[0]);while(c&&!c.focus);\nc?c.focus():l(a,9);return!1;case 40:return a.button&&a.button.hasArrow?(d.once(\"panelShow\",function(a){a.data._.panel._.currentBlock.onKeyDown(40)}),a.execute()):l(a,40==b?q:g),!1;case g:case 38:c=a;do c=c.previous,!c&&n&&(c=a.toolbar.items[a.toolbar.items.length-1]);while(c&&!c.focus);c?c.focus():(e=1,l(a,CKEDITOR.SHIFT+9),e=0);return!1;case 27:return d.focus(),!1;case 13:case 32:return a.execute(),!1}return!0};d.on(\"uiSpace\",function(c){if(c.data.space==d.config.toolbarLocation){c.removeListener();\nd.toolbox=new b;var e=CKEDITOR.tools.getNextId(),k=['\\x3cspan id\\x3d\"',e,'\" class\\x3d\"cke_voice_label\"\\x3e',d.lang.toolbar.toolbars,\"\\x3c/span\\x3e\",'\\x3cspan id\\x3d\"'+d.ui.spaceId(\"toolbox\")+'\" class\\x3d\"cke_toolbox\" role\\x3d\"group\" aria-labelledby\\x3d\"',e,'\" onmousedown\\x3d\"return false;\"\\x3e'],e=!1!==d.config.toolbarStartupExpanded,g,m;d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&k.push('\\x3cspan class\\x3d\"cke_toolbox_main\"'+(e?\"\\x3e\":' style\\x3d\"display:none\"\\x3e'));\nfor(var q=d.toolbox.toolbars,r=a(d),p=0;p<r.length;p++){var u,v=0,w,z=r[p],B;if(z)if(g&&(k.push(\"\\x3c/span\\x3e\"),m=g=0),\"/\"===z)k.push('\\x3cspan class\\x3d\"cke_toolbar_break\"\\x3e\\x3c/span\\x3e');else{B=z.items||z;for(var t=0;t<B.length;t++){var y=B[t],C;if(y){var x=function(a){a=a.render(d,k);A=v.items.push(a)-1;0<A&&(a.previous=v.items[A-1],a.previous.next=a);a.toolbar=v;a.onkey=l;a.onfocus=function(){d.toolbox.focusCommandExecuted||d.focus()}};if(y.type==CKEDITOR.UI_SEPARATOR)m=g&&y;else{C=!1!==y.canGroup;\nif(!v){u=CKEDITOR.tools.getNextId();v={id:u,items:[]};w=z.name&&(d.lang.toolbar.toolbarGroups[z.name]||z.name);k.push('\\x3cspan id\\x3d\"',u,'\" class\\x3d\"cke_toolbar\"',w?' aria-labelledby\\x3d\"'+u+'_label\"':\"\",' role\\x3d\"toolbar\"\\x3e');w&&k.push('\\x3cspan id\\x3d\"',u,'_label\" class\\x3d\"cke_voice_label\"\\x3e',w,\"\\x3c/span\\x3e\");k.push('\\x3cspan class\\x3d\"cke_toolbar_start\"\\x3e\\x3c/span\\x3e');var A=q.push(v)-1;0<A&&(v.previous=q[A-1],v.previous.next=v)}C?g||(k.push('\\x3cspan class\\x3d\"cke_toolgroup\" role\\x3d\"presentation\"\\x3e'),\ng=1):g&&(k.push(\"\\x3c/span\\x3e\"),g=0);m&&(x(m),m=0);x(y)}}}g&&(k.push(\"\\x3c/span\\x3e\"),m=g=0);v&&k.push('\\x3cspan class\\x3d\"cke_toolbar_end\"\\x3e\\x3c/span\\x3e\\x3c/span\\x3e')}}d.config.toolbarCanCollapse&&k.push(\"\\x3c/span\\x3e\");if(d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var D=CKEDITOR.tools.addFunction(function(){d.execCommand(\"toolbarCollapse\")});d.on(\"destroy\",function(){CKEDITOR.tools.removeFunction(D)});d.addCommand(\"toolbarCollapse\",{readOnly:1,exec:function(a){var b=\na.ui.space(\"toolbar_collapser\"),c=b.getPrevious(),d=a.ui.space(\"contents\"),f=c.getParent(),e=parseInt(d.$.style.height,10),g=f.$.offsetHeight,h=b.hasClass(\"cke_toolbox_collapser_min\");h?(c.show(),b.removeClass(\"cke_toolbox_collapser_min\"),b.setAttribute(\"title\",a.lang.toolbar.toolbarCollapse)):(c.hide(),b.addClass(\"cke_toolbox_collapser_min\"),b.setAttribute(\"title\",a.lang.toolbar.toolbarExpand));b.getFirst().setText(h?\"â–²\":\"â—€\");d.setStyle(\"height\",e-(f.$.offsetHeight-g)+\"px\");a.fire(\"resize\",{outerHeight:a.container.$.offsetHeight,\ncontentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});d.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),\"toolbarCollapse\");k.push('\\x3ca title\\x3d\"'+(e?d.lang.toolbar.toolbarCollapse:d.lang.toolbar.toolbarExpand)+'\" id\\x3d\"'+d.ui.spaceId(\"toolbar_collapser\")+'\" tabIndex\\x3d\"-1\" class\\x3d\"cke_toolbox_collapser');e||k.push(\" cke_toolbox_collapser_min\");k.push('\" onclick\\x3d\"CKEDITOR.tools.callFunction('+D+')\"\\x3e','\\x3cspan class\\x3d\"cke_arrow\"\\x3e\\x26#9650;\\x3c/span\\x3e',\n\"\\x3c/a\\x3e\")}k.push(\"\\x3c/span\\x3e\");c.data.html+=k.join(\"\")}});d.on(\"destroy\",function(){if(this.toolbox){var a,b=0,c,d,e;for(a=this.toolbox.toolbars;b<a.length;b++)for(d=a[b].items,c=0;c<d.length;c++)e=d[c],e.clickFn&&CKEDITOR.tools.removeFunction(e.clickFn),e.keyDownFn&&CKEDITOR.tools.removeFunction(e.keyDownFn)}});d.on(\"uiReady\",function(){var a=d.ui.space(\"toolbox\");a&&d.focusManager.add(a,1)});d.addCommand(\"toolbarFocus\",c);d.setKeystroke(CKEDITOR.ALT+121,\"toolbarFocus\");d.ui.add(\"-\",CKEDITOR.UI_SEPARATOR,\n{});d.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('\\x3cspan class\\x3d\"cke_toolbar_separator\" role\\x3d\"separator\"\\x3e\\x3c/span\\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,c){var f=e(this.editor),h=0===b,k={name:a};if(c){if(c=CKEDITOR.tools.search(f,function(a){return a.name==c})){!c.groups&&(c.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(c.groups,b),0<=b)){c.groups.splice(b+1,0,a);return}h?c.groups.splice(0,0,a):c.groups.push(a);\nreturn}b=null}b&&(b=CKEDITOR.tools.indexOf(f,function(a){return a.name==b}));h?f.splice(0,0,a):\"number\"==typeof b?f.splice(b+1,0,k):f.push(a)}}(),CKEDITOR.UI_SEPARATOR=\"separator\",CKEDITOR.config.toolbarLocation=\"top\",\"use strict\",function(){var a=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],e={8:1,46:1};CKEDITOR.plugins.add(\"undo\",{init:function(c){function d(a){g.enabled&&!1!==a.data.command.canUndo&&g.save()}function e(){g.enabled=c.readOnly?!1:\"wysiwyg\"==c.mode;g.onChange()}\nvar g=c.undoManager=new b(c),l=g.editingHandler=new m(g),q=c.addCommand(\"undo\",{exec:function(){g.undo()&&(c.selectionChange(),this.fire(\"afterUndo\"))},startDisabled:!0,canUndo:!1}),r=c.addCommand(\"redo\",{exec:function(){g.redo()&&(c.selectionChange(),this.fire(\"afterRedo\"))},startDisabled:!0,canUndo:!1});c.setKeystroke([[a[0],\"undo\"],[a[1],\"redo\"],[a[2],\"redo\"]]);g.onChange=function(){q.setState(g.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);r.setState(g.redoable()?CKEDITOR.TRISTATE_OFF:\nCKEDITOR.TRISTATE_DISABLED)};c.on(\"beforeCommandExec\",d);c.on(\"afterCommandExec\",d);c.on(\"saveSnapshot\",function(a){g.save(a.data&&a.data.contentOnly)});c.on(\"contentDom\",l.attachListeners,l);c.on(\"instanceReady\",function(){c.fire(\"saveSnapshot\")});c.on(\"beforeModeUnload\",function(){\"wysiwyg\"==c.mode&&g.save(!0)});c.on(\"mode\",e);c.on(\"readOnly\",e);c.ui.addButton&&(c.ui.addButton(\"Undo\",{label:c.lang.undo.undo,command:\"undo\",toolbar:\"undo,10\"}),c.ui.addButton(\"Redo\",{label:c.lang.undo.redo,command:\"redo\",\ntoolbar:\"undo,20\"}));c.resetUndo=function(){g.reset();c.fire(\"saveSnapshot\")};c.on(\"updateSnapshot\",function(){g.currentImage&&g.update()});c.on(\"lockSnapshot\",function(a){a=a.data;g.lock(a&&a.dontUpdate,a&&a.forceUpdate)});c.on(\"unlockSnapshot\",g.unlock,g)}});CKEDITOR.plugins.undo={};var b=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this.editor=a;this.reset()};b.prototype=\n{type:function(a,c){var d=b.getKeyGroup(a),e=this.strokesRecorded[d]+1;c=c||e>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());c?(e=0,this.editor.fire(\"saveSnapshot\")):this.editor.fire(\"change\");this.strokesRecorded[d]=e;this.previousKeyGroup=d},keyGroupChanged:function(a){return b.getKeyGroup(a)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},\nresetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,b,d){var e=this.editor;if(this.locked||\"ready\"!=e.status||\"wysiwyg\"!=e.mode)return!1;var l=e.editable();if(!l||\"ready\"!=l.status)return!1;l=this.snapshots;b||(b=new c(e));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||\nb.equalsSelection(this.currentImage))return!1}else!1!==d&&e.fire(\"change\");l.splice(this.index+1,l.length-this.index-1);l.length==this.limit&&l.shift();this.index=l.push(b)-1;this.currentImage=b;!1!==d&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,c;a.bookmarks&&(b.focus(),c=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?c.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),\nc.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();b.fire(\"change\")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,d;if(c)if(a)for(d=this.index-1;0<=d;d--){if(a=b[d],!c.equalsContent(a))return a.index=d,a}else for(d=this.index+1;d<b.length;d++)if(a=b[d],!c.equalsContent(a))return a.index=d,a;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},\nundo:function(){if(this.undoable()){this.save(!0);var a=this.getNextImage(!0);if(a)return this.restoreImage(a),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var a=this.getNextImage(!1);if(a)return this.restoreImage(a),!0}return!1},update:function(a){if(!this.locked){a||(a=new c(this.editor));for(var b=this.index,d=this.snapshots;0<b&&this.currentImage.equalsContent(d[b-1]);)--b;d.splice(b,this.index-b+1,a);this.index=b;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return!1;\nvar b=this.snapshots,c=b[b.length-1];return c.equalsContent(a)&&!c.equalsSelection(a)?(this.currentImage=b[b.length-1]=a,!0):!1},lock:function(a,b){if(this.locked)this.locked.level++;else if(a)this.locked={level:1};else{var d=null;if(b)d=!0;else{var e=new c(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(e)&&(d=e)}this.locked={update:d,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var a=this.locked.update;this.locked=null;if(!0===a)this.update();else if(a){var b=\nnew c(this.editor,!0);a.equalsContent(b)||this.update()}}}};b.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};b.keyGroups={PRINTABLE:0,FUNCTIONAL:1};b.isNavigationKey=function(a){return!!b.navigationKeyCodes[a]};b.getKeyGroup=function(a){var c=b.keyGroups;return e[a]?c.FUNCTIONAL:c.PRINTABLE};b.getOppositeKeyGroup=function(a){var c=b.keyGroups;return a==c.FUNCTIONAL?c.PRINTABLE:c.FUNCTIONAL};b.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&b.getKeyGroup(a)==b.keyGroups.FUNCTIONAL};\nvar c=CKEDITOR.plugins.undo.Image=function(a,b){this.editor=a;a.fire(\"beforeUndoImage\");var c=a.getSnapshot();CKEDITOR.env.ie&&c&&(c=c.replace(/\\s+data-cke-expando=\".*?\"/g,\"\"));this.contents=c;b||(this.bookmarks=(c=c&&a.getSelection())&&c.createBookmarks2(!0));a.fire(\"afterUndoImage\")},d=/\\b(?:href|src|name)=\"[^\"]*?\"/gi;c.prototype={equalsContent:function(a){var b=this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(b=b.replace(d,\"\"),a=a.replace(d,\"\"));return b!=\na?!1:!0},equalsSelection:function(a){var b=this.bookmarks;a=a.bookmarks;if(b||a){if(!b||!a||b.length!=a.length)return!1;for(var c=0;c<b.length;c++){var d=b[c],e=a[c];if(d.startOffset!=e.startOffset||d.endOffset!=e.endOffset||!CKEDITOR.tools.arrayCompare(d.start,e.start)||!CKEDITOR.tools.arrayCompare(d.end,e.end))return!1}}return!0}};var m=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new l;this.lastKeydownImage=null};m.prototype=\n{onKeydown:function(d){var e=d.data.getKey();if(229!==e)if(-1<CKEDITOR.tools.indexOf(a,d.data.getKeystroke()))d.data.preventDefault();else if(this.keyEventsStack.cleanUp(d),d=this.undoManager,this.keyEventsStack.getLast(e)||this.keyEventsStack.push(e),this.lastKeydownImage=new c(d.editor),b.isNavigationKey(e)||this.undoManager.keyGroupChanged(e))if(d.strokesRecorded[0]||d.strokesRecorded[1])d.save(!1,this.lastKeydownImage,!1),d.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=\n!1;else{var a=this.keyEventsStack.getLast();a||(a=this.keyEventsStack.push(0));this.keyEventsStack.increment(a.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var d=this.undoManager;a=a.data.getKey();var e=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);if(!(b.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new c(d.editor,\n!0))))if(0<e)d.type(a);else if(b.isNavigationKey(a))this.onNavigationKey(!0)},onNavigationKey:function(a){var b=this.undoManager;!a&&b.save(!0,null,!1)||b.updateSelection(new c(b.editor));b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},attachListeners:function(){var a=this.undoManager.editor,c=a.editable(),d=this;c.attachListener(c,\"keydown\",function(a){d.onKeydown(a);if(b.ieFunctionalKeysBug(a.data.getKey()))d.onInput()},null,null,999);c.attachListener(c,CKEDITOR.env.ie?\n\"keypress\":\"input\",d.onInput,d,null,999);c.attachListener(c,\"keyup\",d.onKeyup,d,null,999);c.attachListener(c,\"paste\",d.ignoreInputEventListener,d,null,999);c.attachListener(c,\"drop\",d.ignoreInputEventListener,d,null,999);c.attachListener(c.isInline()?c:a.document.getDocumentElement(),\"click\",function(){d.onNavigationKey()},null,null,999);c.attachListener(this.undoManager.editor,\"blur\",function(){d.keyEventsStack.remove(9)},null,null,999)}};var l=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=\n[]};l.prototype={push:function(a){a=this.stack.push({keyCode:a,inputs:0});return this.stack[a-1]},getLastIndex:function(a){if(\"number\"!=typeof a)return this.stack.length-1;for(var b=this.stack.length;b--;)if(this.stack[b].keyCode==a)return b;return-1},getLast:function(a){a=this.getLastIndex(a);return-1!=a?this.stack[a]:null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);-1!=a&&this.stack.splice(a,1)},resetInputs:function(a){if(\"number\"==typeof a)this.getLast(a).inputs=\n0;else for(a=this.stack.length;a--;)this.stack[a].inputs=0},getTotalInputs:function(){for(var a=this.stack.length,b=0;a--;)b+=this.stack[a].inputs;return b},cleanUp:function(a){a=a.data.$;a.ctrlKey||a.metaKey||this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}}(),CKEDITOR.plugins.add(\"wsc\",{requires:\"dialog\",parseApi:function(a){a.config.wsc_onFinish=\"function\"===typeof a.config.wsc_onFinish?a.config.wsc_onFinish:function(){};a.config.wsc_onClose=\"function\"===typeof a.config.wsc_onClose?\na.config.wsc_onClose:function(){}},parseConfig:function(a){a.config.wsc_customerId=a.config.wsc_customerId||CKEDITOR.config.wsc_customerId||\"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk\";a.config.wsc_customDictionaryIds=a.config.wsc_customDictionaryIds||CKEDITOR.config.wsc_customDictionaryIds||\"\";a.config.wsc_userDictionaryName=a.config.wsc_userDictionaryName||CKEDITOR.config.wsc_userDictionaryName||\"\";a.config.wsc_customLoaderScript=a.config.wsc_customLoaderScript||CKEDITOR.config.wsc_customLoaderScript;\nCKEDITOR.config.wsc_cmd=a.config.wsc_cmd||CKEDITOR.config.wsc_cmd||\"spell\";CKEDITOR.config.wsc_version=\"v4.3.0-master-d769233\";CKEDITOR.config.wsc_removeGlobalVariable=!0},init:function(a){var e=CKEDITOR.env;this.parseConfig(a);this.parseApi(a);a.addCommand(\"checkspell\",new CKEDITOR.dialogCommand(\"checkspell\")).modes={wysiwyg:!CKEDITOR.env.opera&&!CKEDITOR.env.air&&document.domain==window.location.hostname&&!(e.ie&&(8>e.version||e.quirks))};\"undefined\"==typeof a.plugins.scayt&&a.ui.addButton&&a.ui.addButton(\"SpellChecker\",\n{label:a.lang.wsc.toolbar,click:function(a){var c=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.container.getText():a.document.getBody().getText();(c=c.replace(/\\s/g,\"\"))?a.execCommand(\"checkspell\"):alert(\"Nothing to check!\")},toolbar:\"spellchecker,10\"});CKEDITOR.dialog.add(\"checkspell\",this.path+(CKEDITOR.env.ie&&7>=CKEDITOR.env.version?\"dialogs/wsc_ie.js\":window.postMessage?\"dialogs/wsc.js\":\"dialogs/wsc_ie.js\"))}}),function(){function a(a){function b(a){var c=!1;g.attachListener(g,\"keydown\",function(){var b=\nf.getBody().getElementsByTag(a);if(!c){for(var d=0;d<b.count();d++)b.getItem(d).setCustomData(\"retain\",!0);c=!0}},null,null,1);g.attachListener(g,\"keyup\",function(){var b=f.getElementsByTag(a);c&&(1!=b.count()||b.getItem(0).getCustomData(\"retain\")||b.getItem(0).remove(1),c=!1)})}var c=this.editor,f=a.document,h=f.body,k=f.getElementById(\"cke_actscrpt\");k&&k.parentNode.removeChild(k);(k=f.getElementById(\"cke_shimscrpt\"))&&k.parentNode.removeChild(k);(k=f.getElementById(\"cke_basetagscrpt\"))&&k.parentNode.removeChild(k);\nh.contentEditable=!0;CKEDITOR.env.ie&&(h.hideFocus=!0,h.disabled=!0,h.removeAttribute(\"disabled\"));delete this._.isLoadingData;this.$=h;f=new CKEDITOR.dom.document(f);this.setup();this.fixInitialSelection();var g=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&f.getDocumentElement().addClass(f.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&c.enterMode!=CKEDITOR.ENTER_P?b(\"p\"):CKEDITOR.env.edge&&c.enterMode!=CKEDITOR.ENTER_DIV&&b(\"div\");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)f.getDocumentElement().on(\"mousedown\",\nfunction(a){a.data.getTarget().is(\"html\")&&setTimeout(function(){c.editable().focus()})});e(c);try{c.document.$.execCommand(\"2D-position\",!1,!0)}catch(n){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&\"CSS1Compat\"==c.document.$.compatMode)&&this.attachListener(this,\"keydown\",function(a){var b=a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){c.getSelection().scrollIntoView()},0);else if(c.window.$.innerHeight>this.$.offsetHeight){var d=c.createRange();d[33==b?\"moveToElementEditStart\":\n\"moveToElementEditEnd\"](this);d.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(f,\"blur\",function(){try{f.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(f,\"touchend\",function(){a.focus()});h=c.document.getElementsByTag(\"title\").getItem(0);h.data(\"cke-title\",h.getText());CKEDITOR.env.ie&&(c.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){\"unloaded\"==this.status&&(this.status=\"ready\");c.fire(\"contentDom\");this._.isPendingFocus&&\n(c.focus(),this._.isPendingFocus=!1);setTimeout(function(){c.fire(\"dataReady\")},0)},0,this)}function e(a){function b(){var e;a.editable().attachListener(a,\"selectionChange\",function(){var b=a.getSelection().getSelectedElement();b&&(e&&(e.detachEvent(\"onresizestart\",c),e=null),b.$.attachEvent(\"onresizestart\",c),e=b.$)})}function c(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var e=a.document.$;e.execCommand(\"enableObjectResizing\",!1,!a.config.disableObjectResizing);e.execCommand(\"enableInlineTableEditing\",\n!1,!a.config.disableNativeTableHandles)}catch(h){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&b(a)}function b(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push(\"html.CSS1Compat [contenteditable\\x3dfalse]{min-height:0 !important}\");var b=[],c;for(c in CKEDITOR.dtd.$removeEmpty)b.push(\"html.CSS1Compat \"+c+\"[contenteditable\\x3dfalse]\");a.push(b.join(\",\")+\"{display:inline-block}\")}else CKEDITOR.env.gecko&&(a.push(\"html{height:100% !important}\"),a.push(\"img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}\"));\na.push(\"html{cursor:text;*cursor:auto}\");a.push(\"img,input,textarea{cursor:default}\");return a.join(\"\\n\")}CKEDITOR.plugins.add(\"wysiwygarea\",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:\"html head title; style [media,type]; body (*)[id]; meta link [*]\",requiredContent:\"body\"});a.addMode(\"wysiwyg\",function(b){function e(f){f&&f.removeListener();a.editable(new c(a,h.$.contentWindow.document.body));a.setData(a.getData(1),b)}var f=\"document.open();\"+(CKEDITOR.env.ie?\"(\"+CKEDITOR.tools.fixDomain+\n\")();\":\"\")+\"document.close();\",f=CKEDITOR.env.air?\"javascript:void(0)\":CKEDITOR.env.ie&&!CKEDITOR.env.edge?\"javascript:void(function(){\"+encodeURIComponent(f)+\"}())\":\"\",h=CKEDITOR.dom.element.createFromHtml('\\x3ciframe src\\x3d\"'+f+'\" frameBorder\\x3d\"0\"\\x3e\\x3c/iframe\\x3e');h.setStyles({width:\"100%\",height:\"100%\"});h.addClass(\"cke_wysiwyg_frame\").addClass(\"cke_reset\");f=a.ui.space(\"contents\");f.append(h);var k=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(k)h.on(\"load\",e);var g=a.title,\nn=a.fire(\"ariaEditorHelpLabel\",{}).label;g&&(CKEDITOR.env.ie&&n&&(g+=\", \"+n),h.setAttribute(\"title\",g));if(n){var g=CKEDITOR.tools.getNextId(),q=CKEDITOR.dom.element.createFromHtml('\\x3cspan id\\x3d\"'+g+'\" class\\x3d\"cke_voice_label\"\\x3e'+n+\"\\x3c/span\\x3e\");f.append(q,1);h.setAttribute(\"aria-describedby\",g)}a.on(\"beforeModeUnload\",function(a){a.removeListener();q&&q.remove()});h.setAttributes({tabIndex:a.tabIndex,allowTransparency:\"true\"});!k&&e();a.fire(\"ariaWidget\",h)})}});CKEDITOR.editor.prototype.addContentsCss=\nfunction(a){var b=this.config,c=b.contentsCss;CKEDITOR.tools.isArray(c)||(b.contentsCss=c?[c]:[]);b.contentsCss.push(a)};var c=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(a,0,this,b)},this);this._.docTitle=this.getWindow().getFrame().getAttribute(\"title\")},base:CKEDITOR.editable,proto:{setData:function(a,c){var e=this.editor;if(c)this.setHtml(a),this.fixInitialSelection(),e.fire(\"dataReady\");\nelse{this._.isLoadingData=!0;e._.dataStore={id:1};var f=e.config,h=f.fullPage,k=f.docType,g=CKEDITOR.tools.buildStyleHtml(b()).replace(/<style>/,'\\x3cstyle data-cke-temp\\x3d\"1\"\\x3e');h||(g+=CKEDITOR.tools.buildStyleHtml(e.config.contentsCss));var n=f.baseHref?'\\x3cbase href\\x3d\"'+f.baseHref+'\" data-cke-temp\\x3d\"1\" /\\x3e':\"\";h&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){e.docType=k=a;return\"\"}).replace(/<\\?xml\\s[^\\?]*\\?>/i,function(a){e.xmlDeclaration=a;return\"\"}));a=e.dataProcessor.toHtml(a);h?(/<body[\\s|>]/.test(a)||\n(a=\"\\x3cbody\\x3e\"+a),/<html[\\s|>]/.test(a)||(a=\"\\x3chtml\\x3e\"+a+\"\\x3c/html\\x3e\"),/<head[\\s|>]/.test(a)?/<title[\\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,\"$\\x26\\x3ctitle\\x3e\\x3c/title\\x3e\")):a=a.replace(/<html[^>]*>/,\"$\\x26\\x3chead\\x3e\\x3ctitle\\x3e\\x3c/title\\x3e\\x3c/head\\x3e\"),n&&(a=a.replace(/<head[^>]*?>/,\"$\\x26\"+n)),a=a.replace(/<\\/head\\s*>/,g+\"$\\x26\"),a=k+a):a=f.docType+'\\x3chtml dir\\x3d\"'+f.contentsLangDirection+'\" lang\\x3d\"'+(f.contentsLanguage||e.langCode)+'\"\\x3e\\x3chead\\x3e\\x3ctitle\\x3e'+\nthis._.docTitle+\"\\x3c/title\\x3e\"+n+g+\"\\x3c/head\\x3e\\x3cbody\"+(f.bodyId?' id\\x3d\"'+f.bodyId+'\"':\"\")+(f.bodyClass?' class\\x3d\"'+f.bodyClass+'\"':\"\")+\"\\x3e\"+a+\"\\x3c/body\\x3e\\x3c/html\\x3e\";CKEDITOR.env.gecko&&(a=a.replace(/<body/,'\\x3cbody contenteditable\\x3d\"true\" '),2E4>CKEDITOR.env.version&&(a=a.replace(/<body[^>]*>/,\"$\\x26\\x3c!-- cke-content-start --\\x3e\")));f='\\x3cscript id\\x3d\"cke_actscrpt\" type\\x3d\"text/javascript\"'+(CKEDITOR.env.ie?' defer\\x3d\"defer\" ':\"\")+\"\\x3evar wasLoaded\\x3d0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction(\"+\nthis._.frameLoadedHandler+\",window);wasLoaded\\x3d1;}\"+(CKEDITOR.env.ie?\"onload();\":'document.addEventListener(\"DOMContentLoaded\", onload, false );')+\"\\x3c/script\\x3e\";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(f+='\\x3cscript id\\x3d\"cke_shimscrpt\"\\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\\x3c/script\\x3e');n&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(f+='\\x3cscript id\\x3d\"cke_basetagscrpt\"\\x3evar baseTag \\x3d document.querySelector( \"base\" );baseTag.href \\x3d baseTag.href;\\x3c/script\\x3e');\na=a.replace(/(?=\\s*<\\/(:?head)>)/,f);this.clearCustomData();this.clearListeners();e.fire(\"contentDomUnload\");var q=this.getDocument();try{q.write(a)}catch(r){setTimeout(function(){q.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var b=a.config,c=b.fullPage,e=c&&a.docType,h=c&&a.xmlDeclaration,k=this.getDocument(),c=c?k.getDocumentElement().getOuterHtml():k.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/<br>(?=\\s*(:?$|<\\/body>))/,\n\"\"));c=a.dataProcessor.toDataFormat(c);h&&(c=h+\"\\n\"+c);e&&(c=e+\"\\n\"+c);return c},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:c.baseProto.focus.call(this)},detach:function(){var a=this.editor,b=a.document,e;try{e=a.window.getFrame()}catch(f){}c.baseProto.detach.call(this);this.clearCustomData();b.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);e&&e.getParent()?(e.clearCustomData(),(a=e.removeCustomData(\"onResize\"))&&a.removeListener(),\ne.remove()):CKEDITOR.warn(\"editor-destroy-iframe\")}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.plugins=\"dialogui,dialog,a11yhelp,about,basicstyles,blockquote,clipboard,panel,floatpanel,menu,contextmenu,elementspath,indent,indentlist,list,enterkey,entities,popup,filebrowser,floatingspace,listblock,button,richcombo,format,horizontalrule,htmlwriter,image,fakeobjects,link,magicline,maximize,pastefromword,pastetext,removeformat,resize,menubutton,scayt,showborders,sourcearea,specialchar,stylescombo,tab,table,tabletools,toolbar,undo,wsc,wysiwygarea\",\nCKEDITOR.config.skin=\"moono\",function(){var a=function(a,b){var c=CKEDITOR.getUrl(\"plugins/\"+b);a=a.split(\",\");for(var d=0;d<a.length;d++)CKEDITOR.skin.icons[a[d]]={path:c,offset:-a[++d],bgsize:a[++d]}};CKEDITOR.env.hidpi?a(\"about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,codesnippet,384,,bgcolor,408,,textcolor,432,,creatediv,456,,docprops-rtl,480,,docprops,504,,embed,528,,embedsemantic,552,,find-rtl,576,,find,600,,replace,624,,flash,648,,button,672,,checkbox,696,,form,720,,hiddenfield,744,,imagebutton,768,,radio,792,,select-rtl,816,,select,840,,textarea-rtl,864,,textarea,888,,textfield-rtl,912,,textfield,936,,horizontalrule,960,,iframe,984,,image,1008,,indent-rtl,1032,,indent,1056,,outdent-rtl,1080,,outdent,1104,,justifyblock,1128,,justifycenter,1152,,justifyleft,1176,,justifyright,1200,,language,1224,,anchor-rtl,1248,,anchor,1272,,link,1296,,unlink,1320,,bulletedlist-rtl,1344,,bulletedlist,1368,,numberedlist-rtl,1392,,numberedlist,1416,,mathjax,1440,,maximize,1464,,newpage-rtl,1488,,newpage,1512,,pagebreak-rtl,1536,,pagebreak,1560,,pastefromword-rtl,1584,,pastefromword,1608,,pastetext-rtl,1632,,pastetext,1656,,placeholder,1680,,preview-rtl,1704,,preview,1728,,print,1752,,removeformat,1776,,save,1800,,scayt,1824,,selectall,1848,,showblocks-rtl,1872,,showblocks,1896,,smiley,1920,,source-rtl,1944,,source,1968,,sourcedialog-rtl,1992,,sourcedialog,2016,,specialchar,2040,,table,2064,,templates-rtl,2088,,templates,2112,,uicolor,2136,,redo-rtl,2160,,redo,2184,,undo-rtl,2208,,undo,2232,,simplebox,4512,auto,spellchecker,2280,\",\n\"icons_hidpi.png\"):a(\"about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,codesnippet,384,auto,bgcolor,408,auto,textcolor,432,auto,creatediv,456,auto,docprops-rtl,480,auto,docprops,504,auto,embed,528,auto,embedsemantic,552,auto,find-rtl,576,auto,find,600,auto,replace,624,auto,flash,648,auto,button,672,auto,checkbox,696,auto,form,720,auto,hiddenfield,744,auto,imagebutton,768,auto,radio,792,auto,select-rtl,816,auto,select,840,auto,textarea-rtl,864,auto,textarea,888,auto,textfield-rtl,912,auto,textfield,936,auto,horizontalrule,960,auto,iframe,984,auto,image,1008,auto,indent-rtl,1032,auto,indent,1056,auto,outdent-rtl,1080,auto,outdent,1104,auto,justifyblock,1128,auto,justifycenter,1152,auto,justifyleft,1176,auto,justifyright,1200,auto,language,1224,auto,anchor-rtl,1248,auto,anchor,1272,auto,link,1296,auto,unlink,1320,auto,bulletedlist-rtl,1344,auto,bulletedlist,1368,auto,numberedlist-rtl,1392,auto,numberedlist,1416,auto,mathjax,1440,auto,maximize,1464,auto,newpage-rtl,1488,auto,newpage,1512,auto,pagebreak-rtl,1536,auto,pagebreak,1560,auto,pastefromword-rtl,1584,auto,pastefromword,1608,auto,pastetext-rtl,1632,auto,pastetext,1656,auto,placeholder,1680,auto,preview-rtl,1704,auto,preview,1728,auto,print,1752,auto,removeformat,1776,auto,save,1800,auto,scayt,1824,auto,selectall,1848,auto,showblocks-rtl,1872,auto,showblocks,1896,auto,smiley,1920,auto,source-rtl,1944,auto,source,1968,auto,sourcedialog-rtl,1992,auto,sourcedialog,2016,auto,specialchar,2040,auto,table,2064,auto,templates-rtl,2088,auto,templates,2112,auto,uicolor,2136,auto,redo-rtl,2160,auto,redo,2184,auto,undo-rtl,2208,auto,undo,2232,auto,simplebox,2256,auto,spellchecker,2280,auto\",\n\"icons.png\")}())})();","/*!\n * Cropper v3.0.0\n * https://github.com/fengyuanchen/cropper\n *\n * Copyright (c) 2017 Fengyuan Chen\n * Released under the MIT license\n *\n * Date: 2017-09-03T13:13:53.439Z\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :\n\ttypeof define === 'function' && define.amd ? define(['jquery'], factory) :\n\t(factory(global.jQuery));\n}(this, (function ($) { 'use strict';\n\n$ = $ && $.hasOwnProperty('default') ? $['default'] : $;\n\nvar DEFAULTS = {\n // Define the view mode of the cropper\n viewMode: 0, // 0, 1, 2, 3\n\n // Define the dragging mode of the cropper\n dragMode: 'crop', // 'crop', 'move' or 'none'\n\n // Define the aspect ratio of the crop box\n aspectRatio: NaN,\n\n // An object with the previous cropping result data\n data: null,\n\n // A selector for adding extra containers to preview\n preview: '',\n\n // Re-render the cropper when resize the window\n responsive: true,\n\n // Restore the cropped area after resize the window\n restore: true,\n\n // Check if the current image is a cross-origin image\n checkCrossOrigin: true,\n\n // Check the current image's Exif Orientation information\n checkOrientation: true,\n\n // Show the black modal\n modal: true,\n\n // Show the dashed lines for guiding\n guides: true,\n\n // Show the center indicator for guiding\n center: true,\n\n // Show the white modal to highlight the crop box\n highlight: true,\n\n // Show the grid background\n background: true,\n\n // Enable to crop the image automatically when initialize\n autoCrop: true,\n\n // Define the percentage of automatic cropping area when initializes\n autoCropArea: 0.8,\n\n // Enable to move the image\n movable: true,\n\n // Enable to rotate the image\n rotatable: true,\n\n // Enable to scale the image\n scalable: true,\n\n // Enable to zoom the image\n zoomable: true,\n\n // Enable to zoom the image by dragging touch\n zoomOnTouch: true,\n\n // Enable to zoom the image by wheeling mouse\n zoomOnWheel: true,\n\n // Define zoom ratio when zoom the image by wheeling mouse\n wheelZoomRatio: 0.1,\n\n // Enable to move the crop box\n cropBoxMovable: true,\n\n // Enable to resize the crop box\n cropBoxResizable: true,\n\n // Toggle drag mode between \"crop\" and \"move\" when click twice on the cropper\n toggleDragModeOnDblclick: true,\n\n // Size limitation\n minCanvasWidth: 0,\n minCanvasHeight: 0,\n minCropBoxWidth: 0,\n minCropBoxHeight: 0,\n minContainerWidth: 200,\n minContainerHeight: 100,\n\n // Shortcuts of events\n ready: null,\n cropstart: null,\n cropmove: null,\n cropend: null,\n crop: null,\n zoom: null\n};\n\nvar TEMPLATE = '<div class=\"cropper-container\">' + '<div class=\"cropper-wrap-box\">' + '<div class=\"cropper-canvas\"></div>' + '</div>' + '<div class=\"cropper-drag-box\"></div>' + '<div class=\"cropper-crop-box\">' + '<span class=\"cropper-view-box\"></span>' + '<span class=\"cropper-dashed dashed-h\"></span>' + '<span class=\"cropper-dashed dashed-v\"></span>' + '<span class=\"cropper-center\"></span>' + '<span class=\"cropper-face\"></span>' + '<span class=\"cropper-line line-e\" data-action=\"e\"></span>' + '<span class=\"cropper-line line-n\" data-action=\"n\"></span>' + '<span class=\"cropper-line line-w\" data-action=\"w\"></span>' + '<span class=\"cropper-line line-s\" data-action=\"s\"></span>' + '<span class=\"cropper-point point-e\" data-action=\"e\"></span>' + '<span class=\"cropper-point point-n\" data-action=\"n\"></span>' + '<span class=\"cropper-point point-w\" data-action=\"w\"></span>' + '<span class=\"cropper-point point-s\" data-action=\"s\"></span>' + '<span class=\"cropper-point point-ne\" data-action=\"ne\"></span>' + '<span class=\"cropper-point point-nw\" data-action=\"nw\"></span>' + '<span class=\"cropper-point point-sw\" data-action=\"sw\"></span>' + '<span class=\"cropper-point point-se\" data-action=\"se\"></span>' + '</div>' + '</div>';\n\nvar REGEXP_DATA_URL_HEAD = /^data:.*,/;\nvar REGEXP_USERAGENT = /(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i;\nvar navigator = typeof window !== 'undefined' ? window.navigator : null;\nvar IS_SAFARI_OR_UIWEBVIEW = navigator && REGEXP_USERAGENT.test(navigator.userAgent);\nvar fromCharCode = String.fromCharCode;\n\nfunction isNumber(n) {\n return typeof n === 'number' && !isNaN(n);\n}\n\nfunction isUndefined(n) {\n return typeof n === 'undefined';\n}\n\nfunction toArray(obj, offset) {\n var args = [];\n\n // This is necessary for IE8\n if (isNumber(offset)) {\n args.push(offset);\n }\n\n return args.slice.apply(obj, args);\n}\n\n// Custom proxy to avoid jQuery's guid\nfunction proxy(fn, context) {\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n return function () {\n for (var _len2 = arguments.length, args2 = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args2[_key2] = arguments[_key2];\n }\n\n return fn.apply(context, args.concat(toArray(args2)));\n };\n}\n\nfunction objectKeys(obj) {\n var keys = [];\n\n $.each(obj, function (key) {\n keys.push(key);\n });\n\n return keys;\n}\n\nfunction isCrossOriginURL(url) {\n var parts = url.match(/^(https?:)\\/\\/([^:/?#]+):?(\\d*)/i);\n\n return parts && (parts[1] !== location.protocol || parts[2] !== location.hostname || parts[3] !== location.port);\n}\n\nfunction addTimestamp(url) {\n var timestamp = 'timestamp=' + new Date().getTime();\n\n return url + (url.indexOf('?') === -1 ? '?' : '&') + timestamp;\n}\n\nfunction getImageSize(image, callback) {\n // Modern browsers (ignore Safari, #120 & #509)\n if (image.naturalWidth && !IS_SAFARI_OR_UIWEBVIEW) {\n callback(image.naturalWidth, image.naturalHeight);\n return;\n }\n\n // IE8: Don't use `new Image()` here (#319)\n var newImage = document.createElement('img');\n\n newImage.onload = function load() {\n callback(this.width, this.height);\n };\n\n newImage.src = image.src;\n}\n\nfunction getTransform(options) {\n var transforms = [];\n var translateX = options.translateX;\n var translateY = options.translateY;\n var rotate = options.rotate;\n var scaleX = options.scaleX;\n var scaleY = options.scaleY;\n\n if (isNumber(translateX) && translateX !== 0) {\n transforms.push('translateX(' + translateX + 'px)');\n }\n\n if (isNumber(translateY) && translateY !== 0) {\n transforms.push('translateY(' + translateY + 'px)');\n }\n\n // Rotate should come first before scale to match orientation transform\n if (isNumber(rotate) && rotate !== 0) {\n transforms.push('rotate(' + rotate + 'deg)');\n }\n\n if (isNumber(scaleX) && scaleX !== 1) {\n transforms.push('scaleX(' + scaleX + ')');\n }\n\n if (isNumber(scaleY) && scaleY !== 1) {\n transforms.push('scaleY(' + scaleY + ')');\n }\n\n return transforms.length ? transforms.join(' ') : 'none';\n}\n\nfunction getRotatedSizes(data, isReversed) {\n var deg = Math.abs(data.degree) % 180;\n var arc = (deg > 90 ? 180 - deg : deg) * Math.PI / 180;\n var sinArc = Math.sin(arc);\n var cosArc = Math.cos(arc);\n var width = data.width;\n var height = data.height;\n var aspectRatio = data.aspectRatio;\n var newWidth = void 0;\n var newHeight = void 0;\n\n if (!isReversed) {\n newWidth = width * cosArc + height * sinArc;\n newHeight = width * sinArc + height * cosArc;\n } else {\n newWidth = width / (cosArc + sinArc / aspectRatio);\n newHeight = newWidth / aspectRatio;\n }\n\n return {\n width: newWidth,\n height: newHeight\n };\n}\n\nfunction getSourceCanvas(image, data, options) {\n var canvas = $('<canvas>')[0];\n var context = canvas.getContext('2d');\n var dstX = 0;\n var dstY = 0;\n var dstWidth = data.naturalWidth;\n var dstHeight = data.naturalHeight;\n var rotate = data.rotate;\n var scaleX = data.scaleX;\n var scaleY = data.scaleY;\n var scalable = isNumber(scaleX) && isNumber(scaleY) && (scaleX !== 1 || scaleY !== 1);\n var rotatable = isNumber(rotate) && rotate !== 0;\n var advanced = rotatable || scalable;\n var canvasWidth = dstWidth * Math.abs(scaleX || 1);\n var canvasHeight = dstHeight * Math.abs(scaleY || 1);\n var translateX = void 0;\n var translateY = void 0;\n var rotated = void 0;\n\n if (scalable) {\n translateX = canvasWidth / 2;\n translateY = canvasHeight / 2;\n }\n\n if (rotatable) {\n rotated = getRotatedSizes({\n width: canvasWidth,\n height: canvasHeight,\n degree: rotate\n });\n\n canvasWidth = rotated.width;\n canvasHeight = rotated.height;\n translateX = canvasWidth / 2;\n translateY = canvasHeight / 2;\n }\n\n canvas.width = canvasWidth;\n canvas.height = canvasHeight;\n\n if (options.fillColor) {\n context.fillStyle = options.fillColor;\n context.fillRect(0, 0, canvasWidth, canvasHeight);\n }\n\n if (advanced) {\n dstX = -dstWidth / 2;\n dstY = -dstHeight / 2;\n\n context.save();\n context.translate(translateX, translateY);\n }\n\n // Rotate should come first before scale as in the \"getTransform\" function\n if (rotatable) {\n context.rotate(rotate * Math.PI / 180);\n }\n\n if (scalable) {\n context.scale(scaleX, scaleY);\n }\n\n context.imageSmoothingEnabled = !!options.imageSmoothingEnabled;\n\n if (options.imageSmoothingQuality) {\n context.imageSmoothingQuality = options.imageSmoothingQuality;\n }\n\n context.drawImage(image, Math.floor(dstX), Math.floor(dstY), Math.floor(dstWidth), Math.floor(dstHeight));\n\n if (advanced) {\n context.restore();\n }\n\n return canvas;\n}\n\nfunction getStringFromCharCode(dataView, start, length) {\n var str = '';\n var i = void 0;\n\n for (i = start, length += start; i < length; i += 1) {\n str += fromCharCode(dataView.getUint8(i));\n }\n\n return str;\n}\n\nfunction getOrientation(arrayBuffer) {\n var dataView = new DataView(arrayBuffer);\n var length = dataView.byteLength;\n var orientation = void 0;\n var exifIDCode = void 0;\n var tiffOffset = void 0;\n var firstIFDOffset = void 0;\n var littleEndian = void 0;\n var endianness = void 0;\n var app1Start = void 0;\n var ifdStart = void 0;\n var offset = void 0;\n var i = void 0;\n\n // Only handle JPEG image (start by 0xFFD8)\n if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8) {\n offset = 2;\n\n while (offset < length) {\n if (dataView.getUint8(offset) === 0xFF && dataView.getUint8(offset + 1) === 0xE1) {\n app1Start = offset;\n break;\n }\n\n offset += 1;\n }\n }\n\n if (app1Start) {\n exifIDCode = app1Start + 4;\n tiffOffset = app1Start + 10;\n\n if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') {\n endianness = dataView.getUint16(tiffOffset);\n littleEndian = endianness === 0x4949;\n\n if (littleEndian || endianness === 0x4D4D /* bigEndian */) {\n if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002A) {\n firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian);\n\n if (firstIFDOffset >= 0x00000008) {\n ifdStart = tiffOffset + firstIFDOffset;\n }\n }\n }\n }\n }\n\n if (ifdStart) {\n length = dataView.getUint16(ifdStart, littleEndian);\n\n for (i = 0; i < length; i += 1) {\n offset = ifdStart + i * 12 + 2;\n\n if (dataView.getUint16(offset, littleEndian) === 0x0112 /* Orientation */) {\n // 8 is the offset of the current tag's value\n offset += 8;\n\n // Get the original orientation value\n orientation = dataView.getUint16(offset, littleEndian);\n\n // Override the orientation with its default value for Safari (#120)\n if (IS_SAFARI_OR_UIWEBVIEW) {\n dataView.setUint16(offset, 1, littleEndian);\n }\n\n break;\n }\n }\n }\n\n return orientation;\n}\n\nfunction dataURLToArrayBuffer(dataURL) {\n var base64 = dataURL.replace(REGEXP_DATA_URL_HEAD, '');\n var binary = atob(base64);\n var length = binary.length;\n var arrayBuffer = new ArrayBuffer(length);\n var dataView = new Uint8Array(arrayBuffer);\n var i = void 0;\n\n for (i = 0; i < length; i += 1) {\n dataView[i] = binary.charCodeAt(i);\n }\n\n return arrayBuffer;\n}\n\n// Only available for JPEG image\nfunction arrayBufferToDataURL(arrayBuffer) {\n var dataView = new Uint8Array(arrayBuffer);\n var length = dataView.length;\n var base64 = '';\n var i = void 0;\n\n for (i = 0; i < length; i += 1) {\n base64 += fromCharCode(dataView[i]);\n }\n\n return 'data:image/jpeg;base64,' + btoa(base64);\n}\n\nvar render = {\n render: function render() {\n var self = this;\n\n self.initContainer();\n self.initCanvas();\n self.initCropBox();\n\n self.renderCanvas();\n\n if (self.cropped) {\n self.renderCropBox();\n }\n },\n initContainer: function initContainer() {\n var self = this;\n var options = self.options;\n var $this = self.$element;\n var $container = self.$container;\n var $cropper = self.$cropper;\n var hidden = 'cropper-hidden';\n\n $cropper.addClass(hidden);\n $this.removeClass(hidden);\n\n $cropper.css(self.container = {\n width: Math.max($container.width(), Number(options.minContainerWidth) || 200),\n height: Math.max($container.height(), Number(options.minContainerHeight) || 100)\n });\n\n $this.addClass(hidden);\n $cropper.removeClass(hidden);\n },\n\n\n // Canvas (image wrapper)\n initCanvas: function initCanvas() {\n var self = this;\n var viewMode = self.options.viewMode;\n var container = self.container;\n var containerWidth = container.width;\n var containerHeight = container.height;\n var image = self.image;\n var imageNaturalWidth = image.naturalWidth;\n var imageNaturalHeight = image.naturalHeight;\n var is90Degree = Math.abs(image.rotate) % 180 === 90;\n var naturalWidth = is90Degree ? imageNaturalHeight : imageNaturalWidth;\n var naturalHeight = is90Degree ? imageNaturalWidth : imageNaturalHeight;\n var aspectRatio = naturalWidth / naturalHeight;\n var canvasWidth = containerWidth;\n var canvasHeight = containerHeight;\n\n if (containerHeight * aspectRatio > containerWidth) {\n if (viewMode === 3) {\n canvasWidth = containerHeight * aspectRatio;\n } else {\n canvasHeight = containerWidth / aspectRatio;\n }\n } else if (viewMode === 3) {\n canvasHeight = containerWidth / aspectRatio;\n } else {\n canvasWidth = containerHeight * aspectRatio;\n }\n\n var canvas = {\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight,\n aspectRatio: aspectRatio,\n width: canvasWidth,\n height: canvasHeight\n };\n\n canvas.left = (containerWidth - canvasWidth) / 2;\n canvas.top = (containerHeight - canvasHeight) / 2;\n canvas.oldLeft = canvas.left;\n canvas.oldTop = canvas.top;\n\n self.canvas = canvas;\n self.limited = viewMode === 1 || viewMode === 2;\n self.limitCanvas(true, true);\n self.initialImage = $.extend({}, image);\n self.initialCanvas = $.extend({}, canvas);\n },\n limitCanvas: function limitCanvas(isSizeLimited, isPositionLimited) {\n var self = this;\n var options = self.options;\n var viewMode = options.viewMode;\n var container = self.container;\n var containerWidth = container.width;\n var containerHeight = container.height;\n var canvas = self.canvas;\n var aspectRatio = canvas.aspectRatio;\n var cropBox = self.cropBox;\n var cropped = self.cropped && cropBox;\n\n if (isSizeLimited) {\n var minCanvasWidth = Number(options.minCanvasWidth) || 0;\n var minCanvasHeight = Number(options.minCanvasHeight) || 0;\n\n if (viewMode) {\n if (viewMode > 1) {\n minCanvasWidth = Math.max(minCanvasWidth, containerWidth);\n minCanvasHeight = Math.max(minCanvasHeight, containerHeight);\n\n if (viewMode === 3) {\n if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n minCanvasWidth = minCanvasHeight * aspectRatio;\n } else {\n minCanvasHeight = minCanvasWidth / aspectRatio;\n }\n }\n } else if (minCanvasWidth) {\n minCanvasWidth = Math.max(minCanvasWidth, cropped ? cropBox.width : 0);\n } else if (minCanvasHeight) {\n minCanvasHeight = Math.max(minCanvasHeight, cropped ? cropBox.height : 0);\n } else if (cropped) {\n minCanvasWidth = cropBox.width;\n minCanvasHeight = cropBox.height;\n\n if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n minCanvasWidth = minCanvasHeight * aspectRatio;\n } else {\n minCanvasHeight = minCanvasWidth / aspectRatio;\n }\n }\n }\n\n if (minCanvasWidth && minCanvasHeight) {\n if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n minCanvasHeight = minCanvasWidth / aspectRatio;\n } else {\n minCanvasWidth = minCanvasHeight * aspectRatio;\n }\n } else if (minCanvasWidth) {\n minCanvasHeight = minCanvasWidth / aspectRatio;\n } else if (minCanvasHeight) {\n minCanvasWidth = minCanvasHeight * aspectRatio;\n }\n\n canvas.minWidth = minCanvasWidth;\n canvas.minHeight = minCanvasHeight;\n canvas.maxWidth = Infinity;\n canvas.maxHeight = Infinity;\n }\n\n if (isPositionLimited) {\n if (viewMode) {\n var newCanvasLeft = containerWidth - canvas.width;\n var newCanvasTop = containerHeight - canvas.height;\n\n canvas.minLeft = Math.min(0, newCanvasLeft);\n canvas.minTop = Math.min(0, newCanvasTop);\n canvas.maxLeft = Math.max(0, newCanvasLeft);\n canvas.maxTop = Math.max(0, newCanvasTop);\n\n if (cropped && self.limited) {\n canvas.minLeft = Math.min(cropBox.left, cropBox.left + cropBox.width - canvas.width);\n canvas.minTop = Math.min(cropBox.top, cropBox.top + cropBox.height - canvas.height);\n canvas.maxLeft = cropBox.left;\n canvas.maxTop = cropBox.top;\n\n if (viewMode === 2) {\n if (canvas.width >= containerWidth) {\n canvas.minLeft = Math.min(0, newCanvasLeft);\n canvas.maxLeft = Math.max(0, newCanvasLeft);\n }\n\n if (canvas.height >= containerHeight) {\n canvas.minTop = Math.min(0, newCanvasTop);\n canvas.maxTop = Math.max(0, newCanvasTop);\n }\n }\n }\n } else {\n canvas.minLeft = -canvas.width;\n canvas.minTop = -canvas.height;\n canvas.maxLeft = containerWidth;\n canvas.maxTop = containerHeight;\n }\n }\n },\n renderCanvas: function renderCanvas(isChanged) {\n var self = this;\n var canvas = self.canvas;\n var image = self.image;\n var rotate = image.rotate;\n var naturalWidth = image.naturalWidth;\n var naturalHeight = image.naturalHeight;\n\n if (self.rotated) {\n self.rotated = false;\n\n // Computes rotated sizes with image sizes\n var rotated = getRotatedSizes({\n width: image.width,\n height: image.height,\n degree: rotate\n });\n var aspectRatio = rotated.width / rotated.height;\n var isSquareImage = image.aspectRatio === 1;\n\n if (isSquareImage || aspectRatio !== canvas.aspectRatio) {\n canvas.left -= (rotated.width - canvas.width) / 2;\n canvas.top -= (rotated.height - canvas.height) / 2;\n canvas.width = rotated.width;\n canvas.height = rotated.height;\n canvas.aspectRatio = aspectRatio;\n canvas.naturalWidth = naturalWidth;\n canvas.naturalHeight = naturalHeight;\n\n // Computes rotated sizes with natural image sizes\n if (isSquareImage && rotate % 90 || rotate % 180) {\n var rotated2 = getRotatedSizes({\n width: naturalWidth,\n height: naturalHeight,\n degree: rotate\n });\n\n canvas.naturalWidth = rotated2.width;\n canvas.naturalHeight = rotated2.height;\n }\n\n self.limitCanvas(true, false);\n }\n }\n\n if (canvas.width > canvas.maxWidth || canvas.width < canvas.minWidth) {\n canvas.left = canvas.oldLeft;\n }\n\n if (canvas.height > canvas.maxHeight || canvas.height < canvas.minHeight) {\n canvas.top = canvas.oldTop;\n }\n\n canvas.width = Math.min(Math.max(canvas.width, canvas.minWidth), canvas.maxWidth);\n canvas.height = Math.min(Math.max(canvas.height, canvas.minHeight), canvas.maxHeight);\n\n self.limitCanvas(false, true);\n\n canvas.left = Math.min(Math.max(canvas.left, canvas.minLeft), canvas.maxLeft);\n canvas.top = Math.min(Math.max(canvas.top, canvas.minTop), canvas.maxTop);\n canvas.oldLeft = canvas.left;\n canvas.oldTop = canvas.top;\n\n self.$canvas.css({\n width: canvas.width,\n height: canvas.height,\n transform: getTransform({\n translateX: canvas.left,\n translateY: canvas.top\n })\n });\n\n self.renderImage();\n\n if (self.cropped && self.limited) {\n self.limitCropBox(true, true);\n }\n\n if (isChanged) {\n self.output();\n }\n },\n renderImage: function renderImage(isChanged) {\n var self = this;\n var canvas = self.canvas;\n var image = self.image;\n var reversed = void 0;\n\n if (image.rotate) {\n reversed = getRotatedSizes({\n width: canvas.width,\n height: canvas.height,\n degree: image.rotate,\n aspectRatio: image.aspectRatio\n }, true);\n }\n\n $.extend(image, reversed ? {\n width: reversed.width,\n height: reversed.height,\n left: (canvas.width - reversed.width) / 2,\n top: (canvas.height - reversed.height) / 2\n } : {\n width: canvas.width,\n height: canvas.height,\n left: 0,\n top: 0\n });\n\n self.$clone.css({\n width: image.width,\n height: image.height,\n transform: getTransform($.extend({\n translateX: image.left,\n translateY: image.top\n }, image))\n });\n\n if (isChanged) {\n self.output();\n }\n },\n initCropBox: function initCropBox() {\n var self = this;\n var options = self.options;\n var canvas = self.canvas;\n var aspectRatio = options.aspectRatio;\n var autoCropArea = Number(options.autoCropArea) || 0.8;\n var cropBox = {\n width: canvas.width,\n height: canvas.height\n };\n\n if (aspectRatio) {\n if (canvas.height * aspectRatio > canvas.width) {\n cropBox.height = cropBox.width / aspectRatio;\n } else {\n cropBox.width = cropBox.height * aspectRatio;\n }\n }\n\n self.cropBox = cropBox;\n self.limitCropBox(true, true);\n\n // Initialize auto crop area\n cropBox.width = Math.min(Math.max(cropBox.width, cropBox.minWidth), cropBox.maxWidth);\n cropBox.height = Math.min(Math.max(cropBox.height, cropBox.minHeight), cropBox.maxHeight);\n\n // The width of auto crop area must large than \"minWidth\", and the height too. (#164)\n cropBox.width = Math.max(cropBox.minWidth, cropBox.width * autoCropArea);\n cropBox.height = Math.max(cropBox.minHeight, cropBox.height * autoCropArea);\n cropBox.left = canvas.left + (canvas.width - cropBox.width) / 2;\n cropBox.top = canvas.top + (canvas.height - cropBox.height) / 2;\n cropBox.oldLeft = cropBox.left;\n cropBox.oldTop = cropBox.top;\n\n self.initialCropBox = $.extend({}, cropBox);\n },\n limitCropBox: function limitCropBox(isSizeLimited, isPositionLimited) {\n var self = this;\n var options = self.options;\n var aspectRatio = options.aspectRatio;\n var container = self.container;\n var containerWidth = container.width;\n var containerHeight = container.height;\n var canvas = self.canvas;\n var cropBox = self.cropBox;\n var limited = self.limited;\n\n if (isSizeLimited) {\n var minCropBoxWidth = Number(options.minCropBoxWidth) || 0;\n var minCropBoxHeight = Number(options.minCropBoxHeight) || 0;\n var maxCropBoxWidth = Math.min(containerWidth, limited ? canvas.width : containerWidth);\n var maxCropBoxHeight = Math.min(containerHeight, limited ? canvas.height : containerHeight);\n\n // The min/maxCropBoxWidth/Height must be less than containerWidth/Height\n minCropBoxWidth = Math.min(minCropBoxWidth, containerWidth);\n minCropBoxHeight = Math.min(minCropBoxHeight, containerHeight);\n\n if (aspectRatio) {\n if (minCropBoxWidth && minCropBoxHeight) {\n if (minCropBoxHeight * aspectRatio > minCropBoxWidth) {\n minCropBoxHeight = minCropBoxWidth / aspectRatio;\n } else {\n minCropBoxWidth = minCropBoxHeight * aspectRatio;\n }\n } else if (minCropBoxWidth) {\n minCropBoxHeight = minCropBoxWidth / aspectRatio;\n } else if (minCropBoxHeight) {\n minCropBoxWidth = minCropBoxHeight * aspectRatio;\n }\n\n if (maxCropBoxHeight * aspectRatio > maxCropBoxWidth) {\n maxCropBoxHeight = maxCropBoxWidth / aspectRatio;\n } else {\n maxCropBoxWidth = maxCropBoxHeight * aspectRatio;\n }\n }\n\n // The minWidth/Height must be less than maxWidth/Height\n cropBox.minWidth = Math.min(minCropBoxWidth, maxCropBoxWidth);\n cropBox.minHeight = Math.min(minCropBoxHeight, maxCropBoxHeight);\n cropBox.maxWidth = maxCropBoxWidth;\n cropBox.maxHeight = maxCropBoxHeight;\n }\n\n if (isPositionLimited) {\n if (limited) {\n cropBox.minLeft = Math.max(0, canvas.left);\n cropBox.minTop = Math.max(0, canvas.top);\n cropBox.maxLeft = Math.min(containerWidth, canvas.left + canvas.width) - cropBox.width;\n cropBox.maxTop = Math.min(containerHeight, canvas.top + canvas.height) - cropBox.height;\n } else {\n cropBox.minLeft = 0;\n cropBox.minTop = 0;\n cropBox.maxLeft = containerWidth - cropBox.width;\n cropBox.maxTop = containerHeight - cropBox.height;\n }\n }\n },\n renderCropBox: function renderCropBox() {\n var self = this;\n var options = self.options;\n var container = self.container;\n var containerWidth = container.width;\n var containerHeight = container.height;\n var cropBox = self.cropBox;\n\n if (cropBox.width > cropBox.maxWidth || cropBox.width < cropBox.minWidth) {\n cropBox.left = cropBox.oldLeft;\n }\n\n if (cropBox.height > cropBox.maxHeight || cropBox.height < cropBox.minHeight) {\n cropBox.top = cropBox.oldTop;\n }\n\n cropBox.width = Math.min(Math.max(cropBox.width, cropBox.minWidth), cropBox.maxWidth);\n cropBox.height = Math.min(Math.max(cropBox.height, cropBox.minHeight), cropBox.maxHeight);\n\n self.limitCropBox(false, true);\n\n cropBox.left = Math.min(Math.max(cropBox.left, cropBox.minLeft), cropBox.maxLeft);\n cropBox.top = Math.min(Math.max(cropBox.top, cropBox.minTop), cropBox.maxTop);\n cropBox.oldLeft = cropBox.left;\n cropBox.oldTop = cropBox.top;\n\n if (options.movable && options.cropBoxMovable) {\n // Turn to move the canvas when the crop box is equal to the container\n self.$face.data('action', cropBox.width === containerWidth && cropBox.height === containerHeight ? 'move' : 'all');\n }\n\n self.$cropBox.css({\n width: cropBox.width,\n height: cropBox.height,\n transform: getTransform({\n translateX: cropBox.left,\n translateY: cropBox.top\n })\n });\n\n if (self.cropped && self.limited) {\n self.limitCanvas(true, true);\n }\n\n if (!self.disabled) {\n self.output();\n }\n },\n output: function output() {\n var self = this;\n\n self.preview();\n\n if (self.completed) {\n self.trigger('crop', self.getData());\n }\n }\n};\n\nvar DATA_PREVIEW = 'preview';\n\nvar preview = {\n initPreview: function initPreview() {\n var self = this;\n var crossOrigin = self.crossOrigin;\n var url = crossOrigin ? self.crossOriginUrl : self.url;\n var image = document.createElement('img');\n\n if (crossOrigin) {\n image.crossOrigin = crossOrigin;\n }\n\n image.src = url;\n\n var $clone2 = $(image);\n\n self.$preview = $(self.options.preview);\n self.$clone2 = $clone2;\n self.$viewBox.html($clone2);\n self.$preview.each(function (i, element) {\n var $this = $(element);\n var img = document.createElement('img');\n\n // Save the original size for recover\n $this.data(DATA_PREVIEW, {\n width: $this.width(),\n height: $this.height(),\n html: $this.html()\n });\n\n if (crossOrigin) {\n img.crossOrigin = crossOrigin;\n }\n\n img.src = url;\n\n /**\n * Override img element styles\n * Add `display:block` to avoid margin top issue\n * Add `height:auto` to override `height` attribute on IE8\n * (Occur only when margin-top <= -height)\n */\n img.style.cssText = 'display:block;' + 'width:100%;' + 'height:auto;' + 'min-width:0!important;' + 'min-height:0!important;' + 'max-width:none!important;' + 'max-height:none!important;' + 'image-orientation:0deg!important;\"';\n\n $this.html(img);\n });\n },\n resetPreview: function resetPreview() {\n this.$preview.each(function (i, element) {\n var $this = $(element);\n var data = $this.data(DATA_PREVIEW);\n\n $this.css({\n width: data.width,\n height: data.height\n }).html(data.html).removeData(DATA_PREVIEW);\n });\n },\n preview: function preview() {\n var self = this;\n var image = self.image;\n var canvas = self.canvas;\n var cropBox = self.cropBox;\n var cropBoxWidth = cropBox.width;\n var cropBoxHeight = cropBox.height;\n var width = image.width;\n var height = image.height;\n var left = cropBox.left - canvas.left - image.left;\n var top = cropBox.top - canvas.top - image.top;\n\n if (!self.cropped || self.disabled) {\n return;\n }\n\n self.$clone2.css({\n width: width,\n height: height,\n transform: getTransform($.extend({\n translateX: -left,\n translateY: -top\n }, image))\n });\n\n self.$preview.each(function (i, element) {\n var $this = $(element);\n var data = $this.data(DATA_PREVIEW);\n var originalWidth = data.width;\n var originalHeight = data.height;\n var newWidth = originalWidth;\n var newHeight = originalHeight;\n var ratio = 1;\n\n if (cropBoxWidth) {\n ratio = originalWidth / cropBoxWidth;\n newHeight = cropBoxHeight * ratio;\n }\n\n if (cropBoxHeight && newHeight > originalHeight) {\n ratio = originalHeight / cropBoxHeight;\n newWidth = cropBoxWidth * ratio;\n newHeight = originalHeight;\n }\n\n $this.css({\n width: newWidth,\n height: newHeight\n }).find('img').css({\n width: width * ratio,\n height: height * ratio,\n transform: getTransform($.extend({\n translateX: -left * ratio,\n translateY: -top * ratio\n }, image))\n });\n });\n }\n};\n\n// Globals\nvar PointerEvent = typeof window !== 'undefined' ? window.PointerEvent : null;\n\n// Events\nvar EVENT_POINTER_DOWN = PointerEvent ? 'pointerdown' : 'touchstart mousedown';\nvar EVENT_POINTER_MOVE = PointerEvent ? 'pointermove' : 'touchmove mousemove';\nvar EVENT_POINTER_UP = PointerEvent ? ' pointerup pointercancel' : 'touchend touchcancel mouseup';\nvar EVENT_WHEEL = 'wheel mousewheel DOMMouseScroll';\nvar EVENT_DBLCLICK = 'dblclick';\nvar EVENT_RESIZE = 'resize';\nvar EVENT_CROP_START = 'cropstart';\nvar EVENT_CROP_MOVE = 'cropmove';\nvar EVENT_CROP_END = 'cropend';\nvar EVENT_CROP = 'crop';\nvar EVENT_ZOOM = 'zoom';\n\nvar events = {\n bind: function bind() {\n var self = this;\n var options = self.options;\n var $this = self.$element;\n var $cropper = self.$cropper;\n\n if ($.isFunction(options.cropstart)) {\n $this.on(EVENT_CROP_START, options.cropstart);\n }\n\n if ($.isFunction(options.cropmove)) {\n $this.on(EVENT_CROP_MOVE, options.cropmove);\n }\n\n if ($.isFunction(options.cropend)) {\n $this.on(EVENT_CROP_END, options.cropend);\n }\n\n if ($.isFunction(options.crop)) {\n $this.on(EVENT_CROP, options.crop);\n }\n\n if ($.isFunction(options.zoom)) {\n $this.on(EVENT_ZOOM, options.zoom);\n }\n\n $cropper.on(EVENT_POINTER_DOWN, proxy(self.cropStart, this));\n\n if (options.zoomable && options.zoomOnWheel) {\n $cropper.on(EVENT_WHEEL, proxy(self.wheel, this));\n }\n\n if (options.toggleDragModeOnDblclick) {\n $cropper.on(EVENT_DBLCLICK, proxy(self.dblclick, this));\n }\n\n $(document).on(EVENT_POINTER_MOVE, self.onCropMove = proxy(self.cropMove, this)).on(EVENT_POINTER_UP, self.onCropEnd = proxy(self.cropEnd, this));\n\n if (options.responsive) {\n $(window).on(EVENT_RESIZE, self.onResize = proxy(self.resize, this));\n }\n },\n unbind: function unbind() {\n var self = this;\n var options = self.options;\n var $this = self.$element;\n var $cropper = self.$cropper;\n\n if ($.isFunction(options.cropstart)) {\n $this.off(EVENT_CROP_START, options.cropstart);\n }\n\n if ($.isFunction(options.cropmove)) {\n $this.off(EVENT_CROP_MOVE, options.cropmove);\n }\n\n if ($.isFunction(options.cropend)) {\n $this.off(EVENT_CROP_END, options.cropend);\n }\n\n if ($.isFunction(options.crop)) {\n $this.off(EVENT_CROP, options.crop);\n }\n\n if ($.isFunction(options.zoom)) {\n $this.off(EVENT_ZOOM, options.zoom);\n }\n\n $cropper.off(EVENT_POINTER_DOWN, self.cropStart);\n\n if (options.zoomable && options.zoomOnWheel) {\n $cropper.off(EVENT_WHEEL, self.wheel);\n }\n\n if (options.toggleDragModeOnDblclick) {\n $cropper.off(EVENT_DBLCLICK, self.dblclick);\n }\n\n $(document).off(EVENT_POINTER_MOVE, self.onCropMove).off(EVENT_POINTER_UP, self.onCropEnd);\n\n if (options.responsive) {\n $(window).off(EVENT_RESIZE, self.onResize);\n }\n }\n};\n\nvar REGEXP_ACTIONS = /^(e|w|s|n|se|sw|ne|nw|all|crop|move|zoom)$/;\n\nfunction getPointer(_ref, endOnly) {\n var pageX = _ref.pageX,\n pageY = _ref.pageY;\n\n var end = {\n endX: pageX,\n endY: pageY\n };\n\n if (endOnly) {\n return end;\n }\n\n return $.extend({\n startX: pageX,\n startY: pageY\n }, end);\n}\n\nvar handlers = {\n resize: function resize() {\n var self = this;\n var options = self.options;\n var $container = self.$container;\n var container = self.container;\n var minContainerWidth = Number(options.minContainerWidth) || 200;\n var minContainerHeight = Number(options.minContainerHeight) || 100;\n\n if (self.disabled || container.width === minContainerWidth || container.height === minContainerHeight) {\n return;\n }\n\n var ratio = $container.width() / container.width;\n\n // Resize when width changed or height changed\n if (ratio !== 1 || $container.height() !== container.height) {\n var canvasData = void 0;\n var cropBoxData = void 0;\n\n if (options.restore) {\n canvasData = self.getCanvasData();\n cropBoxData = self.getCropBoxData();\n }\n\n self.render();\n\n if (options.restore) {\n self.setCanvasData($.each(canvasData, function (i, n) {\n canvasData[i] = n * ratio;\n }));\n self.setCropBoxData($.each(cropBoxData, function (i, n) {\n cropBoxData[i] = n * ratio;\n }));\n }\n }\n },\n dblclick: function dblclick() {\n var self = this;\n\n if (self.disabled || self.options.dragMode === 'none') {\n return;\n }\n\n self.setDragMode(self.$dragBox.hasClass('cropper-crop') ? 'move' : 'crop');\n },\n wheel: function wheel(event) {\n var self = this;\n var e = event.originalEvent || event;\n var ratio = Number(self.options.wheelZoomRatio) || 0.1;\n\n if (self.disabled) {\n return;\n }\n\n event.preventDefault();\n\n // Limit wheel speed to prevent zoom too fast\n if (self.wheeling) {\n return;\n }\n\n self.wheeling = true;\n\n setTimeout(function () {\n self.wheeling = false;\n }, 50);\n\n var delta = 1;\n\n if (e.deltaY) {\n delta = e.deltaY > 0 ? 1 : -1;\n } else if (e.wheelDelta) {\n delta = -e.wheelDelta / 120;\n } else if (e.detail) {\n delta = e.detail > 0 ? 1 : -1;\n }\n\n self.zoom(-delta * ratio, event);\n },\n cropStart: function cropStart(e) {\n var self = this;\n\n if (self.disabled) {\n return;\n }\n\n var options = self.options;\n var pointers = self.pointers;\n var originalEvent = e.originalEvent;\n var action = void 0;\n\n if (originalEvent && originalEvent.changedTouches) {\n // Handle touch event\n $.each(originalEvent.changedTouches, function (i, touch) {\n pointers[touch.identifier] = getPointer(touch);\n });\n } else {\n // Handle mouse event and pointer event\n pointers[originalEvent && originalEvent.pointerId || 0] = getPointer(originalEvent || e);\n }\n\n if (objectKeys(pointers).length > 1 && options.zoomable && options.zoomOnTouch) {\n action = 'zoom';\n } else {\n action = $(e.target).data('action');\n }\n\n if (!REGEXP_ACTIONS.test(action)) {\n return;\n }\n\n if (self.trigger('cropstart', {\n originalEvent: originalEvent,\n action: action\n }).isDefaultPrevented()) {\n return;\n }\n\n e.preventDefault();\n\n self.action = action;\n self.cropping = false;\n\n if (action === 'crop') {\n self.cropping = true;\n self.$dragBox.addClass('cropper-modal');\n }\n },\n cropMove: function cropMove(e) {\n var self = this;\n var action = self.action;\n\n if (self.disabled || !action) {\n return;\n }\n\n var pointers = self.pointers;\n var originalEvent = e.originalEvent;\n\n e.preventDefault();\n\n if (self.trigger('cropmove', {\n originalEvent: originalEvent,\n action: action\n }).isDefaultPrevented()) {\n return;\n }\n\n if (originalEvent && originalEvent.changedTouches) {\n $.each(originalEvent.changedTouches, function (i, touch) {\n $.extend(pointers[touch.identifier], getPointer(touch, true));\n });\n } else {\n $.extend(pointers[originalEvent && originalEvent.pointerId || 0], getPointer(originalEvent || e, true));\n }\n\n self.change(e);\n },\n cropEnd: function cropEnd(e) {\n var self = this;\n\n if (self.disabled) {\n return;\n }\n\n var action = self.action;\n var pointers = self.pointers;\n var originalEvent = e.originalEvent;\n\n if (originalEvent && originalEvent.changedTouches) {\n $.each(originalEvent.changedTouches, function (i, touch) {\n delete pointers[touch.identifier];\n });\n } else {\n delete pointers[originalEvent && originalEvent.pointerId || 0];\n }\n\n if (!action) {\n return;\n }\n\n e.preventDefault();\n\n if (!objectKeys(pointers).length) {\n self.action = '';\n }\n\n if (self.cropping) {\n self.cropping = false;\n self.$dragBox.toggleClass('cropper-modal', self.cropped && self.options.modal);\n }\n\n self.trigger('cropend', {\n originalEvent: originalEvent,\n action: action\n });\n }\n};\n\n// Actions\nvar ACTION_EAST = 'e';\nvar ACTION_WEST = 'w';\nvar ACTION_SOUTH = 's';\nvar ACTION_NORTH = 'n';\nvar ACTION_SOUTH_EAST = 'se';\nvar ACTION_SOUTH_WEST = 'sw';\nvar ACTION_NORTH_EAST = 'ne';\nvar ACTION_NORTH_WEST = 'nw';\n\nfunction getMaxZoomRatio(pointers) {\n var pointers2 = $.extend({}, pointers);\n var ratios = [];\n\n $.each(pointers, function (pointerId, pointer) {\n delete pointers2[pointerId];\n\n $.each(pointers2, function (pointerId2, pointer2) {\n var x1 = Math.abs(pointer.startX - pointer2.startX);\n var y1 = Math.abs(pointer.startY - pointer2.startY);\n var x2 = Math.abs(pointer.endX - pointer2.endX);\n var y2 = Math.abs(pointer.endY - pointer2.endY);\n var z1 = Math.sqrt(x1 * x1 + y1 * y1);\n var z2 = Math.sqrt(x2 * x2 + y2 * y2);\n var ratio = (z2 - z1) / z1;\n\n ratios.push(ratio);\n });\n });\n\n ratios.sort(function (a, b) {\n return Math.abs(a) < Math.abs(b);\n });\n\n return ratios[0];\n}\n\nvar change = {\n change: function change(e) {\n var self = this;\n var options = self.options;\n var pointers = self.pointers;\n var pointer = pointers[objectKeys(pointers)[0]];\n var container = self.container;\n var canvas = self.canvas;\n var cropBox = self.cropBox;\n var action = self.action;\n var aspectRatio = options.aspectRatio;\n var width = cropBox.width;\n var height = cropBox.height;\n var left = cropBox.left;\n var top = cropBox.top;\n var right = left + width;\n var bottom = top + height;\n var minLeft = 0;\n var minTop = 0;\n var maxWidth = container.width;\n var maxHeight = container.height;\n var renderable = true;\n var offset = void 0;\n\n // Locking aspect ratio in \"free mode\" by holding shift key (#259)\n if (!aspectRatio && e.shiftKey) {\n aspectRatio = width && height ? width / height : 1;\n }\n\n if (self.limited) {\n minLeft = cropBox.minLeft;\n minTop = cropBox.minTop;\n maxWidth = minLeft + Math.min(container.width, canvas.width, canvas.left + canvas.width);\n maxHeight = minTop + Math.min(container.height, canvas.height, canvas.top + canvas.height);\n }\n\n var range = {\n x: pointer.endX - pointer.startX,\n y: pointer.endY - pointer.startY\n };\n\n switch (action) {\n // Move crop box\n case 'all':\n left += range.x;\n top += range.y;\n break;\n\n // Resize crop box\n case ACTION_EAST:\n if (range.x >= 0 && (right >= maxWidth || aspectRatio && (top <= minTop || bottom >= maxHeight))) {\n renderable = false;\n break;\n }\n\n if (right + range.x > maxWidth) {\n range.x = maxWidth - right;\n }\n\n width += range.x;\n\n if (aspectRatio) {\n height = width / aspectRatio;\n top -= range.x / aspectRatio / 2;\n }\n\n if (width < 0) {\n action = ACTION_WEST;\n width = 0;\n }\n\n break;\n\n case ACTION_NORTH:\n if (range.y <= 0 && (top <= minTop || aspectRatio && (left <= minLeft || right >= maxWidth))) {\n renderable = false;\n break;\n }\n\n if (top + range.y < minTop) {\n range.y = minTop - top;\n }\n\n height -= range.y;\n top += range.y;\n\n if (aspectRatio) {\n width = height * aspectRatio;\n left += range.y * aspectRatio / 2;\n }\n\n if (height < 0) {\n action = ACTION_SOUTH;\n height = 0;\n }\n\n break;\n\n case ACTION_WEST:\n if (range.x <= 0 && (left <= minLeft || aspectRatio && (top <= minTop || bottom >= maxHeight))) {\n renderable = false;\n break;\n }\n\n if (left + range.x < minLeft) {\n range.x = minLeft - left;\n }\n\n width -= range.x;\n left += range.x;\n\n if (aspectRatio) {\n height = width / aspectRatio;\n top += range.x / aspectRatio / 2;\n }\n\n if (width < 0) {\n action = ACTION_EAST;\n width = 0;\n }\n\n break;\n\n case ACTION_SOUTH:\n if (range.y >= 0 && (bottom >= maxHeight || aspectRatio && (left <= minLeft || right >= maxWidth))) {\n renderable = false;\n break;\n }\n\n if (bottom + range.y > maxHeight) {\n range.y = maxHeight - bottom;\n }\n\n height += range.y;\n\n if (aspectRatio) {\n width = height * aspectRatio;\n left -= range.y * aspectRatio / 2;\n }\n\n if (height < 0) {\n action = ACTION_NORTH;\n height = 0;\n }\n\n break;\n\n case ACTION_NORTH_EAST:\n if (aspectRatio) {\n if (range.y <= 0 && (top <= minTop || right >= maxWidth)) {\n renderable = false;\n break;\n }\n\n height -= range.y;\n top += range.y;\n width = height * aspectRatio;\n } else {\n if (range.x >= 0) {\n if (right < maxWidth) {\n width += range.x;\n } else if (range.y <= 0 && top <= minTop) {\n renderable = false;\n }\n } else {\n width += range.x;\n }\n\n if (range.y <= 0) {\n if (top > minTop) {\n height -= range.y;\n top += range.y;\n }\n } else {\n height -= range.y;\n top += range.y;\n }\n }\n\n if (width < 0 && height < 0) {\n action = ACTION_SOUTH_WEST;\n height = 0;\n width = 0;\n } else if (width < 0) {\n action = ACTION_NORTH_WEST;\n width = 0;\n } else if (height < 0) {\n action = ACTION_SOUTH_EAST;\n height = 0;\n }\n\n break;\n\n case ACTION_NORTH_WEST:\n if (aspectRatio) {\n if (range.y <= 0 && (top <= minTop || left <= minLeft)) {\n renderable = false;\n break;\n }\n\n height -= range.y;\n top += range.y;\n width = height * aspectRatio;\n left += range.y * aspectRatio;\n } else {\n if (range.x <= 0) {\n if (left > minLeft) {\n width -= range.x;\n left += range.x;\n } else if (range.y <= 0 && top <= minTop) {\n renderable = false;\n }\n } else {\n width -= range.x;\n left += range.x;\n }\n\n if (range.y <= 0) {\n if (top > minTop) {\n height -= range.y;\n top += range.y;\n }\n } else {\n height -= range.y;\n top += range.y;\n }\n }\n\n if (width < 0 && height < 0) {\n action = ACTION_SOUTH_EAST;\n height = 0;\n width = 0;\n } else if (width < 0) {\n action = ACTION_NORTH_EAST;\n width = 0;\n } else if (height < 0) {\n action = ACTION_SOUTH_WEST;\n height = 0;\n }\n\n break;\n\n case ACTION_SOUTH_WEST:\n if (aspectRatio) {\n if (range.x <= 0 && (left <= minLeft || bottom >= maxHeight)) {\n renderable = false;\n break;\n }\n\n width -= range.x;\n left += range.x;\n height = width / aspectRatio;\n } else {\n if (range.x <= 0) {\n if (left > minLeft) {\n width -= range.x;\n left += range.x;\n } else if (range.y >= 0 && bottom >= maxHeight) {\n renderable = false;\n }\n } else {\n width -= range.x;\n left += range.x;\n }\n\n if (range.y >= 0) {\n if (bottom < maxHeight) {\n height += range.y;\n }\n } else {\n height += range.y;\n }\n }\n\n if (width < 0 && height < 0) {\n action = ACTION_NORTH_EAST;\n height = 0;\n width = 0;\n } else if (width < 0) {\n action = ACTION_SOUTH_EAST;\n width = 0;\n } else if (height < 0) {\n action = ACTION_NORTH_WEST;\n height = 0;\n }\n\n break;\n\n case ACTION_SOUTH_EAST:\n if (aspectRatio) {\n if (range.x >= 0 && (right >= maxWidth || bottom >= maxHeight)) {\n renderable = false;\n break;\n }\n\n width += range.x;\n height = width / aspectRatio;\n } else {\n if (range.x >= 0) {\n if (right < maxWidth) {\n width += range.x;\n } else if (range.y >= 0 && bottom >= maxHeight) {\n renderable = false;\n }\n } else {\n width += range.x;\n }\n\n if (range.y >= 0) {\n if (bottom < maxHeight) {\n height += range.y;\n }\n } else {\n height += range.y;\n }\n }\n\n if (width < 0 && height < 0) {\n action = ACTION_NORTH_WEST;\n height = 0;\n width = 0;\n } else if (width < 0) {\n action = ACTION_SOUTH_WEST;\n width = 0;\n } else if (height < 0) {\n action = ACTION_NORTH_EAST;\n height = 0;\n }\n\n break;\n\n // Move canvas\n case 'move':\n self.move(range.x, range.y);\n renderable = false;\n break;\n\n // Zoom canvas\n case 'zoom':\n self.zoom(getMaxZoomRatio(pointers), e.originalEvent);\n renderable = false;\n break;\n\n // Create crop box\n case 'crop':\n if (!range.x || !range.y) {\n renderable = false;\n break;\n }\n\n offset = self.$cropper.offset();\n left = pointer.startX - offset.left;\n top = pointer.startY - offset.top;\n width = cropBox.minWidth;\n height = cropBox.minHeight;\n\n if (range.x > 0) {\n action = range.y > 0 ? ACTION_SOUTH_EAST : ACTION_NORTH_EAST;\n } else if (range.x < 0) {\n left -= width;\n action = range.y > 0 ? ACTION_SOUTH_WEST : ACTION_NORTH_WEST;\n }\n\n if (range.y < 0) {\n top -= height;\n }\n\n // Show the crop box if is hidden\n if (!self.cropped) {\n self.$cropBox.removeClass('cropper-hidden');\n self.cropped = true;\n\n if (self.limited) {\n self.limitCropBox(true, true);\n }\n }\n\n break;\n\n default:\n }\n\n if (renderable) {\n cropBox.width = width;\n cropBox.height = height;\n cropBox.left = left;\n cropBox.top = top;\n self.action = action;\n self.renderCropBox();\n }\n\n // Override\n $.each(pointers, function (i, p) {\n p.startX = p.endX;\n p.startY = p.endY;\n });\n }\n};\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction getPointersCenter(pointers) {\n var pageX = 0;\n var pageY = 0;\n var count = 0;\n\n $.each(pointers, function (i, _ref) {\n var startX = _ref.startX,\n startY = _ref.startY;\n\n pageX += startX;\n pageY += startY;\n count += 1;\n });\n\n pageX /= count;\n pageY /= count;\n\n return {\n pageX: pageX,\n pageY: pageY\n };\n}\n\nvar methods = {\n // Show the crop box manually\n crop: function crop() {\n var self = this;\n\n if (!self.ready || self.disabled) {\n return;\n }\n\n if (!self.cropped) {\n self.cropped = true;\n self.limitCropBox(true, true);\n\n if (self.options.modal) {\n self.$dragBox.addClass('cropper-modal');\n }\n\n self.$cropBox.removeClass('cropper-hidden');\n }\n\n self.setCropBoxData(self.initialCropBox);\n },\n\n\n // Reset the image and crop box to their initial states\n reset: function reset() {\n var self = this;\n\n if (!self.ready || self.disabled) {\n return;\n }\n\n self.image = $.extend({}, self.initialImage);\n self.canvas = $.extend({}, self.initialCanvas);\n self.cropBox = $.extend({}, self.initialCropBox);\n\n self.renderCanvas();\n\n if (self.cropped) {\n self.renderCropBox();\n }\n },\n\n\n // Clear the crop box\n clear: function clear() {\n var self = this;\n\n if (!self.cropped || self.disabled) {\n return;\n }\n\n $.extend(self.cropBox, {\n left: 0,\n top: 0,\n width: 0,\n height: 0\n });\n\n self.cropped = false;\n self.renderCropBox();\n\n self.limitCanvas(true, true);\n\n // Render canvas after crop box rendered\n self.renderCanvas();\n\n self.$dragBox.removeClass('cropper-modal');\n self.$cropBox.addClass('cropper-hidden');\n },\n\n\n /**\n * Replace the image's src and rebuild the cropper\n *\n * @param {String} url\n * @param {Boolean} onlyColorChanged (optional)\n */\n replace: function replace(url, onlyColorChanged) {\n var self = this;\n\n if (!self.disabled && url) {\n if (self.isImg) {\n self.$element.attr('src', url);\n }\n\n if (onlyColorChanged) {\n self.url = url;\n self.$clone.attr('src', url);\n\n if (self.ready) {\n self.$preview.find('img').add(self.$clone2).attr('src', url);\n }\n } else {\n if (self.isImg) {\n self.replaced = true;\n }\n\n // Clear previous data\n self.options.data = null;\n self.load(url);\n }\n }\n },\n\n\n // Enable (unfreeze) the cropper\n enable: function enable() {\n var self = this;\n\n if (self.ready) {\n self.disabled = false;\n self.$cropper.removeClass('cropper-disabled');\n }\n },\n\n\n // Disable (freeze) the cropper\n disable: function disable() {\n var self = this;\n\n if (self.ready) {\n self.disabled = true;\n self.$cropper.addClass('cropper-disabled');\n }\n },\n\n\n // Destroy the cropper and remove the instance from the image\n destroy: function destroy() {\n var self = this;\n var $this = self.$element;\n\n if (self.loaded) {\n if (self.isImg && self.replaced) {\n $this.attr('src', self.originalUrl);\n }\n\n self.unbuild();\n $this.removeClass('cropper-hidden');\n } else if (self.isImg) {\n $this.off('load', self.start);\n } else if (self.$clone) {\n self.$clone.remove();\n }\n\n $this.removeData('cropper');\n },\n\n\n /**\n * Move the canvas with relative offsets\n *\n * @param {Number} offsetX\n * @param {Number} offsetY (optional)\n */\n move: function move(offsetX, offsetY) {\n var self = this;\n var canvas = self.canvas;\n\n self.moveTo(isUndefined(offsetX) ? offsetX : canvas.left + Number(offsetX), isUndefined(offsetY) ? offsetY : canvas.top + Number(offsetY));\n },\n\n\n /**\n * Move the canvas to an absolute point\n *\n * @param {Number} x\n * @param {Number} y (optional)\n */\n moveTo: function moveTo(x, y) {\n var self = this;\n var canvas = self.canvas;\n var changed = false;\n\n // If \"y\" is not present, its default value is \"x\"\n if (isUndefined(y)) {\n y = x;\n }\n\n x = Number(x);\n y = Number(y);\n\n if (self.ready && !self.disabled && self.options.movable) {\n if (isNumber(x)) {\n canvas.left = x;\n changed = true;\n }\n\n if (isNumber(y)) {\n canvas.top = y;\n changed = true;\n }\n\n if (changed) {\n self.renderCanvas(true);\n }\n }\n },\n\n\n /**\n * Zoom the canvas with a relative ratio\n *\n * @param {Number} ratio\n * @param {jQuery Event} _event (private)\n */\n zoom: function zoom(ratio, _event) {\n var self = this;\n var canvas = self.canvas;\n\n ratio = Number(ratio);\n\n if (ratio < 0) {\n ratio = 1 / (1 - ratio);\n } else {\n ratio = 1 + ratio;\n }\n\n self.zoomTo(canvas.width * ratio / canvas.naturalWidth, _event);\n },\n\n\n /**\n * Zoom the canvas to an absolute ratio\n *\n * @param {Number} ratio\n * @param {jQuery Event} _event (private)\n */\n zoomTo: function zoomTo(ratio, _event) {\n var self = this;\n var options = self.options;\n var pointers = self.pointers;\n var canvas = self.canvas;\n var width = canvas.width;\n var height = canvas.height;\n var naturalWidth = canvas.naturalWidth;\n var naturalHeight = canvas.naturalHeight;\n\n ratio = Number(ratio);\n\n if (ratio >= 0 && self.ready && !self.disabled && options.zoomable) {\n var newWidth = naturalWidth * ratio;\n var newHeight = naturalHeight * ratio;\n var originalEvent = void 0;\n\n if (_event) {\n originalEvent = _event.originalEvent;\n }\n\n if (self.trigger('zoom', {\n originalEvent: originalEvent,\n oldRatio: width / naturalWidth,\n ratio: newWidth / naturalWidth\n }).isDefaultPrevented()) {\n return;\n }\n\n if (originalEvent) {\n var offset = self.$cropper.offset();\n var center = pointers && objectKeys(pointers).length ? getPointersCenter(pointers) : {\n pageX: _event.pageX || originalEvent.pageX || 0,\n pageY: _event.pageY || originalEvent.pageY || 0\n };\n\n // Zoom from the triggering point of the event\n canvas.left -= (newWidth - width) * ((center.pageX - offset.left - canvas.left) / width);\n canvas.top -= (newHeight - height) * ((center.pageY - offset.top - canvas.top) / height);\n } else {\n // Zoom from the center of the canvas\n canvas.left -= (newWidth - width) / 2;\n canvas.top -= (newHeight - height) / 2;\n }\n\n canvas.width = newWidth;\n canvas.height = newHeight;\n self.renderCanvas(true);\n }\n },\n\n\n /**\n * Rotate the canvas with a relative degree\n *\n * @param {Number} degree\n */\n rotate: function rotate(degree) {\n var self = this;\n\n self.rotateTo((self.image.rotate || 0) + Number(degree));\n },\n\n\n /**\n * Rotate the canvas to an absolute degree\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function#rotate()\n *\n * @param {Number} degree\n */\n rotateTo: function rotateTo(degree) {\n var self = this;\n\n degree = Number(degree);\n\n if (isNumber(degree) && self.ready && !self.disabled && self.options.rotatable) {\n self.image.rotate = degree % 360;\n self.rotated = true;\n self.renderCanvas(true);\n }\n },\n\n\n /**\n * Scale the image\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function#scale()\n *\n * @param {Number} scaleX\n * @param {Number} scaleY (optional)\n */\n scale: function scale(scaleX, scaleY) {\n var self = this;\n var image = self.image;\n var changed = false;\n\n // If \"scaleY\" is not present, its default value is \"scaleX\"\n if (isUndefined(scaleY)) {\n scaleY = scaleX;\n }\n\n scaleX = Number(scaleX);\n scaleY = Number(scaleY);\n\n if (self.ready && !self.disabled && self.options.scalable) {\n if (isNumber(scaleX)) {\n image.scaleX = scaleX;\n changed = true;\n }\n\n if (isNumber(scaleY)) {\n image.scaleY = scaleY;\n changed = true;\n }\n\n if (changed) {\n self.renderImage(true);\n }\n }\n },\n\n\n /**\n * Scale the abscissa of the image\n *\n * @param {Number} scaleX\n */\n scaleX: function scaleX(_scaleX) {\n var self = this;\n var scaleY = self.image.scaleY;\n\n self.scale(_scaleX, isNumber(scaleY) ? scaleY : 1);\n },\n\n\n /**\n * Scale the ordinate of the image\n *\n * @param {Number} scaleY\n */\n scaleY: function scaleY(_scaleY) {\n var self = this;\n var scaleX = self.image.scaleX;\n\n self.scale(isNumber(scaleX) ? scaleX : 1, _scaleY);\n },\n\n\n /**\n * Get the cropped area position and size data (base on the original image)\n *\n * @param {Boolean} isRounded (optional)\n * @return {Object} data\n */\n getData: function getData(isRounded) {\n var self = this;\n var options = self.options;\n var image = self.image;\n var canvas = self.canvas;\n var cropBox = self.cropBox;\n var ratio = void 0;\n var data = void 0;\n\n if (self.ready && self.cropped) {\n data = {\n x: cropBox.left - canvas.left,\n y: cropBox.top - canvas.top,\n width: cropBox.width,\n height: cropBox.height\n };\n\n ratio = image.width / image.naturalWidth;\n\n $.each(data, function (i, n) {\n n /= ratio;\n data[i] = isRounded ? Math.round(n) : n;\n });\n } else {\n data = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n }\n\n if (options.rotatable) {\n data.rotate = image.rotate || 0;\n }\n\n if (options.scalable) {\n data.scaleX = image.scaleX || 1;\n data.scaleY = image.scaleY || 1;\n }\n\n return data;\n },\n\n\n /**\n * Set the cropped area position and size with new data\n *\n * @param {Object} data\n */\n setData: function setData(data) {\n var self = this;\n var options = self.options;\n var image = self.image;\n var canvas = self.canvas;\n var cropBoxData = {};\n var rotated = void 0;\n var isScaled = void 0;\n var ratio = void 0;\n\n if ($.isFunction(data)) {\n data = data.call(self.element);\n }\n\n if (self.ready && !self.disabled && $.isPlainObject(data)) {\n if (options.rotatable) {\n if (isNumber(data.rotate) && data.rotate !== image.rotate) {\n image.rotate = data.rotate;\n rotated = true;\n self.rotated = rotated;\n }\n }\n\n if (options.scalable) {\n if (isNumber(data.scaleX) && data.scaleX !== image.scaleX) {\n image.scaleX = data.scaleX;\n isScaled = true;\n }\n\n if (isNumber(data.scaleY) && data.scaleY !== image.scaleY) {\n image.scaleY = data.scaleY;\n isScaled = true;\n }\n }\n\n if (rotated) {\n self.renderCanvas();\n } else if (isScaled) {\n self.renderImage();\n }\n\n ratio = image.width / image.naturalWidth;\n\n if (isNumber(data.x)) {\n cropBoxData.left = data.x * ratio + canvas.left;\n }\n\n if (isNumber(data.y)) {\n cropBoxData.top = data.y * ratio + canvas.top;\n }\n\n if (isNumber(data.width)) {\n cropBoxData.width = data.width * ratio;\n }\n\n if (isNumber(data.height)) {\n cropBoxData.height = data.height * ratio;\n }\n\n self.setCropBoxData(cropBoxData);\n }\n },\n\n\n /**\n * Get the container size data\n *\n * @return {Object} data\n */\n getContainerData: function getContainerData() {\n return this.ready ? this.container : {};\n },\n\n\n /**\n * Get the image position and size data\n *\n * @return {Object} data\n */\n getImageData: function getImageData() {\n return this.loaded ? this.image : {};\n },\n\n\n /**\n * Get the canvas position and size data\n *\n * @return {Object} data\n */\n getCanvasData: function getCanvasData() {\n var self = this;\n var canvas = self.canvas;\n var data = {};\n\n if (self.ready) {\n $.each(['left', 'top', 'width', 'height', 'naturalWidth', 'naturalHeight'], function (i, n) {\n data[n] = canvas[n];\n });\n }\n\n return data;\n },\n\n\n /**\n * Set the canvas position and size with new data\n *\n * @param {Object} data\n */\n setCanvasData: function setCanvasData(data) {\n var self = this;\n var canvas = self.canvas;\n var aspectRatio = canvas.aspectRatio;\n\n if ($.isFunction(data)) {\n data = data.call(self.$element);\n }\n\n if (self.ready && !self.disabled && $.isPlainObject(data)) {\n if (isNumber(data.left)) {\n canvas.left = data.left;\n }\n\n if (isNumber(data.top)) {\n canvas.top = data.top;\n }\n\n if (isNumber(data.width)) {\n canvas.width = data.width;\n canvas.height = data.width / aspectRatio;\n } else if (isNumber(data.height)) {\n canvas.height = data.height;\n canvas.width = data.height * aspectRatio;\n }\n\n self.renderCanvas(true);\n }\n },\n\n\n /**\n * Get the crop box position and size data\n *\n * @return {Object} data\n */\n getCropBoxData: function getCropBoxData() {\n var self = this;\n var cropBox = self.cropBox;\n\n return self.ready && self.cropped ? {\n left: cropBox.left,\n top: cropBox.top,\n width: cropBox.width,\n height: cropBox.height\n } : {};\n },\n\n\n /**\n * Set the crop box position and size with new data\n *\n * @param {Object} data\n */\n setCropBoxData: function setCropBoxData(data) {\n var self = this;\n var cropBox = self.cropBox;\n var aspectRatio = self.options.aspectRatio;\n var widthChanged = void 0;\n var heightChanged = void 0;\n\n if ($.isFunction(data)) {\n data = data.call(self.$element);\n }\n\n if (self.ready && self.cropped && !self.disabled && $.isPlainObject(data)) {\n if (isNumber(data.left)) {\n cropBox.left = data.left;\n }\n\n if (isNumber(data.top)) {\n cropBox.top = data.top;\n }\n\n if (isNumber(data.width) && data.width !== cropBox.width) {\n widthChanged = true;\n cropBox.width = data.width;\n }\n\n if (isNumber(data.height) && data.height !== cropBox.height) {\n heightChanged = true;\n cropBox.height = data.height;\n }\n\n if (aspectRatio) {\n if (widthChanged) {\n cropBox.height = cropBox.width / aspectRatio;\n } else if (heightChanged) {\n cropBox.width = cropBox.height * aspectRatio;\n }\n }\n\n self.renderCropBox();\n }\n },\n\n\n /**\n * Get a canvas drawn the cropped image\n *\n * @param {Object} options (optional)\n * @return {HTMLCanvasElement} canvas\n */\n getCroppedCanvas: function getCroppedCanvas(options) {\n var self = this;\n\n if (!self.ready || !window.HTMLCanvasElement) {\n return null;\n }\n\n if (!$.isPlainObject(options)) {\n options = {};\n }\n\n if (!self.cropped) {\n return getSourceCanvas(self.$clone[0], self.image, options);\n }\n\n var data = self.getData();\n var originalWidth = data.width;\n var originalHeight = data.height;\n var aspectRatio = originalWidth / originalHeight;\n var scaledWidth = void 0;\n var scaledHeight = void 0;\n var scaledRatio = void 0;\n\n if ($.isPlainObject(options)) {\n scaledWidth = options.width;\n scaledHeight = options.height;\n\n if (scaledWidth) {\n scaledHeight = scaledWidth / aspectRatio;\n scaledRatio = scaledWidth / originalWidth;\n } else if (scaledHeight) {\n scaledWidth = scaledHeight * aspectRatio;\n scaledRatio = scaledHeight / originalHeight;\n }\n }\n\n // The canvas element will use `Math.Math.floor` on a float number, so Math.floor first\n var canvasWidth = Math.floor(scaledWidth || originalWidth);\n var canvasHeight = Math.floor(scaledHeight || originalHeight);\n\n var canvas = $('<canvas>')[0];\n var context = canvas.getContext('2d');\n\n canvas.width = canvasWidth;\n canvas.height = canvasHeight;\n\n if (options.fillColor) {\n context.fillStyle = options.fillColor;\n context.fillRect(0, 0, canvasWidth, canvasHeight);\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage\n var parameters = function () {\n var source = getSourceCanvas(self.$clone[0], self.image, options);\n var sourceWidth = source.width;\n var sourceHeight = source.height;\n var canvasData = self.canvas;\n var params = [source];\n\n // Source canvas\n var srcX = data.x + canvasData.naturalWidth * (Math.abs(data.scaleX || 1) - 1) / 2;\n var srcY = data.y + canvasData.naturalHeight * (Math.abs(data.scaleY || 1) - 1) / 2;\n var srcWidth = void 0;\n var srcHeight = void 0;\n\n // Destination canvas\n var dstX = void 0;\n var dstY = void 0;\n var dstWidth = void 0;\n var dstHeight = void 0;\n\n if (srcX <= -originalWidth || srcX > sourceWidth) {\n srcX = 0;\n srcWidth = 0;\n dstX = 0;\n dstWidth = 0;\n } else if (srcX <= 0) {\n dstX = -srcX;\n srcX = 0;\n dstWidth = Math.min(sourceWidth, originalWidth + srcX);\n srcWidth = dstWidth;\n } else if (srcX <= sourceWidth) {\n dstX = 0;\n dstWidth = Math.min(originalWidth, sourceWidth - srcX);\n srcWidth = dstWidth;\n }\n\n if (srcWidth <= 0 || srcY <= -originalHeight || srcY > sourceHeight) {\n srcY = 0;\n srcHeight = 0;\n dstY = 0;\n dstHeight = 0;\n } else if (srcY <= 0) {\n dstY = -srcY;\n srcY = 0;\n dstHeight = Math.min(sourceHeight, originalHeight + srcY);\n srcHeight = dstHeight;\n } else if (srcY <= sourceHeight) {\n dstY = 0;\n dstHeight = Math.min(originalHeight, sourceHeight - srcY);\n srcHeight = dstHeight;\n }\n\n // All the numerical parameters should be integer for `drawImage` (#476)\n params.push(Math.floor(srcX), Math.floor(srcY), Math.floor(srcWidth), Math.floor(srcHeight));\n\n // Scale destination sizes\n if (scaledRatio) {\n dstX *= scaledRatio;\n dstY *= scaledRatio;\n dstWidth *= scaledRatio;\n dstHeight *= scaledRatio;\n }\n\n // Avoid \"IndexSizeError\" in IE and Firefox\n if (dstWidth > 0 && dstHeight > 0) {\n params.push(Math.floor(dstX), Math.floor(dstY), Math.floor(dstWidth), Math.floor(dstHeight));\n }\n\n return params;\n }();\n\n context.imageSmoothingEnabled = !!options.imageSmoothingEnabled;\n\n if (options.imageSmoothingQuality) {\n context.imageSmoothingQuality = options.imageSmoothingQuality;\n }\n\n context.drawImage.apply(context, _toConsumableArray(parameters));\n\n return canvas;\n },\n\n\n /**\n * Change the aspect ratio of the crop box\n *\n * @param {Number} aspectRatio\n */\n setAspectRatio: function setAspectRatio(aspectRatio) {\n var self = this;\n var options = self.options;\n\n if (!self.disabled && !isUndefined(aspectRatio)) {\n // 0 -> NaN\n options.aspectRatio = Math.max(0, aspectRatio) || NaN;\n\n if (self.ready) {\n self.initCropBox();\n\n if (self.cropped) {\n self.renderCropBox();\n }\n }\n }\n },\n\n\n /**\n * Change the drag mode\n *\n * @param {String} mode (optional)\n */\n setDragMode: function setDragMode(mode) {\n var self = this;\n var options = self.options;\n var croppable = void 0;\n var movable = void 0;\n\n if (self.loaded && !self.disabled) {\n croppable = mode === 'crop';\n movable = options.movable && mode === 'move';\n mode = croppable || movable ? mode : 'none';\n\n self.$dragBox.data('action', mode).toggleClass('cropper-crop', croppable).toggleClass('cropper-move', movable);\n\n if (!options.cropBoxMovable) {\n // Sync drag mode to crop box when it is not movable(#300)\n self.$face.data('action', mode).toggleClass('cropper-crop', croppable).toggleClass('cropper-move', movable);\n }\n }\n }\n};\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar CLASS_HIDDEN = 'cropper-hidden';\nvar REGEXP_DATA_URL = /^data:/;\nvar REGEXP_DATA_URL_JPEG = /^data:image\\/jpeg;base64,/;\n\nvar Cropper = function () {\n function Cropper(element, options) {\n _classCallCheck(this, Cropper);\n\n var self = this;\n\n self.$element = $(element);\n self.options = $.extend({}, DEFAULTS, $.isPlainObject(options) && options);\n self.loaded = false;\n self.ready = false;\n self.completed = false;\n self.rotated = false;\n self.cropped = false;\n self.disabled = false;\n self.replaced = false;\n self.limited = false;\n self.wheeling = false;\n self.isImg = false;\n self.originalUrl = '';\n self.canvas = null;\n self.cropBox = null;\n self.pointers = {};\n self.init();\n }\n\n _createClass(Cropper, [{\n key: 'init',\n value: function init() {\n var self = this;\n var $this = self.$element;\n var url = void 0;\n\n if ($this.is('img')) {\n self.isImg = true;\n\n // Should use `$.fn.attr` here. e.g.: \"img/picture.jpg\"\n url = $this.attr('src');\n self.originalUrl = url;\n\n // Stop when it's a blank image\n if (!url) {\n return;\n }\n\n // Should use `$.fn.prop` here. e.g.: \"http://example.com/img/picture.jpg\"\n url = $this.prop('src');\n } else if ($this.is('canvas') && window.HTMLCanvasElement) {\n url = $this[0].toDataURL();\n }\n\n self.load(url);\n }\n\n // A shortcut for triggering custom events\n\n }, {\n key: 'trigger',\n value: function trigger(type, data) {\n var e = $.Event(type, data);\n\n this.$element.trigger(e);\n\n return e;\n }\n }, {\n key: 'load',\n value: function load(url) {\n var self = this;\n var options = self.options;\n var $this = self.$element;\n\n if (!url) {\n return;\n }\n\n self.url = url;\n self.image = {};\n\n if (!options.checkOrientation || !window.ArrayBuffer) {\n self.clone();\n return;\n }\n\n // XMLHttpRequest disallows to open a Data URL in some browsers like IE11 and Safari\n if (REGEXP_DATA_URL.test(url)) {\n if (REGEXP_DATA_URL_JPEG.test(url)) {\n self.read(dataURLToArrayBuffer(url));\n } else {\n self.clone();\n }\n return;\n }\n\n var xhr = new XMLHttpRequest();\n\n xhr.onerror = $.proxy(function () {\n self.clone();\n }, this);\n\n xhr.onload = function load() {\n self.read(this.response);\n };\n\n if (options.checkCrossOrigin && isCrossOriginURL(url) && $this.prop('crossOrigin')) {\n url = addTimestamp(url);\n }\n\n xhr.open('get', url);\n xhr.responseType = 'arraybuffer';\n xhr.withCredentials = $this.prop('crossOrigin') === 'use-credentials';\n xhr.send();\n }\n }, {\n key: 'read',\n value: function read(arrayBuffer) {\n var self = this;\n var options = self.options;\n var orientation = getOrientation(arrayBuffer);\n var image = self.image;\n var rotate = 0;\n var scaleX = 1;\n var scaleY = 1;\n\n if (orientation > 1) {\n self.url = arrayBufferToDataURL(arrayBuffer);\n\n switch (orientation) {\n // flip horizontal\n case 2:\n scaleX = -1;\n break;\n\n // rotate left 180°\n case 3:\n rotate = -180;\n break;\n\n // flip vertical\n case 4:\n scaleY = -1;\n break;\n\n // flip vertical + rotate right 90°\n case 5:\n rotate = 90;\n scaleY = -1;\n break;\n\n // rotate right 90°\n case 6:\n rotate = 90;\n break;\n\n // flip horizontal + rotate right 90°\n case 7:\n rotate = 90;\n scaleX = -1;\n break;\n\n // rotate left 90°\n case 8:\n rotate = -90;\n break;\n\n default:\n }\n }\n\n if (options.rotatable) {\n image.rotate = rotate;\n }\n\n if (options.scalable) {\n image.scaleX = scaleX;\n image.scaleY = scaleY;\n }\n\n self.clone();\n }\n }, {\n key: 'clone',\n value: function clone() {\n var self = this;\n var options = self.options;\n var $this = self.$element;\n var url = self.url;\n var crossOrigin = '';\n var crossOriginUrl = void 0;\n\n if (options.checkCrossOrigin && isCrossOriginURL(url)) {\n crossOrigin = $this.prop('crossOrigin');\n\n if (crossOrigin) {\n crossOriginUrl = url;\n } else {\n crossOrigin = 'anonymous';\n\n // Bust cache (#148) when there is not a \"crossOrigin\" property\n crossOriginUrl = addTimestamp(url);\n }\n }\n\n self.crossOrigin = crossOrigin;\n self.crossOriginUrl = crossOriginUrl;\n\n var image = document.createElement('img');\n\n if (crossOrigin) {\n image.crossOrigin = crossOrigin;\n }\n\n image.src = crossOriginUrl || url;\n\n var $clone = $(image);\n\n self.$clone = $clone;\n\n if (self.isImg) {\n if ($this[0].complete) {\n self.start();\n } else {\n $this.one('load', $.proxy(self.start, this));\n }\n } else {\n $clone.one('load', $.proxy(self.start, this)).one('error', $.proxy(self.stop, this)).addClass('cropper-hide').insertAfter($this);\n }\n }\n }, {\n key: 'start',\n value: function start() {\n var self = this;\n var $clone = self.$clone;\n var $image = self.$element;\n\n if (!self.isImg) {\n $clone.off('error', self.stop);\n $image = $clone;\n }\n\n getImageSize($image[0], function (naturalWidth, naturalHeight) {\n $.extend(self.image, {\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight,\n aspectRatio: naturalWidth / naturalHeight\n });\n\n self.loaded = true;\n self.build();\n });\n }\n }, {\n key: 'stop',\n value: function stop() {\n var self = this;\n\n self.$clone.remove();\n self.$clone = null;\n }\n }, {\n key: 'build',\n value: function build() {\n var self = this;\n var options = self.options;\n var $this = self.$element;\n var $clone = self.$clone;\n\n if (!self.loaded) {\n return;\n }\n\n // Unbuild first when replace\n if (self.ready) {\n self.unbuild();\n }\n\n var $cropper = $(TEMPLATE);\n var $cropBox = $cropper.find('.cropper-crop-box');\n var $face = $cropBox.find('.cropper-face');\n\n // Create cropper elements\n self.$container = $this.parent();\n self.$cropper = $cropper;\n self.$canvas = $cropper.find('.cropper-canvas').append($clone);\n self.$dragBox = $cropper.find('.cropper-drag-box');\n self.$cropBox = $cropBox;\n self.$viewBox = $cropper.find('.cropper-view-box');\n self.$face = $face;\n\n // Hide the original image\n $this.addClass(CLASS_HIDDEN).after($cropper);\n\n // Show the clone image if is hidden\n if (!self.isImg) {\n $clone.removeClass('cropper-hide');\n }\n\n self.initPreview();\n self.bind();\n\n options.aspectRatio = Math.max(0, options.aspectRatio) || NaN;\n options.viewMode = Math.max(0, Math.min(3, Math.round(options.viewMode))) || 0;\n\n self.cropped = options.autoCrop;\n\n if (options.autoCrop) {\n if (options.modal) {\n self.$dragBox.addClass('cropper-modal');\n }\n } else {\n $cropBox.addClass(CLASS_HIDDEN);\n }\n\n if (!options.guides) {\n $cropBox.find('.cropper-dashed').addClass(CLASS_HIDDEN);\n }\n\n if (!options.center) {\n $cropBox.find('.cropper-center').addClass(CLASS_HIDDEN);\n }\n\n if (options.cropBoxMovable) {\n $face.addClass('cropper-move').data('action', 'all');\n }\n\n if (!options.highlight) {\n $face.addClass('cropper-invisible');\n }\n\n if (options.background) {\n $cropper.addClass('cropper-bg');\n }\n\n if (!options.cropBoxResizable) {\n $cropBox.find('.cropper-line, .cropper-point').addClass(CLASS_HIDDEN);\n }\n\n self.setDragMode(options.dragMode);\n self.render();\n self.ready = true;\n self.setData(options.data);\n\n // Trigger the ready event asynchronously to keep `data('cropper')` is defined\n self.completing = setTimeout(function () {\n if ($.isFunction(options.ready)) {\n $this.one('ready', options.ready);\n }\n\n self.trigger('ready');\n self.trigger('crop', self.getData());\n self.completed = true;\n }, 0);\n }\n }, {\n key: 'unbuild',\n value: function unbuild() {\n var self = this;\n\n if (!self.ready) {\n return;\n }\n\n if (!self.completed) {\n clearTimeout(self.completing);\n }\n\n self.ready = false;\n self.completed = false;\n self.initialImage = null;\n\n // Clear `initialCanvas` is necessary when replace\n self.initialCanvas = null;\n self.initialCropBox = null;\n self.container = null;\n self.canvas = null;\n\n // Clear `cropBox` is necessary when replace\n self.cropBox = null;\n self.unbind();\n\n self.resetPreview();\n self.$preview = null;\n\n self.$viewBox = null;\n self.$cropBox = null;\n self.$dragBox = null;\n self.$canvas = null;\n self.$container = null;\n\n self.$cropper.remove();\n self.$cropper = null;\n }\n }], [{\n key: 'setDefaults',\n value: function setDefaults(options) {\n $.extend(DEFAULTS, $.isPlainObject(options) && options);\n }\n }]);\n\n return Cropper;\n}();\n\n$.extend(Cropper.prototype, render);\n$.extend(Cropper.prototype, preview);\n$.extend(Cropper.prototype, events);\n$.extend(Cropper.prototype, handlers);\n$.extend(Cropper.prototype, change);\n$.extend(Cropper.prototype, methods);\n\nvar NAMESPACE = 'cropper';\nvar OtherCropper = $.fn.cropper;\n\n$.fn.cropper = function jQueryCropper(option) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var result = void 0;\n\n this.each(function (i, element) {\n var $this = $(element);\n var data = $this.data(NAMESPACE);\n\n if (!data) {\n if (/destroy/.test(option)) {\n return;\n }\n\n var options = $.extend({}, $this.data(), $.isPlainObject(option) && option);\n $this.data(NAMESPACE, data = new Cropper(element, options));\n }\n\n if (typeof option === 'string') {\n var fn = data[option];\n\n if ($.isFunction(fn)) {\n result = fn.apply(data, args);\n }\n }\n });\n\n return typeof result !== 'undefined' ? result : this;\n};\n\n$.fn.cropper.Constructor = Cropper;\n$.fn.cropper.setDefaults = Cropper.setDefaults;\n\n// No conflict\n$.fn.cropper.noConflict = function noConflict() {\n $.fn.cropper = OtherCropper;\n return this;\n};\n\n})));\n","var Crypto = exports.Crypto = require('./lib/Crypto').Crypto;\n\n[ 'CryptoMath'\n, 'BlockModes'\n, 'DES'\n, 'AES'\n, 'HMAC'\n, 'MARC4'\n, 'MD5'\n, 'PBKDF2'\n, 'PBKDF2Async'\n, 'Rabbit'\n, 'SHA1'\n, 'SHA256'\n].forEach( function (path) {\n\trequire('./lib/' + path);\n});\n","/*! DataTables 1.10.10\n * ©2008-2015 SpryMedia Ltd - datatables.net/license\n */\n\n/**\n * @summary DataTables\n * @description Paginate, search and order HTML tables\n * @version 1.10.10\n * @file jquery.dataTables.js\n * @author SpryMedia Ltd (www.sprymedia.co.uk)\n * @contact www.sprymedia.co.uk/contact\n * @copyright Copyright 2008-2015 SpryMedia Ltd.\n *\n * This source file is free software, available under the following license:\n * MIT license - http://datatables.net/license\n *\n * This source file is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.\n *\n * For details please refer to: http://www.datatables.net\n */\n\n/*jslint evil: true, undef: true, browser: true */\n/*globals $,require,jQuery,define,_selector_run,_selector_opts,_selector_first,_selector_row_indexes,_ext,_Api,_api_register,_api_registerPlural,_re_new_lines,_re_html,_re_formatted_numeric,_re_escape_regex,_empty,_intVal,_numToDecimal,_isNumber,_isHtml,_htmlNumeric,_pluck,_pluck_order,_range,_stripHtml,_unique,_fnBuildAjax,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnAjaxDataSrc,_fnAddColumn,_fnColumnOptions,_fnAdjustColumnSizing,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnVisbleColumns,_fnGetColumns,_fnColumnTypes,_fnApplyColumnDefs,_fnHungarianMap,_fnCamelToHungarian,_fnLanguageCompat,_fnBrowserDetect,_fnAddData,_fnAddTr,_fnNodeToDataIndex,_fnNodeToColumnIndex,_fnGetCellData,_fnSetCellData,_fnSplitObjNotation,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnGetDataMaster,_fnClearTable,_fnDeleteIndex,_fnInvalidate,_fnGetRowElements,_fnCreateTr,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAddOptionsHtml,_fnDetectHeader,_fnGetUniqueThs,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnFilterCreateSearch,_fnEscapeRegex,_fnFilterData,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnInfoMacros,_fnInitialise,_fnInitComplete,_fnLengthChange,_fnFeatureHtmlLength,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnFeatureHtmlTable,_fnScrollDraw,_fnApplyToChildren,_fnCalculateColumnWidths,_fnThrottle,_fnConvertToWidth,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnSortFlatten,_fnSort,_fnSortAria,_fnSortListener,_fnSortAttachListener,_fnSortingClasses,_fnSortData,_fnSaveState,_fnLoadState,_fnSettingsFromNode,_fnLog,_fnMap,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnLengthOverflow,_fnRenderer,_fnDataSource,_fnRowAttributes*/\n\n(function( factory ) {\n\t\"use strict\";\n\n\tif ( typeof define === 'function' && define.amd ) {\n\t\t// AMD\n\t\tdefine( ['jquery'], function ( $ ) {\n\t\t\treturn factory( $, window, document );\n\t\t} );\n\t}\n\telse if ( typeof exports === 'object' ) {\n\t\t// CommonJS\n\t\tmodule.exports = function (root, $) {\n\t\t\tif ( ! root ) {\n\t\t\t\t// CommonJS environments without a window global must pass a\n\t\t\t\t// root. This will give an error otherwise\n\t\t\t\troot = window;\n\t\t\t}\n\n\t\t\tif ( ! $ ) {\n\t\t\t\t$ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window\n\t\t\t\t\trequire('jquery') :\n\t\t\t\t\trequire('jquery')( root );\n\t\t\t}\n\n\t\t\treturn factory( $, root, root.document );\n\t\t};\n\t}\n\telse {\n\t\t// Browser\n\t\tfactory( jQuery, window, document );\n\t}\n}\n(function( $, window, document, undefined ) {\n\t\"use strict\";\n\n\t/**\n\t * DataTables is a plug-in for the jQuery Javascript library. It is a highly\n\t * flexible tool, based upon the foundations of progressive enhancement,\n\t * which will add advanced interaction controls to any HTML table. For a\n\t * full list of features please refer to\n\t * [DataTables.net](href=\"http://datatables.net).\n\t *\n\t * Note that the `DataTable` object is not a global variable but is aliased\n\t * to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may\n\t * be accessed.\n\t *\n\t * @class\n\t * @param {object} [init={}] Configuration object for DataTables. Options\n\t * are defined by {@link DataTable.defaults}\n\t * @requires jQuery 1.7+\n\t *\n\t * @example\n\t * // Basic initialisation\n\t * $(document).ready( function {\n\t * $('#example').dataTable();\n\t * } );\n\t *\n\t * @example\n\t * // Initialisation with configuration options - in this case, disable\n\t * // pagination and sorting.\n\t * $(document).ready( function {\n\t * $('#example').dataTable( {\n\t * \"paginate\": false,\n\t * \"sort\": false\n\t * } );\n\t * } );\n\t */\n\tvar DataTable;\n\n\t\n\t/*\n\t * It is useful to have variables which are scoped locally so only the\n\t * DataTables functions can access them and they don't leak into global space.\n\t * At the same time these functions are often useful over multiple files in the\n\t * core and API, so we list, or at least document, all variables which are used\n\t * by DataTables as private variables here. This also ensures that there is no\n\t * clashing of variable names and that they can easily referenced for reuse.\n\t */\n\t\n\t\n\t// Defined else where\n\t// _selector_run\n\t// _selector_opts\n\t// _selector_first\n\t// _selector_row_indexes\n\t\n\tvar _ext; // DataTable.ext\n\tvar _Api; // DataTable.Api\n\tvar _api_register; // DataTable.Api.register\n\tvar _api_registerPlural; // DataTable.Api.registerPlural\n\t\n\tvar _re_dic = {};\n\tvar _re_new_lines = /[\\r\\n]/g;\n\tvar _re_html = /<.*?>/g;\n\tvar _re_date_start = /^[\\w\\+\\-]/;\n\tvar _re_date_end = /[\\w\\+\\-]$/;\n\t\n\t// Escape regular expression special characters\n\tvar _re_escape_regex = new RegExp( '(\\\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\\\', '$', '^', '-' ].join('|\\\\') + ')', 'g' );\n\t\n\t// http://en.wikipedia.org/wiki/Foreign_exchange_market\n\t// - \\u20BD - Russian ruble.\n\t// - \\u20a9 - South Korean Won\n\t// - \\u20BA - Turkish Lira\n\t// - \\u20B9 - Indian Rupee\n\t// - R - Brazil (R$) and South Africa\n\t// - fr - Swiss Franc\n\t// - kr - Swedish krona, Norwegian krone and Danish krone\n\t// - \\u2009 is thin space and \\u202F is narrow no-break space, both used in many\n\t// standards as thousands separators.\n\tvar _re_formatted_numeric = /[',$£€¥%\\u2009\\u202F\\u20BD\\u20a9\\u20BArfk]/gi;\n\t\n\t\n\tvar _empty = function ( d ) {\n\t\treturn !d || d === true || d === '-' ? true : false;\n\t};\n\t\n\t\n\tvar _intVal = function ( s ) {\n\t\tvar integer = parseInt( s, 10 );\n\t\treturn !isNaN(integer) && isFinite(s) ? integer : null;\n\t};\n\t\n\t// Convert from a formatted number with characters other than `.` as the\n\t// decimal place, to a Javascript number\n\tvar _numToDecimal = function ( num, decimalPoint ) {\n\t\t// Cache created regular expressions for speed as this function is called often\n\t\tif ( ! _re_dic[ decimalPoint ] ) {\n\t\t\t_re_dic[ decimalPoint ] = new RegExp( _fnEscapeRegex( decimalPoint ), 'g' );\n\t\t}\n\t\treturn typeof num === 'string' && decimalPoint !== '.' ?\n\t\t\tnum.replace( /\\./g, '' ).replace( _re_dic[ decimalPoint ], '.' ) :\n\t\t\tnum;\n\t};\n\t\n\t\n\tvar _isNumber = function ( d, decimalPoint, formatted ) {\n\t\tvar strType = typeof d === 'string';\n\t\n\t\t// If empty return immediately so there must be a number if it is a\n\t\t// formatted string (this stops the string \"k\", or \"kr\", etc being detected\n\t\t// as a formatted number for currency\n\t\tif ( _empty( d ) ) {\n\t\t\treturn true;\n\t\t}\n\t\n\t\tif ( decimalPoint && strType ) {\n\t\t\td = _numToDecimal( d, decimalPoint );\n\t\t}\n\t\n\t\tif ( formatted && strType ) {\n\t\t\td = d.replace( _re_formatted_numeric, '' );\n\t\t}\n\t\n\t\treturn !isNaN( parseFloat(d) ) && isFinite( d );\n\t};\n\t\n\t\n\t// A string without HTML in it can be considered to be HTML still\n\tvar _isHtml = function ( d ) {\n\t\treturn _empty( d ) || typeof d === 'string';\n\t};\n\t\n\t\n\tvar _htmlNumeric = function ( d, decimalPoint, formatted ) {\n\t\tif ( _empty( d ) ) {\n\t\t\treturn true;\n\t\t}\n\t\n\t\tvar html = _isHtml( d );\n\t\treturn ! html ?\n\t\t\tnull :\n\t\t\t_isNumber( _stripHtml( d ), decimalPoint, formatted ) ?\n\t\t\t\ttrue :\n\t\t\t\tnull;\n\t};\n\t\n\t\n\tvar _pluck = function ( a, prop, prop2 ) {\n\t\tvar out = [];\n\t\tvar i=0, ien=a.length;\n\t\n\t\t// Could have the test in the loop for slightly smaller code, but speed\n\t\t// is essential here\n\t\tif ( prop2 !== undefined ) {\n\t\t\tfor ( ; i<ien ; i++ ) {\n\t\t\t\tif ( a[i] && a[i][ prop ] ) {\n\t\t\t\t\tout.push( a[i][ prop ][ prop2 ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor ( ; i<ien ; i++ ) {\n\t\t\t\tif ( a[i] ) {\n\t\t\t\t\tout.push( a[i][ prop ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn out;\n\t};\n\t\n\t\n\t// Basically the same as _pluck, but rather than looping over `a` we use `order`\n\t// as the indexes to pick from `a`\n\tvar _pluck_order = function ( a, order, prop, prop2 )\n\t{\n\t\tvar out = [];\n\t\tvar i=0, ien=order.length;\n\t\n\t\t// Could have the test in the loop for slightly smaller code, but speed\n\t\t// is essential here\n\t\tif ( prop2 !== undefined ) {\n\t\t\tfor ( ; i<ien ; i++ ) {\n\t\t\t\tif ( a[ order[i] ][ prop ] ) {\n\t\t\t\t\tout.push( a[ order[i] ][ prop ][ prop2 ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor ( ; i<ien ; i++ ) {\n\t\t\t\tout.push( a[ order[i] ][ prop ] );\n\t\t\t}\n\t\t}\n\t\n\t\treturn out;\n\t};\n\t\n\t\n\tvar _range = function ( len, start )\n\t{\n\t\tvar out = [];\n\t\tvar end;\n\t\n\t\tif ( start === undefined ) {\n\t\t\tstart = 0;\n\t\t\tend = len;\n\t\t}\n\t\telse {\n\t\t\tend = start;\n\t\t\tstart = len;\n\t\t}\n\t\n\t\tfor ( var i=start ; i<end ; i++ ) {\n\t\t\tout.push( i );\n\t\t}\n\t\n\t\treturn out;\n\t};\n\t\n\t\n\tvar _removeEmpty = function ( a )\n\t{\n\t\tvar out = [];\n\t\n\t\tfor ( var i=0, ien=a.length ; i<ien ; i++ ) {\n\t\t\tif ( a[i] ) { // careful - will remove all falsy values!\n\t\t\t\tout.push( a[i] );\n\t\t\t}\n\t\t}\n\t\n\t\treturn out;\n\t};\n\t\n\t\n\tvar _stripHtml = function ( d ) {\n\t\treturn d.replace( _re_html, '' );\n\t};\n\t\n\t\n\t/**\n\t * Find the unique elements in a source array.\n\t *\n\t * @param {array} src Source array\n\t * @return {array} Array of unique items\n\t * @ignore\n\t */\n\tvar _unique = function ( src )\n\t{\n\t\t// A faster unique method is to use object keys to identify used values,\n\t\t// but this doesn't work with arrays or objects, which we must also\n\t\t// consider. See jsperf.com/compare-array-unique-versions/4 for more\n\t\t// information.\n\t\tvar\n\t\t\tout = [],\n\t\t\tval,\n\t\t\ti, ien=src.length,\n\t\t\tj, k=0;\n\t\n\t\tagain: for ( i=0 ; i<ien ; i++ ) {\n\t\t\tval = src[i];\n\t\n\t\t\tfor ( j=0 ; j<k ; j++ ) {\n\t\t\t\tif ( out[j] === val ) {\n\t\t\t\t\tcontinue again;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tout.push( val );\n\t\t\tk++;\n\t\t}\n\t\n\t\treturn out;\n\t};\n\t\n\t\n\t\n\t/**\n\t * Create a mapping object that allows camel case parameters to be looked up\n\t * for their Hungarian counterparts. The mapping is stored in a private\n\t * parameter called `_hungarianMap` which can be accessed on the source object.\n\t * @param {object} o\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnHungarianMap ( o )\n\t{\n\t\tvar\n\t\t\thungarian = 'a aa ai ao as b fn i m o s ',\n\t\t\tmatch,\n\t\t\tnewKey,\n\t\t\tmap = {};\n\t\n\t\t$.each( o, function (key, val) {\n\t\t\tmatch = key.match(/^([^A-Z]+?)([A-Z])/);\n\t\n\t\t\tif ( match && hungarian.indexOf(match[1]+' ') !== -1 )\n\t\t\t{\n\t\t\t\tnewKey = key.replace( match[0], match[2].toLowerCase() );\n\t\t\t\tmap[ newKey ] = key;\n\t\n\t\t\t\tif ( match[1] === 'o' )\n\t\t\t\t{\n\t\t\t\t\t_fnHungarianMap( o[key] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t\n\t\to._hungarianMap = map;\n\t}\n\t\n\t\n\t/**\n\t * Convert from camel case parameters to Hungarian, based on a Hungarian map\n\t * created by _fnHungarianMap.\n\t * @param {object} src The model object which holds all parameters that can be\n\t * mapped.\n\t * @param {object} user The object to convert from camel case to Hungarian.\n\t * @param {boolean} force When set to `true`, properties which already have a\n\t * Hungarian value in the `user` object will be overwritten. Otherwise they\n\t * won't be.\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnCamelToHungarian ( src, user, force )\n\t{\n\t\tif ( ! src._hungarianMap ) {\n\t\t\t_fnHungarianMap( src );\n\t\t}\n\t\n\t\tvar hungarianKey;\n\t\n\t\t$.each( user, function (key, val) {\n\t\t\thungarianKey = src._hungarianMap[ key ];\n\t\n\t\t\tif ( hungarianKey !== undefined && (force || user[hungarianKey] === undefined) )\n\t\t\t{\n\t\t\t\t// For objects, we need to buzz down into the object to copy parameters\n\t\t\t\tif ( hungarianKey.charAt(0) === 'o' )\n\t\t\t\t{\n\t\t\t\t\t// Copy the camelCase options over to the hungarian\n\t\t\t\t\tif ( ! user[ hungarianKey ] ) {\n\t\t\t\t\t\tuser[ hungarianKey ] = {};\n\t\t\t\t\t}\n\t\t\t\t\t$.extend( true, user[hungarianKey], user[key] );\n\t\n\t\t\t\t\t_fnCamelToHungarian( src[hungarianKey], user[hungarianKey], force );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tuser[hungarianKey] = user[ key ];\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\t\n\t\n\t/**\n\t * Language compatibility - when certain options are given, and others aren't, we\n\t * need to duplicate the values over, in order to provide backwards compatibility\n\t * with older language files.\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnLanguageCompat( lang )\n\t{\n\t\tvar defaults = DataTable.defaults.oLanguage;\n\t\tvar zeroRecords = lang.sZeroRecords;\n\t\n\t\t/* Backwards compatibility - if there is no sEmptyTable given, then use the same as\n\t\t * sZeroRecords - assuming that is given.\n\t\t */\n\t\tif ( ! lang.sEmptyTable && zeroRecords &&\n\t\t\tdefaults.sEmptyTable === \"No data available in table\" )\n\t\t{\n\t\t\t_fnMap( lang, lang, 'sZeroRecords', 'sEmptyTable' );\n\t\t}\n\t\n\t\t/* Likewise with loading records */\n\t\tif ( ! lang.sLoadingRecords && zeroRecords &&\n\t\t\tdefaults.sLoadingRecords === \"Loading...\" )\n\t\t{\n\t\t\t_fnMap( lang, lang, 'sZeroRecords', 'sLoadingRecords' );\n\t\t}\n\t\n\t\t// Old parameter name of the thousands separator mapped onto the new\n\t\tif ( lang.sInfoThousands ) {\n\t\t\tlang.sThousands = lang.sInfoThousands;\n\t\t}\n\t\n\t\tvar decimal = lang.sDecimal;\n\t\tif ( decimal ) {\n\t\t\t_addNumericSort( decimal );\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Map one parameter onto another\n\t * @param {object} o Object to map\n\t * @param {*} knew The new parameter name\n\t * @param {*} old The old parameter name\n\t */\n\tvar _fnCompatMap = function ( o, knew, old ) {\n\t\tif ( o[ knew ] !== undefined ) {\n\t\t\to[ old ] = o[ knew ];\n\t\t}\n\t};\n\t\n\t\n\t/**\n\t * Provide backwards compatibility for the main DT options. Note that the new\n\t * options are mapped onto the old parameters, so this is an external interface\n\t * change only.\n\t * @param {object} init Object to map\n\t */\n\tfunction _fnCompatOpts ( init )\n\t{\n\t\t_fnCompatMap( init, 'ordering', 'bSort' );\n\t\t_fnCompatMap( init, 'orderMulti', 'bSortMulti' );\n\t\t_fnCompatMap( init, 'orderClasses', 'bSortClasses' );\n\t\t_fnCompatMap( init, 'orderCellsTop', 'bSortCellsTop' );\n\t\t_fnCompatMap( init, 'order', 'aaSorting' );\n\t\t_fnCompatMap( init, 'orderFixed', 'aaSortingFixed' );\n\t\t_fnCompatMap( init, 'paging', 'bPaginate' );\n\t\t_fnCompatMap( init, 'pagingType', 'sPaginationType' );\n\t\t_fnCompatMap( init, 'pageLength', 'iDisplayLength' );\n\t\t_fnCompatMap( init, 'searching', 'bFilter' );\n\t\n\t\t// Boolean initialisation of x-scrolling\n\t\tif ( typeof init.sScrollX === 'boolean' ) {\n\t\t\tinit.sScrollX = init.sScrollX ? '100%' : '';\n\t\t}\n\t\tif ( typeof init.scrollX === 'boolean' ) {\n\t\t\tinit.scrollX = init.scrollX ? '100%' : '';\n\t\t}\n\t\n\t\t// Column search objects are in an array, so it needs to be converted\n\t\t// element by element\n\t\tvar searchCols = init.aoSearchCols;\n\t\n\t\tif ( searchCols ) {\n\t\t\tfor ( var i=0, ien=searchCols.length ; i<ien ; i++ ) {\n\t\t\t\tif ( searchCols[i] ) {\n\t\t\t\t\t_fnCamelToHungarian( DataTable.models.oSearch, searchCols[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Provide backwards compatibility for column options. Note that the new options\n\t * are mapped onto the old parameters, so this is an external interface change\n\t * only.\n\t * @param {object} init Object to map\n\t */\n\tfunction _fnCompatCols ( init )\n\t{\n\t\t_fnCompatMap( init, 'orderable', 'bSortable' );\n\t\t_fnCompatMap( init, 'orderData', 'aDataSort' );\n\t\t_fnCompatMap( init, 'orderSequence', 'asSorting' );\n\t\t_fnCompatMap( init, 'orderDataType', 'sortDataType' );\n\t\n\t\t// orderData can be given as an integer\n\t\tvar dataSort = init.aDataSort;\n\t\tif ( dataSort && ! $.isArray( dataSort ) ) {\n\t\t\tinit.aDataSort = [ dataSort ];\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Browser feature detection for capabilities, quirks\n\t * @param {object} settings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnBrowserDetect( settings )\n\t{\n\t\t// We don't need to do this every time DataTables is constructed, the values\n\t\t// calculated are specific to the browser and OS configuration which we\n\t\t// don't expect to change between initialisations\n\t\tif ( ! DataTable.__browser ) {\n\t\t\tvar browser = {};\n\t\t\tDataTable.__browser = browser;\n\t\n\t\t\t// Scrolling feature / quirks detection\n\t\t\tvar n = $('<div/>')\n\t\t\t\t.css( {\n\t\t\t\t\tposition: 'fixed',\n\t\t\t\t\ttop: 0,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\theight: 1,\n\t\t\t\t\twidth: 1,\n\t\t\t\t\toverflow: 'hidden'\n\t\t\t\t} )\n\t\t\t\t.append(\n\t\t\t\t\t$('<div/>')\n\t\t\t\t\t\t.css( {\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\ttop: 1,\n\t\t\t\t\t\t\tleft: 1,\n\t\t\t\t\t\t\twidth: 100,\n\t\t\t\t\t\t\toverflow: 'scroll'\n\t\t\t\t\t\t} )\n\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\t$('<div/>')\n\t\t\t\t\t\t\t\t.css( {\n\t\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\t\theight: 10\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t.appendTo( 'body' );\n\t\n\t\t\tvar outer = n.children();\n\t\t\tvar inner = outer.children();\n\t\n\t\t\t// Numbers below, in order, are:\n\t\t\t// inner.offsetWidth, inner.clientWidth, outer.offsetWidth, outer.clientWidth\n\t\t\t//\n\t\t\t// IE6 XP: 100 100 100 83\n\t\t\t// IE7 Vista: 100 100 100 83\n\t\t\t// IE 8+ Windows: 83 83 100 83\n\t\t\t// Evergreen Windows: 83 83 100 83\n\t\t\t// Evergreen Mac with scrollbars: 85 85 100 85\n\t\t\t// Evergreen Mac without scrollbars: 100 100 100 100\n\t\n\t\t\t// Get scrollbar width\n\t\t\tbrowser.barWidth = outer[0].offsetWidth - outer[0].clientWidth;\n\t\n\t\t\t// IE6/7 will oversize a width 100% element inside a scrolling element, to\n\t\t\t// include the width of the scrollbar, while other browsers ensure the inner\n\t\t\t// element is contained without forcing scrolling\n\t\t\tbrowser.bScrollOversize = inner[0].offsetWidth === 100 && outer[0].clientWidth !== 100;\n\t\n\t\t\t// In rtl text layout, some browsers (most, but not all) will place the\n\t\t\t// scrollbar on the left, rather than the right.\n\t\t\tbrowser.bScrollbarLeft = Math.round( inner.offset().left ) !== 1;\n\t\n\t\t\t// IE8- don't provide height and width for getBoundingClientRect\n\t\t\tbrowser.bBounding = n[0].getBoundingClientRect().width ? true : false;\n\t\n\t\t\tn.remove();\n\t\t}\n\t\n\t\t$.extend( settings.oBrowser, DataTable.__browser );\n\t\tsettings.oScroll.iBarWidth = DataTable.__browser.barWidth;\n\t}\n\t\n\t\n\t/**\n\t * Array.prototype reduce[Right] method, used for browsers which don't support\n\t * JS 1.6. Done this way to reduce code size, since we iterate either way\n\t * @param {object} settings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnReduce ( that, fn, init, start, end, inc )\n\t{\n\t\tvar\n\t\t\ti = start,\n\t\t\tvalue,\n\t\t\tisSet = false;\n\t\n\t\tif ( init !== undefined ) {\n\t\t\tvalue = init;\n\t\t\tisSet = true;\n\t\t}\n\t\n\t\twhile ( i !== end ) {\n\t\t\tif ( ! that.hasOwnProperty(i) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\tvalue = isSet ?\n\t\t\t\tfn( value, that[i], i, that ) :\n\t\t\t\tthat[i];\n\t\n\t\t\tisSet = true;\n\t\t\ti += inc;\n\t\t}\n\t\n\t\treturn value;\n\t}\n\t\n\t/**\n\t * Add a column to the list used for the table with default values\n\t * @param {object} oSettings dataTables settings object\n\t * @param {node} nTh The th element for this column\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnAddColumn( oSettings, nTh )\n\t{\n\t\t// Add column to aoColumns array\n\t\tvar oDefaults = DataTable.defaults.column;\n\t\tvar iCol = oSettings.aoColumns.length;\n\t\tvar oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, {\n\t\t\t\"nTh\": nTh ? nTh : document.createElement('th'),\n\t\t\t\"sTitle\": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '',\n\t\t\t\"aDataSort\": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol],\n\t\t\t\"mData\": oDefaults.mData ? oDefaults.mData : iCol,\n\t\t\tidx: iCol\n\t\t} );\n\t\toSettings.aoColumns.push( oCol );\n\t\n\t\t// Add search object for column specific search. Note that the `searchCols[ iCol ]`\n\t\t// passed into extend can be undefined. This allows the user to give a default\n\t\t// with only some of the parameters defined, and also not give a default\n\t\tvar searchCols = oSettings.aoPreSearchCols;\n\t\tsearchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch, searchCols[ iCol ] );\n\t\n\t\t// Use the default column options function to initialise classes etc\n\t\t_fnColumnOptions( oSettings, iCol, $(nTh).data() );\n\t}\n\t\n\t\n\t/**\n\t * Apply options for a column\n\t * @param {object} oSettings dataTables settings object\n\t * @param {int} iCol column index to consider\n\t * @param {object} oOptions object with sType, bVisible and bSearchable etc\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnColumnOptions( oSettings, iCol, oOptions )\n\t{\n\t\tvar oCol = oSettings.aoColumns[ iCol ];\n\t\tvar oClasses = oSettings.oClasses;\n\t\tvar th = $(oCol.nTh);\n\t\n\t\t// Try to get width information from the DOM. We can't get it from CSS\n\t\t// as we'd need to parse the CSS stylesheet. `width` option can override\n\t\tif ( ! oCol.sWidthOrig ) {\n\t\t\t// Width attribute\n\t\t\toCol.sWidthOrig = th.attr('width') || null;\n\t\n\t\t\t// Style attribute\n\t\t\tvar t = (th.attr('style') || '').match(/width:\\s*(\\d+[pxem%]+)/);\n\t\t\tif ( t ) {\n\t\t\t\toCol.sWidthOrig = t[1];\n\t\t\t}\n\t\t}\n\t\n\t\t/* User specified column options */\n\t\tif ( oOptions !== undefined && oOptions !== null )\n\t\t{\n\t\t\t// Backwards compatibility\n\t\t\t_fnCompatCols( oOptions );\n\t\n\t\t\t// Map camel case parameters to their Hungarian counterparts\n\t\t\t_fnCamelToHungarian( DataTable.defaults.column, oOptions );\n\t\n\t\t\t/* Backwards compatibility for mDataProp */\n\t\t\tif ( oOptions.mDataProp !== undefined && !oOptions.mData )\n\t\t\t{\n\t\t\t\toOptions.mData = oOptions.mDataProp;\n\t\t\t}\n\t\n\t\t\tif ( oOptions.sType )\n\t\t\t{\n\t\t\t\toCol._sManualType = oOptions.sType;\n\t\t\t}\n\t\n\t\t\t// `class` is a reserved word in Javascript, so we need to provide\n\t\t\t// the ability to use a valid name for the camel case input\n\t\t\tif ( oOptions.className && ! oOptions.sClass )\n\t\t\t{\n\t\t\t\toOptions.sClass = oOptions.className;\n\t\t\t}\n\t\n\t\t\t$.extend( oCol, oOptions );\n\t\t\t_fnMap( oCol, oOptions, \"sWidth\", \"sWidthOrig\" );\n\t\n\t\t\t/* iDataSort to be applied (backwards compatibility), but aDataSort will take\n\t\t\t * priority if defined\n\t\t\t */\n\t\t\tif ( oOptions.iDataSort !== undefined )\n\t\t\t{\n\t\t\t\toCol.aDataSort = [ oOptions.iDataSort ];\n\t\t\t}\n\t\t\t_fnMap( oCol, oOptions, \"aDataSort\" );\n\t\t}\n\t\n\t\t/* Cache the data get and set functions for speed */\n\t\tvar mDataSrc = oCol.mData;\n\t\tvar mData = _fnGetObjectDataFn( mDataSrc );\n\t\tvar mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null;\n\t\n\t\tvar attrTest = function( src ) {\n\t\t\treturn typeof src === 'string' && src.indexOf('@') !== -1;\n\t\t};\n\t\toCol._bAttrSrc = $.isPlainObject( mDataSrc ) && (\n\t\t\tattrTest(mDataSrc.sort) || attrTest(mDataSrc.type) || attrTest(mDataSrc.filter)\n\t\t);\n\t\n\t\toCol.fnGetData = function (rowData, type, meta) {\n\t\t\tvar innerData = mData( rowData, type, undefined, meta );\n\t\n\t\t\treturn mRender && type ?\n\t\t\t\tmRender( innerData, type, rowData, meta ) :\n\t\t\t\tinnerData;\n\t\t};\n\t\toCol.fnSetData = function ( rowData, val, meta ) {\n\t\t\treturn _fnSetObjectDataFn( mDataSrc )( rowData, val, meta );\n\t\t};\n\t\n\t\t// Indicate if DataTables should read DOM data as an object or array\n\t\t// Used in _fnGetRowElements\n\t\tif ( typeof mDataSrc !== 'number' ) {\n\t\t\toSettings._rowReadObject = true;\n\t\t}\n\t\n\t\t/* Feature sorting overrides column specific when off */\n\t\tif ( !oSettings.oFeatures.bSort )\n\t\t{\n\t\t\toCol.bSortable = false;\n\t\t\tth.addClass( oClasses.sSortableNone ); // Have to add class here as order event isn't called\n\t\t}\n\t\n\t\t/* Check that the class assignment is correct for sorting */\n\t\tvar bAsc = $.inArray('asc', oCol.asSorting) !== -1;\n\t\tvar bDesc = $.inArray('desc', oCol.asSorting) !== -1;\n\t\tif ( !oCol.bSortable || (!bAsc && !bDesc) )\n\t\t{\n\t\t\toCol.sSortingClass = oClasses.sSortableNone;\n\t\t\toCol.sSortingClassJUI = \"\";\n\t\t}\n\t\telse if ( bAsc && !bDesc )\n\t\t{\n\t\t\toCol.sSortingClass = oClasses.sSortableAsc;\n\t\t\toCol.sSortingClassJUI = oClasses.sSortJUIAscAllowed;\n\t\t}\n\t\telse if ( !bAsc && bDesc )\n\t\t{\n\t\t\toCol.sSortingClass = oClasses.sSortableDesc;\n\t\t\toCol.sSortingClassJUI = oClasses.sSortJUIDescAllowed;\n\t\t}\n\t\telse\n\t\t{\n\t\t\toCol.sSortingClass = oClasses.sSortable;\n\t\t\toCol.sSortingClassJUI = oClasses.sSortJUI;\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Adjust the table column widths for new data. Note: you would probably want to\n\t * do a redraw after calling this function!\n\t * @param {object} settings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnAdjustColumnSizing ( settings )\n\t{\n\t\t/* Not interested in doing column width calculation if auto-width is disabled */\n\t\tif ( settings.oFeatures.bAutoWidth !== false )\n\t\t{\n\t\t\tvar columns = settings.aoColumns;\n\t\n\t\t\t_fnCalculateColumnWidths( settings );\n\t\t\tfor ( var i=0 , iLen=columns.length ; i<iLen ; i++ )\n\t\t\t{\n\t\t\t\tcolumns[i].nTh.style.width = columns[i].sWidth;\n\t\t\t}\n\t\t}\n\t\n\t\tvar scroll = settings.oScroll;\n\t\tif ( scroll.sY !== '' || scroll.sX !== '')\n\t\t{\n\t\t\t_fnScrollDraw( settings );\n\t\t}\n\t\n\t\t_fnCallbackFire( settings, null, 'column-sizing', [settings] );\n\t}\n\t\n\t\n\t/**\n\t * Covert the index of a visible column to the index in the data array (take account\n\t * of hidden columns)\n\t * @param {object} oSettings dataTables settings object\n\t * @param {int} iMatch Visible column index to lookup\n\t * @returns {int} i the data index\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnVisibleToColumnIndex( oSettings, iMatch )\n\t{\n\t\tvar aiVis = _fnGetColumns( oSettings, 'bVisible' );\n\t\n\t\treturn typeof aiVis[iMatch] === 'number' ?\n\t\t\taiVis[iMatch] :\n\t\t\tnull;\n\t}\n\t\n\t\n\t/**\n\t * Covert the index of an index in the data array and convert it to the visible\n\t * column index (take account of hidden columns)\n\t * @param {int} iMatch Column index to lookup\n\t * @param {object} oSettings dataTables settings object\n\t * @returns {int} i the data index\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnColumnIndexToVisible( oSettings, iMatch )\n\t{\n\t\tvar aiVis = _fnGetColumns( oSettings, 'bVisible' );\n\t\tvar iPos = $.inArray( iMatch, aiVis );\n\t\n\t\treturn iPos !== -1 ? iPos : null;\n\t}\n\t\n\t\n\t/**\n\t * Get the number of visible columns\n\t * @param {object} oSettings dataTables settings object\n\t * @returns {int} i the number of visible columns\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnVisbleColumns( oSettings )\n\t{\n\t\treturn _fnGetColumns( oSettings, 'bVisible' ).length;\n\t}\n\t\n\t\n\t/**\n\t * Get an array of column indexes that match a given property\n\t * @param {object} oSettings dataTables settings object\n\t * @param {string} sParam Parameter in aoColumns to look for - typically\n\t * bVisible or bSearchable\n\t * @returns {array} Array of indexes with matched properties\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnGetColumns( oSettings, sParam )\n\t{\n\t\tvar a = [];\n\t\n\t\t$.map( oSettings.aoColumns, function(val, i) {\n\t\t\tif ( val[sParam] ) {\n\t\t\t\ta.push( i );\n\t\t\t}\n\t\t} );\n\t\n\t\treturn a;\n\t}\n\t\n\t\n\t/**\n\t * Calculate the 'type' of a column\n\t * @param {object} settings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnColumnTypes ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar data = settings.aoData;\n\t\tvar types = DataTable.ext.type.detect;\n\t\tvar i, ien, j, jen, k, ken;\n\t\tvar col, cell, detectedType, cache;\n\t\n\t\t// For each column, spin over the \n\t\tfor ( i=0, ien=columns.length ; i<ien ; i++ ) {\n\t\t\tcol = columns[i];\n\t\t\tcache = [];\n\t\n\t\t\tif ( ! col.sType && col._sManualType ) {\n\t\t\t\tcol.sType = col._sManualType;\n\t\t\t}\n\t\t\telse if ( ! col.sType ) {\n\t\t\t\tfor ( j=0, jen=types.length ; j<jen ; j++ ) {\n\t\t\t\t\tfor ( k=0, ken=data.length ; k<ken ; k++ ) {\n\t\t\t\t\t\t// Use a cache array so we only need to get the type data\n\t\t\t\t\t\t// from the formatter once (when using multiple detectors)\n\t\t\t\t\t\tif ( cache[k] === undefined ) {\n\t\t\t\t\t\t\tcache[k] = _fnGetCellData( settings, k, i, 'type' );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tdetectedType = types[j]( cache[k], settings );\n\t\n\t\t\t\t\t\t// If null, then this type can't apply to this column, so\n\t\t\t\t\t\t// rather than testing all cells, break out. There is an\n\t\t\t\t\t\t// exception for the last type which is `html`. We need to\n\t\t\t\t\t\t// scan all rows since it is possible to mix string and HTML\n\t\t\t\t\t\t// types\n\t\t\t\t\t\tif ( ! detectedType && j !== types.length-1 ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Only a single match is needed for html type since it is\n\t\t\t\t\t\t// bottom of the pile and very similar to string\n\t\t\t\t\t\tif ( detectedType === 'html' ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// Type is valid for all data points in the column - use this\n\t\t\t\t\t// type\n\t\t\t\t\tif ( detectedType ) {\n\t\t\t\t\t\tcol.sType = detectedType;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// Fall back - if no type was detected, always use string\n\t\t\t\tif ( ! col.sType ) {\n\t\t\t\t\tcol.sType = 'string';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Take the column definitions and static columns arrays and calculate how\n\t * they relate to column indexes. The callback function will then apply the\n\t * definition found for a column to a suitable configuration object.\n\t * @param {object} oSettings dataTables settings object\n\t * @param {array} aoColDefs The aoColumnDefs array that is to be applied\n\t * @param {array} aoCols The aoColumns array that defines columns individually\n\t * @param {function} fn Callback function - takes two parameters, the calculated\n\t * column index and the definition for that column.\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )\n\t{\n\t\tvar i, iLen, j, jLen, k, kLen, def;\n\t\tvar columns = oSettings.aoColumns;\n\t\n\t\t// Column definitions with aTargets\n\t\tif ( aoColDefs )\n\t\t{\n\t\t\t/* Loop over the definitions array - loop in reverse so first instance has priority */\n\t\t\tfor ( i=aoColDefs.length-1 ; i>=0 ; i-- )\n\t\t\t{\n\t\t\t\tdef = aoColDefs[i];\n\t\n\t\t\t\t/* Each definition can target multiple columns, as it is an array */\n\t\t\t\tvar aTargets = def.targets !== undefined ?\n\t\t\t\t\tdef.targets :\n\t\t\t\t\tdef.aTargets;\n\t\n\t\t\t\tif ( ! $.isArray( aTargets ) )\n\t\t\t\t{\n\t\t\t\t\taTargets = [ aTargets ];\n\t\t\t\t}\n\t\n\t\t\t\tfor ( j=0, jLen=aTargets.length ; j<jLen ; j++ )\n\t\t\t\t{\n\t\t\t\t\tif ( typeof aTargets[j] === 'number' && aTargets[j] >= 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Add columns that we don't yet know about */\n\t\t\t\t\t\twhile( columns.length <= aTargets[j] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_fnAddColumn( oSettings );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t/* Integer, basic index */\n\t\t\t\t\t\tfn( aTargets[j], def );\n\t\t\t\t\t}\n\t\t\t\t\telse if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Negative integer, right to left column counting */\n\t\t\t\t\t\tfn( columns.length+aTargets[j], def );\n\t\t\t\t\t}\n\t\t\t\t\telse if ( typeof aTargets[j] === 'string' )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Class name matching on TH element */\n\t\t\t\t\t\tfor ( k=0, kLen=columns.length ; k<kLen ; k++ )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( aTargets[j] == \"_all\" ||\n\t\t\t\t\t\t\t $(columns[k].nTh).hasClass( aTargets[j] ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfn( k, def );\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}\n\t\n\t\t// Statically defined columns array\n\t\tif ( aoCols )\n\t\t{\n\t\t\tfor ( i=0, iLen=aoCols.length ; i<iLen ; i++ )\n\t\t\t{\n\t\t\t\tfn( i, aoCols[i] );\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/**\n\t * Add a data array to the table, creating DOM node etc. This is the parallel to\n\t * _fnGatherData, but for adding rows from a Javascript source, rather than a\n\t * DOM source.\n\t * @param {object} oSettings dataTables settings object\n\t * @param {array} aData data array to be added\n\t * @param {node} [nTr] TR element to add to the table - optional. If not given,\n\t * DataTables will create a row automatically\n\t * @param {array} [anTds] Array of TD|TH elements for the row - must be given\n\t * if nTr is.\n\t * @returns {int} >=0 if successful (index of new aoData entry), -1 if failed\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnAddData ( oSettings, aDataIn, nTr, anTds )\n\t{\n\t\t/* Create the object for storing information about this new row */\n\t\tvar iRow = oSettings.aoData.length;\n\t\tvar oData = $.extend( true, {}, DataTable.models.oRow, {\n\t\t\tsrc: nTr ? 'dom' : 'data',\n\t\t\tidx: iRow\n\t\t} );\n\t\n\t\toData._aData = aDataIn;\n\t\toSettings.aoData.push( oData );\n\t\n\t\t/* Create the cells */\n\t\tvar nTd, sThisType;\n\t\tvar columns = oSettings.aoColumns;\n\t\n\t\t// Invalidate the column types as the new data needs to be revalidated\n\t\tfor ( var i=0, iLen=columns.length ; i<iLen ; i++ )\n\t\t{\n\t\t\tcolumns[i].sType = null;\n\t\t}\n\t\n\t\t/* Add to the display array */\n\t\toSettings.aiDisplayMaster.push( iRow );\n\t\n\t\tvar id = oSettings.rowIdFn( aDataIn );\n\t\tif ( id !== undefined ) {\n\t\t\toSettings.aIds[ id ] = oData;\n\t\t}\n\t\n\t\t/* Create the DOM information, or register it if already present */\n\t\tif ( nTr || ! oSettings.oFeatures.bDeferRender )\n\t\t{\n\t\t\t_fnCreateTr( oSettings, iRow, nTr, anTds );\n\t\t}\n\t\n\t\treturn iRow;\n\t}\n\t\n\t\n\t/**\n\t * Add one or more TR elements to the table. Generally we'd expect to\n\t * use this for reading data from a DOM sourced table, but it could be\n\t * used for an TR element. Note that if a TR is given, it is used (i.e.\n\t * it is not cloned).\n\t * @param {object} settings dataTables settings object\n\t * @param {array|node|jQuery} trs The TR element(s) to add to the table\n\t * @returns {array} Array of indexes for the added rows\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnAddTr( settings, trs )\n\t{\n\t\tvar row;\n\t\n\t\t// Allow an individual node to be passed in\n\t\tif ( ! (trs instanceof $) ) {\n\t\t\ttrs = $(trs);\n\t\t}\n\t\n\t\treturn trs.map( function (i, el) {\n\t\t\trow = _fnGetRowElements( settings, el );\n\t\t\treturn _fnAddData( settings, row.data, el, row.cells );\n\t\t} );\n\t}\n\t\n\t\n\t/**\n\t * Take a TR element and convert it to an index in aoData\n\t * @param {object} oSettings dataTables settings object\n\t * @param {node} n the TR element to find\n\t * @returns {int} index if the node is found, null if not\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnNodeToDataIndex( oSettings, n )\n\t{\n\t\treturn (n._DT_RowIndex!==undefined) ? n._DT_RowIndex : null;\n\t}\n\t\n\t\n\t/**\n\t * Take a TD element and convert it into a column data index (not the visible index)\n\t * @param {object} oSettings dataTables settings object\n\t * @param {int} iRow The row number the TD/TH can be found in\n\t * @param {node} n The TD/TH element to find\n\t * @returns {int} index if the node is found, -1 if not\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnNodeToColumnIndex( oSettings, iRow, n )\n\t{\n\t\treturn $.inArray( n, oSettings.aoData[ iRow ].anCells );\n\t}\n\t\n\t\n\t/**\n\t * Get the data for a given cell from the internal cache, taking into account data mapping\n\t * @param {object} settings dataTables settings object\n\t * @param {int} rowIdx aoData row id\n\t * @param {int} colIdx Column index\n\t * @param {string} type data get type ('display', 'type' 'filter' 'sort')\n\t * @returns {*} Cell data\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnGetCellData( settings, rowIdx, colIdx, type )\n\t{\n\t\tvar draw = settings.iDraw;\n\t\tvar col = settings.aoColumns[colIdx];\n\t\tvar rowData = settings.aoData[rowIdx]._aData;\n\t\tvar defaultContent = col.sDefaultContent;\n\t\tvar cellData = col.fnGetData( rowData, type, {\n\t\t\tsettings: settings,\n\t\t\trow: rowIdx,\n\t\t\tcol: colIdx\n\t\t} );\n\t\n\t\tif ( cellData === undefined ) {\n\t\t\tif ( settings.iDrawError != draw && defaultContent === null ) {\n\t\t\t\t_fnLog( settings, 0, \"Requested unknown parameter \"+\n\t\t\t\t\t(typeof col.mData=='function' ? '{function}' : \"'\"+col.mData+\"'\")+\n\t\t\t\t\t\" for row \"+rowIdx+\", column \"+colIdx, 4 );\n\t\t\t\tsettings.iDrawError = draw;\n\t\t\t}\n\t\t\treturn defaultContent;\n\t\t}\n\t\n\t\t/* When the data source is null, we can use default column data */\n\t\tif ( (cellData === rowData || cellData === null) && defaultContent !== null ) {\n\t\t\tcellData = defaultContent;\n\t\t}\n\t\telse if ( typeof cellData === 'function' ) {\n\t\t\t// If the data source is a function, then we run it and use the return,\n\t\t\t// executing in the scope of the data object (for instances)\n\t\t\treturn cellData.call( rowData );\n\t\t}\n\t\n\t\tif ( cellData === null && type == 'display' ) {\n\t\t\treturn '';\n\t\t}\n\t\treturn cellData;\n\t}\n\t\n\t\n\t/**\n\t * Set the value for a specific cell, into the internal data cache\n\t * @param {object} settings dataTables settings object\n\t * @param {int} rowIdx aoData row id\n\t * @param {int} colIdx Column index\n\t * @param {*} val Value to set\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnSetCellData( settings, rowIdx, colIdx, val )\n\t{\n\t\tvar col = settings.aoColumns[colIdx];\n\t\tvar rowData = settings.aoData[rowIdx]._aData;\n\t\n\t\tcol.fnSetData( rowData, val, {\n\t\t\tsettings: settings,\n\t\t\trow: rowIdx,\n\t\t\tcol: colIdx\n\t\t} );\n\t}\n\t\n\t\n\t// Private variable that is used to match action syntax in the data property object\n\tvar __reArray = /\\[.*?\\]$/;\n\tvar __reFn = /\\(\\)$/;\n\t\n\t/**\n\t * Split string on periods, taking into account escaped periods\n\t * @param {string} str String to split\n\t * @return {array} Split string\n\t */\n\tfunction _fnSplitObjNotation( str )\n\t{\n\t\treturn $.map( str.match(/(\\\\.|[^\\.])+/g) || [''], function ( s ) {\n\t\t\treturn s.replace(/\\\\./g, '.');\n\t\t} );\n\t}\n\t\n\t\n\t/**\n\t * Return a function that can be used to get data from a source object, taking\n\t * into account the ability to use nested objects as a source\n\t * @param {string|int|function} mSource The data source for the object\n\t * @returns {function} Data get function\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnGetObjectDataFn( mSource )\n\t{\n\t\tif ( $.isPlainObject( mSource ) )\n\t\t{\n\t\t\t/* Build an object of get functions, and wrap them in a single call */\n\t\t\tvar o = {};\n\t\t\t$.each( mSource, function (key, val) {\n\t\t\t\tif ( val ) {\n\t\t\t\t\to[key] = _fnGetObjectDataFn( val );\n\t\t\t\t}\n\t\t\t} );\n\t\n\t\t\treturn function (data, type, row, meta) {\n\t\t\t\tvar t = o[type] || o._;\n\t\t\t\treturn t !== undefined ?\n\t\t\t\t\tt(data, type, row, meta) :\n\t\t\t\t\tdata;\n\t\t\t};\n\t\t}\n\t\telse if ( mSource === null )\n\t\t{\n\t\t\t/* Give an empty string for rendering / sorting etc */\n\t\t\treturn function (data) { // type, row and meta also passed, but not used\n\t\t\t\treturn data;\n\t\t\t};\n\t\t}\n\t\telse if ( typeof mSource === 'function' )\n\t\t{\n\t\t\treturn function (data, type, row, meta) {\n\t\t\t\treturn mSource( data, type, row, meta );\n\t\t\t};\n\t\t}\n\t\telse if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 ||\n\t\t\t mSource.indexOf('[') !== -1 || mSource.indexOf('(') !== -1) )\n\t\t{\n\t\t\t/* If there is a . in the source string then the data source is in a\n\t\t\t * nested object so we loop over the data for each level to get the next\n\t\t\t * level down. On each loop we test for undefined, and if found immediately\n\t\t\t * return. This allows entire objects to be missing and sDefaultContent to\n\t\t\t * be used if defined, rather than throwing an error\n\t\t\t */\n\t\t\tvar fetchData = function (data, type, src) {\n\t\t\t\tvar arrayNotation, funcNotation, out, innerSrc;\n\t\n\t\t\t\tif ( src !== \"\" )\n\t\t\t\t{\n\t\t\t\t\tvar a = _fnSplitObjNotation( src );\n\t\n\t\t\t\t\tfor ( var i=0, iLen=a.length ; i<iLen ; i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\t// Check if we are dealing with special notation\n\t\t\t\t\t\tarrayNotation = a[i].match(__reArray);\n\t\t\t\t\t\tfuncNotation = a[i].match(__reFn);\n\t\n\t\t\t\t\t\tif ( arrayNotation )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Array notation\n\t\t\t\t\t\t\ta[i] = a[i].replace(__reArray, '');\n\t\n\t\t\t\t\t\t\t// Condition allows simply [] to be passed in\n\t\t\t\t\t\t\tif ( a[i] !== \"\" ) {\n\t\t\t\t\t\t\t\tdata = data[ a[i] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tout = [];\n\t\n\t\t\t\t\t\t\t// Get the remainder of the nested object to get\n\t\t\t\t\t\t\ta.splice( 0, i+1 );\n\t\t\t\t\t\t\tinnerSrc = a.join('.');\n\t\n\t\t\t\t\t\t\t// Traverse each entry in the array getting the properties requested\n\t\t\t\t\t\t\tif ( $.isArray( data ) ) {\n\t\t\t\t\t\t\t\tfor ( var j=0, jLen=data.length ; j<jLen ; j++ ) {\n\t\t\t\t\t\t\t\t\tout.push( fetchData( data[j], type, innerSrc ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t// If a string is given in between the array notation indicators, that\n\t\t\t\t\t\t\t// is used to join the strings together, otherwise an array is returned\n\t\t\t\t\t\t\tvar join = arrayNotation[0].substring(1, arrayNotation[0].length-1);\n\t\t\t\t\t\t\tdata = (join===\"\") ? out : out.join(join);\n\t\n\t\t\t\t\t\t\t// The inner call to fetchData has already traversed through the remainder\n\t\t\t\t\t\t\t// of the source requested, so we exit from the loop\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ( funcNotation )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Function call\n\t\t\t\t\t\t\ta[i] = a[i].replace(__reFn, '');\n\t\t\t\t\t\t\tdata = data[ a[i] ]();\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( data === null || data[ a[i] ] === undefined )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdata = data[ a[i] ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\treturn data;\n\t\t\t};\n\t\n\t\t\treturn function (data, type) { // row and meta also passed, but not used\n\t\t\t\treturn fetchData( data, type, mSource );\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Array or flat object mapping */\n\t\t\treturn function (data, type) { // row and meta also passed, but not used\n\t\t\t\treturn data[mSource];\n\t\t\t};\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Return a function that can be used to set data from a source object, taking\n\t * into account the ability to use nested objects as a source\n\t * @param {string|int|function} mSource The data source for the object\n\t * @returns {function} Data set function\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnSetObjectDataFn( mSource )\n\t{\n\t\tif ( $.isPlainObject( mSource ) )\n\t\t{\n\t\t\t/* Unlike get, only the underscore (global) option is used for for\n\t\t\t * setting data since we don't know the type here. This is why an object\n\t\t\t * option is not documented for `mData` (which is read/write), but it is\n\t\t\t * for `mRender` which is read only.\n\t\t\t */\n\t\t\treturn _fnSetObjectDataFn( mSource._ );\n\t\t}\n\t\telse if ( mSource === null )\n\t\t{\n\t\t\t/* Nothing to do when the data source is null */\n\t\t\treturn function () {};\n\t\t}\n\t\telse if ( typeof mSource === 'function' )\n\t\t{\n\t\t\treturn function (data, val, meta) {\n\t\t\t\tmSource( data, 'set', val, meta );\n\t\t\t};\n\t\t}\n\t\telse if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 ||\n\t\t\t mSource.indexOf('[') !== -1 || mSource.indexOf('(') !== -1) )\n\t\t{\n\t\t\t/* Like the get, we need to get data from a nested object */\n\t\t\tvar setData = function (data, val, src) {\n\t\t\t\tvar a = _fnSplitObjNotation( src ), b;\n\t\t\t\tvar aLast = a[a.length-1];\n\t\t\t\tvar arrayNotation, funcNotation, o, innerSrc;\n\t\n\t\t\t\tfor ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )\n\t\t\t\t{\n\t\t\t\t\t// Check if we are dealing with an array notation request\n\t\t\t\t\tarrayNotation = a[i].match(__reArray);\n\t\t\t\t\tfuncNotation = a[i].match(__reFn);\n\t\n\t\t\t\t\tif ( arrayNotation )\n\t\t\t\t\t{\n\t\t\t\t\t\ta[i] = a[i].replace(__reArray, '');\n\t\t\t\t\t\tdata[ a[i] ] = [];\n\t\n\t\t\t\t\t\t// Get the remainder of the nested object to set so we can recurse\n\t\t\t\t\t\tb = a.slice();\n\t\t\t\t\t\tb.splice( 0, i+1 );\n\t\t\t\t\t\tinnerSrc = b.join('.');\n\t\n\t\t\t\t\t\t// Traverse each entry in the array setting the properties requested\n\t\t\t\t\t\tif ( $.isArray( val ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor ( var j=0, jLen=val.length ; j<jLen ; j++ )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\to = {};\n\t\t\t\t\t\t\t\tsetData( o, val[j], innerSrc );\n\t\t\t\t\t\t\t\tdata[ a[i] ].push( o );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// We've been asked to save data to an array, but it\n\t\t\t\t\t\t\t// isn't array data to be saved. Best that can be done\n\t\t\t\t\t\t\t// is to just save the value.\n\t\t\t\t\t\t\tdata[ a[i] ] = val;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// The inner call to setData has already traversed through the remainder\n\t\t\t\t\t\t// of the source and has set the data, thus we can exit here\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( funcNotation )\n\t\t\t\t\t{\n\t\t\t\t\t\t// Function call\n\t\t\t\t\t\ta[i] = a[i].replace(__reFn, '');\n\t\t\t\t\t\tdata = data[ a[i] ]( val );\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If the nested object doesn't currently exist - since we are\n\t\t\t\t\t// trying to set the value - create it\n\t\t\t\t\tif ( data[ a[i] ] === null || data[ a[i] ] === undefined )\n\t\t\t\t\t{\n\t\t\t\t\t\tdata[ a[i] ] = {};\n\t\t\t\t\t}\n\t\t\t\t\tdata = data[ a[i] ];\n\t\t\t\t}\n\t\n\t\t\t\t// Last item in the input - i.e, the actual set\n\t\t\t\tif ( aLast.match(__reFn ) )\n\t\t\t\t{\n\t\t\t\t\t// Function call\n\t\t\t\t\tdata = data[ aLast.replace(__reFn, '') ]( val );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// If array notation is used, we just want to strip it and use the property name\n\t\t\t\t\t// and assign the value. If it isn't used, then we get the result we want anyway\n\t\t\t\t\tdata[ aLast.replace(__reArray, '') ] = val;\n\t\t\t\t}\n\t\t\t};\n\t\n\t\t\treturn function (data, val) { // meta is also passed in, but not used\n\t\t\t\treturn setData( data, val, mSource );\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Array or flat object mapping */\n\t\t\treturn function (data, val) { // meta is also passed in, but not used\n\t\t\t\tdata[mSource] = val;\n\t\t\t};\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Return an array with the full table data\n\t * @param {object} oSettings dataTables settings object\n\t * @returns array {array} aData Master data array\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnGetDataMaster ( settings )\n\t{\n\t\treturn _pluck( settings.aoData, '_aData' );\n\t}\n\t\n\t\n\t/**\n\t * Nuke the table\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnClearTable( settings )\n\t{\n\t\tsettings.aoData.length = 0;\n\t\tsettings.aiDisplayMaster.length = 0;\n\t\tsettings.aiDisplay.length = 0;\n\t\tsettings.aIds = {};\n\t}\n\t\n\t\n\t /**\n\t * Take an array of integers (index array) and remove a target integer (value - not\n\t * the key!)\n\t * @param {array} a Index array to target\n\t * @param {int} iTarget value to find\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnDeleteIndex( a, iTarget, splice )\n\t{\n\t\tvar iTargetIndex = -1;\n\t\n\t\tfor ( var i=0, iLen=a.length ; i<iLen ; i++ )\n\t\t{\n\t\t\tif ( a[i] == iTarget )\n\t\t\t{\n\t\t\t\tiTargetIndex = i;\n\t\t\t}\n\t\t\telse if ( a[i] > iTarget )\n\t\t\t{\n\t\t\t\ta[i]--;\n\t\t\t}\n\t\t}\n\t\n\t\tif ( iTargetIndex != -1 && splice === undefined )\n\t\t{\n\t\t\ta.splice( iTargetIndex, 1 );\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Mark cached data as invalid such that a re-read of the data will occur when\n\t * the cached data is next requested. Also update from the data source object.\n\t *\n\t * @param {object} settings DataTables settings object\n\t * @param {int} rowIdx Row index to invalidate\n\t * @param {string} [src] Source to invalidate from: undefined, 'auto', 'dom'\n\t * or 'data'\n\t * @param {int} [colIdx] Column index to invalidate. If undefined the whole\n\t * row will be invalidated\n\t * @memberof DataTable#oApi\n\t *\n\t * @todo For the modularisation of v1.11 this will need to become a callback, so\n\t * the sort and filter methods can subscribe to it. That will required\n\t * initialisation options for sorting, which is why it is not already baked in\n\t */\n\tfunction _fnInvalidate( settings, rowIdx, src, colIdx )\n\t{\n\t\tvar row = settings.aoData[ rowIdx ];\n\t\tvar i, ien;\n\t\tvar cellWrite = function ( cell, col ) {\n\t\t\t// This is very frustrating, but in IE if you just write directly\n\t\t\t// to innerHTML, and elements that are overwritten are GC'ed,\n\t\t\t// even if there is a reference to them elsewhere\n\t\t\twhile ( cell.childNodes.length ) {\n\t\t\t\tcell.removeChild( cell.firstChild );\n\t\t\t}\n\t\n\t\t\tcell.innerHTML = _fnGetCellData( settings, rowIdx, col, 'display' );\n\t\t};\n\t\n\t\t// Are we reading last data from DOM or the data object?\n\t\tif ( src === 'dom' || ((! src || src === 'auto') && row.src === 'dom') ) {\n\t\t\t// Read the data from the DOM\n\t\t\trow._aData = _fnGetRowElements(\n\t\t\t\t\tsettings, row, colIdx, colIdx === undefined ? undefined : row._aData\n\t\t\t\t)\n\t\t\t\t.data;\n\t\t}\n\t\telse {\n\t\t\t// Reading from data object, update the DOM\n\t\t\tvar cells = row.anCells;\n\t\n\t\t\tif ( cells ) {\n\t\t\t\tif ( colIdx !== undefined ) {\n\t\t\t\t\tcellWrite( cells[colIdx], colIdx );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfor ( i=0, ien=cells.length ; i<ien ; i++ ) {\n\t\t\t\t\t\tcellWrite( cells[i], i );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// For both row and cell invalidation, the cached data for sorting and\n\t\t// filtering is nulled out\n\t\trow._aSortData = null;\n\t\trow._aFilterData = null;\n\t\n\t\t// Invalidate the type for a specific column (if given) or all columns since\n\t\t// the data might have changed\n\t\tvar cols = settings.aoColumns;\n\t\tif ( colIdx !== undefined ) {\n\t\t\tcols[ colIdx ].sType = null;\n\t\t}\n\t\telse {\n\t\t\tfor ( i=0, ien=cols.length ; i<ien ; i++ ) {\n\t\t\t\tcols[i].sType = null;\n\t\t\t}\n\t\n\t\t\t// Update DataTables special `DT_*` attributes for the row\n\t\t\t_fnRowAttributes( settings, row );\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Build a data source object from an HTML row, reading the contents of the\n\t * cells that are in the row.\n\t *\n\t * @param {object} settings DataTables settings object\n\t * @param {node|object} TR element from which to read data or existing row\n\t * object from which to re-read the data from the cells\n\t * @param {int} [colIdx] Optional column index\n\t * @param {array|object} [d] Data source object. If `colIdx` is given then this\n\t * parameter should also be given and will be used to write the data into.\n\t * Only the column in question will be written\n\t * @returns {object} Object with two parameters: `data` the data read, in\n\t * document order, and `cells` and array of nodes (they can be useful to the\n\t * caller, so rather than needing a second traversal to get them, just return\n\t * them from here).\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnGetRowElements( settings, row, colIdx, d )\n\t{\n\t\tvar\n\t\t\ttds = [],\n\t\t\ttd = row.firstChild,\n\t\t\tname, col, o, i=0, contents,\n\t\t\tcolumns = settings.aoColumns,\n\t\t\tobjectRead = settings._rowReadObject;\n\t\n\t\t// Allow the data object to be passed in, or construct\n\t\td = d !== undefined ?\n\t\t\td :\n\t\t\tobjectRead ?\n\t\t\t\t{} :\n\t\t\t\t[];\n\t\n\t\tvar attr = function ( str, td ) {\n\t\t\tif ( typeof str === 'string' ) {\n\t\t\t\tvar idx = str.indexOf('@');\n\t\n\t\t\t\tif ( idx !== -1 ) {\n\t\t\t\t\tvar attr = str.substring( idx+1 );\n\t\t\t\t\tvar setter = _fnSetObjectDataFn( str );\n\t\t\t\t\tsetter( d, td.getAttribute( attr ) );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\n\t\t// Read data from a cell and store into the data object\n\t\tvar cellProcess = function ( cell ) {\n\t\t\tif ( colIdx === undefined || colIdx === i ) {\n\t\t\t\tcol = columns[i];\n\t\t\t\tcontents = $.trim(cell.innerHTML);\n\t\n\t\t\t\tif ( col && col._bAttrSrc ) {\n\t\t\t\t\tvar setter = _fnSetObjectDataFn( col.mData._ );\n\t\t\t\t\tsetter( d, contents );\n\t\n\t\t\t\t\tattr( col.mData.sort, cell );\n\t\t\t\t\tattr( col.mData.type, cell );\n\t\t\t\t\tattr( col.mData.filter, cell );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Depending on the `data` option for the columns the data can\n\t\t\t\t\t// be read to either an object or an array.\n\t\t\t\t\tif ( objectRead ) {\n\t\t\t\t\t\tif ( ! col._setter ) {\n\t\t\t\t\t\t\t// Cache the setter function\n\t\t\t\t\t\t\tcol._setter = _fnSetObjectDataFn( col.mData );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcol._setter( d, contents );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\td[i] = contents;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\ti++;\n\t\t};\n\t\n\t\tif ( td ) {\n\t\t\t// `tr` element was passed in\n\t\t\twhile ( td ) {\n\t\t\t\tname = td.nodeName.toUpperCase();\n\t\n\t\t\t\tif ( name == \"TD\" || name == \"TH\" ) {\n\t\t\t\t\tcellProcess( td );\n\t\t\t\t\ttds.push( td );\n\t\t\t\t}\n\t\n\t\t\t\ttd = td.nextSibling;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Existing row object passed in\n\t\t\ttds = row.anCells;\n\t\n\t\t\tfor ( var j=0, jen=tds.length ; j<jen ; j++ ) {\n\t\t\t\tcellProcess( tds[j] );\n\t\t\t}\n\t\t}\n\t\n\t\t// Read the ID from the DOM if present\n\t\tvar rowNode = row.firstChild ? row : row.nTr;\n\t\n\t\tif ( rowNode ) {\n\t\t\tvar id = rowNode.getAttribute( 'id' );\n\t\n\t\t\tif ( id ) {\n\t\t\t\t_fnSetObjectDataFn( settings.rowId )( d, id );\n\t\t\t}\n\t\t}\n\t\n\t\treturn {\n\t\t\tdata: d,\n\t\t\tcells: tds\n\t\t};\n\t}\n\t/**\n\t * Create a new TR element (and it's TD children) for a row\n\t * @param {object} oSettings dataTables settings object\n\t * @param {int} iRow Row to consider\n\t * @param {node} [nTrIn] TR element to add to the table - optional. If not given,\n\t * DataTables will create a row automatically\n\t * @param {array} [anTds] Array of TD|TH elements for the row - must be given\n\t * if nTr is.\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnCreateTr ( oSettings, iRow, nTrIn, anTds )\n\t{\n\t\tvar\n\t\t\trow = oSettings.aoData[iRow],\n\t\t\trowData = row._aData,\n\t\t\tcells = [],\n\t\t\tnTr, nTd, oCol,\n\t\t\ti, iLen;\n\t\n\t\tif ( row.nTr === null )\n\t\t{\n\t\t\tnTr = nTrIn || document.createElement('tr');\n\t\n\t\t\trow.nTr = nTr;\n\t\t\trow.anCells = cells;\n\t\n\t\t\t/* Use a private property on the node to allow reserve mapping from the node\n\t\t\t * to the aoData array for fast look up\n\t\t\t */\n\t\t\tnTr._DT_RowIndex = iRow;\n\t\n\t\t\t/* Special parameters can be given by the data source to be used on the row */\n\t\t\t_fnRowAttributes( oSettings, row );\n\t\n\t\t\t/* Process each column */\n\t\t\tfor ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )\n\t\t\t{\n\t\t\t\toCol = oSettings.aoColumns[i];\n\t\n\t\t\t\tnTd = nTrIn ? anTds[i] : document.createElement( oCol.sCellType );\n\t\t\t\tnTd._DT_CellIndex = {\n\t\t\t\t\trow: iRow,\n\t\t\t\t\tcolumn: i\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tcells.push( nTd );\n\t\n\t\t\t\t// Need to create the HTML if new, or if a rendering function is defined\n\t\t\t\tif ( !nTrIn || oCol.mRender || oCol.mData !== i )\n\t\t\t\t{\n\t\t\t\t\tnTd.innerHTML = _fnGetCellData( oSettings, iRow, i, 'display' );\n\t\t\t\t}\n\t\n\t\t\t\t/* Add user defined class */\n\t\t\t\tif ( oCol.sClass )\n\t\t\t\t{\n\t\t\t\t\tnTd.className += ' '+oCol.sClass;\n\t\t\t\t}\n\t\n\t\t\t\t// Visibility - add or remove as required\n\t\t\t\tif ( oCol.bVisible && ! nTrIn )\n\t\t\t\t{\n\t\t\t\t\tnTr.appendChild( nTd );\n\t\t\t\t}\n\t\t\t\telse if ( ! oCol.bVisible && nTrIn )\n\t\t\t\t{\n\t\t\t\t\tnTd.parentNode.removeChild( nTd );\n\t\t\t\t}\n\t\n\t\t\t\tif ( oCol.fnCreatedCell )\n\t\t\t\t{\n\t\t\t\t\toCol.fnCreatedCell.call( oSettings.oInstance,\n\t\t\t\t\t\tnTd, _fnGetCellData( oSettings, iRow, i ), rowData, iRow, i\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [nTr, rowData, iRow] );\n\t\t}\n\t\n\t\t// Remove once webkit bug 131819 and Chromium bug 365619 have been resolved\n\t\t// and deployed\n\t\trow.nTr.setAttribute( 'role', 'row' );\n\t}\n\t\n\t\n\t/**\n\t * Add attributes to a row based on the special `DT_*` parameters in a data\n\t * source object.\n\t * @param {object} settings DataTables settings object\n\t * @param {object} DataTables row object for the row to be modified\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnRowAttributes( settings, row )\n\t{\n\t\tvar tr = row.nTr;\n\t\tvar data = row._aData;\n\t\n\t\tif ( tr ) {\n\t\t\tvar id = settings.rowIdFn( data );\n\t\n\t\t\tif ( id ) {\n\t\t\t\ttr.id = id;\n\t\t\t}\n\t\n\t\t\tif ( data.DT_RowClass ) {\n\t\t\t\t// Remove any classes added by DT_RowClass before\n\t\t\t\tvar a = data.DT_RowClass.split(' ');\n\t\t\t\trow.__rowc = row.__rowc ?\n\t\t\t\t\t_unique( row.__rowc.concat( a ) ) :\n\t\t\t\t\ta;\n\t\n\t\t\t\t$(tr)\n\t\t\t\t\t.removeClass( row.__rowc.join(' ') )\n\t\t\t\t\t.addClass( data.DT_RowClass );\n\t\t\t}\n\t\n\t\t\tif ( data.DT_RowAttr ) {\n\t\t\t\t$(tr).attr( data.DT_RowAttr );\n\t\t\t}\n\t\n\t\t\tif ( data.DT_RowData ) {\n\t\t\t\t$(tr).data( data.DT_RowData );\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Create the HTML header for the table\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnBuildHead( oSettings )\n\t{\n\t\tvar i, ien, cell, row, column;\n\t\tvar thead = oSettings.nTHead;\n\t\tvar tfoot = oSettings.nTFoot;\n\t\tvar createHeader = $('th, td', thead).length === 0;\n\t\tvar classes = oSettings.oClasses;\n\t\tvar columns = oSettings.aoColumns;\n\t\n\t\tif ( createHeader ) {\n\t\t\trow = $('<tr/>').appendTo( thead );\n\t\t}\n\t\n\t\tfor ( i=0, ien=columns.length ; i<ien ; i++ ) {\n\t\t\tcolumn = columns[i];\n\t\t\tcell = $( column.nTh ).addClass( column.sClass );\n\t\n\t\t\tif ( createHeader ) {\n\t\t\t\tcell.appendTo( row );\n\t\t\t}\n\t\n\t\t\t// 1.11 move into sorting\n\t\t\tif ( oSettings.oFeatures.bSort ) {\n\t\t\t\tcell.addClass( column.sSortingClass );\n\t\n\t\t\t\tif ( column.bSortable !== false ) {\n\t\t\t\t\tcell\n\t\t\t\t\t\t.attr( 'tabindex', oSettings.iTabIndex )\n\t\t\t\t\t\t.attr( 'aria-controls', oSettings.sTableId );\n\t\n\t\t\t\t\t_fnSortAttachListener( oSettings, column.nTh, i );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif ( column.sTitle != cell[0].innerHTML ) {\n\t\t\t\tcell.html( column.sTitle );\n\t\t\t}\n\t\n\t\t\t_fnRenderer( oSettings, 'header' )(\n\t\t\t\toSettings, cell, column, classes\n\t\t\t);\n\t\t}\n\t\n\t\tif ( createHeader ) {\n\t\t\t_fnDetectHeader( oSettings.aoHeader, thead );\n\t\t}\n\t\t\n\t\t/* ARIA role for the rows */\n\t \t$(thead).find('>tr').attr('role', 'row');\n\t\n\t\t/* Deal with the footer - add classes if required */\n\t\t$(thead).find('>tr>th, >tr>td').addClass( classes.sHeaderTH );\n\t\t$(tfoot).find('>tr>th, >tr>td').addClass( classes.sFooterTH );\n\t\n\t\t// Cache the footer cells. Note that we only take the cells from the first\n\t\t// row in the footer. If there is more than one row the user wants to\n\t\t// interact with, they need to use the table().foot() method. Note also this\n\t\t// allows cells to be used for multiple columns using colspan\n\t\tif ( tfoot !== null ) {\n\t\t\tvar cells = oSettings.aoFooter[0];\n\t\n\t\t\tfor ( i=0, ien=cells.length ; i<ien ; i++ ) {\n\t\t\t\tcolumn = columns[i];\n\t\t\t\tcolumn.nTf = cells[i].cell;\n\t\n\t\t\t\tif ( column.sClass ) {\n\t\t\t\t\t$(column.nTf).addClass( column.sClass );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Draw the header (or footer) element based on the column visibility states. The\n\t * methodology here is to use the layout array from _fnDetectHeader, modified for\n\t * the instantaneous column visibility, to construct the new layout. The grid is\n\t * traversed over cell at a time in a rows x columns grid fashion, although each\n\t * cell insert can cover multiple elements in the grid - which is tracks using the\n\t * aApplied array. Cell inserts in the grid will only occur where there isn't\n\t * already a cell in that position.\n\t * @param {object} oSettings dataTables settings object\n\t * @param array {objects} aoSource Layout array from _fnDetectHeader\n\t * @param {boolean} [bIncludeHidden=false] If true then include the hidden columns in the calc,\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnDrawHead( oSettings, aoSource, bIncludeHidden )\n\t{\n\t\tvar i, iLen, j, jLen, k, kLen, n, nLocalTr;\n\t\tvar aoLocal = [];\n\t\tvar aApplied = [];\n\t\tvar iColumns = oSettings.aoColumns.length;\n\t\tvar iRowspan, iColspan;\n\t\n\t\tif ( ! aoSource )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\n\t\tif ( bIncludeHidden === undefined )\n\t\t{\n\t\t\tbIncludeHidden = false;\n\t\t}\n\t\n\t\t/* Make a copy of the master layout array, but without the visible columns in it */\n\t\tfor ( i=0, iLen=aoSource.length ; i<iLen ; i++ )\n\t\t{\n\t\t\taoLocal[i] = aoSource[i].slice();\n\t\t\taoLocal[i].nTr = aoSource[i].nTr;\n\t\n\t\t\t/* Remove any columns which are currently hidden */\n\t\t\tfor ( j=iColumns-1 ; j>=0 ; j-- )\n\t\t\t{\n\t\t\t\tif ( !oSettings.aoColumns[j].bVisible && !bIncludeHidden )\n\t\t\t\t{\n\t\t\t\t\taoLocal[i].splice( j, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t/* Prep the applied array - it needs an element for each row */\n\t\t\taApplied.push( [] );\n\t\t}\n\t\n\t\tfor ( i=0, iLen=aoLocal.length ; i<iLen ; i++ )\n\t\t{\n\t\t\tnLocalTr = aoLocal[i].nTr;\n\t\n\t\t\t/* All cells are going to be replaced, so empty out the row */\n\t\t\tif ( nLocalTr )\n\t\t\t{\n\t\t\t\twhile( (n = nLocalTr.firstChild) )\n\t\t\t\t{\n\t\t\t\t\tnLocalTr.removeChild( n );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tfor ( j=0, jLen=aoLocal[i].length ; j<jLen ; j++ )\n\t\t\t{\n\t\t\t\tiRowspan = 1;\n\t\t\t\tiColspan = 1;\n\t\n\t\t\t\t/* Check to see if there is already a cell (row/colspan) covering our target\n\t\t\t\t * insert point. If there is, then there is nothing to do.\n\t\t\t\t */\n\t\t\t\tif ( aApplied[i][j] === undefined )\n\t\t\t\t{\n\t\t\t\t\tnLocalTr.appendChild( aoLocal[i][j].cell );\n\t\t\t\t\taApplied[i][j] = 1;\n\t\n\t\t\t\t\t/* Expand the cell to cover as many rows as needed */\n\t\t\t\t\twhile ( aoLocal[i+iRowspan] !== undefined &&\n\t\t\t\t\t aoLocal[i][j].cell == aoLocal[i+iRowspan][j].cell )\n\t\t\t\t\t{\n\t\t\t\t\t\taApplied[i+iRowspan][j] = 1;\n\t\t\t\t\t\tiRowspan++;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t/* Expand the cell to cover as many columns as needed */\n\t\t\t\t\twhile ( aoLocal[i][j+iColspan] !== undefined &&\n\t\t\t\t\t aoLocal[i][j].cell == aoLocal[i][j+iColspan].cell )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Must update the applied array over the rows for the columns */\n\t\t\t\t\t\tfor ( k=0 ; k<iRowspan ; k++ )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taApplied[i+k][j+iColspan] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tiColspan++;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t/* Do the actual expansion in the DOM */\n\t\t\t\t\t$(aoLocal[i][j].cell)\n\t\t\t\t\t\t.attr('rowspan', iRowspan)\n\t\t\t\t\t\t.attr('colspan', iColspan);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Insert the required TR nodes into the table for display\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnDraw( oSettings )\n\t{\n\t\t/* Provide a pre-callback function which can be used to cancel the draw is false is returned */\n\t\tvar aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );\n\t\tif ( $.inArray( false, aPreDraw ) !== -1 )\n\t\t{\n\t\t\t_fnProcessingDisplay( oSettings, false );\n\t\t\treturn;\n\t\t}\n\t\n\t\tvar i, iLen, n;\n\t\tvar anRows = [];\n\t\tvar iRowCount = 0;\n\t\tvar asStripeClasses = oSettings.asStripeClasses;\n\t\tvar iStripes = asStripeClasses.length;\n\t\tvar iOpenRows = oSettings.aoOpenRows.length;\n\t\tvar oLang = oSettings.oLanguage;\n\t\tvar iInitDisplayStart = oSettings.iInitDisplayStart;\n\t\tvar bServerSide = _fnDataSource( oSettings ) == 'ssp';\n\t\tvar aiDisplay = oSettings.aiDisplay;\n\t\n\t\toSettings.bDrawing = true;\n\t\n\t\t/* Check and see if we have an initial draw position from state saving */\n\t\tif ( iInitDisplayStart !== undefined && iInitDisplayStart !== -1 )\n\t\t{\n\t\t\toSettings._iDisplayStart = bServerSide ?\n\t\t\t\tiInitDisplayStart :\n\t\t\t\tiInitDisplayStart >= oSettings.fnRecordsDisplay() ?\n\t\t\t\t\t0 :\n\t\t\t\t\tiInitDisplayStart;\n\t\n\t\t\toSettings.iInitDisplayStart = -1;\n\t\t}\n\t\n\t\tvar iDisplayStart = oSettings._iDisplayStart;\n\t\tvar iDisplayEnd = oSettings.fnDisplayEnd();\n\t\n\t\t/* Server-side processing draw intercept */\n\t\tif ( oSettings.bDeferLoading )\n\t\t{\n\t\t\toSettings.bDeferLoading = false;\n\t\t\toSettings.iDraw++;\n\t\t\t_fnProcessingDisplay( oSettings, false );\n\t\t}\n\t\telse if ( !bServerSide )\n\t\t{\n\t\t\toSettings.iDraw++;\n\t\t}\n\t\telse if ( !oSettings.bDestroying && !_fnAjaxUpdate( oSettings ) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\n\t\tif ( aiDisplay.length !== 0 )\n\t\t{\n\t\t\tvar iStart = bServerSide ? 0 : iDisplayStart;\n\t\t\tvar iEnd = bServerSide ? oSettings.aoData.length : iDisplayEnd;\n\t\n\t\t\tfor ( var j=iStart ; j<iEnd ; j++ )\n\t\t\t{\n\t\t\t\tvar iDataIndex = aiDisplay[j];\n\t\t\t\tvar aoData = oSettings.aoData[ iDataIndex ];\n\t\t\t\tif ( aoData.nTr === null )\n\t\t\t\t{\n\t\t\t\t\t_fnCreateTr( oSettings, iDataIndex );\n\t\t\t\t}\n\t\n\t\t\t\tvar nRow = aoData.nTr;\n\t\n\t\t\t\t/* Remove the old striping classes and then add the new one */\n\t\t\t\tif ( iStripes !== 0 )\n\t\t\t\t{\n\t\t\t\t\tvar sStripe = asStripeClasses[ iRowCount % iStripes ];\n\t\t\t\t\tif ( aoData._sRowStripe != sStripe )\n\t\t\t\t\t{\n\t\t\t\t\t\t$(nRow).removeClass( aoData._sRowStripe ).addClass( sStripe );\n\t\t\t\t\t\taoData._sRowStripe = sStripe;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// Row callback functions - might want to manipulate the row\n\t\t\t\t// iRowCount and j are not currently documented. Are they at all\n\t\t\t\t// useful?\n\t\t\t\t_fnCallbackFire( oSettings, 'aoRowCallback', null,\n\t\t\t\t\t[nRow, aoData._aData, iRowCount, j] );\n\t\n\t\t\t\tanRows.push( nRow );\n\t\t\t\tiRowCount++;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Table is empty - create a row with an empty message in it */\n\t\t\tvar sZero = oLang.sZeroRecords;\n\t\t\tif ( oSettings.iDraw == 1 && _fnDataSource( oSettings ) == 'ajax' )\n\t\t\t{\n\t\t\t\tsZero = oLang.sLoadingRecords;\n\t\t\t}\n\t\t\telse if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 )\n\t\t\t{\n\t\t\t\tsZero = oLang.sEmptyTable;\n\t\t\t}\n\t\n\t\t\tanRows[ 0 ] = $( '<tr/>', { 'class': iStripes ? asStripeClasses[0] : '' } )\n\t\t\t\t.append( $('<td />', {\n\t\t\t\t\t'valign': 'top',\n\t\t\t\t\t'colSpan': _fnVisbleColumns( oSettings ),\n\t\t\t\t\t'class': oSettings.oClasses.sRowEmpty\n\t\t\t\t} ).html( sZero ) )[0];\n\t\t}\n\t\n\t\t/* Header and footer callbacks */\n\t\t_fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0],\n\t\t\t_fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );\n\t\n\t\t_fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0],\n\t\t\t_fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );\n\t\n\t\tvar body = $(oSettings.nTBody);\n\t\n\t\tbody.children().detach();\n\t\tbody.append( $(anRows) );\n\t\n\t\t/* Call all required callback functions for the end of a draw */\n\t\t_fnCallbackFire( oSettings, 'aoDrawCallback', 'draw', [oSettings] );\n\t\n\t\t/* Draw is complete, sorting and filtering must be as well */\n\t\toSettings.bSorted = false;\n\t\toSettings.bFiltered = false;\n\t\toSettings.bDrawing = false;\n\t}\n\t\n\t\n\t/**\n\t * Redraw the table - taking account of the various features which are enabled\n\t * @param {object} oSettings dataTables settings object\n\t * @param {boolean} [holdPosition] Keep the current paging position. By default\n\t * the paging is reset to the first page\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnReDraw( settings, holdPosition )\n\t{\n\t\tvar\n\t\t\tfeatures = settings.oFeatures,\n\t\t\tsort = features.bSort,\n\t\t\tfilter = features.bFilter;\n\t\n\t\tif ( sort ) {\n\t\t\t_fnSort( settings );\n\t\t}\n\t\n\t\tif ( filter ) {\n\t\t\t_fnFilterComplete( settings, settings.oPreviousSearch );\n\t\t}\n\t\telse {\n\t\t\t// No filtering, so we want to just use the display master\n\t\t\tsettings.aiDisplay = settings.aiDisplayMaster.slice();\n\t\t}\n\t\n\t\tif ( holdPosition !== true ) {\n\t\t\tsettings._iDisplayStart = 0;\n\t\t}\n\t\n\t\t// Let any modules know about the draw hold position state (used by\n\t\t// scrolling internally)\n\t\tsettings._drawHold = holdPosition;\n\t\n\t\t_fnDraw( settings );\n\t\n\t\tsettings._drawHold = false;\n\t}\n\t\n\t\n\t/**\n\t * Add the options to the page HTML for the table\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnAddOptionsHtml ( oSettings )\n\t{\n\t\tvar classes = oSettings.oClasses;\n\t\tvar table = $(oSettings.nTable);\n\t\tvar holding = $('<div/>').insertBefore( table ); // Holding element for speed\n\t\tvar features = oSettings.oFeatures;\n\t\n\t\t// All DataTables are wrapped in a div\n\t\tvar insert = $('<div/>', {\n\t\t\tid: oSettings.sTableId+'_wrapper',\n\t\t\t'class': classes.sWrapper + (oSettings.nTFoot ? '' : ' '+classes.sNoFooter)\n\t\t} );\n\t\n\t\toSettings.nHolding = holding[0];\n\t\toSettings.nTableWrapper = insert[0];\n\t\toSettings.nTableReinsertBefore = oSettings.nTable.nextSibling;\n\t\n\t\t/* Loop over the user set positioning and place the elements as needed */\n\t\tvar aDom = oSettings.sDom.split('');\n\t\tvar featureNode, cOption, nNewNode, cNext, sAttr, j;\n\t\tfor ( var i=0 ; i<aDom.length ; i++ )\n\t\t{\n\t\t\tfeatureNode = null;\n\t\t\tcOption = aDom[i];\n\t\n\t\t\tif ( cOption == '<' )\n\t\t\t{\n\t\t\t\t/* New container div */\n\t\t\t\tnNewNode = $('<div/>')[0];\n\t\n\t\t\t\t/* Check to see if we should append an id and/or a class name to the container */\n\t\t\t\tcNext = aDom[i+1];\n\t\t\t\tif ( cNext == \"'\" || cNext == '\"' )\n\t\t\t\t{\n\t\t\t\t\tsAttr = \"\";\n\t\t\t\t\tj = 2;\n\t\t\t\t\twhile ( aDom[i+j] != cNext )\n\t\t\t\t\t{\n\t\t\t\t\t\tsAttr += aDom[i+j];\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t/* Replace jQuery UI constants @todo depreciated */\n\t\t\t\t\tif ( sAttr == \"H\" )\n\t\t\t\t\t{\n\t\t\t\t\t\tsAttr = classes.sJUIHeader;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( sAttr == \"F\" )\n\t\t\t\t\t{\n\t\t\t\t\t\tsAttr = classes.sJUIFooter;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t/* The attribute can be in the format of \"#id.class\", \"#id\" or \"class\" This logic\n\t\t\t\t\t * breaks the string into parts and applies them as needed\n\t\t\t\t\t */\n\t\t\t\t\tif ( sAttr.indexOf('.') != -1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tvar aSplit = sAttr.split('.');\n\t\t\t\t\t\tnNewNode.id = aSplit[0].substr(1, aSplit[0].length-1);\n\t\t\t\t\t\tnNewNode.className = aSplit[1];\n\t\t\t\t\t}\n\t\t\t\t\telse if ( sAttr.charAt(0) == \"#\" )\n\t\t\t\t\t{\n\t\t\t\t\t\tnNewNode.id = sAttr.substr(1, sAttr.length-1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnNewNode.className = sAttr;\n\t\t\t\t\t}\n\t\n\t\t\t\t\ti += j; /* Move along the position array */\n\t\t\t\t}\n\t\n\t\t\t\tinsert.append( nNewNode );\n\t\t\t\tinsert = $(nNewNode);\n\t\t\t}\n\t\t\telse if ( cOption == '>' )\n\t\t\t{\n\t\t\t\t/* End container div */\n\t\t\t\tinsert = insert.parent();\n\t\t\t}\n\t\t\t// @todo Move options into their own plugins?\n\t\t\telse if ( cOption == 'l' && features.bPaginate && features.bLengthChange )\n\t\t\t{\n\t\t\t\t/* Length */\n\t\t\t\tfeatureNode = _fnFeatureHtmlLength( oSettings );\n\t\t\t}\n\t\t\telse if ( cOption == 'f' && features.bFilter )\n\t\t\t{\n\t\t\t\t/* Filter */\n\t\t\t\tfeatureNode = _fnFeatureHtmlFilter( oSettings );\n\t\t\t}\n\t\t\telse if ( cOption == 'r' && features.bProcessing )\n\t\t\t{\n\t\t\t\t/* pRocessing */\n\t\t\t\tfeatureNode = _fnFeatureHtmlProcessing( oSettings );\n\t\t\t}\n\t\t\telse if ( cOption == 't' )\n\t\t\t{\n\t\t\t\t/* Table */\n\t\t\t\tfeatureNode = _fnFeatureHtmlTable( oSettings );\n\t\t\t}\n\t\t\telse if ( cOption == 'i' && features.bInfo )\n\t\t\t{\n\t\t\t\t/* Info */\n\t\t\t\tfeatureNode = _fnFeatureHtmlInfo( oSettings );\n\t\t\t}\n\t\t\telse if ( cOption == 'p' && features.bPaginate )\n\t\t\t{\n\t\t\t\t/* Pagination */\n\t\t\t\tfeatureNode = _fnFeatureHtmlPaginate( oSettings );\n\t\t\t}\n\t\t\telse if ( DataTable.ext.feature.length !== 0 )\n\t\t\t{\n\t\t\t\t/* Plug-in features */\n\t\t\t\tvar aoFeatures = DataTable.ext.feature;\n\t\t\t\tfor ( var k=0, kLen=aoFeatures.length ; k<kLen ; k++ )\n\t\t\t\t{\n\t\t\t\t\tif ( cOption == aoFeatures[k].cFeature )\n\t\t\t\t\t{\n\t\t\t\t\t\tfeatureNode = aoFeatures[k].fnInit( oSettings );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t/* Add to the 2D features array */\n\t\t\tif ( featureNode )\n\t\t\t{\n\t\t\t\tvar aanFeatures = oSettings.aanFeatures;\n\t\n\t\t\t\tif ( ! aanFeatures[cOption] )\n\t\t\t\t{\n\t\t\t\t\taanFeatures[cOption] = [];\n\t\t\t\t}\n\t\n\t\t\t\taanFeatures[cOption].push( featureNode );\n\t\t\t\tinsert.append( featureNode );\n\t\t\t}\n\t\t}\n\t\n\t\t/* Built our DOM structure - replace the holding div with what we want */\n\t\tholding.replaceWith( insert );\n\t\toSettings.nHolding = null;\n\t}\n\t\n\t\n\t/**\n\t * Use the DOM source to create up an array of header cells. The idea here is to\n\t * create a layout grid (array) of rows x columns, which contains a reference\n\t * to the cell that that point in the grid (regardless of col/rowspan), such that\n\t * any column / row could be removed and the new grid constructed\n\t * @param array {object} aLayout Array to store the calculated layout in\n\t * @param {node} nThead The header/footer element for the table\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnDetectHeader ( aLayout, nThead )\n\t{\n\t\tvar nTrs = $(nThead).children('tr');\n\t\tvar nTr, nCell;\n\t\tvar i, k, l, iLen, jLen, iColShifted, iColumn, iColspan, iRowspan;\n\t\tvar bUnique;\n\t\tvar fnShiftCol = function ( a, i, j ) {\n\t\t\tvar k = a[i];\n\t while ( k[j] ) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\treturn j;\n\t\t};\n\t\n\t\taLayout.splice( 0, aLayout.length );\n\t\n\t\t/* We know how many rows there are in the layout - so prep it */\n\t\tfor ( i=0, iLen=nTrs.length ; i<iLen ; i++ )\n\t\t{\n\t\t\taLayout.push( [] );\n\t\t}\n\t\n\t\t/* Calculate a layout array */\n\t\tfor ( i=0, iLen=nTrs.length ; i<iLen ; i++ )\n\t\t{\n\t\t\tnTr = nTrs[i];\n\t\t\tiColumn = 0;\n\t\n\t\t\t/* For every cell in the row... */\n\t\t\tnCell = nTr.firstChild;\n\t\t\twhile ( nCell ) {\n\t\t\t\tif ( nCell.nodeName.toUpperCase() == \"TD\" ||\n\t\t\t\t nCell.nodeName.toUpperCase() == \"TH\" )\n\t\t\t\t{\n\t\t\t\t\t/* Get the col and rowspan attributes from the DOM and sanitise them */\n\t\t\t\t\tiColspan = nCell.getAttribute('colspan') * 1;\n\t\t\t\t\tiRowspan = nCell.getAttribute('rowspan') * 1;\n\t\t\t\t\tiColspan = (!iColspan || iColspan===0 || iColspan===1) ? 1 : iColspan;\n\t\t\t\t\tiRowspan = (!iRowspan || iRowspan===0 || iRowspan===1) ? 1 : iRowspan;\n\t\n\t\t\t\t\t/* There might be colspan cells already in this row, so shift our target\n\t\t\t\t\t * accordingly\n\t\t\t\t\t */\n\t\t\t\t\tiColShifted = fnShiftCol( aLayout, i, iColumn );\n\t\n\t\t\t\t\t/* Cache calculation for unique columns */\n\t\t\t\t\tbUnique = iColspan === 1 ? true : false;\n\t\n\t\t\t\t\t/* If there is col / rowspan, copy the information into the layout grid */\n\t\t\t\t\tfor ( l=0 ; l<iColspan ; l++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tfor ( k=0 ; k<iRowspan ; k++ )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taLayout[i+k][iColShifted+l] = {\n\t\t\t\t\t\t\t\t\"cell\": nCell,\n\t\t\t\t\t\t\t\t\"unique\": bUnique\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\taLayout[i+k].nTr = nTr;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnCell = nCell.nextSibling;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Get an array of unique th elements, one for each column\n\t * @param {object} oSettings dataTables settings object\n\t * @param {node} nHeader automatically detect the layout from this node - optional\n\t * @param {array} aLayout thead/tfoot layout from _fnDetectHeader - optional\n\t * @returns array {node} aReturn list of unique th's\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnGetUniqueThs ( oSettings, nHeader, aLayout )\n\t{\n\t\tvar aReturn = [];\n\t\tif ( !aLayout )\n\t\t{\n\t\t\taLayout = oSettings.aoHeader;\n\t\t\tif ( nHeader )\n\t\t\t{\n\t\t\t\taLayout = [];\n\t\t\t\t_fnDetectHeader( aLayout, nHeader );\n\t\t\t}\n\t\t}\n\t\n\t\tfor ( var i=0, iLen=aLayout.length ; i<iLen ; i++ )\n\t\t{\n\t\t\tfor ( var j=0, jLen=aLayout[i].length ; j<jLen ; j++ )\n\t\t\t{\n\t\t\t\tif ( aLayout[i][j].unique &&\n\t\t\t\t\t (!aReturn[j] || !oSettings.bSortCellsTop) )\n\t\t\t\t{\n\t\t\t\t\taReturn[j] = aLayout[i][j].cell;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn aReturn;\n\t}\n\t\n\t/**\n\t * Create an Ajax call based on the table's settings, taking into account that\n\t * parameters can have multiple forms, and backwards compatibility.\n\t *\n\t * @param {object} oSettings dataTables settings object\n\t * @param {array} data Data to send to the server, required by\n\t * DataTables - may be augmented by developer callbacks\n\t * @param {function} fn Callback function to run when data is obtained\n\t */\n\tfunction _fnBuildAjax( oSettings, data, fn )\n\t{\n\t\t// Compatibility with 1.9-, allow fnServerData and event to manipulate\n\t\t_fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );\n\t\n\t\t// Convert to object based for 1.10+ if using the old array scheme which can\n\t\t// come from server-side processing or serverParams\n\t\tif ( data && $.isArray(data) ) {\n\t\t\tvar tmp = {};\n\t\t\tvar rbracket = /(.*?)\\[\\]$/;\n\t\n\t\t\t$.each( data, function (key, val) {\n\t\t\t\tvar match = val.name.match(rbracket);\n\t\n\t\t\t\tif ( match ) {\n\t\t\t\t\t// Support for arrays\n\t\t\t\t\tvar name = match[0];\n\t\n\t\t\t\t\tif ( ! tmp[ name ] ) {\n\t\t\t\t\t\ttmp[ name ] = [];\n\t\t\t\t\t}\n\t\t\t\t\ttmp[ name ].push( val.value );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttmp[val.name] = val.value;\n\t\t\t\t}\n\t\t\t} );\n\t\t\tdata = tmp;\n\t\t}\n\t\n\t\tvar ajaxData;\n\t\tvar ajax = oSettings.ajax;\n\t\tvar instance = oSettings.oInstance;\n\t\tvar callback = function ( json ) {\n\t\t\t_fnCallbackFire( oSettings, null, 'xhr', [oSettings, json, oSettings.jqXHR] );\n\t\t\tfn( json );\n\t\t};\n\t\n\t\tif ( $.isPlainObject( ajax ) && ajax.data )\n\t\t{\n\t\t\tajaxData = ajax.data;\n\t\n\t\t\tvar newData = $.isFunction( ajaxData ) ?\n\t\t\t\tajaxData( data, oSettings ) : // fn can manipulate data or return\n\t\t\t\tajaxData; // an object object or array to merge\n\t\n\t\t\t// If the function returned something, use that alone\n\t\t\tdata = $.isFunction( ajaxData ) && newData ?\n\t\t\t\tnewData :\n\t\t\t\t$.extend( true, data, newData );\n\t\n\t\t\t// Remove the data property as we've resolved it already and don't want\n\t\t\t// jQuery to do it again (it is restored at the end of the function)\n\t\t\tdelete ajax.data;\n\t\t}\n\t\n\t\tvar baseAjax = {\n\t\t\t\"data\": data,\n\t\t\t\"success\": function (json) {\n\t\t\t\tvar error = json.error || json.sError;\n\t\t\t\tif ( error ) {\n\t\t\t\t\t_fnLog( oSettings, 0, error );\n\t\t\t\t}\n\t\n\t\t\t\toSettings.json = json;\n\t\t\t\tcallback( json );\n\t\t\t},\n\t\t\t\"dataType\": \"json\",\n\t\t\t\"cache\": false,\n\t\t\t\"type\": oSettings.sServerMethod,\n\t\t\t\"error\": function (xhr, error, thrown) {\n\t\t\t\tvar ret = _fnCallbackFire( oSettings, null, 'xhr', [oSettings, null, oSettings.jqXHR] );\n\t\n\t\t\t\tif ( $.inArray( true, ret ) === -1 ) {\n\t\t\t\t\tif ( error == \"parsererror\" ) {\n\t\t\t\t\t\t_fnLog( oSettings, 0, 'Invalid JSON response', 1 );\n\t\t\t\t\t}\n\t\t\t\t\telse if ( xhr.readyState === 4 ) {\n\t\t\t\t\t\t_fnLog( oSettings, 0, 'Ajax error', 7 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t_fnProcessingDisplay( oSettings, false );\n\t\t\t}\n\t\t};\n\t\n\t\t// Store the data submitted for the API\n\t\toSettings.oAjaxData = data;\n\t\n\t\t// Allow plug-ins and external processes to modify the data\n\t\t_fnCallbackFire( oSettings, null, 'preXhr', [oSettings, data] );\n\t\n\t\tif ( oSettings.fnServerData )\n\t\t{\n\t\t\t// DataTables 1.9- compatibility\n\t\t\toSettings.fnServerData.call( instance,\n\t\t\t\toSettings.sAjaxSource,\n\t\t\t\t$.map( data, function (val, key) { // Need to convert back to 1.9 trad format\n\t\t\t\t\treturn { name: key, value: val };\n\t\t\t\t} ),\n\t\t\t\tcallback,\n\t\t\t\toSettings\n\t\t\t);\n\t\t}\n\t\telse if ( oSettings.sAjaxSource || typeof ajax === 'string' )\n\t\t{\n\t\t\t// DataTables 1.9- compatibility\n\t\t\toSettings.jqXHR = $.ajax( $.extend( baseAjax, {\n\t\t\t\turl: ajax || oSettings.sAjaxSource\n\t\t\t} ) );\n\t\t}\n\t\telse if ( $.isFunction( ajax ) )\n\t\t{\n\t\t\t// Is a function - let the caller define what needs to be done\n\t\t\toSettings.jqXHR = ajax.call( instance, data, callback, oSettings );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Object to extend the base settings\n\t\t\toSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) );\n\t\n\t\t\t// Restore for next time around\n\t\t\tajax.data = ajaxData;\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Update the table using an Ajax call\n\t * @param {object} settings dataTables settings object\n\t * @returns {boolean} Block the table drawing or not\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnAjaxUpdate( settings )\n\t{\n\t\tif ( settings.bAjaxDataGet ) {\n\t\t\tsettings.iDraw++;\n\t\t\t_fnProcessingDisplay( settings, true );\n\t\n\t\t\t_fnBuildAjax(\n\t\t\t\tsettings,\n\t\t\t\t_fnAjaxParameters( settings ),\n\t\t\t\tfunction(json) {\n\t\t\t\t\t_fnAjaxUpdateDraw( settings, json );\n\t\t\t\t}\n\t\t\t);\n\t\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\t\n\t/**\n\t * Build up the parameters in an object needed for a server-side processing\n\t * request. Note that this is basically done twice, is different ways - a modern\n\t * method which is used by default in DataTables 1.10 which uses objects and\n\t * arrays, or the 1.9- method with is name / value pairs. 1.9 method is used if\n\t * the sAjaxSource option is used in the initialisation, or the legacyAjax\n\t * option is set.\n\t * @param {object} oSettings dataTables settings object\n\t * @returns {bool} block the table drawing or not\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnAjaxParameters( settings )\n\t{\n\t\tvar\n\t\t\tcolumns = settings.aoColumns,\n\t\t\tcolumnCount = columns.length,\n\t\t\tfeatures = settings.oFeatures,\n\t\t\tpreSearch = settings.oPreviousSearch,\n\t\t\tpreColSearch = settings.aoPreSearchCols,\n\t\t\ti, data = [], dataProp, column, columnSearch,\n\t\t\tsort = _fnSortFlatten( settings ),\n\t\t\tdisplayStart = settings._iDisplayStart,\n\t\t\tdisplayLength = features.bPaginate !== false ?\n\t\t\t\tsettings._iDisplayLength :\n\t\t\t\t-1;\n\t\n\t\tvar param = function ( name, value ) {\n\t\t\tdata.push( { 'name': name, 'value': value } );\n\t\t};\n\t\n\t\t// DataTables 1.9- compatible method\n\t\tparam( 'sEcho', settings.iDraw );\n\t\tparam( 'iColumns', columnCount );\n\t\tparam( 'sColumns', _pluck( columns, 'sName' ).join(',') );\n\t\tparam( 'iDisplayStart', displayStart );\n\t\tparam( 'iDisplayLength', displayLength );\n\t\n\t\t// DataTables 1.10+ method\n\t\tvar d = {\n\t\t\tdraw: settings.iDraw,\n\t\t\tcolumns: [],\n\t\t\torder: [],\n\t\t\tstart: displayStart,\n\t\t\tlength: displayLength,\n\t\t\tsearch: {\n\t\t\t\tvalue: preSearch.sSearch,\n\t\t\t\tregex: preSearch.bRegex\n\t\t\t}\n\t\t};\n\t\n\t\tfor ( i=0 ; i<columnCount ; i++ ) {\n\t\t\tcolumn = columns[i];\n\t\t\tcolumnSearch = preColSearch[i];\n\t\t\tdataProp = typeof column.mData==\"function\" ? 'function' : column.mData ;\n\t\n\t\t\td.columns.push( {\n\t\t\t\tdata: dataProp,\n\t\t\t\tname: column.sName,\n\t\t\t\tsearchable: column.bSearchable,\n\t\t\t\torderable: column.bSortable,\n\t\t\t\tsearch: {\n\t\t\t\t\tvalue: columnSearch.sSearch,\n\t\t\t\t\tregex: columnSearch.bRegex\n\t\t\t\t}\n\t\t\t} );\n\t\n\t\t\tparam( \"mDataProp_\"+i, dataProp );\n\t\n\t\t\tif ( features.bFilter ) {\n\t\t\t\tparam( 'sSearch_'+i, columnSearch.sSearch );\n\t\t\t\tparam( 'bRegex_'+i, columnSearch.bRegex );\n\t\t\t\tparam( 'bSearchable_'+i, column.bSearchable );\n\t\t\t}\n\t\n\t\t\tif ( features.bSort ) {\n\t\t\t\tparam( 'bSortable_'+i, column.bSortable );\n\t\t\t}\n\t\t}\n\t\n\t\tif ( features.bFilter ) {\n\t\t\tparam( 'sSearch', preSearch.sSearch );\n\t\t\tparam( 'bRegex', preSearch.bRegex );\n\t\t}\n\t\n\t\tif ( features.bSort ) {\n\t\t\t$.each( sort, function ( i, val ) {\n\t\t\t\td.order.push( { column: val.col, dir: val.dir } );\n\t\n\t\t\t\tparam( 'iSortCol_'+i, val.col );\n\t\t\t\tparam( 'sSortDir_'+i, val.dir );\n\t\t\t} );\n\t\n\t\t\tparam( 'iSortingCols', sort.length );\n\t\t}\n\t\n\t\t// If the legacy.ajax parameter is null, then we automatically decide which\n\t\t// form to use, based on sAjaxSource\n\t\tvar legacy = DataTable.ext.legacy.ajax;\n\t\tif ( legacy === null ) {\n\t\t\treturn settings.sAjaxSource ? data : d;\n\t\t}\n\t\n\t\t// Otherwise, if legacy has been specified then we use that to decide on the\n\t\t// form\n\t\treturn legacy ? data : d;\n\t}\n\t\n\t\n\t/**\n\t * Data the data from the server (nuking the old) and redraw the table\n\t * @param {object} oSettings dataTables settings object\n\t * @param {object} json json data return from the server.\n\t * @param {string} json.sEcho Tracking flag for DataTables to match requests\n\t * @param {int} json.iTotalRecords Number of records in the data set, not accounting for filtering\n\t * @param {int} json.iTotalDisplayRecords Number of records in the data set, accounting for filtering\n\t * @param {array} json.aaData The data to display on this page\n\t * @param {string} [json.sColumns] Column ordering (sName, comma separated)\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnAjaxUpdateDraw ( settings, json )\n\t{\n\t\t// v1.10 uses camelCase variables, while 1.9 uses Hungarian notation.\n\t\t// Support both\n\t\tvar compat = function ( old, modern ) {\n\t\t\treturn json[old] !== undefined ? json[old] : json[modern];\n\t\t};\n\t\n\t\tvar data = _fnAjaxDataSrc( settings, json );\n\t\tvar draw = compat( 'sEcho', 'draw' );\n\t\tvar recordsTotal = compat( 'iTotalRecords', 'recordsTotal' );\n\t\tvar recordsFiltered = compat( 'iTotalDisplayRecords', 'recordsFiltered' );\n\t\n\t\tif ( draw ) {\n\t\t\t// Protect against out of sequence returns\n\t\t\tif ( draw*1 < settings.iDraw ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsettings.iDraw = draw * 1;\n\t\t}\n\t\n\t\t_fnClearTable( settings );\n\t\tsettings._iRecordsTotal = parseInt(recordsTotal, 10);\n\t\tsettings._iRecordsDisplay = parseInt(recordsFiltered, 10);\n\t\n\t\tfor ( var i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t\t_fnAddData( settings, data[i] );\n\t\t}\n\t\tsettings.aiDisplay = settings.aiDisplayMaster.slice();\n\t\n\t\tsettings.bAjaxDataGet = false;\n\t\t_fnDraw( settings );\n\t\n\t\tif ( ! settings._bInitComplete ) {\n\t\t\t_fnInitComplete( settings, json );\n\t\t}\n\t\n\t\tsettings.bAjaxDataGet = true;\n\t\t_fnProcessingDisplay( settings, false );\n\t}\n\t\n\t\n\t/**\n\t * Get the data from the JSON data source to use for drawing a table. Using\n\t * `_fnGetObjectDataFn` allows the data to be sourced from a property of the\n\t * source object, or from a processing function.\n\t * @param {object} oSettings dataTables settings object\n\t * @param {object} json Data source object / array from the server\n\t * @return {array} Array of data to use\n\t */\n\tfunction _fnAjaxDataSrc ( oSettings, json )\n\t{\n\t\tvar dataSrc = $.isPlainObject( oSettings.ajax ) && oSettings.ajax.dataSrc !== undefined ?\n\t\t\toSettings.ajax.dataSrc :\n\t\t\toSettings.sAjaxDataProp; // Compatibility with 1.9-.\n\t\n\t\t// Compatibility with 1.9-. In order to read from aaData, check if the\n\t\t// default has been changed, if not, check for aaData\n\t\tif ( dataSrc === 'data' ) {\n\t\t\treturn json.aaData || json[dataSrc];\n\t\t}\n\t\n\t\treturn dataSrc !== \"\" ?\n\t\t\t_fnGetObjectDataFn( dataSrc )( json ) :\n\t\t\tjson;\n\t}\n\t\n\t/**\n\t * Generate the node required for filtering text\n\t * @returns {node} Filter control element\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFeatureHtmlFilter ( settings )\n\t{\n\t\tvar classes = settings.oClasses;\n\t\tvar tableId = settings.sTableId;\n\t\tvar language = settings.oLanguage;\n\t\tvar previousSearch = settings.oPreviousSearch;\n\t\tvar features = settings.aanFeatures;\n\t\tvar input = '<input type=\"search\" class=\"'+classes.sFilterInput+'\"/>';\n\t\n\t\tvar str = language.sSearch;\n\t\tstr = str.match(/_INPUT_/) ?\n\t\t\tstr.replace('_INPUT_', input) :\n\t\t\tstr+input;\n\t\n\t\tvar filter = $('<div/>', {\n\t\t\t\t'id': ! features.f ? tableId+'_filter' : null,\n\t\t\t\t'class': classes.sFilter\n\t\t\t} )\n\t\t\t.append( $('<label/>' ).append( str ) );\n\t\n\t\tvar searchFn = function() {\n\t\t\t/* Update all other filter input elements for the new display */\n\t\t\tvar n = features.f;\n\t\t\tvar val = !this.value ? \"\" : this.value; // mental IE8 fix :-(\n\t\n\t\t\t/* Now do the filter */\n\t\t\tif ( val != previousSearch.sSearch ) {\n\t\t\t\t_fnFilterComplete( settings, {\n\t\t\t\t\t\"sSearch\": val,\n\t\t\t\t\t\"bRegex\": previousSearch.bRegex,\n\t\t\t\t\t\"bSmart\": previousSearch.bSmart ,\n\t\t\t\t\t\"bCaseInsensitive\": previousSearch.bCaseInsensitive\n\t\t\t\t} );\n\t\n\t\t\t\t// Need to redraw, without resorting\n\t\t\t\tsettings._iDisplayStart = 0;\n\t\t\t\t_fnDraw( settings );\n\t\t\t}\n\t\t};\n\t\n\t\tvar searchDelay = settings.searchDelay !== null ?\n\t\t\tsettings.searchDelay :\n\t\t\t_fnDataSource( settings ) === 'ssp' ?\n\t\t\t\t400 :\n\t\t\t\t0;\n\t\n\t\tvar jqFilter = $('input', filter)\n\t\t\t.val( previousSearch.sSearch )\n\t\t\t.attr( 'placeholder', language.sSearchPlaceholder )\n\t\t\t.bind(\n\t\t\t\t'keyup.DT search.DT input.DT paste.DT cut.DT',\n\t\t\t\tsearchDelay ?\n\t\t\t\t\t_fnThrottle( searchFn, searchDelay ) :\n\t\t\t\t\tsearchFn\n\t\t\t)\n\t\t\t.bind( 'keypress.DT', function(e) {\n\t\t\t\t/* Prevent form submission */\n\t\t\t\tif ( e.keyCode == 13 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.attr('aria-controls', tableId);\n\t\n\t\t// Update the input elements whenever the table is filtered\n\t\t$(settings.nTable).on( 'search.dt.DT', function ( ev, s ) {\n\t\t\tif ( settings === s ) {\n\t\t\t\t// IE9 throws an 'unknown error' if document.activeElement is used\n\t\t\t\t// inside an iframe or frame...\n\t\t\t\ttry {\n\t\t\t\t\tif ( jqFilter[0] !== document.activeElement ) {\n\t\t\t\t\t\tjqFilter.val( previousSearch.sSearch );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch ( e ) {}\n\t\t\t}\n\t\t} );\n\t\n\t\treturn filter[0];\n\t}\n\t\n\t\n\t/**\n\t * Filter the table using both the global filter and column based filtering\n\t * @param {object} oSettings dataTables settings object\n\t * @param {object} oSearch search information\n\t * @param {int} [iForce] force a research of the master array (1) or not (undefined or 0)\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFilterComplete ( oSettings, oInput, iForce )\n\t{\n\t\tvar oPrevSearch = oSettings.oPreviousSearch;\n\t\tvar aoPrevSearch = oSettings.aoPreSearchCols;\n\t\tvar fnSaveFilter = function ( oFilter ) {\n\t\t\t/* Save the filtering values */\n\t\t\toPrevSearch.sSearch = oFilter.sSearch;\n\t\t\toPrevSearch.bRegex = oFilter.bRegex;\n\t\t\toPrevSearch.bSmart = oFilter.bSmart;\n\t\t\toPrevSearch.bCaseInsensitive = oFilter.bCaseInsensitive;\n\t\t};\n\t\tvar fnRegex = function ( o ) {\n\t\t\t// Backwards compatibility with the bEscapeRegex option\n\t\t\treturn o.bEscapeRegex !== undefined ? !o.bEscapeRegex : o.bRegex;\n\t\t};\n\t\n\t\t// Resolve any column types that are unknown due to addition or invalidation\n\t\t// @todo As per sort - can this be moved into an event handler?\n\t\t_fnColumnTypes( oSettings );\n\t\n\t\t/* In server-side processing all filtering is done by the server, so no point hanging around here */\n\t\tif ( _fnDataSource( oSettings ) != 'ssp' )\n\t\t{\n\t\t\t/* Global filter */\n\t\t\t_fnFilter( oSettings, oInput.sSearch, iForce, fnRegex(oInput), oInput.bSmart, oInput.bCaseInsensitive );\n\t\t\tfnSaveFilter( oInput );\n\t\n\t\t\t/* Now do the individual column filter */\n\t\t\tfor ( var i=0 ; i<aoPrevSearch.length ; i++ )\n\t\t\t{\n\t\t\t\t_fnFilterColumn( oSettings, aoPrevSearch[i].sSearch, i, fnRegex(aoPrevSearch[i]),\n\t\t\t\t\taoPrevSearch[i].bSmart, aoPrevSearch[i].bCaseInsensitive );\n\t\t\t}\n\t\n\t\t\t/* Custom filtering */\n\t\t\t_fnFilterCustom( oSettings );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfnSaveFilter( oInput );\n\t\t}\n\t\n\t\t/* Tell the draw function we have been filtering */\n\t\toSettings.bFiltered = true;\n\t\t_fnCallbackFire( oSettings, null, 'search', [oSettings] );\n\t}\n\t\n\t\n\t/**\n\t * Apply custom filtering functions\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFilterCustom( settings )\n\t{\n\t\tvar filters = DataTable.ext.search;\n\t\tvar displayRows = settings.aiDisplay;\n\t\tvar row, rowIdx;\n\t\n\t\tfor ( var i=0, ien=filters.length ; i<ien ; i++ ) {\n\t\t\tvar rows = [];\n\t\n\t\t\t// Loop over each row and see if it should be included\n\t\t\tfor ( var j=0, jen=displayRows.length ; j<jen ; j++ ) {\n\t\t\t\trowIdx = displayRows[ j ];\n\t\t\t\trow = settings.aoData[ rowIdx ];\n\t\n\t\t\t\tif ( filters[i]( settings, row._aFilterData, rowIdx, row._aData, j ) ) {\n\t\t\t\t\trows.push( rowIdx );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// So the array reference doesn't break set the results into the\n\t\t\t// existing array\n\t\t\tdisplayRows.length = 0;\n\t\t\t$.merge( displayRows, rows );\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Filter the table on a per-column basis\n\t * @param {object} oSettings dataTables settings object\n\t * @param {string} sInput string to filter on\n\t * @param {int} iColumn column to filter\n\t * @param {bool} bRegex treat search string as a regular expression or not\n\t * @param {bool} bSmart use smart filtering or not\n\t * @param {bool} bCaseInsensitive Do case insenstive matching or not\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFilterColumn ( settings, searchStr, colIdx, regex, smart, caseInsensitive )\n\t{\n\t\tif ( searchStr === '' ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\tvar data;\n\t\tvar display = settings.aiDisplay;\n\t\tvar rpSearch = _fnFilterCreateSearch( searchStr, regex, smart, caseInsensitive );\n\t\n\t\tfor ( var i=display.length-1 ; i>=0 ; i-- ) {\n\t\t\tdata = settings.aoData[ display[i] ]._aFilterData[ colIdx ];\n\t\n\t\t\tif ( ! rpSearch.test( data ) ) {\n\t\t\t\tdisplay.splice( i, 1 );\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Filter the data table based on user input and draw the table\n\t * @param {object} settings dataTables settings object\n\t * @param {string} input string to filter on\n\t * @param {int} force optional - force a research of the master array (1) or not (undefined or 0)\n\t * @param {bool} regex treat as a regular expression or not\n\t * @param {bool} smart perform smart filtering or not\n\t * @param {bool} caseInsensitive Do case insenstive matching or not\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFilter( settings, input, force, regex, smart, caseInsensitive )\n\t{\n\t\tvar rpSearch = _fnFilterCreateSearch( input, regex, smart, caseInsensitive );\n\t\tvar prevSearch = settings.oPreviousSearch.sSearch;\n\t\tvar displayMaster = settings.aiDisplayMaster;\n\t\tvar display, invalidated, i;\n\t\n\t\t// Need to take account of custom filtering functions - always filter\n\t\tif ( DataTable.ext.search.length !== 0 ) {\n\t\t\tforce = true;\n\t\t}\n\t\n\t\t// Check if any of the rows were invalidated\n\t\tinvalidated = _fnFilterData( settings );\n\t\n\t\t// If the input is blank - we just want the full data set\n\t\tif ( input.length <= 0 ) {\n\t\t\tsettings.aiDisplay = displayMaster.slice();\n\t\t}\n\t\telse {\n\t\t\t// New search - start from the master array\n\t\t\tif ( invalidated ||\n\t\t\t\t force ||\n\t\t\t\t prevSearch.length > input.length ||\n\t\t\t\t input.indexOf(prevSearch) !== 0 ||\n\t\t\t\t settings.bSorted // On resort, the display master needs to be\n\t\t\t\t // re-filtered since indexes will have changed\n\t\t\t) {\n\t\t\t\tsettings.aiDisplay = displayMaster.slice();\n\t\t\t}\n\t\n\t\t\t// Search the display array\n\t\t\tdisplay = settings.aiDisplay;\n\t\n\t\t\tfor ( i=display.length-1 ; i>=0 ; i-- ) {\n\t\t\t\tif ( ! rpSearch.test( settings.aoData[ display[i] ]._sFilterRow ) ) {\n\t\t\t\t\tdisplay.splice( i, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Build a regular expression object suitable for searching a table\n\t * @param {string} sSearch string to search for\n\t * @param {bool} bRegex treat as a regular expression or not\n\t * @param {bool} bSmart perform smart filtering or not\n\t * @param {bool} bCaseInsensitive Do case insensitive matching or not\n\t * @returns {RegExp} constructed object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFilterCreateSearch( search, regex, smart, caseInsensitive )\n\t{\n\t\tsearch = regex ?\n\t\t\tsearch :\n\t\t\t_fnEscapeRegex( search );\n\t\t\n\t\tif ( smart ) {\n\t\t\t/* For smart filtering we want to allow the search to work regardless of\n\t\t\t * word order. We also want double quoted text to be preserved, so word\n\t\t\t * order is important - a la google. So this is what we want to\n\t\t\t * generate:\n\t\t\t * \n\t\t\t * ^(?=.*?\\bone\\b)(?=.*?\\btwo three\\b)(?=.*?\\bfour\\b).*$\n\t\t\t */\n\t\t\tvar a = $.map( search.match( /\"[^\"]+\"|[^ ]+/g ) || [''], function ( word ) {\n\t\t\t\tif ( word.charAt(0) === '\"' ) {\n\t\t\t\t\tvar m = word.match( /^\"(.*)\"$/ );\n\t\t\t\t\tword = m ? m[1] : word;\n\t\t\t\t}\n\t\n\t\t\t\treturn word.replace('\"', '');\n\t\t\t} );\n\t\n\t\t\tsearch = '^(?=.*?'+a.join( ')(?=.*?' )+').*$';\n\t\t}\n\t\n\t\treturn new RegExp( search, caseInsensitive ? 'i' : '' );\n\t}\n\t\n\t\n\t/**\n\t * Escape a string such that it can be used in a regular expression\n\t * @param {string} sVal string to escape\n\t * @returns {string} escaped string\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnEscapeRegex ( sVal )\n\t{\n\t\treturn sVal.replace( _re_escape_regex, '\\\\$1' );\n\t}\n\t\n\t\n\t\n\tvar __filter_div = $('<div>')[0];\n\tvar __filter_div_textContent = __filter_div.textContent !== undefined;\n\t\n\t// Update the filtering data for each row if needed (by invalidation or first run)\n\tfunction _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}\n\t\n\t\n\t/**\n\t * Convert from the internal Hungarian notation to camelCase for external\n\t * interaction\n\t * @param {object} obj Object to convert\n\t * @returns {object} Inverted object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnSearchToCamel ( obj )\n\t{\n\t\treturn {\n\t\t\tsearch: obj.sSearch,\n\t\t\tsmart: obj.bSmart,\n\t\t\tregex: obj.bRegex,\n\t\t\tcaseInsensitive: obj.bCaseInsensitive\n\t\t};\n\t}\n\t\n\t\n\t\n\t/**\n\t * Convert from camelCase notation to the internal Hungarian. We could use the\n\t * Hungarian convert function here, but this is cleaner\n\t * @param {object} obj Object to convert\n\t * @returns {object} Inverted object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnSearchToHung ( obj )\n\t{\n\t\treturn {\n\t\t\tsSearch: obj.search,\n\t\t\tbSmart: obj.smart,\n\t\t\tbRegex: obj.regex,\n\t\t\tbCaseInsensitive: obj.caseInsensitive\n\t\t};\n\t}\n\t\n\t/**\n\t * Generate the node required for the info display\n\t * @param {object} oSettings dataTables settings object\n\t * @returns {node} Information element\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFeatureHtmlInfo ( settings )\n\t{\n\t\tvar\n\t\t\ttid = settings.sTableId,\n\t\t\tnodes = settings.aanFeatures.i,\n\t\t\tn = $('<div/>', {\n\t\t\t\t'class': settings.oClasses.sInfo,\n\t\t\t\t'id': ! nodes ? tid+'_info' : null\n\t\t\t} );\n\t\n\t\tif ( ! nodes ) {\n\t\t\t// Update display on each draw\n\t\t\tsettings.aoDrawCallback.push( {\n\t\t\t\t\"fn\": _fnUpdateInfo,\n\t\t\t\t\"sName\": \"information\"\n\t\t\t} );\n\t\n\t\t\tn\n\t\t\t\t.attr( 'role', 'status' )\n\t\t\t\t.attr( 'aria-live', 'polite' );\n\t\n\t\t\t// Table is described by our info div\n\t\t\t$(settings.nTable).attr( 'aria-describedby', tid+'_info' );\n\t\t}\n\t\n\t\treturn n[0];\n\t}\n\t\n\t\n\t/**\n\t * Update the information elements in the display\n\t * @param {object} settings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnUpdateInfo ( settings )\n\t{\n\t\t/* Show information about the table */\n\t\tvar nodes = settings.aanFeatures.i;\n\t\tif ( nodes.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\tvar\n\t\t\tlang = settings.oLanguage,\n\t\t\tstart = settings._iDisplayStart+1,\n\t\t\tend = settings.fnDisplayEnd(),\n\t\t\tmax = settings.fnRecordsTotal(),\n\t\t\ttotal = settings.fnRecordsDisplay(),\n\t\t\tout = total ?\n\t\t\t\tlang.sInfo :\n\t\t\t\tlang.sInfoEmpty;\n\t\n\t\tif ( total !== max ) {\n\t\t\t/* Record set after filtering */\n\t\t\tout += ' ' + lang.sInfoFiltered;\n\t\t}\n\t\n\t\t// Convert the macros\n\t\tout += lang.sInfoPostFix;\n\t\tout = _fnInfoMacros( settings, out );\n\t\n\t\tvar callback = lang.fnInfoCallback;\n\t\tif ( callback !== null ) {\n\t\t\tout = callback.call( settings.oInstance,\n\t\t\t\tsettings, start, end, max, total, out\n\t\t\t);\n\t\t}\n\t\n\t\t$(nodes).html( out );\n\t}\n\t\n\t\n\tfunction _fnInfoMacros ( settings, str )\n\t{\n\t\t// When infinite scrolling, we are always starting at 1. _iDisplayStart is used only\n\t\t// internally\n\t\tvar\n\t\t\tformatter = settings.fnFormatNumber,\n\t\t\tstart = settings._iDisplayStart+1,\n\t\t\tlen = settings._iDisplayLength,\n\t\t\tvis = settings.fnRecordsDisplay(),\n\t\t\tall = len === -1;\n\t\n\t\treturn str.\n\t\t\treplace(/_START_/g, formatter.call( settings, start ) ).\n\t\t\treplace(/_END_/g, formatter.call( settings, settings.fnDisplayEnd() ) ).\n\t\t\treplace(/_MAX_/g, formatter.call( settings, settings.fnRecordsTotal() ) ).\n\t\t\treplace(/_TOTAL_/g, formatter.call( settings, vis ) ).\n\t\t\treplace(/_PAGE_/g, formatter.call( settings, all ? 1 : Math.ceil( start / len ) ) ).\n\t\t\treplace(/_PAGES_/g, formatter.call( settings, all ? 1 : Math.ceil( vis / len ) ) );\n\t}\n\t\n\t\n\t\n\t/**\n\t * Draw the table for the first time, adding all required features\n\t * @param {object} settings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnInitialise ( settings )\n\t{\n\t\tvar i, iLen, iAjaxStart=settings.iInitDisplayStart;\n\t\tvar columns = settings.aoColumns, column;\n\t\tvar features = settings.oFeatures;\n\t\tvar deferLoading = settings.bDeferLoading; // value modified by the draw\n\t\n\t\t/* Ensure that the table data is fully initialised */\n\t\tif ( ! settings.bInitialised ) {\n\t\t\tsetTimeout( function(){ _fnInitialise( settings ); }, 200 );\n\t\t\treturn;\n\t\t}\n\t\n\t\t/* Show the display HTML options */\n\t\t_fnAddOptionsHtml( settings );\n\t\n\t\t/* Build and draw the header / footer for the table */\n\t\t_fnBuildHead( settings );\n\t\t_fnDrawHead( settings, settings.aoHeader );\n\t\t_fnDrawHead( settings, settings.aoFooter );\n\t\n\t\t/* Okay to show that something is going on now */\n\t\t_fnProcessingDisplay( settings, true );\n\t\n\t\t/* Calculate sizes for columns */\n\t\tif ( features.bAutoWidth ) {\n\t\t\t_fnCalculateColumnWidths( settings );\n\t\t}\n\t\n\t\tfor ( i=0, iLen=columns.length ; i<iLen ; i++ ) {\n\t\t\tcolumn = columns[i];\n\t\n\t\t\tif ( column.sWidth ) {\n\t\t\t\tcolumn.nTh.style.width = _fnStringToCss( column.sWidth );\n\t\t\t}\n\t\t}\n\t\n\t\t_fnCallbackFire( settings, null, 'preInit', [settings] );\n\t\n\t\t// If there is default sorting required - let's do it. The sort function\n\t\t// will do the drawing for us. Otherwise we draw the table regardless of the\n\t\t// Ajax source - this allows the table to look initialised for Ajax sourcing\n\t\t// data (show 'loading' message possibly)\n\t\t_fnReDraw( settings );\n\t\n\t\t// Server-side processing init complete is done by _fnAjaxUpdateDraw\n\t\tvar dataSrc = _fnDataSource( settings );\n\t\tif ( dataSrc != 'ssp' || deferLoading ) {\n\t\t\t// if there is an ajax source load the data\n\t\t\tif ( dataSrc == 'ajax' ) {\n\t\t\t\t_fnBuildAjax( settings, [], function(json) {\n\t\t\t\t\tvar aData = _fnAjaxDataSrc( settings, json );\n\t\n\t\t\t\t\t// Got the data - add it to the table\n\t\t\t\t\tfor ( i=0 ; i<aData.length ; i++ ) {\n\t\t\t\t\t\t_fnAddData( settings, aData[i] );\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// Reset the init display for cookie saving. We've already done\n\t\t\t\t\t// a filter, and therefore cleared it before. So we need to make\n\t\t\t\t\t// it appear 'fresh'\n\t\t\t\t\tsettings.iInitDisplayStart = iAjaxStart;\n\t\n\t\t\t\t\t_fnReDraw( settings );\n\t\n\t\t\t\t\t_fnProcessingDisplay( settings, false );\n\t\t\t\t\t_fnInitComplete( settings, json );\n\t\t\t\t}, settings );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_fnProcessingDisplay( settings, false );\n\t\t\t\t_fnInitComplete( settings );\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Draw the table for the first time, adding all required features\n\t * @param {object} oSettings dataTables settings object\n\t * @param {object} [json] JSON from the server that completed the table, if using Ajax source\n\t * with client-side processing (optional)\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnInitComplete ( settings, json )\n\t{\n\t\tsettings._bInitComplete = true;\n\t\n\t\t// When data was added after the initialisation (data or Ajax) we need to\n\t\t// calculate the column sizing\n\t\tif ( json || settings.oInit.aaData ) {\n\t\t\t_fnAdjustColumnSizing( settings );\n\t\t}\n\t\n\t\t_fnCallbackFire( settings, null, 'plugin-init', [settings, json] );\n\t\t_fnCallbackFire( settings, 'aoInitComplete', 'init', [settings, json] );\n\t}\n\t\n\t\n\tfunction _fnLengthChange ( settings, val )\n\t{\n\t\tvar len = parseInt( val, 10 );\n\t\tsettings._iDisplayLength = len;\n\t\n\t\t_fnLengthOverflow( settings );\n\t\n\t\t// Fire length change event\n\t\t_fnCallbackFire( settings, null, 'length', [settings, len] );\n\t}\n\t\n\t\n\t/**\n\t * Generate the node required for user display length changing\n\t * @param {object} settings dataTables settings object\n\t * @returns {node} Display length feature node\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFeatureHtmlLength ( settings )\n\t{\n\t\tvar\n\t\t\tclasses = settings.oClasses,\n\t\t\ttableId = settings.sTableId,\n\t\t\tmenu = settings.aLengthMenu,\n\t\t\td2 = $.isArray( menu[0] ),\n\t\t\tlengths = d2 ? menu[0] : menu,\n\t\t\tlanguage = d2 ? menu[1] : menu;\n\t\n\t\tvar select = $('<select/>', {\n\t\t\t'name': tableId+'_length',\n\t\t\t'aria-controls': tableId,\n\t\t\t'class': classes.sLengthSelect\n\t\t} );\n\t\n\t\tfor ( var i=0, ien=lengths.length ; i<ien ; i++ ) {\n\t\t\tselect[0][ i ] = new Option( language[i], lengths[i] );\n\t\t}\n\t\n\t\tvar div = $('<div><label/></div>').addClass( classes.sLength );\n\t\tif ( ! settings.aanFeatures.l ) {\n\t\t\tdiv[0].id = tableId+'_length';\n\t\t}\n\t\n\t\tdiv.children().append(\n\t\t\tsettings.oLanguage.sLengthMenu.replace( '_MENU_', select[0].outerHTML )\n\t\t);\n\t\n\t\t// Can't use `select` variable as user might provide their own and the\n\t\t// reference is broken by the use of outerHTML\n\t\t$('select', div)\n\t\t\t.val( settings._iDisplayLength )\n\t\t\t.bind( 'change.DT', function(e) {\n\t\t\t\t_fnLengthChange( settings, $(this).val() );\n\t\t\t\t_fnDraw( settings );\n\t\t\t} );\n\t\n\t\t// Update node value whenever anything changes the table's length\n\t\t$(settings.nTable).bind( 'length.dt.DT', function (e, s, len) {\n\t\t\tif ( settings === s ) {\n\t\t\t\t$('select', div).val( len );\n\t\t\t}\n\t\t} );\n\t\n\t\treturn div[0];\n\t}\n\t\n\t\n\t\n\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t * Note that most of the paging logic is done in\n\t * DataTable.ext.pager\n\t */\n\t\n\t/**\n\t * Generate the node required for default pagination\n\t * @param {object} oSettings dataTables settings object\n\t * @returns {node} Pagination feature node\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFeatureHtmlPaginate ( settings )\n\t{\n\t\tvar\n\t\t\ttype = settings.sPaginationType,\n\t\t\tplugin = DataTable.ext.pager[ type ],\n\t\t\tmodern = typeof plugin === 'function',\n\t\t\tredraw = function( settings ) {\n\t\t\t\t_fnDraw( settings );\n\t\t\t},\n\t\t\tnode = $('<div/>').addClass( settings.oClasses.sPaging + type )[0],\n\t\t\tfeatures = settings.aanFeatures;\n\t\n\t\tif ( ! modern ) {\n\t\t\tplugin.fnInit( settings, node, redraw );\n\t\t}\n\t\n\t\t/* Add a draw callback for the pagination on first instance, to update the paging display */\n\t\tif ( ! features.p )\n\t\t{\n\t\t\tnode.id = settings.sTableId+'_paginate';\n\t\n\t\t\tsettings.aoDrawCallback.push( {\n\t\t\t\t\"fn\": function( settings ) {\n\t\t\t\t\tif ( modern ) {\n\t\t\t\t\t\tvar\n\t\t\t\t\t\t\tstart = settings._iDisplayStart,\n\t\t\t\t\t\t\tlen = settings._iDisplayLength,\n\t\t\t\t\t\t\tvisRecords = settings.fnRecordsDisplay(),\n\t\t\t\t\t\t\tall = len === -1,\n\t\t\t\t\t\t\tpage = all ? 0 : Math.ceil( start / len ),\n\t\t\t\t\t\t\tpages = all ? 1 : Math.ceil( visRecords / len ),\n\t\t\t\t\t\t\tbuttons = plugin(page, pages),\n\t\t\t\t\t\t\ti, ien;\n\t\n\t\t\t\t\t\tfor ( i=0, ien=features.p.length ; i<ien ; i++ ) {\n\t\t\t\t\t\t\t_fnRenderer( settings, 'pageButton' )(\n\t\t\t\t\t\t\t\tsettings, features.p[i], i, buttons, page, pages\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\telse {\n\t\t\t\t\t\tplugin.fnUpdate( settings, redraw );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"sName\": \"pagination\"\n\t\t\t} );\n\t\t}\n\t\n\t\treturn node;\n\t}\n\t\n\t\n\t/**\n\t * Alter the display settings to change the page\n\t * @param {object} settings DataTables settings object\n\t * @param {string|int} action Paging action to take: \"first\", \"previous\",\n\t * \"next\" or \"last\" or page number to jump to (integer)\n\t * @param [bool] redraw Automatically draw the update or not\n\t * @returns {bool} true page has changed, false - no change\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnPageChange ( settings, action, redraw )\n\t{\n\t\tvar\n\t\t\tstart = settings._iDisplayStart,\n\t\t\tlen = settings._iDisplayLength,\n\t\t\trecords = settings.fnRecordsDisplay();\n\t\n\t\tif ( records === 0 || len === -1 )\n\t\t{\n\t\t\tstart = 0;\n\t\t}\n\t\telse if ( typeof action === \"number\" )\n\t\t{\n\t\t\tstart = action * len;\n\t\n\t\t\tif ( start > records )\n\t\t\t{\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\telse if ( action == \"first\" )\n\t\t{\n\t\t\tstart = 0;\n\t\t}\n\t\telse if ( action == \"previous\" )\n\t\t{\n\t\t\tstart = len >= 0 ?\n\t\t\t\tstart - len :\n\t\t\t\t0;\n\t\n\t\t\tif ( start < 0 )\n\t\t\t{\n\t\t\t start = 0;\n\t\t\t}\n\t\t}\n\t\telse if ( action == \"next\" )\n\t\t{\n\t\t\tif ( start + len < records )\n\t\t\t{\n\t\t\t\tstart += len;\n\t\t\t}\n\t\t}\n\t\telse if ( action == \"last\" )\n\t\t{\n\t\t\tstart = Math.floor( (records-1) / len) * len;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t_fnLog( settings, 0, \"Unknown paging action: \"+action, 5 );\n\t\t}\n\t\n\t\tvar changed = settings._iDisplayStart !== start;\n\t\tsettings._iDisplayStart = start;\n\t\n\t\tif ( changed ) {\n\t\t\t_fnCallbackFire( settings, null, 'page', [settings] );\n\t\n\t\t\tif ( redraw ) {\n\t\t\t\t_fnDraw( settings );\n\t\t\t}\n\t\t}\n\t\n\t\treturn changed;\n\t}\n\t\n\t\n\t\n\t/**\n\t * Generate the node required for the processing node\n\t * @param {object} settings dataTables settings object\n\t * @returns {node} Processing element\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFeatureHtmlProcessing ( settings )\n\t{\n\t\treturn $('<div/>', {\n\t\t\t\t'id': ! settings.aanFeatures.r ? settings.sTableId+'_processing' : null,\n\t\t\t\t'class': settings.oClasses.sProcessing\n\t\t\t} )\n\t\t\t.html( settings.oLanguage.sProcessing )\n\t\t\t.insertBefore( settings.nTable )[0];\n\t}\n\t\n\t\n\t/**\n\t * Display or hide the processing indicator\n\t * @param {object} settings dataTables settings object\n\t * @param {bool} show Show the processing indicator (true) or not (false)\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnProcessingDisplay ( settings, show )\n\t{\n\t\tif ( settings.oFeatures.bProcessing ) {\n\t\t\t$(settings.aanFeatures.r).css( 'display', show ? 'block' : 'none' );\n\t\t}\n\t\n\t\t_fnCallbackFire( settings, null, 'processing', [settings, show] );\n\t}\n\t\n\t/**\n\t * Add any control elements for the table - specifically scrolling\n\t * @param {object} settings dataTables settings object\n\t * @returns {node} Node to add to the DOM\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnFeatureHtmlTable ( settings )\n\t{\n\t\tvar table = $(settings.nTable);\n\t\n\t\t// Add the ARIA grid role to the table\n\t\ttable.attr( 'role', 'grid' );\n\t\n\t\t// Scrolling from here on in\n\t\tvar scroll = settings.oScroll;\n\t\n\t\tif ( scroll.sX === '' && scroll.sY === '' ) {\n\t\t\treturn settings.nTable;\n\t\t}\n\t\n\t\tvar scrollX = scroll.sX;\n\t\tvar scrollY = scroll.sY;\n\t\tvar classes = settings.oClasses;\n\t\tvar caption = table.children('caption');\n\t\tvar captionSide = caption.length ? caption[0]._captionSide : null;\n\t\tvar headerClone = $( table[0].cloneNode(false) );\n\t\tvar footerClone = $( table[0].cloneNode(false) );\n\t\tvar footer = table.children('tfoot');\n\t\tvar _div = '<div/>';\n\t\tvar size = function ( s ) {\n\t\t\treturn !s ? null : _fnStringToCss( s );\n\t\t};\n\t\n\t\tif ( ! footer.length ) {\n\t\t\tfooter = null;\n\t\t}\n\t\n\t\t/*\n\t\t * The HTML structure that we want to generate in this function is:\n\t\t * div - scroller\n\t\t * div - scroll head\n\t\t * div - scroll head inner\n\t\t * table - scroll head table\n\t\t * thead - thead\n\t\t * div - scroll body\n\t\t * table - table (master table)\n\t\t * thead - thead clone for sizing\n\t\t * tbody - tbody\n\t\t * div - scroll foot\n\t\t * div - scroll foot inner\n\t\t * table - scroll foot table\n\t\t * tfoot - tfoot\n\t\t */\n\t\tvar scroller = $( _div, { 'class': classes.sScrollWrapper } )\n\t\t\t.append(\n\t\t\t\t$(_div, { 'class': classes.sScrollHead } )\n\t\t\t\t\t.css( {\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\tborder: 0,\n\t\t\t\t\t\twidth: scrollX ? size(scrollX) : '100%'\n\t\t\t\t\t} )\n\t\t\t\t\t.append(\n\t\t\t\t\t\t$(_div, { 'class': classes.sScrollHeadInner } )\n\t\t\t\t\t\t\t.css( {\n\t\t\t\t\t\t\t\t'box-sizing': 'content-box',\n\t\t\t\t\t\t\t\twidth: scroll.sXInner || '100%'\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\t\theaderClone\n\t\t\t\t\t\t\t\t\t.removeAttr('id')\n\t\t\t\t\t\t\t\t\t.css( 'margin-left', 0 )\n\t\t\t\t\t\t\t\t\t.append( captionSide === 'top' ? caption : null )\n\t\t\t\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\t\t\t\ttable.children('thead')\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t)\n\t\t\t.append(\n\t\t\t\t$(_div, { 'class': classes.sScrollBody } )\n\t\t\t\t\t.css( {\n\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t\twidth: size( scrollX )\n\t\t\t\t\t} )\n\t\t\t\t\t.append( table )\n\t\t\t);\n\t\n\t\tif ( footer ) {\n\t\t\tscroller.append(\n\t\t\t\t$(_div, { 'class': classes.sScrollFoot } )\n\t\t\t\t\t.css( {\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tborder: 0,\n\t\t\t\t\t\twidth: scrollX ? size(scrollX) : '100%'\n\t\t\t\t\t} )\n\t\t\t\t\t.append(\n\t\t\t\t\t\t$(_div, { 'class': classes.sScrollFootInner } )\n\t\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\t\tfooterClone\n\t\t\t\t\t\t\t\t\t.removeAttr('id')\n\t\t\t\t\t\t\t\t\t.css( 'margin-left', 0 )\n\t\t\t\t\t\t\t\t\t.append( captionSide === 'bottom' ? caption : null )\n\t\t\t\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\t\t\t\ttable.children('tfoot')\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\n\t\tvar children = scroller.children();\n\t\tvar scrollHead = children[0];\n\t\tvar scrollBody = children[1];\n\t\tvar scrollFoot = footer ? children[2] : null;\n\t\n\t\t// When the body is scrolled, then we also want to scroll the headers\n\t\tif ( scrollX ) {\n\t\t\t$(scrollBody).on( 'scroll.DT', function (e) {\n\t\t\t\tvar scrollLeft = this.scrollLeft;\n\t\n\t\t\t\tscrollHead.scrollLeft = scrollLeft;\n\t\n\t\t\t\tif ( footer ) {\n\t\t\t\t\tscrollFoot.scrollLeft = scrollLeft;\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\n\t\t$(scrollBody).css(\n\t\t\tscrollY && scroll.bCollapse ? 'max-height' : 'height', \n\t\t\tscrollY\n\t\t);\n\t\n\t\tsettings.nScrollHead = scrollHead;\n\t\tsettings.nScrollBody = scrollBody;\n\t\tsettings.nScrollFoot = scrollFoot;\n\t\n\t\t// On redraw - align columns\n\t\tsettings.aoDrawCallback.push( {\n\t\t\t\"fn\": _fnScrollDraw,\n\t\t\t\"sName\": \"scrolling\"\n\t\t} );\n\t\n\t\treturn scroller[0];\n\t}\n\t\n\t\n\t\n\t/**\n\t * Update the header, footer and body tables for resizing - i.e. column\n\t * alignment.\n\t *\n\t * Welcome to the most horrible function DataTables. The process that this\n\t * function follows is basically:\n\t * 1. Re-create the table inside the scrolling div\n\t * 2. Take live measurements from the DOM\n\t * 3. Apply the measurements to align the columns\n\t * 4. Clean up\n\t *\n\t * @param {object} settings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnScrollDraw ( settings )\n\t{\n\t\t// Given that this is such a monster function, a lot of variables are use\n\t\t// to try and keep the minimised size as small as possible\n\t\tvar\n\t\t\tscroll = settings.oScroll,\n\t\t\tscrollX = scroll.sX,\n\t\t\tscrollXInner = scroll.sXInner,\n\t\t\tscrollY = scroll.sY,\n\t\t\tbarWidth = scroll.iBarWidth,\n\t\t\tdivHeader = $(settings.nScrollHead),\n\t\t\tdivHeaderStyle = divHeader[0].style,\n\t\t\tdivHeaderInner = divHeader.children('div'),\n\t\t\tdivHeaderInnerStyle = divHeaderInner[0].style,\n\t\t\tdivHeaderTable = divHeaderInner.children('table'),\n\t\t\tdivBodyEl = settings.nScrollBody,\n\t\t\tdivBody = $(divBodyEl),\n\t\t\tdivBodyStyle = divBodyEl.style,\n\t\t\tdivFooter = $(settings.nScrollFoot),\n\t\t\tdivFooterInner = divFooter.children('div'),\n\t\t\tdivFooterTable = divFooterInner.children('table'),\n\t\t\theader = $(settings.nTHead),\n\t\t\ttable = $(settings.nTable),\n\t\t\ttableEl = table[0],\n\t\t\ttableStyle = tableEl.style,\n\t\t\tfooter = settings.nTFoot ? $(settings.nTFoot) : null,\n\t\t\tbrowser = settings.oBrowser,\n\t\t\tie67 = browser.bScrollOversize,\n\t\t\theaderTrgEls, footerTrgEls,\n\t\t\theaderSrcEls, footerSrcEls,\n\t\t\theaderCopy, footerCopy,\n\t\t\theaderWidths=[], footerWidths=[],\n\t\t\theaderContent=[],\n\t\t\tidx, correction, sanityWidth,\n\t\t\tzeroOut = function(nSizer) {\n\t\t\t\tvar style = nSizer.style;\n\t\t\t\tstyle.paddingTop = \"0\";\n\t\t\t\tstyle.paddingBottom = \"0\";\n\t\t\t\tstyle.borderTopWidth = \"0\";\n\t\t\t\tstyle.borderBottomWidth = \"0\";\n\t\t\t\tstyle.height = 0;\n\t\t\t};\n\t\n\t\t// If the scrollbar visibility has changed from the last draw, we need to\n\t\t// adjust the column sizes as the table width will have changed to account\n\t\t// for the scrollbar\n\t\tvar scrollBarVis = divBodyEl.scrollHeight > divBodyEl.clientHeight;\n\t\t\n\t\tif ( settings.scrollBarVis !== scrollBarVis && settings.scrollBarVis !== undefined ) {\n\t\t\tsettings.scrollBarVis = scrollBarVis;\n\t\t\t_fnAdjustColumnSizing( settings );\n\t\t\treturn; // adjust column sizing will call this function again\n\t\t}\n\t\telse {\n\t\t\tsettings.scrollBarVis = scrollBarVis;\n\t\t}\n\t\n\t\t/*\n\t\t * 1. Re-create the table inside the scrolling div\n\t\t */\n\t\n\t\t// Remove the old minimised thead and tfoot elements in the inner table\n\t\ttable.children('thead, tfoot').remove();\n\t\n\t\t// Clone the current header and footer elements and then place it into the inner table\n\t\theaderCopy = header.clone().prependTo( table );\n\t\theaderTrgEls = header.find('tr'); // original header is in its own table\n\t\theaderSrcEls = headerCopy.find('tr');\n\t\theaderCopy.find('th, td').removeAttr('tabindex');\n\t\n\t\tif ( footer ) {\n\t\t\tfooterCopy = footer.clone().prependTo( table );\n\t\t\tfooterTrgEls = footer.find('tr'); // the original tfoot is in its own table and must be sized\n\t\t\tfooterSrcEls = footerCopy.find('tr');\n\t\t}\n\t\n\t\n\t\t/*\n\t\t * 2. Take live measurements from the DOM - do not alter the DOM itself!\n\t\t */\n\t\n\t\t// Remove old sizing and apply the calculated column widths\n\t\t// Get the unique column headers in the newly created (cloned) header. We want to apply the\n\t\t// calculated sizes to this header\n\t\tif ( ! scrollX )\n\t\t{\n\t\t\tdivBodyStyle.width = '100%';\n\t\t\tdivHeader[0].style.width = '100%';\n\t\t}\n\t\n\t\t$.each( _fnGetUniqueThs( settings, headerCopy ), function ( i, el ) {\n\t\t\tidx = _fnVisibleToColumnIndex( settings, i );\n\t\t\tel.style.width = settings.aoColumns[idx].sWidth;\n\t\t} );\n\t\n\t\tif ( footer ) {\n\t\t\t_fnApplyToChildren( function(n) {\n\t\t\t\tn.style.width = \"\";\n\t\t\t}, footerSrcEls );\n\t\t}\n\t\n\t\t// Size the table as a whole\n\t\tsanityWidth = table.outerWidth();\n\t\tif ( scrollX === \"\" ) {\n\t\t\t// No x scrolling\n\t\t\ttableStyle.width = \"100%\";\n\t\n\t\t\t// IE7 will make the width of the table when 100% include the scrollbar\n\t\t\t// - which is shouldn't. When there is a scrollbar we need to take this\n\t\t\t// into account.\n\t\t\tif ( ie67 && (table.find('tbody').height() > divBodyEl.offsetHeight ||\n\t\t\t\tdivBody.css('overflow-y') == \"scroll\")\n\t\t\t) {\n\t\t\t\ttableStyle.width = _fnStringToCss( table.outerWidth() - barWidth);\n\t\t\t}\n\t\n\t\t\t// Recalculate the sanity width\n\t\t\tsanityWidth = table.outerWidth();\n\t\t}\n\t\telse if ( scrollXInner !== \"\" ) {\n\t\t\t// legacy x scroll inner has been given - use it\n\t\t\ttableStyle.width = _fnStringToCss(scrollXInner);\n\t\n\t\t\t// Recalculate the sanity width\n\t\t\tsanityWidth = table.outerWidth();\n\t\t}\n\t\n\t\t// Hidden header should have zero height, so remove padding and borders. Then\n\t\t// set the width based on the real headers\n\t\n\t\t// Apply all styles in one pass\n\t\t_fnApplyToChildren( zeroOut, headerSrcEls );\n\t\n\t\t// Read all widths in next pass\n\t\t_fnApplyToChildren( function(nSizer) {\n\t\t\theaderContent.push( nSizer.innerHTML );\n\t\t\theaderWidths.push( _fnStringToCss( $(nSizer).css('width') ) );\n\t\t}, headerSrcEls );\n\t\n\t\t// Apply all widths in final pass\n\t\t_fnApplyToChildren( function(nToSize, i) {\n\t\t\tnToSize.style.width = headerWidths[i];\n\t\t}, headerTrgEls );\n\t\n\t\t$(headerSrcEls).height(0);\n\t\n\t\t/* Same again with the footer if we have one */\n\t\tif ( footer )\n\t\t{\n\t\t\t_fnApplyToChildren( zeroOut, footerSrcEls );\n\t\n\t\t\t_fnApplyToChildren( function(nSizer) {\n\t\t\t\tfooterWidths.push( _fnStringToCss( $(nSizer).css('width') ) );\n\t\t\t}, footerSrcEls );\n\t\n\t\t\t_fnApplyToChildren( function(nToSize, i) {\n\t\t\t\tnToSize.style.width = footerWidths[i];\n\t\t\t}, footerTrgEls );\n\t\n\t\t\t$(footerSrcEls).height(0);\n\t\t}\n\t\n\t\n\t\t/*\n\t\t * 3. Apply the measurements\n\t\t */\n\t\n\t\t// \"Hide\" the header and footer that we used for the sizing. We need to keep\n\t\t// the content of the cell so that the width applied to the header and body\n\t\t// both match, but we want to hide it completely. We want to also fix their\n\t\t// width to what they currently are\n\t\t_fnApplyToChildren( function(nSizer, i) {\n\t\t\tnSizer.innerHTML = '<div class=\"dataTables_sizing\" style=\"height:0;overflow:hidden;\">'+headerContent[i]+'</div>';\n\t\t\tnSizer.style.width = headerWidths[i];\n\t\t}, headerSrcEls );\n\t\n\t\tif ( footer )\n\t\t{\n\t\t\t_fnApplyToChildren( function(nSizer, i) {\n\t\t\t\tnSizer.innerHTML = \"\";\n\t\t\t\tnSizer.style.width = footerWidths[i];\n\t\t\t}, footerSrcEls );\n\t\t}\n\t\n\t\t// Sanity check that the table is of a sensible width. If not then we are going to get\n\t\t// misalignment - try to prevent this by not allowing the table to shrink below its min width\n\t\tif ( table.outerWidth() < sanityWidth )\n\t\t{\n\t\t\t// The min width depends upon if we have a vertical scrollbar visible or not */\n\t\t\tcorrection = ((divBodyEl.scrollHeight > divBodyEl.offsetHeight ||\n\t\t\t\tdivBody.css('overflow-y') == \"scroll\")) ?\n\t\t\t\t\tsanityWidth+barWidth :\n\t\t\t\t\tsanityWidth;\n\t\n\t\t\t// IE6/7 are a law unto themselves...\n\t\t\tif ( ie67 && (divBodyEl.scrollHeight >\n\t\t\t\tdivBodyEl.offsetHeight || divBody.css('overflow-y') == \"scroll\")\n\t\t\t) {\n\t\t\t\ttableStyle.width = _fnStringToCss( correction-barWidth );\n\t\t\t}\n\t\n\t\t\t// And give the user a warning that we've stopped the table getting too small\n\t\t\tif ( scrollX === \"\" || scrollXInner !== \"\" ) {\n\t\t\t\t_fnLog( settings, 1, 'Possible column misalignment', 6 );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcorrection = '100%';\n\t\t}\n\t\n\t\t// Apply to the container elements\n\t\tdivBodyStyle.width = _fnStringToCss( correction );\n\t\tdivHeaderStyle.width = _fnStringToCss( correction );\n\t\n\t\tif ( footer ) {\n\t\t\tsettings.nScrollFoot.style.width = _fnStringToCss( correction );\n\t\t}\n\t\n\t\n\t\t/*\n\t\t * 4. Clean up\n\t\t */\n\t\tif ( ! scrollY ) {\n\t\t\t/* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting\n\t\t\t * the scrollbar height from the visible display, rather than adding it on. We need to\n\t\t\t * set the height in order to sort this. Don't want to do it in any other browsers.\n\t\t\t */\n\t\t\tif ( ie67 ) {\n\t\t\t\tdivBodyStyle.height = _fnStringToCss( tableEl.offsetHeight+barWidth );\n\t\t\t}\n\t\t}\n\t\n\t\t/* Finally set the width's of the header and footer tables */\n\t\tvar iOuterWidth = table.outerWidth();\n\t\tdivHeaderTable[0].style.width = _fnStringToCss( iOuterWidth );\n\t\tdivHeaderInnerStyle.width = _fnStringToCss( iOuterWidth );\n\t\n\t\t// Figure out if there are scrollbar present - if so then we need a the header and footer to\n\t\t// provide a bit more space to allow \"overflow\" scrolling (i.e. past the scrollbar)\n\t\tvar bScrolling = table.height() > divBodyEl.clientHeight || divBody.css('overflow-y') == \"scroll\";\n\t\tvar padding = 'padding' + (browser.bScrollbarLeft ? 'Left' : 'Right' );\n\t\tdivHeaderInnerStyle[ padding ] = bScrolling ? barWidth+\"px\" : \"0px\";\n\t\n\t\tif ( footer ) {\n\t\t\tdivFooterTable[0].style.width = _fnStringToCss( iOuterWidth );\n\t\t\tdivFooterInner[0].style.width = _fnStringToCss( iOuterWidth );\n\t\t\tdivFooterInner[0].style[padding] = bScrolling ? barWidth+\"px\" : \"0px\";\n\t\t}\n\t\n\t\t/* Adjust the position of the header in case we loose the y-scrollbar */\n\t\tdivBody.scroll();\n\t\n\t\t// If sorting or filtering has occurred, jump the scrolling back to the top\n\t\t// only if we aren't holding the position\n\t\tif ( (settings.bSorted || settings.bFiltered) && ! settings._drawHold ) {\n\t\t\tdivBodyEl.scrollTop = 0;\n\t\t}\n\t}\n\t\n\t\n\t\n\t/**\n\t * Apply a given function to the display child nodes of an element array (typically\n\t * TD children of TR rows\n\t * @param {function} fn Method to apply to the objects\n\t * @param array {nodes} an1 List of elements to look through for display children\n\t * @param array {nodes} an2 Another list (identical structure to the first) - optional\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnApplyToChildren( fn, an1, an2 )\n\t{\n\t\tvar index=0, i=0, iLen=an1.length;\n\t\tvar nNode1, nNode2;\n\t\n\t\twhile ( i < iLen ) {\n\t\t\tnNode1 = an1[i].firstChild;\n\t\t\tnNode2 = an2 ? an2[i].firstChild : null;\n\t\n\t\t\twhile ( nNode1 ) {\n\t\t\t\tif ( nNode1.nodeType === 1 ) {\n\t\t\t\t\tif ( an2 ) {\n\t\t\t\t\t\tfn( nNode1, nNode2, index );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfn( nNode1, index );\n\t\t\t\t\t}\n\t\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\n\t\t\t\tnNode1 = nNode1.nextSibling;\n\t\t\t\tnNode2 = an2 ? nNode2.nextSibling : null;\n\t\t\t}\n\t\n\t\t\ti++;\n\t\t}\n\t}\n\t\n\t\n\t\n\tvar __re_html_remove = /<.*?>/g;\n\t\n\t\n\t/**\n\t * Calculate the width of columns for the table\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnCalculateColumnWidths ( oSettings )\n\t{\n\t\tvar\n\t\t\ttable = oSettings.nTable,\n\t\t\tcolumns = oSettings.aoColumns,\n\t\t\tscroll = oSettings.oScroll,\n\t\t\tscrollY = scroll.sY,\n\t\t\tscrollX = scroll.sX,\n\t\t\tscrollXInner = scroll.sXInner,\n\t\t\tcolumnCount = columns.length,\n\t\t\tvisibleColumns = _fnGetColumns( oSettings, 'bVisible' ),\n\t\t\theaderCells = $('th', oSettings.nTHead),\n\t\t\ttableWidthAttr = table.getAttribute('width'), // from DOM element\n\t\t\ttableContainer = table.parentNode,\n\t\t\tuserInputs = false,\n\t\t\ti, column, columnIdx, width, outerWidth,\n\t\t\tbrowser = oSettings.oBrowser,\n\t\t\tie67 = browser.bScrollOversize;\n\t\n\t\tvar styleWidth = table.style.width;\n\t\tif ( styleWidth && styleWidth.indexOf('%') !== -1 ) {\n\t\t\ttableWidthAttr = styleWidth;\n\t\t}\n\t\n\t\t/* Convert any user input sizes into pixel sizes */\n\t\tfor ( i=0 ; i<visibleColumns.length ; i++ ) {\n\t\t\tcolumn = columns[ visibleColumns[i] ];\n\t\n\t\t\tif ( column.sWidth !== null ) {\n\t\t\t\tcolumn.sWidth = _fnConvertToWidth( column.sWidthOrig, tableContainer );\n\t\n\t\t\t\tuserInputs = true;\n\t\t\t}\n\t\t}\n\t\n\t\t/* If the number of columns in the DOM equals the number that we have to\n\t\t * process in DataTables, then we can use the offsets that are created by\n\t\t * the web- browser. No custom sizes can be set in order for this to happen,\n\t\t * nor scrolling used\n\t\t */\n\t\tif ( ie67 || ! userInputs && ! scrollX && ! scrollY &&\n\t\t columnCount == _fnVisbleColumns( oSettings ) &&\n\t\t columnCount == headerCells.length\n\t\t) {\n\t\t\tfor ( i=0 ; i<columnCount ; i++ ) {\n\t\t\t\tvar colIdx = _fnVisibleToColumnIndex( oSettings, i );\n\t\n\t\t\t\tif ( colIdx !== null ) {\n\t\t\t\t\tcolumns[ colIdx ].sWidth = _fnStringToCss( headerCells.eq(i).width() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Otherwise construct a single row, worst case, table with the widest\n\t\t\t// node in the data, assign any user defined widths, then insert it into\n\t\t\t// the DOM and allow the browser to do all the hard work of calculating\n\t\t\t// table widths\n\t\t\tvar tmpTable = $(table).clone() // don't use cloneNode - IE8 will remove events on the main table\n\t\t\t\t.css( 'visibility', 'hidden' )\n\t\t\t\t.removeAttr( 'id' );\n\t\n\t\t\t// Clean up the table body\n\t\t\ttmpTable.find('tbody tr').remove();\n\t\t\tvar tr = $('<tr/>').appendTo( tmpTable.find('tbody') );\n\t\n\t\t\t// Clone the table header and footer - we can't use the header / footer\n\t\t\t// from the cloned table, since if scrolling is active, the table's\n\t\t\t// real header and footer are contained in different table tags\n\t\t\ttmpTable.find('thead, tfoot').remove();\n\t\t\ttmpTable\n\t\t\t\t.append( $(oSettings.nTHead).clone() )\n\t\t\t\t.append( $(oSettings.nTFoot).clone() );\n\t\n\t\t\t// Remove any assigned widths from the footer (from scrolling)\n\t\t\ttmpTable.find('tfoot th, tfoot td').css('width', '');\n\t\n\t\t\t// Apply custom sizing to the cloned header\n\t\t\theaderCells = _fnGetUniqueThs( oSettings, tmpTable.find('thead')[0] );\n\t\n\t\t\tfor ( i=0 ; i<visibleColumns.length ; i++ ) {\n\t\t\t\tcolumn = columns[ visibleColumns[i] ];\n\t\n\t\t\t\theaderCells[i].style.width = column.sWidthOrig !== null && column.sWidthOrig !== '' ?\n\t\t\t\t\t_fnStringToCss( column.sWidthOrig ) :\n\t\t\t\t\t'';\n\t\n\t\t\t\t// For scrollX we need to force the column width otherwise the\n\t\t\t\t// browser will collapse it. If this width is smaller than the\n\t\t\t\t// width the column requires, then it will have no effect\n\t\t\t\tif ( column.sWidthOrig && scrollX ) {\n\t\t\t\t\t$( headerCells[i] ).append( $('<div/>').css( {\n\t\t\t\t\t\twidth: column.sWidthOrig,\n\t\t\t\t\t\tmargin: 0,\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tborder: 0,\n\t\t\t\t\t\theight: 1\n\t\t\t\t\t} ) );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Find the widest cell for each column and put it into the table\n\t\t\tif ( oSettings.aoData.length ) {\n\t\t\t\tfor ( i=0 ; i<visibleColumns.length ; i++ ) {\n\t\t\t\t\tcolumnIdx = visibleColumns[i];\n\t\t\t\t\tcolumn = columns[ columnIdx ];\n\t\n\t\t\t\t\t$( _fnGetWidestNode( oSettings, columnIdx ) )\n\t\t\t\t\t\t.clone( false )\n\t\t\t\t\t\t.append( column.sContentPadding )\n\t\t\t\t\t\t.appendTo( tr );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Table has been built, attach to the document so we can work with it.\n\t\t\t// A holding element is used, positioned at the top of the container\n\t\t\t// with minimal height, so it has no effect on if the container scrolls\n\t\t\t// or not. Otherwise it might trigger scrolling when it actually isn't\n\t\t\t// needed\n\t\t\tvar holder = $('<div/>').css( scrollX || scrollY ?\n\t\t\t\t\t{\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\theight: 1,\n\t\t\t\t\t\tright: 0,\n\t\t\t\t\t\toverflow: 'hidden'\n\t\t\t\t\t} :\n\t\t\t\t\t{}\n\t\t\t\t)\n\t\t\t\t.append( tmpTable )\n\t\t\t\t.appendTo( tableContainer );\n\t\n\t\t\t// When scrolling (X or Y) we want to set the width of the table as \n\t\t\t// appropriate. However, when not scrolling leave the table width as it\n\t\t\t// is. This results in slightly different, but I think correct behaviour\n\t\t\tif ( scrollX && scrollXInner ) {\n\t\t\t\ttmpTable.width( scrollXInner );\n\t\t\t}\n\t\t\telse if ( scrollX ) {\n\t\t\t\ttmpTable.css( 'width', 'auto' );\n\t\t\t\ttmpTable.removeAttr('width');\n\t\n\t\t\t\t// If there is no width attribute or style, then allow the table to\n\t\t\t\t// collapse\n\t\t\t\tif ( tmpTable.width() < tableContainer.clientWidth && tableWidthAttr ) {\n\t\t\t\t\ttmpTable.width( tableContainer.clientWidth );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( scrollY ) {\n\t\t\t\ttmpTable.width( tableContainer.clientWidth );\n\t\t\t}\n\t\t\telse if ( tableWidthAttr ) {\n\t\t\t\ttmpTable.width( tableWidthAttr );\n\t\t\t}\n\t\n\t\t\t// Get the width of each column in the constructed table - we need to\n\t\t\t// know the inner width (so it can be assigned to the other table's\n\t\t\t// cells) and the outer width so we can calculate the full width of the\n\t\t\t// table. This is safe since DataTables requires a unique cell for each\n\t\t\t// column, but if ever a header can span multiple columns, this will\n\t\t\t// need to be modified.\n\t\t\tvar total = 0;\n\t\t\tfor ( i=0 ; i<visibleColumns.length ; i++ ) {\n\t\t\t\tvar cell = $(headerCells[i]);\n\t\t\t\tvar border = cell.outerWidth() - cell.width();\n\t\n\t\t\t\t// Use getBounding... where possible (not IE8-) because it can give\n\t\t\t\t// sub-pixel accuracy, which we then want to round up!\n\t\t\t\tvar bounding = browser.bBounding ?\n\t\t\t\t\tMath.ceil( headerCells[i].getBoundingClientRect().width ) :\n\t\t\t\t\tcell.outerWidth();\n\t\n\t\t\t\t// Total is tracked to remove any sub-pixel errors as the outerWidth\n\t\t\t\t// of the table might not equal the total given here (IE!).\n\t\t\t\ttotal += bounding;\n\t\n\t\t\t\t// Width for each column to use\n\t\t\t\tcolumns[ visibleColumns[i] ].sWidth = _fnStringToCss( bounding - border );\n\t\t\t}\n\t\n\t\t\ttable.style.width = _fnStringToCss( total );\n\t\n\t\t\t// Finished with the table - ditch it\n\t\t\tholder.remove();\n\t\t}\n\t\n\t\t// If there is a width attr, we want to attach an event listener which\n\t\t// allows the table sizing to automatically adjust when the window is\n\t\t// resized. Use the width attr rather than CSS, since we can't know if the\n\t\t// CSS is a relative value or absolute - DOM read is always px.\n\t\tif ( tableWidthAttr ) {\n\t\t\ttable.style.width = _fnStringToCss( tableWidthAttr );\n\t\t}\n\t\n\t\tif ( (tableWidthAttr || scrollX) && ! oSettings._reszEvt ) {\n\t\t\tvar bindResize = function () {\n\t\t\t\t$(window).bind('resize.DT-'+oSettings.sInstance, _fnThrottle( function () {\n\t\t\t\t\t_fnAdjustColumnSizing( oSettings );\n\t\t\t\t} ) );\n\t\t\t};\n\t\n\t\t\t// IE6/7 will crash if we bind a resize event handler on page load.\n\t\t\t// To be removed in 1.11 which drops IE6/7 support\n\t\t\tif ( ie67 ) {\n\t\t\t\tsetTimeout( bindResize, 1000 );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbindResize();\n\t\t\t}\n\t\n\t\t\toSettings._reszEvt = true;\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Throttle the calls to a function. Arguments and context are maintained for\n\t * the throttled function\n\t * @param {function} fn Function to be called\n\t * @param {int} [freq=200] call frequency in mS\n\t * @returns {function} wrapped function\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnThrottle( fn, freq ) {\n\t\tvar\n\t\t\tfrequency = freq !== undefined ? freq : 200,\n\t\t\tlast,\n\t\t\ttimer;\n\t\n\t\treturn function () {\n\t\t\tvar\n\t\t\t\tthat = this,\n\t\t\t\tnow = +new Date(),\n\t\t\t\targs = arguments;\n\t\n\t\t\tif ( last && now < last + frequency ) {\n\t\t\t\tclearTimeout( timer );\n\t\n\t\t\t\ttimer = setTimeout( function () {\n\t\t\t\t\tlast = undefined;\n\t\t\t\t\tfn.apply( that, args );\n\t\t\t\t}, frequency );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlast = now;\n\t\t\t\tfn.apply( that, args );\n\t\t\t}\n\t\t};\n\t}\n\t\n\t\n\t/**\n\t * Convert a CSS unit width to pixels (e.g. 2em)\n\t * @param {string} width width to be converted\n\t * @param {node} parent parent to get the with for (required for relative widths) - optional\n\t * @returns {int} width in pixels\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnConvertToWidth ( width, parent )\n\t{\n\t\tif ( ! width ) {\n\t\t\treturn 0;\n\t\t}\n\t\n\t\tvar n = $('<div/>')\n\t\t\t.css( 'width', _fnStringToCss( width ) )\n\t\t\t.appendTo( parent || document.body );\n\t\n\t\tvar val = n[0].offsetWidth;\n\t\tn.remove();\n\t\n\t\treturn val;\n\t}\n\t\n\t\n\t/**\n\t * Get the widest node\n\t * @param {object} settings dataTables settings object\n\t * @param {int} colIdx column of interest\n\t * @returns {node} widest table node\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnGetWidestNode( settings, colIdx )\n\t{\n\t\tvar idx = _fnGetMaxLenString( settings, colIdx );\n\t\tif ( idx < 0 ) {\n\t\t\treturn null;\n\t\t}\n\t\n\t\tvar data = settings.aoData[ idx ];\n\t\treturn ! data.nTr ? // Might not have been created when deferred rendering\n\t\t\t$('<td/>').html( _fnGetCellData( settings, idx, colIdx, 'display' ) )[0] :\n\t\t\tdata.anCells[ colIdx ];\n\t}\n\t\n\t\n\t/**\n\t * Get the maximum strlen for each data column\n\t * @param {object} settings dataTables settings object\n\t * @param {int} colIdx column of interest\n\t * @returns {string} max string length for each column\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnGetMaxLenString( settings, colIdx )\n\t{\n\t\tvar s, max=-1, maxIdx = -1;\n\t\n\t\tfor ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\ts = _fnGetCellData( settings, i, colIdx, 'display' )+'';\n\t\t\ts = s.replace( __re_html_remove, '' );\n\t\t\ts = s.replace( / /g, ' ' );\n\t\n\t\t\tif ( s.length > max ) {\n\t\t\t\tmax = s.length;\n\t\t\t\tmaxIdx = i;\n\t\t\t}\n\t\t}\n\t\n\t\treturn maxIdx;\n\t}\n\t\n\t\n\t/**\n\t * Append a CSS unit (only if required) to a string\n\t * @param {string} value to css-ify\n\t * @returns {string} value with css unit\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnStringToCss( s )\n\t{\n\t\tif ( s === null ) {\n\t\t\treturn '0px';\n\t\t}\n\t\n\t\tif ( typeof s == 'number' ) {\n\t\t\treturn s < 0 ?\n\t\t\t\t'0px' :\n\t\t\t\ts+'px';\n\t\t}\n\t\n\t\t// Check it has a unit character already\n\t\treturn s.match(/\\d$/) ?\n\t\t\ts+'px' :\n\t\t\ts;\n\t}\n\t\n\t\n\t\n\tfunction _fnSortFlatten ( settings )\n\t{\n\t\tvar\n\t\t\ti, iLen, k, kLen,\n\t\t\taSort = [],\n\t\t\taiOrig = [],\n\t\t\taoColumns = settings.aoColumns,\n\t\t\taDataSort, iCol, sType, srcCol,\n\t\t\tfixed = settings.aaSortingFixed,\n\t\t\tfixedObj = $.isPlainObject( fixed ),\n\t\t\tnestedSort = [],\n\t\t\tadd = function ( a ) {\n\t\t\t\tif ( a.length && ! $.isArray( a[0] ) ) {\n\t\t\t\t\t// 1D array\n\t\t\t\t\tnestedSort.push( a );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// 2D array\n\t\t\t\t\t$.merge( nestedSort, a );\n\t\t\t\t}\n\t\t\t};\n\t\n\t\t// Build the sort array, with pre-fix and post-fix options if they have been\n\t\t// specified\n\t\tif ( $.isArray( fixed ) ) {\n\t\t\tadd( fixed );\n\t\t}\n\t\n\t\tif ( fixedObj && fixed.pre ) {\n\t\t\tadd( fixed.pre );\n\t\t}\n\t\n\t\tadd( settings.aaSorting );\n\t\n\t\tif (fixedObj && fixed.post ) {\n\t\t\tadd( fixed.post );\n\t\t}\n\t\n\t\tfor ( i=0 ; i<nestedSort.length ; i++ )\n\t\t{\n\t\t\tsrcCol = nestedSort[i][0];\n\t\t\taDataSort = aoColumns[ srcCol ].aDataSort;\n\t\n\t\t\tfor ( k=0, kLen=aDataSort.length ; k<kLen ; k++ )\n\t\t\t{\n\t\t\t\tiCol = aDataSort[k];\n\t\t\t\tsType = aoColumns[ iCol ].sType || 'string';\n\t\n\t\t\t\tif ( nestedSort[i]._idx === undefined ) {\n\t\t\t\t\tnestedSort[i]._idx = $.inArray( nestedSort[i][1], aoColumns[iCol].asSorting );\n\t\t\t\t}\n\t\n\t\t\t\taSort.push( {\n\t\t\t\t\tsrc: srcCol,\n\t\t\t\t\tcol: iCol,\n\t\t\t\t\tdir: nestedSort[i][1],\n\t\t\t\t\tindex: nestedSort[i]._idx,\n\t\t\t\t\ttype: sType,\n\t\t\t\t\tformatter: DataTable.ext.type.order[ sType+\"-pre\" ]\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t\n\t\treturn aSort;\n\t}\n\t\n\t/**\n\t * Change the order of the table\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t * @todo This really needs split up!\n\t */\n\tfunction _fnSort ( oSettings )\n\t{\n\t\tvar\n\t\t\ti, ien, iLen, j, jLen, k, kLen,\n\t\t\tsDataType, nTh,\n\t\t\taiOrig = [],\n\t\t\toExtSort = DataTable.ext.type.order,\n\t\t\taoData = oSettings.aoData,\n\t\t\taoColumns = oSettings.aoColumns,\n\t\t\taDataSort, data, iCol, sType, oSort,\n\t\t\tformatters = 0,\n\t\t\tsortCol,\n\t\t\tdisplayMaster = oSettings.aiDisplayMaster,\n\t\t\taSort;\n\t\n\t\t// Resolve any column types that are unknown due to addition or invalidation\n\t\t// @todo Can this be moved into a 'data-ready' handler which is called when\n\t\t// data is going to be used in the table?\n\t\t_fnColumnTypes( oSettings );\n\t\n\t\taSort = _fnSortFlatten( oSettings );\n\t\n\t\tfor ( i=0, ien=aSort.length ; i<ien ; i++ ) {\n\t\t\tsortCol = aSort[i];\n\t\n\t\t\t// Track if we can use the fast sort algorithm\n\t\t\tif ( sortCol.formatter ) {\n\t\t\t\tformatters++;\n\t\t\t}\n\t\n\t\t\t// Load the data needed for the sort, for each cell\n\t\t\t_fnSortData( oSettings, sortCol.col );\n\t\t}\n\t\n\t\t/* No sorting required if server-side or no sorting array */\n\t\tif ( _fnDataSource( oSettings ) != 'ssp' && aSort.length !== 0 )\n\t\t{\n\t\t\t// Create a value - key array of the current row positions such that we can use their\n\t\t\t// current position during the sort, if values match, in order to perform stable sorting\n\t\t\tfor ( i=0, iLen=displayMaster.length ; i<iLen ; i++ ) {\n\t\t\t\taiOrig[ displayMaster[i] ] = i;\n\t\t\t}\n\t\n\t\t\t/* Do the sort - here we want multi-column sorting based on a given data source (column)\n\t\t\t * and sorting function (from oSort) in a certain direction. It's reasonably complex to\n\t\t\t * follow on it's own, but this is what we want (example two column sorting):\n\t\t\t * fnLocalSorting = function(a,b){\n\t\t\t * var iTest;\n\t\t\t * iTest = oSort['string-asc']('data11', 'data12');\n\t\t\t * if (iTest !== 0)\n\t\t\t * return iTest;\n\t\t\t * iTest = oSort['numeric-desc']('data21', 'data22');\n\t\t\t * if (iTest !== 0)\n\t\t\t * return iTest;\n\t\t\t * return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );\n\t\t\t * }\n\t\t\t * Basically we have a test for each sorting column, if the data in that column is equal,\n\t\t\t * test the next column. If all columns match, then we use a numeric sort on the row\n\t\t\t * positions in the original data array to provide a stable sort.\n\t\t\t *\n\t\t\t * Note - I know it seems excessive to have two sorting methods, but the first is around\n\t\t\t * 15% faster, so the second is only maintained for backwards compatibility with sorting\n\t\t\t * methods which do not have a pre-sort formatting function.\n\t\t\t */\n\t\t\tif ( formatters === aSort.length ) {\n\t\t\t\t// All sort types have formatting functions\n\t\t\t\tdisplayMaster.sort( function ( a, b ) {\n\t\t\t\t\tvar\n\t\t\t\t\t\tx, y, k, test, sort,\n\t\t\t\t\t\tlen=aSort.length,\n\t\t\t\t\t\tdataA = aoData[a]._aSortData,\n\t\t\t\t\t\tdataB = aoData[b]._aSortData;\n\t\n\t\t\t\t\tfor ( k=0 ; k<len ; k++ ) {\n\t\t\t\t\t\tsort = aSort[k];\n\t\n\t\t\t\t\t\tx = dataA[ sort.col ];\n\t\t\t\t\t\ty = dataB[ sort.col ];\n\t\n\t\t\t\t\t\ttest = x<y ? -1 : x>y ? 1 : 0;\n\t\t\t\t\t\tif ( test !== 0 ) {\n\t\t\t\t\t\t\treturn sort.dir === 'asc' ? test : -test;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t\tx = aiOrig[a];\n\t\t\t\t\ty = aiOrig[b];\n\t\t\t\t\treturn x<y ? -1 : x>y ? 1 : 0;\n\t\t\t\t} );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Depreciated - remove in 1.11 (providing a plug-in option)\n\t\t\t\t// Not all sort types have formatting methods, so we have to call their sorting\n\t\t\t\t// methods.\n\t\t\t\tdisplayMaster.sort( function ( a, b ) {\n\t\t\t\t\tvar\n\t\t\t\t\t\tx, y, k, l, test, sort, fn,\n\t\t\t\t\t\tlen=aSort.length,\n\t\t\t\t\t\tdataA = aoData[a]._aSortData,\n\t\t\t\t\t\tdataB = aoData[b]._aSortData;\n\t\n\t\t\t\t\tfor ( k=0 ; k<len ; k++ ) {\n\t\t\t\t\t\tsort = aSort[k];\n\t\n\t\t\t\t\t\tx = dataA[ sort.col ];\n\t\t\t\t\t\ty = dataB[ sort.col ];\n\t\n\t\t\t\t\t\tfn = oExtSort[ sort.type+\"-\"+sort.dir ] || oExtSort[ \"string-\"+sort.dir ];\n\t\t\t\t\t\ttest = fn( x, y );\n\t\t\t\t\t\tif ( test !== 0 ) {\n\t\t\t\t\t\t\treturn test;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t\tx = aiOrig[a];\n\t\t\t\t\ty = aiOrig[b];\n\t\t\t\t\treturn x<y ? -1 : x>y ? 1 : 0;\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t\n\t\t/* Tell the draw function that we have sorted the data */\n\t\toSettings.bSorted = true;\n\t}\n\t\n\t\n\tfunction _fnSortAria ( settings )\n\t{\n\t\tvar label;\n\t\tvar nextSort;\n\t\tvar columns = settings.aoColumns;\n\t\tvar aSort = _fnSortFlatten( settings );\n\t\tvar oAria = settings.oLanguage.oAria;\n\t\n\t\t// ARIA attributes - need to loop all columns, to update all (removing old\n\t\t// attributes as needed)\n\t\tfor ( var i=0, iLen=columns.length ; i<iLen ; i++ )\n\t\t{\n\t\t\tvar col = columns[i];\n\t\t\tvar asSorting = col.asSorting;\n\t\t\tvar sTitle = col.sTitle.replace( /<.*?>/g, \"\" );\n\t\t\tvar th = col.nTh;\n\t\n\t\t\t// IE7 is throwing an error when setting these properties with jQuery's\n\t\t\t// attr() and removeAttr() methods...\n\t\t\tth.removeAttribute('aria-sort');\n\t\n\t\t\t/* In ARIA only the first sorting column can be marked as sorting - no multi-sort option */\n\t\t\tif ( col.bSortable ) {\n\t\t\t\tif ( aSort.length > 0 && aSort[0].col == i ) {\n\t\t\t\t\tth.setAttribute('aria-sort', aSort[0].dir==\"asc\" ? \"ascending\" : \"descending\" );\n\t\t\t\t\tnextSort = asSorting[ aSort[0].index+1 ] || asSorting[0];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnextSort = asSorting[0];\n\t\t\t\t}\n\t\n\t\t\t\tlabel = sTitle + ( nextSort === \"asc\" ?\n\t\t\t\t\toAria.sSortAscending :\n\t\t\t\t\toAria.sSortDescending\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlabel = sTitle;\n\t\t\t}\n\t\n\t\t\tth.setAttribute('aria-label', label);\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Function to run on user sort request\n\t * @param {object} settings dataTables settings object\n\t * @param {node} attachTo node to attach the handler to\n\t * @param {int} colIdx column sorting index\n\t * @param {boolean} [append=false] Append the requested sort to the existing\n\t * sort if true (i.e. multi-column sort)\n\t * @param {function} [callback] callback function\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnSortListener ( settings, colIdx, append, callback )\n\t{\n\t\tvar col = settings.aoColumns[ colIdx ];\n\t\tvar sorting = settings.aaSorting;\n\t\tvar asSorting = col.asSorting;\n\t\tvar nextSortIdx;\n\t\tvar next = function ( a, overflow ) {\n\t\t\tvar idx = a._idx;\n\t\t\tif ( idx === undefined ) {\n\t\t\t\tidx = $.inArray( a[1], asSorting );\n\t\t\t}\n\t\n\t\t\treturn idx+1 < asSorting.length ?\n\t\t\t\tidx+1 :\n\t\t\t\toverflow ?\n\t\t\t\t\tnull :\n\t\t\t\t\t0;\n\t\t};\n\t\n\t\t// Convert to 2D array if needed\n\t\tif ( typeof sorting[0] === 'number' ) {\n\t\t\tsorting = settings.aaSorting = [ sorting ];\n\t\t}\n\t\n\t\t// If appending the sort then we are multi-column sorting\n\t\tif ( append && settings.oFeatures.bSortMulti ) {\n\t\t\t// Are we already doing some kind of sort on this column?\n\t\t\tvar sortIdx = $.inArray( colIdx, _pluck(sorting, '0') );\n\t\n\t\t\tif ( sortIdx !== -1 ) {\n\t\t\t\t// Yes, modify the sort\n\t\t\t\tnextSortIdx = next( sorting[sortIdx], true );\n\t\n\t\t\t\tif ( nextSortIdx === null && sorting.length === 1 ) {\n\t\t\t\t\tnextSortIdx = 0; // can't remove sorting completely\n\t\t\t\t}\n\t\n\t\t\t\tif ( nextSortIdx === null ) {\n\t\t\t\t\tsorting.splice( sortIdx, 1 );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsorting[sortIdx][1] = asSorting[ nextSortIdx ];\n\t\t\t\t\tsorting[sortIdx]._idx = nextSortIdx;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// No sort on this column yet\n\t\t\t\tsorting.push( [ colIdx, asSorting[0], 0 ] );\n\t\t\t\tsorting[sorting.length-1]._idx = 0;\n\t\t\t}\n\t\t}\n\t\telse if ( sorting.length && sorting[0][0] == colIdx ) {\n\t\t\t// Single column - already sorting on this column, modify the sort\n\t\t\tnextSortIdx = next( sorting[0] );\n\t\n\t\t\tsorting.length = 1;\n\t\t\tsorting[0][1] = asSorting[ nextSortIdx ];\n\t\t\tsorting[0]._idx = nextSortIdx;\n\t\t}\n\t\telse {\n\t\t\t// Single column - sort only on this column\n\t\t\tsorting.length = 0;\n\t\t\tsorting.push( [ colIdx, asSorting[0] ] );\n\t\t\tsorting[0]._idx = 0;\n\t\t}\n\t\n\t\t// Run the sort by calling a full redraw\n\t\t_fnReDraw( settings );\n\t\n\t\t// callback used for async user interaction\n\t\tif ( typeof callback == 'function' ) {\n\t\t\tcallback( settings );\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Attach a sort handler (click) to a node\n\t * @param {object} settings dataTables settings object\n\t * @param {node} attachTo node to attach the handler to\n\t * @param {int} colIdx column sorting index\n\t * @param {function} [callback] callback function\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnSortAttachListener ( settings, attachTo, colIdx, callback )\n\t{\n\t\tvar col = settings.aoColumns[ colIdx ];\n\t\n\t\t_fnBindAction( attachTo, {}, function (e) {\n\t\t\t/* If the column is not sortable - don't to anything */\n\t\t\tif ( col.bSortable === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// If processing is enabled use a timeout to allow the processing\n\t\t\t// display to be shown - otherwise to it synchronously\n\t\t\tif ( settings.oFeatures.bProcessing ) {\n\t\t\t\t_fnProcessingDisplay( settings, true );\n\t\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t_fnSortListener( settings, colIdx, e.shiftKey, callback );\n\t\n\t\t\t\t\t// In server-side processing, the draw callback will remove the\n\t\t\t\t\t// processing display\n\t\t\t\t\tif ( _fnDataSource( settings ) !== 'ssp' ) {\n\t\t\t\t\t\t_fnProcessingDisplay( settings, false );\n\t\t\t\t\t}\n\t\t\t\t}, 0 );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_fnSortListener( settings, colIdx, e.shiftKey, callback );\n\t\t\t}\n\t\t} );\n\t}\n\t\n\t\n\t/**\n\t * Set the sorting classes on table's body, Note: it is safe to call this function\n\t * when bSort and bSortClasses are false\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnSortingClasses( settings )\n\t{\n\t\tvar oldSort = settings.aLastSort;\n\t\tvar sortClass = settings.oClasses.sSortColumn;\n\t\tvar sort = _fnSortFlatten( settings );\n\t\tvar features = settings.oFeatures;\n\t\tvar i, ien, colIdx;\n\t\n\t\tif ( features.bSort && features.bSortClasses ) {\n\t\t\t// Remove old sorting classes\n\t\t\tfor ( i=0, ien=oldSort.length ; i<ien ; i++ ) {\n\t\t\t\tcolIdx = oldSort[i].src;\n\t\n\t\t\t\t// Remove column sorting\n\t\t\t\t$( _pluck( settings.aoData, 'anCells', colIdx ) )\n\t\t\t\t\t.removeClass( sortClass + (i<2 ? i+1 : 3) );\n\t\t\t}\n\t\n\t\t\t// Add new column sorting\n\t\t\tfor ( i=0, ien=sort.length ; i<ien ; i++ ) {\n\t\t\t\tcolIdx = sort[i].src;\n\t\n\t\t\t\t$( _pluck( settings.aoData, 'anCells', colIdx ) )\n\t\t\t\t\t.addClass( sortClass + (i<2 ? i+1 : 3) );\n\t\t\t}\n\t\t}\n\t\n\t\tsettings.aLastSort = sort;\n\t}\n\t\n\t\n\t// Get the data to sort a column, be it from cache, fresh (populating the\n\t// cache), or from a sort formatter\n\tfunction _fnSortData( settings, idx )\n\t{\n\t\t// Custom sorting function - provided by the sort data type\n\t\tvar column = settings.aoColumns[ idx ];\n\t\tvar customSort = DataTable.ext.order[ column.sSortDataType ];\n\t\tvar customData;\n\t\n\t\tif ( customSort ) {\n\t\t\tcustomData = customSort.call( settings.oInstance, settings, idx,\n\t\t\t\t_fnColumnIndexToVisible( settings, idx )\n\t\t\t);\n\t\t}\n\t\n\t\t// Use / populate cache\n\t\tvar row, cellData;\n\t\tvar formatter = DataTable.ext.type.order[ column.sType+\"-pre\" ];\n\t\n\t\tfor ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aSortData ) {\n\t\t\t\trow._aSortData = [];\n\t\t\t}\n\t\n\t\t\tif ( ! row._aSortData[idx] || customSort ) {\n\t\t\t\tcellData = customSort ?\n\t\t\t\t\tcustomData[i] : // If there was a custom sort function, use data from there\n\t\t\t\t\t_fnGetCellData( settings, i, idx, 'sort' );\n\t\n\t\t\t\trow._aSortData[ idx ] = formatter ?\n\t\t\t\t\tformatter( cellData ) :\n\t\t\t\t\tcellData;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t\n\t/**\n\t * Save the state of a table\n\t * @param {object} oSettings dataTables settings object\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnSaveState ( settings )\n\t{\n\t\tif ( !settings.oFeatures.bStateSave || settings.bDestroying )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\n\t\t/* Store the interesting variables */\n\t\tvar state = {\n\t\t\ttime: +new Date(),\n\t\t\tstart: settings._iDisplayStart,\n\t\t\tlength: settings._iDisplayLength,\n\t\t\torder: $.extend( true, [], settings.aaSorting ),\n\t\t\tsearch: _fnSearchToCamel( settings.oPreviousSearch ),\n\t\t\tcolumns: $.map( settings.aoColumns, function ( col, i ) {\n\t\t\t\treturn {\n\t\t\t\t\tvisible: col.bVisible,\n\t\t\t\t\tsearch: _fnSearchToCamel( settings.aoPreSearchCols[i] )\n\t\t\t\t};\n\t\t\t} )\n\t\t};\n\t\n\t\t_fnCallbackFire( settings, \"aoStateSaveParams\", 'stateSaveParams', [settings, state] );\n\t\n\t\tsettings.oSavedState = state;\n\t\tsettings.fnStateSaveCallback.call( settings.oInstance, settings, state );\n\t}\n\t\n\t\n\t/**\n\t * Attempt to load a saved table state\n\t * @param {object} oSettings dataTables settings object\n\t * @param {object} oInit DataTables init object so we can override settings\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnLoadState ( settings, oInit )\n\t{\n\t\tvar i, ien;\n\t\tvar columns = settings.aoColumns;\n\t\n\t\tif ( ! settings.oFeatures.bStateSave ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\tvar state = settings.fnStateLoadCallback.call( settings.oInstance, settings );\n\t\tif ( ! state || ! state.time ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\t/* Allow custom and plug-in manipulation functions to alter the saved data set and\n\t\t * cancelling of loading by returning false\n\t\t */\n\t\tvar abStateLoad = _fnCallbackFire( settings, 'aoStateLoadParams', 'stateLoadParams', [settings, state] );\n\t\tif ( $.inArray( false, abStateLoad ) !== -1 ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\t/* Reject old data */\n\t\tvar duration = settings.iStateDuration;\n\t\tif ( duration > 0 && state.time < +new Date() - (duration*1000) ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\t// Number of columns have changed - all bets are off, no restore of settings\n\t\tif ( columns.length !== state.columns.length ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\t// Store the saved state so it might be accessed at any time\n\t\tsettings.oLoadedState = $.extend( true, {}, state );\n\t\n\t\t// Restore key features - todo - for 1.11 this needs to be done by\n\t\t// subscribed events\n\t\tif ( state.start !== undefined ) {\n\t\t\tsettings._iDisplayStart = state.start;\n\t\t\tsettings.iInitDisplayStart = state.start;\n\t\t}\n\t\tif ( state.length !== undefined ) {\n\t\t\tsettings._iDisplayLength = state.length;\n\t\t}\n\t\n\t\t// Order\n\t\tif ( state.order !== undefined ) {\n\t\t\tsettings.aaSorting = [];\n\t\t\t$.each( state.order, function ( i, col ) {\n\t\t\t\tsettings.aaSorting.push( col[0] >= columns.length ?\n\t\t\t\t\t[ 0, col[1] ] :\n\t\t\t\t\tcol\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t\n\t\t// Search\n\t\tif ( state.search !== undefined ) {\n\t\t\t$.extend( settings.oPreviousSearch, _fnSearchToHung( state.search ) );\n\t\t}\n\t\n\t\t// Columns\n\t\tfor ( i=0, ien=state.columns.length ; i<ien ; i++ ) {\n\t\t\tvar col = state.columns[i];\n\t\n\t\t\t// Visibility\n\t\t\tif ( col.visible !== undefined ) {\n\t\t\t\tcolumns[i].bVisible = col.visible;\n\t\t\t}\n\t\n\t\t\t// Search\n\t\t\tif ( col.search !== undefined ) {\n\t\t\t\t$.extend( settings.aoPreSearchCols[i], _fnSearchToHung( col.search ) );\n\t\t\t}\n\t\t}\n\t\n\t\t_fnCallbackFire( settings, 'aoStateLoaded', 'stateLoaded', [settings, state] );\n\t}\n\t\n\t\n\t/**\n\t * Return the settings object for a particular table\n\t * @param {node} table table we are using as a dataTable\n\t * @returns {object} Settings object - or null if not found\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnSettingsFromNode ( table )\n\t{\n\t\tvar settings = DataTable.settings;\n\t\tvar idx = $.inArray( table, _pluck( settings, 'nTable' ) );\n\t\n\t\treturn idx !== -1 ?\n\t\t\tsettings[ idx ] :\n\t\t\tnull;\n\t}\n\t\n\t\n\t/**\n\t * Log an error message\n\t * @param {object} settings dataTables settings object\n\t * @param {int} level log error messages, or display them to the user\n\t * @param {string} msg error message\n\t * @param {int} tn Technical note id to get more information about the error.\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnLog( settings, level, msg, tn )\n\t{\n\t\tmsg = 'DataTables warning: '+\n\t\t\t(settings ? 'table id='+settings.sTableId+' - ' : '')+msg;\n\t\n\t\tif ( tn ) {\n\t\t\tmsg += '. For more information about this error, please see '+\n\t\t\t'http://datatables.net/tn/'+tn;\n\t\t}\n\t\n\t\tif ( ! level ) {\n\t\t\t// Backwards compatibility pre 1.10\n\t\t\tvar ext = DataTable.ext;\n\t\t\tvar type = ext.sErrMode || ext.errMode;\n\t\n\t\t\tif ( settings ) {\n\t\t\t\t_fnCallbackFire( settings, null, 'error', [ settings, tn, msg ] );\n\t\t\t}\n\t\n\t\t\tif ( type == 'alert' ) {\n\t\t\t\talert( msg );\n\t\t\t}\n\t\t\telse if ( type == 'throw' ) {\n\t\t\t\tthrow new Error(msg);\n\t\t\t}\n\t\t\telse if ( typeof type == 'function' ) {\n\t\t\t\ttype( settings, tn, msg );\n\t\t\t}\n\t\t}\n\t\telse if ( window.console && console.log ) {\n\t\t\tconsole.log( msg );\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * See if a property is defined on one object, if so assign it to the other object\n\t * @param {object} ret target object\n\t * @param {object} src source object\n\t * @param {string} name property\n\t * @param {string} [mappedName] name to map too - optional, name used if not given\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnMap( ret, src, name, mappedName )\n\t{\n\t\tif ( $.isArray( name ) ) {\n\t\t\t$.each( name, function (i, val) {\n\t\t\t\tif ( $.isArray( val ) ) {\n\t\t\t\t\t_fnMap( ret, src, val[0], val[1] );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t_fnMap( ret, src, val );\n\t\t\t\t}\n\t\t\t} );\n\t\n\t\t\treturn;\n\t\t}\n\t\n\t\tif ( mappedName === undefined ) {\n\t\t\tmappedName = name;\n\t\t}\n\t\n\t\tif ( src[name] !== undefined ) {\n\t\t\tret[mappedName] = src[name];\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Extend objects - very similar to jQuery.extend, but deep copy objects, and\n\t * shallow copy arrays. The reason we need to do this, is that we don't want to\n\t * deep copy array init values (such as aaSorting) since the dev wouldn't be\n\t * able to override them, but we do want to deep copy arrays.\n\t * @param {object} out Object to extend\n\t * @param {object} extender Object from which the properties will be applied to\n\t * out\n\t * @param {boolean} breakRefs If true, then arrays will be sliced to take an\n\t * independent copy with the exception of the `data` or `aaData` parameters\n\t * if they are present. This is so you can pass in a collection to\n\t * DataTables and have that used as your data source without breaking the\n\t * references\n\t * @returns {object} out Reference, just for convenience - out === the return.\n\t * @memberof DataTable#oApi\n\t * @todo This doesn't take account of arrays inside the deep copied objects.\n\t */\n\tfunction _fnExtend( out, extender, breakRefs )\n\t{\n\t\tvar val;\n\t\n\t\tfor ( var prop in extender ) {\n\t\t\tif ( extender.hasOwnProperty(prop) ) {\n\t\t\t\tval = extender[prop];\n\t\n\t\t\t\tif ( $.isPlainObject( val ) ) {\n\t\t\t\t\tif ( ! $.isPlainObject( out[prop] ) ) {\n\t\t\t\t\t\tout[prop] = {};\n\t\t\t\t\t}\n\t\t\t\t\t$.extend( true, out[prop], val );\n\t\t\t\t}\n\t\t\t\telse if ( breakRefs && prop !== 'data' && prop !== 'aaData' && $.isArray(val) ) {\n\t\t\t\t\tout[prop] = val.slice();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tout[prop] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn out;\n\t}\n\t\n\t\n\t/**\n\t * Bind an event handers to allow a click or return key to activate the callback.\n\t * This is good for accessibility since a return on the keyboard will have the\n\t * same effect as a click, if the element has focus.\n\t * @param {element} n Element to bind the action to\n\t * @param {object} oData Data object to pass to the triggered function\n\t * @param {function} fn Callback function for when the event is triggered\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnBindAction( n, oData, fn )\n\t{\n\t\t$(n)\n\t\t\t.bind( 'click.DT', oData, function (e) {\n\t\t\t\t\tn.blur(); // Remove focus outline for mouse users\n\t\t\t\t\tfn(e);\n\t\t\t\t} )\n\t\t\t.bind( 'keypress.DT', oData, function (e){\n\t\t\t\t\tif ( e.which === 13 ) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tfn(e);\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t.bind( 'selectstart.DT', function () {\n\t\t\t\t\t/* Take the brutal approach to cancelling text selection */\n\t\t\t\t\treturn false;\n\t\t\t\t} );\n\t}\n\t\n\t\n\t/**\n\t * Register a callback function. Easily allows a callback function to be added to\n\t * an array store of callback functions that can then all be called together.\n\t * @param {object} oSettings dataTables settings object\n\t * @param {string} sStore Name of the array storage for the callbacks in oSettings\n\t * @param {function} fn Function to be called back\n\t * @param {string} sName Identifying name for the callback (i.e. a label)\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnCallbackReg( oSettings, sStore, fn, sName )\n\t{\n\t\tif ( fn )\n\t\t{\n\t\t\toSettings[sStore].push( {\n\t\t\t\t\"fn\": fn,\n\t\t\t\t\"sName\": sName\n\t\t\t} );\n\t\t}\n\t}\n\t\n\t\n\t/**\n\t * Fire callback functions and trigger events. Note that the loop over the\n\t * callback array store is done backwards! Further note that you do not want to\n\t * fire off triggers in time sensitive applications (for example cell creation)\n\t * as its slow.\n\t * @param {object} settings dataTables settings object\n\t * @param {string} callbackArr Name of the array storage for the callbacks in\n\t * oSettings\n\t * @param {string} eventName Name of the jQuery custom event to trigger. If\n\t * null no trigger is fired\n\t * @param {array} args Array of arguments to pass to the callback function /\n\t * trigger\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnCallbackFire( settings, callbackArr, eventName, args )\n\t{\n\t\tvar ret = [];\n\t\n\t\tif ( callbackArr ) {\n\t\t\tret = $.map( settings[callbackArr].slice().reverse(), function (val, i) {\n\t\t\t\treturn val.fn.apply( settings.oInstance, args );\n\t\t\t} );\n\t\t}\n\t\n\t\tif ( eventName !== null ) {\n\t\t\tvar e = $.Event( eventName+'.dt' );\n\t\n\t\t\t$(settings.nTable).trigger( e, args );\n\t\n\t\t\tret.push( e.result );\n\t\t}\n\t\n\t\treturn ret;\n\t}\n\t\n\t\n\tfunction _fnLengthOverflow ( settings )\n\t{\n\t\tvar\n\t\t\tstart = settings._iDisplayStart,\n\t\t\tend = settings.fnDisplayEnd(),\n\t\t\tlen = settings._iDisplayLength;\n\t\n\t\t/* If we have space to show extra rows (backing up from the end point - then do so */\n\t\tif ( start >= end )\n\t\t{\n\t\t\tstart = end - len;\n\t\t}\n\t\n\t\t// Keep the start record on the current page\n\t\tstart -= (start % len);\n\t\n\t\tif ( len === -1 || start < 0 )\n\t\t{\n\t\t\tstart = 0;\n\t\t}\n\t\n\t\tsettings._iDisplayStart = start;\n\t}\n\t\n\t\n\tfunction _fnRenderer( settings, type )\n\t{\n\t\tvar renderer = settings.renderer;\n\t\tvar host = DataTable.ext.renderer[type];\n\t\n\t\tif ( $.isPlainObject( renderer ) && renderer[type] ) {\n\t\t\t// Specific renderer for this type. If available use it, otherwise use\n\t\t\t// the default.\n\t\t\treturn host[renderer[type]] || host._;\n\t\t}\n\t\telse if ( typeof renderer === 'string' ) {\n\t\t\t// Common renderer - if there is one available for this type use it,\n\t\t\t// otherwise use the default\n\t\t\treturn host[renderer] || host._;\n\t\t}\n\t\n\t\t// Use the default\n\t\treturn host._;\n\t}\n\t\n\t\n\t/**\n\t * Detect the data source being used for the table. Used to simplify the code\n\t * a little (ajax) and to make it compress a little smaller.\n\t *\n\t * @param {object} settings dataTables settings object\n\t * @returns {string} Data source\n\t * @memberof DataTable#oApi\n\t */\n\tfunction _fnDataSource ( settings )\n\t{\n\t\tif ( settings.oFeatures.bServerSide ) {\n\t\t\treturn 'ssp';\n\t\t}\n\t\telse if ( settings.ajax || settings.sAjaxSource ) {\n\t\t\treturn 'ajax';\n\t\t}\n\t\treturn 'dom';\n\t}\n\t\n\n\tDataTable = function( options )\n\t{\n\t\t/**\n\t\t * Perform a jQuery selector action on the table's TR elements (from the tbody) and\n\t\t * return the resulting jQuery object.\n\t\t * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on\n\t\t * @param {object} [oOpts] Optional parameters for modifying the rows to be included\n\t\t * @param {string} [oOpts.filter=none] Select TR elements that meet the current filter\n\t\t * criterion (\"applied\") or all TR elements (i.e. no filter).\n\t\t * @param {string} [oOpts.order=current] Order of the TR elements in the processed array.\n\t\t * Can be either 'current', whereby the current sorting of the table is used, or\n\t\t * 'original' whereby the original order the data was read into the table is used.\n\t\t * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page\n\t\t * (\"current\") or not (\"all\"). If 'current' is given, then order is assumed to be\n\t\t * 'current' and filter is 'applied', regardless of what they might be given as.\n\t\t * @returns {object} jQuery object, filtered by the given selector.\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Highlight every second row\n\t\t * oTable.$('tr:odd').css('backgroundColor', 'blue');\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Filter to rows with 'Webkit' in them, add a background colour and then\n\t\t * // remove the filter, thus highlighting the 'Webkit' rows only.\n\t\t * oTable.fnFilter('Webkit');\n\t\t * oTable.$('tr', {\"search\": \"applied\"}).css('backgroundColor', 'blue');\n\t\t * oTable.fnFilter('');\n\t\t * } );\n\t\t */\n\t\tthis.$ = function ( sSelector, oOpts )\n\t\t{\n\t\t\treturn this.api(true).$( sSelector, oOpts );\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Almost identical to $ in operation, but in this case returns the data for the matched\n\t\t * rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes\n\t\t * rather than any descendants, so the data can be obtained for the row/cell. If matching\n\t\t * rows are found, the data returned is the original data array/object that was used to\n\t\t * create the row (or a generated array if from a DOM source).\n\t\t *\n\t\t * This method is often useful in-combination with $ where both functions are given the\n\t\t * same parameters and the array indexes will match identically.\n\t\t * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on\n\t\t * @param {object} [oOpts] Optional parameters for modifying the rows to be included\n\t\t * @param {string} [oOpts.filter=none] Select elements that meet the current filter\n\t\t * criterion (\"applied\") or all elements (i.e. no filter).\n\t\t * @param {string} [oOpts.order=current] Order of the data in the processed array.\n\t\t * Can be either 'current', whereby the current sorting of the table is used, or\n\t\t * 'original' whereby the original order the data was read into the table is used.\n\t\t * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page\n\t\t * (\"current\") or not (\"all\"). If 'current' is given, then order is assumed to be\n\t\t * 'current' and filter is 'applied', regardless of what they might be given as.\n\t\t * @returns {array} Data for the matched elements. If any elements, as a result of the\n\t\t * selector, were not TR, TD or TH elements in the DataTable, they will have a null\n\t\t * entry in the array.\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Get the data from the first row in the table\n\t\t * var data = oTable._('tr:first');\n\t\t *\n\t\t * // Do something useful with the data\n\t\t * alert( \"First cell is: \"+data[0] );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Filter to 'Webkit' and get all data for\n\t\t * oTable.fnFilter('Webkit');\n\t\t * var data = oTable._('tr', {\"search\": \"applied\"});\n\t\t *\n\t\t * // Do something with the data\n\t\t * alert( data.length+\" rows matched the search\" );\n\t\t * } );\n\t\t */\n\t\tthis._ = function ( sSelector, oOpts )\n\t\t{\n\t\t\treturn this.api(true).rows( sSelector, oOpts ).data();\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Create a DataTables Api instance, with the currently selected tables for\n\t\t * the Api's context.\n\t\t * @param {boolean} [traditional=false] Set the API instance's context to be\n\t\t * only the table referred to by the `DataTable.ext.iApiIndex` option, as was\n\t\t * used in the API presented by DataTables 1.9- (i.e. the traditional mode),\n\t\t * or if all tables captured in the jQuery object should be used.\n\t\t * @return {DataTables.Api}\n\t\t */\n\t\tthis.api = function ( traditional )\n\t\t{\n\t\t\treturn traditional ?\n\t\t\t\tnew _Api(\n\t\t\t\t\t_fnSettingsFromNode( this[ _ext.iApiIndex ] )\n\t\t\t\t) :\n\t\t\t\tnew _Api( this );\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Add a single new row or multiple rows of data to the table. Please note\n\t\t * that this is suitable for client-side processing only - if you are using\n\t\t * server-side processing (i.e. \"bServerSide\": true), then to add data, you\n\t\t * must add it to the data source, i.e. the server-side, through an Ajax call.\n\t\t * @param {array|object} data The data to be added to the table. This can be:\n\t\t * <ul>\n\t\t * <li>1D array of data - add a single row with the data provided</li>\n\t\t * <li>2D array of arrays - add multiple rows in a single call</li>\n\t\t * <li>object - data object when using <i>mData</i></li>\n\t\t * <li>array of objects - multiple data objects when using <i>mData</i></li>\n\t\t * </ul>\n\t\t * @param {bool} [redraw=true] redraw the table or not\n\t\t * @returns {array} An array of integers, representing the list of indexes in\n\t\t * <i>aoData</i> ({@link DataTable.models.oSettings}) that have been added to\n\t\t * the table.\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * // Global var for counter\n\t\t * var giCount = 2;\n\t\t *\n\t\t * $(document).ready(function() {\n\t\t * $('#example').dataTable();\n\t\t * } );\n\t\t *\n\t\t * function fnClickAddRow() {\n\t\t * $('#example').dataTable().fnAddData( [\n\t\t * giCount+\".1\",\n\t\t * giCount+\".2\",\n\t\t * giCount+\".3\",\n\t\t * giCount+\".4\" ]\n\t\t * );\n\t\t *\n\t\t * giCount++;\n\t\t * }\n\t\t */\n\t\tthis.fnAddData = function( data, redraw )\n\t\t{\n\t\t\tvar api = this.api( true );\n\t\t\n\t\t\t/* Check if we want to add multiple rows or not */\n\t\t\tvar rows = $.isArray(data) && ( $.isArray(data[0]) || $.isPlainObject(data[0]) ) ?\n\t\t\t\tapi.rows.add( data ) :\n\t\t\t\tapi.row.add( data );\n\t\t\n\t\t\tif ( redraw === undefined || redraw ) {\n\t\t\t\tapi.draw();\n\t\t\t}\n\t\t\n\t\t\treturn rows.flatten().toArray();\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * This function will make DataTables recalculate the column sizes, based on the data\n\t\t * contained in the table and the sizes applied to the columns (in the DOM, CSS or\n\t\t * through the sWidth parameter). This can be useful when the width of the table's\n\t\t * parent element changes (for example a window resize).\n\t\t * @param {boolean} [bRedraw=true] Redraw the table or not, you will typically want to\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable( {\n\t\t * \"sScrollY\": \"200px\",\n\t\t * \"bPaginate\": false\n\t\t * } );\n\t\t *\n\t\t * $(window).bind('resize', function () {\n\t\t * oTable.fnAdjustColumnSizing();\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\tthis.fnAdjustColumnSizing = function ( bRedraw )\n\t\t{\n\t\t\tvar api = this.api( true ).columns.adjust();\n\t\t\tvar settings = api.settings()[0];\n\t\t\tvar scroll = settings.oScroll;\n\t\t\n\t\t\tif ( bRedraw === undefined || bRedraw ) {\n\t\t\t\tapi.draw( false );\n\t\t\t}\n\t\t\telse if ( scroll.sX !== \"\" || scroll.sY !== \"\" ) {\n\t\t\t\t/* If not redrawing, but scrolling, we want to apply the new column sizes anyway */\n\t\t\t\t_fnScrollDraw( settings );\n\t\t\t}\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Quickly and simply clear a table\n\t\t * @param {bool} [bRedraw=true] redraw the table or not\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Immediately 'nuke' the current rows (perhaps waiting for an Ajax callback...)\n\t\t * oTable.fnClearTable();\n\t\t * } );\n\t\t */\n\t\tthis.fnClearTable = function( bRedraw )\n\t\t{\n\t\t\tvar api = this.api( true ).clear();\n\t\t\n\t\t\tif ( bRedraw === undefined || bRedraw ) {\n\t\t\t\tapi.draw();\n\t\t\t}\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * The exact opposite of 'opening' a row, this function will close any rows which\n\t\t * are currently 'open'.\n\t\t * @param {node} nTr the table row to 'close'\n\t\t * @returns {int} 0 on success, or 1 if failed (can't find the row)\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable;\n\t\t *\n\t\t * // 'open' an information row when a row is clicked on\n\t\t * $('#example tbody tr').click( function () {\n\t\t * if ( oTable.fnIsOpen(this) ) {\n\t\t * oTable.fnClose( this );\n\t\t * } else {\n\t\t * oTable.fnOpen( this, \"Temporary row opened\", \"info_row\" );\n\t\t * }\n\t\t * } );\n\t\t *\n\t\t * oTable = $('#example').dataTable();\n\t\t * } );\n\t\t */\n\t\tthis.fnClose = function( nTr )\n\t\t{\n\t\t\tthis.api( true ).row( nTr ).child.hide();\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Remove a row for the table\n\t\t * @param {mixed} target The index of the row from aoData to be deleted, or\n\t\t * the TR element you want to delete\n\t\t * @param {function|null} [callBack] Callback function\n\t\t * @param {bool} [redraw=true] Redraw the table or not\n\t\t * @returns {array} The row that was deleted\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Immediately remove the first row\n\t\t * oTable.fnDeleteRow( 0 );\n\t\t * } );\n\t\t */\n\t\tthis.fnDeleteRow = function( target, callback, redraw )\n\t\t{\n\t\t\tvar api = this.api( true );\n\t\t\tvar rows = api.rows( target );\n\t\t\tvar settings = rows.settings()[0];\n\t\t\tvar data = settings.aoData[ rows[0][0] ];\n\t\t\n\t\t\trows.remove();\n\t\t\n\t\t\tif ( callback ) {\n\t\t\t\tcallback.call( this, settings, data );\n\t\t\t}\n\t\t\n\t\t\tif ( redraw === undefined || redraw ) {\n\t\t\t\tapi.draw();\n\t\t\t}\n\t\t\n\t\t\treturn data;\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Restore the table to it's original state in the DOM by removing all of DataTables\n\t\t * enhancements, alterations to the DOM structure of the table and event listeners.\n\t\t * @param {boolean} [remove=false] Completely remove the table from the DOM\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * // This example is fairly pointless in reality, but shows how fnDestroy can be used\n\t\t * var oTable = $('#example').dataTable();\n\t\t * oTable.fnDestroy();\n\t\t * } );\n\t\t */\n\t\tthis.fnDestroy = function ( remove )\n\t\t{\n\t\t\tthis.api( true ).destroy( remove );\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Redraw the table\n\t\t * @param {bool} [complete=true] Re-filter and resort (if enabled) the table before the draw.\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Re-draw the table - you wouldn't want to do it here, but it's an example :-)\n\t\t * oTable.fnDraw();\n\t\t * } );\n\t\t */\n\t\tthis.fnDraw = function( complete )\n\t\t{\n\t\t\t// Note that this isn't an exact match to the old call to _fnDraw - it takes\n\t\t\t// into account the new data, but can hold position.\n\t\t\tthis.api( true ).draw( complete );\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Filter the input based on data\n\t\t * @param {string} sInput String to filter the table on\n\t\t * @param {int|null} [iColumn] Column to limit filtering to\n\t\t * @param {bool} [bRegex=false] Treat as regular expression or not\n\t\t * @param {bool} [bSmart=true] Perform smart filtering or not\n\t\t * @param {bool} [bShowGlobal=true] Show the input global filter in it's input box(es)\n\t\t * @param {bool} [bCaseInsensitive=true] Do case-insensitive matching (true) or not (false)\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Sometime later - filter...\n\t\t * oTable.fnFilter( 'test string' );\n\t\t * } );\n\t\t */\n\t\tthis.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseInsensitive )\n\t\t{\n\t\t\tvar api = this.api( true );\n\t\t\n\t\t\tif ( iColumn === null || iColumn === undefined ) {\n\t\t\t\tapi.search( sInput, bRegex, bSmart, bCaseInsensitive );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tapi.column( iColumn ).search( sInput, bRegex, bSmart, bCaseInsensitive );\n\t\t\t}\n\t\t\n\t\t\tapi.draw();\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Get the data for the whole table, an individual row or an individual cell based on the\n\t\t * provided parameters.\n\t\t * @param {int|node} [src] A TR row node, TD/TH cell node or an integer. If given as\n\t\t * a TR node then the data source for the whole row will be returned. If given as a\n\t\t * TD/TH cell node then iCol will be automatically calculated and the data for the\n\t\t * cell returned. If given as an integer, then this is treated as the aoData internal\n\t\t * data index for the row (see fnGetPosition) and the data for that row used.\n\t\t * @param {int} [col] Optional column index that you want the data of.\n\t\t * @returns {array|object|string} If mRow is undefined, then the data for all rows is\n\t\t * returned. If mRow is defined, just data for that row, and is iCol is\n\t\t * defined, only data for the designated cell is returned.\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * // Row data\n\t\t * $(document).ready(function() {\n\t\t * oTable = $('#example').dataTable();\n\t\t *\n\t\t * oTable.$('tr').click( function () {\n\t\t * var data = oTable.fnGetData( this );\n\t\t * // ... do something with the array / object of data for the row\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Individual cell data\n\t\t * $(document).ready(function() {\n\t\t * oTable = $('#example').dataTable();\n\t\t *\n\t\t * oTable.$('td').click( function () {\n\t\t * var sData = oTable.fnGetData( this );\n\t\t * alert( 'The cell clicked on had the value of '+sData );\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\tthis.fnGetData = function( src, col )\n\t\t{\n\t\t\tvar api = this.api( true );\n\t\t\n\t\t\tif ( src !== undefined ) {\n\t\t\t\tvar type = src.nodeName ? src.nodeName.toLowerCase() : '';\n\t\t\n\t\t\t\treturn col !== undefined || type == 'td' || type == 'th' ?\n\t\t\t\t\tapi.cell( src, col ).data() :\n\t\t\t\t\tapi.row( src ).data() || null;\n\t\t\t}\n\t\t\n\t\t\treturn api.data().toArray();\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Get an array of the TR nodes that are used in the table's body. Note that you will\n\t\t * typically want to use the '$' API method in preference to this as it is more\n\t\t * flexible.\n\t\t * @param {int} [iRow] Optional row index for the TR element you want\n\t\t * @returns {array|node} If iRow is undefined, returns an array of all TR elements\n\t\t * in the table's body, or iRow is defined, just the TR element requested.\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Get the nodes from the table\n\t\t * var nNodes = oTable.fnGetNodes( );\n\t\t * } );\n\t\t */\n\t\tthis.fnGetNodes = function( iRow )\n\t\t{\n\t\t\tvar api = this.api( true );\n\t\t\n\t\t\treturn iRow !== undefined ?\n\t\t\t\tapi.row( iRow ).node() :\n\t\t\t\tapi.rows().nodes().flatten().toArray();\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Get the array indexes of a particular cell from it's DOM element\n\t\t * and column index including hidden columns\n\t\t * @param {node} node this can either be a TR, TD or TH in the table's body\n\t\t * @returns {int} If nNode is given as a TR, then a single index is returned, or\n\t\t * if given as a cell, an array of [row index, column index (visible),\n\t\t * column index (all)] is given.\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * $('#example tbody td').click( function () {\n\t\t * // Get the position of the current data from the node\n\t\t * var aPos = oTable.fnGetPosition( this );\n\t\t *\n\t\t * // Get the data array for this row\n\t\t * var aData = oTable.fnGetData( aPos[0] );\n\t\t *\n\t\t * // Update the data array and return the value\n\t\t * aData[ aPos[1] ] = 'clicked';\n\t\t * this.innerHTML = 'clicked';\n\t\t * } );\n\t\t *\n\t\t * // Init DataTables\n\t\t * oTable = $('#example').dataTable();\n\t\t * } );\n\t\t */\n\t\tthis.fnGetPosition = function( node )\n\t\t{\n\t\t\tvar api = this.api( true );\n\t\t\tvar nodeName = node.nodeName.toUpperCase();\n\t\t\n\t\t\tif ( nodeName == 'TR' ) {\n\t\t\t\treturn api.row( node ).index();\n\t\t\t}\n\t\t\telse if ( nodeName == 'TD' || nodeName == 'TH' ) {\n\t\t\t\tvar cell = api.cell( node ).index();\n\t\t\n\t\t\t\treturn [\n\t\t\t\t\tcell.row,\n\t\t\t\t\tcell.columnVisible,\n\t\t\t\t\tcell.column\n\t\t\t\t];\n\t\t\t}\n\t\t\treturn null;\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Check to see if a row is 'open' or not.\n\t\t * @param {node} nTr the table row to check\n\t\t * @returns {boolean} true if the row is currently open, false otherwise\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable;\n\t\t *\n\t\t * // 'open' an information row when a row is clicked on\n\t\t * $('#example tbody tr').click( function () {\n\t\t * if ( oTable.fnIsOpen(this) ) {\n\t\t * oTable.fnClose( this );\n\t\t * } else {\n\t\t * oTable.fnOpen( this, \"Temporary row opened\", \"info_row\" );\n\t\t * }\n\t\t * } );\n\t\t *\n\t\t * oTable = $('#example').dataTable();\n\t\t * } );\n\t\t */\n\t\tthis.fnIsOpen = function( nTr )\n\t\t{\n\t\t\treturn this.api( true ).row( nTr ).child.isShown();\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * This function will place a new row directly after a row which is currently\n\t\t * on display on the page, with the HTML contents that is passed into the\n\t\t * function. This can be used, for example, to ask for confirmation that a\n\t\t * particular record should be deleted.\n\t\t * @param {node} nTr The table row to 'open'\n\t\t * @param {string|node|jQuery} mHtml The HTML to put into the row\n\t\t * @param {string} sClass Class to give the new TD cell\n\t\t * @returns {node} The row opened. Note that if the table row passed in as the\n\t\t * first parameter, is not found in the table, this method will silently\n\t\t * return.\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable;\n\t\t *\n\t\t * // 'open' an information row when a row is clicked on\n\t\t * $('#example tbody tr').click( function () {\n\t\t * if ( oTable.fnIsOpen(this) ) {\n\t\t * oTable.fnClose( this );\n\t\t * } else {\n\t\t * oTable.fnOpen( this, \"Temporary row opened\", \"info_row\" );\n\t\t * }\n\t\t * } );\n\t\t *\n\t\t * oTable = $('#example').dataTable();\n\t\t * } );\n\t\t */\n\t\tthis.fnOpen = function( nTr, mHtml, sClass )\n\t\t{\n\t\t\treturn this.api( true )\n\t\t\t\t.row( nTr )\n\t\t\t\t.child( mHtml, sClass )\n\t\t\t\t.show()\n\t\t\t\t.child()[0];\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Change the pagination - provides the internal logic for pagination in a simple API\n\t\t * function. With this function you can have a DataTables table go to the next,\n\t\t * previous, first or last pages.\n\t\t * @param {string|int} mAction Paging action to take: \"first\", \"previous\", \"next\" or \"last\"\n\t\t * or page number to jump to (integer), note that page 0 is the first page.\n\t\t * @param {bool} [bRedraw=true] Redraw the table or not\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t * oTable.fnPageChange( 'next' );\n\t\t * } );\n\t\t */\n\t\tthis.fnPageChange = function ( mAction, bRedraw )\n\t\t{\n\t\t\tvar api = this.api( true ).page( mAction );\n\t\t\n\t\t\tif ( bRedraw === undefined || bRedraw ) {\n\t\t\t\tapi.draw(false);\n\t\t\t}\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Show a particular column\n\t\t * @param {int} iCol The column whose display should be changed\n\t\t * @param {bool} bShow Show (true) or hide (false) the column\n\t\t * @param {bool} [bRedraw=true] Redraw the table or not\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Hide the second column after initialisation\n\t\t * oTable.fnSetColumnVis( 1, false );\n\t\t * } );\n\t\t */\n\t\tthis.fnSetColumnVis = function ( iCol, bShow, bRedraw )\n\t\t{\n\t\t\tvar api = this.api( true ).column( iCol ).visible( bShow );\n\t\t\n\t\t\tif ( bRedraw === undefined || bRedraw ) {\n\t\t\t\tapi.columns.adjust().draw();\n\t\t\t}\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Get the settings for a particular table for external manipulation\n\t\t * @returns {object} DataTables settings object. See\n\t\t * {@link DataTable.models.oSettings}\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t * var oSettings = oTable.fnSettings();\n\t\t *\n\t\t * // Show an example parameter from the settings\n\t\t * alert( oSettings._iDisplayStart );\n\t\t * } );\n\t\t */\n\t\tthis.fnSettings = function()\n\t\t{\n\t\t\treturn _fnSettingsFromNode( this[_ext.iApiIndex] );\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Sort the table by a particular column\n\t\t * @param {int} iCol the data index to sort on. Note that this will not match the\n\t\t * 'display index' if you have hidden data entries\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Sort immediately with columns 0 and 1\n\t\t * oTable.fnSort( [ [0,'asc'], [1,'asc'] ] );\n\t\t * } );\n\t\t */\n\t\tthis.fnSort = function( aaSort )\n\t\t{\n\t\t\tthis.api( true ).order( aaSort ).draw();\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Attach a sort listener to an element for a given column\n\t\t * @param {node} nNode the element to attach the sort listener to\n\t\t * @param {int} iColumn the column that a click on this node will sort on\n\t\t * @param {function} [fnCallback] callback function when sort is run\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t *\n\t\t * // Sort on column 1, when 'sorter' is clicked on\n\t\t * oTable.fnSortListener( document.getElementById('sorter'), 1 );\n\t\t * } );\n\t\t */\n\t\tthis.fnSortListener = function( nNode, iColumn, fnCallback )\n\t\t{\n\t\t\tthis.api( true ).order.listener( nNode, iColumn, fnCallback );\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Update a table cell or row - this method will accept either a single value to\n\t\t * update the cell with, an array of values with one element for each column or\n\t\t * an object in the same format as the original data source. The function is\n\t\t * self-referencing in order to make the multi column updates easier.\n\t\t * @param {object|array|string} mData Data to update the cell/row with\n\t\t * @param {node|int} mRow TR element you want to update or the aoData index\n\t\t * @param {int} [iColumn] The column to update, give as null or undefined to\n\t\t * update a whole row.\n\t\t * @param {bool} [bRedraw=true] Redraw the table or not\n\t\t * @param {bool} [bAction=true] Perform pre-draw actions or not\n\t\t * @returns {int} 0 on success, 1 on error\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t * oTable.fnUpdate( 'Example update', 0, 0 ); // Single cell\n\t\t * oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], $('tbody tr')[0] ); // Row\n\t\t * } );\n\t\t */\n\t\tthis.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )\n\t\t{\n\t\t\tvar api = this.api( true );\n\t\t\n\t\t\tif ( iColumn === undefined || iColumn === null ) {\n\t\t\t\tapi.row( mRow ).data( mData );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tapi.cell( mRow, iColumn ).data( mData );\n\t\t\t}\n\t\t\n\t\t\tif ( bAction === undefined || bAction ) {\n\t\t\t\tapi.columns.adjust();\n\t\t\t}\n\t\t\n\t\t\tif ( bRedraw === undefined || bRedraw ) {\n\t\t\t\tapi.draw();\n\t\t\t}\n\t\t\treturn 0;\n\t\t};\n\t\t\n\t\t\n\t\t/**\n\t\t * Provide a common method for plug-ins to check the version of DataTables being used, in order\n\t\t * to ensure compatibility.\n\t\t * @param {string} sVersion Version string to check for, in the format \"X.Y.Z\". Note that the\n\t\t * formats \"X\" and \"X.Y\" are also acceptable.\n\t\t * @returns {boolean} true if this version of DataTables is greater or equal to the required\n\t\t * version, or false if this version of DataTales is not suitable\n\t\t * @method\n\t\t * @dtopt API\n\t\t * @deprecated Since v1.10\n\t\t *\n\t\t * @example\n\t\t * $(document).ready(function() {\n\t\t * var oTable = $('#example').dataTable();\n\t\t * alert( oTable.fnVersionCheck( '1.9.0' ) );\n\t\t * } );\n\t\t */\n\t\tthis.fnVersionCheck = _ext.fnVersionCheck;\n\t\t\n\n\t\tvar _that = this;\n\t\tvar emptyInit = options === undefined;\n\t\tvar len = this.length;\n\n\t\tif ( emptyInit ) {\n\t\t\toptions = {};\n\t\t}\n\n\t\tthis.oApi = this.internal = _ext.internal;\n\n\t\t// Extend with old style plug-in API methods\n\t\tfor ( var fn in DataTable.ext.internal ) {\n\t\t\tif ( fn ) {\n\t\t\t\tthis[fn] = _fnExternApiFunc(fn);\n\t\t\t}\n\t\t}\n\n\t\tthis.each(function() {\n\t\t\t// For each initialisation we want to give it a clean initialisation\n\t\t\t// object that can be bashed around\n\t\t\tvar o = {};\n\t\t\tvar oInit = len > 1 ? // optimisation for single table case\n\t\t\t\t_fnExtend( o, options, true ) :\n\t\t\t\toptions;\n\n\t\t\t/*global oInit,_that,emptyInit*/\n\t\t\tvar i=0, iLen, j, jLen, k, kLen;\n\t\t\tvar sId = this.getAttribute( 'id' );\n\t\t\tvar bInitHandedOff = false;\n\t\t\tvar defaults = DataTable.defaults;\n\t\t\tvar $this = $(this);\n\t\t\t\n\t\t\t\n\t\t\t/* Sanity check */\n\t\t\tif ( this.nodeName.toLowerCase() != 'table' )\n\t\t\t{\n\t\t\t\t_fnLog( null, 0, 'Non-table node initialisation ('+this.nodeName+')', 2 );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* Backwards compatibility for the defaults */\n\t\t\t_fnCompatOpts( defaults );\n\t\t\t_fnCompatCols( defaults.column );\n\t\t\t\n\t\t\t/* Convert the camel-case defaults to Hungarian */\n\t\t\t_fnCamelToHungarian( defaults, defaults, true );\n\t\t\t_fnCamelToHungarian( defaults.column, defaults.column, true );\n\t\t\t\n\t\t\t/* Setting up the initialisation object */\n\t\t\t_fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ) );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t/* Check to see if we are re-initialising a table */\n\t\t\tvar allSettings = DataTable.settings;\n\t\t\tfor ( i=0, iLen=allSettings.length ; i<iLen ; i++ )\n\t\t\t{\n\t\t\t\tvar s = allSettings[i];\n\t\t\t\n\t\t\t\t/* Base check on table node */\n\t\t\t\tif ( s.nTable == this || s.nTHead.parentNode == this || (s.nTFoot && s.nTFoot.parentNode == this) )\n\t\t\t\t{\n\t\t\t\t\tvar bRetrieve = oInit.bRetrieve !== undefined ? oInit.bRetrieve : defaults.bRetrieve;\n\t\t\t\t\tvar bDestroy = oInit.bDestroy !== undefined ? oInit.bDestroy : defaults.bDestroy;\n\t\t\t\n\t\t\t\t\tif ( emptyInit || bRetrieve )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn s.oInstance;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( bDestroy )\n\t\t\t\t\t{\n\t\t\t\t\t\ts.oInstance.fnDestroy();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t_fnLog( s, 0, 'Cannot reinitialise DataTable', 3 );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\t/* If the element we are initialising has the same ID as a table which was previously\n\t\t\t\t * initialised, but the table nodes don't match (from before) then we destroy the old\n\t\t\t\t * instance by simply deleting it. This is under the assumption that the table has been\n\t\t\t\t * destroyed by other methods. Anyone using non-id selectors will need to do this manually\n\t\t\t\t */\n\t\t\t\tif ( s.sTableId == this.id )\n\t\t\t\t{\n\t\t\t\t\tallSettings.splice( i, 1 );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Ensure the table has an ID - required for accessibility */\n\t\t\tif ( sId === null || sId === \"\" )\n\t\t\t{\n\t\t\t\tsId = \"DataTables_Table_\"+(DataTable.ext._unique++);\n\t\t\t\tthis.id = sId;\n\t\t\t}\n\t\t\t\n\t\t\t/* Create the settings object for this table and set some of the default parameters */\n\t\t\tvar oSettings = $.extend( true, {}, DataTable.models.oSettings, {\n\t\t\t\t\"sDestroyWidth\": $this[0].style.width,\n\t\t\t\t\"sInstance\": sId,\n\t\t\t\t\"sTableId\": sId\n\t\t\t} );\n\t\t\toSettings.nTable = this;\n\t\t\toSettings.oApi = _that.internal;\n\t\t\toSettings.oInit = oInit;\n\t\t\t\n\t\t\tallSettings.push( oSettings );\n\t\t\t\n\t\t\t// Need to add the instance after the instance after the settings object has been added\n\t\t\t// to the settings array, so we can self reference the table instance if more than one\n\t\t\toSettings.oInstance = (_that.length===1) ? _that : $this.dataTable();\n\t\t\t\n\t\t\t// Backwards compatibility, before we apply all the defaults\n\t\t\t_fnCompatOpts( oInit );\n\t\t\t\n\t\t\tif ( oInit.oLanguage )\n\t\t\t{\n\t\t\t\t_fnLanguageCompat( oInit.oLanguage );\n\t\t\t}\n\t\t\t\n\t\t\t// If the length menu is given, but the init display length is not, use the length menu\n\t\t\tif ( oInit.aLengthMenu && ! oInit.iDisplayLength )\n\t\t\t{\n\t\t\t\toInit.iDisplayLength = $.isArray( oInit.aLengthMenu[0] ) ?\n\t\t\t\t\toInit.aLengthMenu[0][0] : oInit.aLengthMenu[0];\n\t\t\t}\n\t\t\t\n\t\t\t// Apply the defaults and init options to make a single init object will all\n\t\t\t// options defined from defaults and instance options.\n\t\t\toInit = _fnExtend( $.extend( true, {}, defaults ), oInit );\n\t\t\t\n\t\t\t\n\t\t\t// Map the initialisation options onto the settings object\n\t\t\t_fnMap( oSettings.oFeatures, oInit, [\n\t\t\t\t\"bPaginate\",\n\t\t\t\t\"bLengthChange\",\n\t\t\t\t\"bFilter\",\n\t\t\t\t\"bSort\",\n\t\t\t\t\"bSortMulti\",\n\t\t\t\t\"bInfo\",\n\t\t\t\t\"bProcessing\",\n\t\t\t\t\"bAutoWidth\",\n\t\t\t\t\"bSortClasses\",\n\t\t\t\t\"bServerSide\",\n\t\t\t\t\"bDeferRender\"\n\t\t\t] );\n\t\t\t_fnMap( oSettings, oInit, [\n\t\t\t\t\"asStripeClasses\",\n\t\t\t\t\"ajax\",\n\t\t\t\t\"fnServerData\",\n\t\t\t\t\"fnFormatNumber\",\n\t\t\t\t\"sServerMethod\",\n\t\t\t\t\"aaSorting\",\n\t\t\t\t\"aaSortingFixed\",\n\t\t\t\t\"aLengthMenu\",\n\t\t\t\t\"sPaginationType\",\n\t\t\t\t\"sAjaxSource\",\n\t\t\t\t\"sAjaxDataProp\",\n\t\t\t\t\"iStateDuration\",\n\t\t\t\t\"sDom\",\n\t\t\t\t\"bSortCellsTop\",\n\t\t\t\t\"iTabIndex\",\n\t\t\t\t\"fnStateLoadCallback\",\n\t\t\t\t\"fnStateSaveCallback\",\n\t\t\t\t\"renderer\",\n\t\t\t\t\"searchDelay\",\n\t\t\t\t\"rowId\",\n\t\t\t\t[ \"iCookieDuration\", \"iStateDuration\" ], // backwards compat\n\t\t\t\t[ \"oSearch\", \"oPreviousSearch\" ],\n\t\t\t\t[ \"aoSearchCols\", \"aoPreSearchCols\" ],\n\t\t\t\t[ \"iDisplayLength\", \"_iDisplayLength\" ],\n\t\t\t\t[ \"bJQueryUI\", \"bJUI\" ]\n\t\t\t] );\n\t\t\t_fnMap( oSettings.oScroll, oInit, [\n\t\t\t\t[ \"sScrollX\", \"sX\" ],\n\t\t\t\t[ \"sScrollXInner\", \"sXInner\" ],\n\t\t\t\t[ \"sScrollY\", \"sY\" ],\n\t\t\t\t[ \"bScrollCollapse\", \"bCollapse\" ]\n\t\t\t] );\n\t\t\t_fnMap( oSettings.oLanguage, oInit, \"fnInfoCallback\" );\n\t\t\t\n\t\t\t/* Callback functions which are array driven */\n\t\t\t_fnCallbackReg( oSettings, 'aoDrawCallback', oInit.fnDrawCallback, 'user' );\n\t\t\t_fnCallbackReg( oSettings, 'aoServerParams', oInit.fnServerParams, 'user' );\n\t\t\t_fnCallbackReg( oSettings, 'aoStateSaveParams', oInit.fnStateSaveParams, 'user' );\n\t\t\t_fnCallbackReg( oSettings, 'aoStateLoadParams', oInit.fnStateLoadParams, 'user' );\n\t\t\t_fnCallbackReg( oSettings, 'aoStateLoaded', oInit.fnStateLoaded, 'user' );\n\t\t\t_fnCallbackReg( oSettings, 'aoRowCallback', oInit.fnRowCallback, 'user' );\n\t\t\t_fnCallbackReg( oSettings, 'aoRowCreatedCallback', oInit.fnCreatedRow, 'user' );\n\t\t\t_fnCallbackReg( oSettings, 'aoHeaderCallback', oInit.fnHeaderCallback, 'user' );\n\t\t\t_fnCallbackReg( oSettings, 'aoFooterCallback', oInit.fnFooterCallback, 'user' );\n\t\t\t_fnCallbackReg( oSettings, 'aoInitComplete', oInit.fnInitComplete, 'user' );\n\t\t\t_fnCallbackReg( oSettings, 'aoPreDrawCallback', oInit.fnPreDrawCallback, 'user' );\n\t\t\t\n\t\t\toSettings.rowIdFn = _fnGetObjectDataFn( oInit.rowId );\n\t\t\t\n\t\t\t/* Browser support detection */\n\t\t\t_fnBrowserDetect( oSettings );\n\t\t\t\n\t\t\tvar oClasses = oSettings.oClasses;\n\t\t\t\n\t\t\t// @todo Remove in 1.11\n\t\t\tif ( oInit.bJQueryUI )\n\t\t\t{\n\t\t\t\t/* Use the JUI classes object for display. You could clone the oStdClasses object if\n\t\t\t\t * you want to have multiple tables with multiple independent classes\n\t\t\t\t */\n\t\t\t\t$.extend( oClasses, DataTable.ext.oJUIClasses, oInit.oClasses );\n\t\t\t\n\t\t\t\tif ( oInit.sDom === defaults.sDom && defaults.sDom === \"lfrtip\" )\n\t\t\t\t{\n\t\t\t\t\t/* Set the DOM to use a layout suitable for jQuery UI's theming */\n\t\t\t\t\toSettings.sDom = '<\"H\"lfr>t<\"F\"ip>';\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif ( ! oSettings.renderer ) {\n\t\t\t\t\toSettings.renderer = 'jqueryui';\n\t\t\t\t}\n\t\t\t\telse if ( $.isPlainObject( oSettings.renderer ) && ! oSettings.renderer.header ) {\n\t\t\t\t\toSettings.renderer.header = 'jqueryui';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$.extend( oClasses, DataTable.ext.classes, oInit.oClasses );\n\t\t\t}\n\t\t\t$this.addClass( oClasses.sTable );\n\t\t\t\n\t\t\t\n\t\t\tif ( oSettings.iInitDisplayStart === undefined )\n\t\t\t{\n\t\t\t\t/* Display start point, taking into account the save saving */\n\t\t\t\toSettings.iInitDisplayStart = oInit.iDisplayStart;\n\t\t\t\toSettings._iDisplayStart = oInit.iDisplayStart;\n\t\t\t}\n\t\t\t\n\t\t\tif ( oInit.iDeferLoading !== null )\n\t\t\t{\n\t\t\t\toSettings.bDeferLoading = true;\n\t\t\t\tvar tmp = $.isArray( oInit.iDeferLoading );\n\t\t\t\toSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading;\n\t\t\t\toSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading;\n\t\t\t}\n\t\t\t\n\t\t\t/* Language definitions */\n\t\t\tvar oLanguage = oSettings.oLanguage;\n\t\t\t$.extend( true, oLanguage, oInit.oLanguage );\n\t\t\t\n\t\t\tif ( oLanguage.sUrl !== \"\" )\n\t\t\t{\n\t\t\t\t/* Get the language definitions from a file - because this Ajax call makes the language\n\t\t\t\t * get async to the remainder of this function we use bInitHandedOff to indicate that\n\t\t\t\t * _fnInitialise will be fired by the returned Ajax handler, rather than the constructor\n\t\t\t\t */\n\t\t\t\t$.ajax( {\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\turl: oLanguage.sUrl,\n\t\t\t\t\tsuccess: function ( json ) {\n\t\t\t\t\t\t_fnLanguageCompat( json );\n\t\t\t\t\t\t_fnCamelToHungarian( defaults.oLanguage, json );\n\t\t\t\t\t\t$.extend( true, oLanguage, json );\n\t\t\t\t\t\t_fnInitialise( oSettings );\n\t\t\t\t\t},\n\t\t\t\t\terror: function () {\n\t\t\t\t\t\t// Error occurred loading language file, continue on as best we can\n\t\t\t\t\t\t_fnInitialise( oSettings );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tbInitHandedOff = true;\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Stripes\n\t\t\t */\n\t\t\tif ( oInit.asStripeClasses === null )\n\t\t\t{\n\t\t\t\toSettings.asStripeClasses =[\n\t\t\t\t\toClasses.sStripeOdd,\n\t\t\t\t\toClasses.sStripeEven\n\t\t\t\t];\n\t\t\t}\n\t\t\t\n\t\t\t/* Remove row stripe classes if they are already on the table row */\n\t\t\tvar stripeClasses = oSettings.asStripeClasses;\n\t\t\tvar rowOne = $this.children('tbody').find('tr').eq(0);\n\t\t\tif ( $.inArray( true, $.map( stripeClasses, function(el, i) {\n\t\t\t\treturn rowOne.hasClass(el);\n\t\t\t} ) ) !== -1 ) {\n\t\t\t\t$('tbody tr', this).removeClass( stripeClasses.join(' ') );\n\t\t\t\toSettings.asDestroyStripes = stripeClasses.slice();\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Columns\n\t\t\t * See if we should load columns automatically or use defined ones\n\t\t\t */\n\t\t\tvar anThs = [];\n\t\t\tvar aoColumnsInit;\n\t\t\tvar nThead = this.getElementsByTagName('thead');\n\t\t\tif ( nThead.length !== 0 )\n\t\t\t{\n\t\t\t\t_fnDetectHeader( oSettings.aoHeader, nThead[0] );\n\t\t\t\tanThs = _fnGetUniqueThs( oSettings );\n\t\t\t}\n\t\t\t\n\t\t\t/* If not given a column array, generate one with nulls */\n\t\t\tif ( oInit.aoColumns === null )\n\t\t\t{\n\t\t\t\taoColumnsInit = [];\n\t\t\t\tfor ( i=0, iLen=anThs.length ; i<iLen ; i++ )\n\t\t\t\t{\n\t\t\t\t\taoColumnsInit.push( null );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\taoColumnsInit = oInit.aoColumns;\n\t\t\t}\n\t\t\t\n\t\t\t/* Add the columns */\n\t\t\tfor ( i=0, iLen=aoColumnsInit.length ; i<iLen ; i++ )\n\t\t\t{\n\t\t\t\t_fnAddColumn( oSettings, anThs ? anThs[i] : null );\n\t\t\t}\n\t\t\t\n\t\t\t/* Apply the column definitions */\n\t\t\t_fnApplyColumnDefs( oSettings, oInit.aoColumnDefs, aoColumnsInit, function (iCol, oDef) {\n\t\t\t\t_fnColumnOptions( oSettings, iCol, oDef );\n\t\t\t} );\n\t\t\t\n\t\t\t/* HTML5 attribute detection - build an mData object automatically if the\n\t\t\t * attributes are found\n\t\t\t */\n\t\t\tif ( rowOne.length ) {\n\t\t\t\tvar a = function ( cell, name ) {\n\t\t\t\t\treturn cell.getAttribute( 'data-'+name ) !== null ? name : null;\n\t\t\t\t};\n\t\t\t\n\t\t\t\t$( rowOne[0] ).children('th, td').each( function (i, cell) {\n\t\t\t\t\tvar col = oSettings.aoColumns[i];\n\t\t\t\n\t\t\t\t\tif ( col.mData === i ) {\n\t\t\t\t\t\tvar sort = a( cell, 'sort' ) || a( cell, 'order' );\n\t\t\t\t\t\tvar filter = a( cell, 'filter' ) || a( cell, 'search' );\n\t\t\t\n\t\t\t\t\t\tif ( sort !== null || filter !== null ) {\n\t\t\t\t\t\t\tcol.mData = {\n\t\t\t\t\t\t\t\t_: i+'.display',\n\t\t\t\t\t\t\t\tsort: sort !== null ? i+'.@data-'+sort : undefined,\n\t\t\t\t\t\t\t\ttype: sort !== null ? i+'.@data-'+sort : undefined,\n\t\t\t\t\t\t\t\tfilter: filter !== null ? i+'.@data-'+filter : undefined\n\t\t\t\t\t\t\t};\n\t\t\t\n\t\t\t\t\t\t\t_fnColumnOptions( oSettings, i );\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\n\t\t\tvar features = oSettings.oFeatures;\n\t\t\t\n\t\t\t/* Must be done after everything which can be overridden by the state saving! */\n\t\t\tif ( oInit.bStateSave )\n\t\t\t{\n\t\t\t\tfeatures.bStateSave = true;\n\t\t\t\t_fnLoadState( oSettings, oInit );\n\t\t\t\t_fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState, 'state_save' );\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Sorting\n\t\t\t * @todo For modularisation (1.11) this needs to do into a sort start up handler\n\t\t\t */\n\t\t\t\n\t\t\t// If aaSorting is not defined, then we use the first indicator in asSorting\n\t\t\t// in case that has been altered, so the default sort reflects that option\n\t\t\tif ( oInit.aaSorting === undefined )\n\t\t\t{\n\t\t\t\tvar sorting = oSettings.aaSorting;\n\t\t\t\tfor ( i=0, iLen=sorting.length ; i<iLen ; i++ )\n\t\t\t\t{\n\t\t\t\t\tsorting[i][1] = oSettings.aoColumns[ i ].asSorting[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Do a first pass on the sorting classes (allows any size changes to be taken into\n\t\t\t * account, and also will apply sorting disabled classes if disabled\n\t\t\t */\n\t\t\t_fnSortingClasses( oSettings );\n\t\t\t\n\t\t\tif ( features.bSort )\n\t\t\t{\n\t\t\t\t_fnCallbackReg( oSettings, 'aoDrawCallback', function () {\n\t\t\t\t\tif ( oSettings.bSorted ) {\n\t\t\t\t\t\tvar aSort = _fnSortFlatten( oSettings );\n\t\t\t\t\t\tvar sortedColumns = {};\n\t\t\t\n\t\t\t\t\t\t$.each( aSort, function (i, val) {\n\t\t\t\t\t\t\tsortedColumns[ val.src ] = val.dir;\n\t\t\t\t\t\t} );\n\t\t\t\n\t\t\t\t\t\t_fnCallbackFire( oSettings, null, 'order', [oSettings, aSort, sortedColumns] );\n\t\t\t\t\t\t_fnSortAria( oSettings );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t\t\n\t\t\t_fnCallbackReg( oSettings, 'aoDrawCallback', function () {\n\t\t\t\tif ( oSettings.bSorted || _fnDataSource( oSettings ) === 'ssp' || features.bDeferRender ) {\n\t\t\t\t\t_fnSortingClasses( oSettings );\n\t\t\t\t}\n\t\t\t}, 'sc' );\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Final init\n\t\t\t * Cache the header, body and footer as required, creating them if needed\n\t\t\t */\n\t\t\t\n\t\t\t// Work around for Webkit bug 83867 - store the caption-side before removing from doc\n\t\t\tvar captions = $this.children('caption').each( function () {\n\t\t\t\tthis._captionSide = $this.css('caption-side');\n\t\t\t} );\n\t\t\t\n\t\t\tvar thead = $this.children('thead');\n\t\t\tif ( thead.length === 0 )\n\t\t\t{\n\t\t\t\tthead = $('<thead/>').appendTo(this);\n\t\t\t}\n\t\t\toSettings.nTHead = thead[0];\n\t\t\t\n\t\t\tvar tbody = $this.children('tbody');\n\t\t\tif ( tbody.length === 0 )\n\t\t\t{\n\t\t\t\ttbody = $('<tbody/>').appendTo(this);\n\t\t\t}\n\t\t\toSettings.nTBody = tbody[0];\n\t\t\t\n\t\t\tvar tfoot = $this.children('tfoot');\n\t\t\tif ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== \"\" || oSettings.oScroll.sY !== \"\") )\n\t\t\t{\n\t\t\t\t// If we are a scrolling table, and no footer has been given, then we need to create\n\t\t\t\t// a tfoot element for the caption element to be appended to\n\t\t\t\ttfoot = $('<tfoot/>').appendTo(this);\n\t\t\t}\n\t\t\t\n\t\t\tif ( tfoot.length === 0 || tfoot.children().length === 0 ) {\n\t\t\t\t$this.addClass( oClasses.sNoFooter );\n\t\t\t}\n\t\t\telse if ( tfoot.length > 0 ) {\n\t\t\t\toSettings.nTFoot = tfoot[0];\n\t\t\t\t_fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot );\n\t\t\t}\n\t\t\t\n\t\t\t/* Check if there is data passing into the constructor */\n\t\t\tif ( oInit.aaData )\n\t\t\t{\n\t\t\t\tfor ( i=0 ; i<oInit.aaData.length ; i++ )\n\t\t\t\t{\n\t\t\t\t\t_fnAddData( oSettings, oInit.aaData[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( oSettings.bDeferLoading || _fnDataSource( oSettings ) == 'dom' )\n\t\t\t{\n\t\t\t\t/* Grab the data from the page - only do this when deferred loading or no Ajax\n\t\t\t\t * source since there is no point in reading the DOM data if we are then going\n\t\t\t\t * to replace it with Ajax data\n\t\t\t\t */\n\t\t\t\t_fnAddTr( oSettings, $(oSettings.nTBody).children('tr') );\n\t\t\t}\n\t\t\t\n\t\t\t/* Copy the data index array */\n\t\t\toSettings.aiDisplay = oSettings.aiDisplayMaster.slice();\n\t\t\t\n\t\t\t/* Initialisation complete - table can be drawn */\n\t\t\toSettings.bInitialised = true;\n\t\t\t\n\t\t\t/* Check if we need to initialise the table (it might not have been handed off to the\n\t\t\t * language processor)\n\t\t\t */\n\t\t\tif ( bInitHandedOff === false )\n\t\t\t{\n\t\t\t\t_fnInitialise( oSettings );\n\t\t\t}\n\t\t} );\n\t\t_that = null;\n\t\treturn this;\n\t};\n\n\t\n\t\n\t/**\n\t * Computed structure of the DataTables API, defined by the options passed to\n\t * `DataTable.Api.register()` when building the API.\n\t *\n\t * The structure is built in order to speed creation and extension of the Api\n\t * objects since the extensions are effectively pre-parsed.\n\t *\n\t * The array is an array of objects with the following structure, where this\n\t * base array represents the Api prototype base:\n\t *\n\t * [\n\t * {\n\t * name: 'data' -- string - Property name\n\t * val: function () {}, -- function - Api method (or undefined if just an object\n\t * methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result\n\t * propExt: [ ... ] -- array - Array of Api object definitions to extend the property\n\t * },\n\t * {\n\t * name: 'row'\n\t * val: {},\n\t * methodExt: [ ... ],\n\t * propExt: [\n\t * {\n\t * name: 'data'\n\t * val: function () {},\n\t * methodExt: [ ... ],\n\t * propExt: [ ... ]\n\t * },\n\t * ...\n\t * ]\n\t * }\n\t * ]\n\t *\n\t * @type {Array}\n\t * @ignore\n\t */\n\tvar __apiStruct = [];\n\t\n\t\n\t/**\n\t * `Array.prototype` reference.\n\t *\n\t * @type object\n\t * @ignore\n\t */\n\tvar __arrayProto = Array.prototype;\n\t\n\t\n\t/**\n\t * Abstraction for `context` parameter of the `Api` constructor to allow it to\n\t * take several different forms for ease of use.\n\t *\n\t * Each of the input parameter types will be converted to a DataTables settings\n\t * object where possible.\n\t *\n\t * @param {string|node|jQuery|object} mixed DataTable identifier. Can be one\n\t * of:\n\t *\n\t * * `string` - jQuery selector. Any DataTables' matching the given selector\n\t * with be found and used.\n\t * * `node` - `TABLE` node which has already been formed into a DataTable.\n\t * * `jQuery` - A jQuery object of `TABLE` nodes.\n\t * * `object` - DataTables settings object\n\t * * `DataTables.Api` - API instance\n\t * @return {array|null} Matching DataTables settings objects. `null` or\n\t * `undefined` is returned if no matching DataTable is found.\n\t * @ignore\n\t */\n\tvar _toSettings = function ( mixed )\n\t{\n\t\tvar idx, jq;\n\t\tvar settings = DataTable.settings;\n\t\tvar tables = $.map( settings, function (el, i) {\n\t\t\treturn el.nTable;\n\t\t} );\n\t\n\t\tif ( ! mixed ) {\n\t\t\treturn [];\n\t\t}\n\t\telse if ( mixed.nTable && mixed.oApi ) {\n\t\t\t// DataTables settings object\n\t\t\treturn [ mixed ];\n\t\t}\n\t\telse if ( mixed.nodeName && mixed.nodeName.toLowerCase() === 'table' ) {\n\t\t\t// Table node\n\t\t\tidx = $.inArray( mixed, tables );\n\t\t\treturn idx !== -1 ? [ settings[idx] ] : null;\n\t\t}\n\t\telse if ( mixed && typeof mixed.settings === 'function' ) {\n\t\t\treturn mixed.settings().toArray();\n\t\t}\n\t\telse if ( typeof mixed === 'string' ) {\n\t\t\t// jQuery selector\n\t\t\tjq = $(mixed);\n\t\t}\n\t\telse if ( mixed instanceof $ ) {\n\t\t\t// jQuery object (also DataTables instance)\n\t\t\tjq = mixed;\n\t\t}\n\t\n\t\tif ( jq ) {\n\t\t\treturn jq.map( function(i) {\n\t\t\t\tidx = $.inArray( this, tables );\n\t\t\t\treturn idx !== -1 ? settings[idx] : null;\n\t\t\t} ).toArray();\n\t\t}\n\t};\n\t\n\t\n\t/**\n\t * DataTables API class - used to control and interface with one or more\n\t * DataTables enhanced tables.\n\t *\n\t * The API class is heavily based on jQuery, presenting a chainable interface\n\t * that you can use to interact with tables. Each instance of the API class has\n\t * a \"context\" - i.e. the tables that it will operate on. This could be a single\n\t * table, all tables on a page or a sub-set thereof.\n\t *\n\t * Additionally the API is designed to allow you to easily work with the data in\n\t * the tables, retrieving and manipulating it as required. This is done by\n\t * presenting the API class as an array like interface. The contents of the\n\t * array depend upon the actions requested by each method (for example\n\t * `rows().nodes()` will return an array of nodes, while `rows().data()` will\n\t * return an array of objects or arrays depending upon your table's\n\t * configuration). The API object has a number of array like methods (`push`,\n\t * `pop`, `reverse` etc) as well as additional helper methods (`each`, `pluck`,\n\t * `unique` etc) to assist your working with the data held in a table.\n\t *\n\t * Most methods (those which return an Api instance) are chainable, which means\n\t * the return from a method call also has all of the methods available that the\n\t * top level object had. For example, these two calls are equivalent:\n\t *\n\t * // Not chained\n\t * api.row.add( {...} );\n\t * api.draw();\n\t *\n\t * // Chained\n\t * api.row.add( {...} ).draw();\n\t *\n\t * @class DataTable.Api\n\t * @param {array|object|string|jQuery} context DataTable identifier. This is\n\t * used to define which DataTables enhanced tables this API will operate on.\n\t * Can be one of:\n\t *\n\t * * `string` - jQuery selector. Any DataTables' matching the given selector\n\t * with be found and used.\n\t * * `node` - `TABLE` node which has already been formed into a DataTable.\n\t * * `jQuery` - A jQuery object of `TABLE` nodes.\n\t * * `object` - DataTables settings object\n\t * @param {array} [data] Data to initialise the Api instance with.\n\t *\n\t * @example\n\t * // Direct initialisation during DataTables construction\n\t * var api = $('#example').DataTable();\n\t *\n\t * @example\n\t * // Initialisation using a DataTables jQuery object\n\t * var api = $('#example').dataTable().api();\n\t *\n\t * @example\n\t * // Initialisation as a constructor\n\t * var api = new $.fn.DataTable.Api( 'table.dataTable' );\n\t */\n\t_Api = function ( context, data )\n\t{\n\t\tif ( ! (this instanceof _Api) ) {\n\t\t\treturn new _Api( context, data );\n\t\t}\n\t\n\t\tvar settings = [];\n\t\tvar ctxSettings = function ( o ) {\n\t\t\tvar a = _toSettings( o );\n\t\t\tif ( a ) {\n\t\t\t\tsettings = settings.concat( a );\n\t\t\t}\n\t\t};\n\t\n\t\tif ( $.isArray( context ) ) {\n\t\t\tfor ( var i=0, ien=context.length ; i<ien ; i++ ) {\n\t\t\t\tctxSettings( context[i] );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tctxSettings( context );\n\t\t}\n\t\n\t\t// Remove duplicates\n\t\tthis.context = _unique( settings );\n\t\n\t\t// Initial data\n\t\tif ( data ) {\n\t\t\t$.merge( this, data );\n\t\t}\n\t\n\t\t// selector\n\t\tthis.selector = {\n\t\t\trows: null,\n\t\t\tcols: null,\n\t\t\topts: null\n\t\t};\n\t\n\t\t_Api.extend( this, this, __apiStruct );\n\t};\n\t\n\tDataTable.Api = _Api;\n\t\n\t// Don't destroy the existing prototype, just extend it. Required for jQuery 2's\n\t// isPlainObject.\n\t$.extend( _Api.prototype, {\n\t\tany: function ()\n\t\t{\n\t\t\treturn this.count() !== 0;\n\t\t},\n\t\n\t\n\t\tconcat: __arrayProto.concat,\n\t\n\t\n\t\tcontext: [], // array of table settings objects\n\t\n\t\n\t\tcount: function ()\n\t\t{\n\t\t\treturn this.flatten().length;\n\t\t},\n\t\n\t\n\t\teach: function ( fn )\n\t\t{\n\t\t\tfor ( var i=0, ien=this.length ; i<ien; i++ ) {\n\t\t\t\tfn.call( this, this[i], i, this );\n\t\t\t}\n\t\n\t\t\treturn this;\n\t\t},\n\t\n\t\n\t\teq: function ( idx )\n\t\t{\n\t\t\tvar ctx = this.context;\n\t\n\t\t\treturn ctx.length > idx ?\n\t\t\t\tnew _Api( ctx[idx], this[idx] ) :\n\t\t\t\tnull;\n\t\t},\n\t\n\t\n\t\tfilter: function ( fn )\n\t\t{\n\t\t\tvar a = [];\n\t\n\t\t\tif ( __arrayProto.filter ) {\n\t\t\t\ta = __arrayProto.filter.call( this, fn, this );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Compatibility for browsers without EMCA-252-5 (JS 1.6)\n\t\t\t\tfor ( var i=0, ien=this.length ; i<ien ; i++ ) {\n\t\t\t\t\tif ( fn.call( this, this[i], i, this ) ) {\n\t\t\t\t\t\ta.push( this[i] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn new _Api( this.context, a );\n\t\t},\n\t\n\t\n\t\tflatten: function ()\n\t\t{\n\t\t\tvar a = [];\n\t\t\treturn new _Api( this.context, a.concat.apply( a, this.toArray() ) );\n\t\t},\n\t\n\t\n\t\tjoin: __arrayProto.join,\n\t\n\t\n\t\tindexOf: __arrayProto.indexOf || function (obj, start)\n\t\t{\n\t\t\tfor ( var i=(start || 0), ien=this.length ; i<ien ; i++ ) {\n\t\t\t\tif ( this[i] === obj ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn -1;\n\t\t},\n\t\n\t\titerator: function ( flatten, type, fn, alwaysNew ) {\n\t\t\tvar\n\t\t\t\ta = [], ret,\n\t\t\t\ti, ien, j, jen,\n\t\t\t\tcontext = this.context,\n\t\t\t\trows, items, item,\n\t\t\t\tselector = this.selector;\n\t\n\t\t\t// Argument shifting\n\t\t\tif ( typeof flatten === 'string' ) {\n\t\t\t\talwaysNew = fn;\n\t\t\t\tfn = type;\n\t\t\t\ttype = flatten;\n\t\t\t\tflatten = false;\n\t\t\t}\n\t\n\t\t\tfor ( i=0, ien=context.length ; i<ien ; i++ ) {\n\t\t\t\tvar apiInst = new _Api( context[i] );\n\t\n\t\t\t\tif ( type === 'table' ) {\n\t\t\t\t\tret = fn.call( apiInst, context[i], i );\n\t\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\ta.push( ret );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( type === 'columns' || type === 'rows' ) {\n\t\t\t\t\t// this has same length as context - one entry for each table\n\t\t\t\t\tret = fn.call( apiInst, context[i], this[i], i );\n\t\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\ta.push( ret );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( type === 'column' || type === 'column-rows' || type === 'row' || type === 'cell' ) {\n\t\t\t\t\t// columns and rows share the same structure.\n\t\t\t\t\t// 'this' is an array of column indexes for each context\n\t\t\t\t\titems = this[i];\n\t\n\t\t\t\t\tif ( type === 'column-rows' ) {\n\t\t\t\t\t\trows = _selector_row_indexes( context[i], selector.opts );\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfor ( j=0, jen=items.length ; j<jen ; j++ ) {\n\t\t\t\t\t\titem = items[j];\n\t\n\t\t\t\t\t\tif ( type === 'cell' ) {\n\t\t\t\t\t\t\tret = fn.call( apiInst, context[i], item.row, item.column, i, j );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tret = fn.call( apiInst, context[i], item, i, j, rows );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\t\ta.push( ret );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif ( a.length || alwaysNew ) {\n\t\t\t\tvar api = new _Api( context, flatten ? a.concat.apply( [], a ) : a );\n\t\t\t\tvar apiSelector = api.selector;\n\t\t\t\tapiSelector.rows = selector.rows;\n\t\t\t\tapiSelector.cols = selector.cols;\n\t\t\t\tapiSelector.opts = selector.opts;\n\t\t\t\treturn api;\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\t\n\t\n\t\tlastIndexOf: __arrayProto.lastIndexOf || function (obj, start)\n\t\t{\n\t\t\t// Bit cheeky...\n\t\t\treturn this.indexOf.apply( this.toArray.reverse(), arguments );\n\t\t},\n\t\n\t\n\t\tlength: 0,\n\t\n\t\n\t\tmap: function ( fn )\n\t\t{\n\t\t\tvar a = [];\n\t\n\t\t\tif ( __arrayProto.map ) {\n\t\t\t\ta = __arrayProto.map.call( this, fn, this );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Compatibility for browsers without EMCA-252-5 (JS 1.6)\n\t\t\t\tfor ( var i=0, ien=this.length ; i<ien ; i++ ) {\n\t\t\t\t\ta.push( fn.call( this, this[i], i ) );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn new _Api( this.context, a );\n\t\t},\n\t\n\t\n\t\tpluck: function ( prop )\n\t\t{\n\t\t\treturn this.map( function ( el ) {\n\t\t\t\treturn el[ prop ];\n\t\t\t} );\n\t\t},\n\t\n\t\tpop: __arrayProto.pop,\n\t\n\t\n\t\tpush: __arrayProto.push,\n\t\n\t\n\t\t// Does not return an API instance\n\t\treduce: __arrayProto.reduce || function ( fn, init )\n\t\t{\n\t\t\treturn _fnReduce( this, fn, init, 0, this.length, 1 );\n\t\t},\n\t\n\t\n\t\treduceRight: __arrayProto.reduceRight || function ( fn, init )\n\t\t{\n\t\t\treturn _fnReduce( this, fn, init, this.length-1, -1, -1 );\n\t\t},\n\t\n\t\n\t\treverse: __arrayProto.reverse,\n\t\n\t\n\t\t// Object with rows, columns and opts\n\t\tselector: null,\n\t\n\t\n\t\tshift: __arrayProto.shift,\n\t\n\t\n\t\tsort: __arrayProto.sort, // ? name - order?\n\t\n\t\n\t\tsplice: __arrayProto.splice,\n\t\n\t\n\t\ttoArray: function ()\n\t\t{\n\t\t\treturn __arrayProto.slice.call( this );\n\t\t},\n\t\n\t\n\t\tto$: function ()\n\t\t{\n\t\t\treturn $( this );\n\t\t},\n\t\n\t\n\t\ttoJQuery: function ()\n\t\t{\n\t\t\treturn $( this );\n\t\t},\n\t\n\t\n\t\tunique: function ()\n\t\t{\n\t\t\treturn new _Api( this.context, _unique(this) );\n\t\t},\n\t\n\t\n\t\tunshift: __arrayProto.unshift\n\t} );\n\t\n\t\n\t_Api.extend = function ( scope, obj, ext )\n\t{\n\t\t// Only extend API instances and static properties of the API\n\t\tif ( ! ext.length || ! obj || ( ! (obj instanceof _Api) && ! obj.__dt_wrapper ) ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\tvar\n\t\t\ti, ien,\n\t\t\tj, jen,\n\t\t\tstruct, inner,\n\t\t\tmethodScoping = function ( scope, fn, struc ) {\n\t\t\t\treturn function () {\n\t\t\t\t\tvar ret = fn.apply( scope, arguments );\n\t\n\t\t\t\t\t// Method extension\n\t\t\t\t\t_Api.extend( ret, ret, struc.methodExt );\n\t\t\t\t\treturn ret;\n\t\t\t\t};\n\t\t\t};\n\t\n\t\tfor ( i=0, ien=ext.length ; i<ien ; i++ ) {\n\t\t\tstruct = ext[i];\n\t\n\t\t\t// Value\n\t\t\tobj[ struct.name ] = typeof struct.val === 'function' ?\n\t\t\t\tmethodScoping( scope, struct.val, struct ) :\n\t\t\t\t$.isPlainObject( struct.val ) ?\n\t\t\t\t\t{} :\n\t\t\t\t\tstruct.val;\n\t\n\t\t\tobj[ struct.name ].__dt_wrapper = true;\n\t\n\t\t\t// Property extension\n\t\t\t_Api.extend( scope, obj[ struct.name ], struct.propExt );\n\t\t}\n\t};\n\t\n\t\n\t// @todo - Is there need for an augment function?\n\t// _Api.augment = function ( inst, name )\n\t// {\n\t// \t// Find src object in the structure from the name\n\t// \tvar parts = name.split('.');\n\t\n\t// \t_Api.extend( inst, obj );\n\t// };\n\t\n\t\n\t// [\n\t// {\n\t// name: 'data' -- string - Property name\n\t// val: function () {}, -- function - Api method (or undefined if just an object\n\t// methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result\n\t// propExt: [ ... ] -- array - Array of Api object definitions to extend the property\n\t// },\n\t// {\n\t// name: 'row'\n\t// val: {},\n\t// methodExt: [ ... ],\n\t// propExt: [\n\t// {\n\t// name: 'data'\n\t// val: function () {},\n\t// methodExt: [ ... ],\n\t// propExt: [ ... ]\n\t// },\n\t// ...\n\t// ]\n\t// }\n\t// ]\n\t\n\t_Api.register = _api_register = function ( name, val )\n\t{\n\t\tif ( $.isArray( name ) ) {\n\t\t\tfor ( var j=0, jen=name.length ; j<jen ; j++ ) {\n\t\t\t\t_Api.register( name[j], val );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\n\t\tvar\n\t\t\ti, ien,\n\t\t\their = name.split('.'),\n\t\t\tstruct = __apiStruct,\n\t\t\tkey, method;\n\t\n\t\tvar find = function ( src, name ) {\n\t\t\tfor ( var i=0, ien=src.length ; i<ien ; i++ ) {\n\t\t\t\tif ( src[i].name === name ) {\n\t\t\t\t\treturn src[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t};\n\t\n\t\tfor ( i=0, ien=heir.length ; i<ien ; i++ ) {\n\t\t\tmethod = heir[i].indexOf('()') !== -1;\n\t\t\tkey = method ?\n\t\t\t\their[i].replace('()', '') :\n\t\t\t\their[i];\n\t\n\t\t\tvar src = find( struct, key );\n\t\t\tif ( ! src ) {\n\t\t\t\tsrc = {\n\t\t\t\t\tname: key,\n\t\t\t\t\tval: {},\n\t\t\t\t\tmethodExt: [],\n\t\t\t\t\tpropExt: []\n\t\t\t\t};\n\t\t\t\tstruct.push( src );\n\t\t\t}\n\t\n\t\t\tif ( i === ien-1 ) {\n\t\t\t\tsrc.val = val;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tstruct = method ?\n\t\t\t\t\tsrc.methodExt :\n\t\t\t\t\tsrc.propExt;\n\t\t\t}\n\t\t}\n\t};\n\t\n\t\n\t_Api.registerPlural = _api_registerPlural = function ( pluralName, singularName, val ) {\n\t\t_Api.register( pluralName, val );\n\t\n\t\t_Api.register( singularName, function () {\n\t\t\tvar ret = val.apply( this, arguments );\n\t\n\t\t\tif ( ret === this ) {\n\t\t\t\t// Returned item is the API instance that was passed in, return it\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\telse if ( ret instanceof _Api ) {\n\t\t\t\t// New API instance returned, want the value from the first item\n\t\t\t\t// in the returned array for the singular result.\n\t\t\t\treturn ret.length ?\n\t\t\t\t\t$.isArray( ret[0] ) ?\n\t\t\t\t\t\tnew _Api( ret.context, ret[0] ) : // Array results are 'enhanced'\n\t\t\t\t\t\tret[0] :\n\t\t\t\t\tundefined;\n\t\t\t}\n\t\n\t\t\t// Non-API return - just fire it back\n\t\t\treturn ret;\n\t\t} );\n\t};\n\t\n\t\n\t/**\n\t * Selector for HTML tables. Apply the given selector to the give array of\n\t * DataTables settings objects.\n\t *\n\t * @param {string|integer} [selector] jQuery selector string or integer\n\t * @param {array} Array of DataTables settings objects to be filtered\n\t * @return {array}\n\t * @ignore\n\t */\n\tvar __table_selector = function ( selector, a )\n\t{\n\t\t// Integer is used to pick out a table by index\n\t\tif ( typeof selector === 'number' ) {\n\t\t\treturn [ a[ selector ] ];\n\t\t}\n\t\n\t\t// Perform a jQuery selector on the table nodes\n\t\tvar nodes = $.map( a, function (el, i) {\n\t\t\treturn el.nTable;\n\t\t} );\n\t\n\t\treturn $(nodes)\n\t\t\t.filter( selector )\n\t\t\t.map( function (i) {\n\t\t\t\t// Need to translate back from the table node to the settings\n\t\t\t\tvar idx = $.inArray( this, nodes );\n\t\t\t\treturn a[ idx ];\n\t\t\t} )\n\t\t\t.toArray();\n\t};\n\t\n\t\n\t\n\t/**\n\t * Context selector for the API's context (i.e. the tables the API instance\n\t * refers to.\n\t *\n\t * @name DataTable.Api#tables\n\t * @param {string|integer} [selector] Selector to pick which tables the iterator\n\t * should operate on. If not given, all tables in the current context are\n\t * used. This can be given as a jQuery selector (for example `':gt(0)'`) to\n\t * select multiple tables or as an integer to select a single table.\n\t * @returns {DataTable.Api} Returns a new API instance if a selector is given.\n\t */\n\t_api_register( 'tables()', function ( selector ) {\n\t\t// A new instance is created if there was a selector specified\n\t\treturn selector ?\n\t\t\tnew _Api( __table_selector( selector, this.context ) ) :\n\t\t\tthis;\n\t} );\n\t\n\t\n\t_api_register( 'table()', function ( selector ) {\n\t\tvar tables = this.tables( selector );\n\t\tvar ctx = tables.context;\n\t\n\t\t// Truncate to the first matched table\n\t\treturn ctx.length ?\n\t\t\tnew _Api( ctx[0] ) :\n\t\t\ttables;\n\t} );\n\t\n\t\n\t_api_registerPlural( 'tables().nodes()', 'table().node()' , function () {\n\t\treturn this.iterator( 'table', function ( ctx ) {\n\t\t\treturn ctx.nTable;\n\t\t}, 1 );\n\t} );\n\t\n\t\n\t_api_registerPlural( 'tables().body()', 'table().body()' , function () {\n\t\treturn this.iterator( 'table', function ( ctx ) {\n\t\t\treturn ctx.nTBody;\n\t\t}, 1 );\n\t} );\n\t\n\t\n\t_api_registerPlural( 'tables().header()', 'table().header()' , function () {\n\t\treturn this.iterator( 'table', function ( ctx ) {\n\t\t\treturn ctx.nTHead;\n\t\t}, 1 );\n\t} );\n\t\n\t\n\t_api_registerPlural( 'tables().footer()', 'table().footer()' , function () {\n\t\treturn this.iterator( 'table', function ( ctx ) {\n\t\t\treturn ctx.nTFoot;\n\t\t}, 1 );\n\t} );\n\t\n\t\n\t_api_registerPlural( 'tables().containers()', 'table().container()' , function () {\n\t\treturn this.iterator( 'table', function ( ctx ) {\n\t\t\treturn ctx.nTableWrapper;\n\t\t}, 1 );\n\t} );\n\t\n\t\n\t\n\t/**\n\t * Redraw the tables in the current context.\n\t */\n\t_api_register( 'draw()', function ( paging ) {\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\tif ( paging === 'page' ) {\n\t\t\t\t_fnDraw( settings );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( typeof paging === 'string' ) {\n\t\t\t\t\tpaging = paging === 'full-hold' ?\n\t\t\t\t\t\tfalse :\n\t\t\t\t\t\ttrue;\n\t\t\t\t}\n\t\n\t\t\t\t_fnReDraw( settings, paging===false );\n\t\t\t}\n\t\t} );\n\t} );\n\t\n\t\n\t\n\t/**\n\t * Get the current page index.\n\t *\n\t * @return {integer} Current page index (zero based)\n\t *//**\n\t * Set the current page.\n\t *\n\t * Note that if you attempt to show a page which does not exist, DataTables will\n\t * not throw an error, but rather reset the paging.\n\t *\n\t * @param {integer|string} action The paging action to take. This can be one of:\n\t * * `integer` - The page index to jump to\n\t * * `string` - An action to take:\n\t * * `first` - Jump to first page.\n\t * * `next` - Jump to the next page\n\t * * `previous` - Jump to previous page\n\t * * `last` - Jump to the last page.\n\t * @returns {DataTables.Api} this\n\t */\n\t_api_register( 'page()', function ( action ) {\n\t\tif ( action === undefined ) {\n\t\t\treturn this.page.info().page; // not an expensive call\n\t\t}\n\t\n\t\t// else, have an action to take on all tables\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\t_fnPageChange( settings, action );\n\t\t} );\n\t} );\n\t\n\t\n\t/**\n\t * Paging information for the first table in the current context.\n\t *\n\t * If you require paging information for another table, use the `table()` method\n\t * with a suitable selector.\n\t *\n\t * @return {object} Object with the following properties set:\n\t * * `page` - Current page index (zero based - i.e. the first page is `0`)\n\t * * `pages` - Total number of pages\n\t * * `start` - Display index for the first record shown on the current page\n\t * * `end` - Display index for the last record shown on the current page\n\t * * `length` - Display length (number of records). Note that generally `start\n\t * + length = end`, but this is not always true, for example if there are\n\t * only 2 records to show on the final page, with a length of 10.\n\t * * `recordsTotal` - Full data set length\n\t * * `recordsDisplay` - Data set length once the current filtering criterion\n\t * are applied.\n\t */\n\t_api_register( 'page.info()', function ( action ) {\n\t\tif ( this.context.length === 0 ) {\n\t\t\treturn undefined;\n\t\t}\n\t\n\t\tvar\n\t\t\tsettings = this.context[0],\n\t\t\tstart = settings._iDisplayStart,\n\t\t\tlen = settings.oFeatures.bPaginate ? settings._iDisplayLength : -1,\n\t\t\tvisRecords = settings.fnRecordsDisplay(),\n\t\t\tall = len === -1;\n\t\n\t\treturn {\n\t\t\t\"page\": all ? 0 : Math.floor( start / len ),\n\t\t\t\"pages\": all ? 1 : Math.ceil( visRecords / len ),\n\t\t\t\"start\": start,\n\t\t\t\"end\": settings.fnDisplayEnd(),\n\t\t\t\"length\": len,\n\t\t\t\"recordsTotal\": settings.fnRecordsTotal(),\n\t\t\t\"recordsDisplay\": visRecords,\n\t\t\t\"serverSide\": _fnDataSource( settings ) === 'ssp'\n\t\t};\n\t} );\n\t\n\t\n\t/**\n\t * Get the current page length.\n\t *\n\t * @return {integer} Current page length. Note `-1` indicates that all records\n\t * are to be shown.\n\t *//**\n\t * Set the current page length.\n\t *\n\t * @param {integer} Page length to set. Use `-1` to show all records.\n\t * @returns {DataTables.Api} this\n\t */\n\t_api_register( 'page.len()', function ( len ) {\n\t\t// Note that we can't call this function 'length()' because `length`\n\t\t// is a Javascript property of functions which defines how many arguments\n\t\t// the function expects.\n\t\tif ( len === undefined ) {\n\t\t\treturn this.context.length !== 0 ?\n\t\t\t\tthis.context[0]._iDisplayLength :\n\t\t\t\tundefined;\n\t\t}\n\t\n\t\t// else, set the page length\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\t_fnLengthChange( settings, len );\n\t\t} );\n\t} );\n\t\n\t\n\t\n\tvar __reload = function ( settings, holdPosition, callback ) {\n\t\t// Use the draw event to trigger a callback\n\t\tif ( callback ) {\n\t\t\tvar api = new _Api( settings );\n\t\n\t\t\tapi.one( 'draw', function () {\n\t\t\t\tcallback( api.ajax.json() );\n\t\t\t} );\n\t\t}\n\t\n\t\tif ( _fnDataSource( settings ) == 'ssp' ) {\n\t\t\t_fnReDraw( settings, holdPosition );\n\t\t}\n\t\telse {\n\t\t\t_fnProcessingDisplay( settings, true );\n\t\n\t\t\t// Cancel an existing request\n\t\t\tvar xhr = settings.jqXHR;\n\t\t\tif ( xhr && xhr.readyState !== 4 ) {\n\t\t\t\txhr.abort();\n\t\t\t}\n\t\n\t\t\t// Trigger xhr\n\t\t\t_fnBuildAjax( settings, [], function( json ) {\n\t\t\t\t_fnClearTable( settings );\n\t\n\t\t\t\tvar data = _fnAjaxDataSrc( settings, json );\n\t\t\t\tfor ( var i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t\t\t\t_fnAddData( settings, data[i] );\n\t\t\t\t}\n\t\n\t\t\t\t_fnReDraw( settings, holdPosition );\n\t\t\t\t_fnProcessingDisplay( settings, false );\n\t\t\t} );\n\t\t}\n\t};\n\t\n\t\n\t/**\n\t * Get the JSON response from the last Ajax request that DataTables made to the\n\t * server. Note that this returns the JSON from the first table in the current\n\t * context.\n\t *\n\t * @return {object} JSON received from the server.\n\t */\n\t_api_register( 'ajax.json()', function () {\n\t\tvar ctx = this.context;\n\t\n\t\tif ( ctx.length > 0 ) {\n\t\t\treturn ctx[0].json;\n\t\t}\n\t\n\t\t// else return undefined;\n\t} );\n\t\n\t\n\t/**\n\t * Get the data submitted in the last Ajax request\n\t */\n\t_api_register( 'ajax.params()', function () {\n\t\tvar ctx = this.context;\n\t\n\t\tif ( ctx.length > 0 ) {\n\t\t\treturn ctx[0].oAjaxData;\n\t\t}\n\t\n\t\t// else return undefined;\n\t} );\n\t\n\t\n\t/**\n\t * Reload tables from the Ajax data source. Note that this function will\n\t * automatically re-draw the table when the remote data has been loaded.\n\t *\n\t * @param {boolean} [reset=true] Reset (default) or hold the current paging\n\t * position. A full re-sort and re-filter is performed when this method is\n\t * called, which is why the pagination reset is the default action.\n\t * @returns {DataTables.Api} this\n\t */\n\t_api_register( 'ajax.reload()', function ( callback, resetPaging ) {\n\t\treturn this.iterator( 'table', function (settings) {\n\t\t\t__reload( settings, resetPaging===false, callback );\n\t\t} );\n\t} );\n\t\n\t\n\t/**\n\t * Get the current Ajax URL. Note that this returns the URL from the first\n\t * table in the current context.\n\t *\n\t * @return {string} Current Ajax source URL\n\t *//**\n\t * Set the Ajax URL. Note that this will set the URL for all tables in the\n\t * current context.\n\t *\n\t * @param {string} url URL to set.\n\t * @returns {DataTables.Api} this\n\t */\n\t_api_register( 'ajax.url()', function ( url ) {\n\t\tvar ctx = this.context;\n\t\n\t\tif ( url === undefined ) {\n\t\t\t// get\n\t\t\tif ( ctx.length === 0 ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tctx = ctx[0];\n\t\n\t\t\treturn ctx.ajax ?\n\t\t\t\t$.isPlainObject( ctx.ajax ) ?\n\t\t\t\t\tctx.ajax.url :\n\t\t\t\t\tctx.ajax :\n\t\t\t\tctx.sAjaxSource;\n\t\t}\n\t\n\t\t// set\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\tif ( $.isPlainObject( settings.ajax ) ) {\n\t\t\t\tsettings.ajax.url = url;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsettings.ajax = url;\n\t\t\t}\n\t\t\t// No need to consider sAjaxSource here since DataTables gives priority\n\t\t\t// to `ajax` over `sAjaxSource`. So setting `ajax` here, renders any\n\t\t\t// value of `sAjaxSource` redundant.\n\t\t} );\n\t} );\n\t\n\t\n\t/**\n\t * Load data from the newly set Ajax URL. Note that this method is only\n\t * available when `ajax.url()` is used to set a URL. Additionally, this method\n\t * has the same effect as calling `ajax.reload()` but is provided for\n\t * convenience when setting a new URL. Like `ajax.reload()` it will\n\t * automatically redraw the table once the remote data has been loaded.\n\t *\n\t * @returns {DataTables.Api} this\n\t */\n\t_api_register( 'ajax.url().load()', function ( callback, resetPaging ) {\n\t\t// Same as a reload, but makes sense to present it for easy access after a\n\t\t// url change\n\t\treturn this.iterator( 'table', function ( ctx ) {\n\t\t\t__reload( ctx, resetPaging===false, callback );\n\t\t} );\n\t} );\n\t\n\t\n\t\n\t\n\tvar _selector_run = function ( type, selector, selectFn, settings, opts )\n\t{\n\t\tvar\n\t\t\tout = [], res,\n\t\t\ta, i, ien, j, jen,\n\t\t\tselectorType = typeof selector;\n\t\n\t\t// Can't just check for isArray here, as an API or jQuery instance might be\n\t\t// given with their array like look\n\t\tif ( ! selector || selectorType === 'string' || selectorType === 'function' || selector.length === undefined ) {\n\t\t\tselector = [ selector ];\n\t\t}\n\t\n\t\tfor ( i=0, ien=selector.length ; i<ien ; i++ ) {\n\t\t\ta = selector[i] && selector[i].split ?\n\t\t\t\tselector[i].split(',') :\n\t\t\t\t[ selector[i] ];\n\t\n\t\t\tfor ( j=0, jen=a.length ; j<jen ; j++ ) {\n\t\t\t\tres = selectFn( typeof a[j] === 'string' ? $.trim(a[j]) : a[j] );\n\t\n\t\t\t\tif ( res && res.length ) {\n\t\t\t\t\tout = out.concat( res );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// selector extensions\n\t\tvar ext = _ext.selector[ type ];\n\t\tif ( ext.length ) {\n\t\t\tfor ( i=0, ien=ext.length ; i<ien ; i++ ) {\n\t\t\t\tout = ext[i]( settings, opts, out );\n\t\t\t}\n\t\t}\n\t\n\t\treturn _unique( out );\n\t};\n\t\n\t\n\tvar _selector_opts = function ( opts )\n\t{\n\t\tif ( ! opts ) {\n\t\t\topts = {};\n\t\t}\n\t\n\t\t// Backwards compatibility for 1.9- which used the terminology filter rather\n\t\t// than search\n\t\tif ( opts.filter && opts.search === undefined ) {\n\t\t\topts.search = opts.filter;\n\t\t}\n\t\n\t\treturn $.extend( {\n\t\t\tsearch: 'none',\n\t\t\torder: 'current',\n\t\t\tpage: 'all'\n\t\t}, opts );\n\t};\n\t\n\t\n\tvar _selector_first = function ( inst )\n\t{\n\t\t// Reduce the API instance to the first item found\n\t\tfor ( var i=0, ien=inst.length ; i<ien ; i++ ) {\n\t\t\tif ( inst[i].length > 0 ) {\n\t\t\t\t// Assign the first element to the first item in the instance\n\t\t\t\t// and truncate the instance and context\n\t\t\t\tinst[0] = inst[i];\n\t\t\t\tinst[0].length = 1;\n\t\t\t\tinst.length = 1;\n\t\t\t\tinst.context = [ inst.context[i] ];\n\t\n\t\t\t\treturn inst;\n\t\t\t}\n\t\t}\n\t\n\t\t// Not found - return an empty instance\n\t\tinst.length = 0;\n\t\treturn inst;\n\t};\n\t\n\t\n\tvar _selector_row_indexes = function ( settings, opts )\n\t{\n\t\tvar\n\t\t\ti, ien, tmp, a=[],\n\t\t\tdisplayFiltered = settings.aiDisplay,\n\t\t\tdisplayMaster = settings.aiDisplayMaster;\n\t\n\t\tvar\n\t\t\tsearch = opts.search, // none, applied, removed\n\t\t\torder = opts.order, // applied, current, index (original - compatibility with 1.9)\n\t\t\tpage = opts.page; // all, current\n\t\n\t\tif ( _fnDataSource( settings ) == 'ssp' ) {\n\t\t\t// In server-side processing mode, most options are irrelevant since\n\t\t\t// rows not shown don't exist and the index order is the applied order\n\t\t\t// Removed is a special case - for consistency just return an empty\n\t\t\t// array\n\t\t\treturn search === 'removed' ?\n\t\t\t\t[] :\n\t\t\t\t_range( 0, displayMaster.length );\n\t\t}\n\t\telse if ( page == 'current' ) {\n\t\t\t// Current page implies that order=current and fitler=applied, since it is\n\t\t\t// fairly senseless otherwise, regardless of what order and search actually\n\t\t\t// are\n\t\t\tfor ( i=settings._iDisplayStart, ien=settings.fnDisplayEnd() ; i<ien ; i++ ) {\n\t\t\t\ta.push( displayFiltered[i] );\n\t\t\t}\n\t\t}\n\t\telse if ( order == 'current' || order == 'applied' ) {\n\t\t\ta = search == 'none' ?\n\t\t\t\tdisplayMaster.slice() : // no search\n\t\t\t\tsearch == 'applied' ?\n\t\t\t\t\tdisplayFiltered.slice() : // applied search\n\t\t\t\t\t$.map( displayMaster, function (el, i) { // removed search\n\t\t\t\t\t\treturn $.inArray( el, displayFiltered ) === -1 ? el : null;\n\t\t\t\t\t} );\n\t\t}\n\t\telse if ( order == 'index' || order == 'original' ) {\n\t\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\t\tif ( search == 'none' ) {\n\t\t\t\t\ta.push( i );\n\t\t\t\t}\n\t\t\t\telse { // applied | removed\n\t\t\t\t\ttmp = $.inArray( i, displayFiltered );\n\t\n\t\t\t\t\tif ((tmp === -1 && search == 'removed') ||\n\t\t\t\t\t\t(tmp >= 0 && search == 'applied') )\n\t\t\t\t\t{\n\t\t\t\t\t\ta.push( i );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn a;\n\t};\n\t\n\t\n\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t * Rows\n\t *\n\t * {} - no selector - use all available rows\n\t * {integer} - row aoData index\n\t * {node} - TR node\n\t * {string} - jQuery selector to apply to the TR elements\n\t * {array} - jQuery array of nodes, or simply an array of TR nodes\n\t *\n\t */\n\t\n\t\n\tvar __row_selector = function ( settings, selector, opts )\n\t{\n\t\tvar run = function ( sel ) {\n\t\t\tvar selInt = _intVal( sel );\n\t\t\tvar i, ien;\n\t\n\t\t\t// Short cut - selector is a number and no options provided (default is\n\t\t\t// all records, so no need to check if the index is in there, since it\n\t\t\t// must be - dev error if the index doesn't exist).\n\t\t\tif ( selInt !== null && ! opts ) {\n\t\t\t\treturn [ selInt ];\n\t\t\t}\n\t\n\t\t\tvar rows = _selector_row_indexes( settings, opts );\n\t\n\t\t\tif ( selInt !== null && $.inArray( selInt, rows ) !== -1 ) {\n\t\t\t\t// Selector - integer\n\t\t\t\treturn [ selInt ];\n\t\t\t}\n\t\t\telse if ( ! sel ) {\n\t\t\t\t// Selector - none\n\t\t\t\treturn rows;\n\t\t\t}\n\t\n\t\t\t// Selector - function\n\t\t\tif ( typeof sel === 'function' ) {\n\t\t\t\treturn $.map( rows, function (idx) {\n\t\t\t\t\tvar row = settings.aoData[ idx ];\n\t\t\t\t\treturn sel( idx, row._aData, row.nTr ) ? idx : null;\n\t\t\t\t} );\n\t\t\t}\n\t\n\t\t\t// Get nodes in the order from the `rows` array with null values removed\n\t\t\tvar nodes = _removeEmpty(\n\t\t\t\t_pluck_order( settings.aoData, rows, 'nTr' )\n\t\t\t);\n\t\n\t\t\t// Selector - node\n\t\t\tif ( sel.nodeName ) {\n\t\t\t\tif ( $.inArray( sel, nodes ) !== -1 ) {\n\t\t\t\t\treturn [ sel._DT_RowIndex ]; // sel is a TR node that is in the table\n\t\t\t\t\t // and DataTables adds a prop for fast lookup\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// ID selector. Want to always be able to select rows by id, regardless\n\t\t\t// of if the tr element has been created or not, so can't rely upon\n\t\t\t// jQuery here - hence a custom implementation. This does not match\n\t\t\t// Sizzle's fast selector or HTML4 - in HTML5 the ID can be anything,\n\t\t\t// but to select it using a CSS selector engine (like Sizzle or\n\t\t\t// querySelect) it would need to need to be escaped for some characters.\n\t\t\t// DataTables simplifies this for row selectors since you can select\n\t\t\t// only a row. A # indicates an id any anything that follows is the id -\n\t\t\t// unescaped.\n\t\t\tif ( typeof sel === 'string' && sel.charAt(0) === '#' ) {\n\t\t\t\t// get row index from id\n\t\t\t\tvar rowObj = settings.aIds[ sel.replace( /^#/, '' ) ];\n\t\t\t\tif ( rowObj !== undefined ) {\n\t\t\t\t\treturn [ rowObj.idx ];\n\t\t\t\t}\n\t\n\t\t\t\t// need to fall through to jQuery in case there is DOM id that\n\t\t\t\t// matches\n\t\t\t}\n\t\n\t\t\t// Selector - jQuery selector string, array of nodes or jQuery object/\n\t\t\t// As jQuery's .filter() allows jQuery objects to be passed in filter,\n\t\t\t// it also allows arrays, so this will cope with all three options\n\t\t\treturn $(nodes)\n\t\t\t\t.filter( sel )\n\t\t\t\t.map( function () {\n\t\t\t\t\treturn this._DT_RowIndex;\n\t\t\t\t} )\n\t\t\t\t.toArray();\n\t\t};\n\t\n\t\treturn _selector_run( 'row', selector, run, settings, opts );\n\t};\n\t\n\t\n\t_api_register( 'rows()', function ( selector, opts ) {\n\t\t// argument shifting\n\t\tif ( selector === undefined ) {\n\t\t\tselector = '';\n\t\t}\n\t\telse if ( $.isPlainObject( selector ) ) {\n\t\t\topts = selector;\n\t\t\tselector = '';\n\t\t}\n\t\n\t\topts = _selector_opts( opts );\n\t\n\t\tvar inst = this.iterator( 'table', function ( settings ) {\n\t\t\treturn __row_selector( settings, selector, opts );\n\t\t}, 1 );\n\t\n\t\t// Want argument shifting here and in __row_selector?\n\t\tinst.selector.rows = selector;\n\t\tinst.selector.opts = opts;\n\t\n\t\treturn inst;\n\t} );\n\t\n\t_api_register( 'rows().nodes()', function () {\n\t\treturn this.iterator( 'row', function ( settings, row ) {\n\t\t\treturn settings.aoData[ row ].nTr || undefined;\n\t\t}, 1 );\n\t} );\n\t\n\t_api_register( 'rows().data()', function () {\n\t\treturn this.iterator( true, 'rows', function ( settings, rows ) {\n\t\t\treturn _pluck_order( settings.aoData, rows, '_aData' );\n\t\t}, 1 );\n\t} );\n\t\n\t_api_registerPlural( 'rows().cache()', 'row().cache()', function ( type ) {\n\t\treturn this.iterator( 'row', function ( settings, row ) {\n\t\t\tvar r = settings.aoData[ row ];\n\t\t\treturn type === 'search' ? r._aFilterData : r._aSortData;\n\t\t}, 1 );\n\t} );\n\t\n\t_api_registerPlural( 'rows().invalidate()', 'row().invalidate()', function ( src ) {\n\t\treturn this.iterator( 'row', function ( settings, row ) {\n\t\t\t_fnInvalidate( settings, row, src );\n\t\t} );\n\t} );\n\t\n\t_api_registerPlural( 'rows().indexes()', 'row().index()', function () {\n\t\treturn this.iterator( 'row', function ( settings, row ) {\n\t\t\treturn row;\n\t\t}, 1 );\n\t} );\n\t\n\t_api_registerPlural( 'rows().ids()', 'row().id()', function ( hash ) {\n\t\tvar a = [];\n\t\tvar context = this.context;\n\t\n\t\t// `iterator` will drop undefined values, but in this case we want them\n\t\tfor ( var i=0, ien=context.length ; i<ien ; i++ ) {\n\t\t\tfor ( var j=0, jen=this[i].length ; j<jen ; j++ ) {\n\t\t\t\tvar id = context[i].rowIdFn( context[i].aoData[ this[i][j] ]._aData );\n\t\t\t\ta.push( (hash === true ? '#' : '' )+ id );\n\t\t\t}\n\t\t}\n\t\n\t\treturn new _Api( context, a );\n\t} );\n\t\n\t_api_registerPlural( 'rows().remove()', 'row().remove()', function () {\n\t\tvar that = this;\n\t\n\t\tthis.iterator( 'row', function ( settings, row, thatIdx ) {\n\t\t\tvar data = settings.aoData;\n\t\t\tvar rowData = data[ row ];\n\t\t\tvar i, ien, j, jen;\n\t\t\tvar loopRow, loopCells;\n\t\n\t\t\tdata.splice( row, 1 );\n\t\n\t\t\t// Update the cached indexes\n\t\t\tfor ( i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t\t\tloopRow = data[i];\n\t\t\t\tloopCells = loopRow.anCells;\n\t\n\t\t\t\t// Rows\n\t\t\t\tif ( loopRow.nTr !== null ) {\n\t\t\t\t\tloopRow.nTr._DT_RowIndex = i;\n\t\t\t\t}\n\t\n\t\t\t\t// Cells\n\t\t\t\tif ( loopCells !== null ) {\n\t\t\t\t\tfor ( j=0, jen=loopCells.length ; j<jen ; j++ ) {\n\t\t\t\t\t\tloopCells[j]._DT_CellIndex.row = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Delete from the display arrays\n\t\t\t_fnDeleteIndex( settings.aiDisplayMaster, row );\n\t\t\t_fnDeleteIndex( settings.aiDisplay, row );\n\t\t\t_fnDeleteIndex( that[ thatIdx ], row, false ); // maintain local indexes\n\t\n\t\t\t// Check for an 'overflow' they case for displaying the table\n\t\t\t_fnLengthOverflow( settings );\n\t\n\t\t\t// Remove the row's ID reference if there is one\n\t\t\tvar id = settings.rowIdFn( rowData._aData );\n\t\t\tif ( id !== undefined ) {\n\t\t\t\tdelete settings.aIds[ id ];\n\t\t\t}\n\t\t} );\n\t\n\t\tthis.iterator( 'table', function ( settings ) {\n\t\t\tfor ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\t\tsettings.aoData[i].idx = i;\n\t\t\t}\n\t\t} );\n\t\n\t\treturn this;\n\t} );\n\t\n\t\n\t_api_register( 'rows.add()', function ( rows ) {\n\t\tvar newRows = this.iterator( 'table', function ( settings ) {\n\t\t\t\tvar row, i, ien;\n\t\t\t\tvar out = [];\n\t\n\t\t\t\tfor ( i=0, ien=rows.length ; i<ien ; i++ ) {\n\t\t\t\t\trow = rows[i];\n\t\n\t\t\t\t\tif ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {\n\t\t\t\t\t\tout.push( _fnAddTr( settings, row )[0] );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tout.push( _fnAddData( settings, row ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\treturn out;\n\t\t\t}, 1 );\n\t\n\t\t// Return an Api.rows() extended instance, so rows().nodes() etc can be used\n\t\tvar modRows = this.rows( -1 );\n\t\tmodRows.pop();\n\t\t$.merge( modRows, newRows );\n\t\n\t\treturn modRows;\n\t} );\n\t\n\t\n\t\n\t\n\t\n\t/**\n\t *\n\t */\n\t_api_register( 'row()', function ( selector, opts ) {\n\t\treturn _selector_first( this.rows( selector, opts ) );\n\t} );\n\t\n\t\n\t_api_register( 'row().data()', function ( data ) {\n\t\tvar ctx = this.context;\n\t\n\t\tif ( data === undefined ) {\n\t\t\t// Get\n\t\t\treturn ctx.length && this.length ?\n\t\t\t\tctx[0].aoData[ this[0] ]._aData :\n\t\t\t\tundefined;\n\t\t}\n\t\n\t\t// Set\n\t\tctx[0].aoData[ this[0] ]._aData = data;\n\t\n\t\t// Automatically invalidate\n\t\t_fnInvalidate( ctx[0], this[0], 'data' );\n\t\n\t\treturn this;\n\t} );\n\t\n\t\n\t_api_register( 'row().node()', function () {\n\t\tvar ctx = this.context;\n\t\n\t\treturn ctx.length && this.length ?\n\t\t\tctx[0].aoData[ this[0] ].nTr || null :\n\t\t\tnull;\n\t} );\n\t\n\t\n\t_api_register( 'row.add()', function ( row ) {\n\t\t// Allow a jQuery object to be passed in - only a single row is added from\n\t\t// it though - the first element in the set\n\t\tif ( row instanceof $ && row.length ) {\n\t\t\trow = row[0];\n\t\t}\n\t\n\t\tvar rows = this.iterator( 'table', function ( settings ) {\n\t\t\tif ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {\n\t\t\t\treturn _fnAddTr( settings, row )[0];\n\t\t\t}\n\t\t\treturn _fnAddData( settings, row );\n\t\t} );\n\t\n\t\t// Return an Api.rows() extended instance, with the newly added row selected\n\t\treturn this.row( rows[0] );\n\t} );\n\t\n\t\n\t\n\tvar __details_add = function ( ctx, row, data, klass )\n\t{\n\t\t// Convert to array of TR elements\n\t\tvar rows = [];\n\t\tvar addRow = function ( r, k ) {\n\t\t\t// Recursion to allow for arrays of jQuery objects\n\t\t\tif ( $.isArray( r ) || r instanceof $ ) {\n\t\t\t\tfor ( var i=0, ien=r.length ; i<ien ; i++ ) {\n\t\t\t\t\taddRow( r[i], k );\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// If we get a TR element, then just add it directly - up to the dev\n\t\t\t// to add the correct number of columns etc\n\t\t\tif ( r.nodeName && r.nodeName.toLowerCase() === 'tr' ) {\n\t\t\t\trows.push( r );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Otherwise create a row with a wrapper\n\t\t\t\tvar created = $('<tr><td/></tr>').addClass( k );\n\t\t\t\t$('td', created)\n\t\t\t\t\t.addClass( k )\n\t\t\t\t\t.html( r )\n\t\t\t\t\t[0].colSpan = _fnVisbleColumns( ctx );\n\t\n\t\t\t\trows.push( created[0] );\n\t\t\t}\n\t\t};\n\t\n\t\taddRow( data, klass );\n\t\n\t\tif ( row._details ) {\n\t\t\trow._details.remove();\n\t\t}\n\t\n\t\trow._details = $(rows);\n\t\n\t\t// If the children were already shown, that state should be retained\n\t\tif ( row._detailsShow ) {\n\t\t\trow._details.insertAfter( row.nTr );\n\t\t}\n\t};\n\t\n\t\n\tvar __details_remove = function ( api, idx )\n\t{\n\t\tvar ctx = api.context;\n\t\n\t\tif ( ctx.length ) {\n\t\t\tvar row = ctx[0].aoData[ idx !== undefined ? idx : api[0] ];\n\t\n\t\t\tif ( row && row._details ) {\n\t\t\t\trow._details.remove();\n\t\n\t\t\t\trow._detailsShow = undefined;\n\t\t\t\trow._details = undefined;\n\t\t\t}\n\t\t}\n\t};\n\t\n\t\n\tvar __details_display = function ( api, show ) {\n\t\tvar ctx = api.context;\n\t\n\t\tif ( ctx.length && api.length ) {\n\t\t\tvar row = ctx[0].aoData[ api[0] ];\n\t\n\t\t\tif ( row._details ) {\n\t\t\t\trow._detailsShow = show;\n\t\n\t\t\t\tif ( show ) {\n\t\t\t\t\trow._details.insertAfter( row.nTr );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trow._details.detach();\n\t\t\t\t}\n\t\n\t\t\t\t__details_events( ctx[0] );\n\t\t\t}\n\t\t}\n\t};\n\t\n\t\n\tvar __details_events = function ( settings )\n\t{\n\t\tvar api = new _Api( settings );\n\t\tvar namespace = '.dt.DT_details';\n\t\tvar drawEvent = 'draw'+namespace;\n\t\tvar colvisEvent = 'column-visibility'+namespace;\n\t\tvar destroyEvent = 'destroy'+namespace;\n\t\tvar data = settings.aoData;\n\t\n\t\tapi.off( drawEvent +' '+ colvisEvent +' '+ destroyEvent );\n\t\n\t\tif ( _pluck( data, '_details' ).length > 0 ) {\n\t\t\t// On each draw, insert the required elements into the document\n\t\t\tapi.on( drawEvent, function ( e, ctx ) {\n\t\t\t\tif ( settings !== ctx ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tapi.rows( {page:'current'} ).eq(0).each( function (idx) {\n\t\t\t\t\t// Internal data grab\n\t\t\t\t\tvar row = data[ idx ];\n\t\n\t\t\t\t\tif ( row._detailsShow ) {\n\t\t\t\t\t\trow._details.insertAfter( row.nTr );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t\n\t\t\t// Column visibility change - update the colspan\n\t\t\tapi.on( colvisEvent, function ( e, ctx, idx, vis ) {\n\t\t\t\tif ( settings !== ctx ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\t// Update the colspan for the details rows (note, only if it already has\n\t\t\t\t// a colspan)\n\t\t\t\tvar row, visible = _fnVisbleColumns( ctx );\n\t\n\t\t\t\tfor ( var i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t\t\t\trow = data[i];\n\t\n\t\t\t\t\tif ( row._details ) {\n\t\t\t\t\t\trow._details.children('td[colspan]').attr('colspan', visible );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\n\t\t\t// Table destroyed - nuke any child rows\n\t\t\tapi.on( destroyEvent, function ( e, ctx ) {\n\t\t\t\tif ( settings !== ctx ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tfor ( var i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t\t\t\tif ( data[i]._details ) {\n\t\t\t\t\t\t__details_remove( api, i );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t};\n\t\n\t// Strings for the method names to help minification\n\tvar _emp = '';\n\tvar _child_obj = _emp+'row().child';\n\tvar _child_mth = _child_obj+'()';\n\t\n\t// data can be:\n\t// tr\n\t// string\n\t// jQuery or array of any of the above\n\t_api_register( _child_mth, function ( data, klass ) {\n\t\tvar ctx = this.context;\n\t\n\t\tif ( data === undefined ) {\n\t\t\t// get\n\t\t\treturn ctx.length && this.length ?\n\t\t\t\tctx[0].aoData[ this[0] ]._details :\n\t\t\t\tundefined;\n\t\t}\n\t\telse if ( data === true ) {\n\t\t\t// show\n\t\t\tthis.child.show();\n\t\t}\n\t\telse if ( data === false ) {\n\t\t\t// remove\n\t\t\t__details_remove( this );\n\t\t}\n\t\telse if ( ctx.length && this.length ) {\n\t\t\t// set\n\t\t\t__details_add( ctx[0], ctx[0].aoData[ this[0] ], data, klass );\n\t\t}\n\t\n\t\treturn this;\n\t} );\n\t\n\t\n\t_api_register( [\n\t\t_child_obj+'.show()',\n\t\t_child_mth+'.show()' // only when `child()` was called with parameters (without\n\t], function ( show ) { // it returns an object and this method is not executed)\n\t\t__details_display( this, true );\n\t\treturn this;\n\t} );\n\t\n\t\n\t_api_register( [\n\t\t_child_obj+'.hide()',\n\t\t_child_mth+'.hide()' // only when `child()` was called with parameters (without\n\t], function () { // it returns an object and this method is not executed)\n\t\t__details_display( this, false );\n\t\treturn this;\n\t} );\n\t\n\t\n\t_api_register( [\n\t\t_child_obj+'.remove()',\n\t\t_child_mth+'.remove()' // only when `child()` was called with parameters (without\n\t], function () { // it returns an object and this method is not executed)\n\t\t__details_remove( this );\n\t\treturn this;\n\t} );\n\t\n\t\n\t_api_register( _child_obj+'.isShown()', function () {\n\t\tvar ctx = this.context;\n\t\n\t\tif ( ctx.length && this.length ) {\n\t\t\t// _detailsShown as false or undefined will fall through to return false\n\t\t\treturn ctx[0].aoData[ this[0] ]._detailsShow || false;\n\t\t}\n\t\treturn false;\n\t} );\n\t\n\t\n\t\n\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t * Columns\n\t *\n\t * {integer} - column index (>=0 count from left, <0 count from right)\n\t * \"{integer}:visIdx\" - visible column index (i.e. translate to column index) (>=0 count from left, <0 count from right)\n\t * \"{integer}:visible\" - alias for {integer}:visIdx (>=0 count from left, <0 count from right)\n\t * \"{string}:name\" - column name\n\t * \"{string}\" - jQuery selector on column header nodes\n\t *\n\t */\n\t\n\t// can be an array of these items, comma separated list, or an array of comma\n\t// separated lists\n\t\n\tvar __re_column_selector = /^(.+):(name|visIdx|visible)$/;\n\t\n\t\n\t// r1 and r2 are redundant - but it means that the parameters match for the\n\t// iterator callback in columns().data()\n\tvar __columnData = function ( settings, column, r1, r2, rows ) {\n\t\tvar a = [];\n\t\tfor ( var row=0, ien=rows.length ; row<ien ; row++ ) {\n\t\t\ta.push( _fnGetCellData( settings, rows[row], column ) );\n\t\t}\n\t\treturn a;\n\t};\n\t\n\t\n\tvar __column_selector = function ( settings, selector, opts )\n\t{\n\t\tvar\n\t\t\tcolumns = settings.aoColumns,\n\t\t\tnames = _pluck( columns, 'sName' ),\n\t\t\tnodes = _pluck( columns, 'nTh' );\n\t\n\t\tvar run = function ( s ) {\n\t\t\tvar selInt = _intVal( s );\n\t\n\t\t\t// Selector - all\n\t\t\tif ( s === '' ) {\n\t\t\t\treturn _range( columns.length );\n\t\t\t}\n\t\t\t\n\t\t\t// Selector - index\n\t\t\tif ( selInt !== null ) {\n\t\t\t\treturn [ selInt >= 0 ?\n\t\t\t\t\tselInt : // Count from left\n\t\t\t\t\tcolumns.length + selInt // Count from right (+ because its a negative value)\n\t\t\t\t];\n\t\t\t}\n\t\t\t\n\t\t\t// Selector = function\n\t\t\tif ( typeof s === 'function' ) {\n\t\t\t\tvar rows = _selector_row_indexes( settings, opts );\n\t\n\t\t\t\treturn $.map( columns, function (col, idx) {\n\t\t\t\t\treturn s(\n\t\t\t\t\t\t\tidx,\n\t\t\t\t\t\t\t__columnData( settings, idx, 0, 0, rows ),\n\t\t\t\t\t\t\tnodes[ idx ]\n\t\t\t\t\t\t) ? idx : null;\n\t\t\t\t} );\n\t\t\t}\n\t\n\t\t\t// jQuery or string selector\n\t\t\tvar match = typeof s === 'string' ?\n\t\t\t\ts.match( __re_column_selector ) :\n\t\t\t\t'';\n\t\n\t\t\tif ( match ) {\n\t\t\t\tswitch( match[2] ) {\n\t\t\t\t\tcase 'visIdx':\n\t\t\t\t\tcase 'visible':\n\t\t\t\t\t\tvar idx = parseInt( match[1], 10 );\n\t\t\t\t\t\t// Visible index given, convert to column index\n\t\t\t\t\t\tif ( idx < 0 ) {\n\t\t\t\t\t\t\t// Counting from the right\n\t\t\t\t\t\t\tvar visColumns = $.map( columns, function (col,i) {\n\t\t\t\t\t\t\t\treturn col.bVisible ? i : null;\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\treturn [ visColumns[ visColumns.length + idx ] ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Counting from the left\n\t\t\t\t\t\treturn [ _fnVisibleToColumnIndex( settings, idx ) ];\n\t\n\t\t\t\t\tcase 'name':\n\t\t\t\t\t\t// match by name. `names` is column index complete and in order\n\t\t\t\t\t\treturn $.map( names, function (name, i) {\n\t\t\t\t\t\t\treturn name === match[1] ? i : null;\n\t\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// jQuery selector on the TH elements for the columns\n\t\t\t\treturn $( nodes )\n\t\t\t\t\t.filter( s )\n\t\t\t\t\t.map( function () {\n\t\t\t\t\t\treturn $.inArray( this, nodes ); // `nodes` is column index complete and in order\n\t\t\t\t\t} )\n\t\t\t\t\t.toArray();\n\t\t\t}\n\t\t};\n\t\n\t\treturn _selector_run( 'column', selector, run, settings, opts );\n\t};\n\t\n\t\n\tvar __setColumnVis = function ( settings, column, vis, recalc ) {\n\t\tvar\n\t\t\tcols = settings.aoColumns,\n\t\t\tcol = cols[ column ],\n\t\t\tdata = settings.aoData,\n\t\t\trow, cells, i, ien, tr;\n\t\n\t\t// Get\n\t\tif ( vis === undefined ) {\n\t\t\treturn col.bVisible;\n\t\t}\n\t\n\t\t// Set\n\t\t// No change\n\t\tif ( col.bVisible === vis ) {\n\t\t\treturn;\n\t\t}\n\t\n\t\tif ( vis ) {\n\t\t\t// Insert column\n\t\t\t// Need to decide if we should use appendChild or insertBefore\n\t\t\tvar insertBefore = $.inArray( true, _pluck(cols, 'bVisible'), column+1 );\n\t\n\t\t\tfor ( i=0, ien=data.length ; i<ien ; i++ ) {\n\t\t\t\ttr = data[i].nTr;\n\t\t\t\tcells = data[i].anCells;\n\t\n\t\t\t\tif ( tr ) {\n\t\t\t\t\t// insertBefore can act like appendChild if 2nd arg is null\n\t\t\t\t\ttr.insertBefore( cells[ column ], cells[ insertBefore ] || null );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Remove column\n\t\t\t$( _pluck( settings.aoData, 'anCells', column ) ).detach();\n\t\t}\n\t\n\t\t// Common actions\n\t\tcol.bVisible = vis;\n\t\t_fnDrawHead( settings, settings.aoHeader );\n\t\t_fnDrawHead( settings, settings.aoFooter );\n\t\n\t\tif ( recalc === undefined || recalc ) {\n\t\t\t// Automatically adjust column sizing\n\t\t\t_fnAdjustColumnSizing( settings );\n\t\n\t\t\t// Realign columns for scrolling\n\t\t\tif ( settings.oScroll.sX || settings.oScroll.sY ) {\n\t\t\t\t_fnScrollDraw( settings );\n\t\t\t}\n\t\t}\n\t\n\t\t_fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis, recalc] );\n\t\n\t\t_fnSaveState( settings );\n\t};\n\t\n\t\n\t_api_register( 'columns()', function ( selector, opts ) {\n\t\t// argument shifting\n\t\tif ( selector === undefined ) {\n\t\t\tselector = '';\n\t\t}\n\t\telse if ( $.isPlainObject( selector ) ) {\n\t\t\topts = selector;\n\t\t\tselector = '';\n\t\t}\n\t\n\t\topts = _selector_opts( opts );\n\t\n\t\tvar inst = this.iterator( 'table', function ( settings ) {\n\t\t\treturn __column_selector( settings, selector, opts );\n\t\t}, 1 );\n\t\n\t\t// Want argument shifting here and in _row_selector?\n\t\tinst.selector.cols = selector;\n\t\tinst.selector.opts = opts;\n\t\n\t\treturn inst;\n\t} );\n\t\n\t_api_registerPlural( 'columns().header()', 'column().header()', function ( selector, opts ) {\n\t\treturn this.iterator( 'column', function ( settings, column ) {\n\t\t\treturn settings.aoColumns[column].nTh;\n\t\t}, 1 );\n\t} );\n\t\n\t_api_registerPlural( 'columns().footer()', 'column().footer()', function ( selector, opts ) {\n\t\treturn this.iterator( 'column', function ( settings, column ) {\n\t\t\treturn settings.aoColumns[column].nTf;\n\t\t}, 1 );\n\t} );\n\t\n\t_api_registerPlural( 'columns().data()', 'column().data()', function () {\n\t\treturn this.iterator( 'column-rows', __columnData, 1 );\n\t} );\n\t\n\t_api_registerPlural( 'columns().dataSrc()', 'column().dataSrc()', function () {\n\t\treturn this.iterator( 'column', function ( settings, column ) {\n\t\t\treturn settings.aoColumns[column].mData;\n\t\t}, 1 );\n\t} );\n\t\n\t_api_registerPlural( 'columns().cache()', 'column().cache()', function ( type ) {\n\t\treturn this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {\n\t\t\treturn _pluck_order( settings.aoData, rows,\n\t\t\t\ttype === 'search' ? '_aFilterData' : '_aSortData', column\n\t\t\t);\n\t\t}, 1 );\n\t} );\n\t\n\t_api_registerPlural( 'columns().nodes()', 'column().nodes()', function () {\n\t\treturn this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {\n\t\t\treturn _pluck_order( settings.aoData, rows, 'anCells', column ) ;\n\t\t}, 1 );\n\t} );\n\t\n\t_api_registerPlural( 'columns().visible()', 'column().visible()', function ( vis, calc ) {\n\t\treturn this.iterator( 'column', function ( settings, column ) {\n\t\t\tif ( vis === undefined ) {\n\t\t\t\treturn settings.aoColumns[ column ].bVisible;\n\t\t\t} // else\n\t\t\t__setColumnVis( settings, column, vis, calc );\n\t\t} );\n\t} );\n\t\n\t_api_registerPlural( 'columns().indexes()', 'column().index()', function ( type ) {\n\t\treturn this.iterator( 'column', function ( settings, column ) {\n\t\t\treturn type === 'visible' ?\n\t\t\t\t_fnColumnIndexToVisible( settings, column ) :\n\t\t\t\tcolumn;\n\t\t}, 1 );\n\t} );\n\t\n\t_api_register( 'columns.adjust()', function () {\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\t_fnAdjustColumnSizing( settings );\n\t\t}, 1 );\n\t} );\n\t\n\t_api_register( 'column.index()', function ( type, idx ) {\n\t\tif ( this.context.length !== 0 ) {\n\t\t\tvar ctx = this.context[0];\n\t\n\t\t\tif ( type === 'fromVisible' || type === 'toData' ) {\n\t\t\t\treturn _fnVisibleToColumnIndex( ctx, idx );\n\t\t\t}\n\t\t\telse if ( type === 'fromData' || type === 'toVisible' ) {\n\t\t\t\treturn _fnColumnIndexToVisible( ctx, idx );\n\t\t\t}\n\t\t}\n\t} );\n\t\n\t_api_register( 'column()', function ( selector, opts ) {\n\t\treturn _selector_first( this.columns( selector, opts ) );\n\t} );\n\t\n\t\n\t\n\t\n\tvar __cell_selector = function ( settings, selector, opts )\n\t{\n\t\tvar data = settings.aoData;\n\t\tvar rows = _selector_row_indexes( settings, opts );\n\t\tvar cells = _removeEmpty( _pluck_order( data, rows, 'anCells' ) );\n\t\tvar allCells = $( [].concat.apply([], cells) );\n\t\tvar row;\n\t\tvar columns = settings.aoColumns.length;\n\t\tvar a, i, ien, j, o, host;\n\t\n\t\tvar run = function ( s ) {\n\t\t\tvar fnSelector = typeof s === 'function';\n\t\n\t\t\tif ( s === null || s === undefined || fnSelector ) {\n\t\t\t\t// All cells and function selectors\n\t\t\t\ta = [];\n\t\n\t\t\t\tfor ( i=0, ien=rows.length ; i<ien ; i++ ) {\n\t\t\t\t\trow = rows[i];\n\t\n\t\t\t\t\tfor ( j=0 ; j<columns ; j++ ) {\n\t\t\t\t\t\to = {\n\t\t\t\t\t\t\trow: row,\n\t\t\t\t\t\t\tcolumn: j\n\t\t\t\t\t\t};\n\t\n\t\t\t\t\t\tif ( fnSelector ) {\n\t\t\t\t\t\t\t// Selector - function\n\t\t\t\t\t\t\thost = data[ row ];\n\t\n\t\t\t\t\t\t\tif ( s( o, _fnGetCellData(settings, row, j), host.anCells ? host.anCells[j] : null ) ) {\n\t\t\t\t\t\t\t\ta.push( o );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Selector - all\n\t\t\t\t\t\t\ta.push( o );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\t\n\t\t\t// Selector - index\n\t\t\tif ( $.isPlainObject( s ) ) {\n\t\t\t\treturn [s];\n\t\t\t}\n\t\n\t\t\t// Selector - jQuery filtered cells\n\t\t\treturn allCells\n\t\t\t\t.filter( s )\n\t\t\t\t.map( function (i, el) {\n\t\t\t\t\treturn { // use a new object, in case someone changes the values\n\t\t\t\t\t\trow: el._DT_CellIndex.row,\n\t\t\t\t\t\tcolumn: el._DT_CellIndex.column\n\t \t\t\t\t};\n\t\t\t\t} )\n\t\t\t\t.toArray();\n\t\t};\n\t\n\t\treturn _selector_run( 'cell', selector, run, settings, opts );\n\t};\n\t\n\t\n\t\n\t\n\t_api_register( 'cells()', function ( rowSelector, columnSelector, opts ) {\n\t\t// Argument shifting\n\t\tif ( $.isPlainObject( rowSelector ) ) {\n\t\t\t// Indexes\n\t\t\tif ( rowSelector.row === undefined ) {\n\t\t\t\t// Selector options in first parameter\n\t\t\t\topts = rowSelector;\n\t\t\t\trowSelector = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Cell index objects in first parameter\n\t\t\t\topts = columnSelector;\n\t\t\t\tcolumnSelector = null;\n\t\t\t}\n\t\t}\n\t\tif ( $.isPlainObject( columnSelector ) ) {\n\t\t\topts = columnSelector;\n\t\t\tcolumnSelector = null;\n\t\t}\n\t\n\t\t// Cell selector\n\t\tif ( columnSelector === null || columnSelector === undefined ) {\n\t\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\t\treturn __cell_selector( settings, rowSelector, _selector_opts( opts ) );\n\t\t\t} );\n\t\t}\n\t\n\t\t// Row + column selector\n\t\tvar columns = this.columns( columnSelector, opts );\n\t\tvar rows = this.rows( rowSelector, opts );\n\t\tvar a, i, ien, j, jen;\n\t\n\t\tvar cells = this.iterator( 'table', function ( settings, idx ) {\n\t\t\ta = [];\n\t\n\t\t\tfor ( i=0, ien=rows[idx].length ; i<ien ; i++ ) {\n\t\t\t\tfor ( j=0, jen=columns[idx].length ; j<jen ; j++ ) {\n\t\t\t\t\ta.push( {\n\t\t\t\t\t\trow: rows[idx][i],\n\t\t\t\t\t\tcolumn: columns[idx][j]\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn a;\n\t\t}, 1 );\n\t\n\t\t$.extend( cells.selector, {\n\t\t\tcols: columnSelector,\n\t\t\trows: rowSelector,\n\t\t\topts: opts\n\t\t} );\n\t\n\t\treturn cells;\n\t} );\n\t\n\t\n\t_api_registerPlural( 'cells().nodes()', 'cell().node()', function () {\n\t\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\t\tvar cells = settings.aoData[ row ].anCells;\n\t\t\treturn cells ?\n\t\t\t\tcells[ column ] :\n\t\t\t\tundefined;\n\t\t}, 1 );\n\t} );\n\t\n\t\n\t_api_register( 'cells().data()', function () {\n\t\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\t\treturn _fnGetCellData( settings, row, column );\n\t\t}, 1 );\n\t} );\n\t\n\t\n\t_api_registerPlural( 'cells().cache()', 'cell().cache()', function ( type ) {\n\t\ttype = type === 'search' ? '_aFilterData' : '_aSortData';\n\t\n\t\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\t\treturn settings.aoData[ row ][ type ][ column ];\n\t\t}, 1 );\n\t} );\n\t\n\t\n\t_api_registerPlural( 'cells().render()', 'cell().render()', function ( type ) {\n\t\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\t\treturn _fnGetCellData( settings, row, column, type );\n\t\t}, 1 );\n\t} );\n\t\n\t\n\t_api_registerPlural( 'cells().indexes()', 'cell().index()', function () {\n\t\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\t\treturn {\n\t\t\t\trow: row,\n\t\t\t\tcolumn: column,\n\t\t\t\tcolumnVisible: _fnColumnIndexToVisible( settings, column )\n\t\t\t};\n\t\t}, 1 );\n\t} );\n\t\n\t\n\t_api_registerPlural( 'cells().invalidate()', 'cell().invalidate()', function ( src ) {\n\t\treturn this.iterator( 'cell', function ( settings, row, column ) {\n\t\t\t_fnInvalidate( settings, row, src, column );\n\t\t} );\n\t} );\n\t\n\t\n\t\n\t_api_register( 'cell()', function ( rowSelector, columnSelector, opts ) {\n\t\treturn _selector_first( this.cells( rowSelector, columnSelector, opts ) );\n\t} );\n\t\n\t\n\t_api_register( 'cell().data()', function ( data ) {\n\t\tvar ctx = this.context;\n\t\tvar cell = this[0];\n\t\n\t\tif ( data === undefined ) {\n\t\t\t// Get\n\t\t\treturn ctx.length && cell.length ?\n\t\t\t\t_fnGetCellData( ctx[0], cell[0].row, cell[0].column ) :\n\t\t\t\tundefined;\n\t\t}\n\t\n\t\t// Set\n\t\t_fnSetCellData( ctx[0], cell[0].row, cell[0].column, data );\n\t\t_fnInvalidate( ctx[0], cell[0].row, 'data', cell[0].column );\n\t\n\t\treturn this;\n\t} );\n\t\n\t\n\t\n\t/**\n\t * Get current ordering (sorting) that has been applied to the table.\n\t *\n\t * @returns {array} 2D array containing the sorting information for the first\n\t * table in the current context. Each element in the parent array represents\n\t * a column being sorted upon (i.e. multi-sorting with two columns would have\n\t * 2 inner arrays). The inner arrays may have 2 or 3 elements. The first is\n\t * the column index that the sorting condition applies to, the second is the\n\t * direction of the sort (`desc` or `asc`) and, optionally, the third is the\n\t * index of the sorting order from the `column.sorting` initialisation array.\n\t *//**\n\t * Set the ordering for the table.\n\t *\n\t * @param {integer} order Column index to sort upon.\n\t * @param {string} direction Direction of the sort to be applied (`asc` or `desc`)\n\t * @returns {DataTables.Api} this\n\t *//**\n\t * Set the ordering for the table.\n\t *\n\t * @param {array} order 1D array of sorting information to be applied.\n\t * @param {array} [...] Optional additional sorting conditions\n\t * @returns {DataTables.Api} this\n\t *//**\n\t * Set the ordering for the table.\n\t *\n\t * @param {array} order 2D array of sorting information to be applied.\n\t * @returns {DataTables.Api} this\n\t */\n\t_api_register( 'order()', function ( order, dir ) {\n\t\tvar ctx = this.context;\n\t\n\t\tif ( order === undefined ) {\n\t\t\t// get\n\t\t\treturn ctx.length !== 0 ?\n\t\t\t\tctx[0].aaSorting :\n\t\t\t\tundefined;\n\t\t}\n\t\n\t\t// set\n\t\tif ( typeof order === 'number' ) {\n\t\t\t// Simple column / direction passed in\n\t\t\torder = [ [ order, dir ] ];\n\t\t}\n\t\telse if ( ! $.isArray( order[0] ) ) {\n\t\t\t// Arguments passed in (list of 1D arrays)\n\t\t\torder = Array.prototype.slice.call( arguments );\n\t\t}\n\t\t// otherwise a 2D array was passed in\n\t\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\tsettings.aaSorting = order.slice();\n\t\t} );\n\t} );\n\t\n\t\n\t/**\n\t * Attach a sort listener to an element for a given column\n\t *\n\t * @param {node|jQuery|string} node Identifier for the element(s) to attach the\n\t * listener to. This can take the form of a single DOM node, a jQuery\n\t * collection of nodes or a jQuery selector which will identify the node(s).\n\t * @param {integer} column the column that a click on this node will sort on\n\t * @param {function} [callback] callback function when sort is run\n\t * @returns {DataTables.Api} this\n\t */\n\t_api_register( 'order.listener()', function ( node, column, callback ) {\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\t_fnSortAttachListener( settings, node, column, callback );\n\t\t} );\n\t} );\n\t\n\t\n\t_api_register( 'order.fixed()', function ( set ) {\n\t\tif ( ! set ) {\n\t\t\tvar ctx = this.context;\n\t\t\tvar fixed = ctx.length ?\n\t\t\t\tctx[0].aaSortingFixed :\n\t\t\t\tundefined;\n\t\n\t\t\treturn $.isArray( fixed ) ?\n\t\t\t\t{ pre: fixed } :\n\t\t\t\tfixed;\n\t\t}\n\t\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\tsettings.aaSortingFixed = $.extend( true, {}, set );\n\t\t} );\n\t} );\n\t\n\t\n\t// Order by the selected column(s)\n\t_api_register( [\n\t\t'columns().order()',\n\t\t'column().order()'\n\t], function ( dir ) {\n\t\tvar that = this;\n\t\n\t\treturn this.iterator( 'table', function ( settings, i ) {\n\t\t\tvar sort = [];\n\t\n\t\t\t$.each( that[i], function (j, col) {\n\t\t\t\tsort.push( [ col, dir ] );\n\t\t\t} );\n\t\n\t\t\tsettings.aaSorting = sort;\n\t\t} );\n\t} );\n\t\n\t\n\t\n\t_api_register( 'search()', function ( input, regex, smart, caseInsen ) {\n\t\tvar ctx = this.context;\n\t\n\t\tif ( input === undefined ) {\n\t\t\t// get\n\t\t\treturn ctx.length !== 0 ?\n\t\t\t\tctx[0].oPreviousSearch.sSearch :\n\t\t\t\tundefined;\n\t\t}\n\t\n\t\t// set\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\tif ( ! settings.oFeatures.bFilter ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t_fnFilterComplete( settings, $.extend( {}, settings.oPreviousSearch, {\n\t\t\t\t\"sSearch\": input+\"\",\n\t\t\t\t\"bRegex\": regex === null ? false : regex,\n\t\t\t\t\"bSmart\": smart === null ? true : smart,\n\t\t\t\t\"bCaseInsensitive\": caseInsen === null ? true : caseInsen\n\t\t\t} ), 1 );\n\t\t} );\n\t} );\n\t\n\t\n\t_api_registerPlural(\n\t\t'columns().search()',\n\t\t'column().search()',\n\t\tfunction ( input, regex, smart, caseInsen ) {\n\t\t\treturn this.iterator( 'column', function ( settings, column ) {\n\t\t\t\tvar preSearch = settings.aoPreSearchCols;\n\t\n\t\t\t\tif ( input === undefined ) {\n\t\t\t\t\t// get\n\t\t\t\t\treturn preSearch[ column ].sSearch;\n\t\t\t\t}\n\t\n\t\t\t\t// set\n\t\t\t\tif ( ! settings.oFeatures.bFilter ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\t$.extend( preSearch[ column ], {\n\t\t\t\t\t\"sSearch\": input+\"\",\n\t\t\t\t\t\"bRegex\": regex === null ? false : regex,\n\t\t\t\t\t\"bSmart\": smart === null ? true : smart,\n\t\t\t\t\t\"bCaseInsensitive\": caseInsen === null ? true : caseInsen\n\t\t\t\t} );\n\t\n\t\t\t\t_fnFilterComplete( settings, settings.oPreviousSearch, 1 );\n\t\t\t} );\n\t\t}\n\t);\n\t\n\t/*\n\t * State API methods\n\t */\n\t\n\t_api_register( 'state()', function () {\n\t\treturn this.context.length ?\n\t\t\tthis.context[0].oSavedState :\n\t\t\tnull;\n\t} );\n\t\n\t\n\t_api_register( 'state.clear()', function () {\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\t// Save an empty object\n\t\t\tsettings.fnStateSaveCallback.call( settings.oInstance, settings, {} );\n\t\t} );\n\t} );\n\t\n\t\n\t_api_register( 'state.loaded()', function () {\n\t\treturn this.context.length ?\n\t\t\tthis.context[0].oLoadedState :\n\t\t\tnull;\n\t} );\n\t\n\t\n\t_api_register( 'state.save()', function () {\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\t_fnSaveState( settings );\n\t\t} );\n\t} );\n\t\n\t\n\t\n\t/**\n\t * Provide a common method for plug-ins to check the version of DataTables being\n\t * used, in order to ensure compatibility.\n\t *\n\t * @param {string} version Version string to check for, in the format \"X.Y.Z\".\n\t * Note that the formats \"X\" and \"X.Y\" are also acceptable.\n\t * @returns {boolean} true if this version of DataTables is greater or equal to\n\t * the required version, or false if this version of DataTales is not\n\t * suitable\n\t * @static\n\t * @dtopt API-Static\n\t *\n\t * @example\n\t * alert( $.fn.dataTable.versionCheck( '1.9.0' ) );\n\t */\n\tDataTable.versionCheck = DataTable.fnVersionCheck = function( version )\n\t{\n\t\tvar aThis = DataTable.version.split('.');\n\t\tvar aThat = version.split('.');\n\t\tvar iThis, iThat;\n\t\n\t\tfor ( var i=0, iLen=aThat.length ; i<iLen ; i++ ) {\n\t\t\tiThis = parseInt( aThis[i], 10 ) || 0;\n\t\t\tiThat = parseInt( aThat[i], 10 ) || 0;\n\t\n\t\t\t// Parts are the same, keep comparing\n\t\t\tif (iThis === iThat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\t// Parts are different, return immediately\n\t\t\treturn iThis > iThat;\n\t\t}\n\t\n\t\treturn true;\n\t};\n\t\n\t\n\t/**\n\t * Check if a `<table>` node is a DataTable table already or not.\n\t *\n\t * @param {node|jquery|string} table Table node, jQuery object or jQuery\n\t * selector for the table to test. Note that if more than more than one\n\t * table is passed on, only the first will be checked\n\t * @returns {boolean} true the table given is a DataTable, or false otherwise\n\t * @static\n\t * @dtopt API-Static\n\t *\n\t * @example\n\t * if ( ! $.fn.DataTable.isDataTable( '#example' ) ) {\n\t * $('#example').dataTable();\n\t * }\n\t */\n\tDataTable.isDataTable = DataTable.fnIsDataTable = function ( table )\n\t{\n\t\tvar t = $(table).get(0);\n\t\tvar is = false;\n\t\n\t\t$.each( DataTable.settings, function (i, o) {\n\t\t\tvar head = o.nScrollHead ? $('table', o.nScrollHead)[0] : null;\n\t\t\tvar foot = o.nScrollFoot ? $('table', o.nScrollFoot)[0] : null;\n\t\n\t\t\tif ( o.nTable === t || head === t || foot === t ) {\n\t\t\t\tis = true;\n\t\t\t}\n\t\t} );\n\t\n\t\treturn is;\n\t};\n\t\n\t\n\t/**\n\t * Get all DataTable tables that have been initialised - optionally you can\n\t * select to get only currently visible tables.\n\t *\n\t * @param {boolean} [visible=false] Flag to indicate if you want all (default)\n\t * or visible tables only.\n\t * @returns {array} Array of `table` nodes (not DataTable instances) which are\n\t * DataTables\n\t * @static\n\t * @dtopt API-Static\n\t *\n\t * @example\n\t * $.each( $.fn.dataTable.tables(true), function () {\n\t * $(table).DataTable().columns.adjust();\n\t * } );\n\t */\n\tDataTable.tables = DataTable.fnTables = function ( visible )\n\t{\n\t\tvar api = false;\n\t\n\t\tif ( $.isPlainObject( visible ) ) {\n\t\t\tapi = visible.api;\n\t\t\tvisible = visible.visible;\n\t\t}\n\t\n\t\tvar a = $.map( DataTable.settings, function (o) {\n\t\t\tif ( !visible || (visible && $(o.nTable).is(':visible')) ) {\n\t\t\t\treturn o.nTable;\n\t\t\t}\n\t\t} );\n\t\n\t\treturn api ?\n\t\t\tnew _Api( a ) :\n\t\t\ta;\n\t};\n\t\n\t\n\t/**\n\t * DataTables utility methods\n\t * \n\t * This namespace provides helper methods that DataTables uses internally to\n\t * create a DataTable, but which are not exclusively used only for DataTables.\n\t * These methods can be used by extension authors to save the duplication of\n\t * code.\n\t *\n\t * @namespace\n\t */\n\tDataTable.util = {\n\t\t/**\n\t\t * Throttle the calls to a function. Arguments and context are maintained\n\t\t * for the throttled function.\n\t\t *\n\t\t * @param {function} fn Function to be called\n\t\t * @param {integer} freq Call frequency in mS\n\t\t * @return {function} Wrapped function\n\t\t */\n\t\tthrottle: _fnThrottle,\n\t\n\t\n\t\t/**\n\t\t * Escape a string such that it can be used in a regular expression\n\t\t *\n\t\t * @param {string} sVal string to escape\n\t\t * @returns {string} escaped string\n\t\t */\n\t\tescapeRegex: _fnEscapeRegex\n\t};\n\t\n\t\n\t/**\n\t * Convert from camel case parameters to Hungarian notation. This is made public\n\t * for the extensions to provide the same ability as DataTables core to accept\n\t * either the 1.9 style Hungarian notation, or the 1.10+ style camelCase\n\t * parameters.\n\t *\n\t * @param {object} src The model object which holds all parameters that can be\n\t * mapped.\n\t * @param {object} user The object to convert from camel case to Hungarian.\n\t * @param {boolean} force When set to `true`, properties which already have a\n\t * Hungarian value in the `user` object will be overwritten. Otherwise they\n\t * won't be.\n\t */\n\tDataTable.camelToHungarian = _fnCamelToHungarian;\n\t\n\t\n\t\n\t/**\n\t *\n\t */\n\t_api_register( '$()', function ( selector, opts ) {\n\t\tvar\n\t\t\trows = this.rows( opts ).nodes(), // Get all rows\n\t\t\tjqRows = $(rows);\n\t\n\t\treturn $( [].concat(\n\t\t\tjqRows.filter( selector ).toArray(),\n\t\t\tjqRows.find( selector ).toArray()\n\t\t) );\n\t} );\n\t\n\t\n\t// jQuery functions to operate on the tables\n\t$.each( [ 'on', 'one', 'off' ], function (i, key) {\n\t\t_api_register( key+'()', function ( /* event, handler */ ) {\n\t\t\tvar args = Array.prototype.slice.call(arguments);\n\t\n\t\t\t// Add the `dt` namespace automatically if it isn't already present\n\t\t\tif ( ! args[0].match(/\\.dt\\b/) ) {\n\t\t\t\targs[0] += '.dt';\n\t\t\t}\n\t\n\t\t\tvar inst = $( this.tables().nodes() );\n\t\t\tinst[key].apply( inst, args );\n\t\t\treturn this;\n\t\t} );\n\t} );\n\t\n\t\n\t_api_register( 'clear()', function () {\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\t_fnClearTable( settings );\n\t\t} );\n\t} );\n\t\n\t\n\t_api_register( 'settings()', function () {\n\t\treturn new _Api( this.context, this.context );\n\t} );\n\t\n\t\n\t_api_register( 'init()', function () {\n\t\tvar ctx = this.context;\n\t\treturn ctx.length ? ctx[0].oInit : null;\n\t} );\n\t\n\t\n\t_api_register( 'data()', function () {\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\treturn _pluck( settings.aoData, '_aData' );\n\t\t} ).flatten();\n\t} );\n\t\n\t\n\t_api_register( 'destroy()', function ( remove ) {\n\t\tremove = remove || false;\n\t\n\t\treturn this.iterator( 'table', function ( settings ) {\n\t\t\tvar orig = settings.nTableWrapper.parentNode;\n\t\t\tvar classes = settings.oClasses;\n\t\t\tvar table = settings.nTable;\n\t\t\tvar tbody = settings.nTBody;\n\t\t\tvar thead = settings.nTHead;\n\t\t\tvar tfoot = settings.nTFoot;\n\t\t\tvar jqTable = $(table);\n\t\t\tvar jqTbody = $(tbody);\n\t\t\tvar jqWrapper = $(settings.nTableWrapper);\n\t\t\tvar rows = $.map( settings.aoData, function (r) { return r.nTr; } );\n\t\t\tvar i, ien;\n\t\n\t\t\t// Flag to note that the table is currently being destroyed - no action\n\t\t\t// should be taken\n\t\t\tsettings.bDestroying = true;\n\t\n\t\t\t// Fire off the destroy callbacks for plug-ins etc\n\t\t\t_fnCallbackFire( settings, \"aoDestroyCallback\", \"destroy\", [settings] );\n\t\n\t\t\t// If not being removed from the document, make all columns visible\n\t\t\tif ( ! remove ) {\n\t\t\t\tnew _Api( settings ).columns().visible( true );\n\t\t\t}\n\t\n\t\t\t// Blitz all `DT` namespaced events (these are internal events, the\n\t\t\t// lowercase, `dt` events are user subscribed and they are responsible\n\t\t\t// for removing them\n\t\t\tjqWrapper.unbind('.DT').find(':not(tbody *)').unbind('.DT');\n\t\t\t$(window).unbind('.DT-'+settings.sInstance);\n\t\n\t\t\t// When scrolling we had to break the table up - restore it\n\t\t\tif ( table != thead.parentNode ) {\n\t\t\t\tjqTable.children('thead').detach();\n\t\t\t\tjqTable.append( thead );\n\t\t\t}\n\t\n\t\t\tif ( tfoot && table != tfoot.parentNode ) {\n\t\t\t\tjqTable.children('tfoot').detach();\n\t\t\t\tjqTable.append( tfoot );\n\t\t\t}\n\t\n\t\t\tsettings.aaSorting = [];\n\t\t\tsettings.aaSortingFixed = [];\n\t\t\t_fnSortingClasses( settings );\n\t\n\t\t\t$( rows ).removeClass( settings.asStripeClasses.join(' ') );\n\t\n\t\t\t$('th, td', thead).removeClass( classes.sSortable+' '+\n\t\t\t\tclasses.sSortableAsc+' '+classes.sSortableDesc+' '+classes.sSortableNone\n\t\t\t);\n\t\n\t\t\tif ( settings.bJUI ) {\n\t\t\t\t$('th span.'+classes.sSortIcon+ ', td span.'+classes.sSortIcon, thead).detach();\n\t\t\t\t$('th, td', thead).each( function () {\n\t\t\t\t\tvar wrapper = $('div.'+classes.sSortJUIWrapper, this);\n\t\t\t\t\t$(this).append( wrapper.contents() );\n\t\t\t\t\twrapper.detach();\n\t\t\t\t} );\n\t\t\t}\n\t\n\t\t\t// Add the TR elements back into the table in their original order\n\t\t\tjqTbody.children().detach();\n\t\t\tjqTbody.append( rows );\n\t\n\t\t\t// Remove the DataTables generated nodes, events and classes\n\t\t\tvar removedMethod = remove ? 'remove' : 'detach';\n\t\t\tjqTable[ removedMethod ]();\n\t\t\tjqWrapper[ removedMethod ]();\n\t\n\t\t\t// If we need to reattach the table to the document\n\t\t\tif ( ! remove && orig ) {\n\t\t\t\t// insertBefore acts like appendChild if !arg[1]\n\t\t\t\torig.insertBefore( table, settings.nTableReinsertBefore );\n\t\n\t\t\t\t// Restore the width of the original table - was read from the style property,\n\t\t\t\t// so we can restore directly to that\n\t\t\t\tjqTable\n\t\t\t\t\t.css( 'width', settings.sDestroyWidth )\n\t\t\t\t\t.removeClass( classes.sTable );\n\t\n\t\t\t\t// If the were originally stripe classes - then we add them back here.\n\t\t\t\t// Note this is not fool proof (for example if not all rows had stripe\n\t\t\t\t// classes - but it's a good effort without getting carried away\n\t\t\t\tien = settings.asDestroyStripes.length;\n\t\n\t\t\t\tif ( ien ) {\n\t\t\t\t\tjqTbody.children().each( function (i) {\n\t\t\t\t\t\t$(this).addClass( settings.asDestroyStripes[i % ien] );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t/* Remove the settings object from the settings array */\n\t\t\tvar idx = $.inArray( settings, DataTable.settings );\n\t\t\tif ( idx !== -1 ) {\n\t\t\t\tDataTable.settings.splice( idx, 1 );\n\t\t\t}\n\t\t} );\n\t} );\n\t\n\t\n\t// Add the `every()` method for rows, columns and cells in a compact form\n\t$.each( [ 'column', 'row', 'cell' ], function ( i, type ) {\n\t\t_api_register( type+'s().every()', function ( fn ) {\n\t\t\tvar opts = this.selector.opts;\n\t\t\tvar api = this;\n\t\n\t\t\treturn this.iterator( type, function ( settings, arg1, arg2, arg3, arg4 ) {\n\t\t\t\t// Rows and columns:\n\t\t\t\t// arg1 - index\n\t\t\t\t// arg2 - table counter\n\t\t\t\t// arg3 - loop counter\n\t\t\t\t// arg4 - undefined\n\t\t\t\t// Cells:\n\t\t\t\t// arg1 - row index\n\t\t\t\t// arg2 - column index\n\t\t\t\t// arg3 - table counter\n\t\t\t\t// arg4 - loop counter\n\t\t\t\tfn.call(\n\t\t\t\t\tapi[ type ](\n\t\t\t\t\t\targ1,\n\t\t\t\t\t\ttype==='cell' ? arg2 : opts,\n\t\t\t\t\t\ttype==='cell' ? opts : undefined\n\t\t\t\t\t),\n\t\t\t\t\targ1, arg2, arg3, arg4\n\t\t\t\t);\n\t\t\t} );\n\t\t} );\n\t} );\n\t\n\t\n\t// i18n method for extensions to be able to use the language object from the\n\t// DataTable\n\t_api_register( 'i18n()', function ( token, def, plural ) {\n\t\tvar ctx = this.context[0];\n\t\tvar resolved = _fnGetObjectDataFn( token )( ctx.oLanguage );\n\t\n\t\tif ( resolved === undefined ) {\n\t\t\tresolved = def;\n\t\t}\n\t\n\t\tif ( plural !== undefined && $.isPlainObject( resolved ) ) {\n\t\t\tresolved = resolved[ plural ] !== undefined ?\n\t\t\t\tresolved[ plural ] :\n\t\t\t\tresolved._;\n\t\t}\n\t\n\t\treturn resolved.replace( '%d', plural ); // nb: plural might be undefined,\n\t} );\n\n\t/**\n\t * Version string for plug-ins to check compatibility. Allowed format is\n\t * `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used\n\t * only for non-release builds. See http://semver.org/ for more information.\n\t * @member\n\t * @type string\n\t * @default Version number\n\t */\n\tDataTable.version = \"1.10.10\";\n\n\t/**\n\t * Private data store, containing all of the settings objects that are\n\t * created for the tables on a given page.\n\t *\n\t * Note that the `DataTable.settings` object is aliased to\n\t * `jQuery.fn.dataTableExt` through which it may be accessed and\n\t * manipulated, or `jQuery.fn.dataTable.settings`.\n\t * @member\n\t * @type array\n\t * @default []\n\t * @private\n\t */\n\tDataTable.settings = [];\n\n\t/**\n\t * Object models container, for the various models that DataTables has\n\t * available to it. These models define the objects that are used to hold\n\t * the active state and configuration of the table.\n\t * @namespace\n\t */\n\tDataTable.models = {};\n\t\n\t\n\t\n\t/**\n\t * Template object for the way in which DataTables holds information about\n\t * search information for the global filter and individual column filters.\n\t * @namespace\n\t */\n\tDataTable.models.oSearch = {\n\t\t/**\n\t\t * Flag to indicate if the filtering should be case insensitive or not\n\t\t * @type boolean\n\t\t * @default true\n\t\t */\n\t\t\"bCaseInsensitive\": true,\n\t\n\t\t/**\n\t\t * Applied search term\n\t\t * @type string\n\t\t * @default <i>Empty string</i>\n\t\t */\n\t\t\"sSearch\": \"\",\n\t\n\t\t/**\n\t\t * Flag to indicate if the search term should be interpreted as a\n\t\t * regular expression (true) or not (false) and therefore and special\n\t\t * regex characters escaped.\n\t\t * @type boolean\n\t\t * @default false\n\t\t */\n\t\t\"bRegex\": false,\n\t\n\t\t/**\n\t\t * Flag to indicate if DataTables is to use its smart filtering or not.\n\t\t * @type boolean\n\t\t * @default true\n\t\t */\n\t\t\"bSmart\": true\n\t};\n\t\n\t\n\t\n\t\n\t/**\n\t * Template object for the way in which DataTables holds information about\n\t * each individual row. This is the object format used for the settings\n\t * aoData array.\n\t * @namespace\n\t */\n\tDataTable.models.oRow = {\n\t\t/**\n\t\t * TR element for the row\n\t\t * @type node\n\t\t * @default null\n\t\t */\n\t\t\"nTr\": null,\n\t\n\t\t/**\n\t\t * Array of TD elements for each row. This is null until the row has been\n\t\t * created.\n\t\t * @type array nodes\n\t\t * @default []\n\t\t */\n\t\t\"anCells\": null,\n\t\n\t\t/**\n\t\t * Data object from the original data source for the row. This is either\n\t\t * an array if using the traditional form of DataTables, or an object if\n\t\t * using mData options. The exact type will depend on the passed in\n\t\t * data from the data source, or will be an array if using DOM a data\n\t\t * source.\n\t\t * @type array|object\n\t\t * @default []\n\t\t */\n\t\t\"_aData\": [],\n\t\n\t\t/**\n\t\t * Sorting data cache - this array is ostensibly the same length as the\n\t\t * number of columns (although each index is generated only as it is\n\t\t * needed), and holds the data that is used for sorting each column in the\n\t\t * row. We do this cache generation at the start of the sort in order that\n\t\t * the formatting of the sort data need be done only once for each cell\n\t\t * per sort. This array should not be read from or written to by anything\n\t\t * other than the master sorting methods.\n\t\t * @type array\n\t\t * @default null\n\t\t * @private\n\t\t */\n\t\t\"_aSortData\": null,\n\t\n\t\t/**\n\t\t * Per cell filtering data cache. As per the sort data cache, used to\n\t\t * increase the performance of the filtering in DataTables\n\t\t * @type array\n\t\t * @default null\n\t\t * @private\n\t\t */\n\t\t\"_aFilterData\": null,\n\t\n\t\t/**\n\t\t * Filtering data cache. This is the same as the cell filtering cache, but\n\t\t * in this case a string rather than an array. This is easily computed with\n\t\t * a join on `_aFilterData`, but is provided as a cache so the join isn't\n\t\t * needed on every search (memory traded for performance)\n\t\t * @type array\n\t\t * @default null\n\t\t * @private\n\t\t */\n\t\t\"_sFilterRow\": null,\n\t\n\t\t/**\n\t\t * Cache of the class name that DataTables has applied to the row, so we\n\t\t * can quickly look at this variable rather than needing to do a DOM check\n\t\t * on className for the nTr property.\n\t\t * @type string\n\t\t * @default <i>Empty string</i>\n\t\t * @private\n\t\t */\n\t\t\"_sRowStripe\": \"\",\n\t\n\t\t/**\n\t\t * Denote if the original data source was from the DOM, or the data source\n\t\t * object. This is used for invalidating data, so DataTables can\n\t\t * automatically read data from the original source, unless uninstructed\n\t\t * otherwise.\n\t\t * @type string\n\t\t * @default null\n\t\t * @private\n\t\t */\n\t\t\"src\": null,\n\t\n\t\t/**\n\t\t * Index in the aoData array. This saves an indexOf lookup when we have the\n\t\t * object, but want to know the index\n\t\t * @type integer\n\t\t * @default -1\n\t\t * @private\n\t\t */\n\t\t\"idx\": -1\n\t};\n\t\n\t\n\t/**\n\t * Template object for the column information object in DataTables. This object\n\t * is held in the settings aoColumns array and contains all the information that\n\t * DataTables needs about each individual column.\n\t *\n\t * Note that this object is related to {@link DataTable.defaults.column}\n\t * but this one is the internal data store for DataTables's cache of columns.\n\t * It should NOT be manipulated outside of DataTables. Any configuration should\n\t * be done through the initialisation options.\n\t * @namespace\n\t */\n\tDataTable.models.oColumn = {\n\t\t/**\n\t\t * Column index. This could be worked out on-the-fly with $.inArray, but it\n\t\t * is faster to just hold it as a variable\n\t\t * @type integer\n\t\t * @default null\n\t\t */\n\t\t\"idx\": null,\n\t\n\t\t/**\n\t\t * A list of the columns that sorting should occur on when this column\n\t\t * is sorted. That this property is an array allows multi-column sorting\n\t\t * to be defined for a column (for example first name / last name columns\n\t\t * would benefit from this). The values are integers pointing to the\n\t\t * columns to be sorted on (typically it will be a single integer pointing\n\t\t * at itself, but that doesn't need to be the case).\n\t\t * @type array\n\t\t */\n\t\t\"aDataSort\": null,\n\t\n\t\t/**\n\t\t * Define the sorting directions that are applied to the column, in sequence\n\t\t * as the column is repeatedly sorted upon - i.e. the first value is used\n\t\t * as the sorting direction when the column if first sorted (clicked on).\n\t\t * Sort it again (click again) and it will move on to the next index.\n\t\t * Repeat until loop.\n\t\t * @type array\n\t\t */\n\t\t\"asSorting\": null,\n\t\n\t\t/**\n\t\t * Flag to indicate if the column is searchable, and thus should be included\n\t\t * in the filtering or not.\n\t\t * @type boolean\n\t\t */\n\t\t\"bSearchable\": null,\n\t\n\t\t/**\n\t\t * Flag to indicate if the column is sortable or not.\n\t\t * @type boolean\n\t\t */\n\t\t\"bSortable\": null,\n\t\n\t\t/**\n\t\t * Flag to indicate if the column is currently visible in the table or not\n\t\t * @type boolean\n\t\t */\n\t\t\"bVisible\": null,\n\t\n\t\t/**\n\t\t * Store for manual type assignment using the `column.type` option. This\n\t\t * is held in store so we can manipulate the column's `sType` property.\n\t\t * @type string\n\t\t * @default null\n\t\t * @private\n\t\t */\n\t\t\"_sManualType\": null,\n\t\n\t\t/**\n\t\t * Flag to indicate if HTML5 data attributes should be used as the data\n\t\t * source for filtering or sorting. True is either are.\n\t\t * @type boolean\n\t\t * @default false\n\t\t * @private\n\t\t */\n\t\t\"_bAttrSrc\": false,\n\t\n\t\t/**\n\t\t * Developer definable function that is called whenever a cell is created (Ajax source,\n\t\t * etc) or processed for input (DOM source). This can be used as a compliment to mRender\n\t\t * allowing you to modify the DOM element (add background colour for example) when the\n\t\t * element is available.\n\t\t * @type function\n\t\t * @param {element} nTd The TD node that has been created\n\t\t * @param {*} sData The Data for the cell\n\t\t * @param {array|object} oData The data for the whole row\n\t\t * @param {int} iRow The row index for the aoData data store\n\t\t * @default null\n\t\t */\n\t\t\"fnCreatedCell\": null,\n\t\n\t\t/**\n\t\t * Function to get data from a cell in a column. You should <b>never</b>\n\t\t * access data directly through _aData internally in DataTables - always use\n\t\t * the method attached to this property. It allows mData to function as\n\t\t * required. This function is automatically assigned by the column\n\t\t * initialisation method\n\t\t * @type function\n\t\t * @param {array|object} oData The data array/object for the array\n\t\t * (i.e. aoData[]._aData)\n\t\t * @param {string} sSpecific The specific data type you want to get -\n\t\t * 'display', 'type' 'filter' 'sort'\n\t\t * @returns {*} The data for the cell from the given row's data\n\t\t * @default null\n\t\t */\n\t\t\"fnGetData\": null,\n\t\n\t\t/**\n\t\t * Function to set data for a cell in the column. You should <b>never</b>\n\t\t * set the data directly to _aData internally in DataTables - always use\n\t\t * this method. It allows mData to function as required. This function\n\t\t * is automatically assigned by the column initialisation method\n\t\t * @type function\n\t\t * @param {array|object} oData The data array/object for the array\n\t\t * (i.e. aoData[]._aData)\n\t\t * @param {*} sValue Value to set\n\t\t * @default null\n\t\t */\n\t\t\"fnSetData\": null,\n\t\n\t\t/**\n\t\t * Property to read the value for the cells in the column from the data\n\t\t * source array / object. If null, then the default content is used, if a\n\t\t * function is given then the return from the function is used.\n\t\t * @type function|int|string|null\n\t\t * @default null\n\t\t */\n\t\t\"mData\": null,\n\t\n\t\t/**\n\t\t * Partner property to mData which is used (only when defined) to get\n\t\t * the data - i.e. it is basically the same as mData, but without the\n\t\t * 'set' option, and also the data fed to it is the result from mData.\n\t\t * This is the rendering method to match the data method of mData.\n\t\t * @type function|int|string|null\n\t\t * @default null\n\t\t */\n\t\t\"mRender\": null,\n\t\n\t\t/**\n\t\t * Unique header TH/TD element for this column - this is what the sorting\n\t\t * listener is attached to (if sorting is enabled.)\n\t\t * @type node\n\t\t * @default null\n\t\t */\n\t\t\"nTh\": null,\n\t\n\t\t/**\n\t\t * Unique footer TH/TD element for this column (if there is one). Not used\n\t\t * in DataTables as such, but can be used for plug-ins to reference the\n\t\t * footer for each column.\n\t\t * @type node\n\t\t * @default null\n\t\t */\n\t\t\"nTf\": null,\n\t\n\t\t/**\n\t\t * The class to apply to all TD elements in the table's TBODY for the column\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"sClass\": null,\n\t\n\t\t/**\n\t\t * When DataTables calculates the column widths to assign to each column,\n\t\t * it finds the longest string in each column and then constructs a\n\t\t * temporary table and reads the widths from that. The problem with this\n\t\t * is that \"mmm\" is much wider then \"iiii\", but the latter is a longer\n\t\t * string - thus the calculation can go wrong (doing it properly and putting\n\t\t * it into an DOM object and measuring that is horribly(!) slow). Thus as\n\t\t * a \"work around\" we provide this option. It will append its value to the\n\t\t * text that is found to be the longest string for the column - i.e. padding.\n\t\t * @type string\n\t\t */\n\t\t\"sContentPadding\": null,\n\t\n\t\t/**\n\t\t * Allows a default value to be given for a column's data, and will be used\n\t\t * whenever a null data source is encountered (this can be because mData\n\t\t * is set to null, or because the data source itself is null).\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"sDefaultContent\": null,\n\t\n\t\t/**\n\t\t * Name for the column, allowing reference to the column by name as well as\n\t\t * by index (needs a lookup to work by name).\n\t\t * @type string\n\t\t */\n\t\t\"sName\": null,\n\t\n\t\t/**\n\t\t * Custom sorting data type - defines which of the available plug-ins in\n\t\t * afnSortData the custom sorting will use - if any is defined.\n\t\t * @type string\n\t\t * @default std\n\t\t */\n\t\t\"sSortDataType\": 'std',\n\t\n\t\t/**\n\t\t * Class to be applied to the header element when sorting on this column\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"sSortingClass\": null,\n\t\n\t\t/**\n\t\t * Class to be applied to the header element when sorting on this column -\n\t\t * when jQuery UI theming is used.\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"sSortingClassJUI\": null,\n\t\n\t\t/**\n\t\t * Title of the column - what is seen in the TH element (nTh).\n\t\t * @type string\n\t\t */\n\t\t\"sTitle\": null,\n\t\n\t\t/**\n\t\t * Column sorting and filtering type\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"sType\": null,\n\t\n\t\t/**\n\t\t * Width of the column\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"sWidth\": null,\n\t\n\t\t/**\n\t\t * Width of the column when it was first \"encountered\"\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"sWidthOrig\": null\n\t};\n\t\n\t\n\t/*\n\t * Developer note: The properties of the object below are given in Hungarian\n\t * notation, that was used as the interface for DataTables prior to v1.10, however\n\t * from v1.10 onwards the primary interface is camel case. In order to avoid\n\t * breaking backwards compatibility utterly with this change, the Hungarian\n\t * version is still, internally the primary interface, but is is not documented\n\t * - hence the @name tags in each doc comment. This allows a Javascript function\n\t * to create a map from Hungarian notation to camel case (going the other direction\n\t * would require each property to be listed, which would at around 3K to the size\n\t * of DataTables, while this method is about a 0.5K hit.\n\t *\n\t * Ultimately this does pave the way for Hungarian notation to be dropped\n\t * completely, but that is a massive amount of work and will break current\n\t * installs (therefore is on-hold until v2).\n\t */\n\t\n\t/**\n\t * Initialisation options that can be given to DataTables at initialisation\n\t * time.\n\t * @namespace\n\t */\n\tDataTable.defaults = {\n\t\t/**\n\t\t * An array of data to use for the table, passed in at initialisation which\n\t\t * will be used in preference to any data which is already in the DOM. This is\n\t\t * particularly useful for constructing tables purely in Javascript, for\n\t\t * example with a custom Ajax call.\n\t\t * @type array\n\t\t * @default null\n\t\t *\n\t\t * @dtopt Option\n\t\t * @name DataTable.defaults.data\n\t\t *\n\t\t * @example\n\t\t * // Using a 2D array data source\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"data\": [\n\t\t * ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'],\n\t\t * ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'],\n\t\t * ],\n\t\t * \"columns\": [\n\t\t * { \"title\": \"Engine\" },\n\t\t * { \"title\": \"Browser\" },\n\t\t * { \"title\": \"Platform\" },\n\t\t * { \"title\": \"Version\" },\n\t\t * { \"title\": \"Grade\" }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using an array of objects as a data source (`data`)\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"data\": [\n\t\t * {\n\t\t * \"engine\": \"Trident\",\n\t\t * \"browser\": \"Internet Explorer 4.0\",\n\t\t * \"platform\": \"Win 95+\",\n\t\t * \"version\": 4,\n\t\t * \"grade\": \"X\"\n\t\t * },\n\t\t * {\n\t\t * \"engine\": \"Trident\",\n\t\t * \"browser\": \"Internet Explorer 5.0\",\n\t\t * \"platform\": \"Win 95+\",\n\t\t * \"version\": 5,\n\t\t * \"grade\": \"C\"\n\t\t * }\n\t\t * ],\n\t\t * \"columns\": [\n\t\t * { \"title\": \"Engine\", \"data\": \"engine\" },\n\t\t * { \"title\": \"Browser\", \"data\": \"browser\" },\n\t\t * { \"title\": \"Platform\", \"data\": \"platform\" },\n\t\t * { \"title\": \"Version\", \"data\": \"version\" },\n\t\t * { \"title\": \"Grade\", \"data\": \"grade\" }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"aaData\": null,\n\t\n\t\n\t\t/**\n\t\t * If ordering is enabled, then DataTables will perform a first pass sort on\n\t\t * initialisation. You can define which column(s) the sort is performed\n\t\t * upon, and the sorting direction, with this variable. The `sorting` array\n\t\t * should contain an array for each column to be sorted initially containing\n\t\t * the column's index and a direction string ('asc' or 'desc').\n\t\t * @type array\n\t\t * @default [[0,'asc']]\n\t\t *\n\t\t * @dtopt Option\n\t\t * @name DataTable.defaults.order\n\t\t *\n\t\t * @example\n\t\t * // Sort by 3rd column first, and then 4th column\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"order\": [[2,'asc'], [3,'desc']]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * // No initial sorting\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"order\": []\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"aaSorting\": [[0,'asc']],\n\t\n\t\n\t\t/**\n\t\t * This parameter is basically identical to the `sorting` parameter, but\n\t\t * cannot be overridden by user interaction with the table. What this means\n\t\t * is that you could have a column (visible or hidden) which the sorting\n\t\t * will always be forced on first - any sorting after that (from the user)\n\t\t * will then be performed as required. This can be useful for grouping rows\n\t\t * together.\n\t\t * @type array\n\t\t * @default null\n\t\t *\n\t\t * @dtopt Option\n\t\t * @name DataTable.defaults.orderFixed\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"orderFixed\": [[0,'asc']]\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"aaSortingFixed\": [],\n\t\n\t\n\t\t/**\n\t\t * DataTables can be instructed to load data to display in the table from a\n\t\t * Ajax source. This option defines how that Ajax call is made and where to.\n\t\t *\n\t\t * The `ajax` property has three different modes of operation, depending on\n\t\t * how it is defined. These are:\n\t\t *\n\t\t * * `string` - Set the URL from where the data should be loaded from.\n\t\t * * `object` - Define properties for `jQuery.ajax`.\n\t\t * * `function` - Custom data get function\n\t\t *\n\t\t * `string`\n\t\t * --------\n\t\t *\n\t\t * As a string, the `ajax` property simply defines the URL from which\n\t\t * DataTables will load data.\n\t\t *\n\t\t * `object`\n\t\t * --------\n\t\t *\n\t\t * As an object, the parameters in the object are passed to\n\t\t * [jQuery.ajax](http://api.jquery.com/jQuery.ajax/) allowing fine control\n\t\t * of the Ajax request. DataTables has a number of default parameters which\n\t\t * you can override using this option. Please refer to the jQuery\n\t\t * documentation for a full description of the options available, although\n\t\t * the following parameters provide additional options in DataTables or\n\t\t * require special consideration:\n\t\t *\n\t\t * * `data` - As with jQuery, `data` can be provided as an object, but it\n\t\t * can also be used as a function to manipulate the data DataTables sends\n\t\t * to the server. The function takes a single parameter, an object of\n\t\t * parameters with the values that DataTables has readied for sending. An\n\t\t * object may be returned which will be merged into the DataTables\n\t\t * defaults, or you can add the items to the object that was passed in and\n\t\t * not return anything from the function. This supersedes `fnServerParams`\n\t\t * from DataTables 1.9-.\n\t\t *\n\t\t * * `dataSrc` - By default DataTables will look for the property `data` (or\n\t\t * `aaData` for compatibility with DataTables 1.9-) when obtaining data\n\t\t * from an Ajax source or for server-side processing - this parameter\n\t\t * allows that property to be changed. You can use Javascript dotted\n\t\t * object notation to get a data source for multiple levels of nesting, or\n\t\t * it my be used as a function. As a function it takes a single parameter,\n\t\t * the JSON returned from the server, which can be manipulated as\n\t\t * required, with the returned value being that used by DataTables as the\n\t\t * data source for the table. This supersedes `sAjaxDataProp` from\n\t\t * DataTables 1.9-.\n\t\t *\n\t\t * * `success` - Should not be overridden it is used internally in\n\t\t * DataTables. To manipulate / transform the data returned by the server\n\t\t * use `ajax.dataSrc`, or use `ajax` as a function (see below).\n\t\t *\n\t\t * `function`\n\t\t * ----------\n\t\t *\n\t\t * As a function, making the Ajax call is left up to yourself allowing\n\t\t * complete control of the Ajax request. Indeed, if desired, a method other\n\t\t * than Ajax could be used to obtain the required data, such as Web storage\n\t\t * or an AIR database.\n\t\t *\n\t\t * The function is given four parameters and no return is required. The\n\t\t * parameters are:\n\t\t *\n\t\t * 1. _object_ - Data to send to the server\n\t\t * 2. _function_ - Callback function that must be executed when the required\n\t\t * data has been obtained. That data should be passed into the callback\n\t\t * as the only parameter\n\t\t * 3. _object_ - DataTables settings object for the table\n\t\t *\n\t\t * Note that this supersedes `fnServerData` from DataTables 1.9-.\n\t\t *\n\t\t * @type string|object|function\n\t\t * @default null\n\t\t *\n\t\t * @dtopt Option\n\t\t * @name DataTable.defaults.ajax\n\t\t * @since 1.10.0\n\t\t *\n\t\t * @example\n\t\t * // Get JSON data from a file via Ajax.\n\t\t * // Note DataTables expects data in the form `{ data: [ ...data... ] }` by default).\n\t\t * $('#example').dataTable( {\n\t\t * \"ajax\": \"data.json\"\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Get JSON data from a file via Ajax, using `dataSrc` to change\n\t\t * // `data` to `tableData` (i.e. `{ tableData: [ ...data... ] }`)\n\t\t * $('#example').dataTable( {\n\t\t * \"ajax\": {\n\t\t * \"url\": \"data.json\",\n\t\t * \"dataSrc\": \"tableData\"\n\t\t * }\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Get JSON data from a file via Ajax, using `dataSrc` to read data\n\t\t * // from a plain array rather than an array in an object\n\t\t * $('#example').dataTable( {\n\t\t * \"ajax\": {\n\t\t * \"url\": \"data.json\",\n\t\t * \"dataSrc\": \"\"\n\t\t * }\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Manipulate the data returned from the server - add a link to data\n\t\t * // (note this can, should, be done using `render` for the column - this\n\t\t * // is just a simple example of how the data can be manipulated).\n\t\t * $('#example').dataTable( {\n\t\t * \"ajax\": {\n\t\t * \"url\": \"data.json\",\n\t\t * \"dataSrc\": function ( json ) {\n\t\t * for ( var i=0, ien=json.length ; i<ien ; i++ ) {\n\t\t * json[i][0] = '<a href=\"/message/'+json[i][0]+'>View message</a>';\n\t\t * }\n\t\t * return json;\n\t\t * }\n\t\t * }\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Add data to the request\n\t\t * $('#example').dataTable( {\n\t\t * \"ajax\": {\n\t\t * \"url\": \"data.json\",\n\t\t * \"data\": function ( d ) {\n\t\t * return {\n\t\t * \"extra_search\": $('#extra').val()\n\t\t * };\n\t\t * }\n\t\t * }\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Send request as POST\n\t\t * $('#example').dataTable( {\n\t\t * \"ajax\": {\n\t\t * \"url\": \"data.json\",\n\t\t * \"type\": \"POST\"\n\t\t * }\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Get the data from localStorage (could interface with a form for\n\t\t * // adding, editing and removing rows).\n\t\t * $('#example').dataTable( {\n\t\t * \"ajax\": function (data, callback, settings) {\n\t\t * callback(\n\t\t * JSON.parse( localStorage.getItem('dataTablesData') )\n\t\t * );\n\t\t * }\n\t\t * } );\n\t\t */\n\t\t\"ajax\": null,\n\t\n\t\n\t\t/**\n\t\t * This parameter allows you to readily specify the entries in the length drop\n\t\t * down menu that DataTables shows when pagination is enabled. It can be\n\t\t * either a 1D array of options which will be used for both the displayed\n\t\t * option and the value, or a 2D array which will use the array in the first\n\t\t * position as the value, and the array in the second position as the\n\t\t * displayed options (useful for language strings such as 'All').\n\t\t *\n\t\t * Note that the `pageLength` property will be automatically set to the\n\t\t * first value given in this array, unless `pageLength` is also provided.\n\t\t * @type array\n\t\t * @default [ 10, 25, 50, 100 ]\n\t\t *\n\t\t * @dtopt Option\n\t\t * @name DataTable.defaults.lengthMenu\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"lengthMenu\": [[10, 25, 50, -1], [10, 25, 50, \"All\"]]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"aLengthMenu\": [ 10, 25, 50, 100 ],\n\t\n\t\n\t\t/**\n\t\t * The `columns` option in the initialisation parameter allows you to define\n\t\t * details about the way individual columns behave. For a full list of\n\t\t * column options that can be set, please see\n\t\t * {@link DataTable.defaults.column}. Note that if you use `columns` to\n\t\t * define your columns, you must have an entry in the array for every single\n\t\t * column that you have in your table (these can be null if you don't which\n\t\t * to specify any options).\n\t\t * @member\n\t\t *\n\t\t * @name DataTable.defaults.column\n\t\t */\n\t\t\"aoColumns\": null,\n\t\n\t\t/**\n\t\t * Very similar to `columns`, `columnDefs` allows you to target a specific\n\t\t * column, multiple columns, or all columns, using the `targets` property of\n\t\t * each object in the array. This allows great flexibility when creating\n\t\t * tables, as the `columnDefs` arrays can be of any length, targeting the\n\t\t * columns you specifically want. `columnDefs` may use any of the column\n\t\t * options available: {@link DataTable.defaults.column}, but it _must_\n\t\t * have `targets` defined in each object in the array. Values in the `targets`\n\t\t * array may be:\n\t\t * <ul>\n\t\t * <li>a string - class name will be matched on the TH for the column</li>\n\t\t * <li>0 or a positive integer - column index counting from the left</li>\n\t\t * <li>a negative integer - column index counting from the right</li>\n\t\t * <li>the string \"_all\" - all columns (i.e. assign a default)</li>\n\t\t * </ul>\n\t\t * @member\n\t\t *\n\t\t * @name DataTable.defaults.columnDefs\n\t\t */\n\t\t\"aoColumnDefs\": null,\n\t\n\t\n\t\t/**\n\t\t * Basically the same as `search`, this parameter defines the individual column\n\t\t * filtering state at initialisation time. The array must be of the same size\n\t\t * as the number of columns, and each element be an object with the parameters\n\t\t * `search` and `escapeRegex` (the latter is optional). 'null' is also\n\t\t * accepted and the default will be used.\n\t\t * @type array\n\t\t * @default []\n\t\t *\n\t\t * @dtopt Option\n\t\t * @name DataTable.defaults.searchCols\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"searchCols\": [\n\t\t * null,\n\t\t * { \"search\": \"My filter\" },\n\t\t * null,\n\t\t * { \"search\": \"^[0-9]\", \"escapeRegex\": false }\n\t\t * ]\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"aoSearchCols\": [],\n\t\n\t\n\t\t/**\n\t\t * An array of CSS classes that should be applied to displayed rows. This\n\t\t * array may be of any length, and DataTables will apply each class\n\t\t * sequentially, looping when required.\n\t\t * @type array\n\t\t * @default null <i>Will take the values determined by the `oClasses.stripe*`\n\t\t * options</i>\n\t\t *\n\t\t * @dtopt Option\n\t\t * @name DataTable.defaults.stripeClasses\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"stripeClasses\": [ 'strip1', 'strip2', 'strip3' ]\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"asStripeClasses\": null,\n\t\n\t\n\t\t/**\n\t\t * Enable or disable automatic column width calculation. This can be disabled\n\t\t * as an optimisation (it takes some time to calculate the widths) if the\n\t\t * tables widths are passed in using `columns`.\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.autoWidth\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"autoWidth\": false\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bAutoWidth\": true,\n\t\n\t\n\t\t/**\n\t\t * Deferred rendering can provide DataTables with a huge speed boost when you\n\t\t * are using an Ajax or JS data source for the table. This option, when set to\n\t\t * true, will cause DataTables to defer the creation of the table elements for\n\t\t * each row until they are needed for a draw - saving a significant amount of\n\t\t * time.\n\t\t * @type boolean\n\t\t * @default false\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.deferRender\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"ajax\": \"sources/arrays.txt\",\n\t\t * \"deferRender\": true\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bDeferRender\": false,\n\t\n\t\n\t\t/**\n\t\t * Replace a DataTable which matches the given selector and replace it with\n\t\t * one which has the properties of the new initialisation object passed. If no\n\t\t * table matches the selector, then the new DataTable will be constructed as\n\t\t * per normal.\n\t\t * @type boolean\n\t\t * @default false\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.destroy\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"srollY\": \"200px\",\n\t\t * \"paginate\": false\n\t\t * } );\n\t\t *\n\t\t * // Some time later....\n\t\t * $('#example').dataTable( {\n\t\t * \"filter\": false,\n\t\t * \"destroy\": true\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bDestroy\": false,\n\t\n\t\n\t\t/**\n\t\t * Enable or disable filtering of data. Filtering in DataTables is \"smart\" in\n\t\t * that it allows the end user to input multiple words (space separated) and\n\t\t * will match a row containing those words, even if not in the order that was\n\t\t * specified (this allow matching across multiple columns). Note that if you\n\t\t * wish to use filtering in DataTables this must remain 'true' - to remove the\n\t\t * default filtering input box and retain filtering abilities, please use\n\t\t * {@link DataTable.defaults.dom}.\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.searching\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"searching\": false\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bFilter\": true,\n\t\n\t\n\t\t/**\n\t\t * Enable or disable the table information display. This shows information\n\t\t * about the data that is currently visible on the page, including information\n\t\t * about filtered data if that action is being performed.\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.info\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"info\": false\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bInfo\": true,\n\t\n\t\n\t\t/**\n\t\t * Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some\n\t\t * slightly different and additional mark-up from what DataTables has\n\t\t * traditionally used).\n\t\t * @type boolean\n\t\t * @default false\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.jQueryUI\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"jQueryUI\": true\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bJQueryUI\": false,\n\t\n\t\n\t\t/**\n\t\t * Allows the end user to select the size of a formatted page from a select\n\t\t * menu (sizes are 10, 25, 50 and 100). Requires pagination (`paginate`).\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.lengthChange\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"lengthChange\": false\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bLengthChange\": true,\n\t\n\t\n\t\t/**\n\t\t * Enable or disable pagination.\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.paging\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"paging\": false\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bPaginate\": true,\n\t\n\t\n\t\t/**\n\t\t * Enable or disable the display of a 'processing' indicator when the table is\n\t\t * being processed (e.g. a sort). This is particularly useful for tables with\n\t\t * large amounts of data where it can take a noticeable amount of time to sort\n\t\t * the entries.\n\t\t * @type boolean\n\t\t * @default false\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.processing\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"processing\": true\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bProcessing\": false,\n\t\n\t\n\t\t/**\n\t\t * Retrieve the DataTables object for the given selector. Note that if the\n\t\t * table has already been initialised, this parameter will cause DataTables\n\t\t * to simply return the object that has already been set up - it will not take\n\t\t * account of any changes you might have made to the initialisation object\n\t\t * passed to DataTables (setting this parameter to true is an acknowledgement\n\t\t * that you understand this). `destroy` can be used to reinitialise a table if\n\t\t * you need.\n\t\t * @type boolean\n\t\t * @default false\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.retrieve\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * initTable();\n\t\t * tableActions();\n\t\t * } );\n\t\t *\n\t\t * function initTable ()\n\t\t * {\n\t\t * return $('#example').dataTable( {\n\t\t * \"scrollY\": \"200px\",\n\t\t * \"paginate\": false,\n\t\t * \"retrieve\": true\n\t\t * } );\n\t\t * }\n\t\t *\n\t\t * function tableActions ()\n\t\t * {\n\t\t * var table = initTable();\n\t\t * // perform API operations with oTable\n\t\t * }\n\t\t */\n\t\t\"bRetrieve\": false,\n\t\n\t\n\t\t/**\n\t\t * When vertical (y) scrolling is enabled, DataTables will force the height of\n\t\t * the table's viewport to the given height at all times (useful for layout).\n\t\t * However, this can look odd when filtering data down to a small data set,\n\t\t * and the footer is left \"floating\" further down. This parameter (when\n\t\t * enabled) will cause DataTables to collapse the table's viewport down when\n\t\t * the result set will fit within the given Y height.\n\t\t * @type boolean\n\t\t * @default false\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.scrollCollapse\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"scrollY\": \"200\",\n\t\t * \"scrollCollapse\": true\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bScrollCollapse\": false,\n\t\n\t\n\t\t/**\n\t\t * Configure DataTables to use server-side processing. Note that the\n\t\t * `ajax` parameter must also be given in order to give DataTables a\n\t\t * source to obtain the required data for each draw.\n\t\t * @type boolean\n\t\t * @default false\n\t\t *\n\t\t * @dtopt Features\n\t\t * @dtopt Server-side\n\t\t * @name DataTable.defaults.serverSide\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"serverSide\": true,\n\t\t * \"ajax\": \"xhr.php\"\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bServerSide\": false,\n\t\n\t\n\t\t/**\n\t\t * Enable or disable sorting of columns. Sorting of individual columns can be\n\t\t * disabled by the `sortable` option for each column.\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.ordering\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"ordering\": false\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bSort\": true,\n\t\n\t\n\t\t/**\n\t\t * Enable or display DataTables' ability to sort multiple columns at the\n\t\t * same time (activated by shift-click by the user).\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.orderMulti\n\t\t *\n\t\t * @example\n\t\t * // Disable multiple column sorting ability\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"orderMulti\": false\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bSortMulti\": true,\n\t\n\t\n\t\t/**\n\t\t * Allows control over whether DataTables should use the top (true) unique\n\t\t * cell that is found for a single column, or the bottom (false - default).\n\t\t * This is useful when using complex headers.\n\t\t * @type boolean\n\t\t * @default false\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.orderCellsTop\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"orderCellsTop\": true\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bSortCellsTop\": false,\n\t\n\t\n\t\t/**\n\t\t * Enable or disable the addition of the classes `sorting\\_1`, `sorting\\_2` and\n\t\t * `sorting\\_3` to the columns which are currently being sorted on. This is\n\t\t * presented as a feature switch as it can increase processing time (while\n\t\t * classes are removed and added) so for large data sets you might want to\n\t\t * turn this off.\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.orderClasses\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"orderClasses\": false\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bSortClasses\": true,\n\t\n\t\n\t\t/**\n\t\t * Enable or disable state saving. When enabled HTML5 `localStorage` will be\n\t\t * used to save table display information such as pagination information,\n\t\t * display length, filtering and sorting. As such when the end user reloads\n\t\t * the page the display display will match what thy had previously set up.\n\t\t *\n\t\t * Due to the use of `localStorage` the default state saving is not supported\n\t\t * in IE6 or 7. If state saving is required in those browsers, use\n\t\t * `stateSaveCallback` to provide a storage solution such as cookies.\n\t\t * @type boolean\n\t\t * @default false\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.stateSave\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function () {\n\t\t * $('#example').dataTable( {\n\t\t * \"stateSave\": true\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"bStateSave\": false,\n\t\n\t\n\t\t/**\n\t\t * This function is called when a TR element is created (and all TD child\n\t\t * elements have been inserted), or registered if using a DOM source, allowing\n\t\t * manipulation of the TR element (adding classes etc).\n\t\t * @type function\n\t\t * @param {node} row \"TR\" element for the current row\n\t\t * @param {array} data Raw data array for this row\n\t\t * @param {int} dataIndex The index of this row in the internal aoData array\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.createdRow\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"createdRow\": function( row, data, dataIndex ) {\n\t\t * // Bold the grade for all 'A' grade browsers\n\t\t * if ( data[4] == \"A\" )\n\t\t * {\n\t\t * $('td:eq(4)', row).html( '<b>A</b>' );\n\t\t * }\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"fnCreatedRow\": null,\n\t\n\t\n\t\t/**\n\t\t * This function is called on every 'draw' event, and allows you to\n\t\t * dynamically modify any aspect you want about the created DOM.\n\t\t * @type function\n\t\t * @param {object} settings DataTables settings object\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.drawCallback\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"drawCallback\": function( settings ) {\n\t\t * alert( 'DataTables has redrawn the table' );\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"fnDrawCallback\": null,\n\t\n\t\n\t\t/**\n\t\t * Identical to fnHeaderCallback() but for the table footer this function\n\t\t * allows you to modify the table footer on every 'draw' event.\n\t\t * @type function\n\t\t * @param {node} foot \"TR\" element for the footer\n\t\t * @param {array} data Full table data (as derived from the original HTML)\n\t\t * @param {int} start Index for the current display starting point in the\n\t\t * display array\n\t\t * @param {int} end Index for the current display ending point in the\n\t\t * display array\n\t\t * @param {array int} display Index array to translate the visual position\n\t\t * to the full data array\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.footerCallback\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"footerCallback\": function( tfoot, data, start, end, display ) {\n\t\t * tfoot.getElementsByTagName('th')[0].innerHTML = \"Starting index is \"+start;\n\t\t * }\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"fnFooterCallback\": null,\n\t\n\t\n\t\t/**\n\t\t * When rendering large numbers in the information element for the table\n\t\t * (i.e. \"Showing 1 to 10 of 57 entries\") DataTables will render large numbers\n\t\t * to have a comma separator for the 'thousands' units (e.g. 1 million is\n\t\t * rendered as \"1,000,000\") to help readability for the end user. This\n\t\t * function will override the default method DataTables uses.\n\t\t * @type function\n\t\t * @member\n\t\t * @param {int} toFormat number to be formatted\n\t\t * @returns {string} formatted string for DataTables to show the number\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.formatNumber\n\t\t *\n\t\t * @example\n\t\t * // Format a number using a single quote for the separator (note that\n\t\t * // this can also be done with the language.thousands option)\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"formatNumber\": function ( toFormat ) {\n\t\t * return toFormat.toString().replace(\n\t\t * /\\B(?=(\\d{3})+(?!\\d))/g, \"'\"\n\t\t * );\n\t\t * };\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"fnFormatNumber\": function ( toFormat ) {\n\t\t\treturn toFormat.toString().replace(\n\t\t\t\t/\\B(?=(\\d{3})+(?!\\d))/g,\n\t\t\t\tthis.oLanguage.sThousands\n\t\t\t);\n\t\t},\n\t\n\t\n\t\t/**\n\t\t * This function is called on every 'draw' event, and allows you to\n\t\t * dynamically modify the header row. This can be used to calculate and\n\t\t * display useful information about the table.\n\t\t * @type function\n\t\t * @param {node} head \"TR\" element for the header\n\t\t * @param {array} data Full table data (as derived from the original HTML)\n\t\t * @param {int} start Index for the current display starting point in the\n\t\t * display array\n\t\t * @param {int} end Index for the current display ending point in the\n\t\t * display array\n\t\t * @param {array int} display Index array to translate the visual position\n\t\t * to the full data array\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.headerCallback\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"fheaderCallback\": function( head, data, start, end, display ) {\n\t\t * head.getElementsByTagName('th')[0].innerHTML = \"Displaying \"+(end-start)+\" records\";\n\t\t * }\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"fnHeaderCallback\": null,\n\t\n\t\n\t\t/**\n\t\t * The information element can be used to convey information about the current\n\t\t * state of the table. Although the internationalisation options presented by\n\t\t * DataTables are quite capable of dealing with most customisations, there may\n\t\t * be times where you wish to customise the string further. This callback\n\t\t * allows you to do exactly that.\n\t\t * @type function\n\t\t * @param {object} oSettings DataTables settings object\n\t\t * @param {int} start Starting position in data for the draw\n\t\t * @param {int} end End position in data for the draw\n\t\t * @param {int} max Total number of rows in the table (regardless of\n\t\t * filtering)\n\t\t * @param {int} total Total number of rows in the data set, after filtering\n\t\t * @param {string} pre The string that DataTables has formatted using it's\n\t\t * own rules\n\t\t * @returns {string} The string to be displayed in the information element.\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.infoCallback\n\t\t *\n\t\t * @example\n\t\t * $('#example').dataTable( {\n\t\t * \"infoCallback\": function( settings, start, end, max, total, pre ) {\n\t\t * return start +\" to \"+ end;\n\t\t * }\n\t\t * } );\n\t\t */\n\t\t\"fnInfoCallback\": null,\n\t\n\t\n\t\t/**\n\t\t * Called when the table has been initialised. Normally DataTables will\n\t\t * initialise sequentially and there will be no need for this function,\n\t\t * however, this does not hold true when using external language information\n\t\t * since that is obtained using an async XHR call.\n\t\t * @type function\n\t\t * @param {object} settings DataTables settings object\n\t\t * @param {object} json The JSON object request from the server - only\n\t\t * present if client-side Ajax sourced data is used\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.initComplete\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"initComplete\": function(settings, json) {\n\t\t * alert( 'DataTables has finished its initialisation.' );\n\t\t * }\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"fnInitComplete\": null,\n\t\n\t\n\t\t/**\n\t\t * Called at the very start of each table draw and can be used to cancel the\n\t\t * draw by returning false, any other return (including undefined) results in\n\t\t * the full draw occurring).\n\t\t * @type function\n\t\t * @param {object} settings DataTables settings object\n\t\t * @returns {boolean} False will cancel the draw, anything else (including no\n\t\t * return) will allow it to complete.\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.preDrawCallback\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"preDrawCallback\": function( settings ) {\n\t\t * if ( $('#test').val() == 1 ) {\n\t\t * return false;\n\t\t * }\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"fnPreDrawCallback\": null,\n\t\n\t\n\t\t/**\n\t\t * This function allows you to 'post process' each row after it have been\n\t\t * generated for each table draw, but before it is rendered on screen. This\n\t\t * function might be used for setting the row class name etc.\n\t\t * @type function\n\t\t * @param {node} row \"TR\" element for the current row\n\t\t * @param {array} data Raw data array for this row\n\t\t * @param {int} displayIndex The display index for the current table draw\n\t\t * @param {int} displayIndexFull The index of the data in the full list of\n\t\t * rows (after filtering)\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.rowCallback\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"rowCallback\": function( row, data, displayIndex, displayIndexFull ) {\n\t\t * // Bold the grade for all 'A' grade browsers\n\t\t * if ( data[4] == \"A\" ) {\n\t\t * $('td:eq(4)', row).html( '<b>A</b>' );\n\t\t * }\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"fnRowCallback\": null,\n\t\n\t\n\t\t/**\n\t\t * __Deprecated__ The functionality provided by this parameter has now been\n\t\t * superseded by that provided through `ajax`, which should be used instead.\n\t\t *\n\t\t * This parameter allows you to override the default function which obtains\n\t\t * the data from the server so something more suitable for your application.\n\t\t * For example you could use POST data, or pull information from a Gears or\n\t\t * AIR database.\n\t\t * @type function\n\t\t * @member\n\t\t * @param {string} source HTTP source to obtain the data from (`ajax`)\n\t\t * @param {array} data A key/value pair object containing the data to send\n\t\t * to the server\n\t\t * @param {function} callback to be called on completion of the data get\n\t\t * process that will draw the data on the page.\n\t\t * @param {object} settings DataTables settings object\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @dtopt Server-side\n\t\t * @name DataTable.defaults.serverData\n\t\t *\n\t\t * @deprecated 1.10. Please use `ajax` for this functionality now.\n\t\t */\n\t\t\"fnServerData\": null,\n\t\n\t\n\t\t/**\n\t\t * __Deprecated__ The functionality provided by this parameter has now been\n\t\t * superseded by that provided through `ajax`, which should be used instead.\n\t\t *\n\t\t * It is often useful to send extra data to the server when making an Ajax\n\t\t * request - for example custom filtering information, and this callback\n\t\t * function makes it trivial to send extra information to the server. The\n\t\t * passed in parameter is the data set that has been constructed by\n\t\t * DataTables, and you can add to this or modify it as you require.\n\t\t * @type function\n\t\t * @param {array} data Data array (array of objects which are name/value\n\t\t * pairs) that has been constructed by DataTables and will be sent to the\n\t\t * server. In the case of Ajax sourced data with server-side processing\n\t\t * this will be an empty array, for server-side processing there will be a\n\t\t * significant number of parameters!\n\t\t * @returns {undefined} Ensure that you modify the data array passed in,\n\t\t * as this is passed by reference.\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @dtopt Server-side\n\t\t * @name DataTable.defaults.serverParams\n\t\t *\n\t\t * @deprecated 1.10. Please use `ajax` for this functionality now.\n\t\t */\n\t\t\"fnServerParams\": null,\n\t\n\t\n\t\t/**\n\t\t * Load the table state. With this function you can define from where, and how, the\n\t\t * state of a table is loaded. By default DataTables will load from `localStorage`\n\t\t * but you might wish to use a server-side database or cookies.\n\t\t * @type function\n\t\t * @member\n\t\t * @param {object} settings DataTables settings object\n\t\t * @return {object} The DataTables state object to be loaded\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.stateLoadCallback\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"stateSave\": true,\n\t\t * \"stateLoadCallback\": function (settings) {\n\t\t * var o;\n\t\t *\n\t\t * // Send an Ajax request to the server to get the data. Note that\n\t\t * // this is a synchronous request.\n\t\t * $.ajax( {\n\t\t * \"url\": \"/state_load\",\n\t\t * \"async\": false,\n\t\t * \"dataType\": \"json\",\n\t\t * \"success\": function (json) {\n\t\t * o = json;\n\t\t * }\n\t\t * } );\n\t\t *\n\t\t * return o;\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"fnStateLoadCallback\": function ( settings ) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(\n\t\t\t\t\t(settings.iStateDuration === -1 ? sessionStorage : localStorage).getItem(\n\t\t\t\t\t\t'DataTables_'+settings.sInstance+'_'+location.pathname\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} catch (e) {}\n\t\t},\n\t\n\t\n\t\t/**\n\t\t * Callback which allows modification of the saved state prior to loading that state.\n\t\t * This callback is called when the table is loading state from the stored data, but\n\t\t * prior to the settings object being modified by the saved state. Note that for\n\t\t * plug-in authors, you should use the `stateLoadParams` event to load parameters for\n\t\t * a plug-in.\n\t\t * @type function\n\t\t * @param {object} settings DataTables settings object\n\t\t * @param {object} data The state object that is to be loaded\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.stateLoadParams\n\t\t *\n\t\t * @example\n\t\t * // Remove a saved filter, so filtering is never loaded\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"stateSave\": true,\n\t\t * \"stateLoadParams\": function (settings, data) {\n\t\t * data.oSearch.sSearch = \"\";\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Disallow state loading by returning false\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"stateSave\": true,\n\t\t * \"stateLoadParams\": function (settings, data) {\n\t\t * return false;\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"fnStateLoadParams\": null,\n\t\n\t\n\t\t/**\n\t\t * Callback that is called when the state has been loaded from the state saving method\n\t\t * and the DataTables settings object has been modified as a result of the loaded state.\n\t\t * @type function\n\t\t * @param {object} settings DataTables settings object\n\t\t * @param {object} data The state object that was loaded\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.stateLoaded\n\t\t *\n\t\t * @example\n\t\t * // Show an alert with the filtering value that was saved\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"stateSave\": true,\n\t\t * \"stateLoaded\": function (settings, data) {\n\t\t * alert( 'Saved filter was: '+data.oSearch.sSearch );\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"fnStateLoaded\": null,\n\t\n\t\n\t\t/**\n\t\t * Save the table state. This function allows you to define where and how the state\n\t\t * information for the table is stored By default DataTables will use `localStorage`\n\t\t * but you might wish to use a server-side database or cookies.\n\t\t * @type function\n\t\t * @member\n\t\t * @param {object} settings DataTables settings object\n\t\t * @param {object} data The state object to be saved\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.stateSaveCallback\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"stateSave\": true,\n\t\t * \"stateSaveCallback\": function (settings, data) {\n\t\t * // Send an Ajax request to the server with the state object\n\t\t * $.ajax( {\n\t\t * \"url\": \"/state_save\",\n\t\t * \"data\": data,\n\t\t * \"dataType\": \"json\",\n\t\t * \"method\": \"POST\"\n\t\t * \"success\": function () {}\n\t\t * } );\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"fnStateSaveCallback\": function ( settings, data ) {\n\t\t\ttry {\n\t\t\t\t(settings.iStateDuration === -1 ? sessionStorage : localStorage).setItem(\n\t\t\t\t\t'DataTables_'+settings.sInstance+'_'+location.pathname,\n\t\t\t\t\tJSON.stringify( data )\n\t\t\t\t);\n\t\t\t} catch (e) {}\n\t\t},\n\t\n\t\n\t\t/**\n\t\t * Callback which allows modification of the state to be saved. Called when the table\n\t\t * has changed state a new state save is required. This method allows modification of\n\t\t * the state saving object prior to actually doing the save, including addition or\n\t\t * other state properties or modification. Note that for plug-in authors, you should\n\t\t * use the `stateSaveParams` event to save parameters for a plug-in.\n\t\t * @type function\n\t\t * @param {object} settings DataTables settings object\n\t\t * @param {object} data The state object to be saved\n\t\t *\n\t\t * @dtopt Callbacks\n\t\t * @name DataTable.defaults.stateSaveParams\n\t\t *\n\t\t * @example\n\t\t * // Remove a saved filter, so filtering is never saved\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"stateSave\": true,\n\t\t * \"stateSaveParams\": function (settings, data) {\n\t\t * data.oSearch.sSearch = \"\";\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"fnStateSaveParams\": null,\n\t\n\t\n\t\t/**\n\t\t * Duration for which the saved state information is considered valid. After this period\n\t\t * has elapsed the state will be returned to the default.\n\t\t * Value is given in seconds.\n\t\t * @type int\n\t\t * @default 7200 <i>(2 hours)</i>\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.stateDuration\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"stateDuration\": 60*60*24; // 1 day\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"iStateDuration\": 7200,\n\t\n\t\n\t\t/**\n\t\t * When enabled DataTables will not make a request to the server for the first\n\t\t * page draw - rather it will use the data already on the page (no sorting etc\n\t\t * will be applied to it), thus saving on an XHR at load time. `deferLoading`\n\t\t * is used to indicate that deferred loading is required, but it is also used\n\t\t * to tell DataTables how many records there are in the full table (allowing\n\t\t * the information element and pagination to be displayed correctly). In the case\n\t\t * where a filtering is applied to the table on initial load, this can be\n\t\t * indicated by giving the parameter as an array, where the first element is\n\t\t * the number of records available after filtering and the second element is the\n\t\t * number of records without filtering (allowing the table information element\n\t\t * to be shown correctly).\n\t\t * @type int | array\n\t\t * @default null\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.deferLoading\n\t\t *\n\t\t * @example\n\t\t * // 57 records available in the table, no filtering applied\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"serverSide\": true,\n\t\t * \"ajax\": \"scripts/server_processing.php\",\n\t\t * \"deferLoading\": 57\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // 57 records after filtering, 100 without filtering (an initial filter applied)\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"serverSide\": true,\n\t\t * \"ajax\": \"scripts/server_processing.php\",\n\t\t * \"deferLoading\": [ 57, 100 ],\n\t\t * \"search\": {\n\t\t * \"search\": \"my_filter\"\n\t\t * }\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"iDeferLoading\": null,\n\t\n\t\n\t\t/**\n\t\t * Number of rows to display on a single page when using pagination. If\n\t\t * feature enabled (`lengthChange`) then the end user will be able to override\n\t\t * this to a custom setting using a pop-up menu.\n\t\t * @type int\n\t\t * @default 10\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.pageLength\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"pageLength\": 50\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"iDisplayLength\": 10,\n\t\n\t\n\t\t/**\n\t\t * Define the starting point for data display when using DataTables with\n\t\t * pagination. Note that this parameter is the number of records, rather than\n\t\t * the page number, so if you have 10 records per page and want to start on\n\t\t * the third page, it should be \"20\".\n\t\t * @type int\n\t\t * @default 0\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.displayStart\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"displayStart\": 20\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"iDisplayStart\": 0,\n\t\n\t\n\t\t/**\n\t\t * By default DataTables allows keyboard navigation of the table (sorting, paging,\n\t\t * and filtering) by adding a `tabindex` attribute to the required elements. This\n\t\t * allows you to tab through the controls and press the enter key to activate them.\n\t\t * The tabindex is default 0, meaning that the tab follows the flow of the document.\n\t\t * You can overrule this using this parameter if you wish. Use a value of -1 to\n\t\t * disable built-in keyboard navigation.\n\t\t * @type int\n\t\t * @default 0\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.tabIndex\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"tabIndex\": 1\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"iTabIndex\": 0,\n\t\n\t\n\t\t/**\n\t\t * Classes that DataTables assigns to the various components and features\n\t\t * that it adds to the HTML table. This allows classes to be configured\n\t\t * during initialisation in addition to through the static\n\t\t * {@link DataTable.ext.oStdClasses} object).\n\t\t * @namespace\n\t\t * @name DataTable.defaults.classes\n\t\t */\n\t\t\"oClasses\": {},\n\t\n\t\n\t\t/**\n\t\t * All strings that DataTables uses in the user interface that it creates\n\t\t * are defined in this object, allowing you to modified them individually or\n\t\t * completely replace them all as required.\n\t\t * @namespace\n\t\t * @name DataTable.defaults.language\n\t\t */\n\t\t\"oLanguage\": {\n\t\t\t/**\n\t\t\t * Strings that are used for WAI-ARIA labels and controls only (these are not\n\t\t\t * actually visible on the page, but will be read by screenreaders, and thus\n\t\t\t * must be internationalised as well).\n\t\t\t * @namespace\n\t\t\t * @name DataTable.defaults.language.aria\n\t\t\t */\n\t\t\t\"oAria\": {\n\t\t\t\t/**\n\t\t\t\t * ARIA label that is added to the table headers when the column may be\n\t\t\t\t * sorted ascending by activing the column (click or return when focused).\n\t\t\t\t * Note that the column header is prefixed to this string.\n\t\t\t\t * @type string\n\t\t\t\t * @default : activate to sort column ascending\n\t\t\t\t *\n\t\t\t\t * @dtopt Language\n\t\t\t\t * @name DataTable.defaults.language.aria.sortAscending\n\t\t\t\t *\n\t\t\t\t * @example\n\t\t\t\t * $(document).ready( function() {\n\t\t\t\t * $('#example').dataTable( {\n\t\t\t\t * \"language\": {\n\t\t\t\t * \"aria\": {\n\t\t\t\t * \"sortAscending\": \" - click/return to sort ascending\"\n\t\t\t\t * }\n\t\t\t\t * }\n\t\t\t\t * } );\n\t\t\t\t * } );\n\t\t\t\t */\n\t\t\t\t\"sSortAscending\": \": activate to sort column ascending\",\n\t\n\t\t\t\t/**\n\t\t\t\t * ARIA label that is added to the table headers when the column may be\n\t\t\t\t * sorted descending by activing the column (click or return when focused).\n\t\t\t\t * Note that the column header is prefixed to this string.\n\t\t\t\t * @type string\n\t\t\t\t * @default : activate to sort column ascending\n\t\t\t\t *\n\t\t\t\t * @dtopt Language\n\t\t\t\t * @name DataTable.defaults.language.aria.sortDescending\n\t\t\t\t *\n\t\t\t\t * @example\n\t\t\t\t * $(document).ready( function() {\n\t\t\t\t * $('#example').dataTable( {\n\t\t\t\t * \"language\": {\n\t\t\t\t * \"aria\": {\n\t\t\t\t * \"sortDescending\": \" - click/return to sort descending\"\n\t\t\t\t * }\n\t\t\t\t * }\n\t\t\t\t * } );\n\t\t\t\t * } );\n\t\t\t\t */\n\t\t\t\t\"sSortDescending\": \": activate to sort column descending\"\n\t\t\t},\n\t\n\t\t\t/**\n\t\t\t * Pagination string used by DataTables for the built-in pagination\n\t\t\t * control types.\n\t\t\t * @namespace\n\t\t\t * @name DataTable.defaults.language.paginate\n\t\t\t */\n\t\t\t\"oPaginate\": {\n\t\t\t\t/**\n\t\t\t\t * Text to use when using the 'full_numbers' type of pagination for the\n\t\t\t\t * button to take the user to the first page.\n\t\t\t\t * @type string\n\t\t\t\t * @default First\n\t\t\t\t *\n\t\t\t\t * @dtopt Language\n\t\t\t\t * @name DataTable.defaults.language.paginate.first\n\t\t\t\t *\n\t\t\t\t * @example\n\t\t\t\t * $(document).ready( function() {\n\t\t\t\t * $('#example').dataTable( {\n\t\t\t\t * \"language\": {\n\t\t\t\t * \"paginate\": {\n\t\t\t\t * \"first\": \"First page\"\n\t\t\t\t * }\n\t\t\t\t * }\n\t\t\t\t * } );\n\t\t\t\t * } );\n\t\t\t\t */\n\t\t\t\t\"sFirst\": \"First\",\n\t\n\t\n\t\t\t\t/**\n\t\t\t\t * Text to use when using the 'full_numbers' type of pagination for the\n\t\t\t\t * button to take the user to the last page.\n\t\t\t\t * @type string\n\t\t\t\t * @default Last\n\t\t\t\t *\n\t\t\t\t * @dtopt Language\n\t\t\t\t * @name DataTable.defaults.language.paginate.last\n\t\t\t\t *\n\t\t\t\t * @example\n\t\t\t\t * $(document).ready( function() {\n\t\t\t\t * $('#example').dataTable( {\n\t\t\t\t * \"language\": {\n\t\t\t\t * \"paginate\": {\n\t\t\t\t * \"last\": \"Last page\"\n\t\t\t\t * }\n\t\t\t\t * }\n\t\t\t\t * } );\n\t\t\t\t * } );\n\t\t\t\t */\n\t\t\t\t\"sLast\": \"Last\",\n\t\n\t\n\t\t\t\t/**\n\t\t\t\t * Text to use for the 'next' pagination button (to take the user to the\n\t\t\t\t * next page).\n\t\t\t\t * @type string\n\t\t\t\t * @default Next\n\t\t\t\t *\n\t\t\t\t * @dtopt Language\n\t\t\t\t * @name DataTable.defaults.language.paginate.next\n\t\t\t\t *\n\t\t\t\t * @example\n\t\t\t\t * $(document).ready( function() {\n\t\t\t\t * $('#example').dataTable( {\n\t\t\t\t * \"language\": {\n\t\t\t\t * \"paginate\": {\n\t\t\t\t * \"next\": \"Next page\"\n\t\t\t\t * }\n\t\t\t\t * }\n\t\t\t\t * } );\n\t\t\t\t * } );\n\t\t\t\t */\n\t\t\t\t\"sNext\": \"Next\",\n\t\n\t\n\t\t\t\t/**\n\t\t\t\t * Text to use for the 'previous' pagination button (to take the user to\n\t\t\t\t * the previous page).\n\t\t\t\t * @type string\n\t\t\t\t * @default Previous\n\t\t\t\t *\n\t\t\t\t * @dtopt Language\n\t\t\t\t * @name DataTable.defaults.language.paginate.previous\n\t\t\t\t *\n\t\t\t\t * @example\n\t\t\t\t * $(document).ready( function() {\n\t\t\t\t * $('#example').dataTable( {\n\t\t\t\t * \"language\": {\n\t\t\t\t * \"paginate\": {\n\t\t\t\t * \"previous\": \"Previous page\"\n\t\t\t\t * }\n\t\t\t\t * }\n\t\t\t\t * } );\n\t\t\t\t * } );\n\t\t\t\t */\n\t\t\t\t\"sPrevious\": \"Previous\"\n\t\t\t},\n\t\n\t\t\t/**\n\t\t\t * This string is shown in preference to `zeroRecords` when the table is\n\t\t\t * empty of data (regardless of filtering). Note that this is an optional\n\t\t\t * parameter - if it is not given, the value of `zeroRecords` will be used\n\t\t\t * instead (either the default or given value).\n\t\t\t * @type string\n\t\t\t * @default No data available in table\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.emptyTable\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"emptyTable\": \"No data available in table\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sEmptyTable\": \"No data available in table\",\n\t\n\t\n\t\t\t/**\n\t\t\t * This string gives information to the end user about the information\n\t\t\t * that is current on display on the page. The following tokens can be\n\t\t\t * used in the string and will be dynamically replaced as the table\n\t\t\t * display updates. This tokens can be placed anywhere in the string, or\n\t\t\t * removed as needed by the language requires:\n\t\t\t *\n\t\t\t * * `\\_START\\_` - Display index of the first record on the current page\n\t\t\t * * `\\_END\\_` - Display index of the last record on the current page\n\t\t\t * * `\\_TOTAL\\_` - Number of records in the table after filtering\n\t\t\t * * `\\_MAX\\_` - Number of records in the table without filtering\n\t\t\t * * `\\_PAGE\\_` - Current page number\n\t\t\t * * `\\_PAGES\\_` - Total number of pages of data in the table\n\t\t\t *\n\t\t\t * @type string\n\t\t\t * @default Showing _START_ to _END_ of _TOTAL_ entries\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.info\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"info\": \"Showing page _PAGE_ of _PAGES_\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sInfo\": \"Showing _START_ to _END_ of _TOTAL_ entries\",\n\t\n\t\n\t\t\t/**\n\t\t\t * Display information string for when the table is empty. Typically the\n\t\t\t * format of this string should match `info`.\n\t\t\t * @type string\n\t\t\t * @default Showing 0 to 0 of 0 entries\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.infoEmpty\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"infoEmpty\": \"No entries to show\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sInfoEmpty\": \"Showing 0 to 0 of 0 entries\",\n\t\n\t\n\t\t\t/**\n\t\t\t * When a user filters the information in a table, this string is appended\n\t\t\t * to the information (`info`) to give an idea of how strong the filtering\n\t\t\t * is. The variable _MAX_ is dynamically updated.\n\t\t\t * @type string\n\t\t\t * @default (filtered from _MAX_ total entries)\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.infoFiltered\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"infoFiltered\": \" - filtering from _MAX_ records\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sInfoFiltered\": \"(filtered from _MAX_ total entries)\",\n\t\n\t\n\t\t\t/**\n\t\t\t * If can be useful to append extra information to the info string at times,\n\t\t\t * and this variable does exactly that. This information will be appended to\n\t\t\t * the `info` (`infoEmpty` and `infoFiltered` in whatever combination they are\n\t\t\t * being used) at all times.\n\t\t\t * @type string\n\t\t\t * @default <i>Empty string</i>\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.infoPostFix\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"infoPostFix\": \"All records shown are derived from real information.\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sInfoPostFix\": \"\",\n\t\n\t\n\t\t\t/**\n\t\t\t * This decimal place operator is a little different from the other\n\t\t\t * language options since DataTables doesn't output floating point\n\t\t\t * numbers, so it won't ever use this for display of a number. Rather,\n\t\t\t * what this parameter does is modify the sort methods of the table so\n\t\t\t * that numbers which are in a format which has a character other than\n\t\t\t * a period (`.`) as a decimal place will be sorted numerically.\n\t\t\t *\n\t\t\t * Note that numbers with different decimal places cannot be shown in\n\t\t\t * the same table and still be sortable, the table must be consistent.\n\t\t\t * However, multiple different tables on the page can use different\n\t\t\t * decimal place characters.\n\t\t\t * @type string\n\t\t\t * @default \n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.decimal\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"decimal\": \",\"\n\t\t\t * \"thousands\": \".\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sDecimal\": \"\",\n\t\n\t\n\t\t\t/**\n\t\t\t * DataTables has a build in number formatter (`formatNumber`) which is\n\t\t\t * used to format large numbers that are used in the table information.\n\t\t\t * By default a comma is used, but this can be trivially changed to any\n\t\t\t * character you wish with this parameter.\n\t\t\t * @type string\n\t\t\t * @default ,\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.thousands\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"thousands\": \"'\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sThousands\": \",\",\n\t\n\t\n\t\t\t/**\n\t\t\t * Detail the action that will be taken when the drop down menu for the\n\t\t\t * pagination length option is changed. The '_MENU_' variable is replaced\n\t\t\t * with a default select list of 10, 25, 50 and 100, and can be replaced\n\t\t\t * with a custom select box if required.\n\t\t\t * @type string\n\t\t\t * @default Show _MENU_ entries\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.lengthMenu\n\t\t\t *\n\t\t\t * @example\n\t\t\t * // Language change only\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"lengthMenu\": \"Display _MENU_ records\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t *\n\t\t\t * @example\n\t\t\t * // Language and options change\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"lengthMenu\": 'Display <select>'+\n\t\t\t * '<option value=\"10\">10</option>'+\n\t\t\t * '<option value=\"20\">20</option>'+\n\t\t\t * '<option value=\"30\">30</option>'+\n\t\t\t * '<option value=\"40\">40</option>'+\n\t\t\t * '<option value=\"50\">50</option>'+\n\t\t\t * '<option value=\"-1\">All</option>'+\n\t\t\t * '</select> records'\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sLengthMenu\": \"Show _MENU_ entries\",\n\t\n\t\n\t\t\t/**\n\t\t\t * When using Ajax sourced data and during the first draw when DataTables is\n\t\t\t * gathering the data, this message is shown in an empty row in the table to\n\t\t\t * indicate to the end user the the data is being loaded. Note that this\n\t\t\t * parameter is not used when loading data by server-side processing, just\n\t\t\t * Ajax sourced data with client-side processing.\n\t\t\t * @type string\n\t\t\t * @default Loading...\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.loadingRecords\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"loadingRecords\": \"Please wait - loading...\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sLoadingRecords\": \"Loading...\",\n\t\n\t\n\t\t\t/**\n\t\t\t * Text which is displayed when the table is processing a user action\n\t\t\t * (usually a sort command or similar).\n\t\t\t * @type string\n\t\t\t * @default Processing...\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.processing\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"processing\": \"DataTables is currently busy\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sProcessing\": \"Processing...\",\n\t\n\t\n\t\t\t/**\n\t\t\t * Details the actions that will be taken when the user types into the\n\t\t\t * filtering input text box. The variable \"_INPUT_\", if used in the string,\n\t\t\t * is replaced with the HTML text box for the filtering input allowing\n\t\t\t * control over where it appears in the string. If \"_INPUT_\" is not given\n\t\t\t * then the input box is appended to the string automatically.\n\t\t\t * @type string\n\t\t\t * @default Search:\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.search\n\t\t\t *\n\t\t\t * @example\n\t\t\t * // Input text box will be appended at the end automatically\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"search\": \"Filter records:\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t *\n\t\t\t * @example\n\t\t\t * // Specify where the filter should appear\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"search\": \"Apply filter _INPUT_ to table\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sSearch\": \"Search:\",\n\t\n\t\n\t\t\t/**\n\t\t\t * Assign a `placeholder` attribute to the search `input` element\n\t\t\t * @type string\n\t\t\t * @default \n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.searchPlaceholder\n\t\t\t */\n\t\t\t\"sSearchPlaceholder\": \"\",\n\t\n\t\n\t\t\t/**\n\t\t\t * All of the language information can be stored in a file on the\n\t\t\t * server-side, which DataTables will look up if this parameter is passed.\n\t\t\t * It must store the URL of the language file, which is in a JSON format,\n\t\t\t * and the object has the same properties as the oLanguage object in the\n\t\t\t * initialiser object (i.e. the above parameters). Please refer to one of\n\t\t\t * the example language files to see how this works in action.\n\t\t\t * @type string\n\t\t\t * @default <i>Empty string - i.e. disabled</i>\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.url\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"url\": \"http://www.sprymedia.co.uk/dataTables/lang.txt\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sUrl\": \"\",\n\t\n\t\n\t\t\t/**\n\t\t\t * Text shown inside the table records when the is no information to be\n\t\t\t * displayed after filtering. `emptyTable` is shown when there is simply no\n\t\t\t * information in the table at all (regardless of filtering).\n\t\t\t * @type string\n\t\t\t * @default No matching records found\n\t\t\t *\n\t\t\t * @dtopt Language\n\t\t\t * @name DataTable.defaults.language.zeroRecords\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $(document).ready( function() {\n\t\t\t * $('#example').dataTable( {\n\t\t\t * \"language\": {\n\t\t\t * \"zeroRecords\": \"No records to display\"\n\t\t\t * }\n\t\t\t * } );\n\t\t\t * } );\n\t\t\t */\n\t\t\t\"sZeroRecords\": \"No matching records found\"\n\t\t},\n\t\n\t\n\t\t/**\n\t\t * This parameter allows you to have define the global filtering state at\n\t\t * initialisation time. As an object the `search` parameter must be\n\t\t * defined, but all other parameters are optional. When `regex` is true,\n\t\t * the search string will be treated as a regular expression, when false\n\t\t * (default) it will be treated as a straight string. When `smart`\n\t\t * DataTables will use it's smart filtering methods (to word match at\n\t\t * any point in the data), when false this will not be done.\n\t\t * @namespace\n\t\t * @extends DataTable.models.oSearch\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.search\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"search\": {\"search\": \"Initial search\"}\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"oSearch\": $.extend( {}, DataTable.models.oSearch ),\n\t\n\t\n\t\t/**\n\t\t * __Deprecated__ The functionality provided by this parameter has now been\n\t\t * superseded by that provided through `ajax`, which should be used instead.\n\t\t *\n\t\t * By default DataTables will look for the property `data` (or `aaData` for\n\t\t * compatibility with DataTables 1.9-) when obtaining data from an Ajax\n\t\t * source or for server-side processing - this parameter allows that\n\t\t * property to be changed. You can use Javascript dotted object notation to\n\t\t * get a data source for multiple levels of nesting.\n\t\t * @type string\n\t\t * @default data\n\t\t *\n\t\t * @dtopt Options\n\t\t * @dtopt Server-side\n\t\t * @name DataTable.defaults.ajaxDataProp\n\t\t *\n\t\t * @deprecated 1.10. Please use `ajax` for this functionality now.\n\t\t */\n\t\t\"sAjaxDataProp\": \"data\",\n\t\n\t\n\t\t/**\n\t\t * __Deprecated__ The functionality provided by this parameter has now been\n\t\t * superseded by that provided through `ajax`, which should be used instead.\n\t\t *\n\t\t * You can instruct DataTables to load data from an external\n\t\t * source using this parameter (use aData if you want to pass data in you\n\t\t * already have). Simply provide a url a JSON object can be obtained from.\n\t\t * @type string\n\t\t * @default null\n\t\t *\n\t\t * @dtopt Options\n\t\t * @dtopt Server-side\n\t\t * @name DataTable.defaults.ajaxSource\n\t\t *\n\t\t * @deprecated 1.10. Please use `ajax` for this functionality now.\n\t\t */\n\t\t\"sAjaxSource\": null,\n\t\n\t\n\t\t/**\n\t\t * This initialisation variable allows you to specify exactly where in the\n\t\t * DOM you want DataTables to inject the various controls it adds to the page\n\t\t * (for example you might want the pagination controls at the top of the\n\t\t * table). DIV elements (with or without a custom class) can also be added to\n\t\t * aid styling. The follow syntax is used:\n\t\t * <ul>\n\t\t * <li>The following options are allowed:\n\t\t * <ul>\n\t\t * <li>'l' - Length changing</li>\n\t\t * <li>'f' - Filtering input</li>\n\t\t * <li>'t' - The table!</li>\n\t\t * <li>'i' - Information</li>\n\t\t * <li>'p' - Pagination</li>\n\t\t * <li>'r' - pRocessing</li>\n\t\t * </ul>\n\t\t * </li>\n\t\t * <li>The following constants are allowed:\n\t\t * <ul>\n\t\t * <li>'H' - jQueryUI theme \"header\" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')</li>\n\t\t * <li>'F' - jQueryUI theme \"footer\" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')</li>\n\t\t * </ul>\n\t\t * </li>\n\t\t * <li>The following syntax is expected:\n\t\t * <ul>\n\t\t * <li>'<' and '>' - div elements</li>\n\t\t * <li>'<\"class\" and '>' - div with a class</li>\n\t\t * <li>'<\"#id\" and '>' - div with an ID</li>\n\t\t * </ul>\n\t\t * </li>\n\t\t * <li>Examples:\n\t\t * <ul>\n\t\t * <li>'<\"wrapper\"flipt>'</li>\n\t\t * <li>'<lf<t>ip>'</li>\n\t\t * </ul>\n\t\t * </li>\n\t\t * </ul>\n\t\t * @type string\n\t\t * @default lfrtip <i>(when `jQueryUI` is false)</i> <b>or</b>\n\t\t * <\"H\"lfr>t<\"F\"ip> <i>(when `jQueryUI` is true)</i>\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.dom\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"dom\": '<\"top\"i>rt<\"bottom\"flp><\"clear\">'\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sDom\": \"lfrtip\",\n\t\n\t\n\t\t/**\n\t\t * Search delay option. This will throttle full table searches that use the\n\t\t * DataTables provided search input element (it does not effect calls to\n\t\t * `dt-api search()`, providing a delay before the search is made.\n\t\t * @type integer\n\t\t * @default 0\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.searchDelay\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"searchDelay\": 200\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"searchDelay\": null,\n\t\n\t\n\t\t/**\n\t\t * DataTables features four different built-in options for the buttons to\n\t\t * display for pagination control:\n\t\t *\n\t\t * * `simple` - 'Previous' and 'Next' buttons only\n\t\t * * 'simple_numbers` - 'Previous' and 'Next' buttons, plus page numbers\n\t\t * * `full` - 'First', 'Previous', 'Next' and 'Last' buttons\n\t\t * * `full_numbers` - 'First', 'Previous', 'Next' and 'Last' buttons, plus\n\t\t * page numbers\n\t\t * \n\t\t * Further methods can be added using {@link DataTable.ext.oPagination}.\n\t\t * @type string\n\t\t * @default simple_numbers\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.pagingType\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"pagingType\": \"full_numbers\"\n\t\t * } );\n\t\t * } )\n\t\t */\n\t\t\"sPaginationType\": \"simple_numbers\",\n\t\n\t\n\t\t/**\n\t\t * Enable horizontal scrolling. When a table is too wide to fit into a\n\t\t * certain layout, or you have a large number of columns in the table, you\n\t\t * can enable x-scrolling to show the table in a viewport, which can be\n\t\t * scrolled. This property can be `true` which will allow the table to\n\t\t * scroll horizontally when needed, or any CSS unit, or a number (in which\n\t\t * case it will be treated as a pixel measurement). Setting as simply `true`\n\t\t * is recommended.\n\t\t * @type boolean|string\n\t\t * @default <i>blank string - i.e. disabled</i>\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.scrollX\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"scrollX\": true,\n\t\t * \"scrollCollapse\": true\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sScrollX\": \"\",\n\t\n\t\n\t\t/**\n\t\t * This property can be used to force a DataTable to use more width than it\n\t\t * might otherwise do when x-scrolling is enabled. For example if you have a\n\t\t * table which requires to be well spaced, this parameter is useful for\n\t\t * \"over-sizing\" the table, and thus forcing scrolling. This property can by\n\t\t * any CSS unit, or a number (in which case it will be treated as a pixel\n\t\t * measurement).\n\t\t * @type string\n\t\t * @default <i>blank string - i.e. disabled</i>\n\t\t *\n\t\t * @dtopt Options\n\t\t * @name DataTable.defaults.scrollXInner\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"scrollX\": \"100%\",\n\t\t * \"scrollXInner\": \"110%\"\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sScrollXInner\": \"\",\n\t\n\t\n\t\t/**\n\t\t * Enable vertical scrolling. Vertical scrolling will constrain the DataTable\n\t\t * to the given height, and enable scrolling for any data which overflows the\n\t\t * current viewport. This can be used as an alternative to paging to display\n\t\t * a lot of data in a small area (although paging and scrolling can both be\n\t\t * enabled at the same time). This property can be any CSS unit, or a number\n\t\t * (in which case it will be treated as a pixel measurement).\n\t\t * @type string\n\t\t * @default <i>blank string - i.e. disabled</i>\n\t\t *\n\t\t * @dtopt Features\n\t\t * @name DataTable.defaults.scrollY\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"scrollY\": \"200px\",\n\t\t * \"paginate\": false\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sScrollY\": \"\",\n\t\n\t\n\t\t/**\n\t\t * __Deprecated__ The functionality provided by this parameter has now been\n\t\t * superseded by that provided through `ajax`, which should be used instead.\n\t\t *\n\t\t * Set the HTTP method that is used to make the Ajax call for server-side\n\t\t * processing or Ajax sourced data.\n\t\t * @type string\n\t\t * @default GET\n\t\t *\n\t\t * @dtopt Options\n\t\t * @dtopt Server-side\n\t\t * @name DataTable.defaults.serverMethod\n\t\t *\n\t\t * @deprecated 1.10. Please use `ajax` for this functionality now.\n\t\t */\n\t\t\"sServerMethod\": \"GET\",\n\t\n\t\n\t\t/**\n\t\t * DataTables makes use of renderers when displaying HTML elements for\n\t\t * a table. These renderers can be added or modified by plug-ins to\n\t\t * generate suitable mark-up for a site. For example the Bootstrap\n\t\t * integration plug-in for DataTables uses a paging button renderer to\n\t\t * display pagination buttons in the mark-up required by Bootstrap.\n\t\t *\n\t\t * For further information about the renderers available see\n\t\t * DataTable.ext.renderer\n\t\t * @type string|object\n\t\t * @default null\n\t\t *\n\t\t * @name DataTable.defaults.renderer\n\t\t *\n\t\t */\n\t\t\"renderer\": null,\n\t\n\t\n\t\t/**\n\t\t * Set the data property name that DataTables should use to get a row's id\n\t\t * to set as the `id` property in the node.\n\t\t * @type string\n\t\t * @default DT_RowId\n\t\t *\n\t\t * @name DataTable.defaults.rowId\n\t\t */\n\t\t\"rowId\": \"DT_RowId\"\n\t};\n\t\n\t_fnHungarianMap( DataTable.defaults );\n\t\n\t\n\t\n\t/*\n\t * Developer note - See note in model.defaults.js about the use of Hungarian\n\t * notation and camel case.\n\t */\n\t\n\t/**\n\t * Column options that can be given to DataTables at initialisation time.\n\t * @namespace\n\t */\n\tDataTable.defaults.column = {\n\t\t/**\n\t\t * Define which column(s) an order will occur on for this column. This\n\t\t * allows a column's ordering to take multiple columns into account when\n\t\t * doing a sort or use the data from a different column. For example first\n\t\t * name / last name columns make sense to do a multi-column sort over the\n\t\t * two columns.\n\t\t * @type array|int\n\t\t * @default null <i>Takes the value of the column index automatically</i>\n\t\t *\n\t\t * @name DataTable.defaults.column.orderData\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"orderData\": [ 0, 1 ], \"targets\": [ 0 ] },\n\t\t * { \"orderData\": [ 1, 0 ], \"targets\": [ 1 ] },\n\t\t * { \"orderData\": 2, \"targets\": [ 2 ] }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * { \"orderData\": [ 0, 1 ] },\n\t\t * { \"orderData\": [ 1, 0 ] },\n\t\t * { \"orderData\": 2 },\n\t\t * null,\n\t\t * null\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"aDataSort\": null,\n\t\t\"iDataSort\": -1,\n\t\n\t\n\t\t/**\n\t\t * You can control the default ordering direction, and even alter the\n\t\t * behaviour of the sort handler (i.e. only allow ascending ordering etc)\n\t\t * using this parameter.\n\t\t * @type array\n\t\t * @default [ 'asc', 'desc' ]\n\t\t *\n\t\t * @name DataTable.defaults.column.orderSequence\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"orderSequence\": [ \"asc\" ], \"targets\": [ 1 ] },\n\t\t * { \"orderSequence\": [ \"desc\", \"asc\", \"asc\" ], \"targets\": [ 2 ] },\n\t\t * { \"orderSequence\": [ \"desc\" ], \"targets\": [ 3 ] }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * null,\n\t\t * { \"orderSequence\": [ \"asc\" ] },\n\t\t * { \"orderSequence\": [ \"desc\", \"asc\", \"asc\" ] },\n\t\t * { \"orderSequence\": [ \"desc\" ] },\n\t\t * null\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"asSorting\": [ 'asc', 'desc' ],\n\t\n\t\n\t\t/**\n\t\t * Enable or disable filtering on the data in this column.\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @name DataTable.defaults.column.searchable\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"searchable\": false, \"targets\": [ 0 ] }\n\t\t * ] } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * { \"searchable\": false },\n\t\t * null,\n\t\t * null,\n\t\t * null,\n\t\t * null\n\t\t * ] } );\n\t\t * } );\n\t\t */\n\t\t\"bSearchable\": true,\n\t\n\t\n\t\t/**\n\t\t * Enable or disable ordering on this column.\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @name DataTable.defaults.column.orderable\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"orderable\": false, \"targets\": [ 0 ] }\n\t\t * ] } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * { \"orderable\": false },\n\t\t * null,\n\t\t * null,\n\t\t * null,\n\t\t * null\n\t\t * ] } );\n\t\t * } );\n\t\t */\n\t\t\"bSortable\": true,\n\t\n\t\n\t\t/**\n\t\t * Enable or disable the display of this column.\n\t\t * @type boolean\n\t\t * @default true\n\t\t *\n\t\t * @name DataTable.defaults.column.visible\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"visible\": false, \"targets\": [ 0 ] }\n\t\t * ] } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * { \"visible\": false },\n\t\t * null,\n\t\t * null,\n\t\t * null,\n\t\t * null\n\t\t * ] } );\n\t\t * } );\n\t\t */\n\t\t\"bVisible\": true,\n\t\n\t\n\t\t/**\n\t\t * Developer definable function that is called whenever a cell is created (Ajax source,\n\t\t * etc) or processed for input (DOM source). This can be used as a compliment to mRender\n\t\t * allowing you to modify the DOM element (add background colour for example) when the\n\t\t * element is available.\n\t\t * @type function\n\t\t * @param {element} td The TD node that has been created\n\t\t * @param {*} cellData The Data for the cell\n\t\t * @param {array|object} rowData The data for the whole row\n\t\t * @param {int} row The row index for the aoData data store\n\t\t * @param {int} col The column index for aoColumns\n\t\t *\n\t\t * @name DataTable.defaults.column.createdCell\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [ {\n\t\t * \"targets\": [3],\n\t\t * \"createdCell\": function (td, cellData, rowData, row, col) {\n\t\t * if ( cellData == \"1.7\" ) {\n\t\t * $(td).css('color', 'blue')\n\t\t * }\n\t\t * }\n\t\t * } ]\n\t\t * });\n\t\t * } );\n\t\t */\n\t\t\"fnCreatedCell\": null,\n\t\n\t\n\t\t/**\n\t\t * This parameter has been replaced by `data` in DataTables to ensure naming\n\t\t * consistency. `dataProp` can still be used, as there is backwards\n\t\t * compatibility in DataTables for this option, but it is strongly\n\t\t * recommended that you use `data` in preference to `dataProp`.\n\t\t * @name DataTable.defaults.column.dataProp\n\t\t */\n\t\n\t\n\t\t/**\n\t\t * This property can be used to read data from any data source property,\n\t\t * including deeply nested objects / properties. `data` can be given in a\n\t\t * number of different ways which effect its behaviour:\n\t\t *\n\t\t * * `integer` - treated as an array index for the data source. This is the\n\t\t * default that DataTables uses (incrementally increased for each column).\n\t\t * * `string` - read an object property from the data source. There are\n\t\t * three 'special' options that can be used in the string to alter how\n\t\t * DataTables reads the data from the source object:\n\t\t * * `.` - Dotted Javascript notation. Just as you use a `.` in\n\t\t * Javascript to read from nested objects, so to can the options\n\t\t * specified in `data`. For example: `browser.version` or\n\t\t * `browser.name`. If your object parameter name contains a period, use\n\t\t * `\\\\` to escape it - i.e. `first\\\\.name`.\n\t\t * * `[]` - Array notation. DataTables can automatically combine data\n\t\t * from and array source, joining the data with the characters provided\n\t\t * between the two brackets. For example: `name[, ]` would provide a\n\t\t * comma-space separated list from the source array. If no characters\n\t\t * are provided between the brackets, the original array source is\n\t\t * returned.\n\t\t * * `()` - Function notation. Adding `()` to the end of a parameter will\n\t\t * execute a function of the name given. For example: `browser()` for a\n\t\t * simple function on the data source, `browser.version()` for a\n\t\t * function in a nested property or even `browser().version` to get an\n\t\t * object property if the function called returns an object. Note that\n\t\t * function notation is recommended for use in `render` rather than\n\t\t * `data` as it is much simpler to use as a renderer.\n\t\t * * `null` - use the original data source for the row rather than plucking\n\t\t * data directly from it. This action has effects on two other\n\t\t * initialisation options:\n\t\t * * `defaultContent` - When null is given as the `data` option and\n\t\t * `defaultContent` is specified for the column, the value defined by\n\t\t * `defaultContent` will be used for the cell.\n\t\t * * `render` - When null is used for the `data` option and the `render`\n\t\t * option is specified for the column, the whole data source for the\n\t\t * row is used for the renderer.\n\t\t * * `function` - the function given will be executed whenever DataTables\n\t\t * needs to set or get the data for a cell in the column. The function\n\t\t * takes three parameters:\n\t\t * * Parameters:\n\t\t * * `{array|object}` The data source for the row\n\t\t * * `{string}` The type call data requested - this will be 'set' when\n\t\t * setting data or 'filter', 'display', 'type', 'sort' or undefined\n\t\t * when gathering data. Note that when `undefined` is given for the\n\t\t * type DataTables expects to get the raw data for the object back<\n\t\t * * `{*}` Data to set when the second parameter is 'set'.\n\t\t * * Return:\n\t\t * * The return value from the function is not required when 'set' is\n\t\t * the type of call, but otherwise the return is what will be used\n\t\t * for the data requested.\n\t\t *\n\t\t * Note that `data` is a getter and setter option. If you just require\n\t\t * formatting of data for output, you will likely want to use `render` which\n\t\t * is simply a getter and thus simpler to use.\n\t\t *\n\t\t * Note that prior to DataTables 1.9.2 `data` was called `mDataProp`. The\n\t\t * name change reflects the flexibility of this property and is consistent\n\t\t * with the naming of mRender. If 'mDataProp' is given, then it will still\n\t\t * be used by DataTables, as it automatically maps the old name to the new\n\t\t * if required.\n\t\t *\n\t\t * @type string|int|function|null\n\t\t * @default null <i>Use automatically calculated column index</i>\n\t\t *\n\t\t * @name DataTable.defaults.column.data\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Read table data from objects\n\t\t * // JSON structure for each row:\n\t\t * // {\n\t\t * // \"engine\": {value},\n\t\t * // \"browser\": {value},\n\t\t * // \"platform\": {value},\n\t\t * // \"version\": {value},\n\t\t * // \"grade\": {value}\n\t\t * // }\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"ajaxSource\": \"sources/objects.txt\",\n\t\t * \"columns\": [\n\t\t * { \"data\": \"engine\" },\n\t\t * { \"data\": \"browser\" },\n\t\t * { \"data\": \"platform\" },\n\t\t * { \"data\": \"version\" },\n\t\t * { \"data\": \"grade\" }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Read information from deeply nested objects\n\t\t * // JSON structure for each row:\n\t\t * // {\n\t\t * // \"engine\": {value},\n\t\t * // \"browser\": {value},\n\t\t * // \"platform\": {\n\t\t * // \"inner\": {value}\n\t\t * // },\n\t\t * // \"details\": [\n\t\t * // {value}, {value}\n\t\t * // ]\n\t\t * // }\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"ajaxSource\": \"sources/deep.txt\",\n\t\t * \"columns\": [\n\t\t * { \"data\": \"engine\" },\n\t\t * { \"data\": \"browser\" },\n\t\t * { \"data\": \"platform.inner\" },\n\t\t * { \"data\": \"platform.details.0\" },\n\t\t * { \"data\": \"platform.details.1\" }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `data` as a function to provide different information for\n\t\t * // sorting, filtering and display. In this case, currency (price)\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [ {\n\t\t * \"targets\": [ 0 ],\n\t\t * \"data\": function ( source, type, val ) {\n\t\t * if (type === 'set') {\n\t\t * source.price = val;\n\t\t * // Store the computed dislay and filter values for efficiency\n\t\t * source.price_display = val==\"\" ? \"\" : \"$\"+numberFormat(val);\n\t\t * source.price_filter = val==\"\" ? \"\" : \"$\"+numberFormat(val)+\" \"+val;\n\t\t * return;\n\t\t * }\n\t\t * else if (type === 'display') {\n\t\t * return source.price_display;\n\t\t * }\n\t\t * else if (type === 'filter') {\n\t\t * return source.price_filter;\n\t\t * }\n\t\t * // 'sort', 'type' and undefined all just use the integer\n\t\t * return source.price;\n\t\t * }\n\t\t * } ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using default content\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [ {\n\t\t * \"targets\": [ 0 ],\n\t\t * \"data\": null,\n\t\t * \"defaultContent\": \"Click to edit\"\n\t\t * } ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using array notation - outputting a list from an array\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [ {\n\t\t * \"targets\": [ 0 ],\n\t\t * \"data\": \"name[, ]\"\n\t\t * } ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t */\n\t\t\"mData\": null,\n\t\n\t\n\t\t/**\n\t\t * This property is the rendering partner to `data` and it is suggested that\n\t\t * when you want to manipulate data for display (including filtering,\n\t\t * sorting etc) without altering the underlying data for the table, use this\n\t\t * property. `render` can be considered to be the the read only companion to\n\t\t * `data` which is read / write (then as such more complex). Like `data`\n\t\t * this option can be given in a number of different ways to effect its\n\t\t * behaviour:\n\t\t *\n\t\t * * `integer` - treated as an array index for the data source. This is the\n\t\t * default that DataTables uses (incrementally increased for each column).\n\t\t * * `string` - read an object property from the data source. There are\n\t\t * three 'special' options that can be used in the string to alter how\n\t\t * DataTables reads the data from the source object:\n\t\t * * `.` - Dotted Javascript notation. Just as you use a `.` in\n\t\t * Javascript to read from nested objects, so to can the options\n\t\t * specified in `data`. For example: `browser.version` or\n\t\t * `browser.name`. If your object parameter name contains a period, use\n\t\t * `\\\\` to escape it - i.e. `first\\\\.name`.\n\t\t * * `[]` - Array notation. DataTables can automatically combine data\n\t\t * from and array source, joining the data with the characters provided\n\t\t * between the two brackets. For example: `name[, ]` would provide a\n\t\t * comma-space separated list from the source array. If no characters\n\t\t * are provided between the brackets, the original array source is\n\t\t * returned.\n\t\t * * `()` - Function notation. Adding `()` to the end of a parameter will\n\t\t * execute a function of the name given. For example: `browser()` for a\n\t\t * simple function on the data source, `browser.version()` for a\n\t\t * function in a nested property or even `browser().version` to get an\n\t\t * object property if the function called returns an object.\n\t\t * * `object` - use different data for the different data types requested by\n\t\t * DataTables ('filter', 'display', 'type' or 'sort'). The property names\n\t\t * of the object is the data type the property refers to and the value can\n\t\t * defined using an integer, string or function using the same rules as\n\t\t * `render` normally does. Note that an `_` option _must_ be specified.\n\t\t * This is the default value to use if you haven't specified a value for\n\t\t * the data type requested by DataTables.\n\t\t * * `function` - the function given will be executed whenever DataTables\n\t\t * needs to set or get the data for a cell in the column. The function\n\t\t * takes three parameters:\n\t\t * * Parameters:\n\t\t * * {array|object} The data source for the row (based on `data`)\n\t\t * * {string} The type call data requested - this will be 'filter',\n\t\t * 'display', 'type' or 'sort'.\n\t\t * * {array|object} The full data source for the row (not based on\n\t\t * `data`)\n\t\t * * Return:\n\t\t * * The return value from the function is what will be used for the\n\t\t * data requested.\n\t\t *\n\t\t * @type string|int|function|object|null\n\t\t * @default null Use the data source value.\n\t\t *\n\t\t * @name DataTable.defaults.column.render\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Create a comma separated list from an array of objects\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"ajaxSource\": \"sources/deep.txt\",\n\t\t * \"columns\": [\n\t\t * { \"data\": \"engine\" },\n\t\t * { \"data\": \"browser\" },\n\t\t * {\n\t\t * \"data\": \"platform\",\n\t\t * \"render\": \"[, ].name\"\n\t\t * }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Execute a function to obtain data\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [ {\n\t\t * \"targets\": [ 0 ],\n\t\t * \"data\": null, // Use the full data source object for the renderer's source\n\t\t * \"render\": \"browserName()\"\n\t\t * } ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // As an object, extracting different data for the different types\n\t\t * // This would be used with a data source such as:\n\t\t * // { \"phone\": 5552368, \"phone_filter\": \"5552368 555-2368\", \"phone_display\": \"555-2368\" }\n\t\t * // Here the `phone` integer is used for sorting and type detection, while `phone_filter`\n\t\t * // (which has both forms) is used for filtering for if a user inputs either format, while\n\t\t * // the formatted phone number is the one that is shown in the table.\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [ {\n\t\t * \"targets\": [ 0 ],\n\t\t * \"data\": null, // Use the full data source object for the renderer's source\n\t\t * \"render\": {\n\t\t * \"_\": \"phone\",\n\t\t * \"filter\": \"phone_filter\",\n\t\t * \"display\": \"phone_display\"\n\t\t * }\n\t\t * } ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Use as a function to create a link from the data source\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [ {\n\t\t * \"targets\": [ 0 ],\n\t\t * \"data\": \"download_link\",\n\t\t * \"render\": function ( data, type, full ) {\n\t\t * return '<a href=\"'+data+'\">Download</a>';\n\t\t * }\n\t\t * } ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"mRender\": null,\n\t\n\t\n\t\t/**\n\t\t * Change the cell type created for the column - either TD cells or TH cells. This\n\t\t * can be useful as TH cells have semantic meaning in the table body, allowing them\n\t\t * to act as a header for a row (you may wish to add scope='row' to the TH elements).\n\t\t * @type string\n\t\t * @default td\n\t\t *\n\t\t * @name DataTable.defaults.column.cellType\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Make the first column use TH cells\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [ {\n\t\t * \"targets\": [ 0 ],\n\t\t * \"cellType\": \"th\"\n\t\t * } ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sCellType\": \"td\",\n\t\n\t\n\t\t/**\n\t\t * Class to give to each cell in this column.\n\t\t * @type string\n\t\t * @default <i>Empty string</i>\n\t\t *\n\t\t * @name DataTable.defaults.column.class\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"class\": \"my_class\", \"targets\": [ 0 ] }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * { \"class\": \"my_class\" },\n\t\t * null,\n\t\t * null,\n\t\t * null,\n\t\t * null\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sClass\": \"\",\n\t\n\t\t/**\n\t\t * When DataTables calculates the column widths to assign to each column,\n\t\t * it finds the longest string in each column and then constructs a\n\t\t * temporary table and reads the widths from that. The problem with this\n\t\t * is that \"mmm\" is much wider then \"iiii\", but the latter is a longer\n\t\t * string - thus the calculation can go wrong (doing it properly and putting\n\t\t * it into an DOM object and measuring that is horribly(!) slow). Thus as\n\t\t * a \"work around\" we provide this option. It will append its value to the\n\t\t * text that is found to be the longest string for the column - i.e. padding.\n\t\t * Generally you shouldn't need this!\n\t\t * @type string\n\t\t * @default <i>Empty string<i>\n\t\t *\n\t\t * @name DataTable.defaults.column.contentPadding\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * null,\n\t\t * null,\n\t\t * null,\n\t\t * {\n\t\t * \"contentPadding\": \"mmm\"\n\t\t * }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sContentPadding\": \"\",\n\t\n\t\n\t\t/**\n\t\t * Allows a default value to be given for a column's data, and will be used\n\t\t * whenever a null data source is encountered (this can be because `data`\n\t\t * is set to null, or because the data source itself is null).\n\t\t * @type string\n\t\t * @default null\n\t\t *\n\t\t * @name DataTable.defaults.column.defaultContent\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * {\n\t\t * \"data\": null,\n\t\t * \"defaultContent\": \"Edit\",\n\t\t * \"targets\": [ -1 ]\n\t\t * }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * null,\n\t\t * null,\n\t\t * null,\n\t\t * {\n\t\t * \"data\": null,\n\t\t * \"defaultContent\": \"Edit\"\n\t\t * }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sDefaultContent\": null,\n\t\n\t\n\t\t/**\n\t\t * This parameter is only used in DataTables' server-side processing. It can\n\t\t * be exceptionally useful to know what columns are being displayed on the\n\t\t * client side, and to map these to database fields. When defined, the names\n\t\t * also allow DataTables to reorder information from the server if it comes\n\t\t * back in an unexpected order (i.e. if you switch your columns around on the\n\t\t * client-side, your server-side code does not also need updating).\n\t\t * @type string\n\t\t * @default <i>Empty string</i>\n\t\t *\n\t\t * @name DataTable.defaults.column.name\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"name\": \"engine\", \"targets\": [ 0 ] },\n\t\t * { \"name\": \"browser\", \"targets\": [ 1 ] },\n\t\t * { \"name\": \"platform\", \"targets\": [ 2 ] },\n\t\t * { \"name\": \"version\", \"targets\": [ 3 ] },\n\t\t * { \"name\": \"grade\", \"targets\": [ 4 ] }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * { \"name\": \"engine\" },\n\t\t * { \"name\": \"browser\" },\n\t\t * { \"name\": \"platform\" },\n\t\t * { \"name\": \"version\" },\n\t\t * { \"name\": \"grade\" }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sName\": \"\",\n\t\n\t\n\t\t/**\n\t\t * Defines a data source type for the ordering which can be used to read\n\t\t * real-time information from the table (updating the internally cached\n\t\t * version) prior to ordering. This allows ordering to occur on user\n\t\t * editable elements such as form inputs.\n\t\t * @type string\n\t\t * @default std\n\t\t *\n\t\t * @name DataTable.defaults.column.orderDataType\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"orderDataType\": \"dom-text\", \"targets\": [ 2, 3 ] },\n\t\t * { \"type\": \"numeric\", \"targets\": [ 3 ] },\n\t\t * { \"orderDataType\": \"dom-select\", \"targets\": [ 4 ] },\n\t\t * { \"orderDataType\": \"dom-checkbox\", \"targets\": [ 5 ] }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * null,\n\t\t * null,\n\t\t * { \"orderDataType\": \"dom-text\" },\n\t\t * { \"orderDataType\": \"dom-text\", \"type\": \"numeric\" },\n\t\t * { \"orderDataType\": \"dom-select\" },\n\t\t * { \"orderDataType\": \"dom-checkbox\" }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sSortDataType\": \"std\",\n\t\n\t\n\t\t/**\n\t\t * The title of this column.\n\t\t * @type string\n\t\t * @default null <i>Derived from the 'TH' value for this column in the\n\t\t * original HTML table.</i>\n\t\t *\n\t\t * @name DataTable.defaults.column.title\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"title\": \"My column title\", \"targets\": [ 0 ] }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * { \"title\": \"My column title\" },\n\t\t * null,\n\t\t * null,\n\t\t * null,\n\t\t * null\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sTitle\": null,\n\t\n\t\n\t\t/**\n\t\t * The type allows you to specify how the data for this column will be\n\t\t * ordered. Four types (string, numeric, date and html (which will strip\n\t\t * HTML tags before ordering)) are currently available. Note that only date\n\t\t * formats understood by Javascript's Date() object will be accepted as type\n\t\t * date. For example: \"Mar 26, 2008 5:03 PM\". May take the values: 'string',\n\t\t * 'numeric', 'date' or 'html' (by default). Further types can be adding\n\t\t * through plug-ins.\n\t\t * @type string\n\t\t * @default null <i>Auto-detected from raw data</i>\n\t\t *\n\t\t * @name DataTable.defaults.column.type\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"type\": \"html\", \"targets\": [ 0 ] }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * { \"type\": \"html\" },\n\t\t * null,\n\t\t * null,\n\t\t * null,\n\t\t * null\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sType\": null,\n\t\n\t\n\t\t/**\n\t\t * Defining the width of the column, this parameter may take any CSS value\n\t\t * (3em, 20px etc). DataTables applies 'smart' widths to columns which have not\n\t\t * been given a specific width through this interface ensuring that the table\n\t\t * remains readable.\n\t\t * @type string\n\t\t * @default null <i>Automatic</i>\n\t\t *\n\t\t * @name DataTable.defaults.column.width\n\t\t * @dtopt Columns\n\t\t *\n\t\t * @example\n\t\t * // Using `columnDefs`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columnDefs\": [\n\t\t * { \"width\": \"20%\", \"targets\": [ 0 ] }\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t *\n\t\t * @example\n\t\t * // Using `columns`\n\t\t * $(document).ready( function() {\n\t\t * $('#example').dataTable( {\n\t\t * \"columns\": [\n\t\t * { \"width\": \"20%\" },\n\t\t * null,\n\t\t * null,\n\t\t * null,\n\t\t * null\n\t\t * ]\n\t\t * } );\n\t\t * } );\n\t\t */\n\t\t\"sWidth\": null\n\t};\n\t\n\t_fnHungarianMap( DataTable.defaults.column );\n\t\n\t\n\t\n\t/**\n\t * DataTables settings object - this holds all the information needed for a\n\t * given table, including configuration, data and current application of the\n\t * table options. DataTables does not have a single instance for each DataTable\n\t * with the settings attached to that instance, but rather instances of the\n\t * DataTable \"class\" are created on-the-fly as needed (typically by a\n\t * $().dataTable() call) and the settings object is then applied to that\n\t * instance.\n\t *\n\t * Note that this object is related to {@link DataTable.defaults} but this\n\t * one is the internal data store for DataTables's cache of columns. It should\n\t * NOT be manipulated outside of DataTables. Any configuration should be done\n\t * through the initialisation options.\n\t * @namespace\n\t * @todo Really should attach the settings object to individual instances so we\n\t * don't need to create new instances on each $().dataTable() call (if the\n\t * table already exists). It would also save passing oSettings around and\n\t * into every single function. However, this is a very significant\n\t * architecture change for DataTables and will almost certainly break\n\t * backwards compatibility with older installations. This is something that\n\t * will be done in 2.0.\n\t */\n\tDataTable.models.oSettings = {\n\t\t/**\n\t\t * Primary features of DataTables and their enablement state.\n\t\t * @namespace\n\t\t */\n\t\t\"oFeatures\": {\n\t\n\t\t\t/**\n\t\t\t * Flag to say if DataTables should automatically try to calculate the\n\t\t\t * optimum table and columns widths (true) or not (false).\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bAutoWidth\": null,\n\t\n\t\t\t/**\n\t\t\t * Delay the creation of TR and TD elements until they are actually\n\t\t\t * needed by a driven page draw. This can give a significant speed\n\t\t\t * increase for Ajax source and Javascript source data, but makes no\n\t\t\t * difference at all fro DOM and server-side processing tables.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bDeferRender\": null,\n\t\n\t\t\t/**\n\t\t\t * Enable filtering on the table or not. Note that if this is disabled\n\t\t\t * then there is no filtering at all on the table, including fnFilter.\n\t\t\t * To just remove the filtering input use sDom and remove the 'f' option.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bFilter\": null,\n\t\n\t\t\t/**\n\t\t\t * Table information element (the 'Showing x of y records' div) enable\n\t\t\t * flag.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bInfo\": null,\n\t\n\t\t\t/**\n\t\t\t * Present a user control allowing the end user to change the page size\n\t\t\t * when pagination is enabled.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bLengthChange\": null,\n\t\n\t\t\t/**\n\t\t\t * Pagination enabled or not. Note that if this is disabled then length\n\t\t\t * changing must also be disabled.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bPaginate\": null,\n\t\n\t\t\t/**\n\t\t\t * Processing indicator enable flag whenever DataTables is enacting a\n\t\t\t * user request - typically an Ajax request for server-side processing.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bProcessing\": null,\n\t\n\t\t\t/**\n\t\t\t * Server-side processing enabled flag - when enabled DataTables will\n\t\t\t * get all data from the server for every draw - there is no filtering,\n\t\t\t * sorting or paging done on the client-side.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bServerSide\": null,\n\t\n\t\t\t/**\n\t\t\t * Sorting enablement flag.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bSort\": null,\n\t\n\t\t\t/**\n\t\t\t * Multi-column sorting\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bSortMulti\": null,\n\t\n\t\t\t/**\n\t\t\t * Apply a class to the columns which are being sorted to provide a\n\t\t\t * visual highlight or not. This can slow things down when enabled since\n\t\t\t * there is a lot of DOM interaction.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bSortClasses\": null,\n\t\n\t\t\t/**\n\t\t\t * State saving enablement flag.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bStateSave\": null\n\t\t},\n\t\n\t\n\t\t/**\n\t\t * Scrolling settings for a table.\n\t\t * @namespace\n\t\t */\n\t\t\"oScroll\": {\n\t\t\t/**\n\t\t\t * When the table is shorter in height than sScrollY, collapse the\n\t\t\t * table container down to the height of the table (when true).\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type boolean\n\t\t\t */\n\t\t\t\"bCollapse\": null,\n\t\n\t\t\t/**\n\t\t\t * Width of the scrollbar for the web-browser's platform. Calculated\n\t\t\t * during table initialisation.\n\t\t\t * @type int\n\t\t\t * @default 0\n\t\t\t */\n\t\t\t\"iBarWidth\": 0,\n\t\n\t\t\t/**\n\t\t\t * Viewport width for horizontal scrolling. Horizontal scrolling is\n\t\t\t * disabled if an empty string.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type string\n\t\t\t */\n\t\t\t\"sX\": null,\n\t\n\t\t\t/**\n\t\t\t * Width to expand the table to when using x-scrolling. Typically you\n\t\t\t * should not need to use this.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type string\n\t\t\t * @deprecated\n\t\t\t */\n\t\t\t\"sXInner\": null,\n\t\n\t\t\t/**\n\t\t\t * Viewport height for vertical scrolling. Vertical scrolling is disabled\n\t\t\t * if an empty string.\n\t\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t\t * set a default use {@link DataTable.defaults}.\n\t\t\t * @type string\n\t\t\t */\n\t\t\t\"sY\": null\n\t\t},\n\t\n\t\t/**\n\t\t * Language information for the table.\n\t\t * @namespace\n\t\t * @extends DataTable.defaults.oLanguage\n\t\t */\n\t\t\"oLanguage\": {\n\t\t\t/**\n\t\t\t * Information callback function. See\n\t\t\t * {@link DataTable.defaults.fnInfoCallback}\n\t\t\t * @type function\n\t\t\t * @default null\n\t\t\t */\n\t\t\t\"fnInfoCallback\": null\n\t\t},\n\t\n\t\t/**\n\t\t * Browser support parameters\n\t\t * @namespace\n\t\t */\n\t\t\"oBrowser\": {\n\t\t\t/**\n\t\t\t * Indicate if the browser incorrectly calculates width:100% inside a\n\t\t\t * scrolling element (IE6/7)\n\t\t\t * @type boolean\n\t\t\t * @default false\n\t\t\t */\n\t\t\t\"bScrollOversize\": false,\n\t\n\t\t\t/**\n\t\t\t * Determine if the vertical scrollbar is on the right or left of the\n\t\t\t * scrolling container - needed for rtl language layout, although not\n\t\t\t * all browsers move the scrollbar (Safari).\n\t\t\t * @type boolean\n\t\t\t * @default false\n\t\t\t */\n\t\t\t\"bScrollbarLeft\": false,\n\t\n\t\t\t/**\n\t\t\t * Flag for if `getBoundingClientRect` is fully supported or not\n\t\t\t * @type boolean\n\t\t\t * @default false\n\t\t\t */\n\t\t\t\"bBounding\": false,\n\t\n\t\t\t/**\n\t\t\t * Browser scrollbar width\n\t\t\t * @type integer\n\t\t\t * @default 0\n\t\t\t */\n\t\t\t\"barWidth\": 0\n\t\t},\n\t\n\t\n\t\t\"ajax\": null,\n\t\n\t\n\t\t/**\n\t\t * Array referencing the nodes which are used for the features. The\n\t\t * parameters of this object match what is allowed by sDom - i.e.\n\t\t * <ul>\n\t\t * <li>'l' - Length changing</li>\n\t\t * <li>'f' - Filtering input</li>\n\t\t * <li>'t' - The table!</li>\n\t\t * <li>'i' - Information</li>\n\t\t * <li>'p' - Pagination</li>\n\t\t * <li>'r' - pRocessing</li>\n\t\t * </ul>\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aanFeatures\": [],\n\t\n\t\t/**\n\t\t * Store data information - see {@link DataTable.models.oRow} for detailed\n\t\t * information.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoData\": [],\n\t\n\t\t/**\n\t\t * Array of indexes which are in the current display (after filtering etc)\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aiDisplay\": [],\n\t\n\t\t/**\n\t\t * Array of indexes for display - no filtering\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aiDisplayMaster\": [],\n\t\n\t\t/**\n\t\t * Map of row ids to data indexes\n\t\t * @type object\n\t\t * @default {}\n\t\t */\n\t\t\"aIds\": {},\n\t\n\t\t/**\n\t\t * Store information about each column that is in use\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoColumns\": [],\n\t\n\t\t/**\n\t\t * Store information about the table's header\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoHeader\": [],\n\t\n\t\t/**\n\t\t * Store information about the table's footer\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoFooter\": [],\n\t\n\t\t/**\n\t\t * Store the applied global search information in case we want to force a\n\t\t * research or compare the old search to a new one.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @namespace\n\t\t * @extends DataTable.models.oSearch\n\t\t */\n\t\t\"oPreviousSearch\": {},\n\t\n\t\t/**\n\t\t * Store the applied search for each column - see\n\t\t * {@link DataTable.models.oSearch} for the format that is used for the\n\t\t * filtering information for each column.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoPreSearchCols\": [],\n\t\n\t\t/**\n\t\t * Sorting that is applied to the table. Note that the inner arrays are\n\t\t * used in the following manner:\n\t\t * <ul>\n\t\t * <li>Index 0 - column number</li>\n\t\t * <li>Index 1 - current sorting direction</li>\n\t\t * </ul>\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type array\n\t\t * @todo These inner arrays should really be objects\n\t\t */\n\t\t\"aaSorting\": null,\n\t\n\t\t/**\n\t\t * Sorting that is always applied to the table (i.e. prefixed in front of\n\t\t * aaSorting).\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aaSortingFixed\": [],\n\t\n\t\t/**\n\t\t * Classes to use for the striping of a table.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"asStripeClasses\": null,\n\t\n\t\t/**\n\t\t * If restoring a table - we should restore its striping classes as well\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"asDestroyStripes\": [],\n\t\n\t\t/**\n\t\t * If restoring a table - we should restore its width\n\t\t * @type int\n\t\t * @default 0\n\t\t */\n\t\t\"sDestroyWidth\": 0,\n\t\n\t\t/**\n\t\t * Callback functions array for every time a row is inserted (i.e. on a draw).\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoRowCallback\": [],\n\t\n\t\t/**\n\t\t * Callback functions for the header on each draw.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoHeaderCallback\": [],\n\t\n\t\t/**\n\t\t * Callback function for the footer on each draw.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoFooterCallback\": [],\n\t\n\t\t/**\n\t\t * Array of callback functions for draw callback functions\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoDrawCallback\": [],\n\t\n\t\t/**\n\t\t * Array of callback functions for row created function\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoRowCreatedCallback\": [],\n\t\n\t\t/**\n\t\t * Callback functions for just before the table is redrawn. A return of\n\t\t * false will be used to cancel the draw.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoPreDrawCallback\": [],\n\t\n\t\t/**\n\t\t * Callback functions for when the table has been initialised.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoInitComplete\": [],\n\t\n\t\n\t\t/**\n\t\t * Callbacks for modifying the settings to be stored for state saving, prior to\n\t\t * saving state.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoStateSaveParams\": [],\n\t\n\t\t/**\n\t\t * Callbacks for modifying the settings that have been stored for state saving\n\t\t * prior to using the stored values to restore the state.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoStateLoadParams\": [],\n\t\n\t\t/**\n\t\t * Callbacks for operating on the settings object once the saved state has been\n\t\t * loaded\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoStateLoaded\": [],\n\t\n\t\t/**\n\t\t * Cache the table ID for quick access\n\t\t * @type string\n\t\t * @default <i>Empty string</i>\n\t\t */\n\t\t\"sTableId\": \"\",\n\t\n\t\t/**\n\t\t * The TABLE node for the main table\n\t\t * @type node\n\t\t * @default null\n\t\t */\n\t\t\"nTable\": null,\n\t\n\t\t/**\n\t\t * Permanent ref to the thead element\n\t\t * @type node\n\t\t * @default null\n\t\t */\n\t\t\"nTHead\": null,\n\t\n\t\t/**\n\t\t * Permanent ref to the tfoot element - if it exists\n\t\t * @type node\n\t\t * @default null\n\t\t */\n\t\t\"nTFoot\": null,\n\t\n\t\t/**\n\t\t * Permanent ref to the tbody element\n\t\t * @type node\n\t\t * @default null\n\t\t */\n\t\t\"nTBody\": null,\n\t\n\t\t/**\n\t\t * Cache the wrapper node (contains all DataTables controlled elements)\n\t\t * @type node\n\t\t * @default null\n\t\t */\n\t\t\"nTableWrapper\": null,\n\t\n\t\t/**\n\t\t * Indicate if when using server-side processing the loading of data\n\t\t * should be deferred until the second draw.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type boolean\n\t\t * @default false\n\t\t */\n\t\t\"bDeferLoading\": false,\n\t\n\t\t/**\n\t\t * Indicate if all required information has been read in\n\t\t * @type boolean\n\t\t * @default false\n\t\t */\n\t\t\"bInitialised\": false,\n\t\n\t\t/**\n\t\t * Information about open rows. Each object in the array has the parameters\n\t\t * 'nTr' and 'nParent'\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoOpenRows\": [],\n\t\n\t\t/**\n\t\t * Dictate the positioning of DataTables' control elements - see\n\t\t * {@link DataTable.model.oInit.sDom}.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"sDom\": null,\n\t\n\t\t/**\n\t\t * Search delay (in mS)\n\t\t * @type integer\n\t\t * @default null\n\t\t */\n\t\t\"searchDelay\": null,\n\t\n\t\t/**\n\t\t * Which type of pagination should be used.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type string\n\t\t * @default two_button\n\t\t */\n\t\t\"sPaginationType\": \"two_button\",\n\t\n\t\t/**\n\t\t * The state duration (for `stateSave`) in seconds.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type int\n\t\t * @default 0\n\t\t */\n\t\t\"iStateDuration\": 0,\n\t\n\t\t/**\n\t\t * Array of callback functions for state saving. Each array element is an\n\t\t * object with the following parameters:\n\t\t * <ul>\n\t\t * <li>function:fn - function to call. Takes two parameters, oSettings\n\t\t * and the JSON string to save that has been thus far created. Returns\n\t\t * a JSON string to be inserted into a json object\n\t\t * (i.e. '\"param\": [ 0, 1, 2]')</li>\n\t\t * <li>string:sName - name of callback</li>\n\t\t * </ul>\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoStateSave\": [],\n\t\n\t\t/**\n\t\t * Array of callback functions for state loading. Each array element is an\n\t\t * object with the following parameters:\n\t\t * <ul>\n\t\t * <li>function:fn - function to call. Takes two parameters, oSettings\n\t\t * and the object stored. May return false to cancel state loading</li>\n\t\t * <li>string:sName - name of callback</li>\n\t\t * </ul>\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoStateLoad\": [],\n\t\n\t\t/**\n\t\t * State that was saved. Useful for back reference\n\t\t * @type object\n\t\t * @default null\n\t\t */\n\t\t\"oSavedState\": null,\n\t\n\t\t/**\n\t\t * State that was loaded. Useful for back reference\n\t\t * @type object\n\t\t * @default null\n\t\t */\n\t\t\"oLoadedState\": null,\n\t\n\t\t/**\n\t\t * Source url for AJAX data for the table.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"sAjaxSource\": null,\n\t\n\t\t/**\n\t\t * Property from a given object from which to read the table data from. This\n\t\t * can be an empty string (when not server-side processing), in which case\n\t\t * it is assumed an an array is given directly.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type string\n\t\t */\n\t\t\"sAjaxDataProp\": null,\n\t\n\t\t/**\n\t\t * Note if draw should be blocked while getting data\n\t\t * @type boolean\n\t\t * @default true\n\t\t */\n\t\t\"bAjaxDataGet\": true,\n\t\n\t\t/**\n\t\t * The last jQuery XHR object that was used for server-side data gathering.\n\t\t * This can be used for working with the XHR information in one of the\n\t\t * callbacks\n\t\t * @type object\n\t\t * @default null\n\t\t */\n\t\t\"jqXHR\": null,\n\t\n\t\t/**\n\t\t * JSON returned from the server in the last Ajax request\n\t\t * @type object\n\t\t * @default undefined\n\t\t */\n\t\t\"json\": undefined,\n\t\n\t\t/**\n\t\t * Data submitted as part of the last Ajax request\n\t\t * @type object\n\t\t * @default undefined\n\t\t */\n\t\t\"oAjaxData\": undefined,\n\t\n\t\t/**\n\t\t * Function to get the server-side data.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type function\n\t\t */\n\t\t\"fnServerData\": null,\n\t\n\t\t/**\n\t\t * Functions which are called prior to sending an Ajax request so extra\n\t\t * parameters can easily be sent to the server\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoServerParams\": [],\n\t\n\t\t/**\n\t\t * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if\n\t\t * required).\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type string\n\t\t */\n\t\t\"sServerMethod\": null,\n\t\n\t\t/**\n\t\t * Format numbers for display.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type function\n\t\t */\n\t\t\"fnFormatNumber\": null,\n\t\n\t\t/**\n\t\t * List of options that can be used for the user selectable length menu.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aLengthMenu\": null,\n\t\n\t\t/**\n\t\t * Counter for the draws that the table does. Also used as a tracker for\n\t\t * server-side processing\n\t\t * @type int\n\t\t * @default 0\n\t\t */\n\t\t\"iDraw\": 0,\n\t\n\t\t/**\n\t\t * Indicate if a redraw is being done - useful for Ajax\n\t\t * @type boolean\n\t\t * @default false\n\t\t */\n\t\t\"bDrawing\": false,\n\t\n\t\t/**\n\t\t * Draw index (iDraw) of the last error when parsing the returned data\n\t\t * @type int\n\t\t * @default -1\n\t\t */\n\t\t\"iDrawError\": -1,\n\t\n\t\t/**\n\t\t * Paging display length\n\t\t * @type int\n\t\t * @default 10\n\t\t */\n\t\t\"_iDisplayLength\": 10,\n\t\n\t\t/**\n\t\t * Paging start point - aiDisplay index\n\t\t * @type int\n\t\t * @default 0\n\t\t */\n\t\t\"_iDisplayStart\": 0,\n\t\n\t\t/**\n\t\t * Server-side processing - number of records in the result set\n\t\t * (i.e. before filtering), Use fnRecordsTotal rather than\n\t\t * this property to get the value of the number of records, regardless of\n\t\t * the server-side processing setting.\n\t\t * @type int\n\t\t * @default 0\n\t\t * @private\n\t\t */\n\t\t\"_iRecordsTotal\": 0,\n\t\n\t\t/**\n\t\t * Server-side processing - number of records in the current display set\n\t\t * (i.e. after filtering). Use fnRecordsDisplay rather than\n\t\t * this property to get the value of the number of records, regardless of\n\t\t * the server-side processing setting.\n\t\t * @type boolean\n\t\t * @default 0\n\t\t * @private\n\t\t */\n\t\t\"_iRecordsDisplay\": 0,\n\t\n\t\t/**\n\t\t * Flag to indicate if jQuery UI marking and classes should be used.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type boolean\n\t\t */\n\t\t\"bJUI\": null,\n\t\n\t\t/**\n\t\t * The classes to use for the table\n\t\t * @type object\n\t\t * @default {}\n\t\t */\n\t\t\"oClasses\": {},\n\t\n\t\t/**\n\t\t * Flag attached to the settings object so you can check in the draw\n\t\t * callback if filtering has been done in the draw. Deprecated in favour of\n\t\t * events.\n\t\t * @type boolean\n\t\t * @default false\n\t\t * @deprecated\n\t\t */\n\t\t\"bFiltered\": false,\n\t\n\t\t/**\n\t\t * Flag attached to the settings object so you can check in the draw\n\t\t * callback if sorting has been done in the draw. Deprecated in favour of\n\t\t * events.\n\t\t * @type boolean\n\t\t * @default false\n\t\t * @deprecated\n\t\t */\n\t\t\"bSorted\": false,\n\t\n\t\t/**\n\t\t * Indicate that if multiple rows are in the header and there is more than\n\t\t * one unique cell per column, if the top one (true) or bottom one (false)\n\t\t * should be used for sorting / title by DataTables.\n\t\t * Note that this parameter will be set by the initialisation routine. To\n\t\t * set a default use {@link DataTable.defaults}.\n\t\t * @type boolean\n\t\t */\n\t\t\"bSortCellsTop\": null,\n\t\n\t\t/**\n\t\t * Initialisation object that is used for the table\n\t\t * @type object\n\t\t * @default null\n\t\t */\n\t\t\"oInit\": null,\n\t\n\t\t/**\n\t\t * Destroy callback functions - for plug-ins to attach themselves to the\n\t\t * destroy so they can clean up markup and events.\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aoDestroyCallback\": [],\n\t\n\t\n\t\t/**\n\t\t * Get the number of records in the current record set, before filtering\n\t\t * @type function\n\t\t */\n\t\t\"fnRecordsTotal\": function ()\n\t\t{\n\t\t\treturn _fnDataSource( this ) == 'ssp' ?\n\t\t\t\tthis._iRecordsTotal * 1 :\n\t\t\t\tthis.aiDisplayMaster.length;\n\t\t},\n\t\n\t\t/**\n\t\t * Get the number of records in the current record set, after filtering\n\t\t * @type function\n\t\t */\n\t\t\"fnRecordsDisplay\": function ()\n\t\t{\n\t\t\treturn _fnDataSource( this ) == 'ssp' ?\n\t\t\t\tthis._iRecordsDisplay * 1 :\n\t\t\t\tthis.aiDisplay.length;\n\t\t},\n\t\n\t\t/**\n\t\t * Get the display end point - aiDisplay index\n\t\t * @type function\n\t\t */\n\t\t\"fnDisplayEnd\": function ()\n\t\t{\n\t\t\tvar\n\t\t\t\tlen = this._iDisplayLength,\n\t\t\t\tstart = this._iDisplayStart,\n\t\t\t\tcalc = start + len,\n\t\t\t\trecords = this.aiDisplay.length,\n\t\t\t\tfeatures = this.oFeatures,\n\t\t\t\tpaginate = features.bPaginate;\n\t\n\t\t\tif ( features.bServerSide ) {\n\t\t\t\treturn paginate === false || len === -1 ?\n\t\t\t\t\tstart + records :\n\t\t\t\t\tMath.min( start+len, this._iRecordsDisplay );\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn ! paginate || calc>records || len===-1 ?\n\t\t\t\t\trecords :\n\t\t\t\t\tcalc;\n\t\t\t}\n\t\t},\n\t\n\t\t/**\n\t\t * The DataTables object for this table\n\t\t * @type object\n\t\t * @default null\n\t\t */\n\t\t\"oInstance\": null,\n\t\n\t\t/**\n\t\t * Unique identifier for each instance of the DataTables object. If there\n\t\t * is an ID on the table node, then it takes that value, otherwise an\n\t\t * incrementing internal counter is used.\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"sInstance\": null,\n\t\n\t\t/**\n\t\t * tabindex attribute value that is added to DataTables control elements, allowing\n\t\t * keyboard navigation of the table and its controls.\n\t\t */\n\t\t\"iTabIndex\": 0,\n\t\n\t\t/**\n\t\t * DIV container for the footer scrolling table if scrolling\n\t\t */\n\t\t\"nScrollHead\": null,\n\t\n\t\t/**\n\t\t * DIV container for the footer scrolling table if scrolling\n\t\t */\n\t\t\"nScrollFoot\": null,\n\t\n\t\t/**\n\t\t * Last applied sort\n\t\t * @type array\n\t\t * @default []\n\t\t */\n\t\t\"aLastSort\": [],\n\t\n\t\t/**\n\t\t * Stored plug-in instances\n\t\t * @type object\n\t\t * @default {}\n\t\t */\n\t\t\"oPlugins\": {},\n\t\n\t\t/**\n\t\t * Function used to get a row's id from the row's data\n\t\t * @type function\n\t\t * @default null\n\t\t */\n\t\t\"rowIdFn\": null,\n\t\n\t\t/**\n\t\t * Data location where to store a row's id\n\t\t * @type string\n\t\t * @default null\n\t\t */\n\t\t\"rowId\": null\n\t};\n\n\t/**\n\t * Extension object for DataTables that is used to provide all extension\n\t * options.\n\t *\n\t * Note that the `DataTable.ext` object is available through\n\t * `jQuery.fn.dataTable.ext` where it may be accessed and manipulated. It is\n\t * also aliased to `jQuery.fn.dataTableExt` for historic reasons.\n\t * @namespace\n\t * @extends DataTable.models.ext\n\t */\n\t\n\t\n\t/**\n\t * DataTables extensions\n\t * \n\t * This namespace acts as a collection area for plug-ins that can be used to\n\t * extend DataTables capabilities. Indeed many of the build in methods\n\t * use this method to provide their own capabilities (sorting methods for\n\t * example).\n\t *\n\t * Note that this namespace is aliased to `jQuery.fn.dataTableExt` for legacy\n\t * reasons\n\t *\n\t * @namespace\n\t */\n\tDataTable.ext = _ext = {\n\t\t/**\n\t\t * Buttons. For use with the Buttons extension for DataTables. This is\n\t\t * defined here so other extensions can define buttons regardless of load\n\t\t * order. It is _not_ used by DataTables core.\n\t\t *\n\t\t * @type object\n\t\t * @default {}\n\t\t */\n\t\tbuttons: {},\n\t\n\t\n\t\t/**\n\t\t * Element class names\n\t\t *\n\t\t * @type object\n\t\t * @default {}\n\t\t */\n\t\tclasses: {},\n\t\n\t\n\t\t/**\n\t\t * DataTables build type (expanded by the download builder)\n\t\t *\n\t\t * @type string\n\t\t */\n\t\tbuilder: \"-source-\",\n\t\n\t\n\t\t/**\n\t\t * Error reporting.\n\t\t * \n\t\t * How should DataTables report an error. Can take the value 'alert',\n\t\t * 'throw', 'none' or a function.\n\t\t *\n\t\t * @type string|function\n\t\t * @default alert\n\t\t */\n\t\terrMode: \"alert\",\n\t\n\t\n\t\t/**\n\t\t * Feature plug-ins.\n\t\t * \n\t\t * This is an array of objects which describe the feature plug-ins that are\n\t\t * available to DataTables. These feature plug-ins are then available for\n\t\t * use through the `dom` initialisation option.\n\t\t * \n\t\t * Each feature plug-in is described by an object which must have the\n\t\t * following properties:\n\t\t * \n\t\t * * `fnInit` - function that is used to initialise the plug-in,\n\t\t * * `cFeature` - a character so the feature can be enabled by the `dom`\n\t\t * instillation option. This is case sensitive.\n\t\t *\n\t\t * The `fnInit` function has the following input parameters:\n\t\t *\n\t\t * 1. `{object}` DataTables settings object: see\n\t\t * {@link DataTable.models.oSettings}\n\t\t *\n\t\t * And the following return is expected:\n\t\t * \n\t\t * * {node|null} The element which contains your feature. Note that the\n\t\t * return may also be void if your plug-in does not require to inject any\n\t\t * DOM elements into DataTables control (`dom`) - for example this might\n\t\t * be useful when developing a plug-in which allows table control via\n\t\t * keyboard entry\n\t\t *\n\t\t * @type array\n\t\t *\n\t\t * @example\n\t\t * $.fn.dataTable.ext.features.push( {\n\t\t * \"fnInit\": function( oSettings ) {\n\t\t * return new TableTools( { \"oDTSettings\": oSettings } );\n\t\t * },\n\t\t * \"cFeature\": \"T\"\n\t\t * } );\n\t\t */\n\t\tfeature: [],\n\t\n\t\n\t\t/**\n\t\t * Row searching.\n\t\t * \n\t\t * This method of searching is complimentary to the default type based\n\t\t * searching, and a lot more comprehensive as it allows you complete control\n\t\t * over the searching logic. Each element in this array is a function\n\t\t * (parameters described below) that is called for every row in the table,\n\t\t * and your logic decides if it should be included in the searching data set\n\t\t * or not.\n\t\t *\n\t\t * Searching functions have the following input parameters:\n\t\t *\n\t\t * 1. `{object}` DataTables settings object: see\n\t\t * {@link DataTable.models.oSettings}\n\t\t * 2. `{array|object}` Data for the row to be processed (same as the\n\t\t * original format that was passed in as the data source, or an array\n\t\t * from a DOM data source\n\t\t * 3. `{int}` Row index ({@link DataTable.models.oSettings.aoData}), which\n\t\t * can be useful to retrieve the `TR` element if you need DOM interaction.\n\t\t *\n\t\t * And the following return is expected:\n\t\t *\n\t\t * * {boolean} Include the row in the searched result set (true) or not\n\t\t * (false)\n\t\t *\n\t\t * Note that as with the main search ability in DataTables, technically this\n\t\t * is \"filtering\", since it is subtractive. However, for consistency in\n\t\t * naming we call it searching here.\n\t\t *\n\t\t * @type array\n\t\t * @default []\n\t\t *\n\t\t * @example\n\t\t * // The following example shows custom search being applied to the\n\t\t * // fourth column (i.e. the data[3] index) based on two input values\n\t\t * // from the end-user, matching the data in a certain range.\n\t\t * $.fn.dataTable.ext.search.push(\n\t\t * function( settings, data, dataIndex ) {\n\t\t * var min = document.getElementById('min').value * 1;\n\t\t * var max = document.getElementById('max').value * 1;\n\t\t * var version = data[3] == \"-\" ? 0 : data[3]*1;\n\t\t *\n\t\t * if ( min == \"\" && max == \"\" ) {\n\t\t * return true;\n\t\t * }\n\t\t * else if ( min == \"\" && version < max ) {\n\t\t * return true;\n\t\t * }\n\t\t * else if ( min < version && \"\" == max ) {\n\t\t * return true;\n\t\t * }\n\t\t * else if ( min < version && version < max ) {\n\t\t * return true;\n\t\t * }\n\t\t * return false;\n\t\t * }\n\t\t * );\n\t\t */\n\t\tsearch: [],\n\t\n\t\n\t\t/**\n\t\t * Selector extensions\n\t\t *\n\t\t * The `selector` option can be used to extend the options available for the\n\t\t * selector modifier options (`selector-modifier` object data type) that\n\t\t * each of the three built in selector types offer (row, column and cell +\n\t\t * their plural counterparts). For example the Select extension uses this\n\t\t * mechanism to provide an option to select only rows, columns and cells\n\t\t * that have been marked as selected by the end user (`{selected: true}`),\n\t\t * which can be used in conjunction with the existing built in selector\n\t\t * options.\n\t\t *\n\t\t * Each property is an array to which functions can be pushed. The functions\n\t\t * take three attributes:\n\t\t *\n\t\t * * Settings object for the host table\n\t\t * * Options object (`selector-modifier` object type)\n\t\t * * Array of selected item indexes\n\t\t *\n\t\t * The return is an array of the resulting item indexes after the custom\n\t\t * selector has been applied.\n\t\t *\n\t\t * @type object\n\t\t */\n\t\tselector: {\n\t\t\tcell: [],\n\t\t\tcolumn: [],\n\t\t\trow: []\n\t\t},\n\t\n\t\n\t\t/**\n\t\t * Internal functions, exposed for used in plug-ins.\n\t\t * \n\t\t * Please note that you should not need to use the internal methods for\n\t\t * anything other than a plug-in (and even then, try to avoid if possible).\n\t\t * The internal function may change between releases.\n\t\t *\n\t\t * @type object\n\t\t * @default {}\n\t\t */\n\t\tinternal: {},\n\t\n\t\n\t\t/**\n\t\t * Legacy configuration options. Enable and disable legacy options that\n\t\t * are available in DataTables.\n\t\t *\n\t\t * @type object\n\t\t */\n\t\tlegacy: {\n\t\t\t/**\n\t\t\t * Enable / disable DataTables 1.9 compatible server-side processing\n\t\t\t * requests\n\t\t\t *\n\t\t\t * @type boolean\n\t\t\t * @default null\n\t\t\t */\n\t\t\tajax: null\n\t\t},\n\t\n\t\n\t\t/**\n\t\t * Pagination plug-in methods.\n\t\t * \n\t\t * Each entry in this object is a function and defines which buttons should\n\t\t * be shown by the pagination rendering method that is used for the table:\n\t\t * {@link DataTable.ext.renderer.pageButton}. The renderer addresses how the\n\t\t * buttons are displayed in the document, while the functions here tell it\n\t\t * what buttons to display. This is done by returning an array of button\n\t\t * descriptions (what each button will do).\n\t\t *\n\t\t * Pagination types (the four built in options and any additional plug-in\n\t\t * options defined here) can be used through the `paginationType`\n\t\t * initialisation parameter.\n\t\t *\n\t\t * The functions defined take two parameters:\n\t\t *\n\t\t * 1. `{int} page` The current page index\n\t\t * 2. `{int} pages` The number of pages in the table\n\t\t *\n\t\t * Each function is expected to return an array where each element of the\n\t\t * array can be one of:\n\t\t *\n\t\t * * `first` - Jump to first page when activated\n\t\t * * `last` - Jump to last page when activated\n\t\t * * `previous` - Show previous page when activated\n\t\t * * `next` - Show next page when activated\n\t\t * * `{int}` - Show page of the index given\n\t\t * * `{array}` - A nested array containing the above elements to add a\n\t\t * containing 'DIV' element (might be useful for styling).\n\t\t *\n\t\t * Note that DataTables v1.9- used this object slightly differently whereby\n\t\t * an object with two functions would be defined for each plug-in. That\n\t\t * ability is still supported by DataTables 1.10+ to provide backwards\n\t\t * compatibility, but this option of use is now decremented and no longer\n\t\t * documented in DataTables 1.10+.\n\t\t *\n\t\t * @type object\n\t\t * @default {}\n\t\t *\n\t\t * @example\n\t\t * // Show previous, next and current page buttons only\n\t\t * $.fn.dataTableExt.oPagination.current = function ( page, pages ) {\n\t\t * return [ 'previous', page, 'next' ];\n\t\t * };\n\t\t */\n\t\tpager: {},\n\t\n\t\n\t\trenderer: {\n\t\t\tpageButton: {},\n\t\t\theader: {}\n\t\t},\n\t\n\t\n\t\t/**\n\t\t * Ordering plug-ins - custom data source\n\t\t * \n\t\t * The extension options for ordering of data available here is complimentary\n\t\t * to the default type based ordering that DataTables typically uses. It\n\t\t * allows much greater control over the the data that is being used to\n\t\t * order a column, but is necessarily therefore more complex.\n\t\t * \n\t\t * This type of ordering is useful if you want to do ordering based on data\n\t\t * live from the DOM (for example the contents of an 'input' element) rather\n\t\t * than just the static string that DataTables knows of.\n\t\t * \n\t\t * The way these plug-ins work is that you create an array of the values you\n\t\t * wish to be ordering for the column in question and then return that\n\t\t * array. The data in the array much be in the index order of the rows in\n\t\t * the table (not the currently ordering order!). Which order data gathering\n\t\t * function is run here depends on the `dt-init columns.orderDataType`\n\t\t * parameter that is used for the column (if any).\n\t\t *\n\t\t * The functions defined take two parameters:\n\t\t *\n\t\t * 1. `{object}` DataTables settings object: see\n\t\t * {@link DataTable.models.oSettings}\n\t\t * 2. `{int}` Target column index\n\t\t *\n\t\t * Each function is expected to return an array:\n\t\t *\n\t\t * * `{array}` Data for the column to be ordering upon\n\t\t *\n\t\t * @type array\n\t\t *\n\t\t * @example\n\t\t * // Ordering using `input` node values\n\t\t * $.fn.dataTable.ext.order['dom-text'] = function ( settings, col )\n\t\t * {\n\t\t * return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {\n\t\t * return $('input', td).val();\n\t\t * } );\n\t\t * }\n\t\t */\n\t\torder: {},\n\t\n\t\n\t\t/**\n\t\t * Type based plug-ins.\n\t\t *\n\t\t * Each column in DataTables has a type assigned to it, either by automatic\n\t\t * detection or by direct assignment using the `type` option for the column.\n\t\t * The type of a column will effect how it is ordering and search (plug-ins\n\t\t * can also make use of the column type if required).\n\t\t *\n\t\t * @namespace\n\t\t */\n\t\ttype: {\n\t\t\t/**\n\t\t\t * Type detection functions.\n\t\t\t *\n\t\t\t * The functions defined in this object are used to automatically detect\n\t\t\t * a column's type, making initialisation of DataTables super easy, even\n\t\t\t * when complex data is in the table.\n\t\t\t *\n\t\t\t * The functions defined take two parameters:\n\t\t\t *\n\t\t * 1. `{*}` Data from the column cell to be analysed\n\t\t * 2. `{settings}` DataTables settings object. This can be used to\n\t\t * perform context specific type detection - for example detection\n\t\t * based on language settings such as using a comma for a decimal\n\t\t * place. Generally speaking the options from the settings will not\n\t\t * be required\n\t\t\t *\n\t\t\t * Each function is expected to return:\n\t\t\t *\n\t\t\t * * `{string|null}` Data type detected, or null if unknown (and thus\n\t\t\t * pass it on to the other type detection functions.\n\t\t\t *\n\t\t\t * @type array\n\t\t\t *\n\t\t\t * @example\n\t\t\t * // Currency type detection plug-in:\n\t\t\t * $.fn.dataTable.ext.type.detect.push(\n\t\t\t * function ( data, settings ) {\n\t\t\t * // Check the numeric part\n\t\t\t * if ( ! $.isNumeric( data.substring(1) ) ) {\n\t\t\t * return null;\n\t\t\t * }\n\t\t\t *\n\t\t\t * // Check prefixed by currency\n\t\t\t * if ( data.charAt(0) == '$' || data.charAt(0) == '£' ) {\n\t\t\t * return 'currency';\n\t\t\t * }\n\t\t\t * return null;\n\t\t\t * }\n\t\t\t * );\n\t\t\t */\n\t\t\tdetect: [],\n\t\n\t\n\t\t\t/**\n\t\t\t * Type based search formatting.\n\t\t\t *\n\t\t\t * The type based searching functions can be used to pre-format the\n\t\t\t * data to be search on. For example, it can be used to strip HTML\n\t\t\t * tags or to de-format telephone numbers for numeric only searching.\n\t\t\t *\n\t\t\t * Note that is a search is not defined for a column of a given type,\n\t\t\t * no search formatting will be performed.\n\t\t\t * \n\t\t\t * Pre-processing of searching data plug-ins - When you assign the sType\n\t\t\t * for a column (or have it automatically detected for you by DataTables\n\t\t\t * or a type detection plug-in), you will typically be using this for\n\t\t\t * custom sorting, but it can also be used to provide custom searching\n\t\t\t * by allowing you to pre-processing the data and returning the data in\n\t\t\t * the format that should be searched upon. This is done by adding\n\t\t\t * functions this object with a parameter name which matches the sType\n\t\t\t * for that target column. This is the corollary of <i>afnSortData</i>\n\t\t\t * for searching data.\n\t\t\t *\n\t\t\t * The functions defined take a single parameter:\n\t\t\t *\n\t\t * 1. `{*}` Data from the column cell to be prepared for searching\n\t\t\t *\n\t\t\t * Each function is expected to return:\n\t\t\t *\n\t\t\t * * `{string|null}` Formatted string that will be used for the searching.\n\t\t\t *\n\t\t\t * @type object\n\t\t\t * @default {}\n\t\t\t *\n\t\t\t * @example\n\t\t\t * $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) {\n\t\t\t * return d.replace(/\\n/g,\" \").replace( /<.*?>/g, \"\" );\n\t\t\t * }\n\t\t\t */\n\t\t\tsearch: {},\n\t\n\t\n\t\t\t/**\n\t\t\t * Type based ordering.\n\t\t\t *\n\t\t\t * The column type tells DataTables what ordering to apply to the table\n\t\t\t * when a column is sorted upon. The order for each type that is defined,\n\t\t\t * is defined by the functions available in this object.\n\t\t\t *\n\t\t\t * Each ordering option can be described by three properties added to\n\t\t\t * this object:\n\t\t\t *\n\t\t\t * * `{type}-pre` - Pre-formatting function\n\t\t\t * * `{type}-asc` - Ascending order function\n\t\t\t * * `{type}-desc` - Descending order function\n\t\t\t *\n\t\t\t * All three can be used together, only `{type}-pre` or only\n\t\t\t * `{type}-asc` and `{type}-desc` together. It is generally recommended\n\t\t\t * that only `{type}-pre` is used, as this provides the optimal\n\t\t\t * implementation in terms of speed, although the others are provided\n\t\t\t * for compatibility with existing Javascript sort functions.\n\t\t\t *\n\t\t\t * `{type}-pre`: Functions defined take a single parameter:\n\t\t\t *\n\t\t * 1. `{*}` Data from the column cell to be prepared for ordering\n\t\t\t *\n\t\t\t * And return:\n\t\t\t *\n\t\t\t * * `{*}` Data to be sorted upon\n\t\t\t *\n\t\t\t * `{type}-asc` and `{type}-desc`: Functions are typical Javascript sort\n\t\t\t * functions, taking two parameters:\n\t\t\t *\n\t\t * 1. `{*}` Data to compare to the second parameter\n\t\t * 2. `{*}` Data to compare to the first parameter\n\t\t\t *\n\t\t\t * And returning:\n\t\t\t *\n\t\t\t * * `{*}` Ordering match: <0 if first parameter should be sorted lower\n\t\t\t * than the second parameter, ===0 if the two parameters are equal and\n\t\t\t * >0 if the first parameter should be sorted height than the second\n\t\t\t * parameter.\n\t\t\t * \n\t\t\t * @type object\n\t\t\t * @default {}\n\t\t\t *\n\t\t\t * @example\n\t\t\t * // Numeric ordering of formatted numbers with a pre-formatter\n\t\t\t * $.extend( $.fn.dataTable.ext.type.order, {\n\t\t\t * \"string-pre\": function(x) {\n\t\t\t * a = (a === \"-\" || a === \"\") ? 0 : a.replace( /[^\\d\\-\\.]/g, \"\" );\n\t\t\t * return parseFloat( a );\n\t\t\t * }\n\t\t\t * } );\n\t\t\t *\n\t\t\t * @example\n\t\t\t * // Case-sensitive string ordering, with no pre-formatting method\n\t\t\t * $.extend( $.fn.dataTable.ext.order, {\n\t\t\t * \"string-case-asc\": function(x,y) {\n\t\t\t * return ((x < y) ? -1 : ((x > y) ? 1 : 0));\n\t\t\t * },\n\t\t\t * \"string-case-desc\": function(x,y) {\n\t\t\t * return ((x < y) ? 1 : ((x > y) ? -1 : 0));\n\t\t\t * }\n\t\t\t * } );\n\t\t\t */\n\t\t\torder: {}\n\t\t},\n\t\n\t\t/**\n\t\t * Unique DataTables instance counter\n\t\t *\n\t\t * @type int\n\t\t * @private\n\t\t */\n\t\t_unique: 0,\n\t\n\t\n\t\t//\n\t\t// Depreciated\n\t\t// The following properties are retained for backwards compatiblity only.\n\t\t// The should not be used in new projects and will be removed in a future\n\t\t// version\n\t\t//\n\t\n\t\t/**\n\t\t * Version check function.\n\t\t * @type function\n\t\t * @depreciated Since 1.10\n\t\t */\n\t\tfnVersionCheck: DataTable.fnVersionCheck,\n\t\n\t\n\t\t/**\n\t\t * Index for what 'this' index API functions should use\n\t\t * @type int\n\t\t * @deprecated Since v1.10\n\t\t */\n\t\tiApiIndex: 0,\n\t\n\t\n\t\t/**\n\t\t * jQuery UI class container\n\t\t * @type object\n\t\t * @deprecated Since v1.10\n\t\t */\n\t\toJUIClasses: {},\n\t\n\t\n\t\t/**\n\t\t * Software version\n\t\t * @type string\n\t\t * @deprecated Since v1.10\n\t\t */\n\t\tsVersion: DataTable.version\n\t};\n\t\n\t\n\t//\n\t// Backwards compatibility. Alias to pre 1.10 Hungarian notation counter parts\n\t//\n\t$.extend( _ext, {\n\t\tafnFiltering: _ext.search,\n\t\taTypes: _ext.type.detect,\n\t\tofnSearch: _ext.type.search,\n\t\toSort: _ext.type.order,\n\t\tafnSortData: _ext.order,\n\t\taoFeatures: _ext.feature,\n\t\toApi: _ext.internal,\n\t\toStdClasses: _ext.classes,\n\t\toPagination: _ext.pager\n\t} );\n\t\n\t\n\t$.extend( DataTable.ext.classes, {\n\t\t\"sTable\": \"dataTable\",\n\t\t\"sNoFooter\": \"no-footer\",\n\t\n\t\t/* Paging buttons */\n\t\t\"sPageButton\": \"paginate_button\",\n\t\t\"sPageButtonActive\": \"current\",\n\t\t\"sPageButtonDisabled\": \"disabled\",\n\t\n\t\t/* Striping classes */\n\t\t\"sStripeOdd\": \"odd\",\n\t\t\"sStripeEven\": \"even\",\n\t\n\t\t/* Empty row */\n\t\t\"sRowEmpty\": \"dataTables_empty\",\n\t\n\t\t/* Features */\n\t\t\"sWrapper\": \"dataTables_wrapper\",\n\t\t\"sFilter\": \"dataTables_filter\",\n\t\t\"sInfo\": \"dataTables_info\",\n\t\t\"sPaging\": \"dataTables_paginate paging_\", /* Note that the type is postfixed */\n\t\t\"sLength\": \"dataTables_length\",\n\t\t\"sProcessing\": \"dataTables_processing\",\n\t\n\t\t/* Sorting */\n\t\t\"sSortAsc\": \"sorting_asc\",\n\t\t\"sSortDesc\": \"sorting_desc\",\n\t\t\"sSortable\": \"sorting\", /* Sortable in both directions */\n\t\t\"sSortableAsc\": \"sorting_asc_disabled\",\n\t\t\"sSortableDesc\": \"sorting_desc_disabled\",\n\t\t\"sSortableNone\": \"sorting_disabled\",\n\t\t\"sSortColumn\": \"sorting_\", /* Note that an int is postfixed for the sorting order */\n\t\n\t\t/* Filtering */\n\t\t\"sFilterInput\": \"\",\n\t\n\t\t/* Page length */\n\t\t\"sLengthSelect\": \"\",\n\t\n\t\t/* Scrolling */\n\t\t\"sScrollWrapper\": \"dataTables_scroll\",\n\t\t\"sScrollHead\": \"dataTables_scrollHead\",\n\t\t\"sScrollHeadInner\": \"dataTables_scrollHeadInner\",\n\t\t\"sScrollBody\": \"dataTables_scrollBody\",\n\t\t\"sScrollFoot\": \"dataTables_scrollFoot\",\n\t\t\"sScrollFootInner\": \"dataTables_scrollFootInner\",\n\t\n\t\t/* Misc */\n\t\t\"sHeaderTH\": \"\",\n\t\t\"sFooterTH\": \"\",\n\t\n\t\t// Deprecated\n\t\t\"sSortJUIAsc\": \"\",\n\t\t\"sSortJUIDesc\": \"\",\n\t\t\"sSortJUI\": \"\",\n\t\t\"sSortJUIAscAllowed\": \"\",\n\t\t\"sSortJUIDescAllowed\": \"\",\n\t\t\"sSortJUIWrapper\": \"\",\n\t\t\"sSortIcon\": \"\",\n\t\t\"sJUIHeader\": \"\",\n\t\t\"sJUIFooter\": \"\"\n\t} );\n\t\n\t\n\t(function() {\n\t\n\t// Reused strings for better compression. Closure compiler appears to have a\n\t// weird edge case where it is trying to expand strings rather than use the\n\t// variable version. This results in about 200 bytes being added, for very\n\t// little preference benefit since it this run on script load only.\n\tvar _empty = '';\n\t_empty = '';\n\t\n\tvar _stateDefault = _empty + 'ui-state-default';\n\tvar _sortIcon = _empty + 'css_right ui-icon ui-icon-';\n\tvar _headerFooter = _empty + 'fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix';\n\t\n\t$.extend( DataTable.ext.oJUIClasses, DataTable.ext.classes, {\n\t\t/* Full numbers paging buttons */\n\t\t\"sPageButton\": \"fg-button ui-button \"+_stateDefault,\n\t\t\"sPageButtonActive\": \"ui-state-disabled\",\n\t\t\"sPageButtonDisabled\": \"ui-state-disabled\",\n\t\n\t\t/* Features */\n\t\t\"sPaging\": \"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi \"+\n\t\t\t\"ui-buttonset-multi paging_\", /* Note that the type is postfixed */\n\t\n\t\t/* Sorting */\n\t\t\"sSortAsc\": _stateDefault+\" sorting_asc\",\n\t\t\"sSortDesc\": _stateDefault+\" sorting_desc\",\n\t\t\"sSortable\": _stateDefault+\" sorting\",\n\t\t\"sSortableAsc\": _stateDefault+\" sorting_asc_disabled\",\n\t\t\"sSortableDesc\": _stateDefault+\" sorting_desc_disabled\",\n\t\t\"sSortableNone\": _stateDefault+\" sorting_disabled\",\n\t\t\"sSortJUIAsc\": _sortIcon+\"triangle-1-n\",\n\t\t\"sSortJUIDesc\": _sortIcon+\"triangle-1-s\",\n\t\t\"sSortJUI\": _sortIcon+\"carat-2-n-s\",\n\t\t\"sSortJUIAscAllowed\": _sortIcon+\"carat-1-n\",\n\t\t\"sSortJUIDescAllowed\": _sortIcon+\"carat-1-s\",\n\t\t\"sSortJUIWrapper\": \"DataTables_sort_wrapper\",\n\t\t\"sSortIcon\": \"DataTables_sort_icon\",\n\t\n\t\t/* Scrolling */\n\t\t\"sScrollHead\": \"dataTables_scrollHead \"+_stateDefault,\n\t\t\"sScrollFoot\": \"dataTables_scrollFoot \"+_stateDefault,\n\t\n\t\t/* Misc */\n\t\t\"sHeaderTH\": _stateDefault,\n\t\t\"sFooterTH\": _stateDefault,\n\t\t\"sJUIHeader\": _headerFooter+\" ui-corner-tl ui-corner-tr\",\n\t\t\"sJUIFooter\": _headerFooter+\" ui-corner-bl ui-corner-br\"\n\t} );\n\t\n\t}());\n\t\n\t\n\t\n\tvar extPagination = DataTable.ext.pager;\n\t\n\tfunction _numbers ( page, pages ) {\n\t\tvar\n\t\t\tnumbers = [],\n\t\t\tbuttons = extPagination.numbers_length,\n\t\t\thalf = Math.floor( buttons / 2 ),\n\t\t\ti = 1;\n\t\n\t\tif ( pages <= buttons ) {\n\t\t\tnumbers = _range( 0, pages );\n\t\t}\n\t\telse if ( page <= half ) {\n\t\t\tnumbers = _range( 0, buttons-2 );\n\t\t\tnumbers.push( 'ellipsis' );\n\t\t\tnumbers.push( pages-1 );\n\t\t}\n\t\telse if ( page >= pages - 1 - half ) {\n\t\t\tnumbers = _range( pages-(buttons-2), pages );\n\t\t\tnumbers.splice( 0, 0, 'ellipsis' ); // no unshift in ie6\n\t\t\tnumbers.splice( 0, 0, 0 );\n\t\t}\n\t\telse {\n\t\t\tnumbers = _range( page-half+2, page+half-1 );\n\t\t\tnumbers.push( 'ellipsis' );\n\t\t\tnumbers.push( pages-1 );\n\t\t\tnumbers.splice( 0, 0, 'ellipsis' );\n\t\t\tnumbers.splice( 0, 0, 0 );\n\t\t}\n\t\n\t\tnumbers.DT_el = 'span';\n\t\treturn numbers;\n\t}\n\t\n\t\n\t$.extend( extPagination, {\n\t\tsimple: function ( page, pages ) {\n\t\t\treturn [ 'previous', 'next' ];\n\t\t},\n\t\n\t\tfull: function ( page, pages ) {\n\t\t\treturn [ 'first', 'previous', 'next', 'last' ];\n\t\t},\n\t\n\t\tnumbers: function ( page, pages ) {\n\t\t\treturn [ _numbers(page, pages) ];\n\t\t},\n\t\n\t\tsimple_numbers: function ( page, pages ) {\n\t\t\treturn [ 'previous', _numbers(page, pages), 'next' ];\n\t\t},\n\t\n\t\tfull_numbers: function ( page, pages ) {\n\t\t\treturn [ 'first', 'previous', _numbers(page, pages), 'next', 'last' ];\n\t\t},\n\t\n\t\t// For testing and plug-ins to use\n\t\t_numbers: _numbers,\n\t\n\t\t// Number of number buttons (including ellipsis) to show. _Must be odd!_\n\t\tnumbers_length: 7\n\t} );\n\t\n\t\n\t$.extend( true, DataTable.ext.renderer, {\n\t\tpageButton: {\n\t\t\t_: function ( settings, host, idx, buttons, page, pages ) {\n\t\t\t\tvar classes = settings.oClasses;\n\t\t\t\tvar lang = settings.oLanguage.oPaginate;\n\t\t\t\tvar aria = settings.oLanguage.oAria.paginate || {};\n\t\t\t\tvar btnDisplay, btnClass, counter=0;\n\t\n\t\t\t\tvar attach = function( container, buttons ) {\n\t\t\t\t\tvar i, ien, node, button;\n\t\t\t\t\tvar clickHandler = function ( e ) {\n\t\t\t\t\t\t_fnPageChange( settings, e.data.action, true );\n\t\t\t\t\t};\n\t\n\t\t\t\t\tfor ( i=0, ien=buttons.length ; i<ien ; i++ ) {\n\t\t\t\t\t\tbutton = buttons[i];\n\t\n\t\t\t\t\t\tif ( $.isArray( button ) ) {\n\t\t\t\t\t\t\tvar inner = $( '<'+(button.DT_el || 'div')+'/>' )\n\t\t\t\t\t\t\t\t.appendTo( container );\n\t\t\t\t\t\t\tattach( inner, button );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tbtnDisplay = null;\n\t\t\t\t\t\t\tbtnClass = '';\n\t\n\t\t\t\t\t\t\tswitch ( button ) {\n\t\t\t\t\t\t\t\tcase 'ellipsis':\n\t\t\t\t\t\t\t\t\tcontainer.append('<span class=\"ellipsis\">…</span>');\n\t\t\t\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\t\t\t\tcase 'first':\n\t\t\t\t\t\t\t\t\tbtnDisplay = lang.sFirst;\n\t\t\t\t\t\t\t\t\tbtnClass = button + (page > 0 ?\n\t\t\t\t\t\t\t\t\t\t'' : ' '+classes.sPageButtonDisabled);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\t\t\t\tcase 'previous':\n\t\t\t\t\t\t\t\t\tbtnDisplay = lang.sPrevious;\n\t\t\t\t\t\t\t\t\tbtnClass = button + (page > 0 ?\n\t\t\t\t\t\t\t\t\t\t'' : ' '+classes.sPageButtonDisabled);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\t\t\t\tcase 'next':\n\t\t\t\t\t\t\t\t\tbtnDisplay = lang.sNext;\n\t\t\t\t\t\t\t\t\tbtnClass = button + (page < pages-1 ?\n\t\t\t\t\t\t\t\t\t\t'' : ' '+classes.sPageButtonDisabled);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\t\t\t\tcase 'last':\n\t\t\t\t\t\t\t\t\tbtnDisplay = lang.sLast;\n\t\t\t\t\t\t\t\t\tbtnClass = button + (page < pages-1 ?\n\t\t\t\t\t\t\t\t\t\t'' : ' '+classes.sPageButtonDisabled);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tbtnDisplay = button + 1;\n\t\t\t\t\t\t\t\t\tbtnClass = page === button ?\n\t\t\t\t\t\t\t\t\t\tclasses.sPageButtonActive : '';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\tif ( btnDisplay !== null ) {\n\t\t\t\t\t\t\t\tnode = $('<a>', {\n\t\t\t\t\t\t\t\t\t\t'class': classes.sPageButton+' '+btnClass,\n\t\t\t\t\t\t\t\t\t\t'aria-controls': settings.sTableId,\n\t\t\t\t\t\t\t\t\t\t'aria-label': aria[ button ],\n\t\t\t\t\t\t\t\t\t\t'data-dt-idx': counter,\n\t\t\t\t\t\t\t\t\t\t'tabindex': settings.iTabIndex,\n\t\t\t\t\t\t\t\t\t\t'id': idx === 0 && typeof button === 'string' ?\n\t\t\t\t\t\t\t\t\t\t\tsettings.sTableId +'_'+ button :\n\t\t\t\t\t\t\t\t\t\t\tnull\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t.html( btnDisplay )\n\t\t\t\t\t\t\t\t\t.appendTo( container );\n\t\n\t\t\t\t\t\t\t\t_fnBindAction(\n\t\t\t\t\t\t\t\t\tnode, {action: button}, clickHandler\n\t\t\t\t\t\t\t\t);\n\t\n\t\t\t\t\t\t\t\tcounter++;\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\n\t\t\t\t// IE9 throws an 'unknown error' if document.activeElement is used\n\t\t\t\t// inside an iframe or frame. Try / catch the error. Not good for\n\t\t\t\t// accessibility, but neither are frames.\n\t\t\t\tvar activeEl;\n\t\n\t\t\t\ttry {\n\t\t\t\t\t// Because this approach is destroying and recreating the paging\n\t\t\t\t\t// elements, focus is lost on the select button which is bad for\n\t\t\t\t\t// accessibility. So we want to restore focus once the draw has\n\t\t\t\t\t// completed\n\t\t\t\t\tactiveEl = $(host).find(document.activeElement).data('dt-idx');\n\t\t\t\t}\n\t\t\t\tcatch (e) {}\n\t\n\t\t\t\tattach( $(host).empty(), buttons );\n\t\n\t\t\t\tif ( activeEl ) {\n\t\t\t\t\t$(host).find( '[data-dt-idx='+activeEl+']' ).focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} );\n\t\n\t\n\t\n\t// Built in type detection. See model.ext.aTypes for information about\n\t// what is required from this methods.\n\t$.extend( DataTable.ext.type.detect, [\n\t\t// Plain numbers - first since V8 detects some plain numbers as dates\n\t\t// e.g. Date.parse('55') (but not all, e.g. Date.parse('22')...).\n\t\tfunction ( d, settings )\n\t\t{\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _isNumber( d, decimal ) ? 'num'+decimal : null;\n\t\t},\n\t\n\t\t// Dates (only those recognised by the browser's Date.parse)\n\t\tfunction ( d, settings )\n\t\t{\n\t\t\t// V8 will remove any unknown characters at the start and end of the\n\t\t\t// expression, leading to false matches such as `$245.12` or `10%` being\n\t\t\t// a valid date. See forum thread 18941 for detail.\n\t\t\tif ( d && !(d instanceof Date) && ( ! _re_date_start.test(d) || ! _re_date_end.test(d) ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tvar parsed = Date.parse(d);\n\t\t\treturn (parsed !== null && !isNaN(parsed)) || _empty(d) ? 'date' : null;\n\t\t},\n\t\n\t\t// Formatted numbers\n\t\tfunction ( d, settings )\n\t\t{\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _isNumber( d, decimal, true ) ? 'num-fmt'+decimal : null;\n\t\t},\n\t\n\t\t// HTML numeric\n\t\tfunction ( d, settings )\n\t\t{\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _htmlNumeric( d, decimal ) ? 'html-num'+decimal : null;\n\t\t},\n\t\n\t\t// HTML numeric, formatted\n\t\tfunction ( d, settings )\n\t\t{\n\t\t\tvar decimal = settings.oLanguage.sDecimal;\n\t\t\treturn _htmlNumeric( d, decimal, true ) ? 'html-num-fmt'+decimal : null;\n\t\t},\n\t\n\t\t// HTML (this is strict checking - there must be html)\n\t\tfunction ( d, settings )\n\t\t{\n\t\t\treturn _empty( d ) || (typeof d === 'string' && d.indexOf('<') !== -1) ?\n\t\t\t\t'html' : null;\n\t\t}\n\t] );\n\t\n\t\n\t\n\t// Filter formatting functions. See model.ext.ofnSearch for information about\n\t// what is required from these methods.\n\t// \n\t// Note that additional search methods are added for the html numbers and\n\t// html formatted numbers by `_addNumericSort()` when we know what the decimal\n\t// place is\n\t\n\t\n\t$.extend( DataTable.ext.type.search, {\n\t\thtml: function ( data ) {\n\t\t\treturn _empty(data) ?\n\t\t\t\tdata :\n\t\t\t\ttypeof data === 'string' ?\n\t\t\t\t\tdata\n\t\t\t\t\t\t.replace( _re_new_lines, \" \" )\n\t\t\t\t\t\t.replace( _re_html, \"\" ) :\n\t\t\t\t\t'';\n\t\t},\n\t\n\t\tstring: function ( data ) {\n\t\t\treturn _empty(data) ?\n\t\t\t\tdata :\n\t\t\t\ttypeof data === 'string' ?\n\t\t\t\t\tdata.replace( _re_new_lines, \" \" ) :\n\t\t\t\t\tdata;\n\t\t}\n\t} );\n\t\n\t\n\t\n\tvar __numericReplace = function ( d, decimalPlace, re1, re2 ) {\n\t\tif ( d !== 0 && (!d || d === '-') ) {\n\t\t\treturn -Infinity;\n\t\t}\n\t\n\t\t// If a decimal place other than `.` is used, it needs to be given to the\n\t\t// function so we can detect it and replace with a `.` which is the only\n\t\t// decimal place Javascript recognises - it is not locale aware.\n\t\tif ( decimalPlace ) {\n\t\t\td = _numToDecimal( d, decimalPlace );\n\t\t}\n\t\n\t\tif ( d.replace ) {\n\t\t\tif ( re1 ) {\n\t\t\t\td = d.replace( re1, '' );\n\t\t\t}\n\t\n\t\t\tif ( re2 ) {\n\t\t\t\td = d.replace( re2, '' );\n\t\t\t}\n\t\t}\n\t\n\t\treturn d * 1;\n\t};\n\t\n\t\n\t// Add the numeric 'deformatting' functions for sorting and search. This is done\n\t// in a function to provide an easy ability for the language options to add\n\t// additional methods if a non-period decimal place is used.\n\tfunction _addNumericSort ( decimalPlace ) {\n\t\t$.each(\n\t\t\t{\n\t\t\t\t// Plain numbers\n\t\t\t\t\"num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace );\n\t\t\t\t},\n\t\n\t\t\t\t// Formatted numbers\n\t\t\t\t\"num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_formatted_numeric );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric\n\t\t\t\t\"html-num\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html );\n\t\t\t\t},\n\t\n\t\t\t\t// HTML numeric, formatted\n\t\t\t\t\"html-num-fmt\": function ( d ) {\n\t\t\t\t\treturn __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction ( key, fn ) {\n\t\t\t\t// Add the ordering method\n\t\t\t\t_ext.type.order[ key+decimalPlace+'-pre' ] = fn;\n\t\n\t\t\t\t// For HTML types add a search formatter that will strip the HTML\n\t\t\t\tif ( key.match(/^html\\-/) ) {\n\t\t\t\t\t_ext.type.search[ key+decimalPlace ] = _ext.type.search.html;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\t\n\t\n\t// Default sort methods\n\t$.extend( _ext.type.order, {\n\t\t// Dates\n\t\t\"date-pre\": function ( d ) {\n\t\t\treturn Date.parse( d ) || 0;\n\t\t},\n\t\n\t\t// html\n\t\t\"html-pre\": function ( a ) {\n\t\t\treturn _empty(a) ?\n\t\t\t\t'' :\n\t\t\t\ta.replace ?\n\t\t\t\t\ta.replace( /<.*?>/g, \"\" ).toLowerCase() :\n\t\t\t\t\ta+'';\n\t\t},\n\t\n\t\t// string\n\t\t\"string-pre\": function ( a ) {\n\t\t\t// This is a little complex, but faster than always calling toString,\n\t\t\t// http://jsperf.com/tostring-v-check\n\t\t\treturn _empty(a) ?\n\t\t\t\t'' :\n\t\t\t\ttypeof a === 'string' ?\n\t\t\t\t\ta.toLowerCase() :\n\t\t\t\t\t! a.toString ?\n\t\t\t\t\t\t'' :\n\t\t\t\t\t\ta.toString();\n\t\t},\n\t\n\t\t// string-asc and -desc are retained only for compatibility with the old\n\t\t// sort methods\n\t\t\"string-asc\": function ( x, y ) {\n\t\t\treturn ((x < y) ? -1 : ((x > y) ? 1 : 0));\n\t\t},\n\t\n\t\t\"string-desc\": function ( x, y ) {\n\t\t\treturn ((x < y) ? 1 : ((x > y) ? -1 : 0));\n\t\t}\n\t} );\n\t\n\t\n\t// Numeric sorting types - order doesn't matter here\n\t_addNumericSort( '' );\n\t\n\t\n\t$.extend( true, DataTable.ext.renderer, {\n\t\theader: {\n\t\t\t_: function ( settings, cell, column, classes ) {\n\t\t\t\t// No additional mark-up required\n\t\t\t\t// Attach a sort listener to update on sort - note that using the\n\t\t\t\t// `DT` namespace will allow the event to be removed automatically\n\t\t\t\t// on destroy, while the `dt` namespaced event is the one we are\n\t\t\t\t// listening for\n\t\t\t\t$(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) {\n\t\t\t\t\tif ( settings !== ctx ) { // need to check this this is the host\n\t\t\t\t\t\treturn; // table, not a nested one\n\t\t\t\t\t}\n\t\n\t\t\t\t\tvar colIdx = column.idx;\n\t\n\t\t\t\t\tcell\n\t\t\t\t\t\t.removeClass(\n\t\t\t\t\t\t\tcolumn.sSortingClass +' '+\n\t\t\t\t\t\t\tclasses.sSortAsc +' '+\n\t\t\t\t\t\t\tclasses.sSortDesc\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.addClass( columns[ colIdx ] == 'asc' ?\n\t\t\t\t\t\t\tclasses.sSortAsc : columns[ colIdx ] == 'desc' ?\n\t\t\t\t\t\t\t\tclasses.sSortDesc :\n\t\t\t\t\t\t\t\tcolumn.sSortingClass\n\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t},\n\t\n\t\t\tjqueryui: function ( settings, cell, column, classes ) {\n\t\t\t\t$('<div/>')\n\t\t\t\t\t.addClass( classes.sSortJUIWrapper )\n\t\t\t\t\t.append( cell.contents() )\n\t\t\t\t\t.append( $('<span/>')\n\t\t\t\t\t\t.addClass( classes.sSortIcon+' '+column.sSortingClassJUI )\n\t\t\t\t\t)\n\t\t\t\t\t.appendTo( cell );\n\t\n\t\t\t\t// Attach a sort listener to update on sort\n\t\t\t\t$(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) {\n\t\t\t\t\tif ( settings !== ctx ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tvar colIdx = column.idx;\n\t\n\t\t\t\t\tcell\n\t\t\t\t\t\t.removeClass( classes.sSortAsc +\" \"+classes.sSortDesc )\n\t\t\t\t\t\t.addClass( columns[ colIdx ] == 'asc' ?\n\t\t\t\t\t\t\tclasses.sSortAsc : columns[ colIdx ] == 'desc' ?\n\t\t\t\t\t\t\t\tclasses.sSortDesc :\n\t\t\t\t\t\t\t\tcolumn.sSortingClass\n\t\t\t\t\t\t);\n\t\n\t\t\t\t\tcell\n\t\t\t\t\t\t.find( 'span.'+classes.sSortIcon )\n\t\t\t\t\t\t.removeClass(\n\t\t\t\t\t\t\tclasses.sSortJUIAsc +\" \"+\n\t\t\t\t\t\t\tclasses.sSortJUIDesc +\" \"+\n\t\t\t\t\t\t\tclasses.sSortJUI +\" \"+\n\t\t\t\t\t\t\tclasses.sSortJUIAscAllowed +\" \"+\n\t\t\t\t\t\t\tclasses.sSortJUIDescAllowed\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.addClass( columns[ colIdx ] == 'asc' ?\n\t\t\t\t\t\t\tclasses.sSortJUIAsc : columns[ colIdx ] == 'desc' ?\n\t\t\t\t\t\t\t\tclasses.sSortJUIDesc :\n\t\t\t\t\t\t\t\tcolumn.sSortingClassJUI\n\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t} );\n\t\n\t/*\n\t * Public helper functions. These aren't used internally by DataTables, or\n\t * called by any of the options passed into DataTables, but they can be used\n\t * externally by developers working with DataTables. They are helper functions\n\t * to make working with DataTables a little bit easier.\n\t */\n\t\n\t/**\n\t * Helpers for `columns.render`.\n\t *\n\t * The options defined here can be used with the `columns.render` initialisation\n\t * option to provide a display renderer. The following functions are defined:\n\t *\n\t * * `number` - Will format numeric data (defined by `columns.data`) for\n\t * display, retaining the original unformatted data for sorting and filtering.\n\t * It takes 5 parameters:\n\t * * `string` - Thousands grouping separator\n\t * * `string` - Decimal point indicator\n\t * * `integer` - Number of decimal points to show\n\t * * `string` (optional) - Prefix.\n\t * * `string` (optional) - Postfix (/suffix).\n\t * * `text` - Escape HTML to help prevent XSS attacks. It has no optional\n\t * parameters.\n\t *\n\t * @example\n\t * // Column definition using the number renderer\n\t * {\n\t * data: \"salary\",\n\t * render: $.fn.dataTable.render.number( '\\'', '.', 0, '$' )\n\t * }\n\t *\n\t * @namespace\n\t */\n\tDataTable.render = {\n\t\tnumber: function ( thousands, decimal, precision, prefix, postfix ) {\n\t\t\treturn {\n\t\t\t\tdisplay: function ( d ) {\n\t\t\t\t\tif ( typeof d !== 'number' && typeof d !== 'string' ) {\n\t\t\t\t\t\treturn d;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tvar negative = d < 0 ? '-' : '';\n\t\t\t\t\tvar flo = parseFloat( d );\n\t\n\t\t\t\t\t// If NaN then there isn't much formatting that we can do - just\n\t\t\t\t\t// return immediately\n\t\t\t\t\tif ( isNaN( flo ) ) {\n\t\t\t\t\t\treturn d;\n\t\t\t\t\t}\n\t\n\t\t\t\t\td = Math.abs( flo );\n\t\n\t\t\t\t\tvar intPart = parseInt( d, 10 );\n\t\t\t\t\tvar floatPart = precision ?\n\t\t\t\t\t\tdecimal+(d - intPart).toFixed( precision ).substring( 2 ):\n\t\t\t\t\t\t'';\n\t\n\t\t\t\t\treturn negative + (prefix||'') +\n\t\t\t\t\t\tintPart.toString().replace(\n\t\t\t\t\t\t\t/\\B(?=(\\d{3})+(?!\\d))/g, thousands\n\t\t\t\t\t\t) +\n\t\t\t\t\t\tfloatPart +\n\t\t\t\t\t\t(postfix||'');\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\n\t\ttext: function () {\n\t\t\treturn {\n\t\t\t\tdisplay: function ( d ) {\n\t\t\t\t\treturn typeof d === 'string' ?\n\t\t\t\t\t\td.replace(/</g, '<').replace(/>/g, '>').replace(/\"/g, '"') :\n\t\t\t\t\t\td;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n\t\n\t\n\t/*\n\t * This is really a good bit rubbish this method of exposing the internal methods\n\t * publicly... - To be fixed in 2.0 using methods on the prototype\n\t */\n\t\n\t\n\t/**\n\t * Create a wrapper function for exporting an internal functions to an external API.\n\t * @param {string} fn API function name\n\t * @returns {function} wrapped function\n\t * @memberof DataTable#internal\n\t */\n\tfunction _fnExternApiFunc (fn)\n\t{\n\t\treturn function() {\n\t\t\tvar args = [_fnSettingsFromNode( this[DataTable.ext.iApiIndex] )].concat(\n\t\t\t\tArray.prototype.slice.call(arguments)\n\t\t\t);\n\t\t\treturn DataTable.ext.internal[fn].apply( this, args );\n\t\t};\n\t}\n\t\n\t\n\t/**\n\t * Reference to internal functions for use by plug-in developers. Note that\n\t * these methods are references to internal functions and are considered to be\n\t * private. If you use these methods, be aware that they are liable to change\n\t * between versions.\n\t * @namespace\n\t */\n\t$.extend( DataTable.ext.internal, {\n\t\t_fnExternApiFunc: _fnExternApiFunc,\n\t\t_fnBuildAjax: _fnBuildAjax,\n\t\t_fnAjaxUpdate: _fnAjaxUpdate,\n\t\t_fnAjaxParameters: _fnAjaxParameters,\n\t\t_fnAjaxUpdateDraw: _fnAjaxUpdateDraw,\n\t\t_fnAjaxDataSrc: _fnAjaxDataSrc,\n\t\t_fnAddColumn: _fnAddColumn,\n\t\t_fnColumnOptions: _fnColumnOptions,\n\t\t_fnAdjustColumnSizing: _fnAdjustColumnSizing,\n\t\t_fnVisibleToColumnIndex: _fnVisibleToColumnIndex,\n\t\t_fnColumnIndexToVisible: _fnColumnIndexToVisible,\n\t\t_fnVisbleColumns: _fnVisbleColumns,\n\t\t_fnGetColumns: _fnGetColumns,\n\t\t_fnColumnTypes: _fnColumnTypes,\n\t\t_fnApplyColumnDefs: _fnApplyColumnDefs,\n\t\t_fnHungarianMap: _fnHungarianMap,\n\t\t_fnCamelToHungarian: _fnCamelToHungarian,\n\t\t_fnLanguageCompat: _fnLanguageCompat,\n\t\t_fnBrowserDetect: _fnBrowserDetect,\n\t\t_fnAddData: _fnAddData,\n\t\t_fnAddTr: _fnAddTr,\n\t\t_fnNodeToDataIndex: _fnNodeToDataIndex,\n\t\t_fnNodeToColumnIndex: _fnNodeToColumnIndex,\n\t\t_fnGetCellData: _fnGetCellData,\n\t\t_fnSetCellData: _fnSetCellData,\n\t\t_fnSplitObjNotation: _fnSplitObjNotation,\n\t\t_fnGetObjectDataFn: _fnGetObjectDataFn,\n\t\t_fnSetObjectDataFn: _fnSetObjectDataFn,\n\t\t_fnGetDataMaster: _fnGetDataMaster,\n\t\t_fnClearTable: _fnClearTable,\n\t\t_fnDeleteIndex: _fnDeleteIndex,\n\t\t_fnInvalidate: _fnInvalidate,\n\t\t_fnGetRowElements: _fnGetRowElements,\n\t\t_fnCreateTr: _fnCreateTr,\n\t\t_fnBuildHead: _fnBuildHead,\n\t\t_fnDrawHead: _fnDrawHead,\n\t\t_fnDraw: _fnDraw,\n\t\t_fnReDraw: _fnReDraw,\n\t\t_fnAddOptionsHtml: _fnAddOptionsHtml,\n\t\t_fnDetectHeader: _fnDetectHeader,\n\t\t_fnGetUniqueThs: _fnGetUniqueThs,\n\t\t_fnFeatureHtmlFilter: _fnFeatureHtmlFilter,\n\t\t_fnFilterComplete: _fnFilterComplete,\n\t\t_fnFilterCustom: _fnFilterCustom,\n\t\t_fnFilterColumn: _fnFilterColumn,\n\t\t_fnFilter: _fnFilter,\n\t\t_fnFilterCreateSearch: _fnFilterCreateSearch,\n\t\t_fnEscapeRegex: _fnEscapeRegex,\n\t\t_fnFilterData: _fnFilterData,\n\t\t_fnFeatureHtmlInfo: _fnFeatureHtmlInfo,\n\t\t_fnUpdateInfo: _fnUpdateInfo,\n\t\t_fnInfoMacros: _fnInfoMacros,\n\t\t_fnInitialise: _fnInitialise,\n\t\t_fnInitComplete: _fnInitComplete,\n\t\t_fnLengthChange: _fnLengthChange,\n\t\t_fnFeatureHtmlLength: _fnFeatureHtmlLength,\n\t\t_fnFeatureHtmlPaginate: _fnFeatureHtmlPaginate,\n\t\t_fnPageChange: _fnPageChange,\n\t\t_fnFeatureHtmlProcessing: _fnFeatureHtmlProcessing,\n\t\t_fnProcessingDisplay: _fnProcessingDisplay,\n\t\t_fnFeatureHtmlTable: _fnFeatureHtmlTable,\n\t\t_fnScrollDraw: _fnScrollDraw,\n\t\t_fnApplyToChildren: _fnApplyToChildren,\n\t\t_fnCalculateColumnWidths: _fnCalculateColumnWidths,\n\t\t_fnThrottle: _fnThrottle,\n\t\t_fnConvertToWidth: _fnConvertToWidth,\n\t\t_fnGetWidestNode: _fnGetWidestNode,\n\t\t_fnGetMaxLenString: _fnGetMaxLenString,\n\t\t_fnStringToCss: _fnStringToCss,\n\t\t_fnSortFlatten: _fnSortFlatten,\n\t\t_fnSort: _fnSort,\n\t\t_fnSortAria: _fnSortAria,\n\t\t_fnSortListener: _fnSortListener,\n\t\t_fnSortAttachListener: _fnSortAttachListener,\n\t\t_fnSortingClasses: _fnSortingClasses,\n\t\t_fnSortData: _fnSortData,\n\t\t_fnSaveState: _fnSaveState,\n\t\t_fnLoadState: _fnLoadState,\n\t\t_fnSettingsFromNode: _fnSettingsFromNode,\n\t\t_fnLog: _fnLog,\n\t\t_fnMap: _fnMap,\n\t\t_fnBindAction: _fnBindAction,\n\t\t_fnCallbackReg: _fnCallbackReg,\n\t\t_fnCallbackFire: _fnCallbackFire,\n\t\t_fnLengthOverflow: _fnLengthOverflow,\n\t\t_fnRenderer: _fnRenderer,\n\t\t_fnDataSource: _fnDataSource,\n\t\t_fnRowAttributes: _fnRowAttributes,\n\t\t_fnCalculateEnd: function () {} // Used by a lot of plug-ins, but redundant\n\t\t // in 1.10, so this dead-end function is\n\t\t // added to prevent errors\n\t} );\n\t\n\n\t// jQuery access\n\t$.fn.dataTable = DataTable;\n\n\t// Provide access to the host jQuery object (circular reference)\n\tDataTable.$ = $;\n\n\t// Legacy aliases\n\t$.fn.dataTableSettings = DataTable.settings;\n\t$.fn.dataTableExt = DataTable.ext;\n\n\t// With a capital `D` we return a DataTables API instance rather than a\n\t// jQuery object\n\t$.fn.DataTable = function ( opts ) {\n\t\treturn $(this).dataTable( opts ).api();\n\t};\n\n\t// All properties that are available to $.fn.dataTable should also be\n\t// available on $.fn.DataTable\n\t$.each( DataTable, function ( prop, val ) {\n\t\t$.fn.DataTable[ prop ] = val;\n\t} );\n\n\n\t// Information about events fired by DataTables - for documentation.\n\t/**\n\t * Draw event, fired whenever the table is redrawn on the page, at the same\n\t * point as fnDrawCallback. This may be useful for binding events or\n\t * performing calculations when the table is altered at all.\n\t * @name DataTable#draw.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} o DataTables settings object {@link DataTable.models.oSettings}\n\t */\n\n\t/**\n\t * Search event, fired when the searching applied to the table (using the\n\t * built-in global search, or column filters) is altered.\n\t * @name DataTable#search.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} o DataTables settings object {@link DataTable.models.oSettings}\n\t */\n\n\t/**\n\t * Page change event, fired when the paging of the table is altered.\n\t * @name DataTable#page.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} o DataTables settings object {@link DataTable.models.oSettings}\n\t */\n\n\t/**\n\t * Order event, fired when the ordering applied to the table is altered.\n\t * @name DataTable#order.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} o DataTables settings object {@link DataTable.models.oSettings}\n\t */\n\n\t/**\n\t * DataTables initialisation complete event, fired when the table is fully\n\t * drawn, including Ajax data loaded, if Ajax data is required.\n\t * @name DataTable#init.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} oSettings DataTables settings object\n\t * @param {object} json The JSON object request from the server - only\n\t * present if client-side Ajax sourced data is used</li></ol>\n\t */\n\n\t/**\n\t * State save event, fired when the table has changed state a new state save\n\t * is required. This event allows modification of the state saving object\n\t * prior to actually doing the save, including addition or other state\n\t * properties (for plug-ins) or modification of a DataTables core property.\n\t * @name DataTable#stateSaveParams.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} oSettings DataTables settings object\n\t * @param {object} json The state information to be saved\n\t */\n\n\t/**\n\t * State load event, fired when the table is loading state from the stored\n\t * data, but prior to the settings object being modified by the saved state\n\t * - allowing modification of the saved state is required or loading of\n\t * state for a plug-in.\n\t * @name DataTable#stateLoadParams.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} oSettings DataTables settings object\n\t * @param {object} json The saved state information\n\t */\n\n\t/**\n\t * State loaded event, fired when state has been loaded from stored data and\n\t * the settings object has been modified by the loaded data.\n\t * @name DataTable#stateLoaded.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} oSettings DataTables settings object\n\t * @param {object} json The saved state information\n\t */\n\n\t/**\n\t * Processing event, fired when DataTables is doing some kind of processing\n\t * (be it, order, searcg or anything else). It can be used to indicate to\n\t * the end user that there is something happening, or that something has\n\t * finished.\n\t * @name DataTable#processing.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} oSettings DataTables settings object\n\t * @param {boolean} bShow Flag for if DataTables is doing processing or not\n\t */\n\n\t/**\n\t * Ajax (XHR) event, fired whenever an Ajax request is completed from a\n\t * request to made to the server for new data. This event is called before\n\t * DataTables processed the returned data, so it can also be used to pre-\n\t * process the data returned from the server, if needed.\n\t *\n\t * Note that this trigger is called in `fnServerData`, if you override\n\t * `fnServerData` and which to use this event, you need to trigger it in you\n\t * success function.\n\t * @name DataTable#xhr.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} o DataTables settings object {@link DataTable.models.oSettings}\n\t * @param {object} json JSON returned from the server\n\t *\n\t * @example\n\t * // Use a custom property returned from the server in another DOM element\n\t * $('#table').dataTable().on('xhr.dt', function (e, settings, json) {\n\t * $('#status').html( json.status );\n\t * } );\n\t *\n\t * @example\n\t * // Pre-process the data returned from the server\n\t * $('#table').dataTable().on('xhr.dt', function (e, settings, json) {\n\t * for ( var i=0, ien=json.aaData.length ; i<ien ; i++ ) {\n\t * json.aaData[i].sum = json.aaData[i].one + json.aaData[i].two;\n\t * }\n\t * // Note no return - manipulate the data directly in the JSON object.\n\t * } );\n\t */\n\n\t/**\n\t * Destroy event, fired when the DataTable is destroyed by calling fnDestroy\n\t * or passing the bDestroy:true parameter in the initialisation object. This\n\t * can be used to remove bound events, added DOM nodes, etc.\n\t * @name DataTable#destroy.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} o DataTables settings object {@link DataTable.models.oSettings}\n\t */\n\n\t/**\n\t * Page length change event, fired when number of records to show on each\n\t * page (the length) is changed.\n\t * @name DataTable#length.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} o DataTables settings object {@link DataTable.models.oSettings}\n\t * @param {integer} len New length\n\t */\n\n\t/**\n\t * Column sizing has changed.\n\t * @name DataTable#column-sizing.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} o DataTables settings object {@link DataTable.models.oSettings}\n\t */\n\n\t/**\n\t * Column visibility has changed.\n\t * @name DataTable#column-visibility.dt\n\t * @event\n\t * @param {event} e jQuery event object\n\t * @param {object} o DataTables settings object {@link DataTable.models.oSettings}\n\t * @param {int} column Column index\n\t * @param {bool} vis `false` if column now hidden, or `true` if visible\n\t */\n\n\treturn $.fn.dataTable;\n}));\n","(function(){var a,b,c,d,e,f,g,h,i=[].slice,j={}.hasOwnProperty,k=function(a,b){function c(){this.constructor=a}for(var d in b)j.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};g=function(){},b=function(){function a(){}return a.prototype.addEventListener=a.prototype.on,a.prototype.on=function(a,b){return this._callbacks=this._callbacks||{},this._callbacks[a]||(this._callbacks[a]=[]),this._callbacks[a].push(b),this},a.prototype.emit=function(){var a,b,c,d,e,f;if(d=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],this._callbacks=this._callbacks||{},c=this._callbacks[d])for(e=0,f=c.length;f>e;e++)b=c[e],b.apply(this,a);return this},a.prototype.removeListener=a.prototype.off,a.prototype.removeAllListeners=a.prototype.off,a.prototype.removeEventListener=a.prototype.off,a.prototype.off=function(a,b){var c,d,e,f,g;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(d=this._callbacks[a],!d)return this;if(1===arguments.length)return delete this._callbacks[a],this;for(e=f=0,g=d.length;g>f;e=++f)if(c=d[e],c===b){d.splice(e,1);break}return this},a}(),a=function(a){function c(a,b){var e,f,g;if(this.element=a,this.version=c.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\\n*/g,\"\"),this.clickableElements=[],this.listeners=[],this.files=[],\"string\"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error(\"Invalid dropzone element.\");if(this.element.dropzone)throw new Error(\"Dropzone already attached.\");if(c.instances.push(this),this.element.dropzone=this,e=null!=(g=c.optionsForElement(this.element))?g:{},this.options=d({},this.defaultOptions,e,null!=b?b:{}),this.options.forceFallback||!c.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute(\"action\")),!this.options.url)throw new Error(\"No URL provided.\");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error(\"You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.\");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(f=this.getExistingFallback())&&f.parentNode&&f.parentNode.removeChild(f),this.options.previewsContainer!==!1&&(this.previewsContainer=this.options.previewsContainer?c.getElement(this.options.previewsContainer,\"previewsContainer\"):this.element),this.options.clickable&&(this.clickableElements=this.options.clickable===!0?[this.element]:c.getElements(this.options.clickable,\"clickable\")),this.init()}var d,e;return k(c,a),c.prototype.Emitter=b,c.prototype.events=[\"drop\",\"dragstart\",\"dragend\",\"dragenter\",\"dragover\",\"dragleave\",\"addedfile\",\"addedfiles\",\"removedfile\",\"thumbnail\",\"error\",\"errormultiple\",\"processing\",\"processingmultiple\",\"uploadprogress\",\"totaluploadprogress\",\"sending\",\"sendingmultiple\",\"success\",\"successmultiple\",\"canceled\",\"canceledmultiple\",\"complete\",\"completemultiple\",\"reset\",\"maxfilesexceeded\",\"maxfilesreached\",\"queuecomplete\"],c.prototype.defaultOptions={url:null,method:\"post\",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:\"file\",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:\"body\",capture:null,dictDefaultMessage:\"Drop files here to upload\",dictFallbackMessage:\"Your browser does not support drag'n'drop file uploads.\",dictFallbackText:\"Please use the fallback form below to upload your files like in the olden days.\",dictFileTooBig:\"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.\",dictInvalidFileType:\"You can't upload files of this type.\",dictResponseError:\"Server responded with {{statusCode}} code.\",dictCancelUpload:\"Cancel upload\",dictCancelUploadConfirmation:\"Are you sure you want to cancel this upload?\",dictRemoveFile:\"Remove file\",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:\"You can not upload any more files.\",accept:function(a,b){return b()},init:function(){return g},forceFallback:!1,fallback:function(){var a,b,d,e,f,g;for(this.element.className=\"\"+this.element.className+\" dz-browser-not-supported\",g=this.element.getElementsByTagName(\"div\"),e=0,f=g.length;f>e;e++)a=g[e],/(^| )dz-message($| )/.test(a.className)&&(b=a,a.className=\"dz-message\");return b||(b=c.createElement('<div class=\"dz-message\"><span></span></div>'),this.element.appendChild(b)),d=b.getElementsByTagName(\"span\")[0],d&&(null!=d.textContent?d.textContent=this.options.dictFallbackMessage:null!=d.innerText&&(d.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(a){var b,c,d;return b={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},c=a.width/a.height,b.optWidth=this.options.thumbnailWidth,b.optHeight=this.options.thumbnailHeight,null==b.optWidth&&null==b.optHeight?(b.optWidth=b.srcWidth,b.optHeight=b.srcHeight):null==b.optWidth?b.optWidth=c*b.optHeight:null==b.optHeight&&(b.optHeight=1/c*b.optWidth),d=b.optWidth/b.optHeight,a.height<b.optHeight||a.width<b.optWidth?(b.trgHeight=b.srcHeight,b.trgWidth=b.srcWidth):c>d?(b.srcHeight=a.height,b.srcWidth=b.srcHeight*d):(b.srcWidth=a.width,b.srcHeight=b.srcWidth/d),b.srcX=(a.width-b.srcWidth)/2,b.srcY=(a.height-b.srcHeight)/2,b},drop:function(){return this.element.classList.remove(\"dz-drag-hover\")},dragstart:g,dragend:function(){return this.element.classList.remove(\"dz-drag-hover\")},dragenter:function(){return this.element.classList.add(\"dz-drag-hover\")},dragover:function(){return this.element.classList.add(\"dz-drag-hover\")},dragleave:function(){return this.element.classList.remove(\"dz-drag-hover\")},paste:g,reset:function(){return this.element.classList.remove(\"dz-started\")},addedfile:function(a){var b,d,e,f,g,h,i,j,k,l,m,n,o;if(this.element===this.previewsContainer&&this.element.classList.add(\"dz-started\"),this.previewsContainer){for(a.previewElement=c.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement),l=a.previewElement.querySelectorAll(\"[data-dz-name]\"),f=0,i=l.length;i>f;f++)b=l[f],b.textContent=a.name;for(m=a.previewElement.querySelectorAll(\"[data-dz-size]\"),g=0,j=m.length;j>g;g++)b=m[g],b.innerHTML=this.filesize(a.size);for(this.options.addRemoveLinks&&(a._removeLink=c.createElement('<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>'+this.options.dictRemoveFile+\"</a>\"),a.previewElement.appendChild(a._removeLink)),d=function(b){return function(d){return d.preventDefault(),d.stopPropagation(),a.status===c.UPLOADING?c.confirm(b.options.dictCancelUploadConfirmation,function(){return b.removeFile(a)}):b.options.dictRemoveFileConfirmation?c.confirm(b.options.dictRemoveFileConfirmation,function(){return b.removeFile(a)}):b.removeFile(a)}}(this),n=a.previewElement.querySelectorAll(\"[data-dz-remove]\"),o=[],h=0,k=n.length;k>h;h++)e=n[h],o.push(e.addEventListener(\"click\",d));return o}},removedfile:function(a){var b;return a.previewElement&&null!=(b=a.previewElement)&&b.parentNode.removeChild(a.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(a,b){var c,d,e,f;if(a.previewElement){for(a.previewElement.classList.remove(\"dz-file-preview\"),f=a.previewElement.querySelectorAll(\"[data-dz-thumbnail]\"),d=0,e=f.length;e>d;d++)c=f[d],c.alt=a.name,c.src=b;return setTimeout(function(){return function(){return a.previewElement.classList.add(\"dz-image-preview\")}}(this),1)}},error:function(a,b){var c,d,e,f,g;if(a.previewElement){for(a.previewElement.classList.add(\"dz-error\"),\"String\"!=typeof b&&b.error&&(b=b.error),f=a.previewElement.querySelectorAll(\"[data-dz-errormessage]\"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.textContent=b);return g}},errormultiple:g,processing:function(a){return a.previewElement&&(a.previewElement.classList.add(\"dz-processing\"),a._removeLink)?a._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:g,uploadprogress:function(a,b){var c,d,e,f,g;if(a.previewElement){for(f=a.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(\"PROGRESS\"===c.nodeName?c.value=b:c.style.width=\"\"+b+\"%\");return g}},totaluploadprogress:g,sending:g,sendingmultiple:g,success:function(a){return a.previewElement?a.previewElement.classList.add(\"dz-success\"):void 0},successmultiple:g,canceled:function(a){return this.emit(\"error\",a,\"Upload canceled.\")},canceledmultiple:g,complete:function(a){return a._removeLink&&(a._removeLink.textContent=this.options.dictRemoveFile),a.previewElement?a.previewElement.classList.add(\"dz-complete\"):void 0},completemultiple:g,maxfilesexceeded:g,maxfilesreached:g,queuecomplete:g,addedfiles:g,previewTemplate:'<div class=\"dz-preview dz-file-preview\">\\n <div class=\"dz-image\"><img data-dz-thumbnail /></div>\\n <div class=\"dz-details\">\\n <div class=\"dz-size\"><span data-dz-size></span></div>\\n <div class=\"dz-filename\"><span data-dz-name></span></div>\\n </div>\\n <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\\n <div class=\"dz-success-mark\">\\n <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\\n <title>Check</title>\\n <defs></defs>\\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\\n <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\" sketch:type=\"MSShapeGroup\"></path>\\n </g>\\n </svg>\\n </div>\\n <div class=\"dz-error-mark\">\\n <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\\n <title>Error</title>\\n <defs></defs>\\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\\n <g id=\"Check-+-Oval-2\" sketch:type=\"MSLayerGroup\" stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\">\\n <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" sketch:type=\"MSShapeGroup\"></path>\\n </g>\\n </g>\\n </svg>\\n </div>\\n</div>'},d=function(){var a,b,c,d,e,f,g;for(d=arguments[0],c=2<=arguments.length?i.call(arguments,1):[],f=0,g=c.length;g>f;f++){b=c[f];for(a in b)e=b[a],d[a]=e}return d},c.prototype.getAcceptedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted&&e.push(a);return e},c.prototype.getRejectedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted||e.push(a);return e},c.prototype.getFilesWithStatus=function(a){var b,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.status===a&&f.push(b);return f},c.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(c.QUEUED)},c.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(c.UPLOADING)},c.prototype.getAddedFiles=function(){return this.getFilesWithStatus(c.ADDED)},c.prototype.getActiveFiles=function(){var a,b,d,e,f;for(e=this.files,f=[],b=0,d=e.length;d>b;b++)a=e[b],(a.status===c.UPLOADING||a.status===c.QUEUED)&&f.push(a);return f},c.prototype.init=function(){var a,b,d,e,f,g,h;for(\"form\"===this.element.tagName&&this.element.setAttribute(\"enctype\",\"multipart/form-data\"),this.element.classList.contains(\"dropzone\")&&!this.element.querySelector(\".dz-message\")&&this.element.appendChild(c.createElement('<div class=\"dz-default dz-message\"><span>'+this.options.dictDefaultMessage+\"</span></div>\")),this.clickableElements.length&&(d=function(a){return function(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement(\"input\"),a.hiddenFileInput.setAttribute(\"type\",\"file\"),(null==a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute(\"multiple\",\"multiple\"),a.hiddenFileInput.className=\"dz-hidden-input\",null!=a.options.acceptedFiles&&a.hiddenFileInput.setAttribute(\"accept\",a.options.acceptedFiles),null!=a.options.capture&&a.hiddenFileInput.setAttribute(\"capture\",a.options.capture),a.hiddenFileInput.style.visibility=\"hidden\",a.hiddenFileInput.style.position=\"absolute\",a.hiddenFileInput.style.top=\"0\",a.hiddenFileInput.style.left=\"0\",a.hiddenFileInput.style.height=\"0\",a.hiddenFileInput.style.width=\"0\",document.querySelector(a.options.hiddenInputContainer).appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener(\"change\",function(){var b,c,e,f;if(c=a.hiddenFileInput.files,c.length)for(e=0,f=c.length;f>e;e++)b=c[e],a.addFile(b);return a.emit(\"addedfiles\",c),d()})}}(this))(),this.URL=null!=(g=window.URL)?g:window.webkitURL,h=this.events,e=0,f=h.length;f>e;e++)a=h[e],this.on(a,this.options[a]);return this.on(\"uploadprogress\",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on(\"removedfile\",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on(\"canceled\",function(a){return function(b){return a.emit(\"complete\",b)}}(this)),this.on(\"complete\",function(a){return function(){return 0===a.getAddedFiles().length&&0===a.getUploadingFiles().length&&0===a.getQueuedFiles().length?setTimeout(function(){return a.emit(\"queuecomplete\")},0):void 0}}(this)),b=function(a){return a.stopPropagation(),a.preventDefault?a.preventDefault():a.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(a){return function(b){return a.emit(\"dragstart\",b)}}(this),dragenter:function(a){return function(c){return b(c),a.emit(\"dragenter\",c)}}(this),dragover:function(a){return function(c){var d;try{d=c.dataTransfer.effectAllowed}catch(e){}return c.dataTransfer.dropEffect=\"move\"===d||\"linkMove\"===d?\"move\":\"copy\",b(c),a.emit(\"dragover\",c)}}(this),dragleave:function(a){return function(b){return a.emit(\"dragleave\",b)}}(this),drop:function(a){return function(c){return b(c),a.drop(c)}}(this),dragend:function(a){return function(b){return a.emit(\"dragend\",b)}}(this)}}],this.clickableElements.forEach(function(a){return function(b){return a.listeners.push({element:b,events:{click:function(d){return(b!==a.element||d.target===a.element||c.elementInside(d.target,a.element.querySelector(\".dz-message\")))&&a.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},c.prototype.destroy=function(){var a;return this.disable(),this.removeAllFiles(!0),(null!=(a=this.hiddenFileInput)?a.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,c.instances.splice(c.instances.indexOf(this),1)},c.prototype.updateTotalUploadProgress=function(){var a,b,c,d,e,f,g,h;if(d=0,c=0,a=this.getActiveFiles(),a.length){for(h=this.getActiveFiles(),f=0,g=h.length;g>f;f++)b=h[f],d+=b.upload.bytesSent,c+=b.upload.total;e=100*d/c}else e=100;return this.emit(\"totaluploadprogress\",e,c,d)},c.prototype._getParamName=function(a){return\"function\"==typeof this.options.paramName?this.options.paramName(a):\"\"+this.options.paramName+(this.options.uploadMultiple?\"[\"+a+\"]\":\"\")},c.prototype.getFallbackForm=function(){var a,b,d,e;return(a=this.getExistingFallback())?a:(d='<div class=\"dz-fallback\">',this.options.dictFallbackText&&(d+=\"<p>\"+this.options.dictFallbackText+\"</p>\"),d+='<input type=\"file\" name=\"'+this._getParamName(0)+'\" '+(this.options.uploadMultiple?'multiple=\"multiple\"':void 0)+' /><input type=\"submit\" value=\"Upload!\"></div>',b=c.createElement(d),\"FORM\"!==this.element.tagName?(e=c.createElement('<form action=\"'+this.options.url+'\" enctype=\"multipart/form-data\" method=\"'+this.options.method+'\"></form>'),e.appendChild(b)):(this.element.setAttribute(\"enctype\",\"multipart/form-data\"),this.element.setAttribute(\"method\",this.options.method)),null!=e?e:b)},c.prototype.getExistingFallback=function(){var a,b,c,d,e,f;for(b=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)if(b=a[c],/(^| )fallback($| )/.test(b.className))return b},f=[\"div\",\"form\"],d=0,e=f.length;e>d;d++)if(c=f[d],a=b(this.element.getElementsByTagName(c)))return a},c.prototype.setupEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.addEventListener(b,c,!1));return e}());return g},c.prototype.removeEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.removeEventListener(b,c,!1));return e}());return g},c.prototype.disable=function(){var a,b,c,d,e;for(this.clickableElements.forEach(function(a){return a.classList.remove(\"dz-clickable\")}),this.removeEventListeners(),d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(this.cancelUpload(a));return e},c.prototype.enable=function(){return this.clickableElements.forEach(function(a){return a.classList.add(\"dz-clickable\")}),this.setupEventListeners()},c.prototype.filesize=function(a){var b,c,d,e,f,g,h,i;if(d=0,e=\"b\",a>0){for(g=[\"TB\",\"GB\",\"MB\",\"KB\",\"b\"],c=h=0,i=g.length;i>h;c=++h)if(f=g[c],b=Math.pow(this.options.filesizeBase,4-c)/10,a>=b){d=a/Math.pow(this.options.filesizeBase,4-c),e=f;break}d=Math.round(10*d)/10}return\"<strong>\"+d+\"</strong> \"+e},c.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit(\"maxfilesreached\",this.files),this.element.classList.add(\"dz-max-files-reached\")):this.element.classList.remove(\"dz-max-files-reached\")},c.prototype.drop=function(a){var b,c;a.dataTransfer&&(this.emit(\"drop\",a),b=a.dataTransfer.files,this.emit(\"addedfiles\",b),b.length&&(c=a.dataTransfer.items,c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)))},c.prototype.paste=function(a){var b,c;if(null!=(null!=a&&null!=(c=a.clipboardData)?c.items:void 0))return this.emit(\"paste\",a),b=a.clipboardData.items,b.length?this._addFilesFromItems(b):void 0},c.prototype.handleFiles=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.addFile(b));return e},c.prototype._addFilesFromItems=function(a){var b,c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],f.push(null!=c.webkitGetAsEntry&&(b=c.webkitGetAsEntry())?b.isFile?this.addFile(c.getAsFile()):b.isDirectory?this._addFilesFromDirectory(b,b.name):void 0:null!=c.getAsFile?null==c.kind||\"file\"===c.kind?this.addFile(c.getAsFile()):void 0:void 0);return f},c.prototype._addFilesFromDirectory=function(a,b){var c,d;return c=a.createReader(),d=function(a){return function(c){var d,e,f;for(e=0,f=c.length;f>e;e++)d=c[e],d.isFile?d.file(function(c){return a.options.ignoreHiddenFiles&&\".\"===c.name.substring(0,1)?void 0:(c.fullPath=\"\"+b+\"/\"+c.name,a.addFile(c))}):d.isDirectory&&a._addFilesFromDirectory(d,\"\"+b+\"/\"+d.name)}}(this),c.readEntries(d,function(a){return\"undefined\"!=typeof console&&null!==console&&\"function\"==typeof console.log?console.log(a):void 0})},c.prototype.accept=function(a,b){return a.size>1024*this.options.maxFilesize*1024?b(this.options.dictFileTooBig.replace(\"{{filesize}}\",Math.round(a.size/1024/10.24)/100).replace(\"{{maxFilesize}}\",this.options.maxFilesize)):c.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(b(this.options.dictMaxFilesExceeded.replace(\"{{maxFiles}}\",this.options.maxFiles)),this.emit(\"maxfilesexceeded\",a)):this.options.accept.call(this,a,b):b(this.options.dictInvalidFileType)},c.prototype.addFile=function(a){return a.upload={progress:0,total:a.size,bytesSent:0},this.files.push(a),a.status=c.ADDED,this.emit(\"addedfile\",a),this._enqueueThumbnail(a),this.accept(a,function(b){return function(c){return c?(a.accepted=!1,b._errorProcessing([a],c)):(a.accepted=!0,b.options.autoQueue&&b.enqueueFile(a)),b._updateMaxFilesReachedClass()}}(this))},c.prototype.enqueueFiles=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)b=a[c],this.enqueueFile(b);return null},c.prototype.enqueueFile=function(a){if(a.status!==c.ADDED||a.accepted!==!0)throw new Error(\"This file can't be queued because it has already been processed or was rejected.\");return a.status=c.QUEUED,this.options.autoProcessQueue?setTimeout(function(a){return function(){return a.processQueue()}}(this),0):void 0},c.prototype._thumbnailQueue=[],c.prototype._processingThumbnail=!1,c.prototype._enqueueThumbnail=function(a){return this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(a),setTimeout(function(a){return function(){return a._processThumbnailQueue()}}(this),0)):void 0},c.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(a){return function(){return a._processingThumbnail=!1,a._processThumbnailQueue()}}(this)))},c.prototype.removeFile=function(a){return a.status===c.UPLOADING&&this.cancelUpload(a),this.files=h(this.files,a),this.emit(\"removedfile\",a),0===this.files.length?this.emit(\"reset\"):void 0},c.prototype.removeAllFiles=function(a){var b,d,e,f;for(null==a&&(a=!1),f=this.files.slice(),d=0,e=f.length;e>d;d++)b=f[d],(b.status!==c.UPLOADING||a)&&this.removeFile(b);return null},c.prototype.createThumbnail=function(a,b){var c;return c=new FileReader,c.onload=function(d){return function(){return\"image/svg+xml\"===a.type?(d.emit(\"thumbnail\",a,c.result),void(null!=b&&b())):d.createThumbnailFromUrl(a,c.result,b)}}(this),c.readAsDataURL(a)},c.prototype.createThumbnailFromUrl=function(a,b,c,d){var e;return e=document.createElement(\"img\"),d&&(e.crossOrigin=d),e.onload=function(b){return function(){var d,g,h,i,j,k,l,m;return a.width=e.width,a.height=e.height,h=b.options.resize.call(b,a),null==h.trgWidth&&(h.trgWidth=h.optWidth),null==h.trgHeight&&(h.trgHeight=h.optHeight),d=document.createElement(\"canvas\"),g=d.getContext(\"2d\"),d.width=h.trgWidth,d.height=h.trgHeight,f(g,e,null!=(j=h.srcX)?j:0,null!=(k=h.srcY)?k:0,h.srcWidth,h.srcHeight,null!=(l=h.trgX)?l:0,null!=(m=h.trgY)?m:0,h.trgWidth,h.trgHeight),i=d.toDataURL(\"image/png\"),b.emit(\"thumbnail\",a,i),null!=c?c():void 0}}(this),null!=c&&(e.onerror=c),e.src=b},c.prototype.processQueue=function(){var a,b,c,d;if(b=this.options.parallelUploads,c=this.getUploadingFiles().length,a=c,!(c>=b)&&(d=this.getQueuedFiles(),d.length>0)){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,b-c));for(;b>a;){if(!d.length)return;this.processFile(d.shift()),a++}}},c.prototype.processFile=function(a){return this.processFiles([a])},c.prototype.processFiles=function(a){var b,d,e;for(d=0,e=a.length;e>d;d++)b=a[d],b.processing=!0,b.status=c.UPLOADING,this.emit(\"processing\",b);return this.options.uploadMultiple&&this.emit(\"processingmultiple\",a),this.uploadFiles(a)},c.prototype._getFilesWithXhr=function(a){var b,c;return c=function(){var c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.xhr===a&&f.push(b);return f}.call(this)},c.prototype.cancelUpload=function(a){var b,d,e,f,g,h,i;if(a.status===c.UPLOADING){for(d=this._getFilesWithXhr(a.xhr),e=0,g=d.length;g>e;e++)b=d[e],b.status=c.CANCELED;for(a.xhr.abort(),f=0,h=d.length;h>f;f++)b=d[f],this.emit(\"canceled\",b);this.options.uploadMultiple&&this.emit(\"canceledmultiple\",d)}else((i=a.status)===c.ADDED||i===c.QUEUED)&&(a.status=c.CANCELED,this.emit(\"canceled\",a),this.options.uploadMultiple&&this.emit(\"canceledmultiple\",[a]));return this.options.autoProcessQueue?this.processQueue():void 0},e=function(){var a,b;return b=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],\"function\"==typeof b?b.apply(this,a):b},c.prototype.uploadFile=function(a){return this.uploadFiles([a])},c.prototype.uploadFiles=function(a){var b,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L;for(w=new XMLHttpRequest,x=0,B=a.length;B>x;x++)b=a[x],b.xhr=w;p=e(this.options.method,a),u=e(this.options.url,a),w.open(p,u,!0),w.withCredentials=!!this.options.withCredentials,s=null,g=function(c){return function(){var d,e,f;for(f=[],d=0,e=a.length;e>d;d++)b=a[d],f.push(c._errorProcessing(a,s||c.options.dictResponseError.replace(\"{{statusCode}}\",w.status),w));return f}}(this),t=function(c){return function(d){var e,f,g,h,i,j,k,l,m;if(null!=d)for(f=100*d.loaded/d.total,g=0,j=a.length;j>g;g++)b=a[g],b.upload={progress:f,total:d.total,bytesSent:d.loaded};else{for(e=!0,f=100,h=0,k=a.length;k>h;h++)b=a[h],(100!==b.upload.progress||b.upload.bytesSent!==b.upload.total)&&(e=!1),b.upload.progress=f,b.upload.bytesSent=b.upload.total;if(e)return}for(m=[],i=0,l=a.length;l>i;i++)b=a[i],m.push(c.emit(\"uploadprogress\",b,f,b.upload.bytesSent));return m}}(this),w.onload=function(b){return function(d){var e;if(a[0].status!==c.CANCELED&&4===w.readyState){if(s=w.responseText,w.getResponseHeader(\"content-type\")&&~w.getResponseHeader(\"content-type\").indexOf(\"application/json\"))try{s=JSON.parse(s)}catch(f){d=f,s=\"Invalid JSON response from server.\"}return t(),200<=(e=w.status)&&300>e?b._finished(a,s,d):g()}}}(this),w.onerror=function(){return function(){return a[0].status!==c.CANCELED?g():void 0}}(this),r=null!=(G=w.upload)?G:w,r.onprogress=t,j={Accept:\"application/json\",\"Cache-Control\":\"no-cache\",\"X-Requested-With\":\"XMLHttpRequest\"},this.options.headers&&d(j,this.options.headers);for(h in j)i=j[h],i&&w.setRequestHeader(h,i);if(f=new FormData,this.options.params){H=this.options.params;for(o in H)v=H[o],f.append(o,v)}for(y=0,C=a.length;C>y;y++)b=a[y],this.emit(\"sending\",b,w,f);if(this.options.uploadMultiple&&this.emit(\"sendingmultiple\",a,w,f),\"FORM\"===this.element.tagName)for(I=this.element.querySelectorAll(\"input, textarea, select, button\"),z=0,D=I.length;D>z;z++)if(l=I[z],m=l.getAttribute(\"name\"),n=l.getAttribute(\"type\"),\"SELECT\"===l.tagName&&l.hasAttribute(\"multiple\"))for(J=l.options,A=0,E=J.length;E>A;A++)q=J[A],q.selected&&f.append(m,q.value);else(!n||\"checkbox\"!==(K=n.toLowerCase())&&\"radio\"!==K||l.checked)&&f.append(m,l.value);for(k=F=0,L=a.length-1;L>=0?L>=F:F>=L;k=L>=0?++F:--F)f.append(this._getParamName(k),a[k],a[k].name);return this.submitRequest(w,f,a)},c.prototype.submitRequest=function(a,b){return a.send(b)},c.prototype._finished=function(a,b,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=c.SUCCESS,this.emit(\"success\",e,b,d),this.emit(\"complete\",e);return this.options.uploadMultiple&&(this.emit(\"successmultiple\",a,b,d),this.emit(\"completemultiple\",a)),this.options.autoProcessQueue?this.processQueue():void 0},c.prototype._errorProcessing=function(a,b,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=c.ERROR,this.emit(\"error\",e,b,d),this.emit(\"complete\",e);return this.options.uploadMultiple&&(this.emit(\"errormultiple\",a,b,d),this.emit(\"completemultiple\",a)),this.options.autoProcessQueue?this.processQueue():void 0},c}(b),a.version=\"4.2.0\",a.options={},a.optionsForElement=function(b){return b.getAttribute(\"id\")?a.options[c(b.getAttribute(\"id\"))]:void 0},a.instances=[],a.forElement=function(a){if(\"string\"==typeof a&&(a=document.querySelector(a)),null==(null!=a?a.dropzone:void 0))throw new Error(\"No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.\");return a.dropzone},a.autoDiscover=!0,a.discover=function(){var b,c,d,e,f,g;for(document.querySelectorAll?d=document.querySelectorAll(\".dropzone\"):(d=[],b=function(a){var b,c,e,f;for(f=[],c=0,e=a.length;e>c;c++)b=a[c],f.push(/(^| )dropzone($| )/.test(b.className)?d.push(b):void 0);return f},b(document.getElementsByTagName(\"div\")),b(document.getElementsByTagName(\"form\"))),g=[],e=0,f=d.length;f>e;e++)c=d[e],g.push(a.optionsForElement(c)!==!1?new a(c):void 0);return g},a.blacklistedBrowsers=[/opera.*Macintosh.*version\\/12/i],a.isBrowserSupported=function(){var b,c,d,e,f;if(b=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(\"classList\"in document.createElement(\"a\"))for(f=a.blacklistedBrowsers,d=0,e=f.length;e>d;d++)c=f[d],c.test(navigator.userAgent)&&(b=!1);else b=!1;else b=!1;return b},h=function(a,b){var c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],c!==b&&f.push(c);return f},c=function(a){return a.replace(/[\\-_](\\w)/g,function(a){return a.charAt(1).toUpperCase()})},a.createElement=function(a){var b;return b=document.createElement(\"div\"),b.innerHTML=a,b.childNodes[0]},a.elementInside=function(a,b){if(a===b)return!0;for(;a=a.parentNode;)if(a===b)return!0;return!1},a.getElement=function(a,b){var c;if(\"string\"==typeof a?c=document.querySelector(a):null!=a.nodeType&&(c=a),null==c)throw new Error(\"Invalid `\"+b+\"` option provided. Please provide a CSS selector or a plain HTML element.\");return c},a.getElements=function(a,b){var c,d,e,f,g,h,i,j;if(a instanceof Array){e=[];try{for(f=0,h=a.length;h>f;f++)d=a[f],e.push(this.getElement(d,b))}catch(k){c=k,e=null}}else if(\"string\"==typeof a)for(e=[],j=document.querySelectorAll(a),g=0,i=j.length;i>g;g++)d=j[g],e.push(d);else null!=a.nodeType&&(e=[a]);if(null==e||!e.length)throw new Error(\"Invalid `\"+b+\"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.\");return e},a.confirm=function(a,b,c){return window.confirm(a)?b():null!=c?c():void 0},a.isValidFile=function(a,b){var c,d,e,f,g;if(!b)return!0;for(b=b.split(\",\"),d=a.type,c=d.replace(/\\/.*$/,\"\"),f=0,g=b.length;g>f;f++)if(e=b[f],e=e.trim(),\".\"===e.charAt(0)){if(-1!==a.name.toLowerCase().indexOf(e.toLowerCase(),a.name.length-e.length))return!0}else if(/\\/\\*$/.test(e)){if(c===e.replace(/\\/.*$/,\"\"))return!0}else if(d===e)return!0;return!1},\"undefined\"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(b){return this.each(function(){return new a(this,b)})}),\"undefined\"!=typeof module&&null!==module?module.exports=a:window.Dropzone=a,a.ADDED=\"added\",a.QUEUED=\"queued\",a.ACCEPTED=a.QUEUED,a.UPLOADING=\"uploading\",a.PROCESSING=a.UPLOADING,a.CANCELED=\"canceled\",a.ERROR=\"error\",a.SUCCESS=\"success\",e=function(a){var b,c,d,e,f,g,h,i,j,k;\nfor(h=a.naturalWidth,g=a.naturalHeight,c=document.createElement(\"canvas\"),c.width=1,c.height=g,d=c.getContext(\"2d\"),d.drawImage(a,0,0),e=d.getImageData(0,0,1,g).data,k=0,f=g,i=g;i>k;)b=e[4*(i-1)+3],0===b?f=i:k=i,i=f+k>>1;return j=i/g,0===j?1:j},f=function(a,b,c,d,f,g,h,i,j,k){var l;return l=e(b),a.drawImage(b,c,d,f,g,h,i,j,k/l)},d=function(a,b){var c,d,e,f,g,h,i,j,k;if(e=!1,k=!0,d=a.document,j=d.documentElement,c=d.addEventListener?\"addEventListener\":\"attachEvent\",i=d.addEventListener?\"removeEventListener\":\"detachEvent\",h=d.addEventListener?\"\":\"on\",f=function(c){return\"readystatechange\"!==c.type||\"complete\"===d.readyState?((\"load\"===c.type?a:d)[i](h+c.type,f,!1),!e&&(e=!0)?b.call(a,c.type||c):void 0):void 0},g=function(){var a;try{j.doScroll(\"left\")}catch(b){return a=b,void setTimeout(g,50)}return f(\"poll\")},\"complete\"!==d.readyState){if(d.createEventObject&&j.doScroll){try{k=!a.frameElement}catch(l){}k&&g()}return d[c](h+\"DOMContentLoaded\",f,!1),d[c](h+\"readystatechange\",f,!1),a[c](h+\"load\",f,!1)}},a._autoDiscoverFunction=function(){return a.autoDiscover?a.discover():void 0},d(window,a._autoDiscoverFunction)}).call(this);","/**!\n * easyPieChart\n * Lightweight plugin to render simple, animated and retina optimized pie charts\n *\n * @license \n * @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)\n * @version 2.1.6\n **/\n\n(function(root, factory) {\n if(typeof exports === 'object') {\n module.exports = factory(require('jquery'));\n }\n else if(typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n }\n else {\n factory(root.jQuery);\n }\n}(this, function($) {\n\n/**\n * Renderer to render the chart on a canvas object\n * @param {DOMElement} el DOM element to host the canvas (root of the plugin)\n * @param {object} options options object of the plugin\n */\nvar CanvasRenderer = function(el, options) {\n\tvar cachedBackground;\n\tvar canvas = document.createElement('canvas');\n\n\tel.appendChild(canvas);\n\n\tif (typeof(G_vmlCanvasManager) !== 'undefined') {\n\t\tG_vmlCanvasManager.initElement(canvas);\n\t}\n\n\tvar ctx = canvas.getContext('2d');\n\n\tcanvas.width = canvas.height = options.size;\n\n\t// canvas on retina devices\n\tvar scaleBy = 1;\n\tif (window.devicePixelRatio > 1) {\n\t\tscaleBy = window.devicePixelRatio;\n\t\tcanvas.style.width = canvas.style.height = [options.size, 'px'].join('');\n\t\tcanvas.width = canvas.height = options.size * scaleBy;\n\t\tctx.scale(scaleBy, scaleBy);\n\t}\n\n\t// move 0,0 coordinates to the center\n\tctx.translate(options.size / 2, options.size / 2);\n\n\t// rotate canvas -90deg\n\tctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI);\n\n\tvar radius = (options.size - options.lineWidth) / 2;\n\tif (options.scaleColor && options.scaleLength) {\n\t\tradius -= options.scaleLength + 2; // 2 is the distance between scale and bar\n\t}\n\n\t// IE polyfill for Date\n\tDate.now = Date.now || function() {\n\t\treturn +(new Date());\n\t};\n\n\t/**\n\t * Draw a circle around the center of the canvas\n\t * @param {strong} color Valid CSS color string\n\t * @param {number} lineWidth Width of the line in px\n\t * @param {number} percent Percentage to draw (float between -1 and 1)\n\t */\n\tvar drawCircle = function(color, lineWidth, percent) {\n\t\tpercent = Math.min(Math.max(-1, percent || 0), 1);\n\t\tvar isNegative = percent <= 0 ? true : false;\n\n\t\tctx.beginPath();\n\t\tctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative);\n\n\t\tctx.strokeStyle = color;\n\t\tctx.lineWidth = lineWidth;\n\n\t\tctx.stroke();\n\t};\n\n\t/**\n\t * Draw the scale of the chart\n\t */\n\tvar drawScale = function() {\n\t\tvar offset;\n\t\tvar length;\n\n\t\tctx.lineWidth = 1;\n\t\tctx.fillStyle = options.scaleColor;\n\n\t\tctx.save();\n\t\tfor (var i = 24; i > 0; --i) {\n\t\t\tif (i % 6 === 0) {\n\t\t\t\tlength = options.scaleLength;\n\t\t\t\toffset = 0;\n\t\t\t} else {\n\t\t\t\tlength = options.scaleLength * 0.6;\n\t\t\t\toffset = options.scaleLength - length;\n\t\t\t}\n\t\t\tctx.fillRect(-options.size/2 + offset, 0, length, 1);\n\t\t\tctx.rotate(Math.PI / 12);\n\t\t}\n\t\tctx.restore();\n\t};\n\n\t/**\n\t * Request animation frame wrapper with polyfill\n\t * @return {function} Request animation frame method or timeout fallback\n\t */\n\tvar reqAnimationFrame = (function() {\n\t\treturn window.requestAnimationFrame ||\n\t\t\t\twindow.webkitRequestAnimationFrame ||\n\t\t\t\twindow.mozRequestAnimationFrame ||\n\t\t\t\tfunction(callback) {\n\t\t\t\t\twindow.setTimeout(callback, 1000 / 60);\n\t\t\t\t};\n\t}());\n\n\t/**\n\t * Draw the background of the plugin including the scale and the track\n\t */\n\tvar drawBackground = function() {\n\t\tif(options.scaleColor) drawScale();\n\t\tif(options.trackColor) drawCircle(options.trackColor, options.trackWidth || options.lineWidth, 1);\n\t};\n\n /**\n * Canvas accessor\n */\n this.getCanvas = function() {\n return canvas;\n };\n\n /**\n * Canvas 2D context 'ctx' accessor\n */\n this.getCtx = function() {\n return ctx;\n };\n\n\t/**\n\t * Clear the complete canvas\n\t */\n\tthis.clear = function() {\n\t\tctx.clearRect(options.size / -2, options.size / -2, options.size, options.size);\n\t};\n\n\t/**\n\t * Draw the complete chart\n\t * @param {number} percent Percent shown by the chart between -100 and 100\n\t */\n\tthis.draw = function(percent) {\n\t\t// do we need to render a background\n\t\tif (!!options.scaleColor || !!options.trackColor) {\n\t\t\t// getImageData and putImageData are supported\n\t\t\tif (ctx.getImageData && ctx.putImageData) {\n\t\t\t\tif (!cachedBackground) {\n\t\t\t\t\tdrawBackground();\n\t\t\t\t\tcachedBackground = ctx.getImageData(0, 0, options.size * scaleBy, options.size * scaleBy);\n\t\t\t\t} else {\n\t\t\t\t\tctx.putImageData(cachedBackground, 0, 0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.clear();\n\t\t\t\tdrawBackground();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.clear();\n\t\t}\n\n\t\tctx.lineCap = options.lineCap;\n\n\t\t// if barcolor is a function execute it and pass the percent as a value\n\t\tvar color;\n\t\tif (typeof(options.barColor) === 'function') {\n\t\t\tcolor = options.barColor(percent);\n\t\t} else {\n\t\t\tcolor = options.barColor;\n\t\t}\n\n\t\t// draw bar\n\t\tdrawCircle(color, options.lineWidth, percent / 100);\n\t}.bind(this);\n\n\t/**\n\t * Animate from some percent to some other percentage\n\t * @param {number} from Starting percentage\n\t * @param {number} to Final percentage\n\t */\n\tthis.animate = function(from, to) {\n\t\tvar startTime = Date.now();\n\t\toptions.onStart(from, to);\n\t\tvar animation = function() {\n\t\t\tvar process = Math.min(Date.now() - startTime, options.animate.duration);\n\t\t\tvar currentValue = options.easing(this, process, from, to - from, options.animate.duration);\n\t\t\tthis.draw(currentValue);\n\t\t\toptions.onStep(from, to, currentValue);\n\t\t\tif (process >= options.animate.duration) {\n\t\t\t\toptions.onStop(from, to);\n\t\t\t} else {\n\t\t\t\treqAnimationFrame(animation);\n\t\t\t}\n\t\t}.bind(this);\n\n\t\treqAnimationFrame(animation);\n\t}.bind(this);\n};\n\nvar EasyPieChart = function(el, opts) {\n\tvar defaultOptions = {\n\t\tbarColor: '#ef1e25',\n\t\ttrackColor: '#f9f9f9',\n\t\tscaleColor: '#dfe0e0',\n\t\tscaleLength: 5,\n\t\tlineCap: 'round',\n\t\tlineWidth: 3,\n\t\ttrackWidth: undefined,\n\t\tsize: 110,\n\t\trotate: 0,\n\t\tanimate: {\n\t\t\tduration: 1000,\n\t\t\tenabled: true\n\t\t},\n\t\teasing: function (x, t, b, c, d) { // more can be found here: http://gsgd.co.uk/sandbox/jquery/easing/\n\t\t\tt = t / (d/2);\n\t\t\tif (t < 1) {\n\t\t\t\treturn c / 2 * t * t + b;\n\t\t\t}\n\t\t\treturn -c/2 * ((--t)*(t-2) - 1) + b;\n\t\t},\n\t\tonStart: function(from, to) {\n\t\t\treturn;\n\t\t},\n\t\tonStep: function(from, to, currentValue) {\n\t\t\treturn;\n\t\t},\n\t\tonStop: function(from, to) {\n\t\t\treturn;\n\t\t}\n\t};\n\n\t// detect present renderer\n\tif (typeof(CanvasRenderer) !== 'undefined') {\n\t\tdefaultOptions.renderer = CanvasRenderer;\n\t} else if (typeof(SVGRenderer) !== 'undefined') {\n\t\tdefaultOptions.renderer = SVGRenderer;\n\t} else {\n\t\tthrow new Error('Please load either the SVG- or the CanvasRenderer');\n\t}\n\n\tvar options = {};\n\tvar currentValue = 0;\n\n\t/**\n\t * Initialize the plugin by creating the options object and initialize rendering\n\t */\n\tvar init = function() {\n\t\tthis.el = el;\n\t\tthis.options = options;\n\n\t\t// merge user options into default options\n\t\tfor (var i in defaultOptions) {\n\t\t\tif (defaultOptions.hasOwnProperty(i)) {\n\t\t\t\toptions[i] = opts && typeof(opts[i]) !== 'undefined' ? opts[i] : defaultOptions[i];\n\t\t\t\tif (typeof(options[i]) === 'function') {\n\t\t\t\t\toptions[i] = options[i].bind(this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check for jQuery easing\n\t\tif (typeof(options.easing) === 'string' && typeof(jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) {\n\t\t\toptions.easing = jQuery.easing[options.easing];\n\t\t} else {\n\t\t\toptions.easing = defaultOptions.easing;\n\t\t}\n\n\t\t// process earlier animate option to avoid bc breaks\n\t\tif (typeof(options.animate) === 'number') {\n\t\t\toptions.animate = {\n\t\t\t\tduration: options.animate,\n\t\t\t\tenabled: true\n\t\t\t};\n\t\t}\n\n\t\tif (typeof(options.animate) === 'boolean' && !options.animate) {\n\t\t\toptions.animate = {\n\t\t\t\tduration: 1000,\n\t\t\t\tenabled: options.animate\n\t\t\t};\n\t\t}\n\n\t\t// create renderer\n\t\tthis.renderer = new options.renderer(el, options);\n\n\t\t// initial draw\n\t\tthis.renderer.draw(currentValue);\n\n\t\t// initial update\n\t\tif (el.dataset && el.dataset.percent) {\n\t\t\tthis.update(parseFloat(el.dataset.percent));\n\t\t} else if (el.getAttribute && el.getAttribute('data-percent')) {\n\t\t\tthis.update(parseFloat(el.getAttribute('data-percent')));\n\t\t}\n\t}.bind(this);\n\n\t/**\n\t * Update the value of the chart\n\t * @param {number} newValue Number between 0 and 100\n\t * @return {object} Instance of the plugin for method chaining\n\t */\n\tthis.update = function(newValue) {\n\t\tnewValue = parseFloat(newValue);\n\t\tif (options.animate.enabled) {\n\t\t\tthis.renderer.animate(currentValue, newValue);\n\t\t} else {\n\t\t\tthis.renderer.draw(newValue);\n\t\t}\n\t\tcurrentValue = newValue;\n\t\treturn this;\n\t}.bind(this);\n\n\t/**\n\t * Disable animation\n\t * @return {object} Instance of the plugin for method chaining\n\t */\n\tthis.disableAnimation = function() {\n\t\toptions.animate.enabled = false;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Enable animation\n\t * @return {object} Instance of the plugin for method chaining\n\t */\n\tthis.enableAnimation = function() {\n\t\toptions.animate.enabled = true;\n\t\treturn this;\n\t};\n\n\tinit();\n};\n\n$.fn.easyPieChart = function(options) {\n\treturn this.each(function() {\n\t\tvar instanceOptions;\n\n\t\tif (!$.data(this, 'easyPieChart')) {\n\t\t\tinstanceOptions = $.extend({}, options, $(this).data());\n\t\t\t$.data(this, 'easyPieChart', new EasyPieChart(this, instanceOptions));\n\t\t}\n\t});\n};\n\n\n}));\n","/*! version : 4.17.37\n =========================================================\n bootstrap-datetimejs\n https://github.com/Eonasdan/bootstrap-datetimepicker\n Copyright (c) 2015 Jonathan Peterson\n =========================================================\n */\n!function(a){\"use strict\";if(\"function\"==typeof define&&define.amd)define([\"jquery\",\"moment\"],a);else if(\"object\"==typeof exports)a(require(\"jquery\"),require(\"moment\"));else{if(\"undefined\"==typeof jQuery)throw\"bootstrap-datetimepicker requires jQuery to be loaded first\";if(\"undefined\"==typeof moment)throw\"bootstrap-datetimepicker requires Moment.js to be loaded first\";a(jQuery,moment)}}(function(a,b){\"use strict\";if(!b)throw new Error(\"bootstrap-datetimepicker requires Moment.js to be loaded first\");var c=function(c,d){var e,f,g,h,i,j,k,l={},m=!0,n=!1,o=!1,p=0,q=[{clsName:\"days\",navFnc:\"M\",navStep:1},{clsName:\"months\",navFnc:\"y\",navStep:1},{clsName:\"years\",navFnc:\"y\",navStep:10},{clsName:\"decades\",navFnc:\"y\",navStep:100}],r=[\"days\",\"months\",\"years\",\"decades\"],s=[\"top\",\"bottom\",\"auto\"],t=[\"left\",\"right\",\"auto\"],u=[\"default\",\"top\",\"bottom\"],v={up:38,38:\"up\",down:40,40:\"down\",left:37,37:\"left\",right:39,39:\"right\",tab:9,9:\"tab\",escape:27,27:\"escape\",enter:13,13:\"enter\",pageUp:33,33:\"pageUp\",pageDown:34,34:\"pageDown\",shift:16,16:\"shift\",control:17,17:\"control\",space:32,32:\"space\",t:84,84:\"t\",\"delete\":46,46:\"delete\"},w={},x=function(a){var c,e,f,g,h,i=!1;return void 0!==b.tz&&void 0!==d.timeZone&&null!==d.timeZone&&\"\"!==d.timeZone&&(i=!0),void 0===a||null===a?c=i?b().tz(d.timeZone).startOf(\"d\"):b().startOf(\"d\"):i?(e=b().tz(d.timeZone).utcOffset(),f=b(a,j,d.useStrict).utcOffset(),f!==e?(g=b().tz(d.timeZone).format(\"Z\"),h=b(a,j,d.useStrict).format(\"YYYY-MM-DD[T]HH:mm:ss\")+g,c=b(h,j,d.useStrict).tz(d.timeZone)):c=b(a,j,d.useStrict).tz(d.timeZone)):c=b(a,j,d.useStrict),c},y=function(a){if(\"string\"!=typeof a||a.length>1)throw new TypeError(\"isEnabled expects a single character string parameter\");switch(a){case\"y\":return-1!==i.indexOf(\"Y\");case\"M\":return-1!==i.indexOf(\"M\");case\"d\":return-1!==i.toLowerCase().indexOf(\"d\");case\"h\":case\"H\":return-1!==i.toLowerCase().indexOf(\"h\");case\"m\":return-1!==i.indexOf(\"m\");case\"s\":return-1!==i.indexOf(\"s\");default:return!1}},z=function(){return y(\"h\")||y(\"m\")||y(\"s\")},A=function(){return y(\"y\")||y(\"M\")||y(\"d\")},B=function(){var b=a(\"<thead>\").append(a(\"<tr>\").append(a(\"<th>\").addClass(\"prev\").attr(\"data-action\",\"previous\").append(a(\"<span>\").addClass(d.icons.previous))).append(a(\"<th>\").addClass(\"picker-switch\").attr(\"data-action\",\"pickerSwitch\").attr(\"colspan\",d.calendarWeeks?\"6\":\"5\")).append(a(\"<th>\").addClass(\"next\").attr(\"data-action\",\"next\").append(a(\"<span>\").addClass(d.icons.next)))),c=a(\"<tbody>\").append(a(\"<tr>\").append(a(\"<td>\").attr(\"colspan\",d.calendarWeeks?\"8\":\"7\")));return[a(\"<div>\").addClass(\"datepicker-days\").append(a(\"<table>\").addClass(\"table-condensed\").append(b).append(a(\"<tbody>\"))),a(\"<div>\").addClass(\"datepicker-months\").append(a(\"<table>\").addClass(\"table-condensed\").append(b.clone()).append(c.clone())),a(\"<div>\").addClass(\"datepicker-years\").append(a(\"<table>\").addClass(\"table-condensed\").append(b.clone()).append(c.clone())),a(\"<div>\").addClass(\"datepicker-decades\").append(a(\"<table>\").addClass(\"table-condensed\").append(b.clone()).append(c.clone()))]},C=function(){var b=a(\"<tr>\"),c=a(\"<tr>\"),e=a(\"<tr>\");return y(\"h\")&&(b.append(a(\"<td>\").append(a(\"<a>\").attr({href:\"#\",tabindex:\"-1\",title:d.tooltips.incrementHour}).addClass(\"btn\").attr(\"data-action\",\"incrementHours\").append(a(\"<span>\").addClass(d.icons.up)))),c.append(a(\"<td>\").append(a(\"<span>\").addClass(\"timepicker-hour\").attr({\"data-time-component\":\"hours\",title:d.tooltips.pickHour}).attr(\"data-action\",\"showHours\"))),e.append(a(\"<td>\").append(a(\"<a>\").attr({href:\"#\",tabindex:\"-1\",title:d.tooltips.decrementHour}).addClass(\"btn\").attr(\"data-action\",\"decrementHours\").append(a(\"<span>\").addClass(d.icons.down))))),y(\"m\")&&(y(\"h\")&&(b.append(a(\"<td>\").addClass(\"separator\")),c.append(a(\"<td>\").addClass(\"separator\").html(\":\")),e.append(a(\"<td>\").addClass(\"separator\"))),b.append(a(\"<td>\").append(a(\"<a>\").attr({href:\"#\",tabindex:\"-1\",title:d.tooltips.incrementMinute}).addClass(\"btn\").attr(\"data-action\",\"incrementMinutes\").append(a(\"<span>\").addClass(d.icons.up)))),c.append(a(\"<td>\").append(a(\"<span>\").addClass(\"timepicker-minute\").attr({\"data-time-component\":\"minutes\",title:d.tooltips.pickMinute}).attr(\"data-action\",\"showMinutes\"))),e.append(a(\"<td>\").append(a(\"<a>\").attr({href:\"#\",tabindex:\"-1\",title:d.tooltips.decrementMinute}).addClass(\"btn\").attr(\"data-action\",\"decrementMinutes\").append(a(\"<span>\").addClass(d.icons.down))))),y(\"s\")&&(y(\"m\")&&(b.append(a(\"<td>\").addClass(\"separator\")),c.append(a(\"<td>\").addClass(\"separator\").html(\":\")),e.append(a(\"<td>\").addClass(\"separator\"))),b.append(a(\"<td>\").append(a(\"<a>\").attr({href:\"#\",tabindex:\"-1\",title:d.tooltips.incrementSecond}).addClass(\"btn\").attr(\"data-action\",\"incrementSeconds\").append(a(\"<span>\").addClass(d.icons.up)))),c.append(a(\"<td>\").append(a(\"<span>\").addClass(\"timepicker-second\").attr({\"data-time-component\":\"seconds\",title:d.tooltips.pickSecond}).attr(\"data-action\",\"showSeconds\"))),e.append(a(\"<td>\").append(a(\"<a>\").attr({href:\"#\",tabindex:\"-1\",title:d.tooltips.decrementSecond}).addClass(\"btn\").attr(\"data-action\",\"decrementSeconds\").append(a(\"<span>\").addClass(d.icons.down))))),h||(b.append(a(\"<td>\").addClass(\"separator\")),c.append(a(\"<td>\").append(a(\"<button>\").addClass(\"btn btn-primary\").attr({\"data-action\":\"togglePeriod\",tabindex:\"-1\",title:d.tooltips.togglePeriod}))),e.append(a(\"<td>\").addClass(\"separator\"))),a(\"<div>\").addClass(\"timepicker-picker\").append(a(\"<table>\").addClass(\"table-condensed\").append([b,c,e]))},D=function(){var b=a(\"<div>\").addClass(\"timepicker-hours\").append(a(\"<table>\").addClass(\"table-condensed\")),c=a(\"<div>\").addClass(\"timepicker-minutes\").append(a(\"<table>\").addClass(\"table-condensed\")),d=a(\"<div>\").addClass(\"timepicker-seconds\").append(a(\"<table>\").addClass(\"table-condensed\")),e=[C()];return y(\"h\")&&e.push(b),y(\"m\")&&e.push(c),y(\"s\")&&e.push(d),e},E=function(){var b=[];return d.showTodayButton&&b.push(a(\"<td>\").append(a(\"<a>\").attr({\"data-action\":\"today\",title:d.tooltips.today}).append(a(\"<span>\").addClass(d.icons.today)))),!d.sideBySide&&A()&&z()&&b.push(a(\"<td>\").append(a(\"<a>\").attr({\"data-action\":\"togglePicker\",title:d.tooltips.selectTime}).append(a(\"<span>\").addClass(d.icons.time)))),d.showClear&&b.push(a(\"<td>\").append(a(\"<a>\").attr({\"data-action\":\"clear\",title:d.tooltips.clear}).append(a(\"<span>\").addClass(d.icons.clear)))),d.showClose&&b.push(a(\"<td>\").append(a(\"<a>\").attr({\"data-action\":\"close\",title:d.tooltips.close}).append(a(\"<span>\").addClass(d.icons.close)))),a(\"<table>\").addClass(\"table-condensed\").append(a(\"<tbody>\").append(a(\"<tr>\").append(b)))},F=function(){var b=a(\"<div>\").addClass(\"bootstrap-datetimepicker-widget dropdown-menu\"),c=a(\"<div>\").addClass(\"datepicker\").append(B()),e=a(\"<div>\").addClass(\"timepicker\").append(D()),f=a(\"<ul>\").addClass(\"list-unstyled\"),g=a(\"<li>\").addClass(\"picker-switch\"+(d.collapse?\" accordion-toggle\":\"\")).append(E());return d.inline&&b.removeClass(\"dropdown-menu\"),h&&b.addClass(\"usetwentyfour\"),y(\"s\")&&!h&&b.addClass(\"wider\"),d.sideBySide&&A()&&z()?(b.addClass(\"timepicker-sbs\"),\"top\"===d.toolbarPlacement&&b.append(g),b.append(a(\"<div>\").addClass(\"row\").append(c.addClass(\"col-md-6\")).append(e.addClass(\"col-md-6\"))),\"bottom\"===d.toolbarPlacement&&b.append(g),b):(\"top\"===d.toolbarPlacement&&f.append(g),A()&&f.append(a(\"<li>\").addClass(d.collapse&&z()?\"collapse in\":\"\").append(c)),\"default\"===d.toolbarPlacement&&f.append(g),z()&&f.append(a(\"<li>\").addClass(d.collapse&&A()?\"collapse\":\"\").append(e)),\"bottom\"===d.toolbarPlacement&&f.append(g),b.append(f))},G=function(){var b,e={};return b=c.is(\"input\")||d.inline?c.data():c.find(\"input\").data(),b.dateOptions&&b.dateOptions instanceof Object&&(e=a.extend(!0,e,b.dateOptions)),a.each(d,function(a){var c=\"date\"+a.charAt(0).toUpperCase()+a.slice(1);void 0!==b[c]&&(e[a]=b[c])}),e},H=function(){var b,e=(n||c).position(),f=(n||c).offset(),g=d.widgetPositioning.vertical,h=d.widgetPositioning.horizontal;if(d.widgetParent)b=d.widgetParent.append(o);else if(c.is(\"input\"))b=c.after(o).parent();else{if(d.inline)return void(b=c.append(o));b=c,c.children().first().after(o)}if(\"auto\"===g&&(g=f.top+1.5*o.height()>=a(window).height()+a(window).scrollTop()&&o.height()+c.outerHeight()<f.top?\"top\":\"bottom\"),\"auto\"===h&&(h=b.width()<f.left+o.outerWidth()/2&&f.left+o.outerWidth()>a(window).width()?\"right\":\"left\"),\"top\"===g?o.addClass(\"top\").removeClass(\"bottom\"):o.addClass(\"bottom\").removeClass(\"top\"),\"right\"===h?o.addClass(\"pull-right\"):o.removeClass(\"pull-right\"),\"relative\"!==b.css(\"position\")&&(b=b.parents().filter(function(){return\"relative\"===a(this).css(\"position\")}).first()),0===b.length)throw new Error(\"datetimepicker component should be placed within a relative positioned container\");o.css({top:\"top\"===g?\"auto\":e.top+c.outerHeight(),bottom:\"top\"===g?e.top+c.outerHeight():\"auto\",left:\"left\"===h?b===c?0:e.left:\"auto\",right:\"left\"===h?\"auto\":b.outerWidth()-c.outerWidth()-(b===c?0:e.left)})},I=function(a){\"dp.change\"===a.type&&(a.date&&a.date.isSame(a.oldDate)||!a.date&&!a.oldDate)||c.trigger(a)},J=function(a){\"y\"===a&&(a=\"YYYY\"),I({type:\"dp.update\",change:a,viewDate:f.clone()})},K=function(a){o&&(a&&(k=Math.max(p,Math.min(3,k+a))),o.find(\".datepicker > div\").hide().filter(\".datepicker-\"+q[k].clsName).show())},L=function(){var b=a(\"<tr>\"),c=f.clone().startOf(\"w\").startOf(\"d\");for(d.calendarWeeks===!0&&b.append(a(\"<th>\").addClass(\"cw\").text(\"#\"));c.isBefore(f.clone().endOf(\"w\"));)b.append(a(\"<th>\").addClass(\"dow\").text(c.format(\"dd\"))),c.add(1,\"d\");o.find(\".datepicker-days thead\").append(b)},M=function(a){return d.disabledDates[a.format(\"YYYY-MM-DD\")]===!0},N=function(a){return d.enabledDates[a.format(\"YYYY-MM-DD\")]===!0},O=function(a){return d.disabledHours[a.format(\"H\")]===!0},P=function(a){return d.enabledHours[a.format(\"H\")]===!0},Q=function(b,c){if(!b.isValid())return!1;if(d.disabledDates&&\"d\"===c&&M(b))return!1;if(d.enabledDates&&\"d\"===c&&!N(b))return!1;if(d.minDate&&b.isBefore(d.minDate,c))return!1;if(d.maxDate&&b.isAfter(d.maxDate,c))return!1;if(d.daysOfWeekDisabled&&\"d\"===c&&-1!==d.daysOfWeekDisabled.indexOf(b.day()))return!1;if(d.disabledHours&&(\"h\"===c||\"m\"===c||\"s\"===c)&&O(b))return!1;if(d.enabledHours&&(\"h\"===c||\"m\"===c||\"s\"===c)&&!P(b))return!1;if(d.disabledTimeIntervals&&(\"h\"===c||\"m\"===c||\"s\"===c)){var e=!1;if(a.each(d.disabledTimeIntervals,function(){return b.isBetween(this[0],this[1])?(e=!0,!1):void 0}),e)return!1}return!0},R=function(){for(var b=[],c=f.clone().startOf(\"y\").startOf(\"d\");c.isSame(f,\"y\");)b.push(a(\"<span>\").attr(\"data-action\",\"selectMonth\").addClass(\"month\").text(c.format(\"MMM\"))),c.add(1,\"M\");o.find(\".datepicker-months td\").empty().append(b)},S=function(){var b=o.find(\".datepicker-months\"),c=b.find(\"th\"),g=b.find(\"tbody\").find(\"span\");c.eq(0).find(\"span\").attr(\"title\",d.tooltips.prevYear),c.eq(1).attr(\"title\",d.tooltips.selectYear),c.eq(2).find(\"span\").attr(\"title\",d.tooltips.nextYear),b.find(\".disabled\").removeClass(\"disabled\"),Q(f.clone().subtract(1,\"y\"),\"y\")||c.eq(0).addClass(\"disabled\"),c.eq(1).text(f.year()),Q(f.clone().add(1,\"y\"),\"y\")||c.eq(2).addClass(\"disabled\"),g.removeClass(\"active\"),e.isSame(f,\"y\")&&!m&&g.eq(e.month()).addClass(\"active\"),g.each(function(b){Q(f.clone().month(b),\"M\")||a(this).addClass(\"disabled\")})},T=function(){var a=o.find(\".datepicker-years\"),b=a.find(\"th\"),c=f.clone().subtract(5,\"y\"),g=f.clone().add(6,\"y\"),h=\"\";for(b.eq(0).find(\"span\").attr(\"title\",d.tooltips.prevDecade),b.eq(1).attr(\"title\",d.tooltips.selectDecade),b.eq(2).find(\"span\").attr(\"title\",d.tooltips.nextDecade),a.find(\".disabled\").removeClass(\"disabled\"),d.minDate&&d.minDate.isAfter(c,\"y\")&&b.eq(0).addClass(\"disabled\"),b.eq(1).text(c.year()+\"-\"+g.year()),d.maxDate&&d.maxDate.isBefore(g,\"y\")&&b.eq(2).addClass(\"disabled\");!c.isAfter(g,\"y\");)h+='<span data-action=\"selectYear\" class=\"year'+(c.isSame(e,\"y\")&&!m?\" active\":\"\")+(Q(c,\"y\")?\"\":\" disabled\")+'\">'+c.year()+\"</span>\",c.add(1,\"y\");a.find(\"td\").html(h)},U=function(){var a=o.find(\".datepicker-decades\"),c=a.find(\"th\"),g=b({y:f.year()-f.year()%100-1}),h=g.clone().add(100,\"y\"),i=g.clone(),j=\"\";for(c.eq(0).find(\"span\").attr(\"title\",d.tooltips.prevCentury),c.eq(2).find(\"span\").attr(\"title\",d.tooltips.nextCentury),a.find(\".disabled\").removeClass(\"disabled\"),(g.isSame(b({y:1900}))||d.minDate&&d.minDate.isAfter(g,\"y\"))&&c.eq(0).addClass(\"disabled\"),c.eq(1).text(g.year()+\"-\"+h.year()),(g.isSame(b({y:2e3}))||d.maxDate&&d.maxDate.isBefore(h,\"y\"))&&c.eq(2).addClass(\"disabled\");!g.isAfter(h,\"y\");)j+='<span data-action=\"selectDecade\" class=\"decade'+(g.isSame(e,\"y\")?\" active\":\"\")+(Q(g,\"y\")?\"\":\" disabled\")+'\" data-selection=\"'+(g.year()+6)+'\">'+(g.year()+1)+\" - \"+(g.year()+12)+\"</span>\",g.add(12,\"y\");j+=\"<span></span><span></span><span></span>\",a.find(\"td\").html(j),c.eq(1).text(i.year()+1+\"-\"+g.year())},V=function(){var b,c,g,h,i=o.find(\".datepicker-days\"),j=i.find(\"th\"),k=[];if(A()){for(j.eq(0).find(\"span\").attr(\"title\",d.tooltips.prevMonth),j.eq(1).attr(\"title\",d.tooltips.selectMonth),j.eq(2).find(\"span\").attr(\"title\",d.tooltips.nextMonth),i.find(\".disabled\").removeClass(\"disabled\"),j.eq(1).text(f.format(d.dayViewHeaderFormat)),Q(f.clone().subtract(1,\"M\"),\"M\")||j.eq(0).addClass(\"disabled\"),Q(f.clone().add(1,\"M\"),\"M\")||j.eq(2).addClass(\"disabled\"),b=f.clone().startOf(\"M\").startOf(\"w\").startOf(\"d\"),h=0;42>h;h++)0===b.weekday()&&(c=a(\"<tr>\"),d.calendarWeeks&&c.append('<td class=\"cw\">'+b.week()+\"</td>\"),k.push(c)),g=\"\",b.isBefore(f,\"M\")&&(g+=\" old\"),b.isAfter(f,\"M\")&&(g+=\" new\"),b.isSame(e,\"d\")&&!m&&(g+=\" active\"),Q(b,\"d\")||(g+=\" disabled\"),b.isSame(x(),\"d\")&&(g+=\" today\"),(0===b.day()||6===b.day())&&(g+=\" weekend\"),c.append('<td data-action=\"selectDay\" data-day=\"'+b.format(\"L\")+'\" class=\"day'+g+'\">'+b.date()+\"</td>\"),b.add(1,\"d\");i.find(\"tbody\").empty().append(k),S(),T(),U()}},W=function(){var b=o.find(\".timepicker-hours table\"),c=f.clone().startOf(\"d\"),d=[],e=a(\"<tr>\");for(f.hour()>11&&!h&&c.hour(12);c.isSame(f,\"d\")&&(h||f.hour()<12&&c.hour()<12||f.hour()>11);)c.hour()%4===0&&(e=a(\"<tr>\"),d.push(e)),e.append('<td data-action=\"selectHour\" class=\"hour'+(Q(c,\"h\")?\"\":\" disabled\")+'\">'+c.format(h?\"HH\":\"hh\")+\"</td>\"),c.add(1,\"h\");b.empty().append(d)},X=function(){for(var b=o.find(\".timepicker-minutes table\"),c=f.clone().startOf(\"h\"),e=[],g=a(\"<tr>\"),h=1===d.stepping?5:d.stepping;f.isSame(c,\"h\");)c.minute()%(4*h)===0&&(g=a(\"<tr>\"),e.push(g)),g.append('<td data-action=\"selectMinute\" class=\"minute'+(Q(c,\"m\")?\"\":\" disabled\")+'\">'+c.format(\"mm\")+\"</td>\"),c.add(h,\"m\");b.empty().append(e)},Y=function(){for(var b=o.find(\".timepicker-seconds table\"),c=f.clone().startOf(\"m\"),d=[],e=a(\"<tr>\");f.isSame(c,\"m\");)c.second()%20===0&&(e=a(\"<tr>\"),d.push(e)),e.append('<td data-action=\"selectSecond\" class=\"second'+(Q(c,\"s\")?\"\":\" disabled\")+'\">'+c.format(\"ss\")+\"</td>\"),c.add(5,\"s\");b.empty().append(d)},Z=function(){var a,b,c=o.find(\".timepicker span[data-time-component]\");h||(a=o.find(\".timepicker [data-action=togglePeriod]\"),b=e.clone().add(e.hours()>=12?-12:12,\"h\"),a.text(e.format(\"A\")),Q(b,\"h\")?a.removeClass(\"disabled\"):a.addClass(\"disabled\")),c.filter(\"[data-time-component=hours]\").text(e.format(h?\"HH\":\"hh\")),c.filter(\"[data-time-component=minutes]\").text(e.format(\"mm\")),c.filter(\"[data-time-component=seconds]\").text(e.format(\"ss\")),W(),X(),Y()},$=function(){o&&(V(),Z())},_=function(a){var b=m?null:e;return a?(a=a.clone().locale(d.locale),1!==d.stepping&&a.minutes(Math.round(a.minutes()/d.stepping)*d.stepping%60).seconds(0),void(Q(a)?(e=a,f=e.clone(),g.val(e.format(i)),c.data(\"date\",e.format(i)),m=!1,$(),I({type:\"dp.change\",date:e.clone(),oldDate:b})):(d.keepInvalid||g.val(m?\"\":e.format(i)),I({type:\"dp.error\",date:a})))):(m=!0,g.val(\"\"),c.data(\"date\",\"\"),I({type:\"dp.change\",date:!1,oldDate:b}),void $())},aa=function(){var b=!1;return o?(o.find(\".collapse\").each(function(){var c=a(this).data(\"collapse\");return c&&c.transitioning?(b=!0,!1):!0}),b?l:(n&&n.hasClass(\"btn\")&&n.toggleClass(\"active\"),o.hide(),a(window).off(\"resize\",H),o.off(\"click\",\"[data-action]\"),o.off(\"mousedown\",!1),o.remove(),o=!1,I({type:\"dp.hide\",date:e.clone()}),g.blur(),l)):l},ba=function(){_(null)},ca={next:function(){var a=q[k].navFnc;f.add(q[k].navStep,a),V(),J(a)},previous:function(){var a=q[k].navFnc;f.subtract(q[k].navStep,a),V(),J(a)},pickerSwitch:function(){K(1)},selectMonth:function(b){var c=a(b.target).closest(\"tbody\").find(\"span\").index(a(b.target));f.month(c),k===p?(_(e.clone().year(f.year()).month(f.month())),d.inline||aa()):(K(-1),V()),J(\"M\")},selectYear:function(b){var c=parseInt(a(b.target).text(),10)||0;f.year(c),k===p?(_(e.clone().year(f.year())),d.inline||aa()):(K(-1),V()),J(\"YYYY\")},selectDecade:function(b){var c=parseInt(a(b.target).data(\"selection\"),10)||0;f.year(c),k===p?(_(e.clone().year(f.year())),d.inline||aa()):(K(-1),V()),J(\"YYYY\")},selectDay:function(b){var c=f.clone();a(b.target).is(\".old\")&&c.subtract(1,\"M\"),a(b.target).is(\".new\")&&c.add(1,\"M\"),_(c.date(parseInt(a(b.target).text(),10))),z()||d.keepOpen||d.inline||aa()},incrementHours:function(){var a=e.clone().add(1,\"h\");Q(a,\"h\")&&_(a)},incrementMinutes:function(){var a=e.clone().add(d.stepping,\"m\");Q(a,\"m\")&&_(a)},incrementSeconds:function(){var a=e.clone().add(1,\"s\");Q(a,\"s\")&&_(a)},decrementHours:function(){var a=e.clone().subtract(1,\"h\");Q(a,\"h\")&&_(a)},decrementMinutes:function(){var a=e.clone().subtract(d.stepping,\"m\");Q(a,\"m\")&&_(a)},decrementSeconds:function(){var a=e.clone().subtract(1,\"s\");Q(a,\"s\")&&_(a)},togglePeriod:function(){_(e.clone().add(e.hours()>=12?-12:12,\"h\"))},togglePicker:function(b){var c,e=a(b.target),f=e.closest(\"ul\"),g=f.find(\".in\"),h=f.find(\".collapse:not(.in)\");if(g&&g.length){if(c=g.data(\"collapse\"),c&&c.transitioning)return;g.collapse?(g.collapse(\"hide\"),h.collapse(\"show\")):(g.removeClass(\"in\"),h.addClass(\"in\")),e.is(\"span\")?e.toggleClass(d.icons.time+\" \"+d.icons.date):e.find(\"span\").toggleClass(d.icons.time+\" \"+d.icons.date)}},showPicker:function(){o.find(\".timepicker > div:not(.timepicker-picker)\").hide(),o.find(\".timepicker .timepicker-picker\").show()},showHours:function(){o.find(\".timepicker .timepicker-picker\").hide(),o.find(\".timepicker .timepicker-hours\").show()},showMinutes:function(){o.find(\".timepicker .timepicker-picker\").hide(),o.find(\".timepicker .timepicker-minutes\").show()},showSeconds:function(){o.find(\".timepicker .timepicker-picker\").hide(),o.find(\".timepicker .timepicker-seconds\").show()},selectHour:function(b){var c=parseInt(a(b.target).text(),10);h||(e.hours()>=12?12!==c&&(c+=12):12===c&&(c=0)),_(e.clone().hours(c)),ca.showPicker.call(l)},selectMinute:function(b){_(e.clone().minutes(parseInt(a(b.target).text(),10))),ca.showPicker.call(l)},selectSecond:function(b){_(e.clone().seconds(parseInt(a(b.target).text(),10))),ca.showPicker.call(l)},clear:ba,today:function(){var a=x();Q(a,\"d\")&&_(a)},close:aa},da=function(b){return a(b.currentTarget).is(\".disabled\")?!1:(ca[a(b.currentTarget).data(\"action\")].apply(l,arguments),!1)},ea=function(){var b,c={year:function(a){return a.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(a){return a.date(1).hours(0).seconds(0).minutes(0)},day:function(a){return a.hours(0).seconds(0).minutes(0)},hour:function(a){return a.seconds(0).minutes(0)},minute:function(a){return a.seconds(0)}};return g.prop(\"disabled\")||!d.ignoreReadonly&&g.prop(\"readonly\")||o?l:(void 0!==g.val()&&0!==g.val().trim().length?_(ga(g.val().trim())):d.useCurrent&&m&&(g.is(\"input\")&&0===g.val().trim().length||d.inline)&&(b=x(),\"string\"==typeof d.useCurrent&&(b=c[d.useCurrent](b)),_(b)),o=F(),L(),R(),o.find(\".timepicker-hours\").hide(),o.find(\".timepicker-minutes\").hide(),o.find(\".timepicker-seconds\").hide(),$(),K(),a(window).on(\"resize\",H),o.on(\"click\",\"[data-action]\",da),o.on(\"mousedown\",!1),n&&n.hasClass(\"btn\")&&n.toggleClass(\"active\"),o.show(),H(),d.focusOnShow&&!g.is(\":focus\")&&g.focus(),I({type:\"dp.show\"}),l)},fa=function(){return o?aa():ea()},ga=function(a){return a=void 0===d.parseInputDate?b.isMoment(a)||a instanceof Date?b(a):x(a):d.parseInputDate(a),a.locale(d.locale),a},ha=function(a){var b,c,e,f,g=null,h=[],i={},j=a.which,k=\"p\";w[j]=k;for(b in w)w.hasOwnProperty(b)&&w[b]===k&&(h.push(b),parseInt(b,10)!==j&&(i[b]=!0));for(b in d.keyBinds)if(d.keyBinds.hasOwnProperty(b)&&\"function\"==typeof d.keyBinds[b]&&(e=b.split(\" \"),e.length===h.length&&v[j]===e[e.length-1])){for(f=!0,c=e.length-2;c>=0;c--)if(!(v[e[c]]in i)){f=!1;break}if(f){g=d.keyBinds[b];break}}g&&(g.call(l,o),a.stopPropagation(),a.preventDefault())},ia=function(a){w[a.which]=\"r\",a.stopPropagation(),a.preventDefault()},ja=function(b){var c=a(b.target).val().trim(),d=c?ga(c):null;return _(d),b.stopImmediatePropagation(),!1},ka=function(){g.on({change:ja,blur:d.debug?\"\":aa,keydown:ha,keyup:ia,focus:d.allowInputToggle?ea:\"\"}),c.is(\"input\")?g.on({focus:ea}):n&&(n.on(\"click\",fa),n.on(\"mousedown\",!1))},la=function(){g.off({change:ja,blur:blur,keydown:ha,keyup:ia,focus:d.allowInputToggle?aa:\"\"}),c.is(\"input\")?g.off({focus:ea}):n&&(n.off(\"click\",fa),n.off(\"mousedown\",!1))},ma=function(b){var c={};return a.each(b,function(){var a=ga(this);a.isValid()&&(c[a.format(\"YYYY-MM-DD\")]=!0)}),Object.keys(c).length?c:!1},na=function(b){var c={};return a.each(b,function(){c[this]=!0}),Object.keys(c).length?c:!1},oa=function(){var a=d.format||\"L LT\";i=a.replace(/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){var b=e.localeData().longDateFormat(a)||a;return b.replace(/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){return e.localeData().longDateFormat(a)||a})}),j=d.extraFormats?d.extraFormats.slice():[],j.indexOf(a)<0&&j.indexOf(i)<0&&j.push(i),h=i.toLowerCase().indexOf(\"a\")<1&&i.replace(/\\[.*?\\]/g,\"\").indexOf(\"h\")<1,y(\"y\")&&(p=2),y(\"M\")&&(p=1),y(\"d\")&&(p=0),k=Math.max(p,k),m||_(e)};if(l.destroy=function(){aa(),la(),c.removeData(\"DateTimePicker\"),c.removeData(\"date\")},l.toggle=fa,l.show=ea,l.hide=aa,l.disable=function(){return aa(),n&&n.hasClass(\"btn\")&&n.addClass(\"disabled\"),g.prop(\"disabled\",!0),l},l.enable=function(){return n&&n.hasClass(\"btn\")&&n.removeClass(\"disabled\"),g.prop(\"disabled\",!1),l},l.ignoreReadonly=function(a){if(0===arguments.length)return d.ignoreReadonly;if(\"boolean\"!=typeof a)throw new TypeError(\"ignoreReadonly () expects a boolean parameter\");return d.ignoreReadonly=a,l},l.options=function(b){if(0===arguments.length)return a.extend(!0,{},d);if(!(b instanceof Object))throw new TypeError(\"options() options parameter should be an object\");return a.extend(!0,d,b),a.each(d,function(a,b){if(void 0===l[a])throw new TypeError(\"option \"+a+\" is not recognized!\");l[a](b)}),l},l.date=function(a){if(0===arguments.length)return m?null:e.clone();if(!(null===a||\"string\"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError(\"date() parameter must be one of [null, string, moment or Date]\");return _(null===a?null:ga(a)),l},l.format=function(a){if(0===arguments.length)return d.format;if(\"string\"!=typeof a&&(\"boolean\"!=typeof a||a!==!1))throw new TypeError(\"format() expects a sting or boolean:false parameter \"+a);return d.format=a,i&&oa(),l},l.timeZone=function(a){return 0===arguments.length?d.timeZone:(d.timeZone=a,l)},l.dayViewHeaderFormat=function(a){if(0===arguments.length)return d.dayViewHeaderFormat;if(\"string\"!=typeof a)throw new TypeError(\"dayViewHeaderFormat() expects a string parameter\");return d.dayViewHeaderFormat=a,l},l.extraFormats=function(a){if(0===arguments.length)return d.extraFormats;if(a!==!1&&!(a instanceof Array))throw new TypeError(\"extraFormats() expects an array or false parameter\");return d.extraFormats=a,j&&oa(),l},l.disabledDates=function(b){if(0===arguments.length)return d.disabledDates?a.extend({},d.disabledDates):d.disabledDates;if(!b)return d.disabledDates=!1,$(),l;if(!(b instanceof Array))throw new TypeError(\"disabledDates() expects an array parameter\");return d.disabledDates=ma(b),d.enabledDates=!1,$(),l},l.enabledDates=function(b){if(0===arguments.length)return d.enabledDates?a.extend({},d.enabledDates):d.enabledDates;if(!b)return d.enabledDates=!1,$(),l;if(!(b instanceof Array))throw new TypeError(\"enabledDates() expects an array parameter\");return d.enabledDates=ma(b),d.disabledDates=!1,$(),l},l.daysOfWeekDisabled=function(a){if(0===arguments.length)return d.daysOfWeekDisabled.splice(0);if(\"boolean\"==typeof a&&!a)return d.daysOfWeekDisabled=!1,$(),l;if(!(a instanceof Array))throw new TypeError(\"daysOfWeekDisabled() expects an array parameter\");if(d.daysOfWeekDisabled=a.reduce(function(a,b){return b=parseInt(b,10),b>6||0>b||isNaN(b)?a:(-1===a.indexOf(b)&&a.push(b),a)},[]).sort(),d.useCurrent&&!d.keepInvalid){for(var b=0;!Q(e,\"d\");){if(e.add(1,\"d\"),7===b)throw\"Tried 7 times to find a valid date\";b++}_(e)}return $(),l},l.maxDate=function(a){if(0===arguments.length)return d.maxDate?d.maxDate.clone():d.maxDate;if(\"boolean\"==typeof a&&a===!1)return d.maxDate=!1,$(),l;\"string\"==typeof a&&(\"now\"===a||\"moment\"===a)&&(a=x());var b=ga(a);if(!b.isValid())throw new TypeError(\"maxDate() Could not parse date parameter: \"+a);if(d.minDate&&b.isBefore(d.minDate))throw new TypeError(\"maxDate() date parameter is before options.minDate: \"+b.format(i));return d.maxDate=b,d.useCurrent&&!d.keepInvalid&&e.isAfter(a)&&_(d.maxDate),f.isAfter(b)&&(f=b.clone().subtract(d.stepping,\"m\")),$(),l},l.minDate=function(a){if(0===arguments.length)return d.minDate?d.minDate.clone():d.minDate;if(\"boolean\"==typeof a&&a===!1)return d.minDate=!1,$(),l;\"string\"==typeof a&&(\"now\"===a||\"moment\"===a)&&(a=x());var b=ga(a);if(!b.isValid())throw new TypeError(\"minDate() Could not parse date parameter: \"+a);if(d.maxDate&&b.isAfter(d.maxDate))throw new TypeError(\"minDate() date parameter is after options.maxDate: \"+b.format(i));return d.minDate=b,d.useCurrent&&!d.keepInvalid&&e.isBefore(a)&&_(d.minDate),f.isBefore(b)&&(f=b.clone().add(d.stepping,\"m\")),$(),l},l.defaultDate=function(a){if(0===arguments.length)return d.defaultDate?d.defaultDate.clone():d.defaultDate;if(!a)return d.defaultDate=!1,l;\"string\"==typeof a&&(\"now\"===a||\"moment\"===a)&&(a=x());var b=ga(a);if(!b.isValid())throw new TypeError(\"defaultDate() Could not parse date parameter: \"+a);if(!Q(b))throw new TypeError(\"defaultDate() date passed is invalid according to component setup validations\");return d.defaultDate=b,(d.defaultDate&&d.inline||\"\"===g.val().trim())&&_(d.defaultDate),l},l.locale=function(a){if(0===arguments.length)return d.locale;if(!b.localeData(a))throw new TypeError(\"locale() locale \"+a+\" is not loaded from moment locales!\");return d.locale=a,e.locale(d.locale),f.locale(d.locale),i&&oa(),o&&(aa(),ea()),l},l.stepping=function(a){return 0===arguments.length?d.stepping:(a=parseInt(a,10),(isNaN(a)||1>a)&&(a=1),d.stepping=a,l)},l.useCurrent=function(a){var b=[\"year\",\"month\",\"day\",\"hour\",\"minute\"];if(0===arguments.length)return d.useCurrent;if(\"boolean\"!=typeof a&&\"string\"!=typeof a)throw new TypeError(\"useCurrent() expects a boolean or string parameter\");if(\"string\"==typeof a&&-1===b.indexOf(a.toLowerCase()))throw new TypeError(\"useCurrent() expects a string parameter of \"+b.join(\", \"));return d.useCurrent=a,l},l.collapse=function(a){if(0===arguments.length)return d.collapse;if(\"boolean\"!=typeof a)throw new TypeError(\"collapse() expects a boolean parameter\");return d.collapse===a?l:(d.collapse=a,o&&(aa(),ea()),l)},l.icons=function(b){if(0===arguments.length)return a.extend({},d.icons);if(!(b instanceof Object))throw new TypeError(\"icons() expects parameter to be an Object\");return a.extend(d.icons,b),o&&(aa(),ea()),l},l.tooltips=function(b){if(0===arguments.length)return a.extend({},d.tooltips);if(!(b instanceof Object))throw new TypeError(\"tooltips() expects parameter to be an Object\");return a.extend(d.tooltips,b),o&&(aa(),ea()),l},l.useStrict=function(a){if(0===arguments.length)return d.useStrict;if(\"boolean\"!=typeof a)throw new TypeError(\"useStrict() expects a boolean parameter\");return d.useStrict=a,l},l.sideBySide=function(a){if(0===arguments.length)return d.sideBySide;if(\"boolean\"!=typeof a)throw new TypeError(\"sideBySide() expects a boolean parameter\");return d.sideBySide=a,o&&(aa(),ea()),l},l.viewMode=function(a){if(0===arguments.length)return d.viewMode;if(\"string\"!=typeof a)throw new TypeError(\"viewMode() expects a string parameter\");if(-1===r.indexOf(a))throw new TypeError(\"viewMode() parameter must be one of (\"+r.join(\", \")+\") value\");return d.viewMode=a,k=Math.max(r.indexOf(a),p),K(),l},l.toolbarPlacement=function(a){if(0===arguments.length)return d.toolbarPlacement;if(\"string\"!=typeof a)throw new TypeError(\"toolbarPlacement() expects a string parameter\");if(-1===u.indexOf(a))throw new TypeError(\"toolbarPlacement() parameter must be one of (\"+u.join(\", \")+\") value\");return d.toolbarPlacement=a,o&&(aa(),ea()),l},l.widgetPositioning=function(b){if(0===arguments.length)return a.extend({},d.widgetPositioning);if(\"[object Object]\"!=={}.toString.call(b))throw new TypeError(\"widgetPositioning() expects an object variable\");if(b.horizontal){if(\"string\"!=typeof b.horizontal)throw new TypeError(\"widgetPositioning() horizontal variable must be a string\");if(b.horizontal=b.horizontal.toLowerCase(),-1===t.indexOf(b.horizontal))throw new TypeError(\"widgetPositioning() expects horizontal parameter to be one of (\"+t.join(\", \")+\")\");d.widgetPositioning.horizontal=b.horizontal}if(b.vertical){if(\"string\"!=typeof b.vertical)throw new TypeError(\"widgetPositioning() vertical variable must be a string\");if(b.vertical=b.vertical.toLowerCase(),-1===s.indexOf(b.vertical))throw new TypeError(\"widgetPositioning() expects vertical parameter to be one of (\"+s.join(\", \")+\")\");d.widgetPositioning.vertical=b.vertical}return $(),l},l.calendarWeeks=function(a){if(0===arguments.length)return d.calendarWeeks;if(\"boolean\"!=typeof a)throw new TypeError(\"calendarWeeks() expects parameter to be a boolean value\");return d.calendarWeeks=a,$(),l},l.showTodayButton=function(a){if(0===arguments.length)return d.showTodayButton;if(\"boolean\"!=typeof a)throw new TypeError(\"showTodayButton() expects a boolean parameter\");return d.showTodayButton=a,o&&(aa(),ea()),l},l.showClear=function(a){if(0===arguments.length)return d.showClear;if(\"boolean\"!=typeof a)throw new TypeError(\"showClear() expects a boolean parameter\");return d.showClear=a,o&&(aa(),ea()),l},l.widgetParent=function(b){if(0===arguments.length)return d.widgetParent;if(\"string\"==typeof b&&(b=a(b)),null!==b&&\"string\"!=typeof b&&!(b instanceof a))throw new TypeError(\"widgetParent() expects a string or a jQuery object parameter\");return d.widgetParent=b,o&&(aa(),ea()),l},l.keepOpen=function(a){if(0===arguments.length)return d.keepOpen;if(\"boolean\"!=typeof a)throw new TypeError(\"keepOpen() expects a boolean parameter\");return d.keepOpen=a,l},l.focusOnShow=function(a){if(0===arguments.length)return d.focusOnShow;if(\"boolean\"!=typeof a)throw new TypeError(\"focusOnShow() expects a boolean parameter\");return d.focusOnShow=a,l},l.inline=function(a){if(0===arguments.length)return d.inline;if(\"boolean\"!=typeof a)throw new TypeError(\"inline() expects a boolean parameter\");return d.inline=a,l},l.clear=function(){return ba(),l},l.keyBinds=function(a){return d.keyBinds=a,l},l.getMoment=function(a){return x(a)},l.debug=function(a){if(\"boolean\"!=typeof a)throw new TypeError(\"debug() expects a boolean parameter\");return d.debug=a,l},l.allowInputToggle=function(a){if(0===arguments.length)return d.allowInputToggle;if(\"boolean\"!=typeof a)throw new TypeError(\"allowInputToggle() expects a boolean parameter\");return d.allowInputToggle=a,l},l.showClose=function(a){if(0===arguments.length)return d.showClose;if(\"boolean\"!=typeof a)throw new TypeError(\"showClose() expects a boolean parameter\");return d.showClose=a,l},l.keepInvalid=function(a){if(0===arguments.length)return d.keepInvalid;if(\"boolean\"!=typeof a)throw new TypeError(\"keepInvalid() expects a boolean parameter\");return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)return d.datepickerInput;if(\"string\"!=typeof a)throw new TypeError(\"datepickerInput() expects a string parameter\");return d.datepickerInput=a,l},l.parseInputDate=function(a){if(0===arguments.length)return d.parseInputDate;\nif(\"function\"!=typeof a)throw new TypeError(\"parseInputDate() sholud be as function\");return d.parseInputDate=a,l},l.disabledTimeIntervals=function(b){if(0===arguments.length)return d.disabledTimeIntervals?a.extend({},d.disabledTimeIntervals):d.disabledTimeIntervals;if(!b)return d.disabledTimeIntervals=!1,$(),l;if(!(b instanceof Array))throw new TypeError(\"disabledTimeIntervals() expects an array parameter\");return d.disabledTimeIntervals=b,$(),l},l.disabledHours=function(b){if(0===arguments.length)return d.disabledHours?a.extend({},d.disabledHours):d.disabledHours;if(!b)return d.disabledHours=!1,$(),l;if(!(b instanceof Array))throw new TypeError(\"disabledHours() expects an array parameter\");if(d.disabledHours=na(b),d.enabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!Q(e,\"h\");){if(e.add(1,\"h\"),24===c)throw\"Tried 24 times to find a valid date\";c++}_(e)}return $(),l},l.enabledHours=function(b){if(0===arguments.length)return d.enabledHours?a.extend({},d.enabledHours):d.enabledHours;if(!b)return d.enabledHours=!1,$(),l;if(!(b instanceof Array))throw new TypeError(\"enabledHours() expects an array parameter\");if(d.enabledHours=na(b),d.disabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!Q(e,\"h\");){if(e.add(1,\"h\"),24===c)throw\"Tried 24 times to find a valid date\";c++}_(e)}return $(),l},l.viewDate=function(a){if(0===arguments.length)return f.clone();if(!a)return f=e.clone(),l;if(!(\"string\"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError(\"viewDate() parameter must be one of [string, moment or Date]\");return f=ga(a),J(),l},c.is(\"input\"))g=c;else if(g=c.find(d.datepickerInput),0===g.size())g=c.find(\"input\");else if(!g.is(\"input\"))throw new Error('CSS class \"'+d.datepickerInput+'\" cannot be applied to non input element');if(c.hasClass(\"input-group\")&&(n=0===c.find(\".datepickerbutton\").size()?c.find(\".input-group-addon\"):c.find(\".datepickerbutton\")),!d.inline&&!g.is(\"input\"))throw new Error(\"Could not initialize DateTimePicker without an input element\");return e=x(),f=e.clone(),a.extend(!0,d,G()),l.options(d),oa(),ka(),g.prop(\"disabled\")&&l.disable(),g.is(\"input\")&&0!==g.val().trim().length?_(ga(g.val().trim())):d.defaultDate&&void 0===g.attr(\"placeholder\")&&_(d.defaultDate),d.inline&&ea(),l};a.fn.datetimepicker=function(b){return this.each(function(){var d=a(this);d.data(\"DateTimePicker\")||(b=a.extend(!0,{},a.fn.datetimepicker.defaults,b),d.data(\"DateTimePicker\",c(d,b)))})},a.fn.datetimepicker.defaults={timeZone:\"Etc/UTC\",format:!1,dayViewHeaderFormat:\"MMMM YYYY\",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:b.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:\"glyphicon glyphicon-time\",date:\"glyphicon glyphicon-calendar\",up:\"glyphicon glyphicon-chevron-up\",down:\"glyphicon glyphicon-chevron-down\",previous:\"glyphicon glyphicon-chevron-left\",next:\"glyphicon glyphicon-chevron-right\",today:\"glyphicon glyphicon-screenshot\",clear:\"glyphicon glyphicon-trash\",close:\"glyphicon glyphicon-remove\"},tooltips:{today:\"Go to today\",clear:\"Clear selection\",close:\"Close the picker\",selectMonth:\"Select Month\",prevMonth:\"Previous Month\",nextMonth:\"Next Month\",selectYear:\"Select Year\",prevYear:\"Previous Year\",nextYear:\"Next Year\",selectDecade:\"Select Decade\",prevDecade:\"Previous Decade\",nextDecade:\"Next Decade\",prevCentury:\"Previous Century\",nextCentury:\"Next Century\",pickHour:\"Pick Hour\",incrementHour:\"Increment Hour\",decrementHour:\"Decrement Hour\",pickMinute:\"Pick Minute\",incrementMinute:\"Increment Minute\",decrementMinute:\"Decrement Minute\",pickSecond:\"Pick Second\",incrementSecond:\"Increment Second\",decrementSecond:\"Decrement Second\",togglePeriod:\"Toggle Period\",selectTime:\"Select Time\"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:\"days\",toolbarPlacement:\"default\",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:\"auto\",vertical:\"auto\"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:\".datepickerinput\",keyBinds:{up:function(a){if(a){var b=this.date()||this.getMoment();a.find(\".datepicker\").is(\":visible\")?this.date(b.clone().subtract(7,\"d\")):this.date(b.clone().add(this.stepping(),\"m\"))}},down:function(a){if(!a)return void this.show();var b=this.date()||this.getMoment();a.find(\".datepicker\").is(\":visible\")?this.date(b.clone().add(7,\"d\")):this.date(b.clone().subtract(this.stepping(),\"m\"))},\"control up\":function(a){if(a){var b=this.date()||this.getMoment();a.find(\".datepicker\").is(\":visible\")?this.date(b.clone().subtract(1,\"y\")):this.date(b.clone().add(1,\"h\"))}},\"control down\":function(a){if(a){var b=this.date()||this.getMoment();a.find(\".datepicker\").is(\":visible\")?this.date(b.clone().add(1,\"y\")):this.date(b.clone().subtract(1,\"h\"))}},left:function(a){if(a){var b=this.date()||this.getMoment();a.find(\".datepicker\").is(\":visible\")&&this.date(b.clone().subtract(1,\"d\"))}},right:function(a){if(a){var b=this.date()||this.getMoment();a.find(\".datepicker\").is(\":visible\")&&this.date(b.clone().add(1,\"d\"))}},pageUp:function(a){if(a){var b=this.date()||this.getMoment();a.find(\".datepicker\").is(\":visible\")&&this.date(b.clone().subtract(1,\"M\"))}},pageDown:function(a){if(a){var b=this.date()||this.getMoment();a.find(\".datepicker\").is(\":visible\")&&this.date(b.clone().add(1,\"M\"))}},enter:function(){this.hide()},escape:function(){this.hide()},\"control space\":function(a){a.find(\".timepicker\").is(\":visible\")&&a.find('.btn[data-action=\"togglePeriod\"]').click()},t:function(){this.date(this.getMoment())},\"delete\":function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1}});","/*!\n * FullCalendar v2.5.0\n * Docs & License: http://fullcalendar.io/\n * (c) 2015 Adam Shaw\n */\n\n(function(factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine([ 'jquery', 'moment' ], factory);\n\t}\n\telse if (typeof exports === 'object') { // Node/CommonJS\n\t\tmodule.exports = factory(require('jquery'), require('moment'));\n\t}\n\telse {\n\t\tfactory(jQuery, moment);\n\t}\n})(function($, moment) {\n\n;;\n\nvar FC = $.fullCalendar = {\n\tversion: \"2.5.0\",\n\tinternalApiVersion: 1\n};\nvar fcViews = FC.views = {};\n\n\n$.fn.fullCalendar = function(options) {\n\tvar args = Array.prototype.slice.call(arguments, 1); // for a possible method call\n\tvar res = this; // what this function will return (this jQuery object by default)\n\n\tthis.each(function(i, _element) { // loop each DOM element involved\n\t\tvar element = $(_element);\n\t\tvar calendar = element.data('fullCalendar'); // get the existing calendar object (if any)\n\t\tvar singleRes; // the returned value of this single method call\n\n\t\t// a method call\n\t\tif (typeof options === 'string') {\n\t\t\tif (calendar && $.isFunction(calendar[options])) {\n\t\t\t\tsingleRes = calendar[options].apply(calendar, args);\n\t\t\t\tif (!i) {\n\t\t\t\t\tres = singleRes; // record the first method call result\n\t\t\t\t}\n\t\t\t\tif (options === 'destroy') { // for the destroy method, must remove Calendar object data\n\t\t\t\t\telement.removeData('fullCalendar');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// a new calendar initialization\n\t\telse if (!calendar) { // don't initialize twice\n\t\t\tcalendar = new Calendar(element, options);\n\t\t\telement.data('fullCalendar', calendar);\n\t\t\tcalendar.render();\n\t\t}\n\t});\n\t\n\treturn res;\n};\n\n\nvar complexOptions = [ // names of options that are objects whose properties should be combined\n\t'header',\n\t'buttonText',\n\t'buttonIcons',\n\t'themeButtonIcons'\n];\n\n\n// Merges an array of option objects into a single object\nfunction mergeOptions(optionObjs) {\n\treturn mergeProps(optionObjs, complexOptions);\n}\n\n\n// Given options specified for the calendar's constructor, massages any legacy options into a non-legacy form.\n// Converts View-Option-Hashes into the View-Specific-Options format.\nfunction massageOverrides(input) {\n\tvar overrides = { views: input.views || {} }; // the output. ensure a `views` hash\n\tvar subObj;\n\n\t// iterate through all option override properties (except `views`)\n\t$.each(input, function(name, val) {\n\t\tif (name != 'views') {\n\n\t\t\t// could the value be a legacy View-Option-Hash?\n\t\t\tif (\n\t\t\t\t$.isPlainObject(val) &&\n\t\t\t\t!/(time|duration|interval)$/i.test(name) && // exclude duration options. might be given as objects\n\t\t\t\t$.inArray(name, complexOptions) == -1 // complex options aren't allowed to be View-Option-Hashes\n\t\t\t) {\n\t\t\t\tsubObj = null;\n\n\t\t\t\t// iterate through the properties of this possible View-Option-Hash value\n\t\t\t\t$.each(val, function(subName, subVal) {\n\n\t\t\t\t\t// is the property targeting a view?\n\t\t\t\t\tif (/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(subName)) {\n\t\t\t\t\t\tif (!overrides.views[subName]) { // ensure the view-target entry exists\n\t\t\t\t\t\t\toverrides.views[subName] = {};\n\t\t\t\t\t\t}\n\t\t\t\t\t\toverrides.views[subName][name] = subVal; // record the value in the `views` object\n\t\t\t\t\t}\n\t\t\t\t\telse { // a non-View-Option-Hash property\n\t\t\t\t\t\tif (!subObj) {\n\t\t\t\t\t\t\tsubObj = {};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsubObj[subName] = subVal; // accumulate these unrelated values for later\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (subObj) { // non-View-Option-Hash properties? transfer them as-is\n\t\t\t\t\toverrides[name] = subObj;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\toverrides[name] = val; // transfer normal options as-is\n\t\t\t}\n\t\t}\n\t});\n\n\treturn overrides;\n}\n\n;;\n\n// exports\nFC.intersectRanges = intersectRanges;\nFC.applyAll = applyAll;\nFC.debounce = debounce;\nFC.isInt = isInt;\nFC.htmlEscape = htmlEscape;\nFC.cssToStr = cssToStr;\nFC.proxy = proxy;\nFC.capitaliseFirstLetter = capitaliseFirstLetter;\n\n\n/* FullCalendar-specific DOM Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\n\n// Given the scrollbar widths of some other container, create borders/margins on rowEls in order to match the left\n// and right space that was offset by the scrollbars. A 1-pixel border first, then margin beyond that.\nfunction compensateScroll(rowEls, scrollbarWidths) {\n\tif (scrollbarWidths.left) {\n\t\trowEls.css({\n\t\t\t'border-left-width': 1,\n\t\t\t'margin-left': scrollbarWidths.left - 1\n\t\t});\n\t}\n\tif (scrollbarWidths.right) {\n\t\trowEls.css({\n\t\t\t'border-right-width': 1,\n\t\t\t'margin-right': scrollbarWidths.right - 1\n\t\t});\n\t}\n}\n\n\n// Undoes compensateScroll and restores all borders/margins\nfunction uncompensateScroll(rowEls) {\n\trowEls.css({\n\t\t'margin-left': '',\n\t\t'margin-right': '',\n\t\t'border-left-width': '',\n\t\t'border-right-width': ''\n\t});\n}\n\n\n// Make the mouse cursor express that an event is not allowed in the current area\nfunction disableCursor() {\n\t$('body').addClass('fc-not-allowed');\n}\n\n\n// Returns the mouse cursor to its original look\nfunction enableCursor() {\n\t$('body').removeClass('fc-not-allowed');\n}\n\n\n// Given a total available height to fill, have `els` (essentially child rows) expand to accomodate.\n// By default, all elements that are shorter than the recommended height are expanded uniformly, not considering\n// any other els that are already too tall. if `shouldRedistribute` is on, it considers these tall rows and \n// reduces the available height.\nfunction distributeHeight(els, availableHeight, shouldRedistribute) {\n\n\t// *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,\n\t// and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.\n\n\tvar minOffset1 = Math.floor(availableHeight / els.length); // for non-last element\n\tvar minOffset2 = Math.floor(availableHeight - minOffset1 * (els.length - 1)); // for last element *FLOORING NOTE*\n\tvar flexEls = []; // elements that are allowed to expand. array of DOM nodes\n\tvar flexOffsets = []; // amount of vertical space it takes up\n\tvar flexHeights = []; // actual css height\n\tvar usedHeight = 0;\n\n\tundistributeHeight(els); // give all elements their natural height\n\n\t// find elements that are below the recommended height (expandable).\n\t// important to query for heights in a single first pass (to avoid reflow oscillation).\n\tels.each(function(i, el) {\n\t\tvar minOffset = i === els.length - 1 ? minOffset2 : minOffset1;\n\t\tvar naturalOffset = $(el).outerHeight(true);\n\n\t\tif (naturalOffset < minOffset) {\n\t\t\tflexEls.push(el);\n\t\t\tflexOffsets.push(naturalOffset);\n\t\t\tflexHeights.push($(el).height());\n\t\t}\n\t\telse {\n\t\t\t// this element stretches past recommended height (non-expandable). mark the space as occupied.\n\t\t\tusedHeight += naturalOffset;\n\t\t}\n\t});\n\n\t// readjust the recommended height to only consider the height available to non-maxed-out rows.\n\tif (shouldRedistribute) {\n\t\tavailableHeight -= usedHeight;\n\t\tminOffset1 = Math.floor(availableHeight / flexEls.length);\n\t\tminOffset2 = Math.floor(availableHeight - minOffset1 * (flexEls.length - 1)); // *FLOORING NOTE*\n\t}\n\n\t// assign heights to all expandable elements\n\t$(flexEls).each(function(i, el) {\n\t\tvar minOffset = i === flexEls.length - 1 ? minOffset2 : minOffset1;\n\t\tvar naturalOffset = flexOffsets[i];\n\t\tvar naturalHeight = flexHeights[i];\n\t\tvar newHeight = minOffset - (naturalOffset - naturalHeight); // subtract the margin/padding\n\n\t\tif (naturalOffset < minOffset) { // we check this again because redistribution might have changed things\n\t\t\t$(el).height(newHeight);\n\t\t}\n\t});\n}\n\n\n// Undoes distrubuteHeight, restoring all els to their natural height\nfunction undistributeHeight(els) {\n\tels.height('');\n}\n\n\n// Given `els`, a jQuery set of <td> cells, find the cell with the largest natural width and set the widths of all the\n// cells to be that width.\n// PREREQUISITE: if you want a cell to take up width, it needs to have a single inner element w/ display:inline\nfunction matchCellWidths(els) {\n\tvar maxInnerWidth = 0;\n\n\tels.find('> *').each(function(i, innerEl) {\n\t\tvar innerWidth = $(innerEl).outerWidth();\n\t\tif (innerWidth > maxInnerWidth) {\n\t\t\tmaxInnerWidth = innerWidth;\n\t\t}\n\t});\n\n\tmaxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n\n\tels.width(maxInnerWidth);\n\n\treturn maxInnerWidth;\n}\n\n\n// Turns a container element into a scroller if its contents is taller than the allotted height.\n// Returns true if the element is now a scroller, false otherwise.\n// NOTE: this method is best because it takes weird zooming dimensions into account\nfunction setPotentialScroller(containerEl, height) {\n\tcontainerEl.height(height).addClass('fc-scroller');\n\n\t// are scrollbars needed?\n\tif (containerEl[0].scrollHeight - 1 > containerEl[0].clientHeight) { // !!! -1 because IE is often off-by-one :(\n\t\treturn true;\n\t}\n\n\tunsetScroller(containerEl); // undo\n\treturn false;\n}\n\n\n// Takes an element that might have been a scroller, and turns it back into a normal element.\nfunction unsetScroller(containerEl) {\n\tcontainerEl.height('').removeClass('fc-scroller');\n}\n\n\n/* General DOM Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.getOuterRect = getOuterRect;\nFC.getClientRect = getClientRect;\nFC.getContentRect = getContentRect;\nFC.getScrollbarWidths = getScrollbarWidths;\n\n\n// borrowed from https://github.com/jquery/jquery-ui/blob/1.11.0/ui/core.js#L51\nfunction getScrollParent(el) {\n\tvar position = el.css('position'),\n\t\tscrollParent = el.parents().filter(function() {\n\t\t\tvar parent = $(this);\n\t\t\treturn (/(auto|scroll)/).test(\n\t\t\t\tparent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x')\n\t\t\t);\n\t\t}).eq(0);\n\n\treturn position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\n}\n\n\n// Queries the outer bounding area of a jQuery element.\n// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).\nfunction getOuterRect(el) {\n\tvar offset = el.offset();\n\n\treturn {\n\t\tleft: offset.left,\n\t\tright: offset.left + el.outerWidth(),\n\t\ttop: offset.top,\n\t\tbottom: offset.top + el.outerHeight()\n\t};\n}\n\n\n// Queries the area within the margin/border/scrollbars of a jQuery element. Does not go within the padding.\n// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).\n// NOTE: should use clientLeft/clientTop, but very unreliable cross-browser.\nfunction getClientRect(el) {\n\tvar offset = el.offset();\n\tvar scrollbarWidths = getScrollbarWidths(el);\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left;\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top;\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el[0].clientWidth, // clientWidth includes padding but NOT scrollbars\n\t\ttop: top,\n\t\tbottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars\n\t};\n}\n\n\n// Queries the area within the margin/border/padding of a jQuery element. Assumed not to have scrollbars.\n// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).\nfunction getContentRect(el) {\n\tvar offset = el.offset(); // just outside of border, margin not included\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left');\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top');\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.width(),\n\t\ttop: top,\n\t\tbottom: top + el.height()\n\t};\n}\n\n\n// Returns the computed left/right/top/bottom scrollbar widths for the given jQuery element.\n// NOTE: should use clientLeft/clientTop, but very unreliable cross-browser.\nfunction getScrollbarWidths(el) {\n\tvar leftRightWidth = el.innerWidth() - el[0].clientWidth; // the paddings cancel out, leaving the scrollbars\n\tvar widths = {\n\t\tleft: 0,\n\t\tright: 0,\n\t\ttop: 0,\n\t\tbottom: el.innerHeight() - el[0].clientHeight // the paddings cancel out, leaving the bottom scrollbar\n\t};\n\n\tif (getIsLeftRtlScrollbars() && el.css('direction') == 'rtl') { // is the scrollbar on the left side?\n\t\twidths.left = leftRightWidth;\n\t}\n\telse {\n\t\twidths.right = leftRightWidth;\n\t}\n\n\treturn widths;\n}\n\n\n// Logic for determining if, when the element is right-to-left, the scrollbar appears on the left side\n\nvar _isLeftRtlScrollbars = null;\n\nfunction getIsLeftRtlScrollbars() { // responsible for caching the computation\n\tif (_isLeftRtlScrollbars === null) {\n\t\t_isLeftRtlScrollbars = computeIsLeftRtlScrollbars();\n\t}\n\treturn _isLeftRtlScrollbars;\n}\n\nfunction computeIsLeftRtlScrollbars() { // creates an offscreen test element, then removes it\n\tvar el = $('<div><div/></div>')\n\t\t.css({\n\t\t\tposition: 'absolute',\n\t\t\ttop: -1000,\n\t\t\tleft: 0,\n\t\t\tborder: 0,\n\t\t\tpadding: 0,\n\t\t\toverflow: 'scroll',\n\t\t\tdirection: 'rtl'\n\t\t})\n\t\t.appendTo('body');\n\tvar innerEl = el.children();\n\tvar res = innerEl.offset().left > el.offset().left; // is the inner div shifted to accommodate a left scrollbar?\n\tel.remove();\n\treturn res;\n}\n\n\n// Retrieves a jQuery element's computed CSS value as a floating-point number.\n// If the queried value is non-numeric (ex: IE can return \"medium\" for border width), will just return zero.\nfunction getCssFloat(el, prop) {\n\treturn parseFloat(el.css(prop)) || 0;\n}\n\n\n// Returns a boolean whether this was a left mouse click and no ctrl key (which means right click on Mac)\nfunction isPrimaryMouseButton(ev) {\n\treturn ev.which == 1 && !ev.ctrlKey;\n}\n\n\n/* Geometry\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.intersectRects = intersectRects;\n\n// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false\nfunction intersectRects(rect1, rect2) {\n\tvar res = {\n\t\tleft: Math.max(rect1.left, rect2.left),\n\t\tright: Math.min(rect1.right, rect2.right),\n\t\ttop: Math.max(rect1.top, rect2.top),\n\t\tbottom: Math.min(rect1.bottom, rect2.bottom)\n\t};\n\n\tif (res.left < res.right && res.top < res.bottom) {\n\t\treturn res;\n\t}\n\treturn false;\n}\n\n\n// Returns a new point that will have been moved to reside within the given rectangle\nfunction constrainPoint(point, rect) {\n\treturn {\n\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t};\n}\n\n\n// Returns a point that is the center of the given rectangle\nfunction getRectCenter(rect) {\n\treturn {\n\t\tleft: (rect.left + rect.right) / 2,\n\t\ttop: (rect.top + rect.bottom) / 2\n\t};\n}\n\n\n// Subtracts point2's coordinates from point1's coordinates, returning a delta\nfunction diffPoints(point1, point2) {\n\treturn {\n\t\tleft: point1.left - point2.left,\n\t\ttop: point1.top - point2.top\n\t};\n}\n\n\n/* Object Ordering by Field\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.parseFieldSpecs = parseFieldSpecs;\nFC.compareByFieldSpecs = compareByFieldSpecs;\nFC.compareByFieldSpec = compareByFieldSpec;\nFC.flexibleCompare = flexibleCompare;\n\n\nfunction parseFieldSpecs(input) {\n\tvar specs = [];\n\tvar tokens = [];\n\tvar i, token;\n\n\tif (typeof input === 'string') {\n\t\ttokens = input.split(/\\s*,\\s*/);\n\t}\n\telse if (typeof input === 'function') {\n\t\ttokens = [ input ];\n\t}\n\telse if ($.isArray(input)) {\n\t\ttokens = input;\n\t}\n\n\tfor (i = 0; i < tokens.length; i++) {\n\t\ttoken = tokens[i];\n\n\t\tif (typeof token === 'string') {\n\t\t\tspecs.push(\n\t\t\t\ttoken.charAt(0) == '-' ?\n\t\t\t\t\t{ field: token.substring(1), order: -1 } :\n\t\t\t\t\t{ field: token, order: 1 }\n\t\t\t);\n\t\t}\n\t\telse if (typeof token === 'function') {\n\t\t\tspecs.push({ func: token });\n\t\t}\n\t}\n\n\treturn specs;\n}\n\n\nfunction compareByFieldSpecs(obj1, obj2, fieldSpecs) {\n\tvar i;\n\tvar cmp;\n\n\tfor (i = 0; i < fieldSpecs.length; i++) {\n\t\tcmp = compareByFieldSpec(obj1, obj2, fieldSpecs[i]);\n\t\tif (cmp) {\n\t\t\treturn cmp;\n\t\t}\n\t}\n\n\treturn 0;\n}\n\n\nfunction compareByFieldSpec(obj1, obj2, fieldSpec) {\n\tif (fieldSpec.func) {\n\t\treturn fieldSpec.func(obj1, obj2);\n\t}\n\treturn flexibleCompare(obj1[fieldSpec.field], obj2[fieldSpec.field]) *\n\t\t(fieldSpec.order || 1);\n}\n\n\nfunction flexibleCompare(a, b) {\n\tif (!a && !b) {\n\t\treturn 0;\n\t}\n\tif (b == null) {\n\t\treturn -1;\n\t}\n\tif (a == null) {\n\t\treturn 1;\n\t}\n\tif ($.type(a) === 'string' || $.type(b) === 'string') {\n\t\treturn String(a).localeCompare(String(b));\n\t}\n\treturn a - b;\n}\n\n\n/* FullCalendar-specific Misc Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\n\n// Computes the intersection of the two ranges. Returns undefined if no intersection.\n// Expects all dates to be normalized to the same timezone beforehand.\n// TODO: move to date section?\nfunction intersectRanges(subjectRange, constraintRange) {\n\tvar subjectStart = subjectRange.start;\n\tvar subjectEnd = subjectRange.end;\n\tvar constraintStart = constraintRange.start;\n\tvar constraintEnd = constraintRange.end;\n\tvar segStart, segEnd;\n\tvar isStart, isEnd;\n\n\tif (subjectEnd > constraintStart && subjectStart < constraintEnd) { // in bounds at all?\n\n\t\tif (subjectStart >= constraintStart) {\n\t\t\tsegStart = subjectStart.clone();\n\t\t\tisStart = true;\n\t\t}\n\t\telse {\n\t\t\tsegStart = constraintStart.clone();\n\t\t\tisStart = false;\n\t\t}\n\n\t\tif (subjectEnd <= constraintEnd) {\n\t\t\tsegEnd = subjectEnd.clone();\n\t\t\tisEnd = true;\n\t\t}\n\t\telse {\n\t\t\tsegEnd = constraintEnd.clone();\n\t\t\tisEnd = false;\n\t\t}\n\n\t\treturn {\n\t\t\tstart: segStart,\n\t\t\tend: segEnd,\n\t\t\tisStart: isStart,\n\t\t\tisEnd: isEnd\n\t\t};\n\t}\n}\n\n\n/* Date Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.computeIntervalUnit = computeIntervalUnit;\nFC.divideRangeByDuration = divideRangeByDuration;\nFC.divideDurationByDuration = divideDurationByDuration;\nFC.multiplyDuration = multiplyDuration;\nFC.durationHasTime = durationHasTime;\n\nvar dayIDs = [ 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat' ];\nvar intervalUnits = [ 'year', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond' ];\n\n\n// Diffs the two moments into a Duration where full-days are recorded first, then the remaining time.\n// Moments will have their timezones normalized.\nfunction diffDayTime(a, b) {\n\treturn moment.duration({\n\t\tdays: a.clone().stripTime().diff(b.clone().stripTime(), 'days'),\n\t\tms: a.time() - b.time() // time-of-day from day start. disregards timezone\n\t});\n}\n\n\n// Diffs the two moments via their start-of-day (regardless of timezone). Produces whole-day durations.\nfunction diffDay(a, b) {\n\treturn moment.duration({\n\t\tdays: a.clone().stripTime().diff(b.clone().stripTime(), 'days')\n\t});\n}\n\n\n// Diffs two moments, producing a duration, made of a whole-unit-increment of the given unit. Uses rounding.\nfunction diffByUnit(a, b, unit) {\n\treturn moment.duration(\n\t\tMath.round(a.diff(b, unit, true)), // returnFloat=true\n\t\tunit\n\t);\n}\n\n\n// Computes the unit name of the largest whole-unit period of time.\n// For example, 48 hours will be \"days\" whereas 49 hours will be \"hours\".\n// Accepts start/end, a range object, or an original duration object.\nfunction computeIntervalUnit(start, end) {\n\tvar i, unit;\n\tvar val;\n\n\tfor (i = 0; i < intervalUnits.length; i++) {\n\t\tunit = intervalUnits[i];\n\t\tval = computeRangeAs(unit, start, end);\n\n\t\tif (val >= 1 && isInt(val)) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn unit; // will be \"milliseconds\" if nothing else matches\n}\n\n\n// Computes the number of units (like \"hours\") in the given range.\n// Range can be a {start,end} object, separate start/end args, or a Duration.\n// Results are based on Moment's .as() and .diff() methods, so results can depend on internal handling\n// of month-diffing logic (which tends to vary from version to version).\nfunction computeRangeAs(unit, start, end) {\n\n\tif (end != null) { // given start, end\n\t\treturn end.diff(start, unit, true);\n\t}\n\telse if (moment.isDuration(start)) { // given duration\n\t\treturn start.as(unit);\n\t}\n\telse { // given { start, end } range object\n\t\treturn start.end.diff(start.start, unit, true);\n\t}\n}\n\n\n// Intelligently divides a range (specified by a start/end params) by a duration\nfunction divideRangeByDuration(start, end, dur) {\n\tvar months;\n\n\tif (durationHasTime(dur)) {\n\t\treturn (end - start) / dur;\n\t}\n\tmonths = dur.asMonths();\n\tif (Math.abs(months) >= 1 && isInt(months)) {\n\t\treturn end.diff(start, 'months', true) / months;\n\t}\n\treturn end.diff(start, 'days', true) / dur.asDays();\n}\n\n\n// Intelligently divides one duration by another\nfunction divideDurationByDuration(dur1, dur2) {\n\tvar months1, months2;\n\n\tif (durationHasTime(dur1) || durationHasTime(dur2)) {\n\t\treturn dur1 / dur2;\n\t}\n\tmonths1 = dur1.asMonths();\n\tmonths2 = dur2.asMonths();\n\tif (\n\t\tMath.abs(months1) >= 1 && isInt(months1) &&\n\t\tMath.abs(months2) >= 1 && isInt(months2)\n\t) {\n\t\treturn months1 / months2;\n\t}\n\treturn dur1.asDays() / dur2.asDays();\n}\n\n\n// Intelligently multiplies a duration by a number\nfunction multiplyDuration(dur, n) {\n\tvar months;\n\n\tif (durationHasTime(dur)) {\n\t\treturn moment.duration(dur * n);\n\t}\n\tmonths = dur.asMonths();\n\tif (Math.abs(months) >= 1 && isInt(months)) {\n\t\treturn moment.duration({ months: months * n });\n\t}\n\treturn moment.duration({ days: dur.asDays() * n });\n}\n\n\n// Returns a boolean about whether the given duration has any time parts (hours/minutes/seconds/ms)\nfunction durationHasTime(dur) {\n\treturn Boolean(dur.hours() || dur.minutes() || dur.seconds() || dur.milliseconds());\n}\n\n\nfunction isNativeDate(input) {\n\treturn Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date;\n}\n\n\n// Returns a boolean about whether the given input is a time string, like \"06:40:00\" or \"06:00\"\nfunction isTimeString(str) {\n\treturn /^\\d+\\:\\d+(?:\\:\\d+\\.?(?:\\d{3})?)?$/.test(str);\n}\n\n\n/* Logging and Debug\n----------------------------------------------------------------------------------------------------------------------*/\n\nFC.log = function() {\n\tvar console = window.console;\n\n\tif (console && console.log) {\n\t\treturn console.log.apply(console, arguments);\n\t}\n};\n\nFC.warn = function() {\n\tvar console = window.console;\n\n\tif (console && console.warn) {\n\t\treturn console.warn.apply(console, arguments);\n\t}\n\telse {\n\t\treturn FC.log.apply(FC, arguments);\n\t}\n};\n\n\n/* General Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar hasOwnPropMethod = {}.hasOwnProperty;\n\n\n// Merges an array of objects into a single object.\n// The second argument allows for an array of property names who's object values will be merged together.\nfunction mergeProps(propObjs, complexProps) {\n\tvar dest = {};\n\tvar i, name;\n\tvar complexObjs;\n\tvar j, val;\n\tvar props;\n\n\tif (complexProps) {\n\t\tfor (i = 0; i < complexProps.length; i++) {\n\t\t\tname = complexProps[i];\n\t\t\tcomplexObjs = [];\n\n\t\t\t// collect the trailing object values, stopping when a non-object is discovered\n\t\t\tfor (j = propObjs.length - 1; j >= 0; j--) {\n\t\t\t\tval = propObjs[j][name];\n\n\t\t\t\tif (typeof val === 'object') {\n\t\t\t\t\tcomplexObjs.unshift(val);\n\t\t\t\t}\n\t\t\t\telse if (val !== undefined) {\n\t\t\t\t\tdest[name] = val; // if there were no objects, this value will be used\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if the trailing values were objects, use the merged value\n\t\t\tif (complexObjs.length) {\n\t\t\t\tdest[name] = mergeProps(complexObjs);\n\t\t\t}\n\t\t}\n\t}\n\n\t// copy values into the destination, going from last to first\n\tfor (i = propObjs.length - 1; i >= 0; i--) {\n\t\tprops = propObjs[i];\n\n\t\tfor (name in props) {\n\t\t\tif (!(name in dest)) { // if already assigned by previous props or complex props, don't reassign\n\t\t\t\tdest[name] = props[name];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dest;\n}\n\n\n// Create an object that has the given prototype. Just like Object.create\nfunction createObject(proto) {\n\tvar f = function() {};\n\tf.prototype = proto;\n\treturn new f();\n}\n\n\nfunction copyOwnProps(src, dest) {\n\tfor (var name in src) {\n\t\tif (hasOwnProp(src, name)) {\n\t\t\tdest[name] = src[name];\n\t\t}\n\t}\n}\n\n\n// Copies over certain methods with the same names as Object.prototype methods. Overcomes an IE<=8 bug:\n// https://developer.mozilla.org/en-US/docs/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug\nfunction copyNativeMethods(src, dest) {\n\tvar names = [ 'constructor', 'toString', 'valueOf' ];\n\tvar i, name;\n\n\tfor (i = 0; i < names.length; i++) {\n\t\tname = names[i];\n\n\t\tif (src[name] !== Object.prototype[name]) {\n\t\t\tdest[name] = src[name];\n\t\t}\n\t}\n}\n\n\nfunction hasOwnProp(obj, name) {\n\treturn hasOwnPropMethod.call(obj, name);\n}\n\n\n// Is the given value a non-object non-function value?\nfunction isAtomic(val) {\n\treturn /undefined|null|boolean|number|string/.test($.type(val));\n}\n\n\nfunction applyAll(functions, thisObj, args) {\n\tif ($.isFunction(functions)) {\n\t\tfunctions = [ functions ];\n\t}\n\tif (functions) {\n\t\tvar i;\n\t\tvar ret;\n\t\tfor (i=0; i<functions.length; i++) {\n\t\t\tret = functions[i].apply(thisObj, args) || ret;\n\t\t}\n\t\treturn ret;\n\t}\n}\n\n\nfunction firstDefined() {\n\tfor (var i=0; i<arguments.length; i++) {\n\t\tif (arguments[i] !== undefined) {\n\t\t\treturn arguments[i];\n\t\t}\n\t}\n}\n\n\nfunction htmlEscape(s) {\n\treturn (s + '').replace(/&/g, '&')\n\t\t.replace(/</g, '<')\n\t\t.replace(/>/g, '>')\n\t\t.replace(/'/g, ''')\n\t\t.replace(/\"/g, '"')\n\t\t.replace(/\\n/g, '<br />');\n}\n\n\nfunction stripHtmlEntities(text) {\n\treturn text.replace(/&.*?;/g, '');\n}\n\n\n// Given a hash of CSS properties, returns a string of CSS.\n// Uses property names as-is (no camel-case conversion). Will not make statements for null/undefined values.\nfunction cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}\n\n\nfunction capitaliseFirstLetter(str) {\n\treturn str.charAt(0).toUpperCase() + str.slice(1);\n}\n\n\nfunction compareNumbers(a, b) { // for .sort()\n\treturn a - b;\n}\n\n\nfunction isInt(n) {\n\treturn n % 1 === 0;\n}\n\n\n// Returns a method bound to the given object context.\n// Just like one of the jQuery.proxy signatures, but without the undesired behavior of treating the same method with\n// different contexts as identical when binding/unbinding events.\nfunction proxy(obj, methodName) {\n\tvar method = obj[methodName];\n\n\treturn function() {\n\t\treturn method.apply(obj, arguments);\n\t};\n}\n\n\n// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds.\n// https://github.com/jashkenas/underscore/blob/1.6.0/underscore.js#L714\nfunction debounce(func, wait) {\n\tvar timeoutId;\n\tvar args;\n\tvar context;\n\tvar timestamp; // of most recent call\n\tvar later = function() {\n\t\tvar last = +new Date() - timestamp;\n\t\tif (last < wait && last > 0) {\n\t\t\ttimeoutId = setTimeout(later, wait - last);\n\t\t}\n\t\telse {\n\t\t\ttimeoutId = null;\n\t\t\tfunc.apply(context, args);\n\t\t\tif (!timeoutId) {\n\t\t\t\tcontext = args = null;\n\t\t\t}\n\t\t}\n\t};\n\n\treturn function() {\n\t\tcontext = this;\n\t\targs = arguments;\n\t\ttimestamp = +new Date();\n\t\tif (!timeoutId) {\n\t\t\ttimeoutId = setTimeout(later, wait);\n\t\t}\n\t};\n}\n\n;;\n\nvar ambigDateOfMonthRegex = /^\\s*\\d{4}-\\d\\d$/;\nvar ambigTimeOrZoneRegex =\n\t/^\\s*\\d{4}-(?:(\\d\\d-\\d\\d)|(W\\d\\d$)|(W\\d\\d-\\d)|(\\d\\d\\d))((T| )(\\d\\d(:\\d\\d(:\\d\\d(\\.\\d+)?)?)?)?)?$/;\nvar newMomentProto = moment.fn; // where we will attach our new methods\nvar oldMomentProto = $.extend({}, newMomentProto); // copy of original moment methods\nvar allowValueOptimization;\nvar setUTCValues; // function defined below\nvar setLocalValues; // function defined below\n\n\n// Creating\n// -------------------------------------------------------------------------------------------------\n\n// Creates a new moment, similar to the vanilla moment(...) constructor, but with\n// extra features (ambiguous time, enhanced formatting). When given an existing moment,\n// it will function as a clone (and retain the zone of the moment). Anything else will\n// result in a moment in the local zone.\nFC.moment = function() {\n\treturn makeMoment(arguments);\n};\n\n// Sames as FC.moment, but forces the resulting moment to be in the UTC timezone.\nFC.moment.utc = function() {\n\tvar mom = makeMoment(arguments, true);\n\n\t// Force it into UTC because makeMoment doesn't guarantee it\n\t// (if given a pre-existing moment for example)\n\tif (mom.hasTime()) { // don't give ambiguously-timed moments a UTC zone\n\t\tmom.utc();\n\t}\n\n\treturn mom;\n};\n\n// Same as FC.moment, but when given an ISO8601 string, the timezone offset is preserved.\n// ISO8601 strings with no timezone offset will become ambiguously zoned.\nFC.moment.parseZone = function() {\n\treturn makeMoment(arguments, true, true);\n};\n\n// Builds an enhanced moment from args. When given an existing moment, it clones. When given a\n// native Date, or called with no arguments (the current time), the resulting moment will be local.\n// Anything else needs to be \"parsed\" (a string or an array), and will be affected by:\n// parseAsUTC - if there is no zone information, should we parse the input in UTC?\n// parseZone - if there is zone information, should we force the zone of the moment?\nfunction makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}\n\n\n// A clone method that works with the flags related to our enhanced functionality.\n// In the future, use moment.momentProperties\nnewMomentProto.clone = function() {\n\tvar mom = oldMomentProto.clone.apply(this, arguments);\n\n\t// these flags weren't transfered with the clone\n\ttransferAmbigs(this, mom);\n\tif (this._fullCalendar) {\n\t\tmom._fullCalendar = true;\n\t}\n\n\treturn mom;\n};\n\n\n// Week Number\n// -------------------------------------------------------------------------------------------------\n\n\n// Returns the week number, considering the locale's custom week number calcuation\n// `weeks` is an alias for `week`\nnewMomentProto.week = newMomentProto.weeks = function(input) {\n\tvar weekCalc = (this._locale || this._lang) // works pre-moment-2.8\n\t\t._fullCalendar_weekCalc;\n\n\tif (input == null && typeof weekCalc === 'function') { // custom function only works for getter\n\t\treturn weekCalc(this);\n\t}\n\telse if (weekCalc === 'ISO') {\n\t\treturn oldMomentProto.isoWeek.apply(this, arguments); // ISO getter/setter\n\t}\n\n\treturn oldMomentProto.week.apply(this, arguments); // local getter/setter\n};\n\n\n// Time-of-day\n// -------------------------------------------------------------------------------------------------\n\n// GETTER\n// Returns a Duration with the hours/minutes/seconds/ms values of the moment.\n// If the moment has an ambiguous time, a duration of 00:00 will be returned.\n//\n// SETTER\n// You can supply a Duration, a Moment, or a Duration-like argument.\n// When setting the time, and the moment has an ambiguous time, it then becomes unambiguous.\nnewMomentProto.time = function(time) {\n\n\t// Fallback to the original method (if there is one) if this moment wasn't created via FullCalendar.\n\t// `time` is a generic enough method name where this precaution is necessary to avoid collisions w/ other plugins.\n\tif (!this._fullCalendar) {\n\t\treturn oldMomentProto.time.apply(this, arguments);\n\t}\n\n\tif (time == null) { // getter\n\t\treturn moment.duration({\n\t\t\thours: this.hours(),\n\t\t\tminutes: this.minutes(),\n\t\t\tseconds: this.seconds(),\n\t\t\tmilliseconds: this.milliseconds()\n\t\t});\n\t}\n\telse { // setter\n\n\t\tthis._ambigTime = false; // mark that the moment now has a time\n\n\t\tif (!moment.isDuration(time) && !moment.isMoment(time)) {\n\t\t\ttime = moment.duration(time);\n\t\t}\n\n\t\t// The day value should cause overflow (so 24 hours becomes 00:00:00 of next day).\n\t\t// Only for Duration times, not Moment times.\n\t\tvar dayHours = 0;\n\t\tif (moment.isDuration(time)) {\n\t\t\tdayHours = Math.floor(time.asDays()) * 24;\n\t\t}\n\n\t\t// We need to set the individual fields.\n\t\t// Can't use startOf('day') then add duration. In case of DST at start of day.\n\t\treturn this.hours(dayHours + time.hours())\n\t\t\t.minutes(time.minutes())\n\t\t\t.seconds(time.seconds())\n\t\t\t.milliseconds(time.milliseconds());\n\t}\n};\n\n// Converts the moment to UTC, stripping out its time-of-day and timezone offset,\n// but preserving its YMD. A moment with a stripped time will display no time\n// nor timezone offset when .format() is called.\nnewMomentProto.stripTime = function() {\n\tvar a;\n\n\tif (!this._ambigTime) {\n\n\t\t// get the values before any conversion happens\n\t\ta = this.toArray(); // array of y/m/d/h/m/s/ms\n\n\t\t// TODO: use keepLocalTime in the future\n\t\tthis.utc(); // set the internal UTC flag (will clear the ambig flags)\n\t\tsetUTCValues(this, a.slice(0, 3)); // set the year/month/date. time will be zero\n\n\t\t// Mark the time as ambiguous. This needs to happen after the .utc() call, which might call .utcOffset(),\n\t\t// which clears all ambig flags. Same with setUTCValues with moment-timezone.\n\t\tthis._ambigTime = true;\n\t\tthis._ambigZone = true; // if ambiguous time, also ambiguous timezone offset\n\t}\n\n\treturn this; // for chaining\n};\n\n// Returns if the moment has a non-ambiguous time (boolean)\nnewMomentProto.hasTime = function() {\n\treturn !this._ambigTime;\n};\n\n\n// Timezone\n// -------------------------------------------------------------------------------------------------\n\n// Converts the moment to UTC, stripping out its timezone offset, but preserving its\n// YMD and time-of-day. A moment with a stripped timezone offset will display no\n// timezone offset when .format() is called.\n// TODO: look into Moment's keepLocalTime functionality\nnewMomentProto.stripZone = function() {\n\tvar a, wasAmbigTime;\n\n\tif (!this._ambigZone) {\n\n\t\t// get the values before any conversion happens\n\t\ta = this.toArray(); // array of y/m/d/h/m/s/ms\n\t\twasAmbigTime = this._ambigTime;\n\n\t\tthis.utc(); // set the internal UTC flag (might clear the ambig flags, depending on Moment internals)\n\t\tsetUTCValues(this, a); // will set the year/month/date/hours/minutes/seconds/ms\n\n\t\t// the above call to .utc()/.utcOffset() unfortunately might clear the ambig flags, so restore\n\t\tthis._ambigTime = wasAmbigTime || false;\n\n\t\t// Mark the zone as ambiguous. This needs to happen after the .utc() call, which might call .utcOffset(),\n\t\t// which clears the ambig flags. Same with setUTCValues with moment-timezone.\n\t\tthis._ambigZone = true;\n\t}\n\n\treturn this; // for chaining\n};\n\n// Returns of the moment has a non-ambiguous timezone offset (boolean)\nnewMomentProto.hasZone = function() {\n\treturn !this._ambigZone;\n};\n\n\n// this method implicitly marks a zone\nnewMomentProto.local = function() {\n\tvar a = this.toArray(); // year,month,date,hours,minutes,seconds,ms as an array\n\tvar wasAmbigZone = this._ambigZone;\n\n\toldMomentProto.local.apply(this, arguments);\n\n\t// ensure non-ambiguous\n\t// this probably already happened via local() -> utcOffset(), but don't rely on Moment's internals\n\tthis._ambigTime = false;\n\tthis._ambigZone = false;\n\n\tif (wasAmbigZone) {\n\t\t// If the moment was ambiguously zoned, the date fields were stored as UTC.\n\t\t// We want to preserve these, but in local time.\n\t\t// TODO: look into Moment's keepLocalTime functionality\n\t\tsetLocalValues(this, a);\n\t}\n\n\treturn this; // for chaining\n};\n\n\n// implicitly marks a zone\nnewMomentProto.utc = function() {\n\toldMomentProto.utc.apply(this, arguments);\n\n\t// ensure non-ambiguous\n\t// this probably already happened via utc() -> utcOffset(), but don't rely on Moment's internals\n\tthis._ambigTime = false;\n\tthis._ambigZone = false;\n\n\treturn this;\n};\n\n\n// methods for arbitrarily manipulating timezone offset.\n// should clear time/zone ambiguity when called.\n$.each([\n\t'zone', // only in moment-pre-2.9. deprecated afterwards\n\t'utcOffset'\n], function(i, name) {\n\tif (oldMomentProto[name]) { // original method exists?\n\n\t\t// this method implicitly marks a zone (will probably get called upon .utc() and .local())\n\t\tnewMomentProto[name] = function(tzo) {\n\n\t\t\tif (tzo != null) { // setter\n\t\t\t\t// these assignments needs to happen before the original zone method is called.\n\t\t\t\t// I forget why, something to do with a browser crash.\n\t\t\t\tthis._ambigTime = false;\n\t\t\t\tthis._ambigZone = false;\n\t\t\t}\n\n\t\t\treturn oldMomentProto[name].apply(this, arguments);\n\t\t};\n\t}\n});\n\n\n// Formatting\n// -------------------------------------------------------------------------------------------------\n\nnewMomentProto.format = function() {\n\tif (this._fullCalendar && arguments[0]) { // an enhanced moment? and a format string provided?\n\t\treturn formatDate(this, arguments[0]); // our extended formatting\n\t}\n\tif (this._ambigTime) {\n\t\treturn oldMomentFormat(this, 'YYYY-MM-DD');\n\t}\n\tif (this._ambigZone) {\n\t\treturn oldMomentFormat(this, 'YYYY-MM-DD[T]HH:mm:ss');\n\t}\n\treturn oldMomentProto.format.apply(this, arguments);\n};\n\nnewMomentProto.toISOString = function() {\n\tif (this._ambigTime) {\n\t\treturn oldMomentFormat(this, 'YYYY-MM-DD');\n\t}\n\tif (this._ambigZone) {\n\t\treturn oldMomentFormat(this, 'YYYY-MM-DD[T]HH:mm:ss');\n\t}\n\treturn oldMomentProto.toISOString.apply(this, arguments);\n};\n\n\n// Querying\n// -------------------------------------------------------------------------------------------------\n\n// Is the moment within the specified range? `end` is exclusive.\n// FYI, this method is not a standard Moment method, so always do our enhanced logic.\nnewMomentProto.isWithin = function(start, end) {\n\tvar a = commonlyAmbiguate([ this, start, end ]);\n\treturn a[0] >= a[1] && a[0] < a[2];\n};\n\n// When isSame is called with units, timezone ambiguity is normalized before the comparison happens.\n// If no units specified, the two moments must be identically the same, with matching ambig flags.\nnewMomentProto.isSame = function(input, units) {\n\tvar a;\n\n\t// only do custom logic if this is an enhanced moment\n\tif (!this._fullCalendar) {\n\t\treturn oldMomentProto.isSame.apply(this, arguments);\n\t}\n\n\tif (units) {\n\t\ta = commonlyAmbiguate([ this, input ], true); // normalize timezones but don't erase times\n\t\treturn oldMomentProto.isSame.call(a[0], a[1], units);\n\t}\n\telse {\n\t\tinput = FC.moment.parseZone(input); // normalize input\n\t\treturn oldMomentProto.isSame.call(this, input) &&\n\t\t\tBoolean(this._ambigTime) === Boolean(input._ambigTime) &&\n\t\t\tBoolean(this._ambigZone) === Boolean(input._ambigZone);\n\t}\n};\n\n// Make these query methods work with ambiguous moments\n$.each([\n\t'isBefore',\n\t'isAfter'\n], function(i, methodName) {\n\tnewMomentProto[methodName] = function(input, units) {\n\t\tvar a;\n\n\t\t// only do custom logic if this is an enhanced moment\n\t\tif (!this._fullCalendar) {\n\t\t\treturn oldMomentProto[methodName].apply(this, arguments);\n\t\t}\n\n\t\ta = commonlyAmbiguate([ this, input ]);\n\t\treturn oldMomentProto[methodName].call(a[0], a[1], units);\n\t};\n});\n\n\n// Misc Internals\n// -------------------------------------------------------------------------------------------------\n\n// given an array of moment-like inputs, return a parallel array w/ moments similarly ambiguated.\n// for example, of one moment has ambig time, but not others, all moments will have their time stripped.\n// set `preserveTime` to `true` to keep times, but only normalize zone ambiguity.\n// returns the original moments if no modifications are necessary.\nfunction commonlyAmbiguate(inputs, preserveTime) {\n\tvar anyAmbigTime = false;\n\tvar anyAmbigZone = false;\n\tvar len = inputs.length;\n\tvar moms = [];\n\tvar i, mom;\n\n\t// parse inputs into real moments and query their ambig flags\n\tfor (i = 0; i < len; i++) {\n\t\tmom = inputs[i];\n\t\tif (!moment.isMoment(mom)) {\n\t\t\tmom = FC.moment.parseZone(mom);\n\t\t}\n\t\tanyAmbigTime = anyAmbigTime || mom._ambigTime;\n\t\tanyAmbigZone = anyAmbigZone || mom._ambigZone;\n\t\tmoms.push(mom);\n\t}\n\n\t// strip each moment down to lowest common ambiguity\n\t// use clones to avoid modifying the original moments\n\tfor (i = 0; i < len; i++) {\n\t\tmom = moms[i];\n\t\tif (!preserveTime && anyAmbigTime && !mom._ambigTime) {\n\t\t\tmoms[i] = mom.clone().stripTime();\n\t\t}\n\t\telse if (anyAmbigZone && !mom._ambigZone) {\n\t\t\tmoms[i] = mom.clone().stripZone();\n\t\t}\n\t}\n\n\treturn moms;\n}\n\n// Transfers all the flags related to ambiguous time/zone from the `src` moment to the `dest` moment\n// TODO: look into moment.momentProperties for this.\nfunction transferAmbigs(src, dest) {\n\tif (src._ambigTime) {\n\t\tdest._ambigTime = true;\n\t}\n\telse if (dest._ambigTime) {\n\t\tdest._ambigTime = false;\n\t}\n\n\tif (src._ambigZone) {\n\t\tdest._ambigZone = true;\n\t}\n\telse if (dest._ambigZone) {\n\t\tdest._ambigZone = false;\n\t}\n}\n\n\n// Sets the year/month/date/etc values of the moment from the given array.\n// Inefficient because it calls each individual setter.\nfunction setMomentValues(mom, a) {\n\tmom.year(a[0] || 0)\n\t\t.month(a[1] || 0)\n\t\t.date(a[2] || 0)\n\t\t.hours(a[3] || 0)\n\t\t.minutes(a[4] || 0)\n\t\t.seconds(a[5] || 0)\n\t\t.milliseconds(a[6] || 0);\n}\n\n// Can we set the moment's internal date directly?\nallowValueOptimization = '_d' in moment() && 'updateOffset' in moment;\n\n// Utility function. Accepts a moment and an array of the UTC year/month/date/etc values to set.\n// Assumes the given moment is already in UTC mode.\nsetUTCValues = allowValueOptimization ? function(mom, a) {\n\t// simlate what moment's accessors do\n\tmom._d.setTime(Date.UTC.apply(Date, a));\n\tmoment.updateOffset(mom, false); // keepTime=false\n} : setMomentValues;\n\n// Utility function. Accepts a moment and an array of the local year/month/date/etc values to set.\n// Assumes the given moment is already in local mode.\nsetLocalValues = allowValueOptimization ? function(mom, a) {\n\t// simlate what moment's accessors do\n\tmom._d.setTime(+new Date( // FYI, there is now way to apply an array of args to a constructor\n\t\ta[0] || 0,\n\t\ta[1] || 0,\n\t\ta[2] || 0,\n\t\ta[3] || 0,\n\t\ta[4] || 0,\n\t\ta[5] || 0,\n\t\ta[6] || 0\n\t));\n\tmoment.updateOffset(mom, false); // keepTime=false\n} : setMomentValues;\n\n;;\n\n// Single Date Formatting\n// -------------------------------------------------------------------------------------------------\n\n\n// call this if you want Moment's original format method to be used\nfunction oldMomentFormat(mom, formatStr) {\n\treturn oldMomentProto.format.call(mom, formatStr); // oldMomentProto defined in moment-ext.js\n}\n\n\n// Formats `date` with a Moment formatting string, but allow our non-zero areas and\n// additional token.\nfunction formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}\n\n\nfunction formatDateWithChunks(date, chunks) {\n\tvar s = '';\n\tvar i;\n\n\tfor (i=0; i<chunks.length; i++) {\n\t\ts += formatDateWithChunk(date, chunks[i]);\n\t}\n\n\treturn s;\n}\n\n\n// addition formatting tokens we want recognized\nvar tokenOverrides = {\n\tt: function(date) { // \"a\" or \"p\"\n\t\treturn oldMomentFormat(date, 'a').charAt(0);\n\t},\n\tT: function(date) { // \"A\" or \"P\"\n\t\treturn oldMomentFormat(date, 'A').charAt(0);\n\t}\n};\n\n\nfunction formatDateWithChunk(date, chunk) {\n\tvar token;\n\tvar maybeStr;\n\n\tif (typeof chunk === 'string') { // a literal string\n\t\treturn chunk;\n\t}\n\telse if ((token = chunk.token)) { // a token, like \"YYYY\"\n\t\tif (tokenOverrides[token]) {\n\t\t\treturn tokenOverrides[token](date); // use our custom token\n\t\t}\n\t\treturn oldMomentFormat(date, token);\n\t}\n\telse if (chunk.maybe) { // a grouping of other chunks that must be non-zero\n\t\tmaybeStr = formatDateWithChunks(date, chunk.maybe);\n\t\tif (maybeStr.match(/[1-9]/)) {\n\t\t\treturn maybeStr;\n\t\t}\n\t}\n\n\treturn '';\n}\n\n\n// Date Range Formatting\n// -------------------------------------------------------------------------------------------------\n// TODO: make it work with timezone offset\n\n// Using a formatting string meant for a single date, generate a range string, like\n// \"Sep 2 - 9 2013\", that intelligently inserts a separator where the dates differ.\n// If the dates are the same as far as the format string is concerned, just return a single\n// rendering of one date, without any separator.\nfunction formatRange(date1, date2, formatStr, separator, isRTL) {\n\tvar localeData;\n\n\tdate1 = FC.moment.parseZone(date1);\n\tdate2 = FC.moment.parseZone(date2);\n\n\tlocaleData = (date1.localeData || date1.lang).call(date1); // works with moment-pre-2.8\n\n\t// Expand localized format strings, like \"LL\" -> \"MMMM D YYYY\"\n\tformatStr = localeData.longDateFormat(formatStr) || formatStr;\n\t// BTW, this is not important for `formatDate` because it is impossible to put custom tokens\n\t// or non-zero areas in Moment's localized format strings.\n\n\tseparator = separator || ' - ';\n\n\treturn formatRangeWithChunks(\n\t\tdate1,\n\t\tdate2,\n\t\tgetFormatStringChunks(formatStr),\n\t\tseparator,\n\t\tisRTL\n\t);\n}\nFC.formatRange = formatRange; // expose\n\n\nfunction formatRangeWithChunks(date1, date2, chunks, separator, isRTL) {\n\tvar unzonedDate1 = date1.clone().stripZone(); // for formatSimilarChunk\n\tvar unzonedDate2 = date2.clone().stripZone(); // \"\n\tvar chunkStr; // the rendering of the chunk\n\tvar leftI;\n\tvar leftStr = '';\n\tvar rightI;\n\tvar rightStr = '';\n\tvar middleI;\n\tvar middleStr1 = '';\n\tvar middleStr2 = '';\n\tvar middleStr = '';\n\n\t// Start at the leftmost side of the formatting string and continue until you hit a token\n\t// that is not the same between dates.\n\tfor (leftI=0; leftI<chunks.length; leftI++) {\n\t\tchunkStr = formatSimilarChunk(date1, date2, unzonedDate1, unzonedDate2, chunks[leftI]);\n\t\tif (chunkStr === false) {\n\t\t\tbreak;\n\t\t}\n\t\tleftStr += chunkStr;\n\t}\n\n\t// Similarly, start at the rightmost side of the formatting string and move left\n\tfor (rightI=chunks.length-1; rightI>leftI; rightI--) {\n\t\tchunkStr = formatSimilarChunk(date1, date2, unzonedDate1, unzonedDate2, chunks[rightI]);\n\t\tif (chunkStr === false) {\n\t\t\tbreak;\n\t\t}\n\t\trightStr = chunkStr + rightStr;\n\t}\n\n\t// The area in the middle is different for both of the dates.\n\t// Collect them distinctly so we can jam them together later.\n\tfor (middleI=leftI; middleI<=rightI; middleI++) {\n\t\tmiddleStr1 += formatDateWithChunk(date1, chunks[middleI]);\n\t\tmiddleStr2 += formatDateWithChunk(date2, chunks[middleI]);\n\t}\n\n\tif (middleStr1 || middleStr2) {\n\t\tif (isRTL) {\n\t\t\tmiddleStr = middleStr2 + separator + middleStr1;\n\t\t}\n\t\telse {\n\t\t\tmiddleStr = middleStr1 + separator + middleStr2;\n\t\t}\n\t}\n\n\treturn leftStr + middleStr + rightStr;\n}\n\n\nvar similarUnitMap = {\n\tY: 'year',\n\tM: 'month',\n\tD: 'day', // day of month\n\td: 'day', // day of week\n\t// prevents a separator between anything time-related...\n\tA: 'second', // AM/PM\n\ta: 'second', // am/pm\n\tT: 'second', // A/P\n\tt: 'second', // a/p\n\tH: 'second', // hour (24)\n\th: 'second', // hour (12)\n\tm: 'second', // minute\n\ts: 'second' // second\n};\n// TODO: week maybe?\n\n\n// Given a formatting chunk, and given that both dates are similar in the regard the\n// formatting chunk is concerned, format date1 against `chunk`. Otherwise, return `false`.\nfunction formatSimilarChunk(date1, date2, unzonedDate1, unzonedDate2, chunk) {\n\tvar token;\n\tvar unit;\n\n\tif (typeof chunk === 'string') { // a literal string\n\t\treturn chunk;\n\t}\n\telse if ((token = chunk.token)) {\n\t\tunit = similarUnitMap[token.charAt(0)];\n\n\t\t// are the dates the same for this unit of measurement?\n\t\t// use the unzoned dates for this calculation because unreliable when near DST (bug #2396)\n\t\tif (unit && unzonedDate1.isSame(unzonedDate2, unit)) {\n\t\t\treturn oldMomentFormat(date1, token); // would be the same if we used `date2`\n\t\t\t// BTW, don't support custom tokens\n\t\t}\n\t}\n\n\treturn false; // the chunk is NOT the same for the two dates\n\t// BTW, don't support splitting on non-zero areas\n}\n\n\n// Chunking Utils\n// -------------------------------------------------------------------------------------------------\n\n\nvar formatStringChunkCache = {};\n\n\nfunction getFormatStringChunks(formatStr) {\n\tif (formatStr in formatStringChunkCache) {\n\t\treturn formatStringChunkCache[formatStr];\n\t}\n\treturn (formatStringChunkCache[formatStr] = chunkFormatString(formatStr));\n}\n\n\n// Break the formatting string into an array of chunks\nfunction chunkFormatString(formatStr) {\n\tvar chunks = [];\n\tvar chunker = /\\[([^\\]]*)\\]|\\(([^\\)]*)\\)|(LTS|LT|(\\w)\\4*o?)|([^\\w\\[\\(]+)/g; // TODO: more descrimination\n\tvar match;\n\n\twhile ((match = chunker.exec(formatStr))) {\n\t\tif (match[1]) { // a literal string inside [ ... ]\n\t\t\tchunks.push(match[1]);\n\t\t}\n\t\telse if (match[2]) { // non-zero formatting inside ( ... )\n\t\t\tchunks.push({ maybe: chunkFormatString(match[2]) });\n\t\t}\n\t\telse if (match[3]) { // a formatting token\n\t\t\tchunks.push({ token: match[3] });\n\t\t}\n\t\telse if (match[5]) { // an unenclosed literal string\n\t\t\tchunks.push(match[5]);\n\t\t}\n\t}\n\n\treturn chunks;\n}\n\n;;\n\nFC.Class = Class; // export\n\n// Class that all other classes will inherit from\nfunction Class() { }\n\n\n// Called on a class to create a subclass.\n// Last argument contains instance methods. Any argument before the last are considered mixins.\nClass.extend = function() {\n\tvar len = arguments.length;\n\tvar i;\n\tvar members;\n\n\tfor (i = 0; i < len; i++) {\n\t\tmembers = arguments[i];\n\t\tif (i < len - 1) { // not the last argument?\n\t\t\tmixIntoClass(this, members);\n\t\t}\n\t}\n\n\treturn extendClass(this, members || {}); // members will be undefined if no arguments\n};\n\n\n// Adds new member variables/methods to the class's prototype.\n// Can be called with another class, or a plain object hash containing new members.\nClass.mixin = function(members) {\n\tmixIntoClass(this, members);\n};\n\n\nfunction extendClass(superClass, members) {\n\tvar subClass;\n\n\t// ensure a constructor for the subclass, forwarding all arguments to the super-constructor if it doesn't exist\n\tif (hasOwnProp(members, 'constructor')) {\n\t\tsubClass = members.constructor;\n\t}\n\tif (typeof subClass !== 'function') {\n\t\tsubClass = members.constructor = function() {\n\t\t\tsuperClass.apply(this, arguments);\n\t\t};\n\t}\n\n\t// build the base prototype for the subclass, which is an new object chained to the superclass's prototype\n\tsubClass.prototype = createObject(superClass.prototype);\n\n\t// copy each member variable/method onto the the subclass's prototype\n\tcopyOwnProps(members, subClass.prototype);\n\tcopyNativeMethods(members, subClass.prototype); // hack for IE8\n\n\t// copy over all class variables/methods to the subclass, such as `extend` and `mixin`\n\tcopyOwnProps(superClass, subClass);\n\n\treturn subClass;\n}\n\n\nfunction mixIntoClass(theClass, members) {\n\tcopyOwnProps(members.prototype || members, theClass.prototype); // TODO: copyNativeMethods?\n}\n;;\n\nvar Emitter = FC.Emitter = Class.extend({\n\n\tcallbackHash: null,\n\n\n\ton: function(name, callback) {\n\t\tthis.getCallbacks(name).add(callback);\n\t\treturn this; // for chaining\n\t},\n\n\n\toff: function(name, callback) {\n\t\tthis.getCallbacks(name).remove(callback);\n\t\treturn this; // for chaining\n\t},\n\n\n\ttrigger: function(name) { // args...\n\t\tvar args = Array.prototype.slice.call(arguments, 1);\n\n\t\tthis.triggerWith(name, this, args);\n\n\t\treturn this; // for chaining\n\t},\n\n\n\ttriggerWith: function(name, context, args) {\n\t\tvar callbacks = this.getCallbacks(name);\n\n\t\tcallbacks.fireWith(context, args);\n\n\t\treturn this; // for chaining\n\t},\n\n\n\tgetCallbacks: function(name) {\n\t\tvar callbacks;\n\n\t\tif (!this.callbackHash) {\n\t\t\tthis.callbackHash = {};\n\t\t}\n\n\t\tcallbacks = this.callbackHash[name];\n\t\tif (!callbacks) {\n\t\t\tcallbacks = this.callbackHash[name] = $.Callbacks();\n\t\t}\n\n\t\treturn callbacks;\n\t}\n\n});\n;;\n\n/* A rectangular panel that is absolutely positioned over other content\n------------------------------------------------------------------------------------------------------------------------\nOptions:\n\t- className (string)\n\t- content (HTML string or jQuery element set)\n\t- parentEl\n\t- top\n\t- left\n\t- right (the x coord of where the right edge should be. not a \"CSS\" right)\n\t- autoHide (boolean)\n\t- show (callback)\n\t- hide (callback)\n*/\n\nvar Popover = Class.extend({\n\n\tisHidden: true,\n\toptions: null,\n\tel: null, // the container element for the popover. generated by this object\n\tdocumentMousedownProxy: null, // document mousedown handler bound to `this`\n\tmargin: 10, // the space required between the popover and the edges of the scroll container\n\n\n\tconstructor: function(options) {\n\t\tthis.options = options || {};\n\t},\n\n\n\t// Shows the popover on the specified position. Renders it if not already\n\tshow: function() {\n\t\tif (this.isHidden) {\n\t\t\tif (!this.el) {\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t\tthis.el.show();\n\t\t\tthis.position();\n\t\t\tthis.isHidden = false;\n\t\t\tthis.trigger('show');\n\t\t}\n\t},\n\n\n\t// Hides the popover, through CSS, but does not remove it from the DOM\n\thide: function() {\n\t\tif (!this.isHidden) {\n\t\t\tthis.el.hide();\n\t\t\tthis.isHidden = true;\n\t\t\tthis.trigger('hide');\n\t\t}\n\t},\n\n\n\t// Creates `this.el` and renders content inside of it\n\trender: function() {\n\t\tvar _this = this;\n\t\tvar options = this.options;\n\n\t\tthis.el = $('<div class=\"fc-popover\"/>')\n\t\t\t.addClass(options.className || '')\n\t\t\t.css({\n\t\t\t\t// position initially to the top left to avoid creating scrollbars\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0\n\t\t\t})\n\t\t\t.append(options.content)\n\t\t\t.appendTo(options.parentEl);\n\n\t\t// when a click happens on anything inside with a 'fc-close' className, hide the popover\n\t\tthis.el.on('click', '.fc-close', function() {\n\t\t\t_this.hide();\n\t\t});\n\n\t\tif (options.autoHide) {\n\t\t\t$(document).on('mousedown', this.documentMousedownProxy = proxy(this, 'documentMousedown'));\n\t\t}\n\t},\n\n\n\t// Triggered when the user clicks *anywhere* in the document, for the autoHide feature\n\tdocumentMousedown: function(ev) {\n\t\t// only hide the popover if the click happened outside the popover\n\t\tif (this.el && !$(ev.target).closest(this.el).length) {\n\t\t\tthis.hide();\n\t\t}\n\t},\n\n\n\t// Hides and unregisters any handlers\n\tremoveElement: function() {\n\t\tthis.hide();\n\n\t\tif (this.el) {\n\t\t\tthis.el.remove();\n\t\t\tthis.el = null;\n\t\t}\n\n\t\t$(document).off('mousedown', this.documentMousedownProxy);\n\t},\n\n\n\t// Positions the popover optimally, using the top/left/right options\n\tposition: function() {\n\t\tvar options = this.options;\n\t\tvar origin = this.el.offsetParent().offset();\n\t\tvar width = this.el.outerWidth();\n\t\tvar height = this.el.outerHeight();\n\t\tvar windowEl = $(window);\n\t\tvar viewportEl = getScrollParent(this.el);\n\t\tvar viewportTop;\n\t\tvar viewportLeft;\n\t\tvar viewportOffset;\n\t\tvar top; // the \"position\" (not \"offset\") values for the popover\n\t\tvar left; //\n\n\t\t// compute top and left\n\t\ttop = options.top || 0;\n\t\tif (options.left !== undefined) {\n\t\t\tleft = options.left;\n\t\t}\n\t\telse if (options.right !== undefined) {\n\t\t\tleft = options.right - width; // derive the left value from the right value\n\t\t}\n\t\telse {\n\t\t\tleft = 0;\n\t\t}\n\n\t\tif (viewportEl.is(window) || viewportEl.is(document)) { // normalize getScrollParent's result\n\t\t\tviewportEl = windowEl;\n\t\t\tviewportTop = 0; // the window is always at the top left\n\t\t\tviewportLeft = 0; // (and .offset() won't work if called here)\n\t\t}\n\t\telse {\n\t\t\tviewportOffset = viewportEl.offset();\n\t\t\tviewportTop = viewportOffset.top;\n\t\t\tviewportLeft = viewportOffset.left;\n\t\t}\n\n\t\t// if the window is scrolled, it causes the visible area to be further down\n\t\tviewportTop += windowEl.scrollTop();\n\t\tviewportLeft += windowEl.scrollLeft();\n\n\t\t// constrain to the view port. if constrained by two edges, give precedence to top/left\n\t\tif (options.viewportConstrain !== false) {\n\t\t\ttop = Math.min(top, viewportTop + viewportEl.outerHeight() - height - this.margin);\n\t\t\ttop = Math.max(top, viewportTop + this.margin);\n\t\t\tleft = Math.min(left, viewportLeft + viewportEl.outerWidth() - width - this.margin);\n\t\t\tleft = Math.max(left, viewportLeft + this.margin);\n\t\t}\n\n\t\tthis.el.css({\n\t\t\ttop: top - origin.top,\n\t\t\tleft: left - origin.left\n\t\t});\n\t},\n\n\n\t// Triggers a callback. Calls a function in the option hash of the same name.\n\t// Arguments beyond the first `name` are forwarded on.\n\t// TODO: better code reuse for this. Repeat code\n\ttrigger: function(name) {\n\t\tif (this.options[name]) {\n\t\t\tthis.options[name].apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t}\n\t}\n\n});\n\n;;\n\n/*\nA cache for the left/right/top/bottom/width/height values for one or more elements.\nWorks with both offset (from topleft document) and position (from offsetParent).\n\noptions:\n- els\n- isHorizontal\n- isVertical\n*/\nvar CoordCache = FC.CoordCache = Class.extend({\n\n\tels: null, // jQuery set (assumed to be siblings)\n\tforcedOffsetParentEl: null, // options can override the natural offsetParent\n\torigin: null, // {left,top} position of offsetParent of els\n\tboundingRect: null, // constrain cordinates to this rectangle. {left,right,top,bottom} or null\n\tisHorizontal: false, // whether to query for left/right/width\n\tisVertical: false, // whether to query for top/bottom/height\n\n\t// arrays of coordinates (offsets from topleft of document)\n\tlefts: null,\n\trights: null,\n\ttops: null,\n\tbottoms: null,\n\n\n\tconstructor: function(options) {\n\t\tthis.els = $(options.els);\n\t\tthis.isHorizontal = options.isHorizontal;\n\t\tthis.isVertical = options.isVertical;\n\t\tthis.forcedOffsetParentEl = options.offsetParent ? $(options.offsetParent) : null;\n\t},\n\n\n\t// Queries the els for coordinates and stores them.\n\t// Call this method before using and of the get* methods below.\n\tbuild: function() {\n\t\tvar offsetParentEl = this.forcedOffsetParentEl || this.els.eq(0).offsetParent();\n\n\t\tthis.origin = offsetParentEl.offset();\n\t\tthis.boundingRect = this.queryBoundingRect();\n\n\t\tif (this.isHorizontal) {\n\t\t\tthis.buildElHorizontals();\n\t\t}\n\t\tif (this.isVertical) {\n\t\t\tthis.buildElVerticals();\n\t\t}\n\t},\n\n\n\t// Destroys all internal data about coordinates, freeing memory\n\tclear: function() {\n\t\tthis.origin = null;\n\t\tthis.boundingRect = null;\n\t\tthis.lefts = null;\n\t\tthis.rights = null;\n\t\tthis.tops = null;\n\t\tthis.bottoms = null;\n\t},\n\n\n\t// Compute and return what the elements' bounding rectangle is, from the user's perspective.\n\t// Right now, only returns a rectangle if constrained by an overflow:scroll element.\n\tqueryBoundingRect: function() {\n\t\tvar scrollParentEl = getScrollParent(this.els.eq(0));\n\n\t\tif (!scrollParentEl.is(document)) {\n\t\t\treturn getClientRect(scrollParentEl);\n\t\t}\n\t},\n\n\n\t// Populates the left/right internal coordinate arrays\n\tbuildElHorizontals: function() {\n\t\tvar lefts = [];\n\t\tvar rights = [];\n\n\t\tthis.els.each(function(i, node) {\n\t\t\tvar el = $(node);\n\t\t\tvar left = el.offset().left;\n\t\t\tvar width = el.outerWidth();\n\n\t\t\tlefts.push(left);\n\t\t\trights.push(left + width);\n\t\t});\n\n\t\tthis.lefts = lefts;\n\t\tthis.rights = rights;\n\t},\n\n\n\t// Populates the top/bottom internal coordinate arrays\n\tbuildElVerticals: function() {\n\t\tvar tops = [];\n\t\tvar bottoms = [];\n\n\t\tthis.els.each(function(i, node) {\n\t\t\tvar el = $(node);\n\t\t\tvar top = el.offset().top;\n\t\t\tvar height = el.outerHeight();\n\n\t\t\ttops.push(top);\n\t\t\tbottoms.push(top + height);\n\t\t});\n\n\t\tthis.tops = tops;\n\t\tthis.bottoms = bottoms;\n\t},\n\n\n\t// Given a left offset (from document left), returns the index of the el that it horizontally intersects.\n\t// If no intersection is made, or outside of the boundingRect, returns undefined.\n\tgetHorizontalIndex: function(leftOffset) {\n\t\tvar boundingRect = this.boundingRect;\n\t\tvar lefts = this.lefts;\n\t\tvar rights = this.rights;\n\t\tvar len = lefts.length;\n\t\tvar i;\n\n\t\tif (!boundingRect || (leftOffset >= boundingRect.left && leftOffset < boundingRect.right)) {\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tif (leftOffset >= lefts[i] && leftOffset < rights[i]) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Given a top offset (from document top), returns the index of the el that it vertically intersects.\n\t// If no intersection is made, or outside of the boundingRect, returns undefined.\n\tgetVerticalIndex: function(topOffset) {\n\t\tvar boundingRect = this.boundingRect;\n\t\tvar tops = this.tops;\n\t\tvar bottoms = this.bottoms;\n\t\tvar len = tops.length;\n\t\tvar i;\n\n\t\tif (!boundingRect || (topOffset >= boundingRect.top && topOffset < boundingRect.bottom)) {\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tif (topOffset >= tops[i] && topOffset < bottoms[i]) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Gets the left offset (from document left) of the element at the given index\n\tgetLeftOffset: function(leftIndex) {\n\t\treturn this.lefts[leftIndex];\n\t},\n\n\n\t// Gets the left position (from offsetParent left) of the element at the given index\n\tgetLeftPosition: function(leftIndex) {\n\t\treturn this.lefts[leftIndex] - this.origin.left;\n\t},\n\n\n\t// Gets the right offset (from document left) of the element at the given index.\n\t// This value is NOT relative to the document's right edge, like the CSS concept of \"right\" would be.\n\tgetRightOffset: function(leftIndex) {\n\t\treturn this.rights[leftIndex];\n\t},\n\n\n\t// Gets the right position (from offsetParent left) of the element at the given index.\n\t// This value is NOT relative to the offsetParent's right edge, like the CSS concept of \"right\" would be.\n\tgetRightPosition: function(leftIndex) {\n\t\treturn this.rights[leftIndex] - this.origin.left;\n\t},\n\n\n\t// Gets the width of the element at the given index\n\tgetWidth: function(leftIndex) {\n\t\treturn this.rights[leftIndex] - this.lefts[leftIndex];\n\t},\n\n\n\t// Gets the top offset (from document top) of the element at the given index\n\tgetTopOffset: function(topIndex) {\n\t\treturn this.tops[topIndex];\n\t},\n\n\n\t// Gets the top position (from offsetParent top) of the element at the given position\n\tgetTopPosition: function(topIndex) {\n\t\treturn this.tops[topIndex] - this.origin.top;\n\t},\n\n\t// Gets the bottom offset (from the document top) of the element at the given index.\n\t// This value is NOT relative to the offsetParent's bottom edge, like the CSS concept of \"bottom\" would be.\n\tgetBottomOffset: function(topIndex) {\n\t\treturn this.bottoms[topIndex];\n\t},\n\n\n\t// Gets the bottom position (from the offsetParent top) of the element at the given index.\n\t// This value is NOT relative to the offsetParent's bottom edge, like the CSS concept of \"bottom\" would be.\n\tgetBottomPosition: function(topIndex) {\n\t\treturn this.bottoms[topIndex] - this.origin.top;\n\t},\n\n\n\t// Gets the height of the element at the given index\n\tgetHeight: function(topIndex) {\n\t\treturn this.bottoms[topIndex] - this.tops[topIndex];\n\t}\n\n});\n\n;;\n\n/* Tracks a drag's mouse movement, firing various handlers\n----------------------------------------------------------------------------------------------------------------------*/\n// TODO: use Emitter\n\nvar DragListener = FC.DragListener = Class.extend({\n\n\toptions: null,\n\n\tisListening: false,\n\tisDragging: false,\n\n\t// coordinates of the initial mousedown\n\toriginX: null,\n\toriginY: null,\n\n\t// handler attached to the document, bound to the DragListener's `this`\n\tmousemoveProxy: null,\n\tmouseupProxy: null,\n\n\t// for IE8 bug-fighting behavior, for now\n\tsubjectEl: null, // the element being draged. optional\n\tsubjectHref: null,\n\n\tscrollEl: null,\n\tscrollBounds: null, // { top, bottom, left, right }\n\tscrollTopVel: null, // pixels per second\n\tscrollLeftVel: null, // pixels per second\n\tscrollIntervalId: null, // ID of setTimeout for scrolling animation loop\n\tscrollHandlerProxy: null, // this-scoped function for handling when scrollEl is scrolled\n\n\tscrollSensitivity: 30, // pixels from edge for scrolling to start\n\tscrollSpeed: 200, // pixels per second, at maximum speed\n\tscrollIntervalMs: 50, // millisecond wait between scroll increment\n\n\n\tconstructor: function(options) {\n\t\toptions = options || {};\n\t\tthis.options = options;\n\t\tthis.subjectEl = options.subjectEl;\n\t},\n\n\n\t// Call this when the user does a mousedown. Will probably lead to startListening\n\tmousedown: function(ev) {\n\t\tif (isPrimaryMouseButton(ev)) {\n\n\t\t\tev.preventDefault(); // prevents native selection in most browsers\n\n\t\t\tthis.startListening(ev);\n\n\t\t\t// start the drag immediately if there is no minimum distance for a drag start\n\t\t\tif (!this.options.distance) {\n\t\t\t\tthis.startDrag(ev);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Call this to start tracking mouse movements\n\tstartListening: function(ev) {\n\t\tvar scrollParent;\n\n\t\tif (!this.isListening) {\n\n\t\t\t// grab scroll container and attach handler\n\t\t\tif (ev && this.options.scroll) {\n\t\t\t\tscrollParent = getScrollParent($(ev.target));\n\t\t\t\tif (!scrollParent.is(window) && !scrollParent.is(document)) {\n\t\t\t\t\tthis.scrollEl = scrollParent;\n\n\t\t\t\t\t// scope to `this`, and use `debounce` to make sure rapid calls don't happen\n\t\t\t\t\tthis.scrollHandlerProxy = debounce(proxy(this, 'scrollHandler'), 100);\n\t\t\t\t\tthis.scrollEl.on('scroll', this.scrollHandlerProxy);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$(document)\n\t\t\t\t.on('mousemove', this.mousemoveProxy = proxy(this, 'mousemove'))\n\t\t\t\t.on('mouseup', this.mouseupProxy = proxy(this, 'mouseup'))\n\t\t\t\t.on('selectstart', this.preventDefault); // prevents native selection in IE<=8\n\n\t\t\tif (ev) {\n\t\t\t\tthis.originX = ev.pageX;\n\t\t\t\tthis.originY = ev.pageY;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// if no starting information was given, origin will be the topleft corner of the screen.\n\t\t\t\t// if so, dx/dy in the future will be the absolute coordinates.\n\t\t\t\tthis.originX = 0;\n\t\t\t\tthis.originY = 0;\n\t\t\t}\n\n\t\t\tthis.isListening = true;\n\t\t\tthis.listenStart(ev);\n\t\t}\n\t},\n\n\n\t// Called when drag listening has started (but a real drag has not necessarily began)\n\tlistenStart: function(ev) {\n\t\tthis.trigger('listenStart', ev);\n\t},\n\n\n\t// Called when the user moves the mouse\n\tmousemove: function(ev) {\n\t\tvar dx = ev.pageX - this.originX;\n\t\tvar dy = ev.pageY - this.originY;\n\t\tvar minDistance;\n\t\tvar distanceSq; // current distance from the origin, squared\n\n\t\tif (!this.isDragging) { // if not already dragging...\n\t\t\t// then start the drag if the minimum distance criteria is met\n\t\t\tminDistance = this.options.distance || 1;\n\t\t\tdistanceSq = dx * dx + dy * dy;\n\t\t\tif (distanceSq >= minDistance * minDistance) { // use pythagorean theorem\n\t\t\t\tthis.startDrag(ev);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDragging) {\n\t\t\tthis.drag(dx, dy, ev); // report a drag, even if this mousemove initiated the drag\n\t\t}\n\t},\n\n\n\t// Call this to initiate a legitimate drag.\n\t// This function is called internally from this class, but can also be called explicitly from outside\n\tstartDrag: function(ev) {\n\n\t\tif (!this.isListening) { // startDrag must have manually initiated\n\t\t\tthis.startListening();\n\t\t}\n\n\t\tif (!this.isDragging) {\n\t\t\tthis.isDragging = true;\n\t\t\tthis.dragStart(ev);\n\t\t}\n\t},\n\n\n\t// Called when the actual drag has started (went beyond minDistance)\n\tdragStart: function(ev) {\n\t\tvar subjectEl = this.subjectEl;\n\n\t\tthis.trigger('dragStart', ev);\n\n\t\t// remove a mousedown'd <a>'s href so it is not visited (IE8 bug)\n\t\tif ((this.subjectHref = subjectEl ? subjectEl.attr('href') : null)) {\n\t\t\tsubjectEl.removeAttr('href');\n\t\t}\n\t},\n\n\n\t// Called while the mouse is being moved and when we know a legitimate drag is taking place\n\tdrag: function(dx, dy, ev) {\n\t\tthis.trigger('drag', dx, dy, ev);\n\t\tthis.updateScroll(ev); // will possibly cause scrolling\n\t},\n\n\n\t// Called when the user does a mouseup\n\tmouseup: function(ev) {\n\t\tthis.stopListening(ev);\n\t},\n\n\n\t// Called when the drag is over. Will not cause listening to stop however.\n\t// A concluding 'cellOut' event will NOT be triggered.\n\tstopDrag: function(ev) {\n\t\tif (this.isDragging) {\n\t\t\tthis.stopScrolling();\n\t\t\tthis.dragStop(ev);\n\t\t\tthis.isDragging = false;\n\t\t}\n\t},\n\n\n\t// Called when dragging has been stopped\n\tdragStop: function(ev) {\n\t\tvar _this = this;\n\n\t\tthis.trigger('dragStop', ev);\n\n\t\t// restore a mousedown'd <a>'s href (for IE8 bug)\n\t\tsetTimeout(function() { // must be outside of the click's execution\n\t\t\tif (_this.subjectHref) {\n\t\t\t\t_this.subjectEl.attr('href', _this.subjectHref);\n\t\t\t}\n\t\t}, 0);\n\t},\n\n\n\t// Call this to stop listening to the user's mouse events\n\tstopListening: function(ev) {\n\t\tthis.stopDrag(ev); // if there's a current drag, kill it\n\n\t\tif (this.isListening) {\n\n\t\t\t// remove the scroll handler if there is a scrollEl\n\t\t\tif (this.scrollEl) {\n\t\t\t\tthis.scrollEl.off('scroll', this.scrollHandlerProxy);\n\t\t\t\tthis.scrollHandlerProxy = null;\n\t\t\t}\n\n\t\t\t$(document)\n\t\t\t\t.off('mousemove', this.mousemoveProxy)\n\t\t\t\t.off('mouseup', this.mouseupProxy)\n\t\t\t\t.off('selectstart', this.preventDefault);\n\n\t\t\tthis.mousemoveProxy = null;\n\t\t\tthis.mouseupProxy = null;\n\n\t\t\tthis.isListening = false;\n\t\t\tthis.listenStop(ev);\n\t\t}\n\t},\n\n\n\t// Called when drag listening has stopped\n\tlistenStop: function(ev) {\n\t\tthis.trigger('listenStop', ev);\n\t},\n\n\n\t// Triggers a callback. Calls a function in the option hash of the same name.\n\t// Arguments beyond the first `name` are forwarded on.\n\ttrigger: function(name) {\n\t\tif (this.options[name]) {\n\t\t\tthis.options[name].apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t}\n\t},\n\n\n\t// Stops a given mouse event from doing it's native browser action. In our case, text selection.\n\tpreventDefault: function(ev) {\n\t\tev.preventDefault();\n\t},\n\n\n\t/* Scrolling\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Computes and stores the bounding rectangle of scrollEl\n\tcomputeScrollBounds: function() {\n\t\tvar el = this.scrollEl;\n\n\t\tthis.scrollBounds = el ? getOuterRect(el) : null;\n\t\t\t// TODO: use getClientRect in future. but prevents auto scrolling when on top of scrollbars\n\t},\n\n\n\t// Called when the dragging is in progress and scrolling should be updated\n\tupdateScroll: function(ev) {\n\t\tvar sensitivity = this.scrollSensitivity;\n\t\tvar bounds = this.scrollBounds;\n\t\tvar topCloseness, bottomCloseness;\n\t\tvar leftCloseness, rightCloseness;\n\t\tvar topVel = 0;\n\t\tvar leftVel = 0;\n\n\t\tif (bounds) { // only scroll if scrollEl exists\n\n\t\t\t// compute closeness to edges. valid range is from 0.0 - 1.0\n\t\t\ttopCloseness = (sensitivity - (ev.pageY - bounds.top)) / sensitivity;\n\t\t\tbottomCloseness = (sensitivity - (bounds.bottom - ev.pageY)) / sensitivity;\n\t\t\tleftCloseness = (sensitivity - (ev.pageX - bounds.left)) / sensitivity;\n\t\t\trightCloseness = (sensitivity - (bounds.right - ev.pageX)) / sensitivity;\n\n\t\t\t// translate vertical closeness into velocity.\n\t\t\t// mouse must be completely in bounds for velocity to happen.\n\t\t\tif (topCloseness >= 0 && topCloseness <= 1) {\n\t\t\t\ttopVel = topCloseness * this.scrollSpeed * -1; // negative. for scrolling up\n\t\t\t}\n\t\t\telse if (bottomCloseness >= 0 && bottomCloseness <= 1) {\n\t\t\t\ttopVel = bottomCloseness * this.scrollSpeed;\n\t\t\t}\n\n\t\t\t// translate horizontal closeness into velocity\n\t\t\tif (leftCloseness >= 0 && leftCloseness <= 1) {\n\t\t\t\tleftVel = leftCloseness * this.scrollSpeed * -1; // negative. for scrolling left\n\t\t\t}\n\t\t\telse if (rightCloseness >= 0 && rightCloseness <= 1) {\n\t\t\t\tleftVel = rightCloseness * this.scrollSpeed;\n\t\t\t}\n\t\t}\n\n\t\tthis.setScrollVel(topVel, leftVel);\n\t},\n\n\n\t// Sets the speed-of-scrolling for the scrollEl\n\tsetScrollVel: function(topVel, leftVel) {\n\n\t\tthis.scrollTopVel = topVel;\n\t\tthis.scrollLeftVel = leftVel;\n\n\t\tthis.constrainScrollVel(); // massages into realistic values\n\n\t\t// if there is non-zero velocity, and an animation loop hasn't already started, then START\n\t\tif ((this.scrollTopVel || this.scrollLeftVel) && !this.scrollIntervalId) {\n\t\t\tthis.scrollIntervalId = setInterval(\n\t\t\t\tproxy(this, 'scrollIntervalFunc'), // scope to `this`\n\t\t\t\tthis.scrollIntervalMs\n\t\t\t);\n\t\t}\n\t},\n\n\n\t// Forces scrollTopVel and scrollLeftVel to be zero if scrolling has already gone all the way\n\tconstrainScrollVel: function() {\n\t\tvar el = this.scrollEl;\n\n\t\tif (this.scrollTopVel < 0) { // scrolling up?\n\t\t\tif (el.scrollTop() <= 0) { // already scrolled all the way up?\n\t\t\t\tthis.scrollTopVel = 0;\n\t\t\t}\n\t\t}\n\t\telse if (this.scrollTopVel > 0) { // scrolling down?\n\t\t\tif (el.scrollTop() + el[0].clientHeight >= el[0].scrollHeight) { // already scrolled all the way down?\n\t\t\t\tthis.scrollTopVel = 0;\n\t\t\t}\n\t\t}\n\n\t\tif (this.scrollLeftVel < 0) { // scrolling left?\n\t\t\tif (el.scrollLeft() <= 0) { // already scrolled all the left?\n\t\t\t\tthis.scrollLeftVel = 0;\n\t\t\t}\n\t\t}\n\t\telse if (this.scrollLeftVel > 0) { // scrolling right?\n\t\t\tif (el.scrollLeft() + el[0].clientWidth >= el[0].scrollWidth) { // already scrolled all the way right?\n\t\t\t\tthis.scrollLeftVel = 0;\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// This function gets called during every iteration of the scrolling animation loop\n\tscrollIntervalFunc: function() {\n\t\tvar el = this.scrollEl;\n\t\tvar frac = this.scrollIntervalMs / 1000; // considering animation frequency, what the vel should be mult'd by\n\n\t\t// change the value of scrollEl's scroll\n\t\tif (this.scrollTopVel) {\n\t\t\tel.scrollTop(el.scrollTop() + this.scrollTopVel * frac);\n\t\t}\n\t\tif (this.scrollLeftVel) {\n\t\t\tel.scrollLeft(el.scrollLeft() + this.scrollLeftVel * frac);\n\t\t}\n\n\t\tthis.constrainScrollVel(); // since the scroll values changed, recompute the velocities\n\n\t\t// if scrolled all the way, which causes the vels to be zero, stop the animation loop\n\t\tif (!this.scrollTopVel && !this.scrollLeftVel) {\n\t\t\tthis.stopScrolling();\n\t\t}\n\t},\n\n\n\t// Kills any existing scrolling animation loop\n\tstopScrolling: function() {\n\t\tif (this.scrollIntervalId) {\n\t\t\tclearInterval(this.scrollIntervalId);\n\t\t\tthis.scrollIntervalId = null;\n\n\t\t\t// when all done with scrolling, recompute positions since they probably changed\n\t\t\tthis.scrollStop();\n\t\t}\n\t},\n\n\n\t// Get called when the scrollEl is scrolled (NOTE: this is delayed via debounce)\n\tscrollHandler: function() {\n\t\t// recompute all coordinates, but *only* if this is *not* part of our scrolling animation\n\t\tif (!this.scrollIntervalId) {\n\t\t\tthis.scrollStop();\n\t\t}\n\t},\n\n\n\t// Called when scrolling has stopped, whether through auto scroll, or the user scrolling\n\tscrollStop: function() {\n\t}\n\n});\n\n;;\n\n/* Tracks mouse movements over a component and raises events about which hit the mouse is over.\n------------------------------------------------------------------------------------------------------------------------\noptions:\n- subjectEl\n- subjectCenter\n*/\n\nvar HitDragListener = DragListener.extend({\n\n\tcomponent: null, // converts coordinates to hits\n\t\t// methods: prepareHits, releaseHits, queryHit\n\n\torigHit: null, // the hit the mouse was over when listening started\n\thit: null, // the hit the mouse is over\n\tcoordAdjust: null, // delta that will be added to the mouse coordinates when computing collisions\n\n\n\tconstructor: function(component, options) {\n\t\tDragListener.call(this, options); // call the super-constructor\n\n\t\tthis.component = component;\n\t},\n\n\n\t// Called when drag listening starts (but a real drag has not necessarily began).\n\t// ev might be undefined if dragging was started manually.\n\tlistenStart: function(ev) {\n\t\tvar subjectEl = this.subjectEl;\n\t\tvar subjectRect;\n\t\tvar origPoint;\n\t\tvar point;\n\n\t\tDragListener.prototype.listenStart.apply(this, arguments); // call the super-method\n\n\t\tthis.computeCoords();\n\n\t\tif (ev) {\n\t\t\torigPoint = { left: ev.pageX, top: ev.pageY };\n\t\t\tpoint = origPoint;\n\n\t\t\t// constrain the point to bounds of the element being dragged\n\t\t\tif (subjectEl) {\n\t\t\t\tsubjectRect = getOuterRect(subjectEl); // used for centering as well\n\t\t\t\tpoint = constrainPoint(point, subjectRect);\n\t\t\t}\n\n\t\t\tthis.origHit = this.queryHit(point.left, point.top);\n\n\t\t\t// treat the center of the subject as the collision point?\n\t\t\tif (subjectEl && this.options.subjectCenter) {\n\n\t\t\t\t// only consider the area the subject overlaps the hit. best for large subjects.\n\t\t\t\t// TODO: skip this if hit didn't supply left/right/top/bottom\n\t\t\t\tif (this.origHit) {\n\t\t\t\t\tsubjectRect = intersectRects(this.origHit, subjectRect) ||\n\t\t\t\t\t\tsubjectRect; // in case there is no intersection\n\t\t\t\t}\n\n\t\t\t\tpoint = getRectCenter(subjectRect);\n\t\t\t}\n\n\t\t\tthis.coordAdjust = diffPoints(point, origPoint); // point - origPoint\n\t\t}\n\t\telse {\n\t\t\tthis.origHit = null;\n\t\t\tthis.coordAdjust = null;\n\t\t}\n\t},\n\n\n\t// Recomputes the drag-critical positions of elements\n\tcomputeCoords: function() {\n\t\tthis.component.prepareHits();\n\t\tthis.computeScrollBounds(); // why is this here???\n\t},\n\n\n\t// Called when the actual drag has started\n\tdragStart: function(ev) {\n\t\tvar hit;\n\n\t\tDragListener.prototype.dragStart.apply(this, arguments); // call the super-method\n\n\t\t// might be different from this.origHit if the min-distance is large\n\t\thit = this.queryHit(ev.pageX, ev.pageY);\n\n\t\t// report the initial hit the mouse is over\n\t\t// especially important if no min-distance and drag starts immediately\n\t\tif (hit) {\n\t\t\tthis.hitOver(hit);\n\t\t}\n\t},\n\n\n\t// Called when the drag moves\n\tdrag: function(dx, dy, ev) {\n\t\tvar hit;\n\n\t\tDragListener.prototype.drag.apply(this, arguments); // call the super-method\n\n\t\thit = this.queryHit(ev.pageX, ev.pageY);\n\n\t\tif (!isHitsEqual(hit, this.hit)) { // a different hit than before?\n\t\t\tif (this.hit) {\n\t\t\t\tthis.hitOut();\n\t\t\t}\n\t\t\tif (hit) {\n\t\t\t\tthis.hitOver(hit);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Called when dragging has been stopped\n\tdragStop: function() {\n\t\tthis.hitDone();\n\t\tDragListener.prototype.dragStop.apply(this, arguments); // call the super-method\n\t},\n\n\n\t// Called when a the mouse has just moved over a new hit\n\thitOver: function(hit) {\n\t\tvar isOrig = isHitsEqual(hit, this.origHit);\n\n\t\tthis.hit = hit;\n\n\t\tthis.trigger('hitOver', this.hit, isOrig, this.origHit);\n\t},\n\n\n\t// Called when the mouse has just moved out of a hit\n\thitOut: function() {\n\t\tif (this.hit) {\n\t\t\tthis.trigger('hitOut', this.hit);\n\t\t\tthis.hitDone();\n\t\t\tthis.hit = null;\n\t\t}\n\t},\n\n\n\t// Called after a hitOut. Also called before a dragStop\n\thitDone: function() {\n\t\tif (this.hit) {\n\t\t\tthis.trigger('hitDone', this.hit);\n\t\t}\n\t},\n\n\n\t// Called when drag listening has stopped\n\tlistenStop: function() {\n\t\tDragListener.prototype.listenStop.apply(this, arguments); // call the super-method\n\n\t\tthis.origHit = null;\n\t\tthis.hit = null;\n\n\t\tthis.component.releaseHits();\n\t},\n\n\n\t// Called when scrolling has stopped, whether through auto scroll, or the user scrolling\n\tscrollStop: function() {\n\t\tDragListener.prototype.scrollStop.apply(this, arguments); // call the super-method\n\n\t\tthis.computeCoords(); // hits' absolute positions will be in new places. recompute\n\t},\n\n\n\t// Gets the hit underneath the coordinates for the given mouse event\n\tqueryHit: function(left, top) {\n\n\t\tif (this.coordAdjust) {\n\t\t\tleft += this.coordAdjust.left;\n\t\t\ttop += this.coordAdjust.top;\n\t\t}\n\n\t\treturn this.component.queryHit(left, top);\n\t}\n\n});\n\n\n// Returns `true` if the hits are identically equal. `false` otherwise. Must be from the same component.\n// Two null values will be considered equal, as two \"out of the component\" states are the same.\nfunction isHitsEqual(hit0, hit1) {\n\n\tif (!hit0 && !hit1) {\n\t\treturn true;\n\t}\n\n\tif (hit0 && hit1) {\n\t\treturn hit0.component === hit1.component &&\n\t\t\tisHitPropsWithin(hit0, hit1) &&\n\t\t\tisHitPropsWithin(hit1, hit0); // ensures all props are identical\n\t}\n\n\treturn false;\n}\n\n\n// Returns true if all of subHit's non-standard properties are within superHit\nfunction isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n\n;;\n\n/* Creates a clone of an element and lets it track the mouse as it moves\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar MouseFollower = Class.extend({\n\n\toptions: null,\n\n\tsourceEl: null, // the element that will be cloned and made to look like it is dragging\n\tel: null, // the clone of `sourceEl` that will track the mouse\n\tparentEl: null, // the element that `el` (the clone) will be attached to\n\n\t// the initial position of el, relative to the offset parent. made to match the initial offset of sourceEl\n\ttop0: null,\n\tleft0: null,\n\n\t// the initial position of the mouse\n\tmouseY0: null,\n\tmouseX0: null,\n\n\t// the number of pixels the mouse has moved from its initial position\n\ttopDelta: null,\n\tleftDelta: null,\n\n\tmousemoveProxy: null, // document mousemove handler, bound to the MouseFollower's `this`\n\n\tisFollowing: false,\n\tisHidden: false,\n\tisAnimating: false, // doing the revert animation?\n\n\tconstructor: function(sourceEl, options) {\n\t\tthis.options = options = options || {};\n\t\tthis.sourceEl = sourceEl;\n\t\tthis.parentEl = options.parentEl ? $(options.parentEl) : sourceEl.parent(); // default to sourceEl's parent\n\t},\n\n\n\t// Causes the element to start following the mouse\n\tstart: function(ev) {\n\t\tif (!this.isFollowing) {\n\t\t\tthis.isFollowing = true;\n\n\t\t\tthis.mouseY0 = ev.pageY;\n\t\t\tthis.mouseX0 = ev.pageX;\n\t\t\tthis.topDelta = 0;\n\t\t\tthis.leftDelta = 0;\n\n\t\t\tif (!this.isHidden) {\n\t\t\t\tthis.updatePosition();\n\t\t\t}\n\n\t\t\t$(document).on('mousemove', this.mousemoveProxy = proxy(this, 'mousemove'));\n\t\t}\n\t},\n\n\n\t// Causes the element to stop following the mouse. If shouldRevert is true, will animate back to original position.\n\t// `callback` gets invoked when the animation is complete. If no animation, it is invoked immediately.\n\tstop: function(shouldRevert, callback) {\n\t\tvar _this = this;\n\t\tvar revertDuration = this.options.revertDuration;\n\n\t\tfunction complete() {\n\t\t\tthis.isAnimating = false;\n\t\t\t_this.removeElement();\n\n\t\t\tthis.top0 = this.left0 = null; // reset state for future updatePosition calls\n\n\t\t\tif (callback) {\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\n\t\tif (this.isFollowing && !this.isAnimating) { // disallow more than one stop animation at a time\n\t\t\tthis.isFollowing = false;\n\n\t\t\t$(document).off('mousemove', this.mousemoveProxy);\n\n\t\t\tif (shouldRevert && revertDuration && !this.isHidden) { // do a revert animation?\n\t\t\t\tthis.isAnimating = true;\n\t\t\t\tthis.el.animate({\n\t\t\t\t\ttop: this.top0,\n\t\t\t\t\tleft: this.left0\n\t\t\t\t}, {\n\t\t\t\t\tduration: revertDuration,\n\t\t\t\t\tcomplete: complete\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcomplete();\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Gets the tracking element. Create it if necessary\n\tgetEl: function() {\n\t\tvar el = this.el;\n\n\t\tif (!el) {\n\t\t\tthis.sourceEl.width(); // hack to force IE8 to compute correct bounding box\n\t\t\tel = this.el = this.sourceEl.clone()\n\t\t\t\t.css({\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tvisibility: '', // in case original element was hidden (commonly through hideEvents())\n\t\t\t\t\tdisplay: this.isHidden ? 'none' : '', // for when initially hidden\n\t\t\t\t\tmargin: 0,\n\t\t\t\t\tright: 'auto', // erase and set width instead\n\t\t\t\t\tbottom: 'auto', // erase and set height instead\n\t\t\t\t\twidth: this.sourceEl.width(), // explicit height in case there was a 'right' value\n\t\t\t\t\theight: this.sourceEl.height(), // explicit width in case there was a 'bottom' value\n\t\t\t\t\topacity: this.options.opacity || '',\n\t\t\t\t\tzIndex: this.options.zIndex\n\t\t\t\t})\n\t\t\t\t.appendTo(this.parentEl);\n\t\t}\n\n\t\treturn el;\n\t},\n\n\n\t// Removes the tracking element if it has already been created\n\tremoveElement: function() {\n\t\tif (this.el) {\n\t\t\tthis.el.remove();\n\t\t\tthis.el = null;\n\t\t}\n\t},\n\n\n\t// Update the CSS position of the tracking element\n\tupdatePosition: function() {\n\t\tvar sourceOffset;\n\t\tvar origin;\n\n\t\tthis.getEl(); // ensure this.el\n\n\t\t// make sure origin info was computed\n\t\tif (this.top0 === null) {\n\t\t\tthis.sourceEl.width(); // hack to force IE8 to compute correct bounding box\n\t\t\tsourceOffset = this.sourceEl.offset();\n\t\t\torigin = this.el.offsetParent().offset();\n\t\t\tthis.top0 = sourceOffset.top - origin.top;\n\t\t\tthis.left0 = sourceOffset.left - origin.left;\n\t\t}\n\n\t\tthis.el.css({\n\t\t\ttop: this.top0 + this.topDelta,\n\t\t\tleft: this.left0 + this.leftDelta\n\t\t});\n\t},\n\n\n\t// Gets called when the user moves the mouse\n\tmousemove: function(ev) {\n\t\tthis.topDelta = ev.pageY - this.mouseY0;\n\t\tthis.leftDelta = ev.pageX - this.mouseX0;\n\n\t\tif (!this.isHidden) {\n\t\t\tthis.updatePosition();\n\t\t}\n\t},\n\n\n\t// Temporarily makes the tracking element invisible. Can be called before following starts\n\thide: function() {\n\t\tif (!this.isHidden) {\n\t\t\tthis.isHidden = true;\n\t\t\tif (this.el) {\n\t\t\t\tthis.el.hide();\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Show the tracking element after it has been temporarily hidden\n\tshow: function() {\n\t\tif (this.isHidden) {\n\t\t\tthis.isHidden = false;\n\t\t\tthis.updatePosition();\n\t\t\tthis.getEl().show();\n\t\t}\n\t}\n\n});\n\n;;\n\n/* An abstract class comprised of a \"grid\" of areas that each represent a specific datetime\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar Grid = FC.Grid = Class.extend({\n\n\tview: null, // a View object\n\tisRTL: null, // shortcut to the view's isRTL option\n\n\tstart: null,\n\tend: null,\n\n\tel: null, // the containing element\n\telsByFill: null, // a hash of jQuery element sets used for rendering each fill. Keyed by fill name.\n\n\texternalDragStartProxy: null, // binds the Grid's scope to externalDragStart (in DayGrid.events)\n\n\t// derived from options\n\teventTimeFormat: null,\n\tdisplayEventTime: null,\n\tdisplayEventEnd: null,\n\n\tminResizeDuration: null, // TODO: hack. set by subclasses. minumum event resize duration\n\n\t// if defined, holds the unit identified (ex: \"year\" or \"month\") that determines the level of granularity\n\t// of the date areas. if not defined, assumes to be day and time granularity.\n\t// TODO: port isTimeScale into same system?\n\tlargeUnit: null,\n\n\n\tconstructor: function(view) {\n\t\tthis.view = view;\n\t\tthis.isRTL = view.opt('isRTL');\n\n\t\tthis.elsByFill = {};\n\t\tthis.externalDragStartProxy = proxy(this, 'externalDragStart');\n\t},\n\n\n\t/* Options\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Generates the format string used for event time text, if not explicitly defined by 'timeFormat'\n\tcomputeEventTimeFormat: function() {\n\t\treturn this.view.opt('smallTimeFormat');\n\t},\n\n\n\t// Determines whether events should have their end times displayed, if not explicitly defined by 'displayEventTime'.\n\t// Only applies to non-all-day events.\n\tcomputeDisplayEventTime: function() {\n\t\treturn true;\n\t},\n\n\n\t// Determines whether events should have their end times displayed, if not explicitly defined by 'displayEventEnd'\n\tcomputeDisplayEventEnd: function() {\n\t\treturn true;\n\t},\n\n\n\t/* Dates\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Tells the grid about what period of time to display.\n\t// Any date-related internal data should be generated.\n\tsetRange: function(range) {\n\t\tthis.start = range.start.clone();\n\t\tthis.end = range.end.clone();\n\n\t\tthis.rangeUpdated();\n\t\tthis.processRangeOptions();\n\t},\n\n\n\t// Called when internal variables that rely on the range should be updated\n\trangeUpdated: function() {\n\t},\n\n\n\t// Updates values that rely on options and also relate to range\n\tprocessRangeOptions: function() {\n\t\tvar view = this.view;\n\t\tvar displayEventTime;\n\t\tvar displayEventEnd;\n\n\t\tthis.eventTimeFormat =\n\t\t\tview.opt('eventTimeFormat') ||\n\t\t\tview.opt('timeFormat') || // deprecated\n\t\t\tthis.computeEventTimeFormat();\n\n\t\tdisplayEventTime = view.opt('displayEventTime');\n\t\tif (displayEventTime == null) {\n\t\t\tdisplayEventTime = this.computeDisplayEventTime(); // might be based off of range\n\t\t}\n\n\t\tdisplayEventEnd = view.opt('displayEventEnd');\n\t\tif (displayEventEnd == null) {\n\t\t\tdisplayEventEnd = this.computeDisplayEventEnd(); // might be based off of range\n\t\t}\n\n\t\tthis.displayEventTime = displayEventTime;\n\t\tthis.displayEventEnd = displayEventEnd;\n\t},\n\n\n\t// Converts a span (has unzoned start/end and any other grid-specific location information)\n\t// into an array of segments (pieces of events whose format is decided by the grid).\n\tspanToSegs: function(span) {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Diffs the two dates, returning a duration, based on granularity of the grid\n\t// TODO: port isTimeScale into this system?\n\tdiffDates: function(a, b) {\n\t\tif (this.largeUnit) {\n\t\t\treturn diffByUnit(a, b, this.largeUnit);\n\t\t}\n\t\telse {\n\t\t\treturn diffDayTime(a, b);\n\t\t}\n\t},\n\n\n\t/* Hit Area\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Called before one or more queryHit calls might happen. Should prepare any cached coordinates for queryHit\n\tprepareHits: function() {\n\t},\n\n\n\t// Called when queryHit calls have subsided. Good place to clear any coordinate caches.\n\treleaseHits: function() {\n\t},\n\n\n\t// Given coordinates from the topleft of the document, return data about the date-related area underneath.\n\t// Can return an object with arbitrary properties (although top/right/left/bottom are encouraged).\n\t// Must have a `grid` property, a reference to this current grid. TODO: avoid this\n\t// The returned object will be processed by getHitSpan and getHitEl.\n\tqueryHit: function(leftOffset, topOffset) {\n\t},\n\n\n\t// Given position-level information about a date-related area within the grid,\n\t// should return an object with at least a start/end date. Can provide other information as well.\n\tgetHitSpan: function(hit) {\n\t},\n\n\n\t// Given position-level information about a date-related area within the grid,\n\t// should return a jQuery element that best represents it. passed to dayClick callback.\n\tgetHitEl: function(hit) {\n\t},\n\n\n\t/* Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Sets the container element that the grid should render inside of.\n\t// Does other DOM-related initializations.\n\tsetElement: function(el) {\n\t\tvar _this = this;\n\n\t\tthis.el = el;\n\n\t\t// attach a handler to the grid's root element.\n\t\t// jQuery will take care of unregistering them when removeElement gets called.\n\t\tel.on('mousedown', function(ev) {\n\t\t\tif (\n\t\t\t\t!$(ev.target).is('.fc-event-container *, .fc-more') && // not an an event element, or \"more..\" link\n\t\t\t\t!$(ev.target).closest('.fc-popover').length // not on a popover (like the \"more..\" events one)\n\t\t\t) {\n\t\t\t\t_this.dayMousedown(ev);\n\t\t\t}\n\t\t});\n\n\t\t// attach event-element-related handlers. in Grid.events\n\t\t// same garbage collection note as above.\n\t\tthis.bindSegHandlers();\n\n\t\tthis.bindGlobalHandlers();\n\t},\n\n\n\t// Removes the grid's container element from the DOM. Undoes any other DOM-related attachments.\n\t// DOES NOT remove any content beforehand (doesn't clear events or call unrenderDates), unlike View\n\tremoveElement: function() {\n\t\tthis.unbindGlobalHandlers();\n\n\t\tthis.el.remove();\n\n\t\t// NOTE: we don't null-out this.el for the same reasons we don't do it within View::removeElement\n\t},\n\n\n\t// Renders the basic structure of grid view before any content is rendered\n\trenderSkeleton: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Renders the grid's date-related content (like areas that represent days/times).\n\t// Assumes setRange has already been called and the skeleton has already been rendered.\n\trenderDates: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Unrenders the grid's date-related content\n\tunrenderDates: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t/* Handlers\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Binds DOM handlers to elements that reside outside the grid, such as the document\n\tbindGlobalHandlers: function() {\n\t\t$(document).on('dragstart sortstart', this.externalDragStartProxy); // jqui\n\t},\n\n\n\t// Unbinds DOM handlers from elements that reside outside the grid\n\tunbindGlobalHandlers: function() {\n\t\t$(document).off('dragstart sortstart', this.externalDragStartProxy); // jqui\n\t},\n\n\n\t// Process a mousedown on an element that represents a day. For day clicking and selecting.\n\tdayMousedown: function(ev) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\t\tvar isSelectable = view.opt('selectable');\n\t\tvar dayClickHit; // null if invalid dayClick\n\t\tvar selectionSpan; // null if invalid selection\n\n\t\t// this listener tracks a mousedown on a day element, and a subsequent drag.\n\t\t// if the drag ends on the same day, it is a 'dayClick'.\n\t\t// if 'selectable' is enabled, this listener also detects selections.\n\t\tvar dragListener = new HitDragListener(this, {\n\t\t\t//distance: 5, // needs more work if we want dayClick to fire correctly\n\t\t\tscroll: view.opt('dragScroll'),\n\t\t\tdragStart: function() {\n\t\t\t\tview.unselect(); // since we could be rendering a new selection, we want to clear any old one\n\t\t\t},\n\t\t\thitOver: function(hit, isOrig, origHit) {\n\t\t\t\tif (origHit) { // click needs to have started on a hit\n\t\t\t\t\tdayClickHit = isOrig ? hit : null; // single-hit selection is a day click\n\t\t\t\t\tif (isSelectable) {\n\t\t\t\t\t\tselectionSpan = _this.computeSelection(\n\t\t\t\t\t\t\t_this.getHitSpan(origHit),\n\t\t\t\t\t\t\t_this.getHitSpan(hit)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (selectionSpan) {\n\t\t\t\t\t\t\t_this.renderSelection(selectionSpan);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (selectionSpan === false) {\n\t\t\t\t\t\t\tdisableCursor();\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\thitOut: function() {\n\t\t\t\tdayClickHit = null;\n\t\t\t\tselectionSpan = null;\n\t\t\t\t_this.unrenderSelection();\n\t\t\t\tenableCursor();\n\t\t\t},\n\t\t\tlistenStop: function(ev) {\n\t\t\t\tif (dayClickHit) {\n\t\t\t\t\tview.triggerDayClick(\n\t\t\t\t\t\t_this.getHitSpan(dayClickHit),\n\t\t\t\t\t\t_this.getHitEl(dayClickHit),\n\t\t\t\t\t\tev\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (selectionSpan) {\n\t\t\t\t\t// the selection will already have been rendered. just report it\n\t\t\t\t\tview.reportSelection(selectionSpan, ev);\n\t\t\t\t}\n\t\t\t\tenableCursor();\n\t\t\t}\n\t\t});\n\n\t\tdragListener.mousedown(ev); // start listening, which will eventually initiate a dragStart\n\t},\n\n\n\t/* Event Helper\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// TODO: should probably move this to Grid.events, like we did event dragging / resizing\n\n\n\t// Renders a mock event at the given event location, which contains zoned start/end properties.\n\trenderEventLocationHelper: function(eventLocation, sourceSeg) {\n\t\tvar fakeEvent = this.fabricateHelperEvent(eventLocation, sourceSeg);\n\n\t\tthis.renderHelper(fakeEvent, sourceSeg); // do the actual rendering\n\t},\n\n\n\t// Builds a fake event given zoned event date properties and a segment is should be inspired from.\n\t// The range's end can be null, in which case the mock event that is rendered will have a null end time.\n\t// `sourceSeg` is the internal segment object involved in the drag. If null, something external is dragging.\n\tfabricateHelperEvent: function(eventLocation, sourceSeg) {\n\t\tvar fakeEvent = sourceSeg ? createObject(sourceSeg.event) : {}; // mask the original event object if possible\n\n\t\tfakeEvent.start = eventLocation.start.clone();\n\t\tfakeEvent.end = eventLocation.end ? eventLocation.end.clone() : null;\n\t\tfakeEvent.allDay = null; // force it to be freshly computed by normalizeEventDates\n\t\tthis.view.calendar.normalizeEventDates(fakeEvent);\n\n\t\t// this extra className will be useful for differentiating real events from mock events in CSS\n\t\tfakeEvent.className = (fakeEvent.className || []).concat('fc-helper');\n\n\t\t// if something external is being dragged in, don't render a resizer\n\t\tif (!sourceSeg) {\n\t\t\tfakeEvent.editable = false;\n\t\t}\n\n\t\treturn fakeEvent;\n\t},\n\n\n\t// Renders a mock event. Given zoned event date properties.\n\trenderHelper: function(eventLocation, sourceSeg) {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Unrenders a mock event\n\tunrenderHelper: function() {\n\t\t// subclasses must implement\n\t},\n\n\n\t/* Selection\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of a selection. Will highlight by default but can be overridden by subclasses.\n\t// Given a span (unzoned start/end and other misc data)\n\trenderSelection: function(span) {\n\t\tthis.renderHighlight(span);\n\t},\n\n\n\t// Unrenders any visual indications of a selection. Will unrender a highlight by default.\n\tunrenderSelection: function() {\n\t\tthis.unrenderHighlight();\n\t},\n\n\n\t// Given the first and last date-spans of a selection, returns another date-span object.\n\t// Subclasses can override and provide additional data in the span object. Will be passed to renderSelection().\n\t// Will return false if the selection is invalid and this should be indicated to the user.\n\t// Will return null/undefined if a selection invalid but no error should be reported.\n\tcomputeSelection: function(span0, span1) {\n\t\tvar span = this.computeSelectionSpan(span0, span1);\n\n\t\tif (span && !this.view.calendar.isSelectionSpanAllowed(span)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn span;\n\t},\n\n\n\t// Given two spans, must return the combination of the two.\n\t// TODO: do this separation of concerns (combining VS validation) for event dnd/resize too.\n\tcomputeSelectionSpan: function(span0, span1) {\n\t\tvar dates = [ span0.start, span0.end, span1.start, span1.end ];\n\n\t\tdates.sort(compareNumbers); // sorts chronologically. works with Moments\n\n\t\treturn { start: dates[0].clone(), end: dates[3].clone() };\n\t},\n\n\n\t/* Highlight\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders an emphasis on the given date range. Given a span (unzoned start/end and other misc data)\n\trenderHighlight: function(span) {\n\t\tthis.renderFill('highlight', this.spanToSegs(span));\n\t},\n\n\n\t// Unrenders the emphasis on a date range\n\tunrenderHighlight: function() {\n\t\tthis.unrenderFill('highlight');\n\t},\n\n\n\t// Generates an array of classNames for rendering the highlight. Used by the fill system.\n\thighlightSegClasses: function() {\n\t\treturn [ 'fc-highlight' ];\n\t},\n\n\n\t/* Fill System (highlight, background events, business hours)\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a set of rectangles over the given segments of time.\n\t// MUST RETURN a subset of segs, the segs that were actually rendered.\n\t// Responsible for populating this.elsByFill. TODO: better API for expressing this requirement\n\trenderFill: function(type, segs) {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Unrenders a specific type of fill that is currently rendered on the grid\n\tunrenderFill: function(type) {\n\t\tvar el = this.elsByFill[type];\n\n\t\tif (el) {\n\t\t\tel.remove();\n\t\t\tdelete this.elsByFill[type];\n\t\t}\n\t},\n\n\n\t// Renders and assigns an `el` property for each fill segment. Generic enough to work with different types.\n\t// Only returns segments that successfully rendered.\n\t// To be harnessed by renderFill (implemented by subclasses).\n\t// Analagous to renderFgSegEls.\n\trenderFillSegEls: function(type, segs) {\n\t\tvar _this = this;\n\t\tvar segElMethod = this[type + 'SegEl'];\n\t\tvar html = '';\n\t\tvar renderedSegs = [];\n\t\tvar i;\n\n\t\tif (segs.length) {\n\n\t\t\t// build a large concatenation of segment HTML\n\t\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\t\thtml += this.fillSegHtml(type, segs[i]);\n\t\t\t}\n\n\t\t\t// Grab individual elements from the combined HTML string. Use each as the default rendering.\n\t\t\t// Then, compute the 'el' for each segment.\n\t\t\t$(html).each(function(i, node) {\n\t\t\t\tvar seg = segs[i];\n\t\t\t\tvar el = $(node);\n\n\t\t\t\t// allow custom filter methods per-type\n\t\t\t\tif (segElMethod) {\n\t\t\t\t\tel = segElMethod.call(_this, seg, el);\n\t\t\t\t}\n\n\t\t\t\tif (el) { // custom filters did not cancel the render\n\t\t\t\t\tel = $(el); // allow custom filter to return raw DOM node\n\n\t\t\t\t\t// correct element type? (would be bad if a non-TD were inserted into a table for example)\n\t\t\t\t\tif (el.is(_this.fillSegTag)) {\n\t\t\t\t\t\tseg.el = el;\n\t\t\t\t\t\trenderedSegs.push(seg);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn renderedSegs;\n\t},\n\n\n\tfillSegTag: 'div', // subclasses can override\n\n\n\t// Builds the HTML needed for one fill segment. Generic enought o work with different types.\n\tfillSegHtml: function(type, seg) {\n\n\t\t// custom hooks per-type\n\t\tvar classesMethod = this[type + 'SegClasses'];\n\t\tvar cssMethod = this[type + 'SegCss'];\n\n\t\tvar classes = classesMethod ? classesMethod.call(this, seg) : [];\n\t\tvar css = cssToStr(cssMethod ? cssMethod.call(this, seg) : {});\n\n\t\treturn '<' + this.fillSegTag +\n\t\t\t(classes.length ? ' class=\"' + classes.join(' ') + '\"' : '') +\n\t\t\t(css ? ' style=\"' + css + '\"' : '') +\n\t\t\t' />';\n\t},\n\n\n\n\t/* Generic rendering utilities for subclasses\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Computes HTML classNames for a single-day element\n\tgetDayClasses: function(date) {\n\t\tvar view = this.view;\n\t\tvar today = view.calendar.getNow().stripTime();\n\t\tvar classes = [ 'fc-' + dayIDs[date.day()] ];\n\n\t\tif (\n\t\t\tview.intervalDuration.as('months') == 1 &&\n\t\t\tdate.month() != view.intervalStart.month()\n\t\t) {\n\t\t\tclasses.push('fc-other-month');\n\t\t}\n\n\t\tif (date.isSame(today, 'day')) {\n\t\t\tclasses.push(\n\t\t\t\t'fc-today',\n\t\t\t\tview.highlightStateClass\n\t\t\t);\n\t\t}\n\t\telse if (date < today) {\n\t\t\tclasses.push('fc-past');\n\t\t}\n\t\telse {\n\t\t\tclasses.push('fc-future');\n\t\t}\n\n\t\treturn classes;\n\t}\n\n});\n\n;;\n\n/* Event-rendering and event-interaction methods for the abstract Grid class\n----------------------------------------------------------------------------------------------------------------------*/\n\nGrid.mixin({\n\n\tmousedOverSeg: null, // the segment object the user's mouse is over. null if over nothing\n\tisDraggingSeg: false, // is a segment being dragged? boolean\n\tisResizingSeg: false, // is a segment being resized? boolean\n\tisDraggingExternal: false, // jqui-dragging an external element? boolean\n\tsegs: null, // the event segments currently rendered in the grid\n\n\n\t// Renders the given events onto the grid\n\trenderEvents: function(events) {\n\t\tvar bgEvents = [];\n\t\tvar fgEvents = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < events.length; i++) {\n\t\t\t(isBgEvent(events[i]) ? bgEvents : fgEvents).push(events[i]);\n\t\t}\n\n\t\tthis.segs = [].concat( // record all segs\n\t\t\tthis.renderBgEvents(bgEvents),\n\t\t\tthis.renderFgEvents(fgEvents)\n\t\t);\n\t},\n\n\n\trenderBgEvents: function(events) {\n\t\tvar segs = this.eventsToSegs(events);\n\n\t\t// renderBgSegs might return a subset of segs, segs that were actually rendered\n\t\treturn this.renderBgSegs(segs) || segs;\n\t},\n\n\n\trenderFgEvents: function(events) {\n\t\tvar segs = this.eventsToSegs(events);\n\n\t\t// renderFgSegs might return a subset of segs, segs that were actually rendered\n\t\treturn this.renderFgSegs(segs) || segs;\n\t},\n\n\n\t// Unrenders all events currently rendered on the grid\n\tunrenderEvents: function() {\n\t\tthis.triggerSegMouseout(); // trigger an eventMouseout if user's mouse is over an event\n\n\t\tthis.unrenderFgSegs();\n\t\tthis.unrenderBgSegs();\n\n\t\tthis.segs = null;\n\t},\n\n\n\t// Retrieves all rendered segment objects currently rendered on the grid\n\tgetEventSegs: function() {\n\t\treturn this.segs || [];\n\t},\n\n\n\t/* Foreground Segment Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders foreground event segments onto the grid. May return a subset of segs that were rendered.\n\trenderFgSegs: function(segs) {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Unrenders all currently rendered foreground segments\n\tunrenderFgSegs: function() {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Renders and assigns an `el` property for each foreground event segment.\n\t// Only returns segments that successfully rendered.\n\t// A utility that subclasses may use.\n\trenderFgSegEls: function(segs, disableResizing) {\n\t\tvar view = this.view;\n\t\tvar html = '';\n\t\tvar renderedSegs = [];\n\t\tvar i;\n\n\t\tif (segs.length) { // don't build an empty html string\n\n\t\t\t// build a large concatenation of event segment HTML\n\t\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\t\thtml += this.fgSegHtml(segs[i], disableResizing);\n\t\t\t}\n\n\t\t\t// Grab individual elements from the combined HTML string. Use each as the default rendering.\n\t\t\t// Then, compute the 'el' for each segment. An el might be null if the eventRender callback returned false.\n\t\t\t$(html).each(function(i, node) {\n\t\t\t\tvar seg = segs[i];\n\t\t\t\tvar el = view.resolveEventEl(seg.event, $(node));\n\n\t\t\t\tif (el) {\n\t\t\t\t\tel.data('fc-seg', seg); // used by handlers\n\t\t\t\t\tseg.el = el;\n\t\t\t\t\trenderedSegs.push(seg);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn renderedSegs;\n\t},\n\n\n\t// Generates the HTML for the default rendering of a foreground event segment. Used by renderFgSegEls()\n\tfgSegHtml: function(seg, disableResizing) {\n\t\t// subclasses should implement\n\t},\n\n\n\t/* Background Segment Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders the given background event segments onto the grid.\n\t// Returns a subset of the segs that were actually rendered.\n\trenderBgSegs: function(segs) {\n\t\treturn this.renderFill('bgEvent', segs);\n\t},\n\n\n\t// Unrenders all the currently rendered background event segments\n\tunrenderBgSegs: function() {\n\t\tthis.unrenderFill('bgEvent');\n\t},\n\n\n\t// Renders a background event element, given the default rendering. Called by the fill system.\n\tbgEventSegEl: function(seg, el) {\n\t\treturn this.view.resolveEventEl(seg.event, el); // will filter through eventRender\n\t},\n\n\n\t// Generates an array of classNames to be used for the default rendering of a background event.\n\t// Called by the fill system.\n\tbgEventSegClasses: function(seg) {\n\t\tvar event = seg.event;\n\t\tvar source = event.source || {};\n\n\t\treturn [ 'fc-bgevent' ].concat(\n\t\t\tevent.className,\n\t\t\tsource.className || []\n\t\t);\n\t},\n\n\n\t// Generates a semicolon-separated CSS string to be used for the default rendering of a background event.\n\t// Called by the fill system.\n\t// TODO: consolidate with getEventSkinCss?\n\tbgEventSegCss: function(seg) {\n\t\tvar view = this.view;\n\t\tvar event = seg.event;\n\t\tvar source = event.source || {};\n\n\t\treturn {\n\t\t\t'background-color':\n\t\t\t\tevent.backgroundColor ||\n\t\t\t\tevent.color ||\n\t\t\t\tsource.backgroundColor ||\n\t\t\t\tsource.color ||\n\t\t\t\tview.opt('eventBackgroundColor') ||\n\t\t\t\tview.opt('eventColor')\n\t\t};\n\t},\n\n\n\t// Generates an array of classNames to be used for the rendering business hours overlay. Called by the fill system.\n\tbusinessHoursSegClasses: function(seg) {\n\t\treturn [ 'fc-nonbusiness', 'fc-bgevent' ];\n\t},\n\n\n\t/* Handlers\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Attaches event-element-related handlers to the container element and leverage bubbling\n\tbindSegHandlers: function() {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\n\t\t$.each(\n\t\t\t{\n\t\t\t\tmouseenter: function(seg, ev) {\n\t\t\t\t\t_this.triggerSegMouseover(seg, ev);\n\t\t\t\t},\n\t\t\t\tmouseleave: function(seg, ev) {\n\t\t\t\t\t_this.triggerSegMouseout(seg, ev);\n\t\t\t\t},\n\t\t\t\tclick: function(seg, ev) {\n\t\t\t\t\treturn view.trigger('eventClick', this, seg.event, ev); // can return `false` to cancel\n\t\t\t\t},\n\t\t\t\tmousedown: function(seg, ev) {\n\t\t\t\t\tif ($(ev.target).is('.fc-resizer') && view.isEventResizable(seg.event)) {\n\t\t\t\t\t\t_this.segResizeMousedown(seg, ev, $(ev.target).is('.fc-start-resizer'));\n\t\t\t\t\t}\n\t\t\t\t\telse if (view.isEventDraggable(seg.event)) {\n\t\t\t\t\t\t_this.segDragMousedown(seg, ev);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction(name, func) {\n\t\t\t\t// attach the handler to the container element and only listen for real event elements via bubbling\n\t\t\t\t_this.el.on(name, '.fc-event-container > *', function(ev) {\n\t\t\t\t\tvar seg = $(this).data('fc-seg'); // grab segment data. put there by View::renderEvents\n\n\t\t\t\t\t// only call the handlers if there is not a drag/resize in progress\n\t\t\t\t\tif (seg && !_this.isDraggingSeg && !_this.isResizingSeg) {\n\t\t\t\t\t\treturn func.call(this, seg, ev); // `this` will be the event element\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t},\n\n\n\t// Updates internal state and triggers handlers for when an event element is moused over\n\ttriggerSegMouseover: function(seg, ev) {\n\t\tif (!this.mousedOverSeg) {\n\t\t\tthis.mousedOverSeg = seg;\n\t\t\tthis.view.trigger('eventMouseover', seg.el[0], seg.event, ev);\n\t\t}\n\t},\n\n\n\t// Updates internal state and triggers handlers for when an event element is moused out.\n\t// Can be given no arguments, in which case it will mouseout the segment that was previously moused over.\n\ttriggerSegMouseout: function(seg, ev) {\n\t\tev = ev || {}; // if given no args, make a mock mouse event\n\n\t\tif (this.mousedOverSeg) {\n\t\t\tseg = seg || this.mousedOverSeg; // if given no args, use the currently moused-over segment\n\t\t\tthis.mousedOverSeg = null;\n\t\t\tthis.view.trigger('eventMouseout', seg.el[0], seg.event, ev);\n\t\t}\n\t},\n\n\n\t/* Event Dragging\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Called when the user does a mousedown on an event, which might lead to dragging.\n\t// Generic enough to work with any type of Grid.\n\tsegDragMousedown: function(seg, ev) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\t\tvar calendar = view.calendar;\n\t\tvar el = seg.el;\n\t\tvar event = seg.event;\n\t\tvar dropLocation; // zoned event date properties\n\n\t\t// A clone of the original element that will move with the mouse\n\t\tvar mouseFollower = new MouseFollower(seg.el, {\n\t\t\tparentEl: view.el,\n\t\t\topacity: view.opt('dragOpacity'),\n\t\t\trevertDuration: view.opt('dragRevertDuration'),\n\t\t\tzIndex: 2 // one above the .fc-view\n\t\t});\n\n\t\t// Tracks mouse movement over the *view's* coordinate map. Allows dragging and dropping between subcomponents\n\t\t// of the view.\n\t\tvar dragListener = new HitDragListener(view, {\n\t\t\tdistance: 5,\n\t\t\tscroll: view.opt('dragScroll'),\n\t\t\tsubjectEl: el,\n\t\t\tsubjectCenter: true,\n\t\t\tlistenStart: function(ev) {\n\t\t\t\tmouseFollower.hide(); // don't show until we know this is a real drag\n\t\t\t\tmouseFollower.start(ev);\n\t\t\t},\n\t\t\tdragStart: function(ev) {\n\t\t\t\t_this.triggerSegMouseout(seg, ev); // ensure a mouseout on the manipulated event has been reported\n\t\t\t\t_this.segDragStart(seg, ev);\n\t\t\t\tview.hideEvent(event); // hide all event segments. our mouseFollower will take over\n\t\t\t},\n\t\t\thitOver: function(hit, isOrig, origHit) {\n\n\t\t\t\t// starting hit could be forced (DayGrid.limit)\n\t\t\t\tif (seg.hit) {\n\t\t\t\t\torigHit = seg.hit;\n\t\t\t\t}\n\n\t\t\t\t// since we are querying the parent view, might not belong to this grid\n\t\t\t\tdropLocation = _this.computeEventDrop(\n\t\t\t\t\torigHit.component.getHitSpan(origHit),\n\t\t\t\t\thit.component.getHitSpan(hit),\n\t\t\t\t\tevent\n\t\t\t\t);\n\n\t\t\t\tif (dropLocation &&!calendar.isEventSpanAllowed(_this.eventToSpan(dropLocation), event)) {\n\t\t\t\t\tdisableCursor();\n\t\t\t\t\tdropLocation = null;\n\t\t\t\t}\n\n\t\t\t\t// if a valid drop location, have the subclass render a visual indication\n\t\t\t\tif (dropLocation && view.renderDrag(dropLocation, seg)) {\n\t\t\t\t\tmouseFollower.hide(); // if the subclass is already using a mock event \"helper\", hide our own\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmouseFollower.show(); // otherwise, have the helper follow the mouse (no snapping)\n\t\t\t\t}\n\n\t\t\t\tif (isOrig) {\n\t\t\t\t\tdropLocation = null; // needs to have moved hits to be a valid drop\n\t\t\t\t}\n\t\t\t},\n\t\t\thitOut: function() { // called before mouse moves to a different hit OR moved out of all hits\n\t\t\t\tview.unrenderDrag(); // unrender whatever was done in renderDrag\n\t\t\t\tmouseFollower.show(); // show in case we are moving out of all hits\n\t\t\t\tdropLocation = null;\n\t\t\t},\n\t\t\thitDone: function() { // Called after a hitOut OR before a dragStop\n\t\t\t\tenableCursor();\n\t\t\t},\n\t\t\tdragStop: function(ev) {\n\t\t\t\t// do revert animation if hasn't changed. calls a callback when finished (whether animation or not)\n\t\t\t\tmouseFollower.stop(!dropLocation, function() {\n\t\t\t\t\tview.unrenderDrag();\n\t\t\t\t\tview.showEvent(event);\n\t\t\t\t\t_this.segDragStop(seg, ev);\n\n\t\t\t\t\tif (dropLocation) {\n\t\t\t\t\t\tview.reportEventDrop(event, dropLocation, this.largeUnit, el, ev);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\tlistenStop: function() {\n\t\t\t\tmouseFollower.stop(); // put in listenStop in case there was a mousedown but the drag never started\n\t\t\t}\n\t\t});\n\n\t\tdragListener.mousedown(ev); // start listening, which will eventually lead to a dragStart\n\t},\n\n\n\t// Called before event segment dragging starts\n\tsegDragStart: function(seg, ev) {\n\t\tthis.isDraggingSeg = true;\n\t\tthis.view.trigger('eventDragStart', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy\n\t},\n\n\n\t// Called after event segment dragging stops\n\tsegDragStop: function(seg, ev) {\n\t\tthis.isDraggingSeg = false;\n\t\tthis.view.trigger('eventDragStop', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy\n\t},\n\n\n\t// Given the spans an event drag began, and the span event was dropped, calculates the new zoned start/end/allDay\n\t// values for the event. Subclasses may override and set additional properties to be used by renderDrag.\n\t// A falsy returned value indicates an invalid drop.\n\tcomputeEventDrop: function(startSpan, endSpan, event) {\n\t\tvar calendar = this.view.calendar;\n\t\tvar dragStart = startSpan.start;\n\t\tvar dragEnd = endSpan.start;\n\t\tvar delta;\n\t\tvar dropLocation; // zoned event date properties\n\n\t\tif (dragStart.hasTime() === dragEnd.hasTime()) {\n\t\t\tdelta = this.diffDates(dragEnd, dragStart);\n\n\t\t\t// if an all-day event was in a timed area and it was dragged to a different time,\n\t\t\t// guarantee an end and adjust start/end to have times\n\t\t\tif (event.allDay && durationHasTime(delta)) {\n\t\t\t\tdropLocation = {\n\t\t\t\t\tstart: event.start.clone(),\n\t\t\t\t\tend: calendar.getEventEnd(event), // will be an ambig day\n\t\t\t\t\tallDay: false // for normalizeEventTimes\n\t\t\t\t};\n\t\t\t\tcalendar.normalizeEventTimes(dropLocation);\n\t\t\t}\n\t\t\t// othewise, work off existing values\n\t\t\telse {\n\t\t\t\tdropLocation = {\n\t\t\t\t\tstart: event.start.clone(),\n\t\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\t\tallDay: event.allDay // keep it the same\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tdropLocation.start.add(delta);\n\t\t\tif (dropLocation.end) {\n\t\t\t\tdropLocation.end.add(delta);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// if switching from day <-> timed, start should be reset to the dropped date, and the end cleared\n\t\t\tdropLocation = {\n\t\t\t\tstart: dragEnd.clone(),\n\t\t\t\tend: null, // end should be cleared\n\t\t\t\tallDay: !dragEnd.hasTime()\n\t\t\t};\n\t\t}\n\n\t\treturn dropLocation;\n\t},\n\n\n\t// Utility for apply dragOpacity to a jQuery set\n\tapplyDragOpacity: function(els) {\n\t\tvar opacity = this.view.opt('dragOpacity');\n\n\t\tif (opacity != null) {\n\t\t\tels.each(function(i, node) {\n\t\t\t\t// Don't use jQuery (will set an IE filter), do it the old fashioned way.\n\t\t\t\t// In IE8, a helper element will disappears if there's a filter.\n\t\t\t\tnode.style.opacity = opacity;\n\t\t\t});\n\t\t}\n\t},\n\n\n\t/* External Element Dragging\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Called when a jQuery UI drag is initiated anywhere in the DOM\n\texternalDragStart: function(ev, ui) {\n\t\tvar view = this.view;\n\t\tvar el;\n\t\tvar accept;\n\n\t\tif (view.opt('droppable')) { // only listen if this setting is on\n\t\t\tel = $((ui ? ui.item : null) || ev.target);\n\n\t\t\t// Test that the dragged element passes the dropAccept selector or filter function.\n\t\t\t// FYI, the default is \"*\" (matches all)\n\t\t\taccept = view.opt('dropAccept');\n\t\t\tif ($.isFunction(accept) ? accept.call(el[0], el) : el.is(accept)) {\n\t\t\t\tif (!this.isDraggingExternal) { // prevent double-listening if fired twice\n\t\t\t\t\tthis.listenToExternalDrag(el, ev, ui);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Called when a jQuery UI drag starts and it needs to be monitored for dropping\n\tlistenToExternalDrag: function(el, ev, ui) {\n\t\tvar _this = this;\n\t\tvar meta = getDraggedElMeta(el); // extra data about event drop, including possible event to create\n\t\tvar dropLocation; // a null value signals an unsuccessful drag\n\n\t\t// listener that tracks mouse movement over date-associated pixel regions\n\t\tvar dragListener = new HitDragListener(this, {\n\t\t\tlistenStart: function() {\n\t\t\t\t_this.isDraggingExternal = true;\n\t\t\t},\n\t\t\thitOver: function(hit) {\n\t\t\t\tdropLocation = _this.computeExternalDrop(\n\t\t\t\t\thit.component.getHitSpan(hit), // since we are querying the parent view, might not belong to this grid\n\t\t\t\t\tmeta\n\t\t\t\t);\n\t\t\t\tif (dropLocation) {\n\t\t\t\t\t_this.renderDrag(dropLocation); // called without a seg parameter\n\t\t\t\t}\n\t\t\t\telse { // invalid hit\n\t\t\t\t\tdisableCursor();\n\t\t\t\t}\n\t\t\t},\n\t\t\thitOut: function() {\n\t\t\t\tdropLocation = null; // signal unsuccessful\n\t\t\t\t_this.unrenderDrag();\n\t\t\t\tenableCursor();\n\t\t\t},\n\t\t\tdragStop: function() {\n\t\t\t\t_this.unrenderDrag();\n\t\t\t\tenableCursor();\n\n\t\t\t\tif (dropLocation) { // element was dropped on a valid hit\n\t\t\t\t\t_this.view.reportExternalDrop(meta, dropLocation, el, ev, ui);\n\t\t\t\t}\n\t\t\t},\n\t\t\tlistenStop: function() {\n\t\t\t\t_this.isDraggingExternal = false;\n\t\t\t}\n\t\t});\n\n\t\tdragListener.startDrag(ev); // start listening immediately\n\t},\n\n\n\t// Given a hit to be dropped upon, and misc data associated with the jqui drag (guaranteed to be a plain object),\n\t// returns the zoned start/end dates for the event that would result from the hypothetical drop. end might be null.\n\t// Returning a null value signals an invalid drop hit.\n\tcomputeExternalDrop: function(span, meta) {\n\t\tvar calendar = this.view.calendar;\n\t\tvar dropLocation = {\n\t\t\tstart: calendar.applyTimezone(span.start), // simulate a zoned event start date\n\t\t\tend: null\n\t\t};\n\n\t\t// if dropped on an all-day span, and element's metadata specified a time, set it\n\t\tif (meta.startTime && !dropLocation.start.hasTime()) {\n\t\t\tdropLocation.start.time(meta.startTime);\n\t\t}\n\n\t\tif (meta.duration) {\n\t\t\tdropLocation.end = dropLocation.start.clone().add(meta.duration);\n\t\t}\n\n\t\tif (!calendar.isExternalSpanAllowed(this.eventToSpan(dropLocation), dropLocation, meta.eventProps)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn dropLocation;\n\t},\n\n\n\n\t/* Drag Rendering (for both events and an external elements)\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of an event or external element being dragged.\n\t// `dropLocation` contains hypothetical start/end/allDay values the event would have if dropped. end can be null.\n\t// `seg` is the internal segment object that is being dragged. If dragging an external element, `seg` is null.\n\t// A truthy returned value indicates this method has rendered a helper element.\n\trenderDrag: function(dropLocation, seg) {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Unrenders a visual indication of an event or external element being dragged\n\tunrenderDrag: function() {\n\t\t// subclasses must implement\n\t},\n\n\n\t/* Resizing\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Called when the user does a mousedown on an event's resizer, which might lead to resizing.\n\t// Generic enough to work with any type of Grid.\n\tsegResizeMousedown: function(seg, ev, isStart) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\t\tvar calendar = view.calendar;\n\t\tvar el = seg.el;\n\t\tvar event = seg.event;\n\t\tvar eventEnd = calendar.getEventEnd(event);\n\t\tvar resizeLocation; // zoned event date properties. falsy if invalid resize\n\n\t\t// Tracks mouse movement over the *grid's* coordinate map\n\t\tvar dragListener = new HitDragListener(this, {\n\t\t\tdistance: 5,\n\t\t\tscroll: view.opt('dragScroll'),\n\t\t\tsubjectEl: el,\n\t\t\tdragStart: function(ev) {\n\t\t\t\t_this.triggerSegMouseout(seg, ev); // ensure a mouseout on the manipulated event has been reported\n\t\t\t\t_this.segResizeStart(seg, ev);\n\t\t\t},\n\t\t\thitOver: function(hit, isOrig, origHit) {\n\t\t\t\tvar origHitSpan = _this.getHitSpan(origHit);\n\t\t\t\tvar hitSpan = _this.getHitSpan(hit);\n\n\t\t\t\tresizeLocation = isStart ?\n\t\t\t\t\t_this.computeEventStartResize(origHitSpan, hitSpan, event) :\n\t\t\t\t\t_this.computeEventEndResize(origHitSpan, hitSpan, event);\n\n\t\t\t\tif (resizeLocation) {\n\t\t\t\t\tif (!calendar.isEventSpanAllowed(_this.eventToSpan(resizeLocation), event)) {\n\t\t\t\t\t\tdisableCursor();\n\t\t\t\t\t\tresizeLocation = null;\n\t\t\t\t\t}\n\t\t\t\t\t// no change? (TODO: how does this work with timezones?)\n\t\t\t\t\telse if (resizeLocation.start.isSame(event.start) && resizeLocation.end.isSame(eventEnd)) {\n\t\t\t\t\t\tresizeLocation = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (resizeLocation) {\n\t\t\t\t\tview.hideEvent(event);\n\t\t\t\t\t_this.renderEventResize(resizeLocation, seg);\n\t\t\t\t}\n\t\t\t},\n\t\t\thitOut: function() { // called before mouse moves to a different hit OR moved out of all hits\n\t\t\t\tresizeLocation = null;\n\t\t\t},\n\t\t\thitDone: function() { // resets the rendering to show the original event\n\t\t\t\t_this.unrenderEventResize();\n\t\t\t\tview.showEvent(event);\n\t\t\t\tenableCursor();\n\t\t\t},\n\t\t\tdragStop: function(ev) {\n\t\t\t\t_this.segResizeStop(seg, ev);\n\n\t\t\t\tif (resizeLocation) { // valid date to resize to?\n\t\t\t\t\tview.reportEventResize(event, resizeLocation, this.largeUnit, el, ev);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tdragListener.mousedown(ev); // start listening, which will eventually lead to a dragStart\n\t},\n\n\n\t// Called before event segment resizing starts\n\tsegResizeStart: function(seg, ev) {\n\t\tthis.isResizingSeg = true;\n\t\tthis.view.trigger('eventResizeStart', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy\n\t},\n\n\n\t// Called after event segment resizing stops\n\tsegResizeStop: function(seg, ev) {\n\t\tthis.isResizingSeg = false;\n\t\tthis.view.trigger('eventResizeStop', seg.el[0], seg.event, ev, {}); // last argument is jqui dummy\n\t},\n\n\n\t// Returns new date-information for an event segment being resized from its start\n\tcomputeEventStartResize: function(startSpan, endSpan, event) {\n\t\treturn this.computeEventResize('start', startSpan, endSpan, event);\n\t},\n\n\n\t// Returns new date-information for an event segment being resized from its end\n\tcomputeEventEndResize: function(startSpan, endSpan, event) {\n\t\treturn this.computeEventResize('end', startSpan, endSpan, event);\n\t},\n\n\n\t// Returns new zoned date information for an event segment being resized from its start OR end\n\t// `type` is either 'start' or 'end'\n\tcomputeEventResize: function(type, startSpan, endSpan, event) {\n\t\tvar calendar = this.view.calendar;\n\t\tvar delta = this.diffDates(endSpan[type], startSpan[type]);\n\t\tvar resizeLocation; // zoned event date properties\n\t\tvar defaultDuration;\n\n\t\t// build original values to work from, guaranteeing a start and end\n\t\tresizeLocation = {\n\t\t\tstart: event.start.clone(),\n\t\t\tend: calendar.getEventEnd(event),\n\t\t\tallDay: event.allDay\n\t\t};\n\n\t\t// if an all-day event was in a timed area and was resized to a time, adjust start/end to have times\n\t\tif (resizeLocation.allDay && durationHasTime(delta)) {\n\t\t\tresizeLocation.allDay = false;\n\t\t\tcalendar.normalizeEventTimes(resizeLocation);\n\t\t}\n\n\t\tresizeLocation[type].add(delta); // apply delta to start or end\n\n\t\t// if the event was compressed too small, find a new reasonable duration for it\n\t\tif (!resizeLocation.start.isBefore(resizeLocation.end)) {\n\n\t\t\tdefaultDuration =\n\t\t\t\tthis.minResizeDuration || // TODO: hack\n\t\t\t\t(event.allDay ?\n\t\t\t\t\tcalendar.defaultAllDayEventDuration :\n\t\t\t\t\tcalendar.defaultTimedEventDuration);\n\n\t\t\tif (type == 'start') { // resizing the start?\n\t\t\t\tresizeLocation.start = resizeLocation.end.clone().subtract(defaultDuration);\n\t\t\t}\n\t\t\telse { // resizing the end?\n\t\t\t\tresizeLocation.end = resizeLocation.start.clone().add(defaultDuration);\n\t\t\t}\n\t\t}\n\n\t\treturn resizeLocation;\n\t},\n\n\n\t// Renders a visual indication of an event being resized.\n\t// `range` has the updated dates of the event. `seg` is the original segment object involved in the drag.\n\trenderEventResize: function(range, seg) {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Unrenders a visual indication of an event being resized.\n\tunrenderEventResize: function() {\n\t\t// subclasses must implement\n\t},\n\n\n\t/* Rendering Utils\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Compute the text that should be displayed on an event's element.\n\t// `range` can be the Event object itself, or something range-like, with at least a `start`.\n\t// If event times are disabled, or the event has no time, will return a blank string.\n\t// If not specified, formatStr will default to the eventTimeFormat setting,\n\t// and displayEnd will default to the displayEventEnd setting.\n\tgetEventTimeText: function(range, formatStr, displayEnd) {\n\n\t\tif (formatStr == null) {\n\t\t\tformatStr = this.eventTimeFormat;\n\t\t}\n\n\t\tif (displayEnd == null) {\n\t\t\tdisplayEnd = this.displayEventEnd;\n\t\t}\n\n\t\tif (this.displayEventTime && range.start.hasTime()) {\n\t\t\tif (displayEnd && range.end) {\n\t\t\t\treturn this.view.formatRange(range, formatStr);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn range.start.format(formatStr);\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t},\n\n\n\t// Generic utility for generating the HTML classNames for an event segment's element\n\tgetSegClasses: function(seg, isDraggable, isResizable) {\n\t\tvar event = seg.event;\n\t\tvar classes = [\n\t\t\t'fc-event',\n\t\t\tseg.isStart ? 'fc-start' : 'fc-not-start',\n\t\t\tseg.isEnd ? 'fc-end' : 'fc-not-end'\n\t\t].concat(\n\t\t\tevent.className,\n\t\t\tevent.source ? event.source.className : []\n\t\t);\n\n\t\tif (isDraggable) {\n\t\t\tclasses.push('fc-draggable');\n\t\t}\n\t\tif (isResizable) {\n\t\t\tclasses.push('fc-resizable');\n\t\t}\n\n\t\treturn classes;\n\t},\n\n\n\t// Utility for generating event skin-related CSS properties\n\tgetEventSkinCss: function(event) {\n\t\tvar view = this.view;\n\t\tvar source = event.source || {};\n\t\tvar eventColor = event.color;\n\t\tvar sourceColor = source.color;\n\t\tvar optionColor = view.opt('eventColor');\n\n\t\treturn {\n\t\t\t'background-color':\n\t\t\t\tevent.backgroundColor ||\n\t\t\t\teventColor ||\n\t\t\t\tsource.backgroundColor ||\n\t\t\t\tsourceColor ||\n\t\t\t\tview.opt('eventBackgroundColor') ||\n\t\t\t\toptionColor,\n\t\t\t'border-color':\n\t\t\t\tevent.borderColor ||\n\t\t\t\teventColor ||\n\t\t\t\tsource.borderColor ||\n\t\t\t\tsourceColor ||\n\t\t\t\tview.opt('eventBorderColor') ||\n\t\t\t\toptionColor,\n\t\t\tcolor:\n\t\t\t\tevent.textColor ||\n\t\t\t\tsource.textColor ||\n\t\t\t\tview.opt('eventTextColor')\n\t\t};\n\t},\n\n\n\t/* Converting events -> eventRange -> eventSpan -> eventSegs\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Generates an array of segments for the given single event\n\teventToSegs: function(event) {\n\t\treturn this.eventsToSegs([ event ]);\n\t},\n\n\n\t// Generates a single span (always unzoned) by using the given event's dates.\n\t// Does not do any inverting for inverse-background events.\n\teventToSpan: function(event) {\n\t\tvar range = this.eventToRange(event);\n\t\tthis.transformEventSpan(range, event); // convert it to a span, in-place\n\t\treturn range;\n\t},\n\n\n\t// Converts an array of event objects into an array of event segment objects.\n\t// A custom `segSliceFunc` may be given for arbitrarily slicing up events.\n\t// Doesn't guarantee an order for the resulting array.\n\teventsToSegs: function(allEvents, segSliceFunc) {\n\t\tvar _this = this;\n\t\tvar eventsById = groupEventsById(allEvents);\n\t\tvar segs = [];\n\n\t\t$.each(eventsById, function(id, events) {\n\t\t\tvar ranges = [];\n\t\t\tvar i;\n\n\t\t\tfor (i = 0; i < events.length; i++) {\n\t\t\t\tranges.push(_this.eventToRange(events[i]));\n\t\t\t}\n\n\t\t\t// inverse-background events (utilize only the first event in calculations)\n\t\t\tif (isInverseBgEvent(events[0])) {\n\t\t\t\tranges = _this.invertRanges(ranges);\n\n\t\t\t\tfor (i = 0; i < ranges.length; i++) {\n\t\t\t\t\t_this.generateEventSegs(ranges[i], events[0], segSliceFunc, segs);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// normal event ranges\n\t\t\telse {\n\t\t\t\tfor (i = 0; i < ranges.length; i++) {\n\t\t\t\t\t_this.generateEventSegs(ranges[i], events[i], segSliceFunc, segs);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn segs;\n\t},\n\n\n\t// Generates the unzoned start/end dates an event appears to occupy\n\teventToRange: function(event) {\n\t\treturn {\n\t\t\tstart: event.start.clone().stripZone(),\n\t\t\tend: this.view.calendar.getEventEnd(event).stripZone()\n\t\t};\n\t},\n\n\n\t// Given an event's span (unzoned start/end and other misc data), and the event itself,\n\t// slice into segments (using the segSliceFunc function if specified) and append to the `out` array.\n\t// SIDE EFFECT: will mutate the given `range`.\n\tgenerateEventSegs: function(range, event, segSliceFunc, out) {\n\t\tvar segs;\n\t\tvar i;\n\n\t\tthis.transformEventSpan(range, event); // converts the range to a span\n\n\t\tsegs = segSliceFunc ? segSliceFunc(range) : this.spanToSegs(range);\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tthis.transformEventSeg(segs[i], range, event);\n\t\t\tout.push(segs[i]);\n\t\t}\n\t},\n\n\n\t// Given a range (unzoned start/end) that is about to become a span,\n\t// attach any event-derived properties to it.\n\ttransformEventSpan: function(range, event) {\n\t\t// subclasses can implement\n\t},\n\n\n\t// Given a segment object, attach any extra properties, based off of its source span and event.\n\ttransformEventSeg: function(seg, span, event) {\n\t\tseg.event = event;\n\t\tseg.eventStartMS = +span.start; // TODO: not the best name after making spans unzoned\n\t\tseg.eventDurationMS = span.end - span.start;\n\t},\n\n\n\t// Produces a new array of range objects that will cover all the time NOT covered by the given ranges.\n\t// SIDE EFFECT: will mutate the given array and will use its date references.\n\tinvertRanges: function(ranges) {\n\t\tvar view = this.view;\n\t\tvar viewStart = view.start.clone(); // need a copy\n\t\tvar viewEnd = view.end.clone(); // need a copy\n\t\tvar inverseRanges = [];\n\t\tvar start = viewStart; // the end of the previous range. the start of the new range\n\t\tvar i, range;\n\n\t\t// ranges need to be in order. required for our date-walking algorithm\n\t\tranges.sort(compareRanges);\n\n\t\tfor (i = 0; i < ranges.length; i++) {\n\t\t\trange = ranges[i];\n\n\t\t\t// add the span of time before the event (if there is any)\n\t\t\tif (range.start > start) { // compare millisecond time (skip any ambig logic)\n\t\t\t\tinverseRanges.push({\n\t\t\t\t\tstart: start,\n\t\t\t\t\tend: range.start\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tstart = range.end;\n\t\t}\n\n\t\t// add the span of time after the last event (if there is any)\n\t\tif (start < viewEnd) { // compare millisecond time (skip any ambig logic)\n\t\t\tinverseRanges.push({\n\t\t\t\tstart: start,\n\t\t\t\tend: viewEnd\n\t\t\t});\n\t\t}\n\n\t\treturn inverseRanges;\n\t},\n\n\n\tsortEventSegs: function(segs) {\n\t\tsegs.sort(proxy(this, 'compareEventSegs'));\n\t},\n\n\n\t// A cmp function for determining which segments should take visual priority\n\tcompareEventSegs: function(seg1, seg2) {\n\t\treturn seg1.eventStartMS - seg2.eventStartMS || // earlier events go first\n\t\t\tseg2.eventDurationMS - seg1.eventDurationMS || // tie? longer events go first\n\t\t\tseg2.event.allDay - seg1.event.allDay || // tie? put all-day events first (booleans cast to 0/1)\n\t\t\tcompareByFieldSpecs(seg1.event, seg2.event, this.view.eventOrderSpecs);\n\t}\n\n});\n\n\n/* Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n\n\nfunction isBgEvent(event) { // returns true if background OR inverse-background\n\tvar rendering = getEventRendering(event);\n\treturn rendering === 'background' || rendering === 'inverse-background';\n}\n\n\nfunction isInverseBgEvent(event) {\n\treturn getEventRendering(event) === 'inverse-background';\n}\n\n\nfunction getEventRendering(event) {\n\treturn firstDefined((event.source || {}).rendering, event.rendering);\n}\n\n\nfunction groupEventsById(events) {\n\tvar eventsById = {};\n\tvar i, event;\n\n\tfor (i = 0; i < events.length; i++) {\n\t\tevent = events[i];\n\t\t(eventsById[event._id] || (eventsById[event._id] = [])).push(event);\n\t}\n\n\treturn eventsById;\n}\n\n\n// A cmp function for determining which non-inverted \"ranges\" (see above) happen earlier\nfunction compareRanges(range1, range2) {\n\treturn range1.start - range2.start; // earlier ranges go first\n}\n\n\n/* External-Dragging-Element Data\n----------------------------------------------------------------------------------------------------------------------*/\n\n// Require all HTML5 data-* attributes used by FullCalendar to have this prefix.\n// A value of '' will query attributes like data-event. A value of 'fc' will query attributes like data-fc-event.\nFC.dataAttrPrefix = '';\n\n// Given a jQuery element that might represent a dragged FullCalendar event, returns an intermediate data structure\n// to be used for Event Object creation.\n// A defined `.eventProps`, even when empty, indicates that an event should be created.\nfunction getDraggedElMeta(el) {\n\tvar prefix = FC.dataAttrPrefix;\n\tvar eventProps; // properties for creating the event, not related to date/time\n\tvar startTime; // a Duration\n\tvar duration;\n\tvar stick;\n\n\tif (prefix) { prefix += '-'; }\n\teventProps = el.data(prefix + 'event') || null;\n\n\tif (eventProps) {\n\t\tif (typeof eventProps === 'object') {\n\t\t\teventProps = $.extend({}, eventProps); // make a copy\n\t\t}\n\t\telse { // something like 1 or true. still signal event creation\n\t\t\teventProps = {};\n\t\t}\n\n\t\t// pluck special-cased date/time properties\n\t\tstartTime = eventProps.start;\n\t\tif (startTime == null) { startTime = eventProps.time; } // accept 'time' as well\n\t\tduration = eventProps.duration;\n\t\tstick = eventProps.stick;\n\t\tdelete eventProps.start;\n\t\tdelete eventProps.time;\n\t\tdelete eventProps.duration;\n\t\tdelete eventProps.stick;\n\t}\n\n\t// fallback to standalone attribute values for each of the date/time properties\n\tif (startTime == null) { startTime = el.data(prefix + 'start'); }\n\tif (startTime == null) { startTime = el.data(prefix + 'time'); } // accept 'time' as well\n\tif (duration == null) { duration = el.data(prefix + 'duration'); }\n\tif (stick == null) { stick = el.data(prefix + 'stick'); }\n\n\t// massage into correct data types\n\tstartTime = startTime != null ? moment.duration(startTime) : null;\n\tduration = duration != null ? moment.duration(duration) : null;\n\tstick = Boolean(stick);\n\n\treturn { eventProps: eventProps, startTime: startTime, duration: duration, stick: stick };\n}\n\n\n;;\n\n/*\nA set of rendering and date-related methods for a visual component comprised of one or more rows of day columns.\nPrerequisite: the object being mixed into needs to be a *Grid*\n*/\nvar DayTableMixin = FC.DayTableMixin = {\n\n\tbreakOnWeeks: false, // should create a new row for each week?\n\tdayDates: null, // whole-day dates for each column. left to right\n\tdayIndices: null, // for each day from start, the offset\n\tdaysPerRow: null,\n\trowCnt: null,\n\tcolCnt: null,\n\tcolHeadFormat: null,\n\n\n\t// Populates internal variables used for date calculation and rendering\n\tupdateDayTable: function() {\n\t\tvar view = this.view;\n\t\tvar date = this.start.clone();\n\t\tvar dayIndex = -1;\n\t\tvar dayIndices = [];\n\t\tvar dayDates = [];\n\t\tvar daysPerRow;\n\t\tvar firstDay;\n\t\tvar rowCnt;\n\n\t\twhile (date.isBefore(this.end)) { // loop each day from start to end\n\t\t\tif (view.isHiddenDay(date)) {\n\t\t\t\tdayIndices.push(dayIndex + 0.5); // mark that it's between indices\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdayIndex++;\n\t\t\t\tdayIndices.push(dayIndex);\n\t\t\t\tdayDates.push(date.clone());\n\t\t\t}\n\t\t\tdate.add(1, 'days');\n\t\t}\n\n\t\tif (this.breakOnWeeks) {\n\t\t\t// count columns until the day-of-week repeats\n\t\t\tfirstDay = dayDates[0].day();\n\t\t\tfor (daysPerRow = 1; daysPerRow < dayDates.length; daysPerRow++) {\n\t\t\t\tif (dayDates[daysPerRow].day() == firstDay) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\trowCnt = Math.ceil(dayDates.length / daysPerRow);\n\t\t}\n\t\telse {\n\t\t\trowCnt = 1;\n\t\t\tdaysPerRow = dayDates.length;\n\t\t}\n\n\t\tthis.dayDates = dayDates;\n\t\tthis.dayIndices = dayIndices;\n\t\tthis.daysPerRow = daysPerRow;\n\t\tthis.rowCnt = rowCnt;\n\t\t\n\t\tthis.updateDayTableCols();\n\t},\n\n\n\t// Computes and assigned the colCnt property and updates any options that may be computed from it\n\tupdateDayTableCols: function() {\n\t\tthis.colCnt = this.computeColCnt();\n\t\tthis.colHeadFormat = this.view.opt('columnFormat') || this.computeColHeadFormat();\n\t},\n\n\n\t// Determines how many columns there should be in the table\n\tcomputeColCnt: function() {\n\t\treturn this.daysPerRow;\n\t},\n\n\n\t// Computes the ambiguously-timed moment for the given cell\n\tgetCellDate: function(row, col) {\n\t\treturn this.dayDates[\n\t\t\t\tthis.getCellDayIndex(row, col)\n\t\t\t].clone();\n\t},\n\n\n\t// Computes the ambiguously-timed date range for the given cell\n\tgetCellRange: function(row, col) {\n\t\tvar start = this.getCellDate(row, col);\n\t\tvar end = start.clone().add(1, 'days');\n\n\t\treturn { start: start, end: end };\n\t},\n\n\n\t// Returns the number of day cells, chronologically, from the first of the grid (0-based)\n\tgetCellDayIndex: function(row, col) {\n\t\treturn row * this.daysPerRow + this.getColDayIndex(col);\n\t},\n\n\n\t// Returns the numner of day cells, chronologically, from the first cell in *any given row*\n\tgetColDayIndex: function(col) {\n\t\tif (this.isRTL) {\n\t\t\treturn this.colCnt - 1 - col;\n\t\t}\n\t\telse {\n\t\t\treturn col;\n\t\t}\n\t},\n\n\n\t// Given a date, returns its chronolocial cell-index from the first cell of the grid.\n\t// If the date lies between cells (because of hiddenDays), returns a floating-point value between offsets.\n\t// If before the first offset, returns a negative number.\n\t// If after the last offset, returns an offset past the last cell offset.\n\t// Only works for *start* dates of cells. Will not work for exclusive end dates for cells.\n\tgetDateDayIndex: function(date) {\n\t\tvar dayIndices = this.dayIndices;\n\t\tvar dayOffset = date.diff(this.start, 'days');\n\n\t\tif (dayOffset < 0) {\n\t\t\treturn dayIndices[0] - 1;\n\t\t}\n\t\telse if (dayOffset >= dayIndices.length) {\n\t\t\treturn dayIndices[dayIndices.length - 1] + 1;\n\t\t}\n\t\telse {\n\t\t\treturn dayIndices[dayOffset];\n\t\t}\n\t},\n\n\n\t/* Options\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Computes a default column header formatting string if `colFormat` is not explicitly defined\n\tcomputeColHeadFormat: function() {\n\t\t// if more than one week row, or if there are a lot of columns with not much space,\n\t\t// put just the day numbers will be in each cell\n\t\tif (this.rowCnt > 1 || this.colCnt > 10) {\n\t\t\treturn 'ddd'; // \"Sat\"\n\t\t}\n\t\t// multiple days, so full single date string WON'T be in title text\n\t\telse if (this.colCnt > 1) {\n\t\t\treturn this.view.opt('dayOfMonthFormat'); // \"Sat 12/10\"\n\t\t}\n\t\t// single day, so full single date string will probably be in title text\n\t\telse {\n\t\t\treturn 'dddd'; // \"Saturday\"\n\t\t}\n\t},\n\n\n\t/* Slicing\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Slices up a date range into a segment for every week-row it intersects with\n\tsliceRangeByRow: function(range) {\n\t\tvar daysPerRow = this.daysPerRow;\n\t\tvar normalRange = this.view.computeDayRange(range); // make whole-day range, considering nextDayThreshold\n\t\tvar rangeFirst = this.getDateDayIndex(normalRange.start); // inclusive first index\n\t\tvar rangeLast = this.getDateDayIndex(normalRange.end.clone().subtract(1, 'days')); // inclusive last index\n\t\tvar segs = [];\n\t\tvar row;\n\t\tvar rowFirst, rowLast; // inclusive day-index range for current row\n\t\tvar segFirst, segLast; // inclusive day-index range for segment\n\n\t\tfor (row = 0; row < this.rowCnt; row++) {\n\t\t\trowFirst = row * daysPerRow;\n\t\t\trowLast = rowFirst + daysPerRow - 1;\n\n\t\t\t// intersect segment's offset range with the row's\n\t\t\tsegFirst = Math.max(rangeFirst, rowFirst);\n\t\t\tsegLast = Math.min(rangeLast, rowLast);\n\n\t\t\t// deal with in-between indices\n\t\t\tsegFirst = Math.ceil(segFirst); // in-between starts round to next cell\n\t\t\tsegLast = Math.floor(segLast); // in-between ends round to prev cell\n\n\t\t\tif (segFirst <= segLast) { // was there any intersection with the current row?\n\t\t\t\tsegs.push({\n\t\t\t\t\trow: row,\n\n\t\t\t\t\t// normalize to start of row\n\t\t\t\t\tfirstRowDayIndex: segFirst - rowFirst,\n\t\t\t\t\tlastRowDayIndex: segLast - rowFirst,\n\n\t\t\t\t\t// must be matching integers to be the segment's start/end\n\t\t\t\t\tisStart: segFirst === rangeFirst,\n\t\t\t\t\tisEnd: segLast === rangeLast\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t// Slices up a date range into a segment for every day-cell it intersects with.\n\t// TODO: make more DRY with sliceRangeByRow somehow.\n\tsliceRangeByDay: function(range) {\n\t\tvar daysPerRow = this.daysPerRow;\n\t\tvar normalRange = this.view.computeDayRange(range); // make whole-day range, considering nextDayThreshold\n\t\tvar rangeFirst = this.getDateDayIndex(normalRange.start); // inclusive first index\n\t\tvar rangeLast = this.getDateDayIndex(normalRange.end.clone().subtract(1, 'days')); // inclusive last index\n\t\tvar segs = [];\n\t\tvar row;\n\t\tvar rowFirst, rowLast; // inclusive day-index range for current row\n\t\tvar i;\n\t\tvar segFirst, segLast; // inclusive day-index range for segment\n\n\t\tfor (row = 0; row < this.rowCnt; row++) {\n\t\t\trowFirst = row * daysPerRow;\n\t\t\trowLast = rowFirst + daysPerRow - 1;\n\n\t\t\tfor (i = rowFirst; i <= rowLast; i++) {\n\n\t\t\t\t// intersect segment's offset range with the row's\n\t\t\t\tsegFirst = Math.max(rangeFirst, i);\n\t\t\t\tsegLast = Math.min(rangeLast, i);\n\n\t\t\t\t// deal with in-between indices\n\t\t\t\tsegFirst = Math.ceil(segFirst); // in-between starts round to next cell\n\t\t\t\tsegLast = Math.floor(segLast); // in-between ends round to prev cell\n\n\t\t\t\tif (segFirst <= segLast) { // was there any intersection with the current row?\n\t\t\t\t\tsegs.push({\n\t\t\t\t\t\trow: row,\n\n\t\t\t\t\t\t// normalize to start of row\n\t\t\t\t\t\tfirstRowDayIndex: segFirst - rowFirst,\n\t\t\t\t\t\tlastRowDayIndex: segLast - rowFirst,\n\n\t\t\t\t\t\t// must be matching integers to be the segment's start/end\n\t\t\t\t\t\tisStart: segFirst === rangeFirst,\n\t\t\t\t\t\tisEnd: segLast === rangeLast\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t/* Header Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderHeadHtml: function() {\n\t\tvar view = this.view;\n\n\t\treturn '' +\n\t\t\t'<div class=\"fc-row ' + view.widgetHeaderClass + '\">' +\n\t\t\t\t'<table>' +\n\t\t\t\t\t'<thead>' +\n\t\t\t\t\t\tthis.renderHeadTrHtml() +\n\t\t\t\t\t'</thead>' +\n\t\t\t\t'</table>' +\n\t\t\t'</div>';\n\t},\n\n\n\trenderHeadIntroHtml: function() {\n\t\treturn this.renderIntroHtml(); // fall back to generic\n\t},\n\n\n\trenderHeadTrHtml: function() {\n\t\treturn '' +\n\t\t\t'<tr>' +\n\t\t\t\t(this.isRTL ? '' : this.renderHeadIntroHtml()) +\n\t\t\t\tthis.renderHeadDateCellsHtml() +\n\t\t\t\t(this.isRTL ? this.renderHeadIntroHtml() : '') +\n\t\t\t'</tr>';\n\t},\n\n\n\trenderHeadDateCellsHtml: function() {\n\t\tvar htmls = [];\n\t\tvar col, date;\n\n\t\tfor (col = 0; col < this.colCnt; col++) {\n\t\t\tdate = this.getCellDate(0, col);\n\t\t\thtmls.push(this.renderHeadDateCellHtml(date));\n\t\t}\n\n\t\treturn htmls.join('');\n\t},\n\n\n\trenderHeadDateCellHtml: function(date, colspan) {\n\t\tvar view = this.view;\n\n\t\treturn '' +\n\t\t\t'<th class=\"fc-day-header ' + view.widgetHeaderClass + ' fc-' + dayIDs[date.day()] + '\"' +\n\t\t\t\t(colspan > 1 ? ' colspan=\"' + colspan + '\"' : '') +\n\t\t\t\t'>' +\n\t\t\t\thtmlEscape(date.format(this.colHeadFormat)) +\n\t\t\t'</th>';\n\t},\n\n\n\t/* Background Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderBgTrHtml: function(row) {\n\t\treturn '' +\n\t\t\t'<tr>' +\n\t\t\t\t(this.isRTL ? '' : this.renderBgIntroHtml(row)) +\n\t\t\t\tthis.renderBgCellsHtml(row) +\n\t\t\t\t(this.isRTL ? this.renderBgIntroHtml(row) : '') +\n\t\t\t'</tr>';\n\t},\n\n\n\trenderBgIntroHtml: function(row) {\n\t\treturn this.renderIntroHtml(); // fall back to generic\n\t},\n\n\n\trenderBgCellsHtml: function(row) {\n\t\tvar htmls = [];\n\t\tvar col, date;\n\n\t\tfor (col = 0; col < this.colCnt; col++) {\n\t\t\tdate = this.getCellDate(row, col);\n\t\t\thtmls.push(this.renderBgCellHtml(date));\n\t\t}\n\n\t\treturn htmls.join('');\n\t},\n\n\n\trenderBgCellHtml: function(date) {\n\t\tvar view = this.view;\n\t\tvar classes = this.getDayClasses(date);\n\n\t\tclasses.unshift('fc-day', view.widgetContentClass);\n\n\t\treturn '<td class=\"' + classes.join(' ') + '\"' +\n\t\t\t' data-date=\"' + date.format('YYYY-MM-DD') + '\"' + // if date has a time, won't format it\n\t\t\t'></td>';\n\t},\n\n\n\t/* Generic\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Generates the default HTML intro for any row. User classes should override\n\trenderIntroHtml: function() {\n\t},\n\n\n\t/* Utils\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Applies the generic \"intro\" and \"outro\" HTML to the given cells.\n\t// Intro means the leftmost cell when the calendar is LTR and the rightmost cell when RTL. Vice-versa for outro.\n\tbookendCells: function(trEl) {\n\t\tvar introHtml = this.renderIntroHtml();\n\n\t\tif (introHtml) {\n\t\t\tif (this.isRTL) {\n\t\t\t\ttrEl.append(introHtml);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttrEl.prepend(introHtml);\n\t\t\t}\n\t\t}\n\t}\n\n};\n\n;;\n\n/* A component that renders a grid of whole-days that runs horizontally. There can be multiple rows, one per week.\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar DayGrid = FC.DayGrid = Grid.extend(DayTableMixin, {\n\n\tnumbersVisible: false, // should render a row for day/week numbers? set by outside view. TODO: make internal\n\tbottomCoordPadding: 0, // hack for extending the hit area for the last row of the coordinate grid\n\n\trowEls: null, // set of fake row elements\n\tcellEls: null, // set of whole-day elements comprising the row's background\n\thelperEls: null, // set of cell skeleton elements for rendering the mock event \"helper\"\n\n\trowCoordCache: null,\n\tcolCoordCache: null,\n\n\n\t// Renders the rows and columns into the component's `this.el`, which should already be assigned.\n\t// isRigid determins whether the individual rows should ignore the contents and be a constant height.\n\t// Relies on the view's colCnt and rowCnt. In the future, this component should probably be self-sufficient.\n\trenderDates: function(isRigid) {\n\t\tvar view = this.view;\n\t\tvar rowCnt = this.rowCnt;\n\t\tvar colCnt = this.colCnt;\n\t\tvar html = '';\n\t\tvar row;\n\t\tvar col;\n\n\t\tfor (row = 0; row < rowCnt; row++) {\n\t\t\thtml += this.renderDayRowHtml(row, isRigid);\n\t\t}\n\t\tthis.el.html(html);\n\n\t\tthis.rowEls = this.el.find('.fc-row');\n\t\tthis.cellEls = this.el.find('.fc-day');\n\n\t\tthis.rowCoordCache = new CoordCache({\n\t\t\tels: this.rowEls,\n\t\t\tisVertical: true\n\t\t});\n\t\tthis.colCoordCache = new CoordCache({\n\t\t\tels: this.cellEls.slice(0, this.colCnt), // only the first row\n\t\t\tisHorizontal: true\n\t\t});\n\n\t\t// trigger dayRender with each cell's element\n\t\tfor (row = 0; row < rowCnt; row++) {\n\t\t\tfor (col = 0; col < colCnt; col++) {\n\t\t\t\tview.trigger(\n\t\t\t\t\t'dayRender',\n\t\t\t\t\tnull,\n\t\t\t\t\tthis.getCellDate(row, col),\n\t\t\t\t\tthis.getCellEl(row, col)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t},\n\n\n\tunrenderDates: function() {\n\t\tthis.removeSegPopover();\n\t},\n\n\n\trenderBusinessHours: function() {\n\t\tvar events = this.view.calendar.getBusinessHoursEvents(true); // wholeDay=true\n\t\tvar segs = this.eventsToSegs(events);\n\n\t\tthis.renderFill('businessHours', segs, 'bgevent');\n\t},\n\n\n\t// Generates the HTML for a single row, which is a div that wraps a table.\n\t// `row` is the row number.\n\trenderDayRowHtml: function(row, isRigid) {\n\t\tvar view = this.view;\n\t\tvar classes = [ 'fc-row', 'fc-week', view.widgetContentClass ];\n\n\t\tif (isRigid) {\n\t\t\tclasses.push('fc-rigid');\n\t\t}\n\n\t\treturn '' +\n\t\t\t'<div class=\"' + classes.join(' ') + '\">' +\n\t\t\t\t'<div class=\"fc-bg\">' +\n\t\t\t\t\t'<table>' +\n\t\t\t\t\t\tthis.renderBgTrHtml(row) +\n\t\t\t\t\t'</table>' +\n\t\t\t\t'</div>' +\n\t\t\t\t'<div class=\"fc-content-skeleton\">' +\n\t\t\t\t\t'<table>' +\n\t\t\t\t\t\t(this.numbersVisible ?\n\t\t\t\t\t\t\t'<thead>' +\n\t\t\t\t\t\t\t\tthis.renderNumberTrHtml(row) +\n\t\t\t\t\t\t\t'</thead>' :\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t) +\n\t\t\t\t\t'</table>' +\n\t\t\t\t'</div>' +\n\t\t\t'</div>';\n\t},\n\n\n\t/* Grid Number Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trenderNumberTrHtml: function(row) {\n\t\treturn '' +\n\t\t\t'<tr>' +\n\t\t\t\t(this.isRTL ? '' : this.renderNumberIntroHtml(row)) +\n\t\t\t\tthis.renderNumberCellsHtml(row) +\n\t\t\t\t(this.isRTL ? this.renderNumberIntroHtml(row) : '') +\n\t\t\t'</tr>';\n\t},\n\n\n\trenderNumberIntroHtml: function(row) {\n\t\treturn this.renderIntroHtml();\n\t},\n\n\n\trenderNumberCellsHtml: function(row) {\n\t\tvar htmls = [];\n\t\tvar col, date;\n\n\t\tfor (col = 0; col < this.colCnt; col++) {\n\t\t\tdate = this.getCellDate(row, col);\n\t\t\thtmls.push(this.renderNumberCellHtml(date));\n\t\t}\n\n\t\treturn htmls.join('');\n\t},\n\n\n\t// Generates the HTML for the <td>s of the \"number\" row in the DayGrid's content skeleton.\n\t// The number row will only exist if either day numbers or week numbers are turned on.\n\trenderNumberCellHtml: function(date) {\n\t\tvar classes;\n\n\t\tif (!this.view.dayNumbersVisible) { // if there are week numbers but not day numbers\n\t\t\treturn '<td/>'; // will create an empty space above events :(\n\t\t}\n\n\t\tclasses = this.getDayClasses(date);\n\t\tclasses.unshift('fc-day-number');\n\n\t\treturn '' +\n\t\t\t'<td class=\"' + classes.join(' ') + '\" data-date=\"' + date.format() + '\">' +\n\t\t\t\tdate.date() +\n\t\t\t'</td>';\n\t},\n\n\n\t/* Options\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Computes a default event time formatting string if `timeFormat` is not explicitly defined\n\tcomputeEventTimeFormat: function() {\n\t\treturn this.view.opt('extraSmallTimeFormat'); // like \"6p\" or \"6:30p\"\n\t},\n\n\n\t// Computes a default `displayEventEnd` value if one is not expliclty defined\n\tcomputeDisplayEventEnd: function() {\n\t\treturn this.colCnt == 1; // we'll likely have space if there's only one day\n\t},\n\n\n\t/* Dates\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trangeUpdated: function() {\n\t\tthis.updateDayTable();\n\t},\n\n\n\t// Slices up the given span (unzoned start/end with other misc data) into an array of segments\n\tspanToSegs: function(span) {\n\t\tvar segs = this.sliceRangeByRow(span);\n\t\tvar i, seg;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (this.isRTL) {\n\t\t\t\tseg.leftCol = this.daysPerRow - 1 - seg.lastRowDayIndex;\n\t\t\t\tseg.rightCol = this.daysPerRow - 1 - seg.firstRowDayIndex;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tseg.leftCol = seg.firstRowDayIndex;\n\t\t\t\tseg.rightCol = seg.lastRowDayIndex;\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t/* Hit System\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tprepareHits: function() {\n\t\tthis.colCoordCache.build();\n\t\tthis.rowCoordCache.build();\n\t\tthis.rowCoordCache.bottoms[this.rowCnt - 1] += this.bottomCoordPadding; // hack\n\t},\n\n\n\treleaseHits: function() {\n\t\tthis.colCoordCache.clear();\n\t\tthis.rowCoordCache.clear();\n\t},\n\n\n\tqueryHit: function(leftOffset, topOffset) {\n\t\tvar col = this.colCoordCache.getHorizontalIndex(leftOffset);\n\t\tvar row = this.rowCoordCache.getVerticalIndex(topOffset);\n\n\t\tif (row != null && col != null) {\n\t\t\treturn this.getCellHit(row, col);\n\t\t}\n\t},\n\n\n\tgetHitSpan: function(hit) {\n\t\treturn this.getCellRange(hit.row, hit.col);\n\t},\n\n\n\tgetHitEl: function(hit) {\n\t\treturn this.getCellEl(hit.row, hit.col);\n\t},\n\n\n\t/* Cell System\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// FYI: the first column is the leftmost column, regardless of date\n\n\n\tgetCellHit: function(row, col) {\n\t\treturn {\n\t\t\trow: row,\n\t\t\tcol: col,\n\t\t\tcomponent: this, // needed unfortunately :(\n\t\t\tleft: this.colCoordCache.getLeftOffset(col),\n\t\t\tright: this.colCoordCache.getRightOffset(col),\n\t\t\ttop: this.rowCoordCache.getTopOffset(row),\n\t\t\tbottom: this.rowCoordCache.getBottomOffset(row)\n\t\t};\n\t},\n\n\n\tgetCellEl: function(row, col) {\n\t\treturn this.cellEls.eq(row * this.colCnt + col);\n\t},\n\n\n\t/* Event Drag Visualization\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// TODO: move to DayGrid.event, similar to what we did with Grid's drag methods\n\n\n\t// Renders a visual indication of an event or external element being dragged.\n\t// `eventLocation` has zoned start and end (optional)\n\trenderDrag: function(eventLocation, seg) {\n\n\t\t// always render a highlight underneath\n\t\tthis.renderHighlight(this.eventToSpan(eventLocation));\n\n\t\t// if a segment from the same calendar but another component is being dragged, render a helper event\n\t\tif (seg && !seg.el.closest(this.el).length) {\n\n\t\t\tthis.renderEventLocationHelper(eventLocation, seg);\n\t\t\tthis.applyDragOpacity(this.helperEls);\n\n\t\t\treturn true; // a helper has been rendered\n\t\t}\n\t},\n\n\n\t// Unrenders any visual indication of a hovering event\n\tunrenderDrag: function() {\n\t\tthis.unrenderHighlight();\n\t\tthis.unrenderHelper();\n\t},\n\n\n\t/* Event Resize Visualization\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of an event being resized\n\trenderEventResize: function(eventLocation, seg) {\n\t\tthis.renderHighlight(this.eventToSpan(eventLocation));\n\t\tthis.renderEventLocationHelper(eventLocation, seg);\n\t},\n\n\n\t// Unrenders a visual indication of an event being resized\n\tunrenderEventResize: function() {\n\t\tthis.unrenderHighlight();\n\t\tthis.unrenderHelper();\n\t},\n\n\n\t/* Event Helper\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a mock \"helper\" event. `sourceSeg` is the associated internal segment object. It can be null.\n\trenderHelper: function(event, sourceSeg) {\n\t\tvar helperNodes = [];\n\t\tvar segs = this.eventToSegs(event);\n\t\tvar rowStructs;\n\n\t\tsegs = this.renderFgSegEls(segs); // assigns each seg's el and returns a subset of segs that were rendered\n\t\trowStructs = this.renderSegRows(segs);\n\n\t\t// inject each new event skeleton into each associated row\n\t\tthis.rowEls.each(function(row, rowNode) {\n\t\t\tvar rowEl = $(rowNode); // the .fc-row\n\t\t\tvar skeletonEl = $('<div class=\"fc-helper-skeleton\"><table/></div>'); // will be absolutely positioned\n\t\t\tvar skeletonTop;\n\n\t\t\t// If there is an original segment, match the top position. Otherwise, put it at the row's top level\n\t\t\tif (sourceSeg && sourceSeg.row === row) {\n\t\t\t\tskeletonTop = sourceSeg.el.position().top;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tskeletonTop = rowEl.find('.fc-content-skeleton tbody').position().top;\n\t\t\t}\n\n\t\t\tskeletonEl.css('top', skeletonTop)\n\t\t\t\t.find('table')\n\t\t\t\t\t.append(rowStructs[row].tbodyEl);\n\n\t\t\trowEl.append(skeletonEl);\n\t\t\thelperNodes.push(skeletonEl[0]);\n\t\t});\n\n\t\tthis.helperEls = $(helperNodes); // array -> jQuery set\n\t},\n\n\n\t// Unrenders any visual indication of a mock helper event\n\tunrenderHelper: function() {\n\t\tif (this.helperEls) {\n\t\t\tthis.helperEls.remove();\n\t\t\tthis.helperEls = null;\n\t\t}\n\t},\n\n\n\t/* Fill System (highlight, background events, business hours)\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tfillSegTag: 'td', // override the default tag name\n\n\n\t// Renders a set of rectangles over the given segments of days.\n\t// Only returns segments that successfully rendered.\n\trenderFill: function(type, segs, className) {\n\t\tvar nodes = [];\n\t\tvar i, seg;\n\t\tvar skeletonEl;\n\n\t\tsegs = this.renderFillSegEls(type, segs); // assignes `.el` to each seg. returns successfully rendered segs\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\t\t\tskeletonEl = this.renderFillRow(type, seg, className);\n\t\t\tthis.rowEls.eq(seg.row).append(skeletonEl);\n\t\t\tnodes.push(skeletonEl[0]);\n\t\t}\n\n\t\tthis.elsByFill[type] = $(nodes);\n\n\t\treturn segs;\n\t},\n\n\n\t// Generates the HTML needed for one row of a fill. Requires the seg's el to be rendered.\n\trenderFillRow: function(type, seg, className) {\n\t\tvar colCnt = this.colCnt;\n\t\tvar startCol = seg.leftCol;\n\t\tvar endCol = seg.rightCol + 1;\n\t\tvar skeletonEl;\n\t\tvar trEl;\n\n\t\tclassName = className || type.toLowerCase();\n\n\t\tskeletonEl = $(\n\t\t\t'<div class=\"fc-' + className + '-skeleton\">' +\n\t\t\t\t'<table><tr/></table>' +\n\t\t\t'</div>'\n\t\t);\n\t\ttrEl = skeletonEl.find('tr');\n\n\t\tif (startCol > 0) {\n\t\t\ttrEl.append('<td colspan=\"' + startCol + '\"/>');\n\t\t}\n\n\t\ttrEl.append(\n\t\t\tseg.el.attr('colspan', endCol - startCol)\n\t\t);\n\n\t\tif (endCol < colCnt) {\n\t\t\ttrEl.append('<td colspan=\"' + (colCnt - endCol) + '\"/>');\n\t\t}\n\n\t\tthis.bookendCells(trEl);\n\n\t\treturn skeletonEl;\n\t}\n\n});\n\n;;\n\n/* Event-rendering methods for the DayGrid class\n----------------------------------------------------------------------------------------------------------------------*/\n\nDayGrid.mixin({\n\n\trowStructs: null, // an array of objects, each holding information about a row's foreground event-rendering\n\n\n\t// Unrenders all events currently rendered on the grid\n\tunrenderEvents: function() {\n\t\tthis.removeSegPopover(); // removes the \"more..\" events popover\n\t\tGrid.prototype.unrenderEvents.apply(this, arguments); // calls the super-method\n\t},\n\n\n\t// Retrieves all rendered segment objects currently rendered on the grid\n\tgetEventSegs: function() {\n\t\treturn Grid.prototype.getEventSegs.call(this) // get the segments from the super-method\n\t\t\t.concat(this.popoverSegs || []); // append the segments from the \"more...\" popover\n\t},\n\n\n\t// Renders the given background event segments onto the grid\n\trenderBgSegs: function(segs) {\n\n\t\t// don't render timed background events\n\t\tvar allDaySegs = $.grep(segs, function(seg) {\n\t\t\treturn seg.event.allDay;\n\t\t});\n\n\t\treturn Grid.prototype.renderBgSegs.call(this, allDaySegs); // call the super-method\n\t},\n\n\n\t// Renders the given foreground event segments onto the grid\n\trenderFgSegs: function(segs) {\n\t\tvar rowStructs;\n\n\t\t// render an `.el` on each seg\n\t\t// returns a subset of the segs. segs that were actually rendered\n\t\tsegs = this.renderFgSegEls(segs);\n\n\t\trowStructs = this.rowStructs = this.renderSegRows(segs);\n\n\t\t// append to each row's content skeleton\n\t\tthis.rowEls.each(function(i, rowNode) {\n\t\t\t$(rowNode).find('.fc-content-skeleton > table').append(\n\t\t\t\trowStructs[i].tbodyEl\n\t\t\t);\n\t\t});\n\n\t\treturn segs; // return only the segs that were actually rendered\n\t},\n\n\n\t// Unrenders all currently rendered foreground event segments\n\tunrenderFgSegs: function() {\n\t\tvar rowStructs = this.rowStructs || [];\n\t\tvar rowStruct;\n\n\t\twhile ((rowStruct = rowStructs.pop())) {\n\t\t\trowStruct.tbodyEl.remove();\n\t\t}\n\n\t\tthis.rowStructs = null;\n\t},\n\n\n\t// Uses the given events array to generate <tbody> elements that should be appended to each row's content skeleton.\n\t// Returns an array of rowStruct objects (see the bottom of `renderSegRow`).\n\t// PRECONDITION: each segment shoud already have a rendered and assigned `.el`\n\trenderSegRows: function(segs) {\n\t\tvar rowStructs = [];\n\t\tvar segRows;\n\t\tvar row;\n\n\t\tsegRows = this.groupSegRows(segs); // group into nested arrays\n\n\t\t// iterate each row of segment groupings\n\t\tfor (row = 0; row < segRows.length; row++) {\n\t\t\trowStructs.push(\n\t\t\t\tthis.renderSegRow(row, segRows[row])\n\t\t\t);\n\t\t}\n\n\t\treturn rowStructs;\n\t},\n\n\n\t// Builds the HTML to be used for the default element for an individual segment\n\tfgSegHtml: function(seg, disableResizing) {\n\t\tvar view = this.view;\n\t\tvar event = seg.event;\n\t\tvar isDraggable = view.isEventDraggable(event);\n\t\tvar isResizableFromStart = !disableResizing && event.allDay &&\n\t\t\tseg.isStart && view.isEventResizableFromStart(event);\n\t\tvar isResizableFromEnd = !disableResizing && event.allDay &&\n\t\t\tseg.isEnd && view.isEventResizableFromEnd(event);\n\t\tvar classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd);\n\t\tvar skinCss = cssToStr(this.getEventSkinCss(event));\n\t\tvar timeHtml = '';\n\t\tvar timeText;\n\t\tvar titleHtml;\n\n\t\tclasses.unshift('fc-day-grid-event', 'fc-h-event');\n\n\t\t// Only display a timed events time if it is the starting segment\n\t\tif (seg.isStart) {\n\t\t\ttimeText = this.getEventTimeText(event);\n\t\t\tif (timeText) {\n\t\t\t\ttimeHtml = '<span class=\"fc-time\">' + htmlEscape(timeText) + '</span>';\n\t\t\t}\n\t\t}\n\n\t\ttitleHtml =\n\t\t\t'<span class=\"fc-title\">' +\n\t\t\t\t(htmlEscape(event.title || '') || ' ') + // we always want one line of height\n\t\t\t'</span>';\n\t\t\n\t\treturn '<a class=\"' + classes.join(' ') + '\"' +\n\t\t\t\t(event.url ?\n\t\t\t\t\t' href=\"' + htmlEscape(event.url) + '\"' :\n\t\t\t\t\t''\n\t\t\t\t\t) +\n\t\t\t\t(skinCss ?\n\t\t\t\t\t' style=\"' + skinCss + '\"' :\n\t\t\t\t\t''\n\t\t\t\t\t) +\n\t\t\t'>' +\n\t\t\t\t'<div class=\"fc-content\">' +\n\t\t\t\t\t(this.isRTL ?\n\t\t\t\t\t\ttitleHtml + ' ' + timeHtml : // put a natural space in between\n\t\t\t\t\t\ttimeHtml + ' ' + titleHtml //\n\t\t\t\t\t\t) +\n\t\t\t\t'</div>' +\n\t\t\t\t(isResizableFromStart ?\n\t\t\t\t\t'<div class=\"fc-resizer fc-start-resizer\" />' :\n\t\t\t\t\t''\n\t\t\t\t\t) +\n\t\t\t\t(isResizableFromEnd ?\n\t\t\t\t\t'<div class=\"fc-resizer fc-end-resizer\" />' :\n\t\t\t\t\t''\n\t\t\t\t\t) +\n\t\t\t'</a>';\n\t},\n\n\n\t// Given a row # and an array of segments all in the same row, render a <tbody> element, a skeleton that contains\n\t// the segments. Returns object with a bunch of internal data about how the render was calculated.\n\t// NOTE: modifies rowSegs\n\trenderSegRow: function(row, rowSegs) {\n\t\tvar colCnt = this.colCnt;\n\t\tvar segLevels = this.buildSegLevels(rowSegs); // group into sub-arrays of levels\n\t\tvar levelCnt = Math.max(1, segLevels.length); // ensure at least one level\n\t\tvar tbody = $('<tbody/>');\n\t\tvar segMatrix = []; // lookup for which segments are rendered into which level+col cells\n\t\tvar cellMatrix = []; // lookup for all <td> elements of the level+col matrix\n\t\tvar loneCellMatrix = []; // lookup for <td> elements that only take up a single column\n\t\tvar i, levelSegs;\n\t\tvar col;\n\t\tvar tr;\n\t\tvar j, seg;\n\t\tvar td;\n\n\t\t// populates empty cells from the current column (`col`) to `endCol`\n\t\tfunction emptyCellsUntil(endCol) {\n\t\t\twhile (col < endCol) {\n\t\t\t\t// try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n\t\t\t\ttd = (loneCellMatrix[i - 1] || [])[col];\n\t\t\t\tif (td) {\n\t\t\t\t\ttd.attr(\n\t\t\t\t\t\t'rowspan',\n\t\t\t\t\t\tparseInt(td.attr('rowspan') || 1, 10) + 1\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttd = $('<td/>');\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < levelCnt; i++) { // iterate through all levels\n\t\t\tlevelSegs = segLevels[i];\n\t\t\tcol = 0;\n\t\t\ttr = $('<tr/>');\n\n\t\t\tsegMatrix.push([]);\n\t\t\tcellMatrix.push([]);\n\t\t\tloneCellMatrix.push([]);\n\n\t\t\t// levelCnt might be 1 even though there are no actual levels. protect against this.\n\t\t\t// this single empty row is useful for styling.\n\t\t\tif (levelSegs) {\n\t\t\t\tfor (j = 0; j < levelSegs.length; j++) { // iterate through segments in level\n\t\t\t\t\tseg = levelSegs[j];\n\n\t\t\t\t\temptyCellsUntil(seg.leftCol);\n\n\t\t\t\t\t// create a container that occupies or more columns. append the event element.\n\t\t\t\t\ttd = $('<td class=\"fc-event-container\"/>').append(seg.el);\n\t\t\t\t\tif (seg.leftCol != seg.rightCol) {\n\t\t\t\t\t\ttd.attr('colspan', seg.rightCol - seg.leftCol + 1);\n\t\t\t\t\t}\n\t\t\t\t\telse { // a single-column segment\n\t\t\t\t\t\tloneCellMatrix[i][col] = td;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (col <= seg.rightCol) {\n\t\t\t\t\t\tcellMatrix[i][col] = td;\n\t\t\t\t\t\tsegMatrix[i][col] = seg;\n\t\t\t\t\t\tcol++;\n\t\t\t\t\t}\n\n\t\t\t\t\ttr.append(td);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\temptyCellsUntil(colCnt); // finish off the row\n\t\t\tthis.bookendCells(tr);\n\t\t\ttbody.append(tr);\n\t\t}\n\n\t\treturn { // a \"rowStruct\"\n\t\t\trow: row, // the row number\n\t\t\ttbodyEl: tbody,\n\t\t\tcellMatrix: cellMatrix,\n\t\t\tsegMatrix: segMatrix,\n\t\t\tsegLevels: segLevels,\n\t\t\tsegs: rowSegs\n\t\t};\n\t},\n\n\n\t// Stacks a flat array of segments, which are all assumed to be in the same row, into subarrays of vertical levels.\n\t// NOTE: modifies segs\n\tbuildSegLevels: function(segs) {\n\t\tvar levels = [];\n\t\tvar i, seg;\n\t\tvar j;\n\n\t\t// Give preference to elements with certain criteria, so they have\n\t\t// a chance to be closer to the top.\n\t\tthis.sortEventSegs(segs);\n\t\t\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\n\t\t\t// loop through levels, starting with the topmost, until the segment doesn't collide with other segments\n\t\t\tfor (j = 0; j < levels.length; j++) {\n\t\t\t\tif (!isDaySegCollision(seg, levels[j])) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `j` now holds the desired subrow index\n\t\t\tseg.level = j;\n\n\t\t\t// create new level array if needed and append segment\n\t\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t\t}\n\n\t\t// order segments left-to-right. very important if calendar is RTL\n\t\tfor (j = 0; j < levels.length; j++) {\n\t\t\tlevels[j].sort(compareDaySegCols);\n\t\t}\n\n\t\treturn levels;\n\t},\n\n\n\t// Given a flat array of segments, return an array of sub-arrays, grouped by each segment's row\n\tgroupSegRows: function(segs) {\n\t\tvar segRows = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < this.rowCnt; i++) {\n\t\t\tsegRows.push([]);\n\t\t}\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tsegRows[segs[i].row].push(segs[i]);\n\t\t}\n\n\t\treturn segRows;\n\t}\n\n});\n\n\n// Computes whether two segments' columns collide. They are assumed to be in the same row.\nfunction isDaySegCollision(seg, otherSegs) {\n\tvar i, otherSeg;\n\n\tfor (i = 0; i < otherSegs.length; i++) {\n\t\totherSeg = otherSegs[i];\n\n\t\tif (\n\t\t\totherSeg.leftCol <= seg.rightCol &&\n\t\t\totherSeg.rightCol >= seg.leftCol\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n\n// A cmp function for determining the leftmost event\nfunction compareDaySegCols(a, b) {\n\treturn a.leftCol - b.leftCol;\n}\n\n;;\n\n/* Methods relate to limiting the number events for a given day on a DayGrid\n----------------------------------------------------------------------------------------------------------------------*/\n// NOTE: all the segs being passed around in here are foreground segs\n\nDayGrid.mixin({\n\n\tsegPopover: null, // the Popover that holds events that can't fit in a cell. null when not visible\n\tpopoverSegs: null, // an array of segment objects that the segPopover holds. null when not visible\n\n\n\tremoveSegPopover: function() {\n\t\tif (this.segPopover) {\n\t\t\tthis.segPopover.hide(); // in handler, will call segPopover's removeElement\n\t\t}\n\t},\n\n\n\t// Limits the number of \"levels\" (vertically stacking layers of events) for each row of the grid.\n\t// `levelLimit` can be false (don't limit), a number, or true (should be computed).\n\tlimitRows: function(levelLimit) {\n\t\tvar rowStructs = this.rowStructs || [];\n\t\tvar row; // row #\n\t\tvar rowLevelLimit;\n\n\t\tfor (row = 0; row < rowStructs.length; row++) {\n\t\t\tthis.unlimitRow(row);\n\n\t\t\tif (!levelLimit) {\n\t\t\t\trowLevelLimit = false;\n\t\t\t}\n\t\t\telse if (typeof levelLimit === 'number') {\n\t\t\t\trowLevelLimit = levelLimit;\n\t\t\t}\n\t\t\telse {\n\t\t\t\trowLevelLimit = this.computeRowLevelLimit(row);\n\t\t\t}\n\n\t\t\tif (rowLevelLimit !== false) {\n\t\t\t\tthis.limitRow(row, rowLevelLimit);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Computes the number of levels a row will accomodate without going outside its bounds.\n\t// Assumes the row is \"rigid\" (maintains a constant height regardless of what is inside).\n\t// `row` is the row number.\n\tcomputeRowLevelLimit: function(row) {\n\t\tvar rowEl = this.rowEls.eq(row); // the containing \"fake\" row div\n\t\tvar rowHeight = rowEl.height(); // TODO: cache somehow?\n\t\tvar trEls = this.rowStructs[row].tbodyEl.children();\n\t\tvar i, trEl;\n\t\tvar trHeight;\n\n\t\tfunction iterInnerHeights(i, childNode) {\n\t\t\ttrHeight = Math.max(trHeight, $(childNode).outerHeight());\n\t\t}\n\n\t\t// Reveal one level <tr> at a time and stop when we find one out of bounds\n\t\tfor (i = 0; i < trEls.length; i++) {\n\t\t\ttrEl = trEls.eq(i).removeClass('fc-limited'); // reset to original state (reveal)\n\n\t\t\t// with rowspans>1 and IE8, trEl.outerHeight() would return the height of the largest cell,\n\t\t\t// so instead, find the tallest inner content element.\n\t\t\ttrHeight = 0;\n\t\t\ttrEl.find('> td > :first-child').each(iterInnerHeights);\n\n\t\t\tif (trEl.position().top + trHeight > rowHeight) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn false; // should not limit at all\n\t},\n\n\n\t// Limits the given grid row to the maximum number of levels and injects \"more\" links if necessary.\n\t// `row` is the row number.\n\t// `levelLimit` is a number for the maximum (inclusive) number of levels allowed.\n\tlimitRow: function(row, levelLimit) {\n\t\tvar _this = this;\n\t\tvar rowStruct = this.rowStructs[row];\n\t\tvar moreNodes = []; // array of \"more\" <a> links and <td> DOM nodes\n\t\tvar col = 0; // col #, left-to-right (not chronologically)\n\t\tvar levelSegs; // array of segment objects in the last allowable level, ordered left-to-right\n\t\tvar cellMatrix; // a matrix (by level, then column) of all <td> jQuery elements in the row\n\t\tvar limitedNodes; // array of temporarily hidden level <tr> and segment <td> DOM nodes\n\t\tvar i, seg;\n\t\tvar segsBelow; // array of segment objects below `seg` in the current `col`\n\t\tvar totalSegsBelow; // total number of segments below `seg` in any of the columns `seg` occupies\n\t\tvar colSegsBelow; // array of segment arrays, below seg, one for each column (offset from segs's first column)\n\t\tvar td, rowspan;\n\t\tvar segMoreNodes; // array of \"more\" <td> cells that will stand-in for the current seg's cell\n\t\tvar j;\n\t\tvar moreTd, moreWrap, moreLink;\n\n\t\t// Iterates through empty level cells and places \"more\" links inside if need be\n\t\tfunction emptyCellsUntil(endCol) { // goes from current `col` to `endCol`\n\t\t\twhile (col < endCol) {\n\t\t\t\tsegsBelow = _this.getCellSegs(row, col, levelLimit);\n\t\t\t\tif (segsBelow.length) {\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][col];\n\t\t\t\t\tmoreLink = _this.renderMoreLink(row, col, segsBelow);\n\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\ttd.append(moreWrap);\n\t\t\t\t\tmoreNodes.push(moreWrap[0]);\n\t\t\t\t}\n\t\t\t\tcol++;\n\t\t\t}\n\t\t}\n\n\t\tif (levelLimit && levelLimit < rowStruct.segLevels.length) { // is it actually over the limit?\n\t\t\tlevelSegs = rowStruct.segLevels[levelLimit - 1];\n\t\t\tcellMatrix = rowStruct.cellMatrix;\n\n\t\t\tlimitedNodes = rowStruct.tbodyEl.children().slice(levelLimit) // get level <tr> elements past the limit\n\t\t\t\t.addClass('fc-limited').get(); // hide elements and get a simple DOM-nodes array\n\n\t\t\t// iterate though segments in the last allowable level\n\t\t\tfor (i = 0; i < levelSegs.length; i++) {\n\t\t\t\tseg = levelSegs[i];\n\t\t\t\temptyCellsUntil(seg.leftCol); // process empty cells before the segment\n\n\t\t\t\t// determine *all* segments below `seg` that occupy the same columns\n\t\t\t\tcolSegsBelow = [];\n\t\t\t\ttotalSegsBelow = 0;\n\t\t\t\twhile (col <= seg.rightCol) {\n\t\t\t\t\tsegsBelow = this.getCellSegs(row, col, levelLimit);\n\t\t\t\t\tcolSegsBelow.push(segsBelow);\n\t\t\t\t\ttotalSegsBelow += segsBelow.length;\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\n\t\t\t\tif (totalSegsBelow) { // do we need to replace this segment with one or many \"more\" links?\n\t\t\t\t\ttd = cellMatrix[levelLimit - 1][seg.leftCol]; // the segment's parent cell\n\t\t\t\t\trowspan = td.attr('rowspan') || 1;\n\t\t\t\t\tsegMoreNodes = [];\n\n\t\t\t\t\t// make a replacement <td> for each column the segment occupies. will be one for each colspan\n\t\t\t\t\tfor (j = 0; j < colSegsBelow.length; j++) {\n\t\t\t\t\t\tmoreTd = $('<td class=\"fc-more-cell\"/>').attr('rowspan', rowspan);\n\t\t\t\t\t\tsegsBelow = colSegsBelow[j];\n\t\t\t\t\t\tmoreLink = this.renderMoreLink(\n\t\t\t\t\t\t\trow,\n\t\t\t\t\t\t\tseg.leftCol + j,\n\t\t\t\t\t\t\t[ seg ].concat(segsBelow) // count seg as hidden too\n\t\t\t\t\t\t);\n\t\t\t\t\t\tmoreWrap = $('<div/>').append(moreLink);\n\t\t\t\t\t\tmoreTd.append(moreWrap);\n\t\t\t\t\t\tsegMoreNodes.push(moreTd[0]);\n\t\t\t\t\t\tmoreNodes.push(moreTd[0]);\n\t\t\t\t\t}\n\n\t\t\t\t\ttd.addClass('fc-limited').after($(segMoreNodes)); // hide original <td> and inject replacements\n\t\t\t\t\tlimitedNodes.push(td[0]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\temptyCellsUntil(this.colCnt); // finish off the level\n\t\t\trowStruct.moreEls = $(moreNodes); // for easy undoing later\n\t\t\trowStruct.limitedEls = $(limitedNodes); // for easy undoing later\n\t\t}\n\t},\n\n\n\t// Reveals all levels and removes all \"more\"-related elements for a grid's row.\n\t// `row` is a row number.\n\tunlimitRow: function(row) {\n\t\tvar rowStruct = this.rowStructs[row];\n\n\t\tif (rowStruct.moreEls) {\n\t\t\trowStruct.moreEls.remove();\n\t\t\trowStruct.moreEls = null;\n\t\t}\n\n\t\tif (rowStruct.limitedEls) {\n\t\t\trowStruct.limitedEls.removeClass('fc-limited');\n\t\t\trowStruct.limitedEls = null;\n\t\t}\n\t},\n\n\n\t// Renders an <a> element that represents hidden event element for a cell.\n\t// Responsible for attaching click handler as well.\n\trenderMoreLink: function(row, col, hiddenSegs) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\n\t\treturn $('<a class=\"fc-more\"/>')\n\t\t\t.text(\n\t\t\t\tthis.getMoreLinkText(hiddenSegs.length)\n\t\t\t)\n\t\t\t.on('click', function(ev) {\n\t\t\t\tvar clickOption = view.opt('eventLimitClick');\n\t\t\t\tvar date = _this.getCellDate(row, col);\n\t\t\t\tvar moreEl = $(this);\n\t\t\t\tvar dayEl = _this.getCellEl(row, col);\n\t\t\t\tvar allSegs = _this.getCellSegs(row, col);\n\n\t\t\t\t// rescope the segments to be within the cell's date\n\t\t\t\tvar reslicedAllSegs = _this.resliceDaySegs(allSegs, date);\n\t\t\t\tvar reslicedHiddenSegs = _this.resliceDaySegs(hiddenSegs, date);\n\n\t\t\t\tif (typeof clickOption === 'function') {\n\t\t\t\t\t// the returned value can be an atomic option\n\t\t\t\t\tclickOption = view.trigger('eventLimitClick', null, {\n\t\t\t\t\t\tdate: date,\n\t\t\t\t\t\tdayEl: dayEl,\n\t\t\t\t\t\tmoreEl: moreEl,\n\t\t\t\t\t\tsegs: reslicedAllSegs,\n\t\t\t\t\t\thiddenSegs: reslicedHiddenSegs\n\t\t\t\t\t}, ev);\n\t\t\t\t}\n\n\t\t\t\tif (clickOption === 'popover') {\n\t\t\t\t\t_this.showSegPopover(row, col, moreEl, reslicedAllSegs);\n\t\t\t\t}\n\t\t\t\telse if (typeof clickOption === 'string') { // a view name\n\t\t\t\t\tview.calendar.zoomTo(date, clickOption);\n\t\t\t\t}\n\t\t\t});\n\t},\n\n\n\t// Reveals the popover that displays all events within a cell\n\tshowSegPopover: function(row, col, moreLink, segs) {\n\t\tvar _this = this;\n\t\tvar view = this.view;\n\t\tvar moreWrap = moreLink.parent(); // the <div> wrapper around the <a>\n\t\tvar topEl; // the element we want to match the top coordinate of\n\t\tvar options;\n\n\t\tif (this.rowCnt == 1) {\n\t\t\ttopEl = view.el; // will cause the popover to cover any sort of header\n\t\t}\n\t\telse {\n\t\t\ttopEl = this.rowEls.eq(row); // will align with top of row\n\t\t}\n\n\t\toptions = {\n\t\t\tclassName: 'fc-more-popover',\n\t\t\tcontent: this.renderSegPopoverContent(row, col, segs),\n\t\t\tparentEl: this.el,\n\t\t\ttop: topEl.offset().top,\n\t\t\tautoHide: true, // when the user clicks elsewhere, hide the popover\n\t\t\tviewportConstrain: view.opt('popoverViewportConstrain'),\n\t\t\thide: function() {\n\t\t\t\t// kill everything when the popover is hidden\n\t\t\t\t_this.segPopover.removeElement();\n\t\t\t\t_this.segPopover = null;\n\t\t\t\t_this.popoverSegs = null;\n\t\t\t}\n\t\t};\n\n\t\t// Determine horizontal coordinate.\n\t\t// We use the moreWrap instead of the <td> to avoid border confusion.\n\t\tif (this.isRTL) {\n\t\t\toptions.right = moreWrap.offset().left + moreWrap.outerWidth() + 1; // +1 to be over cell border\n\t\t}\n\t\telse {\n\t\t\toptions.left = moreWrap.offset().left - 1; // -1 to be over cell border\n\t\t}\n\n\t\tthis.segPopover = new Popover(options);\n\t\tthis.segPopover.show();\n\t},\n\n\n\t// Builds the inner DOM contents of the segment popover\n\trenderSegPopoverContent: function(row, col, segs) {\n\t\tvar view = this.view;\n\t\tvar isTheme = view.opt('theme');\n\t\tvar title = this.getCellDate(row, col).format(view.opt('dayPopoverFormat'));\n\t\tvar content = $(\n\t\t\t'<div class=\"fc-header ' + view.widgetHeaderClass + '\">' +\n\t\t\t\t'<span class=\"fc-close ' +\n\t\t\t\t\t(isTheme ? 'ui-icon ui-icon-closethick' : 'fc-icon fc-icon-x') +\n\t\t\t\t'\"></span>' +\n\t\t\t\t'<span class=\"fc-title\">' +\n\t\t\t\t\thtmlEscape(title) +\n\t\t\t\t'</span>' +\n\t\t\t\t'<div class=\"fc-clear\"/>' +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"fc-body ' + view.widgetContentClass + '\">' +\n\t\t\t\t'<div class=\"fc-event-container\"></div>' +\n\t\t\t'</div>'\n\t\t);\n\t\tvar segContainer = content.find('.fc-event-container');\n\t\tvar i;\n\n\t\t// render each seg's `el` and only return the visible segs\n\t\tsegs = this.renderFgSegEls(segs, true); // disableResizing=true\n\t\tthis.popoverSegs = segs;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\n\t\t\t// because segments in the popover are not part of a grid coordinate system, provide a hint to any\n\t\t\t// grids that want to do drag-n-drop about which cell it came from\n\t\t\tthis.prepareHits();\n\t\t\tsegs[i].hit = this.getCellHit(row, col);\n\t\t\tthis.releaseHits();\n\n\t\t\tsegContainer.append(segs[i].el);\n\t\t}\n\n\t\treturn content;\n\t},\n\n\n\t// Given the events within an array of segment objects, reslice them to be in a single day\n\tresliceDaySegs: function(segs, dayDate) {\n\n\t\t// build an array of the original events\n\t\tvar events = $.map(segs, function(seg) {\n\t\t\treturn seg.event;\n\t\t});\n\n\t\tvar dayStart = dayDate.clone();\n\t\tvar dayEnd = dayStart.clone().add(1, 'days');\n\t\tvar dayRange = { start: dayStart, end: dayEnd };\n\n\t\t// slice the events with a custom slicing function\n\t\tsegs = this.eventsToSegs(\n\t\t\tevents,\n\t\t\tfunction(range) {\n\t\t\t\tvar seg = intersectRanges(range, dayRange); // undefind if no intersection\n\t\t\t\treturn seg ? [ seg ] : []; // must return an array of segments\n\t\t\t}\n\t\t);\n\n\t\t// force an order because eventsToSegs doesn't guarantee one\n\t\tthis.sortEventSegs(segs);\n\n\t\treturn segs;\n\t},\n\n\n\t// Generates the text that should be inside a \"more\" link, given the number of events it represents\n\tgetMoreLinkText: function(num) {\n\t\tvar opt = this.view.opt('eventLimitText');\n\n\t\tif (typeof opt === 'function') {\n\t\t\treturn opt(num);\n\t\t}\n\t\telse {\n\t\t\treturn '+' + num + ' ' + opt;\n\t\t}\n\t},\n\n\n\t// Returns segments within a given cell.\n\t// If `startLevel` is specified, returns only events including and below that level. Otherwise returns all segs.\n\tgetCellSegs: function(row, col, startLevel) {\n\t\tvar segMatrix = this.rowStructs[row].segMatrix;\n\t\tvar level = startLevel || 0;\n\t\tvar segs = [];\n\t\tvar seg;\n\n\t\twhile (level < segMatrix.length) {\n\t\t\tseg = segMatrix[level][col];\n\t\t\tif (seg) {\n\t\t\t\tsegs.push(seg);\n\t\t\t}\n\t\t\tlevel++;\n\t\t}\n\n\t\treturn segs;\n\t}\n\n});\n\n;;\n\n/* A component that renders one or more columns of vertical time slots\n----------------------------------------------------------------------------------------------------------------------*/\n// We mixin DayTable, even though there is only a single row of days\n\nvar TimeGrid = FC.TimeGrid = Grid.extend(DayTableMixin, {\n\n\tslotDuration: null, // duration of a \"slot\", a distinct time segment on given day, visualized by lines\n\tsnapDuration: null, // granularity of time for dragging and selecting\n\tsnapsPerSlot: null,\n\tminTime: null, // Duration object that denotes the first visible time of any given day\n\tmaxTime: null, // Duration object that denotes the exclusive visible end time of any given day\n\tlabelFormat: null, // formatting string for times running along vertical axis\n\tlabelInterval: null, // duration of how often a label should be displayed for a slot\n\n\tcolEls: null, // cells elements in the day-row background\n\tslatEls: null, // elements running horizontally across all columns\n\thelperEl: null, // cell skeleton element for rendering the mock event \"helper\"\n\n\tcolCoordCache: null,\n\tslatCoordCache: null,\n\n\tbusinessHourSegs: null,\n\n\n\tconstructor: function() {\n\t\tGrid.apply(this, arguments); // call the super-constructor\n\n\t\tthis.processOptions();\n\t},\n\n\n\t// Renders the time grid into `this.el`, which should already be assigned.\n\t// Relies on the view's colCnt. In the future, this component should probably be self-sufficient.\n\trenderDates: function() {\n\t\tthis.el.html(this.renderHtml());\n\t\tthis.colEls = this.el.find('.fc-day');\n\t\tthis.slatEls = this.el.find('.fc-slats tr');\n\n\t\tthis.colCoordCache = new CoordCache({\n\t\t\tels: this.colEls,\n\t\t\tisHorizontal: true\n\t\t});\n\t\tthis.slatCoordCache = new CoordCache({\n\t\t\tels: this.slatEls,\n\t\t\tisVertical: true\n\t\t});\n\t},\n\n\n\trenderBusinessHours: function() {\n\t\tvar events = this.view.calendar.getBusinessHoursEvents();\n\t\tthis.businessHourSegs = this.renderFill('businessHours', this.eventsToSegs(events), 'bgevent');\n\t},\n\n\n\t// Renders the basic HTML skeleton for the grid\n\trenderHtml: function() {\n\t\treturn '' +\n\t\t\t'<div class=\"fc-bg\">' +\n\t\t\t\t'<table>' +\n\t\t\t\t\tthis.renderBgTrHtml(0) + // row=0\n\t\t\t\t'</table>' +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"fc-slats\">' +\n\t\t\t\t'<table>' +\n\t\t\t\t\tthis.renderSlatRowHtml() +\n\t\t\t\t'</table>' +\n\t\t\t'</div>';\n\t},\n\n\n\t// Generates the HTML for the horizontal \"slats\" that run width-wise. Has a time axis on a side. Depends on RTL.\n\trenderSlatRowHtml: function() {\n\t\tvar view = this.view;\n\t\tvar isRTL = this.isRTL;\n\t\tvar html = '';\n\t\tvar slotTime = moment.duration(+this.minTime); // wish there was .clone() for durations\n\t\tvar slotDate; // will be on the view's first day, but we only care about its time\n\t\tvar isLabeled;\n\t\tvar axisHtml;\n\n\t\t// Calculate the time for each slot\n\t\twhile (slotTime < this.maxTime) {\n\t\t\tslotDate = this.start.clone().time(slotTime);\n\t\t\tisLabeled = isInt(divideDurationByDuration(slotTime, this.labelInterval));\n\n\t\t\taxisHtml =\n\t\t\t\t'<td class=\"fc-axis fc-time ' + view.widgetContentClass + '\" ' + view.axisStyleAttr() + '>' +\n\t\t\t\t\t(isLabeled ?\n\t\t\t\t\t\t'<span>' + // for matchCellWidths\n\t\t\t\t\t\t\thtmlEscape(slotDate.format(this.labelFormat)) +\n\t\t\t\t\t\t'</span>' :\n\t\t\t\t\t\t''\n\t\t\t\t\t\t) +\n\t\t\t\t'</td>';\n\n\t\t\thtml +=\n\t\t\t\t'<tr ' + (isLabeled ? '' : 'class=\"fc-minor\"') + '>' +\n\t\t\t\t\t(!isRTL ? axisHtml : '') +\n\t\t\t\t\t'<td class=\"' + view.widgetContentClass + '\"/>' +\n\t\t\t\t\t(isRTL ? axisHtml : '') +\n\t\t\t\t\"</tr>\";\n\n\t\t\tslotTime.add(this.slotDuration);\n\t\t}\n\n\t\treturn html;\n\t},\n\n\n\t/* Options\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Parses various options into properties of this object\n\tprocessOptions: function() {\n\t\tvar view = this.view;\n\t\tvar slotDuration = view.opt('slotDuration');\n\t\tvar snapDuration = view.opt('snapDuration');\n\t\tvar input;\n\n\t\tslotDuration = moment.duration(slotDuration);\n\t\tsnapDuration = snapDuration ? moment.duration(snapDuration) : slotDuration;\n\n\t\tthis.slotDuration = slotDuration;\n\t\tthis.snapDuration = snapDuration;\n\t\tthis.snapsPerSlot = slotDuration / snapDuration; // TODO: ensure an integer multiple?\n\n\t\tthis.minResizeDuration = snapDuration; // hack\n\n\t\tthis.minTime = moment.duration(view.opt('minTime'));\n\t\tthis.maxTime = moment.duration(view.opt('maxTime'));\n\n\t\t// might be an array value (for TimelineView).\n\t\t// if so, getting the most granular entry (the last one probably).\n\t\tinput = view.opt('slotLabelFormat');\n\t\tif ($.isArray(input)) {\n\t\t\tinput = input[input.length - 1];\n\t\t}\n\n\t\tthis.labelFormat =\n\t\t\tinput ||\n\t\t\tview.opt('axisFormat') || // deprecated\n\t\t\tview.opt('smallTimeFormat'); // the computed default\n\n\t\tinput = view.opt('slotLabelInterval');\n\t\tthis.labelInterval = input ?\n\t\t\tmoment.duration(input) :\n\t\t\tthis.computeLabelInterval(slotDuration);\n\t},\n\n\n\t// Computes an automatic value for slotLabelInterval\n\tcomputeLabelInterval: function(slotDuration) {\n\t\tvar i;\n\t\tvar labelInterval;\n\t\tvar slotsPerLabel;\n\n\t\t// find the smallest stock label interval that results in more than one slots-per-label\n\t\tfor (i = AGENDA_STOCK_SUB_DURATIONS.length - 1; i >= 0; i--) {\n\t\t\tlabelInterval = moment.duration(AGENDA_STOCK_SUB_DURATIONS[i]);\n\t\t\tslotsPerLabel = divideDurationByDuration(labelInterval, slotDuration);\n\t\t\tif (isInt(slotsPerLabel) && slotsPerLabel > 1) {\n\t\t\t\treturn labelInterval;\n\t\t\t}\n\t\t}\n\n\t\treturn moment.duration(slotDuration); // fall back. clone\n\t},\n\n\n\t// Computes a default event time formatting string if `timeFormat` is not explicitly defined\n\tcomputeEventTimeFormat: function() {\n\t\treturn this.view.opt('noMeridiemTimeFormat'); // like \"6:30\" (no AM/PM)\n\t},\n\n\n\t// Computes a default `displayEventEnd` value if one is not expliclty defined\n\tcomputeDisplayEventEnd: function() {\n\t\treturn true;\n\t},\n\n\n\t/* Hit System\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tprepareHits: function() {\n\t\tthis.colCoordCache.build();\n\t\tthis.slatCoordCache.build();\n\t},\n\n\n\treleaseHits: function() {\n\t\tthis.colCoordCache.clear();\n\t\t// NOTE: don't clear slatCoordCache because we rely on it for computeTimeTop\n\t},\n\n\n\tqueryHit: function(leftOffset, topOffset) {\n\t\tvar snapsPerSlot = this.snapsPerSlot;\n\t\tvar colCoordCache = this.colCoordCache;\n\t\tvar slatCoordCache = this.slatCoordCache;\n\t\tvar colIndex = colCoordCache.getHorizontalIndex(leftOffset);\n\t\tvar slatIndex = slatCoordCache.getVerticalIndex(topOffset);\n\n\t\tif (colIndex != null && slatIndex != null) {\n\t\t\tvar slatTop = slatCoordCache.getTopOffset(slatIndex);\n\t\t\tvar slatHeight = slatCoordCache.getHeight(slatIndex);\n\t\t\tvar partial = (topOffset - slatTop) / slatHeight; // floating point number between 0 and 1\n\t\t\tvar localSnapIndex = Math.floor(partial * snapsPerSlot); // the snap # relative to start of slat\n\t\t\tvar snapIndex = slatIndex * snapsPerSlot + localSnapIndex;\n\t\t\tvar snapTop = slatTop + (localSnapIndex / snapsPerSlot) * slatHeight;\n\t\t\tvar snapBottom = slatTop + ((localSnapIndex + 1) / snapsPerSlot) * slatHeight;\n\n\t\t\treturn {\n\t\t\t\tcol: colIndex,\n\t\t\t\tsnap: snapIndex,\n\t\t\t\tcomponent: this, // needed unfortunately :(\n\t\t\t\tleft: colCoordCache.getLeftOffset(colIndex),\n\t\t\t\tright: colCoordCache.getRightOffset(colIndex),\n\t\t\t\ttop: snapTop,\n\t\t\t\tbottom: snapBottom\n\t\t\t};\n\t\t}\n\t},\n\n\n\tgetHitSpan: function(hit) {\n\t\tvar start = this.getCellDate(0, hit.col); // row=0\n\t\tvar time = this.computeSnapTime(hit.snap); // pass in the snap-index\n\t\tvar end;\n\n\t\tstart.time(time);\n\t\tend = start.clone().add(this.snapDuration);\n\n\t\treturn { start: start, end: end };\n\t},\n\n\n\tgetHitEl: function(hit) {\n\t\treturn this.colEls.eq(hit.col);\n\t},\n\n\n\t/* Dates\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\trangeUpdated: function() {\n\t\tthis.updateDayTable();\n\t},\n\n\n\t// Given a row number of the grid, representing a \"snap\", returns a time (Duration) from its start-of-day\n\tcomputeSnapTime: function(snapIndex) {\n\t\treturn moment.duration(this.minTime + this.snapDuration * snapIndex);\n\t},\n\n\n\t// Slices up the given span (unzoned start/end with other misc data) into an array of segments\n\tspanToSegs: function(span) {\n\t\tvar segs = this.sliceRangeByTimes(span);\n\t\tvar i;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tif (this.isRTL) {\n\t\t\t\tsegs[i].col = this.daysPerRow - 1 - segs[i].dayIndex;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsegs[i].col = segs[i].dayIndex;\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\tsliceRangeByTimes: function(range) {\n\t\tvar segs = [];\n\t\tvar seg;\n\t\tvar dayIndex;\n\t\tvar dayDate;\n\t\tvar dayRange;\n\n\t\tfor (dayIndex = 0; dayIndex < this.daysPerRow; dayIndex++) {\n\t\t\tdayDate = this.dayDates[dayIndex].clone(); // TODO: better API for this?\n\t\t\tdayRange = {\n\t\t\t\tstart: dayDate.clone().time(this.minTime),\n\t\t\t\tend: dayDate.clone().time(this.maxTime)\n\t\t\t};\n\t\t\tseg = intersectRanges(range, dayRange); // both will be ambig timezone\n\t\t\tif (seg) {\n\t\t\t\tseg.dayIndex = dayIndex;\n\t\t\t\tsegs.push(seg);\n\t\t\t}\n\t\t}\n\n\t\treturn segs;\n\t},\n\n\n\t/* Coordinates\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tupdateSize: function(isResize) { // NOT a standard Grid method\n\t\tthis.slatCoordCache.build();\n\n\t\tif (isResize) {\n\t\t\tthis.updateSegVerticals();\n\t\t}\n\t},\n\n\n\t// Computes the top coordinate, relative to the bounds of the grid, of the given date.\n\t// A `startOfDayDate` must be given for avoiding ambiguity over how to treat midnight.\n\tcomputeDateTop: function(date, startOfDayDate) {\n\t\treturn this.computeTimeTop(\n\t\t\tmoment.duration(\n\t\t\t\tdate - startOfDayDate.clone().stripTime()\n\t\t\t)\n\t\t);\n\t},\n\n\n\t// Computes the top coordinate, relative to the bounds of the grid, of the given time (a Duration).\n\tcomputeTimeTop: function(time) {\n\t\tvar len = this.slatEls.length;\n\t\tvar slatCoverage = (time - this.minTime) / this.slotDuration; // floating-point value of # of slots covered\n\t\tvar slatIndex;\n\t\tvar slatRemainder;\n\n\t\t// compute a floating-point number for how many slats should be progressed through.\n\t\t// from 0 to number of slats (inclusive)\n\t\t// constrained because minTime/maxTime might be customized.\n\t\tslatCoverage = Math.max(0, slatCoverage);\n\t\tslatCoverage = Math.min(len, slatCoverage);\n\n\t\t// an integer index of the furthest whole slat\n\t\t// from 0 to number slats (*exclusive*, so len-1)\n\t\tslatIndex = Math.floor(slatCoverage);\n\t\tslatIndex = Math.min(slatIndex, len - 1);\n\n\t\t// how much further through the slatIndex slat (from 0.0-1.0) must be covered in addition.\n\t\t// could be 1.0 if slatCoverage is covering *all* the slots\n\t\tslatRemainder = slatCoverage - slatIndex;\n\n\t\treturn this.slatCoordCache.getTopPosition(slatIndex) +\n\t\t\tthis.slatCoordCache.getHeight(slatIndex) * slatRemainder;\n\t},\n\n\n\n\t/* Event Drag Visualization\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of an event being dragged over the specified date(s).\n\t// A returned value of `true` signals that a mock \"helper\" event has been rendered.\n\trenderDrag: function(eventLocation, seg) {\n\n\t\tif (seg) { // if there is event information for this drag, render a helper event\n\t\t\tthis.renderEventLocationHelper(eventLocation, seg);\n\t\t\tthis.applyDragOpacity(this.helperEl);\n\n\t\t\treturn true; // signal that a helper has been rendered\n\t\t}\n\t\telse {\n\t\t\t// otherwise, just render a highlight\n\t\t\tthis.renderHighlight(this.eventToSpan(eventLocation));\n\t\t}\n\t},\n\n\n\t// Unrenders any visual indication of an event being dragged\n\tunrenderDrag: function() {\n\t\tthis.unrenderHelper();\n\t\tthis.unrenderHighlight();\n\t},\n\n\n\t/* Event Resize Visualization\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of an event being resized\n\trenderEventResize: function(eventLocation, seg) {\n\t\tthis.renderEventLocationHelper(eventLocation, seg);\n\t},\n\n\n\t// Unrenders any visual indication of an event being resized\n\tunrenderEventResize: function() {\n\t\tthis.unrenderHelper();\n\t},\n\n\n\t/* Event Helper\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a mock \"helper\" event. `sourceSeg` is the original segment object and might be null (an external drag)\n\trenderHelper: function(event, sourceSeg) {\n\t\tvar segs = this.eventToSegs(event);\n\t\tvar tableEl;\n\t\tvar i, seg;\n\t\tvar sourceEl;\n\n\t\tsegs = this.renderFgSegEls(segs); // assigns each seg's el and returns a subset of segs that were rendered\n\t\ttableEl = this.renderSegTable(segs);\n\n\t\t// Try to make the segment that is in the same row as sourceSeg look the same\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\t\t\tif (sourceSeg && sourceSeg.col === seg.col) {\n\t\t\t\tsourceEl = sourceSeg.el;\n\t\t\t\tseg.el.css({\n\t\t\t\t\tleft: sourceEl.css('left'),\n\t\t\t\t\tright: sourceEl.css('right'),\n\t\t\t\t\t'margin-left': sourceEl.css('margin-left'),\n\t\t\t\t\t'margin-right': sourceEl.css('margin-right')\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tthis.helperEl = $('<div class=\"fc-helper-skeleton\"/>')\n\t\t\t.append(tableEl)\n\t\t\t\t.appendTo(this.el);\n\t},\n\n\n\t// Unrenders any mock helper event\n\tunrenderHelper: function() {\n\t\tif (this.helperEl) {\n\t\t\tthis.helperEl.remove();\n\t\t\tthis.helperEl = null;\n\t\t}\n\t},\n\n\n\t/* Selection\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of a selection. Overrides the default, which was to simply render a highlight.\n\trenderSelection: function(span) {\n\t\tif (this.view.opt('selectHelper')) { // this setting signals that a mock helper event should be rendered\n\n\t\t\t// normally acceps an eventLocation, span has a start/end, which is good enough\n\t\t\tthis.renderEventLocationHelper(span);\n\t\t}\n\t\telse {\n\t\t\tthis.renderHighlight(span);\n\t\t}\n\t},\n\n\n\t// Unrenders any visual indication of a selection\n\tunrenderSelection: function() {\n\t\tthis.unrenderHelper();\n\t\tthis.unrenderHighlight();\n\t},\n\n\n\t/* Fill System (highlight, background events, business hours)\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a set of rectangles over the given time segments.\n\t// Only returns segments that successfully rendered.\n\trenderFill: function(type, segs, className) {\n\t\tvar segCols;\n\t\tvar skeletonEl;\n\t\tvar trEl;\n\t\tvar col, colSegs;\n\t\tvar tdEl;\n\t\tvar containerEl;\n\t\tvar dayDate;\n\t\tvar i, seg;\n\n\t\tif (segs.length) {\n\n\t\t\tsegs = this.renderFillSegEls(type, segs); // assignes `.el` to each seg. returns successfully rendered segs\n\t\t\tsegCols = this.groupSegCols(segs); // group into sub-arrays, and assigns 'col' to each seg\n\n\t\t\tclassName = className || type.toLowerCase();\n\t\t\tskeletonEl = $(\n\t\t\t\t'<div class=\"fc-' + className + '-skeleton\">' +\n\t\t\t\t\t'<table><tr/></table>' +\n\t\t\t\t'</div>'\n\t\t\t);\n\t\t\ttrEl = skeletonEl.find('tr');\n\n\t\t\tfor (col = 0; col < segCols.length; col++) {\n\t\t\t\tcolSegs = segCols[col];\n\t\t\t\ttdEl = $('<td/>').appendTo(trEl);\n\n\t\t\t\tif (colSegs.length) {\n\t\t\t\t\tcontainerEl = $('<div class=\"fc-' + className + '-container\"/>').appendTo(tdEl);\n\t\t\t\t\tdayDate = this.getCellDate(0, col); // row=0\n\n\t\t\t\t\tfor (i = 0; i < colSegs.length; i++) {\n\t\t\t\t\t\tseg = colSegs[i];\n\t\t\t\t\t\tcontainerEl.append(\n\t\t\t\t\t\t\tseg.el.css({\n\t\t\t\t\t\t\t\ttop: this.computeDateTop(seg.start, dayDate),\n\t\t\t\t\t\t\t\tbottom: -this.computeDateTop(seg.end, dayDate) // the y position of the bottom edge\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\n\t\t\tthis.bookendCells(trEl);\n\n\t\t\tthis.el.append(skeletonEl);\n\t\t\tthis.elsByFill[type] = skeletonEl;\n\t\t}\n\n\t\treturn segs;\n\t}\n\n});\n\n;;\n\n/* Event-rendering methods for the TimeGrid class\n----------------------------------------------------------------------------------------------------------------------*/\n\nTimeGrid.mixin({\n\n\teventSkeletonEl: null, // has cells with event-containers, which contain absolutely positioned event elements\n\n\n\t// Renders the given foreground event segments onto the grid\n\trenderFgSegs: function(segs) {\n\t\tsegs = this.renderFgSegEls(segs); // returns a subset of the segs. segs that were actually rendered\n\n\t\tthis.el.append(\n\t\t\tthis.eventSkeletonEl = $('<div class=\"fc-content-skeleton\"/>')\n\t\t\t\t.append(this.renderSegTable(segs))\n\t\t);\n\n\t\treturn segs; // return only the segs that were actually rendered\n\t},\n\n\n\t// Unrenders all currently rendered foreground event segments\n\tunrenderFgSegs: function(segs) {\n\t\tif (this.eventSkeletonEl) {\n\t\t\tthis.eventSkeletonEl.remove();\n\t\t\tthis.eventSkeletonEl = null;\n\t\t}\n\t},\n\n\n\t// Renders and returns the <table> portion of the event-skeleton.\n\t// Returns an object with properties 'tbodyEl' and 'segs'.\n\trenderSegTable: function(segs) {\n\t\tvar tableEl = $('<table><tr/></table>');\n\t\tvar trEl = tableEl.find('tr');\n\t\tvar segCols;\n\t\tvar i, seg;\n\t\tvar col, colSegs;\n\t\tvar containerEl;\n\n\t\tsegCols = this.groupSegCols(segs); // group into sub-arrays, and assigns 'col' to each seg\n\n\t\tthis.computeSegVerticals(segs); // compute and assign top/bottom\n\n\t\tfor (col = 0; col < segCols.length; col++) { // iterate each column grouping\n\t\t\tcolSegs = segCols[col];\n\t\t\tthis.placeSlotSegs(colSegs); // compute horizontal coordinates, z-index's, and reorder the array\n\n\t\t\tcontainerEl = $('<div class=\"fc-event-container\"/>');\n\n\t\t\t// assign positioning CSS and insert into container\n\t\t\tfor (i = 0; i < colSegs.length; i++) {\n\t\t\t\tseg = colSegs[i];\n\t\t\t\tseg.el.css(this.generateSegPositionCss(seg));\n\n\t\t\t\t// if the height is short, add a className for alternate styling\n\t\t\t\tif (seg.bottom - seg.top < 30) {\n\t\t\t\t\tseg.el.addClass('fc-short');\n\t\t\t\t}\n\n\t\t\t\tcontainerEl.append(seg.el);\n\t\t\t}\n\n\t\t\ttrEl.append($('<td/>').append(containerEl));\n\t\t}\n\n\t\tthis.bookendCells(trEl);\n\n\t\treturn tableEl;\n\t},\n\n\n\t// Given an array of segments that are all in the same column, sets the backwardCoord and forwardCoord on each.\n\t// NOTE: Also reorders the given array by date!\n\tplaceSlotSegs: function(segs) {\n\t\tvar levels;\n\t\tvar level0;\n\t\tvar i;\n\n\t\tthis.sortEventSegs(segs); // order by certain criteria\n\t\tlevels = buildSlotSegLevels(segs);\n\t\tcomputeForwardSlotSegs(levels);\n\n\t\tif ((level0 = levels[0])) {\n\n\t\t\tfor (i = 0; i < level0.length; i++) {\n\t\t\t\tcomputeSlotSegPressures(level0[i]);\n\t\t\t}\n\n\t\t\tfor (i = 0; i < level0.length; i++) {\n\t\t\t\tthis.computeSlotSegCoords(level0[i], 0, 0);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Calculate seg.forwardCoord and seg.backwardCoord for the segment, where both values range\n\t// from 0 to 1. If the calendar is left-to-right, the seg.backwardCoord maps to \"left\" and\n\t// seg.forwardCoord maps to \"right\" (via percentage). Vice-versa if the calendar is right-to-left.\n\t//\n\t// The segment might be part of a \"series\", which means consecutive segments with the same pressure\n\t// who's width is unknown until an edge has been hit. `seriesBackwardPressure` is the number of\n\t// segments behind this one in the current series, and `seriesBackwardCoord` is the starting\n\t// coordinate of the first segment in the series.\n\tcomputeSlotSegCoords: function(seg, seriesBackwardPressure, seriesBackwardCoord) {\n\t\tvar forwardSegs = seg.forwardSegs;\n\t\tvar i;\n\n\t\tif (seg.forwardCoord === undefined) { // not already computed\n\n\t\t\tif (!forwardSegs.length) {\n\n\t\t\t\t// if there are no forward segments, this segment should butt up against the edge\n\t\t\t\tseg.forwardCoord = 1;\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// sort highest pressure first\n\t\t\t\tthis.sortForwardSlotSegs(forwardSegs);\n\n\t\t\t\t// this segment's forwardCoord will be calculated from the backwardCoord of the\n\t\t\t\t// highest-pressure forward segment.\n\t\t\t\tthis.computeSlotSegCoords(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n\t\t\t\tseg.forwardCoord = forwardSegs[0].backwardCoord;\n\t\t\t}\n\n\t\t\t// calculate the backwardCoord from the forwardCoord. consider the series\n\t\t\tseg.backwardCoord = seg.forwardCoord -\n\t\t\t\t(seg.forwardCoord - seriesBackwardCoord) / // available width for series\n\t\t\t\t(seriesBackwardPressure + 1); // # of segments in the series\n\n\t\t\t// use this segment's coordinates to computed the coordinates of the less-pressurized\n\t\t\t// forward segments\n\t\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\t\tthis.computeSlotSegCoords(forwardSegs[i], 0, seg.forwardCoord);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Refreshes the CSS top/bottom coordinates for each segment element. Probably after a window resize/zoom.\n\t// Repositions business hours segs too, so not just for events. Maybe shouldn't be here.\n\tupdateSegVerticals: function() {\n\t\tvar allSegs = (this.segs || []).concat(this.businessHourSegs || []);\n\t\tvar i;\n\n\t\tthis.computeSegVerticals(allSegs);\n\n\t\tfor (i = 0; i < allSegs.length; i++) {\n\t\t\tallSegs[i].el.css(\n\t\t\t\tthis.generateSegVerticalCss(allSegs[i])\n\t\t\t);\n\t\t}\n\t},\n\n\n\t// For each segment in an array, computes and assigns its top and bottom properties\n\tcomputeSegVerticals: function(segs) {\n\t\tvar i, seg;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tseg = segs[i];\n\t\t\tseg.top = this.computeDateTop(seg.start, seg.start);\n\t\t\tseg.bottom = this.computeDateTop(seg.end, seg.start);\n\t\t}\n\t},\n\n\n\t// Renders the HTML for a single event segment's default rendering\n\tfgSegHtml: function(seg, disableResizing) {\n\t\tvar view = this.view;\n\t\tvar event = seg.event;\n\t\tvar isDraggable = view.isEventDraggable(event);\n\t\tvar isResizableFromStart = !disableResizing && seg.isStart && view.isEventResizableFromStart(event);\n\t\tvar isResizableFromEnd = !disableResizing && seg.isEnd && view.isEventResizableFromEnd(event);\n\t\tvar classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd);\n\t\tvar skinCss = cssToStr(this.getEventSkinCss(event));\n\t\tvar timeText;\n\t\tvar fullTimeText; // more verbose time text. for the print stylesheet\n\t\tvar startTimeText; // just the start time text\n\n\t\tclasses.unshift('fc-time-grid-event', 'fc-v-event');\n\n\t\tif (view.isMultiDayEvent(event)) { // if the event appears to span more than one day...\n\t\t\t// Don't display time text on segments that run entirely through a day.\n\t\t\t// That would appear as midnight-midnight and would look dumb.\n\t\t\t// Otherwise, display the time text for the *segment's* times (like 6pm-midnight or midnight-10am)\n\t\t\tif (seg.isStart || seg.isEnd) {\n\t\t\t\ttimeText = this.getEventTimeText(seg);\n\t\t\t\tfullTimeText = this.getEventTimeText(seg, 'LT');\n\t\t\t\tstartTimeText = this.getEventTimeText(seg, null, false); // displayEnd=false\n\t\t\t}\n\t\t} else {\n\t\t\t// Display the normal time text for the *event's* times\n\t\t\ttimeText = this.getEventTimeText(event);\n\t\t\tfullTimeText = this.getEventTimeText(event, 'LT');\n\t\t\tstartTimeText = this.getEventTimeText(event, null, false); // displayEnd=false\n\t\t}\n\n\t\treturn '<a class=\"' + classes.join(' ') + '\"' +\n\t\t\t(event.url ?\n\t\t\t\t' href=\"' + htmlEscape(event.url) + '\"' :\n\t\t\t\t''\n\t\t\t\t) +\n\t\t\t(skinCss ?\n\t\t\t\t' style=\"' + skinCss + '\"' :\n\t\t\t\t''\n\t\t\t\t) +\n\t\t\t'>' +\n\t\t\t\t'<div class=\"fc-content\">' +\n\t\t\t\t\t(timeText ?\n\t\t\t\t\t\t'<div class=\"fc-time\"' +\n\t\t\t\t\t\t' data-start=\"' + htmlEscape(startTimeText) + '\"' +\n\t\t\t\t\t\t' data-full=\"' + htmlEscape(fullTimeText) + '\"' +\n\t\t\t\t\t\t'>' +\n\t\t\t\t\t\t\t'<span>' + htmlEscape(timeText) + '</span>' +\n\t\t\t\t\t\t'</div>' :\n\t\t\t\t\t\t''\n\t\t\t\t\t\t) +\n\t\t\t\t\t(event.title ?\n\t\t\t\t\t\t'<div class=\"fc-title\">' +\n\t\t\t\t\t\t\thtmlEscape(event.title) +\n\t\t\t\t\t\t'</div>' :\n\t\t\t\t\t\t''\n\t\t\t\t\t\t) +\n\t\t\t\t'</div>' +\n\t\t\t\t'<div class=\"fc-bg\"/>' +\n\t\t\t\t/* TODO: write CSS for this\n\t\t\t\t(isResizableFromStart ?\n\t\t\t\t\t'<div class=\"fc-resizer fc-start-resizer\" />' :\n\t\t\t\t\t''\n\t\t\t\t\t) +\n\t\t\t\t*/\n\t\t\t\t(isResizableFromEnd ?\n\t\t\t\t\t'<div class=\"fc-resizer fc-end-resizer\" />' :\n\t\t\t\t\t''\n\t\t\t\t\t) +\n\t\t\t'</a>';\n\t},\n\n\n\t// Generates an object with CSS properties/values that should be applied to an event segment element.\n\t// Contains important positioning-related properties that should be applied to any event element, customized or not.\n\tgenerateSegPositionCss: function(seg) {\n\t\tvar shouldOverlap = this.view.opt('slotEventOverlap');\n\t\tvar backwardCoord = seg.backwardCoord; // the left side if LTR. the right side if RTL. floating-point\n\t\tvar forwardCoord = seg.forwardCoord; // the right side if LTR. the left side if RTL. floating-point\n\t\tvar props = this.generateSegVerticalCss(seg); // get top/bottom first\n\t\tvar left; // amount of space from left edge, a fraction of the total width\n\t\tvar right; // amount of space from right edge, a fraction of the total width\n\n\t\tif (shouldOverlap) {\n\t\t\t// double the width, but don't go beyond the maximum forward coordinate (1.0)\n\t\t\tforwardCoord = Math.min(1, backwardCoord + (forwardCoord - backwardCoord) * 2);\n\t\t}\n\n\t\tif (this.isRTL) {\n\t\t\tleft = 1 - forwardCoord;\n\t\t\tright = backwardCoord;\n\t\t}\n\t\telse {\n\t\t\tleft = backwardCoord;\n\t\t\tright = 1 - forwardCoord;\n\t\t}\n\n\t\tprops.zIndex = seg.level + 1; // convert from 0-base to 1-based\n\t\tprops.left = left * 100 + '%';\n\t\tprops.right = right * 100 + '%';\n\n\t\tif (shouldOverlap && seg.forwardPressure) {\n\t\t\t// add padding to the edge so that forward stacked events don't cover the resizer's icon\n\t\t\tprops[this.isRTL ? 'marginLeft' : 'marginRight'] = 10 * 2; // 10 is a guesstimate of the icon's width\n\t\t}\n\n\t\treturn props;\n\t},\n\n\n\t// Generates an object with CSS properties for the top/bottom coordinates of a segment element\n\tgenerateSegVerticalCss: function(seg) {\n\t\treturn {\n\t\t\ttop: seg.top,\n\t\t\tbottom: -seg.bottom // flipped because needs to be space beyond bottom edge of event container\n\t\t};\n\t},\n\n\n\t// Given a flat array of segments, return an array of sub-arrays, grouped by each segment's col\n\tgroupSegCols: function(segs) {\n\t\tvar segCols = [];\n\t\tvar i;\n\n\t\tfor (i = 0; i < this.colCnt; i++) {\n\t\t\tsegCols.push([]);\n\t\t}\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tsegCols[segs[i].col].push(segs[i]);\n\t\t}\n\n\t\treturn segCols;\n\t},\n\n\n\tsortForwardSlotSegs: function(forwardSegs) {\n\t\tforwardSegs.sort(proxy(this, 'compareForwardSlotSegs'));\n\t},\n\n\n\t// A cmp function for determining which forward segment to rely on more when computing coordinates.\n\tcompareForwardSlotSegs: function(seg1, seg2) {\n\t\t// put higher-pressure first\n\t\treturn seg2.forwardPressure - seg1.forwardPressure ||\n\t\t\t// put segments that are closer to initial edge first (and favor ones with no coords yet)\n\t\t\t(seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\n\t\t\t// do normal sorting...\n\t\t\tthis.compareEventSegs(seg1, seg2);\n\t}\n\n});\n\n\n// Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is\n// left-to-right, or the rightmost if the calendar is right-to-left. Assumes the segments are already ordered by date.\nfunction buildSlotSegLevels(segs) {\n\tvar levels = [];\n\tvar i, seg;\n\tvar j;\n\n\tfor (i=0; i<segs.length; i++) {\n\t\tseg = segs[i];\n\n\t\t// go through all the levels and stop on the first level where there are no collisions\n\t\tfor (j=0; j<levels.length; j++) {\n\t\t\tif (!computeSlotSegCollisions(seg, levels[j]).length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tseg.level = j;\n\n\t\t(levels[j] || (levels[j] = [])).push(seg);\n\t}\n\n\treturn levels;\n}\n\n\n// For every segment, figure out the other segments that are in subsequent\n// levels that also occupy the same vertical space. Accumulate in seg.forwardSegs\nfunction computeForwardSlotSegs(levels) {\n\tvar i, level;\n\tvar j, seg;\n\tvar k;\n\n\tfor (i=0; i<levels.length; i++) {\n\t\tlevel = levels[i];\n\n\t\tfor (j=0; j<level.length; j++) {\n\t\t\tseg = level[j];\n\n\t\t\tseg.forwardSegs = [];\n\t\t\tfor (k=i+1; k<levels.length; k++) {\n\t\t\t\tcomputeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// Figure out which path forward (via seg.forwardSegs) results in the longest path until\n// the furthest edge is reached. The number of segments in this path will be seg.forwardPressure\nfunction computeSlotSegPressures(seg) {\n\tvar forwardSegs = seg.forwardSegs;\n\tvar forwardPressure = 0;\n\tvar i, forwardSeg;\n\n\tif (seg.forwardPressure === undefined) { // not already computed\n\n\t\tfor (i=0; i<forwardSegs.length; i++) {\n\t\t\tforwardSeg = forwardSegs[i];\n\n\t\t\t// figure out the child's maximum forward path\n\t\t\tcomputeSlotSegPressures(forwardSeg);\n\n\t\t\t// either use the existing maximum, or use the child's forward pressure\n\t\t\t// plus one (for the forwardSeg itself)\n\t\t\tforwardPressure = Math.max(\n\t\t\t\tforwardPressure,\n\t\t\t\t1 + forwardSeg.forwardPressure\n\t\t\t);\n\t\t}\n\n\t\tseg.forwardPressure = forwardPressure;\n\t}\n}\n\n\n// Find all the segments in `otherSegs` that vertically collide with `seg`.\n// Append into an optionally-supplied `results` array and return.\nfunction computeSlotSegCollisions(seg, otherSegs, results) {\n\tresults = results || [];\n\n\tfor (var i=0; i<otherSegs.length; i++) {\n\t\tif (isSlotSegCollision(seg, otherSegs[i])) {\n\t\t\tresults.push(otherSegs[i]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\n\n// Do these segments occupy the same vertical space?\nfunction isSlotSegCollision(seg1, seg2) {\n\treturn seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}\n\n;;\n\n/* An abstract class from which other views inherit from\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar View = FC.View = Class.extend({\n\n\ttype: null, // subclass' view name (string)\n\tname: null, // deprecated. use `type` instead\n\ttitle: null, // the text that will be displayed in the header's title\n\n\tcalendar: null, // owner Calendar object\n\toptions: null, // hash containing all options. already merged with view-specific-options\n\tel: null, // the view's containing element. set by Calendar\n\n\tdisplaying: null, // a promise representing the state of rendering. null if no render requested\n\tisSkeletonRendered: false,\n\tisEventsRendered: false,\n\n\t// range the view is actually displaying (moments)\n\tstart: null,\n\tend: null, // exclusive\n\n\t// range the view is formally responsible for (moments)\n\t// may be different from start/end. for example, a month view might have 1st-31st, excluding padded dates\n\tintervalStart: null,\n\tintervalEnd: null, // exclusive\n\tintervalDuration: null,\n\tintervalUnit: null, // name of largest unit being displayed, like \"month\" or \"week\"\n\n\tisRTL: false,\n\tisSelected: false, // boolean whether a range of time is user-selected or not\n\n\teventOrderSpecs: null, // criteria for ordering events when they have same date/time\n\n\t// subclasses can optionally use a scroll container\n\tscrollerEl: null, // the element that will most likely scroll when content is too tall\n\tscrollTop: null, // cached vertical scroll value\n\n\t// classNames styled by jqui themes\n\twidgetHeaderClass: null,\n\twidgetContentClass: null,\n\thighlightStateClass: null,\n\n\t// for date utils, computed from options\n\tnextDayThreshold: null,\n\tisHiddenDayHash: null,\n\n\t// document handlers, bound to `this` object\n\tdocumentMousedownProxy: null, // TODO: doesn't work with touch\n\n\n\tconstructor: function(calendar, type, options, intervalDuration) {\n\n\t\tthis.calendar = calendar;\n\t\tthis.type = this.name = type; // .name is deprecated\n\t\tthis.options = options;\n\t\tthis.intervalDuration = intervalDuration || moment.duration(1, 'day');\n\n\t\tthis.nextDayThreshold = moment.duration(this.opt('nextDayThreshold'));\n\t\tthis.initThemingProps();\n\t\tthis.initHiddenDays();\n\t\tthis.isRTL = this.opt('isRTL');\n\n\t\tthis.eventOrderSpecs = parseFieldSpecs(this.opt('eventOrder'));\n\n\t\tthis.documentMousedownProxy = proxy(this, 'documentMousedown');\n\n\t\tthis.initialize();\n\t},\n\n\n\t// A good place for subclasses to initialize member variables\n\tinitialize: function() {\n\t\t// subclasses can implement\n\t},\n\n\n\t// Retrieves an option with the given name\n\topt: function(name) {\n\t\treturn this.options[name];\n\t},\n\n\n\t// Triggers handlers that are view-related. Modifies args before passing to calendar.\n\ttrigger: function(name, thisObj) { // arguments beyond thisObj are passed along\n\t\tvar calendar = this.calendar;\n\n\t\treturn calendar.trigger.apply(\n\t\t\tcalendar,\n\t\t\t[name, thisObj || this].concat(\n\t\t\t\tArray.prototype.slice.call(arguments, 2), // arguments beyond thisObj\n\t\t\t\t[ this ] // always make the last argument a reference to the view. TODO: deprecate\n\t\t\t)\n\t\t);\n\t},\n\n\n\t/* Dates\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Updates all internal dates to center around the given current unzoned date.\n\tsetDate: function(date) {\n\t\tthis.setRange(this.computeRange(date));\n\t},\n\n\n\t// Updates all internal dates for displaying the given unzoned range.\n\tsetRange: function(range) {\n\t\t$.extend(this, range); // assigns every property to this object's member variables\n\t\tthis.updateTitle();\n\t},\n\n\n\t// Given a single current unzoned date, produce information about what range to display.\n\t// Subclasses can override. Must return all properties.\n\tcomputeRange: function(date) {\n\t\tvar intervalUnit = computeIntervalUnit(this.intervalDuration);\n\t\tvar intervalStart = date.clone().startOf(intervalUnit);\n\t\tvar intervalEnd = intervalStart.clone().add(this.intervalDuration);\n\t\tvar start, end;\n\n\t\t// normalize the range's time-ambiguity\n\t\tif (/year|month|week|day/.test(intervalUnit)) { // whole-days?\n\t\t\tintervalStart.stripTime();\n\t\t\tintervalEnd.stripTime();\n\t\t}\n\t\telse { // needs to have a time?\n\t\t\tif (!intervalStart.hasTime()) {\n\t\t\t\tintervalStart = this.calendar.time(0); // give 00:00 time\n\t\t\t}\n\t\t\tif (!intervalEnd.hasTime()) {\n\t\t\t\tintervalEnd = this.calendar.time(0); // give 00:00 time\n\t\t\t}\n\t\t}\n\n\t\tstart = intervalStart.clone();\n\t\tstart = this.skipHiddenDays(start);\n\t\tend = intervalEnd.clone();\n\t\tend = this.skipHiddenDays(end, -1, true); // exclusively move backwards\n\n\t\treturn {\n\t\t\tintervalUnit: intervalUnit,\n\t\t\tintervalStart: intervalStart,\n\t\t\tintervalEnd: intervalEnd,\n\t\t\tstart: start,\n\t\t\tend: end\n\t\t};\n\t},\n\n\n\t// Computes the new date when the user hits the prev button, given the current date\n\tcomputePrevDate: function(date) {\n\t\treturn this.massageCurrentDate(\n\t\t\tdate.clone().startOf(this.intervalUnit).subtract(this.intervalDuration), -1\n\t\t);\n\t},\n\n\n\t// Computes the new date when the user hits the next button, given the current date\n\tcomputeNextDate: function(date) {\n\t\treturn this.massageCurrentDate(\n\t\t\tdate.clone().startOf(this.intervalUnit).add(this.intervalDuration)\n\t\t);\n\t},\n\n\n\t// Given an arbitrarily calculated current date of the calendar, returns a date that is ensured to be completely\n\t// visible. `direction` is optional and indicates which direction the current date was being\n\t// incremented or decremented (1 or -1).\n\tmassageCurrentDate: function(date, direction) {\n\t\tif (this.intervalDuration.as('days') <= 1) { // if the view displays a single day or smaller\n\t\t\tif (this.isHiddenDay(date)) {\n\t\t\t\tdate = this.skipHiddenDays(date, direction);\n\t\t\t\tdate.startOf('day');\n\t\t\t}\n\t\t}\n\n\t\treturn date;\n\t},\n\n\n\t/* Title and Date Formatting\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Sets the view's title property to the most updated computed value\n\tupdateTitle: function() {\n\t\tthis.title = this.computeTitle();\n\t},\n\n\n\t// Computes what the title at the top of the calendar should be for this view\n\tcomputeTitle: function() {\n\t\treturn this.formatRange(\n\t\t\t{\n\t\t\t\t// in case intervalStart/End has a time, make sure timezone is correct\n\t\t\t\tstart: this.calendar.applyTimezone(this.intervalStart),\n\t\t\t\tend: this.calendar.applyTimezone(this.intervalEnd)\n\t\t\t},\n\t\t\tthis.opt('titleFormat') || this.computeTitleFormat(),\n\t\t\tthis.opt('titleRangeSeparator')\n\t\t);\n\t},\n\n\n\t// Generates the format string that should be used to generate the title for the current date range.\n\t// Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.\n\tcomputeTitleFormat: function() {\n\t\tif (this.intervalUnit == 'year') {\n\t\t\treturn 'YYYY';\n\t\t}\n\t\telse if (this.intervalUnit == 'month') {\n\t\t\treturn this.opt('monthYearFormat'); // like \"September 2014\"\n\t\t}\n\t\telse if (this.intervalDuration.as('days') > 1) {\n\t\t\treturn 'll'; // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n\t\t}\n\t\telse {\n\t\t\treturn 'LL'; // one day. longer, like \"September 9 2014\"\n\t\t}\n\t},\n\n\n\t// Utility for formatting a range. Accepts a range object, formatting string, and optional separator.\n\t// Displays all-day ranges naturally, with an inclusive end. Takes the current isRTL into account.\n\t// The timezones of the dates within `range` will be respected.\n\tformatRange: function(range, formatStr, separator) {\n\t\tvar end = range.end;\n\n\t\tif (!end.hasTime()) { // all-day?\n\t\t\tend = end.clone().subtract(1); // convert to inclusive. last ms of previous day\n\t\t}\n\n\t\treturn formatRange(range.start, end, formatStr, separator, this.opt('isRTL'));\n\t},\n\n\n\t/* Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Sets the container element that the view should render inside of.\n\t// Does other DOM-related initializations.\n\tsetElement: function(el) {\n\t\tthis.el = el;\n\t\tthis.bindGlobalHandlers();\n\t},\n\n\n\t// Removes the view's container element from the DOM, clearing any content beforehand.\n\t// Undoes any other DOM-related attachments.\n\tremoveElement: function() {\n\t\tthis.clear(); // clears all content\n\n\t\t// clean up the skeleton\n\t\tif (this.isSkeletonRendered) {\n\t\t\tthis.unrenderSkeleton();\n\t\t\tthis.isSkeletonRendered = false;\n\t\t}\n\n\t\tthis.unbindGlobalHandlers();\n\n\t\tthis.el.remove();\n\n\t\t// NOTE: don't null-out this.el in case the View was destroyed within an API callback.\n\t\t// We don't null-out the View's other jQuery element references upon destroy,\n\t\t// so we shouldn't kill this.el either.\n\t},\n\n\n\t// Does everything necessary to display the view centered around the given unzoned date.\n\t// Does every type of rendering EXCEPT rendering events.\n\t// Is asychronous and returns a promise.\n\tdisplay: function(date) {\n\t\tvar _this = this;\n\t\tvar scrollState = null;\n\n\t\tif (this.displaying) {\n\t\t\tscrollState = this.queryScroll();\n\t\t}\n\n\t\tthis.calendar.freezeContentHeight();\n\n\t\treturn this.clear().then(function() { // clear the content first (async)\n\t\t\treturn (\n\t\t\t\t_this.displaying =\n\t\t\t\t\t$.when(_this.displayView(date)) // displayView might return a promise\n\t\t\t\t\t\t.then(function() {\n\t\t\t\t\t\t\t_this.forceScroll(_this.computeInitialScroll(scrollState));\n\t\t\t\t\t\t\t_this.calendar.unfreezeContentHeight();\n\t\t\t\t\t\t\t_this.triggerRender();\n\t\t\t\t\t\t})\n\t\t\t);\n\t\t});\n\t},\n\n\n\t// Does everything necessary to clear the content of the view.\n\t// Clears dates and events. Does not clear the skeleton.\n\t// Is asychronous and returns a promise.\n\tclear: function() {\n\t\tvar _this = this;\n\t\tvar displaying = this.displaying;\n\n\t\tif (displaying) { // previously displayed, or in the process of being displayed?\n\t\t\treturn displaying.then(function() { // wait for the display to finish\n\t\t\t\t_this.displaying = null;\n\t\t\t\t_this.clearEvents();\n\t\t\t\treturn _this.clearView(); // might return a promise. chain it\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\treturn $.when(); // an immediately-resolved promise\n\t\t}\n\t},\n\n\n\t// If the view has already been displayed, tears it down and displays it again.\n\t// Will re-render the events if necessary, which display/clear DO NOT do.\n\t// TODO: make behavior more consistent.\n\tredisplay: function() {\n\t\tif (this.isSkeletonRendered) {\n\t\t\tvar wasEventsRendered = this.isEventsRendered;\n\t\t\tthis.clearEvents(); // won't trigger handlers if events never rendered\n\t\t\tthis.clearView();\n\t\t\tthis.displayView();\n\t\t\tif (wasEventsRendered) { // only render and trigger handlers if events previously rendered\n\t\t\t\tthis.displayEvents();\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Displays the view's non-event content, such as date-related content or anything required by events.\n\t// Renders the view's non-content skeleton if necessary.\n\t// Can be asynchronous and return a promise.\n\tdisplayView: function(date) {\n\t\tif (!this.isSkeletonRendered) {\n\t\t\tthis.renderSkeleton();\n\t\t\tthis.isSkeletonRendered = true;\n\t\t}\n\t\tif (date) {\n\t\t\tthis.setDate(date);\n\t\t}\n\t\tif (this.render) {\n\t\t\tthis.render(); // TODO: deprecate\n\t\t}\n\t\tthis.renderDates();\n\t\tthis.updateSize();\n\t\tthis.renderBusinessHours(); // might need coordinates, so should go after updateSize()\n\t},\n\n\n\t// Unrenders the view content that was rendered in displayView.\n\t// Can be asynchronous and return a promise.\n\tclearView: function() {\n\t\tthis.unselect();\n\t\tthis.triggerUnrender();\n\t\tthis.unrenderBusinessHours();\n\t\tthis.unrenderDates();\n\t\tif (this.destroy) {\n\t\t\tthis.destroy(); // TODO: deprecate\n\t\t}\n\t},\n\n\n\t// Renders the basic structure of the view before any content is rendered\n\trenderSkeleton: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Unrenders the basic structure of the view\n\tunrenderSkeleton: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Renders the view's date-related content.\n\t// Assumes setRange has already been called and the skeleton has already been rendered.\n\trenderDates: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Unrenders the view's date-related content\n\tunrenderDates: function() {\n\t\t// subclasses should override\n\t},\n\n\n\t// Renders business-hours onto the view. Assumes updateSize has already been called.\n\trenderBusinessHours: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Unrenders previously-rendered business-hours\n\tunrenderBusinessHours: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Signals that the view's content has been rendered\n\ttriggerRender: function() {\n\t\tthis.trigger('viewRender', this, this, this.el);\n\t},\n\n\n\t// Signals that the view's content is about to be unrendered\n\ttriggerUnrender: function() {\n\t\tthis.trigger('viewDestroy', this, this, this.el);\n\t},\n\n\n\t// Binds DOM handlers to elements that reside outside the view container, such as the document\n\tbindGlobalHandlers: function() {\n\t\t$(document).on('mousedown', this.documentMousedownProxy);\n\t},\n\n\n\t// Unbinds DOM handlers from elements that reside outside the view container\n\tunbindGlobalHandlers: function() {\n\t\t$(document).off('mousedown', this.documentMousedownProxy);\n\t},\n\n\n\t// Initializes internal variables related to theming\n\tinitThemingProps: function() {\n\t\tvar tm = this.opt('theme') ? 'ui' : 'fc';\n\n\t\tthis.widgetHeaderClass = tm + '-widget-header';\n\t\tthis.widgetContentClass = tm + '-widget-content';\n\t\tthis.highlightStateClass = tm + '-state-highlight';\n\t},\n\n\n\t/* Dimensions\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Refreshes anything dependant upon sizing of the container element of the grid\n\tupdateSize: function(isResize) {\n\t\tvar scrollState;\n\n\t\tif (isResize) {\n\t\t\tscrollState = this.queryScroll();\n\t\t}\n\n\t\tthis.updateHeight(isResize);\n\t\tthis.updateWidth(isResize);\n\n\t\tif (isResize) {\n\t\t\tthis.setScroll(scrollState);\n\t\t}\n\t},\n\n\n\t// Refreshes the horizontal dimensions of the calendar\n\tupdateWidth: function(isResize) {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Refreshes the vertical dimensions of the calendar\n\tupdateHeight: function(isResize) {\n\t\tvar calendar = this.calendar; // we poll the calendar for height information\n\n\t\tthis.setHeight(\n\t\t\tcalendar.getSuggestedViewHeight(),\n\t\t\tcalendar.isHeightAuto()\n\t\t);\n\t},\n\n\n\t// Updates the vertical dimensions of the calendar to the specified height.\n\t// if `isAuto` is set to true, height becomes merely a suggestion and the view should use its \"natural\" height.\n\tsetHeight: function(height, isAuto) {\n\t\t// subclasses should implement\n\t},\n\n\n\t/* Scroller\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Given the total height of the view, return the number of pixels that should be used for the scroller.\n\t// Utility for subclasses.\n\tcomputeScrollerHeight: function(totalHeight) {\n\t\tvar scrollerEl = this.scrollerEl;\n\t\tvar both;\n\t\tvar otherHeight; // cumulative height of everything that is not the scrollerEl in the view (header+borders)\n\n\t\tboth = this.el.add(scrollerEl);\n\n\t\t// fuckin IE8/9/10/11 sometimes returns 0 for dimensions. this weird hack was the only thing that worked\n\t\tboth.css({\n\t\t\tposition: 'relative', // cause a reflow, which will force fresh dimension recalculation\n\t\t\tleft: -1 // ensure reflow in case the el was already relative. negative is less likely to cause new scroll\n\t\t});\n\t\totherHeight = this.el.outerHeight() - scrollerEl.height(); // grab the dimensions\n\t\tboth.css({ position: '', left: '' }); // undo hack\n\n\t\treturn totalHeight - otherHeight;\n\t},\n\n\n\t// Computes the initial pre-configured scroll state prior to allowing the user to change it.\n\t// Given the scroll state from the previous rendering. If first time rendering, given null.\n\tcomputeInitialScroll: function(previousScrollState) {\n\t\treturn 0;\n\t},\n\n\n\t// Retrieves the view's current natural scroll state. Can return an arbitrary format.\n\tqueryScroll: function() {\n\t\tif (this.scrollerEl) {\n\t\t\treturn this.scrollerEl.scrollTop(); // operates on scrollerEl by default\n\t\t}\n\t},\n\n\n\t// Sets the view's scroll state. Will accept the same format computeInitialScroll and queryScroll produce.\n\tsetScroll: function(scrollState) {\n\t\tif (this.scrollerEl) {\n\t\t\treturn this.scrollerEl.scrollTop(scrollState); // operates on scrollerEl by default\n\t\t}\n\t},\n\n\n\t// Sets the scroll state, making sure to overcome any predefined scroll value the browser has in mind\n\tforceScroll: function(scrollState) {\n\t\tvar _this = this;\n\n\t\tthis.setScroll(scrollState);\n\t\tsetTimeout(function() {\n\t\t\t_this.setScroll(scrollState);\n\t\t}, 0);\n\t},\n\n\n\t/* Event Elements / Segments\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Does everything necessary to display the given events onto the current view\n\tdisplayEvents: function(events) {\n\t\tvar scrollState = this.queryScroll();\n\n\t\tthis.clearEvents();\n\t\tthis.renderEvents(events);\n\t\tthis.isEventsRendered = true;\n\t\tthis.setScroll(scrollState);\n\t\tthis.triggerEventRender();\n\t},\n\n\n\t// Does everything necessary to clear the view's currently-rendered events\n\tclearEvents: function() {\n\t\tif (this.isEventsRendered) {\n\t\t\tthis.triggerEventUnrender();\n\t\t\tif (this.destroyEvents) {\n\t\t\t\tthis.destroyEvents(); // TODO: deprecate\n\t\t\t}\n\t\t\tthis.unrenderEvents();\n\t\t\tthis.isEventsRendered = false;\n\t\t}\n\t},\n\n\n\t// Renders the events onto the view.\n\trenderEvents: function(events) {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Removes event elements from the view.\n\tunrenderEvents: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Signals that all events have been rendered\n\ttriggerEventRender: function() {\n\t\tthis.renderedEventSegEach(function(seg) {\n\t\t\tthis.trigger('eventAfterRender', seg.event, seg.event, seg.el);\n\t\t});\n\t\tthis.trigger('eventAfterAllRender');\n\t},\n\n\n\t// Signals that all event elements are about to be removed\n\ttriggerEventUnrender: function() {\n\t\tthis.renderedEventSegEach(function(seg) {\n\t\t\tthis.trigger('eventDestroy', seg.event, seg.event, seg.el);\n\t\t});\n\t},\n\n\n\t// Given an event and the default element used for rendering, returns the element that should actually be used.\n\t// Basically runs events and elements through the eventRender hook.\n\tresolveEventEl: function(event, el) {\n\t\tvar custom = this.trigger('eventRender', event, event, el);\n\n\t\tif (custom === false) { // means don't render at all\n\t\t\tel = null;\n\t\t}\n\t\telse if (custom && custom !== true) {\n\t\t\tel = $(custom);\n\t\t}\n\n\t\treturn el;\n\t},\n\n\n\t// Hides all rendered event segments linked to the given event\n\tshowEvent: function(event) {\n\t\tthis.renderedEventSegEach(function(seg) {\n\t\t\tseg.el.css('visibility', '');\n\t\t}, event);\n\t},\n\n\n\t// Shows all rendered event segments linked to the given event\n\thideEvent: function(event) {\n\t\tthis.renderedEventSegEach(function(seg) {\n\t\t\tseg.el.css('visibility', 'hidden');\n\t\t}, event);\n\t},\n\n\n\t// Iterates through event segments that have been rendered (have an el). Goes through all by default.\n\t// If the optional `event` argument is specified, only iterates through segments linked to that event.\n\t// The `this` value of the callback function will be the view.\n\trenderedEventSegEach: function(func, event) {\n\t\tvar segs = this.getEventSegs();\n\t\tvar i;\n\n\t\tfor (i = 0; i < segs.length; i++) {\n\t\t\tif (!event || segs[i].event._id === event._id) {\n\t\t\t\tif (segs[i].el) {\n\t\t\t\t\tfunc.call(this, segs[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Retrieves all the rendered segment objects for the view\n\tgetEventSegs: function() {\n\t\t// subclasses must implement\n\t\treturn [];\n\t},\n\n\n\t/* Event Drag-n-Drop\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Computes if the given event is allowed to be dragged by the user\n\tisEventDraggable: function(event) {\n\t\tvar source = event.source || {};\n\n\t\treturn firstDefined(\n\t\t\tevent.startEditable,\n\t\t\tsource.startEditable,\n\t\t\tthis.opt('eventStartEditable'),\n\t\t\tevent.editable,\n\t\t\tsource.editable,\n\t\t\tthis.opt('editable')\n\t\t);\n\t},\n\n\n\t// Must be called when an event in the view is dropped onto new location.\n\t// `dropLocation` is an object that contains the new zoned start/end/allDay values for the event.\n\treportEventDrop: function(event, dropLocation, largeUnit, el, ev) {\n\t\tvar calendar = this.calendar;\n\t\tvar mutateResult = calendar.mutateEvent(event, dropLocation, largeUnit);\n\t\tvar undoFunc = function() {\n\t\t\tmutateResult.undo();\n\t\t\tcalendar.reportEventChange();\n\t\t};\n\n\t\tthis.triggerEventDrop(event, mutateResult.dateDelta, undoFunc, el, ev);\n\t\tcalendar.reportEventChange(); // will rerender events\n\t},\n\n\n\t// Triggers event-drop handlers that have subscribed via the API\n\ttriggerEventDrop: function(event, dateDelta, undoFunc, el, ev) {\n\t\tthis.trigger('eventDrop', el[0], event, dateDelta, undoFunc, ev, {}); // {} = jqui dummy\n\t},\n\n\n\t/* External Element Drag-n-Drop\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Must be called when an external element, via jQuery UI, has been dropped onto the calendar.\n\t// `meta` is the parsed data that has been embedded into the dragging event.\n\t// `dropLocation` is an object that contains the new zoned start/end/allDay values for the event.\n\treportExternalDrop: function(meta, dropLocation, el, ev, ui) {\n\t\tvar eventProps = meta.eventProps;\n\t\tvar eventInput;\n\t\tvar event;\n\n\t\t// Try to build an event object and render it. TODO: decouple the two\n\t\tif (eventProps) {\n\t\t\teventInput = $.extend({}, eventProps, dropLocation);\n\t\t\tevent = this.calendar.renderEvent(eventInput, meta.stick)[0]; // renderEvent returns an array\n\t\t}\n\n\t\tthis.triggerExternalDrop(event, dropLocation, el, ev, ui);\n\t},\n\n\n\t// Triggers external-drop handlers that have subscribed via the API\n\ttriggerExternalDrop: function(event, dropLocation, el, ev, ui) {\n\n\t\t// trigger 'drop' regardless of whether element represents an event\n\t\tthis.trigger('drop', el[0], dropLocation.start, ev, ui);\n\n\t\tif (event) {\n\t\t\tthis.trigger('eventReceive', null, event); // signal an external event landed\n\t\t}\n\t},\n\n\n\t/* Drag-n-Drop Rendering (for both events and external elements)\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of a event or external-element drag over the given drop zone.\n\t// If an external-element, seg will be `null`\n\trenderDrag: function(dropLocation, seg) {\n\t\t// subclasses must implement\n\t},\n\n\n\t// Unrenders a visual indication of an event or external-element being dragged.\n\tunrenderDrag: function() {\n\t\t// subclasses must implement\n\t},\n\n\n\t/* Event Resizing\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Computes if the given event is allowed to be resized from its starting edge\n\tisEventResizableFromStart: function(event) {\n\t\treturn this.opt('eventResizableFromStart') && this.isEventResizable(event);\n\t},\n\n\n\t// Computes if the given event is allowed to be resized from its ending edge\n\tisEventResizableFromEnd: function(event) {\n\t\treturn this.isEventResizable(event);\n\t},\n\n\n\t// Computes if the given event is allowed to be resized by the user at all\n\tisEventResizable: function(event) {\n\t\tvar source = event.source || {};\n\n\t\treturn firstDefined(\n\t\t\tevent.durationEditable,\n\t\t\tsource.durationEditable,\n\t\t\tthis.opt('eventDurationEditable'),\n\t\t\tevent.editable,\n\t\t\tsource.editable,\n\t\t\tthis.opt('editable')\n\t\t);\n\t},\n\n\n\t// Must be called when an event in the view has been resized to a new length\n\treportEventResize: function(event, resizeLocation, largeUnit, el, ev) {\n\t\tvar calendar = this.calendar;\n\t\tvar mutateResult = calendar.mutateEvent(event, resizeLocation, largeUnit);\n\t\tvar undoFunc = function() {\n\t\t\tmutateResult.undo();\n\t\t\tcalendar.reportEventChange();\n\t\t};\n\n\t\tthis.triggerEventResize(event, mutateResult.durationDelta, undoFunc, el, ev);\n\t\tcalendar.reportEventChange(); // will rerender events\n\t},\n\n\n\t// Triggers event-resize handlers that have subscribed via the API\n\ttriggerEventResize: function(event, durationDelta, undoFunc, el, ev) {\n\t\tthis.trigger('eventResize', el[0], event, durationDelta, undoFunc, ev, {}); // {} = jqui dummy\n\t},\n\n\n\t/* Selection\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Selects a date span on the view. `start` and `end` are both Moments.\n\t// `ev` is the native mouse event that begin the interaction.\n\tselect: function(span, ev) {\n\t\tthis.unselect(ev);\n\t\tthis.renderSelection(span);\n\t\tthis.reportSelection(span, ev);\n\t},\n\n\n\t// Renders a visual indication of the selection\n\trenderSelection: function(span) {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Called when a new selection is made. Updates internal state and triggers handlers.\n\treportSelection: function(span, ev) {\n\t\tthis.isSelected = true;\n\t\tthis.triggerSelect(span, ev);\n\t},\n\n\n\t// Triggers handlers to 'select'\n\ttriggerSelect: function(span, ev) {\n\t\tthis.trigger(\n\t\t\t'select',\n\t\t\tnull,\n\t\t\tthis.calendar.applyTimezone(span.start), // convert to calendar's tz for external API\n\t\t\tthis.calendar.applyTimezone(span.end), // \"\n\t\t\tev\n\t\t);\n\t},\n\n\n\t// Undoes a selection. updates in the internal state and triggers handlers.\n\t// `ev` is the native mouse event that began the interaction.\n\tunselect: function(ev) {\n\t\tif (this.isSelected) {\n\t\t\tthis.isSelected = false;\n\t\t\tif (this.destroySelection) {\n\t\t\t\tthis.destroySelection(); // TODO: deprecate\n\t\t\t}\n\t\t\tthis.unrenderSelection();\n\t\t\tthis.trigger('unselect', null, ev);\n\t\t}\n\t},\n\n\n\t// Unrenders a visual indication of selection\n\tunrenderSelection: function() {\n\t\t// subclasses should implement\n\t},\n\n\n\t// Handler for unselecting when the user clicks something and the 'unselectAuto' setting is on\n\tdocumentMousedown: function(ev) {\n\t\tvar ignore;\n\n\t\t// is there a selection, and has the user made a proper left click?\n\t\tif (this.isSelected && this.opt('unselectAuto') && isPrimaryMouseButton(ev)) {\n\n\t\t\t// only unselect if the clicked element is not identical to or inside of an 'unselectCancel' element\n\t\t\tignore = this.opt('unselectCancel');\n\t\t\tif (!ignore || !$(ev.target).closest(ignore).length) {\n\t\t\t\tthis.unselect(ev);\n\t\t\t}\n\t\t}\n\t},\n\n\n\t/* Day Click\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Triggers handlers to 'dayClick'\n\t// Span has start/end of the clicked area. Only the start is useful.\n\ttriggerDayClick: function(span, dayEl, ev) {\n\t\tthis.trigger(\n\t\t\t'dayClick',\n\t\t\tdayEl,\n\t\t\tthis.calendar.applyTimezone(span.start), // convert to calendar's timezone for external API\n\t\t\tev\n\t\t);\n\t},\n\n\n\t/* Date Utils\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Initializes internal variables related to calculating hidden days-of-week\n\tinitHiddenDays: function() {\n\t\tvar hiddenDays = this.opt('hiddenDays') || []; // array of day-of-week indices that are hidden\n\t\tvar isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool)\n\t\tvar dayCnt = 0;\n\t\tvar i;\n\n\t\tif (this.opt('weekends') === false) {\n\t\t\thiddenDays.push(0, 6); // 0=sunday, 6=saturday\n\t\t}\n\n\t\tfor (i = 0; i < 7; i++) {\n\t\t\tif (\n\t\t\t\t!(isHiddenDayHash[i] = $.inArray(i, hiddenDays) !== -1)\n\t\t\t) {\n\t\t\t\tdayCnt++;\n\t\t\t}\n\t\t}\n\n\t\tif (!dayCnt) {\n\t\t\tthrow 'invalid hiddenDays'; // all days were hidden? bad.\n\t\t}\n\n\t\tthis.isHiddenDayHash = isHiddenDayHash;\n\t},\n\n\n\t// Is the current day hidden?\n\t// `day` is a day-of-week index (0-6), or a Moment\n\tisHiddenDay: function(day) {\n\t\tif (moment.isMoment(day)) {\n\t\t\tday = day.day();\n\t\t}\n\t\treturn this.isHiddenDayHash[day];\n\t},\n\n\n\t// Incrementing the current day until it is no longer a hidden day, returning a copy.\n\t// If the initial value of `date` is not a hidden day, don't do anything.\n\t// Pass `isExclusive` as `true` if you are dealing with an end date.\n\t// `inc` defaults to `1` (increment one day forward each time)\n\tskipHiddenDays: function(date, inc, isExclusive) {\n\t\tvar out = date.clone();\n\t\tinc = inc || 1;\n\t\twhile (\n\t\t\tthis.isHiddenDayHash[(out.day() + (isExclusive ? inc : 0) + 7) % 7]\n\t\t) {\n\t\t\tout.add(inc, 'days');\n\t\t}\n\t\treturn out;\n\t},\n\n\n\t// Returns the date range of the full days the given range visually appears to occupy.\n\t// Returns a new range object.\n\tcomputeDayRange: function(range) {\n\t\tvar startDay = range.start.clone().stripTime(); // the beginning of the day the range starts\n\t\tvar end = range.end;\n\t\tvar endDay = null;\n\t\tvar endTimeMS;\n\n\t\tif (end) {\n\t\t\tendDay = end.clone().stripTime(); // the beginning of the day the range exclusively ends\n\t\t\tendTimeMS = +end.time(); // # of milliseconds into `endDay`\n\n\t\t\t// If the end time is actually inclusively part of the next day and is equal to or\n\t\t\t// beyond the next day threshold, adjust the end to be the exclusive end of `endDay`.\n\t\t\t// Otherwise, leaving it as inclusive will cause it to exclude `endDay`.\n\t\t\tif (endTimeMS && endTimeMS >= this.nextDayThreshold) {\n\t\t\t\tendDay.add(1, 'days');\n\t\t\t}\n\t\t}\n\n\t\t// If no end was specified, or if it is within `startDay` but not past nextDayThreshold,\n\t\t// assign the default duration of one day.\n\t\tif (!end || endDay <= startDay) {\n\t\t\tendDay = startDay.clone().add(1, 'days');\n\t\t}\n\n\t\treturn { start: startDay, end: endDay };\n\t},\n\n\n\t// Does the given event visually appear to occupy more than one day?\n\tisMultiDayEvent: function(event) {\n\t\tvar range = this.computeDayRange(event); // event is range-ish\n\n\t\treturn range.end.diff(range.start, 'days') > 1;\n\t}\n\n});\n\n;;\n\nvar Calendar = FC.Calendar = Class.extend({\n\n\tdirDefaults: null, // option defaults related to LTR or RTL\n\tlangDefaults: null, // option defaults related to current locale\n\toverrides: null, // option overrides given to the fullCalendar constructor\n\toptions: null, // all defaults combined with overrides\n\tviewSpecCache: null, // cache of view definitions\n\tview: null, // current View object\n\theader: null,\n\tloadingLevel: 0, // number of simultaneous loading tasks\n\n\n\t// a lot of this class' OOP logic is scoped within this constructor function,\n\t// but in the future, write individual methods on the prototype.\n\tconstructor: Calendar_constructor,\n\n\n\t// Subclasses can override this for initialization logic after the constructor has been called\n\tinitialize: function() {\n\t},\n\n\n\t// Initializes `this.options` and other important options-related objects\n\tinitOptions: function(overrides) {\n\t\tvar lang, langDefaults;\n\t\tvar isRTL, dirDefaults;\n\n\t\t// converts legacy options into non-legacy ones.\n\t\t// in the future, when this is removed, don't use `overrides` reference. make a copy.\n\t\toverrides = massageOverrides(overrides);\n\n\t\tlang = overrides.lang;\n\t\tlangDefaults = langOptionHash[lang];\n\t\tif (!langDefaults) {\n\t\t\tlang = Calendar.defaults.lang;\n\t\t\tlangDefaults = langOptionHash[lang] || {};\n\t\t}\n\n\t\tisRTL = firstDefined(\n\t\t\toverrides.isRTL,\n\t\t\tlangDefaults.isRTL,\n\t\t\tCalendar.defaults.isRTL\n\t\t);\n\t\tdirDefaults = isRTL ? Calendar.rtlDefaults : {};\n\n\t\tthis.dirDefaults = dirDefaults;\n\t\tthis.langDefaults = langDefaults;\n\t\tthis.overrides = overrides;\n\t\tthis.options = mergeOptions([ // merge defaults and overrides. lowest to highest precedence\n\t\t\tCalendar.defaults, // global defaults\n\t\t\tdirDefaults,\n\t\t\tlangDefaults,\n\t\t\toverrides\n\t\t]);\n\t\tpopulateInstanceComputableOptions(this.options);\n\n\t\tthis.viewSpecCache = {}; // somewhat unrelated\n\t},\n\n\n\t// Gets information about how to create a view. Will use a cache.\n\tgetViewSpec: function(viewType) {\n\t\tvar cache = this.viewSpecCache;\n\n\t\treturn cache[viewType] || (cache[viewType] = this.buildViewSpec(viewType));\n\t},\n\n\n\t// Given a duration singular unit, like \"week\" or \"day\", finds a matching view spec.\n\t// Preference is given to views that have corresponding buttons.\n\tgetUnitViewSpec: function(unit) {\n\t\tvar viewTypes;\n\t\tvar i;\n\t\tvar spec;\n\n\t\tif ($.inArray(unit, intervalUnits) != -1) {\n\n\t\t\t// put views that have buttons first. there will be duplicates, but oh well\n\t\t\tviewTypes = this.header.getViewsWithButtons();\n\t\t\t$.each(FC.views, function(viewType) { // all views\n\t\t\t\tviewTypes.push(viewType);\n\t\t\t});\n\n\t\t\tfor (i = 0; i < viewTypes.length; i++) {\n\t\t\t\tspec = this.getViewSpec(viewTypes[i]);\n\t\t\t\tif (spec) {\n\t\t\t\t\tif (spec.singleUnit == unit) {\n\t\t\t\t\t\treturn spec;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Builds an object with information on how to create a given view\n\tbuildViewSpec: function(requestedViewType) {\n\t\tvar viewOverrides = this.overrides.views || {};\n\t\tvar specChain = []; // for the view. lowest to highest priority\n\t\tvar defaultsChain = []; // for the view. lowest to highest priority\n\t\tvar overridesChain = []; // for the view. lowest to highest priority\n\t\tvar viewType = requestedViewType;\n\t\tvar spec; // for the view\n\t\tvar overrides; // for the view\n\t\tvar duration;\n\t\tvar unit;\n\n\t\t// iterate from the specific view definition to a more general one until we hit an actual View class\n\t\twhile (viewType) {\n\t\t\tspec = fcViews[viewType];\n\t\t\toverrides = viewOverrides[viewType];\n\t\t\tviewType = null; // clear. might repopulate for another iteration\n\n\t\t\tif (typeof spec === 'function') { // TODO: deprecate\n\t\t\t\tspec = { 'class': spec };\n\t\t\t}\n\n\t\t\tif (spec) {\n\t\t\t\tspecChain.unshift(spec);\n\t\t\t\tdefaultsChain.unshift(spec.defaults || {});\n\t\t\t\tduration = duration || spec.duration;\n\t\t\t\tviewType = viewType || spec.type;\n\t\t\t}\n\n\t\t\tif (overrides) {\n\t\t\t\toverridesChain.unshift(overrides); // view-specific option hashes have options at zero-level\n\t\t\t\tduration = duration || overrides.duration;\n\t\t\t\tviewType = viewType || overrides.type;\n\t\t\t}\n\t\t}\n\n\t\tspec = mergeProps(specChain);\n\t\tspec.type = requestedViewType;\n\t\tif (!spec['class']) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (duration) {\n\t\t\tduration = moment.duration(duration);\n\t\t\tif (duration.valueOf()) { // valid?\n\t\t\t\tspec.duration = duration;\n\t\t\t\tunit = computeIntervalUnit(duration);\n\n\t\t\t\t// view is a single-unit duration, like \"week\" or \"day\"\n\t\t\t\t// incorporate options for this. lowest priority\n\t\t\t\tif (duration.as(unit) === 1) {\n\t\t\t\t\tspec.singleUnit = unit;\n\t\t\t\t\toverridesChain.unshift(viewOverrides[unit] || {});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tspec.defaults = mergeOptions(defaultsChain);\n\t\tspec.overrides = mergeOptions(overridesChain);\n\n\t\tthis.buildViewSpecOptions(spec);\n\t\tthis.buildViewSpecButtonText(spec, requestedViewType);\n\n\t\treturn spec;\n\t},\n\n\n\t// Builds and assigns a view spec's options object from its already-assigned defaults and overrides\n\tbuildViewSpecOptions: function(spec) {\n\t\tspec.options = mergeOptions([ // lowest to highest priority\n\t\t\tCalendar.defaults, // global defaults\n\t\t\tspec.defaults, // view's defaults (from ViewSubclass.defaults)\n\t\t\tthis.dirDefaults,\n\t\t\tthis.langDefaults, // locale and dir take precedence over view's defaults!\n\t\t\tthis.overrides, // calendar's overrides (options given to constructor)\n\t\t\tspec.overrides // view's overrides (view-specific options)\n\t\t]);\n\t\tpopulateInstanceComputableOptions(spec.options);\n\t},\n\n\n\t// Computes and assigns a view spec's buttonText-related options\n\tbuildViewSpecButtonText: function(spec, requestedViewType) {\n\n\t\t// given an options object with a possible `buttonText` hash, lookup the buttonText for the\n\t\t// requested view, falling back to a generic unit entry like \"week\" or \"day\"\n\t\tfunction queryButtonText(options) {\n\t\t\tvar buttonText = options.buttonText || {};\n\t\t\treturn buttonText[requestedViewType] ||\n\t\t\t\t(spec.singleUnit ? buttonText[spec.singleUnit] : null);\n\t\t}\n\n\t\t// highest to lowest priority\n\t\tspec.buttonTextOverride =\n\t\t\tqueryButtonText(this.overrides) || // constructor-specified buttonText lookup hash takes precedence\n\t\t\tspec.overrides.buttonText; // `buttonText` for view-specific options is a string\n\n\t\t// highest to lowest priority. mirrors buildViewSpecOptions\n\t\tspec.buttonTextDefault =\n\t\t\tqueryButtonText(this.langDefaults) ||\n\t\t\tqueryButtonText(this.dirDefaults) ||\n\t\t\tspec.defaults.buttonText || // a single string. from ViewSubclass.defaults\n\t\t\tqueryButtonText(Calendar.defaults) ||\n\t\t\t(spec.duration ? this.humanizeDuration(spec.duration) : null) || // like \"3 days\"\n\t\t\trequestedViewType; // fall back to given view name\n\t},\n\n\n\t// Given a view name for a custom view or a standard view, creates a ready-to-go View object\n\tinstantiateView: function(viewType) {\n\t\tvar spec = this.getViewSpec(viewType);\n\n\t\treturn new spec['class'](this, viewType, spec.options, spec.duration);\n\t},\n\n\n\t// Returns a boolean about whether the view is okay to instantiate at some point\n\tisValidViewType: function(viewType) {\n\t\treturn Boolean(this.getViewSpec(viewType));\n\t},\n\n\n\t// Should be called when any type of async data fetching begins\n\tpushLoading: function() {\n\t\tif (!(this.loadingLevel++)) {\n\t\t\tthis.trigger('loading', null, true, this.view);\n\t\t}\n\t},\n\n\n\t// Should be called when any type of async data fetching completes\n\tpopLoading: function() {\n\t\tif (!(--this.loadingLevel)) {\n\t\t\tthis.trigger('loading', null, false, this.view);\n\t\t}\n\t},\n\n\n\t// Given arguments to the select method in the API, returns a span (unzoned start/end and other info)\n\tbuildSelectSpan: function(zonedStartInput, zonedEndInput) {\n\t\tvar start = this.moment(zonedStartInput).stripZone();\n\t\tvar end;\n\n\t\tif (zonedEndInput) {\n\t\t\tend = this.moment(zonedEndInput).stripZone();\n\t\t}\n\t\telse if (start.hasTime()) {\n\t\t\tend = start.clone().add(this.defaultTimedEventDuration);\n\t\t}\n\t\telse {\n\t\t\tend = start.clone().add(this.defaultAllDayEventDuration);\n\t\t}\n\n\t\treturn { start: start, end: end };\n\t}\n\n});\n\n\nCalendar.mixin(Emitter);\n\n\nfunction Calendar_constructor(element, overrides) {\n\tvar t = this;\n\n\n\tt.initOptions(overrides || {});\n\tvar options = this.options;\n\n\t\n\t// Exports\n\t// -----------------------------------------------------------------------------------\n\n\tt.render = render;\n\tt.destroy = destroy;\n\tt.refetchEvents = refetchEvents;\n\tt.reportEvents = reportEvents;\n\tt.reportEventChange = reportEventChange;\n\tt.rerenderEvents = renderEvents; // `renderEvents` serves as a rerender. an API method\n\tt.changeView = renderView; // `renderView` will switch to another view\n\tt.select = select;\n\tt.unselect = unselect;\n\tt.prev = prev;\n\tt.next = next;\n\tt.prevYear = prevYear;\n\tt.nextYear = nextYear;\n\tt.today = today;\n\tt.gotoDate = gotoDate;\n\tt.incrementDate = incrementDate;\n\tt.zoomTo = zoomTo;\n\tt.getDate = getDate;\n\tt.getCalendar = getCalendar;\n\tt.getView = getView;\n\tt.option = option;\n\tt.trigger = trigger;\n\n\n\n\t// Language-data Internals\n\t// -----------------------------------------------------------------------------------\n\t// Apply overrides to the current language's data\n\n\n\tvar localeData = createObject( // make a cheap copy\n\t\tgetMomentLocaleData(options.lang) // will fall back to en\n\t);\n\n\tif (options.monthNames) {\n\t\tlocaleData._months = options.monthNames;\n\t}\n\tif (options.monthNamesShort) {\n\t\tlocaleData._monthsShort = options.monthNamesShort;\n\t}\n\tif (options.dayNames) {\n\t\tlocaleData._weekdays = options.dayNames;\n\t}\n\tif (options.dayNamesShort) {\n\t\tlocaleData._weekdaysShort = options.dayNamesShort;\n\t}\n\tif (options.firstDay != null) {\n\t\tvar _week = createObject(localeData._week); // _week: { dow: # }\n\t\t_week.dow = options.firstDay;\n\t\tlocaleData._week = _week;\n\t}\n\n\t// assign a normalized value, to be used by our .week() moment extension\n\tlocaleData._fullCalendar_weekCalc = (function(weekCalc) {\n\t\tif (typeof weekCalc === 'function') {\n\t\t\treturn weekCalc;\n\t\t}\n\t\telse if (weekCalc === 'local') {\n\t\t\treturn weekCalc;\n\t\t}\n\t\telse if (weekCalc === 'iso' || weekCalc === 'ISO') {\n\t\t\treturn 'ISO';\n\t\t}\n\t})(options.weekNumberCalculation);\n\n\n\n\t// Calendar-specific Date Utilities\n\t// -----------------------------------------------------------------------------------\n\n\n\tt.defaultAllDayEventDuration = moment.duration(options.defaultAllDayEventDuration);\n\tt.defaultTimedEventDuration = moment.duration(options.defaultTimedEventDuration);\n\n\n\t// Builds a moment using the settings of the current calendar: timezone and language.\n\t// Accepts anything the vanilla moment() constructor accepts.\n\tt.moment = function() {\n\t\tvar mom;\n\n\t\tif (options.timezone === 'local') {\n\t\t\tmom = FC.moment.apply(null, arguments);\n\n\t\t\t// Force the moment to be local, because FC.moment doesn't guarantee it.\n\t\t\tif (mom.hasTime()) { // don't give ambiguously-timed moments a local zone\n\t\t\t\tmom.local();\n\t\t\t}\n\t\t}\n\t\telse if (options.timezone === 'UTC') {\n\t\t\tmom = FC.moment.utc.apply(null, arguments); // process as UTC\n\t\t}\n\t\telse {\n\t\t\tmom = FC.moment.parseZone.apply(null, arguments); // let the input decide the zone\n\t\t}\n\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\n\t\treturn mom;\n\t};\n\n\n\t// Returns a boolean about whether or not the calendar knows how to calculate\n\t// the timezone offset of arbitrary dates in the current timezone.\n\tt.getIsAmbigTimezone = function() {\n\t\treturn options.timezone !== 'local' && options.timezone !== 'UTC';\n\t};\n\n\n\t// Returns a copy of the given date in the current timezone. Has no effect on dates without times.\n\tt.applyTimezone = function(date) {\n\t\tif (!date.hasTime()) {\n\t\t\treturn date.clone();\n\t\t}\n\n\t\tvar zonedDate = t.moment(date.toArray());\n\t\tvar timeAdjust = date.time() - zonedDate.time();\n\t\tvar adjustedZonedDate;\n\n\t\t// Safari sometimes has problems with this coersion when near DST. Adjust if necessary. (bug #2396)\n\t\tif (timeAdjust) { // is the time result different than expected?\n\t\t\tadjustedZonedDate = zonedDate.clone().add(timeAdjust); // add milliseconds\n\t\t\tif (date.time() - adjustedZonedDate.time() === 0) { // does it match perfectly now?\n\t\t\t\tzonedDate = adjustedZonedDate;\n\t\t\t}\n\t\t}\n\n\t\treturn zonedDate;\n\t};\n\n\n\t// Returns a moment for the current date, as defined by the client's computer or from the `now` option.\n\t// Will return an moment with an ambiguous timezone.\n\tt.getNow = function() {\n\t\tvar now = options.now;\n\t\tif (typeof now === 'function') {\n\t\t\tnow = now();\n\t\t}\n\t\treturn t.moment(now).stripZone();\n\t};\n\n\n\t// Get an event's normalized end date. If not present, calculate it from the defaults.\n\tt.getEventEnd = function(event) {\n\t\tif (event.end) {\n\t\t\treturn event.end.clone();\n\t\t}\n\t\telse {\n\t\t\treturn t.getDefaultEventEnd(event.allDay, event.start);\n\t\t}\n\t};\n\n\n\t// Given an event's allDay status and start date, return what its fallback end date should be.\n\t// TODO: rename to computeDefaultEventEnd\n\tt.getDefaultEventEnd = function(allDay, zonedStart) {\n\t\tvar end = zonedStart.clone();\n\n\t\tif (allDay) {\n\t\t\tend.stripTime().add(t.defaultAllDayEventDuration);\n\t\t}\n\t\telse {\n\t\t\tend.add(t.defaultTimedEventDuration);\n\t\t}\n\n\t\tif (t.getIsAmbigTimezone()) {\n\t\t\tend.stripZone(); // we don't know what the tzo should be\n\t\t}\n\n\t\treturn end;\n\t};\n\n\n\t// Produces a human-readable string for the given duration.\n\t// Side-effect: changes the locale of the given duration.\n\tt.humanizeDuration = function(duration) {\n\t\treturn (duration.locale || duration.lang).call(duration, options.lang) // works moment-pre-2.8\n\t\t\t.humanize();\n\t};\n\n\n\t\n\t// Imports\n\t// -----------------------------------------------------------------------------------\n\n\n\tEventManager.call(t, options);\n\tvar isFetchNeeded = t.isFetchNeeded;\n\tvar fetchEvents = t.fetchEvents;\n\n\n\n\t// Locals\n\t// -----------------------------------------------------------------------------------\n\n\n\tvar _element = element[0];\n\tvar header;\n\tvar headerElement;\n\tvar content;\n\tvar tm; // for making theme classes\n\tvar currentView; // NOTE: keep this in sync with this.view\n\tvar viewsByType = {}; // holds all instantiated view instances, current or not\n\tvar suggestedViewHeight;\n\tvar windowResizeProxy; // wraps the windowResize function\n\tvar ignoreWindowResize = 0;\n\tvar events = [];\n\tvar date; // unzoned\n\t\n\t\n\t\n\t// Main Rendering\n\t// -----------------------------------------------------------------------------------\n\n\n\t// compute the initial ambig-timezone date\n\tif (options.defaultDate != null) {\n\t\tdate = t.moment(options.defaultDate).stripZone();\n\t}\n\telse {\n\t\tdate = t.getNow(); // getNow already returns unzoned\n\t}\n\t\n\t\n\tfunction render() {\n\t\tif (!content) {\n\t\t\tinitialRender();\n\t\t}\n\t\telse if (elementVisible()) {\n\t\t\t// mainly for the public API\n\t\t\tcalcSize();\n\t\t\trenderView();\n\t\t}\n\t}\n\t\n\t\n\tfunction initialRender() {\n\t\ttm = options.theme ? 'ui' : 'fc';\n\t\telement.addClass('fc');\n\n\t\tif (options.isRTL) {\n\t\t\telement.addClass('fc-rtl');\n\t\t}\n\t\telse {\n\t\t\telement.addClass('fc-ltr');\n\t\t}\n\n\t\tif (options.theme) {\n\t\t\telement.addClass('ui-widget');\n\t\t}\n\t\telse {\n\t\t\telement.addClass('fc-unthemed');\n\t\t}\n\n\t\tcontent = $(\"<div class='fc-view-container'/>\").prependTo(element);\n\n\t\theader = t.header = new Header(t, options);\n\t\theaderElement = header.render();\n\t\tif (headerElement) {\n\t\t\telement.prepend(headerElement);\n\t\t}\n\n\t\trenderView(options.defaultView);\n\n\t\tif (options.handleWindowResize) {\n\t\t\twindowResizeProxy = debounce(windowResize, options.windowResizeDelay); // prevents rapid calls\n\t\t\t$(window).resize(windowResizeProxy);\n\t\t}\n\t}\n\t\n\t\n\tfunction destroy() {\n\n\t\tif (currentView) {\n\t\t\tcurrentView.removeElement();\n\n\t\t\t// NOTE: don't null-out currentView/t.view in case API methods are called after destroy.\n\t\t\t// It is still the \"current\" view, just not rendered.\n\t\t}\n\n\t\theader.removeElement();\n\t\tcontent.remove();\n\t\telement.removeClass('fc fc-ltr fc-rtl fc-unthemed ui-widget');\n\n\t\tif (windowResizeProxy) {\n\t\t\t$(window).unbind('resize', windowResizeProxy);\n\t\t}\n\t}\n\t\n\t\n\tfunction elementVisible() {\n\t\treturn element.is(':visible');\n\t}\n\t\n\t\n\n\t// View Rendering\n\t// -----------------------------------------------------------------------------------\n\n\n\t// Renders a view because of a date change, view-type change, or for the first time.\n\t// If not given a viewType, keep the current view but render different dates.\n\tfunction renderView(viewType) {\n\t\tignoreWindowResize++;\n\n\t\t// if viewType is changing, remove the old view's rendering\n\t\tif (currentView && viewType && currentView.type !== viewType) {\n\t\t\theader.deactivateButton(currentView.type);\n\t\t\tfreezeContentHeight(); // prevent a scroll jump when view element is removed\n\t\t\tcurrentView.removeElement();\n\t\t\tcurrentView = t.view = null;\n\t\t}\n\n\t\t// if viewType changed, or the view was never created, create a fresh view\n\t\tif (!currentView && viewType) {\n\t\t\tcurrentView = t.view =\n\t\t\t\tviewsByType[viewType] ||\n\t\t\t\t(viewsByType[viewType] = t.instantiateView(viewType));\n\n\t\t\tcurrentView.setElement(\n\t\t\t\t$(\"<div class='fc-view fc-\" + viewType + \"-view' />\").appendTo(content)\n\t\t\t);\n\t\t\theader.activateButton(viewType);\n\t\t}\n\n\t\tif (currentView) {\n\n\t\t\t// in case the view should render a period of time that is completely hidden\n\t\t\tdate = currentView.massageCurrentDate(date);\n\n\t\t\t// render or rerender the view\n\t\t\tif (\n\t\t\t\t!currentView.displaying ||\n\t\t\t\t!date.isWithin(currentView.intervalStart, currentView.intervalEnd) // implicit date window change\n\t\t\t) {\n\t\t\t\tif (elementVisible()) {\n\n\t\t\t\t\tcurrentView.display(date); // will call freezeContentHeight\n\t\t\t\t\tunfreezeContentHeight(); // immediately unfreeze regardless of whether display is async\n\n\t\t\t\t\t// need to do this after View::render, so dates are calculated\n\t\t\t\t\tupdateHeaderTitle();\n\t\t\t\t\tupdateTodayButton();\n\n\t\t\t\t\tgetAndRenderEvents();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tunfreezeContentHeight(); // undo any lone freezeContentHeight calls\n\t\tignoreWindowResize--;\n\t}\n\n\t\n\n\t// Resizing\n\t// -----------------------------------------------------------------------------------\n\n\n\tt.getSuggestedViewHeight = function() {\n\t\tif (suggestedViewHeight === undefined) {\n\t\t\tcalcSize();\n\t\t}\n\t\treturn suggestedViewHeight;\n\t};\n\n\n\tt.isHeightAuto = function() {\n\t\treturn options.contentHeight === 'auto' || options.height === 'auto';\n\t};\n\t\n\t\n\tfunction updateSize(shouldRecalc) {\n\t\tif (elementVisible()) {\n\n\t\t\tif (shouldRecalc) {\n\t\t\t\t_calcSize();\n\t\t\t}\n\n\t\t\tignoreWindowResize++;\n\t\t\tcurrentView.updateSize(true); // isResize=true. will poll getSuggestedViewHeight() and isHeightAuto()\n\t\t\tignoreWindowResize--;\n\n\t\t\treturn true; // signal success\n\t\t}\n\t}\n\n\n\tfunction calcSize() {\n\t\tif (elementVisible()) {\n\t\t\t_calcSize();\n\t\t}\n\t}\n\t\n\t\n\tfunction _calcSize() { // assumes elementVisible\n\t\tif (typeof options.contentHeight === 'number') { // exists and not 'auto'\n\t\t\tsuggestedViewHeight = options.contentHeight;\n\t\t}\n\t\telse if (typeof options.height === 'number') { // exists and not 'auto'\n\t\t\tsuggestedViewHeight = options.height - (headerElement ? headerElement.outerHeight(true) : 0);\n\t\t}\n\t\telse {\n\t\t\tsuggestedViewHeight = Math.round(content.width() / Math.max(options.aspectRatio, .5));\n\t\t}\n\t}\n\t\n\t\n\tfunction windowResize(ev) {\n\t\tif (\n\t\t\t!ignoreWindowResize &&\n\t\t\tev.target === window && // so we don't process jqui \"resize\" events that have bubbled up\n\t\t\tcurrentView.start // view has already been rendered\n\t\t) {\n\t\t\tif (updateSize(true)) {\n\t\t\t\tcurrentView.trigger('windowResize', _element);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t\n\t/* Event Fetching/Rendering\n\t-----------------------------------------------------------------------------*/\n\t// TODO: going forward, most of this stuff should be directly handled by the view\n\n\n\tfunction refetchEvents() { // can be called as an API method\n\t\tdestroyEvents(); // so that events are cleared before user starts waiting for AJAX\n\t\tfetchAndRenderEvents();\n\t}\n\n\n\tfunction renderEvents() { // destroys old events if previously rendered\n\t\tif (elementVisible()) {\n\t\t\tfreezeContentHeight();\n\t\t\tcurrentView.displayEvents(events);\n\t\t\tunfreezeContentHeight();\n\t\t}\n\t}\n\n\n\tfunction destroyEvents() {\n\t\tfreezeContentHeight();\n\t\tcurrentView.clearEvents();\n\t\tunfreezeContentHeight();\n\t}\n\t\n\n\tfunction getAndRenderEvents() {\n\t\tif (!options.lazyFetching || isFetchNeeded(currentView.start, currentView.end)) {\n\t\t\tfetchAndRenderEvents();\n\t\t}\n\t\telse {\n\t\t\trenderEvents();\n\t\t}\n\t}\n\n\n\tfunction fetchAndRenderEvents() {\n\t\tfetchEvents(currentView.start, currentView.end);\n\t\t\t// ... will call reportEvents\n\t\t\t// ... which will call renderEvents\n\t}\n\n\t\n\t// called when event data arrives\n\tfunction reportEvents(_events) {\n\t\tevents = _events;\n\t\trenderEvents();\n\t}\n\n\n\t// called when a single event's data has been changed\n\tfunction reportEventChange() {\n\t\trenderEvents();\n\t}\n\n\n\n\t/* Header Updating\n\t-----------------------------------------------------------------------------*/\n\n\n\tfunction updateHeaderTitle() {\n\t\theader.updateTitle(currentView.title);\n\t}\n\n\n\tfunction updateTodayButton() {\n\t\tvar now = t.getNow();\n\t\tif (now.isWithin(currentView.intervalStart, currentView.intervalEnd)) {\n\t\t\theader.disableButton('today');\n\t\t}\n\t\telse {\n\t\t\theader.enableButton('today');\n\t\t}\n\t}\n\t\n\n\n\t/* Selection\n\t-----------------------------------------------------------------------------*/\n\t\n\n\t// this public method receives start/end dates in any format, with any timezone\n\tfunction select(zonedStartInput, zonedEndInput) {\n\t\tcurrentView.select(\n\t\t\tt.buildSelectSpan.apply(t, arguments)\n\t\t);\n\t}\n\t\n\n\tfunction unselect() { // safe to be called before renderView\n\t\tif (currentView) {\n\t\t\tcurrentView.unselect();\n\t\t}\n\t}\n\t\n\t\n\t\n\t/* Date\n\t-----------------------------------------------------------------------------*/\n\t\n\t\n\tfunction prev() {\n\t\tdate = currentView.computePrevDate(date);\n\t\trenderView();\n\t}\n\t\n\t\n\tfunction next() {\n\t\tdate = currentView.computeNextDate(date);\n\t\trenderView();\n\t}\n\t\n\t\n\tfunction prevYear() {\n\t\tdate.add(-1, 'years');\n\t\trenderView();\n\t}\n\t\n\t\n\tfunction nextYear() {\n\t\tdate.add(1, 'years');\n\t\trenderView();\n\t}\n\t\n\t\n\tfunction today() {\n\t\tdate = t.getNow();\n\t\trenderView();\n\t}\n\t\n\t\n\tfunction gotoDate(zonedDateInput) {\n\t\tdate = t.moment(zonedDateInput).stripZone();\n\t\trenderView();\n\t}\n\t\n\t\n\tfunction incrementDate(delta) {\n\t\tdate.add(moment.duration(delta));\n\t\trenderView();\n\t}\n\n\n\t// Forces navigation to a view for the given date.\n\t// `viewType` can be a specific view name or a generic one like \"week\" or \"day\".\n\tfunction zoomTo(newDate, viewType) {\n\t\tvar spec;\n\n\t\tviewType = viewType || 'day'; // day is default zoom\n\t\tspec = t.getViewSpec(viewType) || t.getUnitViewSpec(viewType);\n\n\t\tdate = newDate.clone();\n\t\trenderView(spec ? spec.type : null);\n\t}\n\t\n\t\n\t// for external API\n\tfunction getDate() {\n\t\treturn t.applyTimezone(date); // infuse the calendar's timezone\n\t}\n\n\n\n\t/* Height \"Freezing\"\n\t-----------------------------------------------------------------------------*/\n\t// TODO: move this into the view\n\n\tt.freezeContentHeight = freezeContentHeight;\n\tt.unfreezeContentHeight = unfreezeContentHeight;\n\n\n\tfunction freezeContentHeight() {\n\t\tcontent.css({\n\t\t\twidth: '100%',\n\t\t\theight: content.height(),\n\t\t\toverflow: 'hidden'\n\t\t});\n\t}\n\n\n\tfunction unfreezeContentHeight() {\n\t\tcontent.css({\n\t\t\twidth: '',\n\t\t\theight: '',\n\t\t\toverflow: ''\n\t\t});\n\t}\n\t\n\t\n\t\n\t/* Misc\n\t-----------------------------------------------------------------------------*/\n\t\n\n\tfunction getCalendar() {\n\t\treturn t;\n\t}\n\n\t\n\tfunction getView() {\n\t\treturn currentView;\n\t}\n\t\n\t\n\tfunction option(name, value) {\n\t\tif (value === undefined) {\n\t\t\treturn options[name];\n\t\t}\n\t\tif (name == 'height' || name == 'contentHeight' || name == 'aspectRatio') {\n\t\t\toptions[name] = value;\n\t\t\tupdateSize(true); // true = allow recalculation of height\n\t\t}\n\t}\n\t\n\t\n\tfunction trigger(name, thisObj) { // overrides the Emitter's trigger method :(\n\t\tvar args = Array.prototype.slice.call(arguments, 2);\n\n\t\tthisObj = thisObj || _element;\n\t\tthis.triggerWith(name, thisObj, args); // Emitter's method\n\n\t\tif (options[name]) {\n\t\t\treturn options[name].apply(thisObj, args);\n\t\t}\n\t}\n\n\tt.initialize();\n}\n\n;;\n\nCalendar.defaults = {\n\n\ttitleRangeSeparator: ' \\u2014 ', // emphasized dash\n\tmonthYearFormat: 'MMMM YYYY', // required for en. other languages rely on datepicker computable option\n\n\tdefaultTimedEventDuration: '02:00:00',\n\tdefaultAllDayEventDuration: { days: 1 },\n\tforceEventDuration: false,\n\tnextDayThreshold: '09:00:00', // 9am\n\n\t// display\n\tdefaultView: 'month',\n\taspectRatio: 1.35,\n\theader: {\n\t\tleft: 'title',\n\t\tcenter: '',\n\t\tright: 'today prev,next'\n\t},\n\tweekends: true,\n\tweekNumbers: false,\n\n\tweekNumberTitle: 'W',\n\tweekNumberCalculation: 'local',\n\t\n\t//editable: false,\n\n\tscrollTime: '06:00:00',\n\t\n\t// event ajax\n\tlazyFetching: true,\n\tstartParam: 'start',\n\tendParam: 'end',\n\ttimezoneParam: 'timezone',\n\n\ttimezone: false,\n\n\t//allDayDefault: undefined,\n\n\t// locale\n\tisRTL: false,\n\tbuttonText: {\n\t\tprev: \"prev\",\n\t\tnext: \"next\",\n\t\tprevYear: \"prev year\",\n\t\tnextYear: \"next year\",\n\t\tyear: 'year', // TODO: locale files need to specify this\n\t\ttoday: 'today',\n\t\tmonth: 'month',\n\t\tweek: 'week',\n\t\tday: 'day'\n\t},\n\n\tbuttonIcons: {\n\t\tprev: 'left-single-arrow',\n\t\tnext: 'right-single-arrow',\n\t\tprevYear: 'left-double-arrow',\n\t\tnextYear: 'right-double-arrow'\n\t},\n\t\n\t// jquery-ui theming\n\ttheme: false,\n\tthemeButtonIcons: {\n\t\tprev: 'circle-triangle-w',\n\t\tnext: 'circle-triangle-e',\n\t\tprevYear: 'seek-prev',\n\t\tnextYear: 'seek-next'\n\t},\n\n\t//eventResizableFromStart: false,\n\tdragOpacity: .75,\n\tdragRevertDuration: 500,\n\tdragScroll: true,\n\t\n\t//selectable: false,\n\tunselectAuto: true,\n\t\n\tdropAccept: '*',\n\n\teventOrder: 'title',\n\n\teventLimit: false,\n\teventLimitText: 'more',\n\teventLimitClick: 'popover',\n\tdayPopoverFormat: 'LL',\n\t\n\thandleWindowResize: true,\n\twindowResizeDelay: 200 // milliseconds before an updateSize happens\n\t\n};\n\n\nCalendar.englishDefaults = { // used by lang.js\n\tdayPopoverFormat: 'dddd, MMMM D'\n};\n\n\nCalendar.rtlDefaults = { // right-to-left defaults\n\theader: { // TODO: smarter solution (first/center/last ?)\n\t\tleft: 'next,prev today',\n\t\tcenter: '',\n\t\tright: 'title'\n\t},\n\tbuttonIcons: {\n\t\tprev: 'right-single-arrow',\n\t\tnext: 'left-single-arrow',\n\t\tprevYear: 'right-double-arrow',\n\t\tnextYear: 'left-double-arrow'\n\t},\n\tthemeButtonIcons: {\n\t\tprev: 'circle-triangle-e',\n\t\tnext: 'circle-triangle-w',\n\t\tnextYear: 'seek-prev',\n\t\tprevYear: 'seek-next'\n\t}\n};\n\n;;\n\nvar langOptionHash = FC.langs = {}; // initialize and expose\n\n\n// TODO: document the structure and ordering of a FullCalendar lang file\n// TODO: rename everything \"lang\" to \"locale\", like what the moment project did\n\n\n// Initialize jQuery UI datepicker translations while using some of the translations\n// Will set this as the default language for datepicker.\nFC.datepickerLang = function(langCode, dpLangCode, dpOptions) {\n\n\t// get the FullCalendar internal option hash for this language. create if necessary\n\tvar fcOptions = langOptionHash[langCode] || (langOptionHash[langCode] = {});\n\n\t// transfer some simple options from datepicker to fc\n\tfcOptions.isRTL = dpOptions.isRTL;\n\tfcOptions.weekNumberTitle = dpOptions.weekHeader;\n\n\t// compute some more complex options from datepicker\n\t$.each(dpComputableOptions, function(name, func) {\n\t\tfcOptions[name] = func(dpOptions);\n\t});\n\n\t// is jQuery UI Datepicker is on the page?\n\tif ($.datepicker) {\n\n\t\t// Register the language data.\n\t\t// FullCalendar and MomentJS use language codes like \"pt-br\" but Datepicker\n\t\t// does it like \"pt-BR\" or if it doesn't have the language, maybe just \"pt\".\n\t\t// Make an alias so the language can be referenced either way.\n\t\t$.datepicker.regional[dpLangCode] =\n\t\t\t$.datepicker.regional[langCode] = // alias\n\t\t\t\tdpOptions;\n\n\t\t// Alias 'en' to the default language data. Do this every time.\n\t\t$.datepicker.regional.en = $.datepicker.regional[''];\n\n\t\t// Set as Datepicker's global defaults.\n\t\t$.datepicker.setDefaults(dpOptions);\n\t}\n};\n\n\n// Sets FullCalendar-specific translations. Will set the language as the global default.\nFC.lang = function(langCode, newFcOptions) {\n\tvar fcOptions;\n\tvar momOptions;\n\n\t// get the FullCalendar internal option hash for this language. create if necessary\n\tfcOptions = langOptionHash[langCode] || (langOptionHash[langCode] = {});\n\n\t// provided new options for this language? merge them in\n\tif (newFcOptions) {\n\t\tfcOptions = langOptionHash[langCode] = mergeOptions([ fcOptions, newFcOptions ]);\n\t}\n\n\t// compute language options that weren't defined.\n\t// always do this. newFcOptions can be undefined when initializing from i18n file,\n\t// so no way to tell if this is an initialization or a default-setting.\n\tmomOptions = getMomentLocaleData(langCode); // will fall back to en\n\t$.each(momComputableOptions, function(name, func) {\n\t\tif (fcOptions[name] == null) {\n\t\t\tfcOptions[name] = func(momOptions, fcOptions);\n\t\t}\n\t});\n\n\t// set it as the default language for FullCalendar\n\tCalendar.defaults.lang = langCode;\n};\n\n\n// NOTE: can't guarantee any of these computations will run because not every language has datepicker\n// configs, so make sure there are English fallbacks for these in the defaults file.\nvar dpComputableOptions = {\n\n\tbuttonText: function(dpOptions) {\n\t\treturn {\n\t\t\t// the translations sometimes wrongly contain HTML entities\n\t\t\tprev: stripHtmlEntities(dpOptions.prevText),\n\t\t\tnext: stripHtmlEntities(dpOptions.nextText),\n\t\t\ttoday: stripHtmlEntities(dpOptions.currentText)\n\t\t};\n\t},\n\n\t// Produces format strings like \"MMMM YYYY\" -> \"September 2014\"\n\tmonthYearFormat: function(dpOptions) {\n\t\treturn dpOptions.showMonthAfterYear ?\n\t\t\t'YYYY[' + dpOptions.yearSuffix + '] MMMM' :\n\t\t\t'MMMM YYYY[' + dpOptions.yearSuffix + ']';\n\t}\n\n};\n\nvar momComputableOptions = {\n\n\t// Produces format strings like \"ddd M/D\" -> \"Fri 9/15\"\n\tdayOfMonthFormat: function(momOptions, fcOptions) {\n\t\tvar format = momOptions.longDateFormat('l'); // for the format like \"M/D/YYYY\"\n\n\t\t// strip the year off the edge, as well as other misc non-whitespace chars\n\t\tformat = format.replace(/^Y+[^\\w\\s]*|[^\\w\\s]*Y+$/g, '');\n\n\t\tif (fcOptions.isRTL) {\n\t\t\tformat += ' ddd'; // for RTL, add day-of-week to end\n\t\t}\n\t\telse {\n\t\t\tformat = 'ddd ' + format; // for LTR, add day-of-week to beginning\n\t\t}\n\t\treturn format;\n\t},\n\n\t// Produces format strings like \"h:mma\" -> \"6:00pm\"\n\tmediumTimeFormat: function(momOptions) { // can't be called `timeFormat` because collides with option\n\t\treturn momOptions.longDateFormat('LT')\n\t\t\t.replace(/\\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand\n\t},\n\n\t// Produces format strings like \"h(:mm)a\" -> \"6pm\" / \"6:30pm\"\n\tsmallTimeFormat: function(momOptions) {\n\t\treturn momOptions.longDateFormat('LT')\n\t\t\t.replace(':mm', '(:mm)')\n\t\t\t.replace(/(\\Wmm)$/, '($1)') // like above, but for foreign langs\n\t\t\t.replace(/\\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand\n\t},\n\n\t// Produces format strings like \"h(:mm)t\" -> \"6p\" / \"6:30p\"\n\textraSmallTimeFormat: function(momOptions) {\n\t\treturn momOptions.longDateFormat('LT')\n\t\t\t.replace(':mm', '(:mm)')\n\t\t\t.replace(/(\\Wmm)$/, '($1)') // like above, but for foreign langs\n\t\t\t.replace(/\\s*a$/i, 't'); // convert to AM/PM/am/pm to lowercase one-letter. remove any spaces beforehand\n\t},\n\n\t// Produces format strings like \"ha\" / \"H\" -> \"6pm\" / \"18\"\n\thourFormat: function(momOptions) {\n\t\treturn momOptions.longDateFormat('LT')\n\t\t\t.replace(':mm', '')\n\t\t\t.replace(/(\\Wmm)$/, '') // like above, but for foreign langs\n\t\t\t.replace(/\\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand\n\t},\n\n\t// Produces format strings like \"h:mm\" -> \"6:30\" (with no AM/PM)\n\tnoMeridiemTimeFormat: function(momOptions) {\n\t\treturn momOptions.longDateFormat('LT')\n\t\t\t.replace(/\\s*a$/i, ''); // remove trailing AM/PM\n\t}\n\n};\n\n\n// options that should be computed off live calendar options (considers override options)\n// TODO: best place for this? related to lang?\n// TODO: flipping text based on isRTL is a bad idea because the CSS `direction` might want to handle it\nvar instanceComputableOptions = {\n\n\t// Produces format strings for results like \"Mo 16\"\n\tsmallDayDateFormat: function(options) {\n\t\treturn options.isRTL ?\n\t\t\t'D dd' :\n\t\t\t'dd D';\n\t},\n\n\t// Produces format strings for results like \"Wk 5\"\n\tweekFormat: function(options) {\n\t\treturn options.isRTL ?\n\t\t\t'w[ ' + options.weekNumberTitle + ']' :\n\t\t\t'[' + options.weekNumberTitle + ' ]w';\n\t},\n\n\t// Produces format strings for results like \"Wk5\"\n\tsmallWeekFormat: function(options) {\n\t\treturn options.isRTL ?\n\t\t\t'w[' + options.weekNumberTitle + ']' :\n\t\t\t'[' + options.weekNumberTitle + ']w';\n\t}\n\n};\n\nfunction populateInstanceComputableOptions(options) {\n\t$.each(instanceComputableOptions, function(name, func) {\n\t\tif (options[name] == null) {\n\t\t\toptions[name] = func(options);\n\t\t}\n\t});\n}\n\n\n// Returns moment's internal locale data. If doesn't exist, returns English.\n// Works with moment-pre-2.8\nfunction getMomentLocaleData(langCode) {\n\tvar func = moment.localeData || moment.langData;\n\treturn func.call(moment, langCode) ||\n\t\tfunc.call(moment, 'en'); // the newer localData could return null, so fall back to en\n}\n\n\n// Initialize English by forcing computation of moment-derived options.\n// Also, sets it as the default.\nFC.lang('en', Calendar.englishDefaults);\n\n;;\n\n/* Top toolbar area with buttons and title\n----------------------------------------------------------------------------------------------------------------------*/\n// TODO: rename all header-related things to \"toolbar\"\n\nfunction Header(calendar, options) {\n\tvar t = this;\n\t\n\t// exports\n\tt.render = render;\n\tt.removeElement = removeElement;\n\tt.updateTitle = updateTitle;\n\tt.activateButton = activateButton;\n\tt.deactivateButton = deactivateButton;\n\tt.disableButton = disableButton;\n\tt.enableButton = enableButton;\n\tt.getViewsWithButtons = getViewsWithButtons;\n\t\n\t// locals\n\tvar el = $();\n\tvar viewsWithButtons = [];\n\tvar tm;\n\n\n\tfunction render() {\n\t\tvar sections = options.header;\n\n\t\ttm = options.theme ? 'ui' : 'fc';\n\n\t\tif (sections) {\n\t\t\tel = $(\"<div class='fc-toolbar'/>\")\n\t\t\t\t.append(renderSection('left'))\n\t\t\t\t.append(renderSection('right'))\n\t\t\t\t.append(renderSection('center'))\n\t\t\t\t.append('<div class=\"fc-clear\"/>');\n\n\t\t\treturn el;\n\t\t}\n\t}\n\t\n\t\n\tfunction removeElement() {\n\t\tel.remove();\n\t\tel = $();\n\t}\n\t\n\t\n\tfunction renderSection(position) {\n\t\tvar sectionEl = $('<div class=\"fc-' + position + '\"/>');\n\t\tvar buttonStr = options.header[position];\n\n\t\tif (buttonStr) {\n\t\t\t$.each(buttonStr.split(' '), function(i) {\n\t\t\t\tvar groupChildren = $();\n\t\t\t\tvar isOnlyButtons = true;\n\t\t\t\tvar groupEl;\n\n\t\t\t\t$.each(this.split(','), function(j, buttonName) {\n\t\t\t\t\tvar customButtonProps;\n\t\t\t\t\tvar viewSpec;\n\t\t\t\t\tvar buttonClick;\n\t\t\t\t\tvar overrideText; // text explicitly set by calendar's constructor options. overcomes icons\n\t\t\t\t\tvar defaultText;\n\t\t\t\t\tvar themeIcon;\n\t\t\t\t\tvar normalIcon;\n\t\t\t\t\tvar innerHtml;\n\t\t\t\t\tvar classes;\n\t\t\t\t\tvar button; // the element\n\n\t\t\t\t\tif (buttonName == 'title') {\n\t\t\t\t\t\tgroupChildren = groupChildren.add($('<h2> </h2>')); // we always want it to take up height\n\t\t\t\t\t\tisOnlyButtons = false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ((customButtonProps = (calendar.options.customButtons || {})[buttonName])) {\n\t\t\t\t\t\t\tbuttonClick = function(ev) {\n\t\t\t\t\t\t\t\tif (customButtonProps.click) {\n\t\t\t\t\t\t\t\t\tcustomButtonProps.click.call(button[0], ev);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\toverrideText = ''; // icons will override text\n\t\t\t\t\t\t\tdefaultText = customButtonProps.text;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ((viewSpec = calendar.getViewSpec(buttonName))) {\n\t\t\t\t\t\t\tbuttonClick = function() {\n\t\t\t\t\t\t\t\tcalendar.changeView(buttonName);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tviewsWithButtons.push(buttonName);\n\t\t\t\t\t\t\toverrideText = viewSpec.buttonTextOverride;\n\t\t\t\t\t\t\tdefaultText = viewSpec.buttonTextDefault;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (calendar[buttonName]) { // a calendar method\n\t\t\t\t\t\t\tbuttonClick = function() {\n\t\t\t\t\t\t\t\tcalendar[buttonName]();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\toverrideText = (calendar.overrides.buttonText || {})[buttonName];\n\t\t\t\t\t\t\tdefaultText = options.buttonText[buttonName]; // everything else is considered default\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (buttonClick) {\n\n\t\t\t\t\t\t\tthemeIcon =\n\t\t\t\t\t\t\t\tcustomButtonProps ?\n\t\t\t\t\t\t\t\t\tcustomButtonProps.themeIcon :\n\t\t\t\t\t\t\t\t\toptions.themeButtonIcons[buttonName];\n\n\t\t\t\t\t\t\tnormalIcon =\n\t\t\t\t\t\t\t\tcustomButtonProps ?\n\t\t\t\t\t\t\t\t\tcustomButtonProps.icon :\n\t\t\t\t\t\t\t\t\toptions.buttonIcons[buttonName];\n\n\t\t\t\t\t\t\tif (overrideText) {\n\t\t\t\t\t\t\t\tinnerHtml = htmlEscape(overrideText);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (themeIcon && options.theme) {\n\t\t\t\t\t\t\t\tinnerHtml = \"<span class='ui-icon ui-icon-\" + themeIcon + \"'></span>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (normalIcon && !options.theme) {\n\t\t\t\t\t\t\t\tinnerHtml = \"<span class='fc-icon fc-icon-\" + normalIcon + \"'></span>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tinnerHtml = htmlEscape(defaultText);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tclasses = [\n\t\t\t\t\t\t\t\t'fc-' + buttonName + '-button',\n\t\t\t\t\t\t\t\ttm + '-button',\n\t\t\t\t\t\t\t\ttm + '-state-default'\n\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\tbutton = $( // type=\"button\" so that it doesn't submit a form\n\t\t\t\t\t\t\t\t'<button type=\"button\" class=\"' + classes.join(' ') + '\">' +\n\t\t\t\t\t\t\t\t\tinnerHtml +\n\t\t\t\t\t\t\t\t'</button>'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.click(function(ev) {\n\t\t\t\t\t\t\t\t\t// don't process clicks for disabled buttons\n\t\t\t\t\t\t\t\t\tif (!button.hasClass(tm + '-state-disabled')) {\n\n\t\t\t\t\t\t\t\t\t\tbuttonClick(ev);\n\n\t\t\t\t\t\t\t\t\t\t// after the click action, if the button becomes the \"active\" tab, or disabled,\n\t\t\t\t\t\t\t\t\t\t// it should never have a hover class, so remove it now.\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tbutton.hasClass(tm + '-state-active') ||\n\t\t\t\t\t\t\t\t\t\t\tbutton.hasClass(tm + '-state-disabled')\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tbutton.removeClass(tm + '-state-hover');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.mousedown(function() {\n\t\t\t\t\t\t\t\t\t// the *down* effect (mouse pressed in).\n\t\t\t\t\t\t\t\t\t// only on buttons that are not the \"active\" tab, or disabled\n\t\t\t\t\t\t\t\t\tbutton\n\t\t\t\t\t\t\t\t\t\t.not('.' + tm + '-state-active')\n\t\t\t\t\t\t\t\t\t\t.not('.' + tm + '-state-disabled')\n\t\t\t\t\t\t\t\t\t\t.addClass(tm + '-state-down');\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.mouseup(function() {\n\t\t\t\t\t\t\t\t\t// undo the *down* effect\n\t\t\t\t\t\t\t\t\tbutton.removeClass(tm + '-state-down');\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.hover(\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\t// the *hover* effect.\n\t\t\t\t\t\t\t\t\t\t// only on buttons that are not the \"active\" tab, or disabled\n\t\t\t\t\t\t\t\t\t\tbutton\n\t\t\t\t\t\t\t\t\t\t\t.not('.' + tm + '-state-active')\n\t\t\t\t\t\t\t\t\t\t\t.not('.' + tm + '-state-disabled')\n\t\t\t\t\t\t\t\t\t\t\t.addClass(tm + '-state-hover');\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\t// undo the *hover* effect\n\t\t\t\t\t\t\t\t\t\tbutton\n\t\t\t\t\t\t\t\t\t\t\t.removeClass(tm + '-state-hover')\n\t\t\t\t\t\t\t\t\t\t\t.removeClass(tm + '-state-down'); // if mouseleave happens before mouseup\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tgroupChildren = groupChildren.add(button);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (isOnlyButtons) {\n\t\t\t\t\tgroupChildren\n\t\t\t\t\t\t.first().addClass(tm + '-corner-left').end()\n\t\t\t\t\t\t.last().addClass(tm + '-corner-right').end();\n\t\t\t\t}\n\n\t\t\t\tif (groupChildren.length > 1) {\n\t\t\t\t\tgroupEl = $('<div/>');\n\t\t\t\t\tif (isOnlyButtons) {\n\t\t\t\t\t\tgroupEl.addClass('fc-button-group');\n\t\t\t\t\t}\n\t\t\t\t\tgroupEl.append(groupChildren);\n\t\t\t\t\tsectionEl.append(groupEl);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsectionEl.append(groupChildren); // 1 or 0 children\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn sectionEl;\n\t}\n\t\n\t\n\tfunction updateTitle(text) {\n\t\tel.find('h2').text(text);\n\t}\n\t\n\t\n\tfunction activateButton(buttonName) {\n\t\tel.find('.fc-' + buttonName + '-button')\n\t\t\t.addClass(tm + '-state-active');\n\t}\n\t\n\t\n\tfunction deactivateButton(buttonName) {\n\t\tel.find('.fc-' + buttonName + '-button')\n\t\t\t.removeClass(tm + '-state-active');\n\t}\n\t\n\t\n\tfunction disableButton(buttonName) {\n\t\tel.find('.fc-' + buttonName + '-button')\n\t\t\t.attr('disabled', 'disabled')\n\t\t\t.addClass(tm + '-state-disabled');\n\t}\n\t\n\t\n\tfunction enableButton(buttonName) {\n\t\tel.find('.fc-' + buttonName + '-button')\n\t\t\t.removeAttr('disabled')\n\t\t\t.removeClass(tm + '-state-disabled');\n\t}\n\n\n\tfunction getViewsWithButtons() {\n\t\treturn viewsWithButtons;\n\t}\n\n}\n\n;;\n\nFC.sourceNormalizers = [];\nFC.sourceFetchers = [];\n\nvar ajaxDefaults = {\n\tdataType: 'json',\n\tcache: false\n};\n\nvar eventGUID = 1;\n\n\nfunction EventManager(options) { // assumed to be a calendar\n\tvar t = this;\n\t\n\t\n\t// exports\n\tt.isFetchNeeded = isFetchNeeded;\n\tt.fetchEvents = fetchEvents;\n\tt.addEventSource = addEventSource;\n\tt.removeEventSource = removeEventSource;\n\tt.updateEvent = updateEvent;\n\tt.renderEvent = renderEvent;\n\tt.removeEvents = removeEvents;\n\tt.clientEvents = clientEvents;\n\tt.mutateEvent = mutateEvent;\n\tt.normalizeEventDates = normalizeEventDates;\n\tt.normalizeEventTimes = normalizeEventTimes;\n\t\n\t\n\t// imports\n\tvar reportEvents = t.reportEvents;\n\t\n\t\n\t// locals\n\tvar stickySource = { events: [] };\n\tvar sources = [ stickySource ];\n\tvar rangeStart, rangeEnd;\n\tvar currentFetchID = 0;\n\tvar pendingSourceCnt = 0;\n\tvar cache = []; // holds events that have already been expanded\n\n\n\t$.each(\n\t\t(options.events ? [ options.events ] : []).concat(options.eventSources || []),\n\t\tfunction(i, sourceInput) {\n\t\t\tvar source = buildEventSource(sourceInput);\n\t\t\tif (source) {\n\t\t\t\tsources.push(source);\n\t\t\t}\n\t\t}\n\t);\n\t\n\t\n\t\n\t/* Fetching\n\t-----------------------------------------------------------------------------*/\n\n\n\t// start and end are assumed to be unzoned\n\tfunction isFetchNeeded(start, end) {\n\t\treturn !rangeStart || // nothing has been fetched yet?\n\t\t\tstart < rangeStart || end > rangeEnd; // is part of the new range outside of the old range?\n\t}\n\t\n\t\n\tfunction fetchEvents(start, end) {\n\t\trangeStart = start;\n\t\trangeEnd = end;\n\t\tcache = [];\n\t\tvar fetchID = ++currentFetchID;\n\t\tvar len = sources.length;\n\t\tpendingSourceCnt = len;\n\t\tfor (var i=0; i<len; i++) {\n\t\t\tfetchEventSource(sources[i], fetchID);\n\t\t}\n\t}\n\t\n\t\n\tfunction fetchEventSource(source, fetchID) {\n\t\t_fetchEventSource(source, function(eventInputs) {\n\t\t\tvar isArraySource = $.isArray(source.events);\n\t\t\tvar i, eventInput;\n\t\t\tvar abstractEvent;\n\n\t\t\tif (fetchID == currentFetchID) {\n\n\t\t\t\tif (eventInputs) {\n\t\t\t\t\tfor (i = 0; i < eventInputs.length; i++) {\n\t\t\t\t\t\teventInput = eventInputs[i];\n\n\t\t\t\t\t\tif (isArraySource) { // array sources have already been convert to Event Objects\n\t\t\t\t\t\t\tabstractEvent = eventInput;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tabstractEvent = buildEventFromInput(eventInput, source);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (abstractEvent) { // not false (an invalid event)\n\t\t\t\t\t\t\tcache.push.apply(\n\t\t\t\t\t\t\t\tcache,\n\t\t\t\t\t\t\t\texpandEvent(abstractEvent) // add individual expanded events to the cache\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tpendingSourceCnt--;\n\t\t\t\tif (!pendingSourceCnt) {\n\t\t\t\t\treportEvents(cache);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t\n\t\n\tfunction _fetchEventSource(source, callback) {\n\t\tvar i;\n\t\tvar fetchers = FC.sourceFetchers;\n\t\tvar res;\n\n\t\tfor (i=0; i<fetchers.length; i++) {\n\t\t\tres = fetchers[i].call(\n\t\t\t\tt, // this, the Calendar object\n\t\t\t\tsource,\n\t\t\t\trangeStart.clone(),\n\t\t\t\trangeEnd.clone(),\n\t\t\t\toptions.timezone,\n\t\t\t\tcallback\n\t\t\t);\n\n\t\t\tif (res === true) {\n\t\t\t\t// the fetcher is in charge. made its own async request\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (typeof res == 'object') {\n\t\t\t\t// the fetcher returned a new source. process it\n\t\t\t\t_fetchEventSource(res, callback);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tvar events = source.events;\n\t\tif (events) {\n\t\t\tif ($.isFunction(events)) {\n\t\t\t\tt.pushLoading();\n\t\t\t\tevents.call(\n\t\t\t\t\tt, // this, the Calendar object\n\t\t\t\t\trangeStart.clone(),\n\t\t\t\t\trangeEnd.clone(),\n\t\t\t\t\toptions.timezone,\n\t\t\t\t\tfunction(events) {\n\t\t\t\t\t\tcallback(events);\n\t\t\t\t\t\tt.popLoading();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($.isArray(events)) {\n\t\t\t\tcallback(events);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}else{\n\t\t\tvar url = source.url;\n\t\t\tif (url) {\n\t\t\t\tvar success = source.success;\n\t\t\t\tvar error = source.error;\n\t\t\t\tvar complete = source.complete;\n\n\t\t\t\t// retrieve any outbound GET/POST $.ajax data from the options\n\t\t\t\tvar customData;\n\t\t\t\tif ($.isFunction(source.data)) {\n\t\t\t\t\t// supplied as a function that returns a key/value object\n\t\t\t\t\tcustomData = source.data();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// supplied as a straight key/value object\n\t\t\t\t\tcustomData = source.data;\n\t\t\t\t}\n\n\t\t\t\t// use a copy of the custom data so we can modify the parameters\n\t\t\t\t// and not affect the passed-in object.\n\t\t\t\tvar data = $.extend({}, customData || {});\n\n\t\t\t\tvar startParam = firstDefined(source.startParam, options.startParam);\n\t\t\t\tvar endParam = firstDefined(source.endParam, options.endParam);\n\t\t\t\tvar timezoneParam = firstDefined(source.timezoneParam, options.timezoneParam);\n\n\t\t\t\tif (startParam) {\n\t\t\t\t\tdata[startParam] = rangeStart.format();\n\t\t\t\t}\n\t\t\t\tif (endParam) {\n\t\t\t\t\tdata[endParam] = rangeEnd.format();\n\t\t\t\t}\n\t\t\t\tif (options.timezone && options.timezone != 'local') {\n\t\t\t\t\tdata[timezoneParam] = options.timezone;\n\t\t\t\t}\n\n\t\t\t\tt.pushLoading();\n\t\t\t\t$.ajax($.extend({}, ajaxDefaults, source, {\n\t\t\t\t\tdata: data,\n\t\t\t\t\tsuccess: function(events) {\n\t\t\t\t\t\tevents = events || [];\n\t\t\t\t\t\tvar res = applyAll(success, this, arguments);\n\t\t\t\t\t\tif ($.isArray(res)) {\n\t\t\t\t\t\t\tevents = res;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback(events);\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\tapplyAll(error, this, arguments);\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t},\n\t\t\t\t\tcomplete: function() {\n\t\t\t\t\t\tapplyAll(complete, this, arguments);\n\t\t\t\t\t\tt.popLoading();\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t}else{\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t\n\t/* Sources\n\t-----------------------------------------------------------------------------*/\n\t\n\n\tfunction addEventSource(sourceInput) {\n\t\tvar source = buildEventSource(sourceInput);\n\t\tif (source) {\n\t\t\tsources.push(source);\n\t\t\tpendingSourceCnt++;\n\t\t\tfetchEventSource(source, currentFetchID); // will eventually call reportEvents\n\t\t}\n\t}\n\n\n\tfunction buildEventSource(sourceInput) { // will return undefined if invalid source\n\t\tvar normalizers = FC.sourceNormalizers;\n\t\tvar source;\n\t\tvar i;\n\n\t\tif ($.isFunction(sourceInput) || $.isArray(sourceInput)) {\n\t\t\tsource = { events: sourceInput };\n\t\t}\n\t\telse if (typeof sourceInput === 'string') {\n\t\t\tsource = { url: sourceInput };\n\t\t}\n\t\telse if (typeof sourceInput === 'object') {\n\t\t\tsource = $.extend({}, sourceInput); // shallow copy\n\t\t}\n\n\t\tif (source) {\n\n\t\t\t// TODO: repeat code, same code for event classNames\n\t\t\tif (source.className) {\n\t\t\t\tif (typeof source.className === 'string') {\n\t\t\t\t\tsource.className = source.className.split(/\\s+/);\n\t\t\t\t}\n\t\t\t\t// otherwise, assumed to be an array\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsource.className = [];\n\t\t\t}\n\n\t\t\t// for array sources, we convert to standard Event Objects up front\n\t\t\tif ($.isArray(source.events)) {\n\t\t\t\tsource.origArray = source.events; // for removeEventSource\n\t\t\t\tsource.events = $.map(source.events, function(eventInput) {\n\t\t\t\t\treturn buildEventFromInput(eventInput, source);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfor (i=0; i<normalizers.length; i++) {\n\t\t\t\tnormalizers[i].call(t, source);\n\t\t\t}\n\n\t\t\treturn source;\n\t\t}\n\t}\n\n\n\tfunction removeEventSource(source) {\n\t\tsources = $.grep(sources, function(src) {\n\t\t\treturn !isSourcesEqual(src, source);\n\t\t});\n\t\t// remove all client events from that source\n\t\tcache = $.grep(cache, function(e) {\n\t\t\treturn !isSourcesEqual(e.source, source);\n\t\t});\n\t\treportEvents(cache);\n\t}\n\n\n\tfunction isSourcesEqual(source1, source2) {\n\t\treturn source1 && source2 && getSourcePrimitive(source1) == getSourcePrimitive(source2);\n\t}\n\n\n\tfunction getSourcePrimitive(source) {\n\t\treturn (\n\t\t\t(typeof source === 'object') ? // a normalized event source?\n\t\t\t\t(source.origArray || source.googleCalendarId || source.url || source.events) : // get the primitive\n\t\t\t\tnull\n\t\t) ||\n\t\tsource; // the given argument *is* the primitive\n\t}\n\t\n\t\n\t\n\t/* Manipulation\n\t-----------------------------------------------------------------------------*/\n\n\n\t// Only ever called from the externally-facing API\n\tfunction updateEvent(event) {\n\n\t\t// massage start/end values, even if date string values\n\t\tevent.start = t.moment(event.start);\n\t\tif (event.end) {\n\t\t\tevent.end = t.moment(event.end);\n\t\t}\n\t\telse {\n\t\t\tevent.end = null;\n\t\t}\n\n\t\tmutateEvent(event, getMiscEventProps(event)); // will handle start/end/allDay normalization\n\t\treportEvents(cache); // reports event modifications (so we can redraw)\n\t}\n\n\n\t// Returns a hash of misc event properties that should be copied over to related events.\n\tfunction getMiscEventProps(event) {\n\t\tvar props = {};\n\n\t\t$.each(event, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined && isAtomic(val)) { // a defined non-object\n\t\t\t\t\tprops[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn props;\n\t}\n\n\t// non-date-related, non-id-related, non-secret\n\tfunction isMiscEventPropName(name) {\n\t\treturn !/^_|^(id|allDay|start|end)$/.test(name);\n\t}\n\n\t\n\t// returns the expanded events that were created\n\tfunction renderEvent(eventInput, stick) {\n\t\tvar abstractEvent = buildEventFromInput(eventInput);\n\t\tvar events;\n\t\tvar i, event;\n\n\t\tif (abstractEvent) { // not false (a valid input)\n\t\t\tevents = expandEvent(abstractEvent);\n\n\t\t\tfor (i = 0; i < events.length; i++) {\n\t\t\t\tevent = events[i];\n\n\t\t\t\tif (!event.source) {\n\t\t\t\t\tif (stick) {\n\t\t\t\t\t\tstickySource.events.push(event);\n\t\t\t\t\t\tevent.source = stickySource;\n\t\t\t\t\t}\n\t\t\t\t\tcache.push(event);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treportEvents(cache);\n\n\t\t\treturn events;\n\t\t}\n\n\t\treturn [];\n\t}\n\t\n\t\n\tfunction removeEvents(filter) {\n\t\tvar eventID;\n\t\tvar i;\n\n\t\tif (filter == null) { // null or undefined. remove all events\n\t\t\tfilter = function() { return true; }; // will always match\n\t\t}\n\t\telse if (!$.isFunction(filter)) { // an event ID\n\t\t\teventID = filter + '';\n\t\t\tfilter = function(event) {\n\t\t\t\treturn event._id == eventID;\n\t\t\t};\n\t\t}\n\n\t\t// Purge event(s) from our local cache\n\t\tcache = $.grep(cache, filter, true); // inverse=true\n\n\t\t// Remove events from array sources.\n\t\t// This works because they have been converted to official Event Objects up front.\n\t\t// (and as a result, event._id has been calculated).\n\t\tfor (i=0; i<sources.length; i++) {\n\t\t\tif ($.isArray(sources[i].events)) {\n\t\t\t\tsources[i].events = $.grep(sources[i].events, filter, true);\n\t\t\t}\n\t\t}\n\n\t\treportEvents(cache);\n\t}\n\t\n\t\n\tfunction clientEvents(filter) {\n\t\tif ($.isFunction(filter)) {\n\t\t\treturn $.grep(cache, filter);\n\t\t}\n\t\telse if (filter != null) { // not null, not undefined. an event ID\n\t\t\tfilter += '';\n\t\t\treturn $.grep(cache, function(e) {\n\t\t\t\treturn e._id == filter;\n\t\t\t});\n\t\t}\n\t\treturn cache; // else, return all\n\t}\n\t\n\t\n\t\n\t/* Event Normalization\n\t-----------------------------------------------------------------------------*/\n\n\n\t// Given a raw object with key/value properties, returns an \"abstract\" Event object.\n\t// An \"abstract\" event is an event that, if recurring, will not have been expanded yet.\n\t// Will return `false` when input is invalid.\n\t// `source` is optional\n\tfunction buildEventFromInput(input, source) {\n\t\tvar out = {};\n\t\tvar start, end;\n\t\tvar allDay;\n\n\t\tif (options.eventDataTransform) {\n\t\t\tinput = options.eventDataTransform(input);\n\t\t}\n\t\tif (source && source.eventDataTransform) {\n\t\t\tinput = source.eventDataTransform(input);\n\t\t}\n\n\t\t// Copy all properties over to the resulting object.\n\t\t// The special-case properties will be copied over afterwards.\n\t\t$.extend(out, input);\n\n\t\tif (source) {\n\t\t\tout.source = source;\n\t\t}\n\n\t\tout._id = input._id || (input.id === undefined ? '_fc' + eventGUID++ : input.id + '');\n\n\t\tif (input.className) {\n\t\t\tif (typeof input.className == 'string') {\n\t\t\t\tout.className = input.className.split(/\\s+/);\n\t\t\t}\n\t\t\telse { // assumed to be an array\n\t\t\t\tout.className = input.className;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tout.className = [];\n\t\t}\n\n\t\tstart = input.start || input.date; // \"date\" is an alias for \"start\"\n\t\tend = input.end;\n\n\t\t// parse as a time (Duration) if applicable\n\t\tif (isTimeString(start)) {\n\t\t\tstart = moment.duration(start);\n\t\t}\n\t\tif (isTimeString(end)) {\n\t\t\tend = moment.duration(end);\n\t\t}\n\n\t\tif (input.dow || moment.isDuration(start) || moment.isDuration(end)) {\n\n\t\t\t// the event is \"abstract\" (recurring) so don't calculate exact start/end dates just yet\n\t\t\tout.start = start ? moment.duration(start) : null; // will be a Duration or null\n\t\t\tout.end = end ? moment.duration(end) : null; // will be a Duration or null\n\t\t\tout._recurring = true; // our internal marker\n\t\t}\n\t\telse {\n\n\t\t\tif (start) {\n\t\t\t\tstart = t.moment(start);\n\t\t\t\tif (!start.isValid()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (end) {\n\t\t\t\tend = t.moment(end);\n\t\t\t\tif (!end.isValid()) {\n\t\t\t\t\tend = null; // let defaults take over\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tallDay = input.allDay;\n\t\t\tif (allDay === undefined) { // still undefined? fallback to default\n\t\t\t\tallDay = firstDefined(\n\t\t\t\t\tsource ? source.allDayDefault : undefined,\n\t\t\t\t\toptions.allDayDefault\n\t\t\t\t);\n\t\t\t\t// still undefined? normalizeEventDates will calculate it\n\t\t\t}\n\n\t\t\tassignDatesToEvent(start, end, allDay, out);\n\t\t}\n\n\t\treturn out;\n\t}\n\n\n\t// Normalizes and assigns the given dates to the given partially-formed event object.\n\t// NOTE: mutates the given start/end moments. does not make a copy.\n\tfunction assignDatesToEvent(start, end, allDay, event) {\n\t\tevent.start = start;\n\t\tevent.end = end;\n\t\tevent.allDay = allDay;\n\t\tnormalizeEventDates(event);\n\t\tbackupEventDates(event);\n\t}\n\n\n\t// Ensures proper values for allDay/start/end. Accepts an Event object, or a plain object with event-ish properties.\n\t// NOTE: Will modify the given object.\n\tfunction normalizeEventDates(eventProps) {\n\n\t\tnormalizeEventTimes(eventProps);\n\n\t\tif (eventProps.end && !eventProps.end.isAfter(eventProps.start)) {\n\t\t\teventProps.end = null;\n\t\t}\n\n\t\tif (!eventProps.end) {\n\t\t\tif (options.forceEventDuration) {\n\t\t\t\teventProps.end = t.getDefaultEventEnd(eventProps.allDay, eventProps.start);\n\t\t\t}\n\t\t\telse {\n\t\t\t\teventProps.end = null;\n\t\t\t}\n\t\t}\n\t}\n\n\n\t// Ensures the allDay property exists and the timeliness of the start/end dates are consistent\n\tfunction normalizeEventTimes(eventProps) {\n\t\tif (eventProps.allDay == null) {\n\t\t\teventProps.allDay = !(eventProps.start.hasTime() || (eventProps.end && eventProps.end.hasTime()));\n\t\t}\n\n\t\tif (eventProps.allDay) {\n\t\t\teventProps.start.stripTime();\n\t\t\tif (eventProps.end) {\n\t\t\t\t// TODO: consider nextDayThreshold here? If so, will require a lot of testing and adjustment\n\t\t\t\teventProps.end.stripTime();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!eventProps.start.hasTime()) {\n\t\t\t\teventProps.start = t.applyTimezone(eventProps.start.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t\tif (eventProps.end && !eventProps.end.hasTime()) {\n\t\t\t\teventProps.end = t.applyTimezone(eventProps.end.time(0)); // will assign a 00:00 time\n\t\t\t}\n\t\t}\n\t}\n\n\n\t// If the given event is a recurring event, break it down into an array of individual instances.\n\t// If not a recurring event, return an array with the single original event.\n\t// If given a falsy input (probably because of a failed buildEventFromInput call), returns an empty array.\n\t// HACK: can override the recurring window by providing custom rangeStart/rangeEnd (for businessHours).\n\tfunction expandEvent(abstractEvent, _rangeStart, _rangeEnd) {\n\t\tvar events = [];\n\t\tvar dowHash;\n\t\tvar dow;\n\t\tvar i;\n\t\tvar date;\n\t\tvar startTime, endTime;\n\t\tvar start, end;\n\t\tvar event;\n\n\t\t_rangeStart = _rangeStart || rangeStart;\n\t\t_rangeEnd = _rangeEnd || rangeEnd;\n\n\t\tif (abstractEvent) {\n\t\t\tif (abstractEvent._recurring) {\n\n\t\t\t\t// make a boolean hash as to whether the event occurs on each day-of-week\n\t\t\t\tif ((dow = abstractEvent.dow)) {\n\t\t\t\t\tdowHash = {};\n\t\t\t\t\tfor (i = 0; i < dow.length; i++) {\n\t\t\t\t\t\tdowHash[dow[i]] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// iterate through every day in the current range\n\t\t\t\tdate = _rangeStart.clone().stripTime(); // holds the date of the current day\n\t\t\t\twhile (date.isBefore(_rangeEnd)) {\n\n\t\t\t\t\tif (!dowHash || dowHash[date.day()]) { // if everyday, or this particular day-of-week\n\n\t\t\t\t\t\tstartTime = abstractEvent.start; // the stored start and end properties are times (Durations)\n\t\t\t\t\t\tendTime = abstractEvent.end; // \"\n\t\t\t\t\t\tstart = date.clone();\n\t\t\t\t\t\tend = null;\n\n\t\t\t\t\t\tif (startTime) {\n\t\t\t\t\t\t\tstart = start.time(startTime);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (endTime) {\n\t\t\t\t\t\t\tend = date.clone().time(endTime);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tevent = $.extend({}, abstractEvent); // make a copy of the original\n\t\t\t\t\t\tassignDatesToEvent(\n\t\t\t\t\t\t\tstart, end,\n\t\t\t\t\t\t\t!startTime && !endTime, // allDay?\n\t\t\t\t\t\t\tevent\n\t\t\t\t\t\t);\n\t\t\t\t\t\tevents.push(event);\n\t\t\t\t\t}\n\n\t\t\t\t\tdate.add(1, 'days');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tevents.push(abstractEvent); // return the original event. will be a one-item array\n\t\t\t}\n\t\t}\n\n\t\treturn events;\n\t}\n\n\n\n\t/* Event Modification Math\n\t-----------------------------------------------------------------------------------------*/\n\n\n\t// Modifies an event and all related events by applying the given properties.\n\t// Special date-diffing logic is used for manipulation of dates.\n\t// If `props` does not contain start/end dates, the updated values are assumed to be the event's current start/end.\n\t// All date comparisons are done against the event's pristine _start and _end dates.\n\t// Returns an object with delta information and a function to undo all operations.\n\t// For making computations in a granularity greater than day/time, specify largeUnit.\n\t// NOTE: The given `newProps` might be mutated for normalization purposes.\n\tfunction mutateEvent(event, newProps, largeUnit) {\n\t\tvar miscProps = {};\n\t\tvar oldProps;\n\t\tvar clearEnd;\n\t\tvar startDelta;\n\t\tvar endDelta;\n\t\tvar durationDelta;\n\t\tvar undoFunc;\n\n\t\t// diffs the dates in the appropriate way, returning a duration\n\t\tfunction diffDates(date1, date0) { // date1 - date0\n\t\t\tif (largeUnit) {\n\t\t\t\treturn diffByUnit(date1, date0, largeUnit);\n\t\t\t}\n\t\t\telse if (newProps.allDay) {\n\t\t\t\treturn diffDay(date1, date0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn diffDayTime(date1, date0);\n\t\t\t}\n\t\t}\n\n\t\tnewProps = newProps || {};\n\n\t\t// normalize new date-related properties\n\t\tif (!newProps.start) {\n\t\t\tnewProps.start = event.start.clone();\n\t\t}\n\t\tif (newProps.end === undefined) {\n\t\t\tnewProps.end = event.end ? event.end.clone() : null;\n\t\t}\n\t\tif (newProps.allDay == null) { // is null or undefined?\n\t\t\tnewProps.allDay = event.allDay;\n\t\t}\n\t\tnormalizeEventDates(newProps);\n\n\t\t// create normalized versions of the original props to compare against\n\t\t// need a real end value, for diffing\n\t\toldProps = {\n\t\t\tstart: event._start.clone(),\n\t\t\tend: event._end ? event._end.clone() : t.getDefaultEventEnd(event._allDay, event._start),\n\t\t\tallDay: newProps.allDay // normalize the dates in the same regard as the new properties\n\t\t};\n\t\tnormalizeEventDates(oldProps);\n\n\t\t// need to clear the end date if explicitly changed to null\n\t\tclearEnd = event._end !== null && newProps.end === null;\n\n\t\t// compute the delta for moving the start date\n\t\tstartDelta = diffDates(newProps.start, oldProps.start);\n\n\t\t// compute the delta for moving the end date\n\t\tif (newProps.end) {\n\t\t\tendDelta = diffDates(newProps.end, oldProps.end);\n\t\t\tdurationDelta = endDelta.subtract(startDelta);\n\t\t}\n\t\telse {\n\t\t\tdurationDelta = null;\n\t\t}\n\n\t\t// gather all non-date-related properties\n\t\t$.each(newProps, function(name, val) {\n\t\t\tif (isMiscEventPropName(name)) {\n\t\t\t\tif (val !== undefined) {\n\t\t\t\t\tmiscProps[name] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// apply the operations to the event and all related events\n\t\tundoFunc = mutateEvents(\n\t\t\tclientEvents(event._id), // get events with this ID\n\t\t\tclearEnd,\n\t\t\tnewProps.allDay,\n\t\t\tstartDelta,\n\t\t\tdurationDelta,\n\t\t\tmiscProps\n\t\t);\n\n\t\treturn {\n\t\t\tdateDelta: startDelta,\n\t\t\tdurationDelta: durationDelta,\n\t\t\tundo: undoFunc\n\t\t};\n\t}\n\n\n\t// Modifies an array of events in the following ways (operations are in order):\n\t// - clear the event's `end`\n\t// - convert the event to allDay\n\t// - add `dateDelta` to the start and end\n\t// - add `durationDelta` to the event's duration\n\t// - assign `miscProps` to the event\n\t//\n\t// Returns a function that can be called to undo all the operations.\n\t//\n\t// TODO: don't use so many closures. possible memory issues when lots of events with same ID.\n\t//\n\tfunction mutateEvents(events, clearEnd, allDay, dateDelta, durationDelta, miscProps) {\n\t\tvar isAmbigTimezone = t.getIsAmbigTimezone();\n\t\tvar undoFunctions = [];\n\n\t\t// normalize zero-length deltas to be null\n\t\tif (dateDelta && !dateDelta.valueOf()) { dateDelta = null; }\n\t\tif (durationDelta && !durationDelta.valueOf()) { durationDelta = null; }\n\n\t\t$.each(events, function(i, event) {\n\t\t\tvar oldProps;\n\t\t\tvar newProps;\n\n\t\t\t// build an object holding all the old values, both date-related and misc.\n\t\t\t// for the undo function.\n\t\t\toldProps = {\n\t\t\t\tstart: event.start.clone(),\n\t\t\t\tend: event.end ? event.end.clone() : null,\n\t\t\t\tallDay: event.allDay\n\t\t\t};\n\t\t\t$.each(miscProps, function(name) {\n\t\t\t\toldProps[name] = event[name];\n\t\t\t});\n\n\t\t\t// new date-related properties. work off the original date snapshot.\n\t\t\t// ok to use references because they will be thrown away when backupEventDates is called.\n\t\t\tnewProps = {\n\t\t\t\tstart: event._start,\n\t\t\t\tend: event._end,\n\t\t\t\tallDay: allDay // normalize the dates in the same regard as the new properties\n\t\t\t};\n\t\t\tnormalizeEventDates(newProps); // massages start/end/allDay\n\n\t\t\t// strip or ensure the end date\n\t\t\tif (clearEnd) {\n\t\t\t\tnewProps.end = null;\n\t\t\t}\n\t\t\telse if (durationDelta && !newProps.end) { // the duration translation requires an end date\n\t\t\t\tnewProps.end = t.getDefaultEventEnd(newProps.allDay, newProps.start);\n\t\t\t}\n\n\t\t\tif (dateDelta) {\n\t\t\t\tnewProps.start.add(dateDelta);\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.add(dateDelta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (durationDelta) {\n\t\t\t\tnewProps.end.add(durationDelta); // end already ensured above\n\t\t\t}\n\n\t\t\t// if the dates have changed, and we know it is impossible to recompute the\n\t\t\t// timezone offsets, strip the zone.\n\t\t\tif (\n\t\t\t\tisAmbigTimezone &&\n\t\t\t\t!newProps.allDay &&\n\t\t\t\t(dateDelta || durationDelta)\n\t\t\t) {\n\t\t\t\tnewProps.start.stripZone();\n\t\t\t\tif (newProps.end) {\n\t\t\t\t\tnewProps.end.stripZone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.extend(event, miscProps, newProps); // copy over misc props, then date-related props\n\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\n\t\t\tundoFunctions.push(function() {\n\t\t\t\t$.extend(event, oldProps);\n\t\t\t\tbackupEventDates(event); // regenerate internal _start/_end/_allDay\n\t\t\t});\n\t\t});\n\n\t\treturn function() {\n\t\t\tfor (var i = 0; i < undoFunctions.length; i++) {\n\t\t\t\tundoFunctions[i]();\n\t\t\t}\n\t\t};\n\t}\n\n\n\t/* Business Hours\n\t-----------------------------------------------------------------------------------------*/\n\n\tt.getBusinessHoursEvents = getBusinessHoursEvents;\n\n\n\t// Returns an array of events as to when the business hours occur in the given view.\n\t// Abuse of our event system :(\n\tfunction getBusinessHoursEvents(wholeDay) {\n\t\tvar optionVal = options.businessHours;\n\t\tvar defaultVal = {\n\t\t\tclassName: 'fc-nonbusiness',\n\t\t\tstart: '09:00',\n\t\t\tend: '17:00',\n\t\t\tdow: [ 1, 2, 3, 4, 5 ], // monday - friday\n\t\t\trendering: 'inverse-background'\n\t\t};\n\t\tvar view = t.getView();\n\t\tvar eventInput;\n\n\t\tif (optionVal) { // `true` (which means \"use the defaults\") or an override object\n\t\t\teventInput = $.extend(\n\t\t\t\t{}, // copy to a new object in either case\n\t\t\t\tdefaultVal,\n\t\t\t\ttypeof optionVal === 'object' ? optionVal : {} // override the defaults\n\t\t\t);\n\t\t}\n\n\t\tif (eventInput) {\n\n\t\t\t// if a whole-day series is requested, clear the start/end times\n\t\t\tif (wholeDay) {\n\t\t\t\teventInput.start = null;\n\t\t\t\teventInput.end = null;\n\t\t\t}\n\n\t\t\treturn expandEvent(\n\t\t\t\tbuildEventFromInput(eventInput),\n\t\t\t\tview.start,\n\t\t\t\tview.end\n\t\t\t);\n\t\t}\n\n\t\treturn [];\n\t}\n\n\n\t/* Overlapping / Constraining\n\t-----------------------------------------------------------------------------------------*/\n\n\tt.isEventSpanAllowed = isEventSpanAllowed;\n\tt.isExternalSpanAllowed = isExternalSpanAllowed;\n\tt.isSelectionSpanAllowed = isSelectionSpanAllowed;\n\n\n\t// Determines if the given event can be relocated to the given span (unzoned start/end with other misc data)\n\tfunction isEventSpanAllowed(span, event) {\n\t\tvar source = event.source || {};\n\t\tvar constraint = firstDefined(\n\t\t\tevent.constraint,\n\t\t\tsource.constraint,\n\t\t\toptions.eventConstraint\n\t\t);\n\t\tvar overlap = firstDefined(\n\t\t\tevent.overlap,\n\t\t\tsource.overlap,\n\t\t\toptions.eventOverlap\n\t\t);\n\t\treturn isSpanAllowed(span, constraint, overlap, event);\n\t}\n\n\n\t// Determines if an external event can be relocated to the given span (unzoned start/end with other misc data)\n\tfunction isExternalSpanAllowed(eventSpan, eventLocation, eventProps) {\n\t\tvar eventInput;\n\t\tvar event;\n\n\t\t// note: very similar logic is in View's reportExternalDrop\n\t\tif (eventProps) {\n\t\t\teventInput = $.extend({}, eventProps, eventLocation);\n\t\t\tevent = expandEvent(buildEventFromInput(eventInput))[0];\n\t\t}\n\n\t\tif (event) {\n\t\t\treturn isEventSpanAllowed(eventSpan, event);\n\t\t}\n\t\telse { // treat it as a selection\n\n\t\t\treturn isSelectionSpanAllowed(eventSpan);\n\t\t}\n\t}\n\n\n\t// Determines the given span (unzoned start/end with other misc data) can be selected.\n\tfunction isSelectionSpanAllowed(span) {\n\t\treturn isSpanAllowed(span, options.selectConstraint, options.selectOverlap);\n\t}\n\n\n\t// Returns true if the given span (caused by an event drop/resize or a selection) is allowed to exist\n\t// according to the constraint/overlap settings.\n\t// `event` is not required if checking a selection.\n\tfunction isSpanAllowed(span, constraint, overlap, event) {\n\t\tvar constraintEvents;\n\t\tvar anyContainment;\n\t\tvar peerEvents;\n\t\tvar i, peerEvent;\n\t\tvar peerOverlap;\n\n\t\t// the range must be fully contained by at least one of produced constraint events\n\t\tif (constraint != null) {\n\n\t\t\t// not treated as an event! intermediate data structure\n\t\t\t// TODO: use ranges in the future\n\t\t\tconstraintEvents = constraintToEvents(constraint);\n\n\t\t\tanyContainment = false;\n\t\t\tfor (i = 0; i < constraintEvents.length; i++) {\n\t\t\t\tif (eventContainsRange(constraintEvents[i], span)) {\n\t\t\t\t\tanyContainment = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!anyContainment) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tpeerEvents = t.getPeerEvents(span, event);\n\n\t\tfor (i = 0; i < peerEvents.length; i++) {\n\t\t\tpeerEvent = peerEvents[i];\n\n\t\t\t// there needs to be an actual intersection before disallowing anything\n\t\t\tif (eventIntersectsRange(peerEvent, span)) {\n\n\t\t\t\t// evaluate overlap for the given range and short-circuit if necessary\n\t\t\t\tif (overlap === false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// if the event's overlap is a test function, pass the peer event in question as the first param\n\t\t\t\telse if (typeof overlap === 'function' && !overlap(peerEvent, event)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// if we are computing if the given range is allowable for an event, consider the other event's\n\t\t\t\t// EventObject-specific or Source-specific `overlap` property\n\t\t\t\tif (event) {\n\t\t\t\t\tpeerOverlap = firstDefined(\n\t\t\t\t\t\tpeerEvent.overlap,\n\t\t\t\t\t\t(peerEvent.source || {}).overlap\n\t\t\t\t\t\t// we already considered the global `eventOverlap`\n\t\t\t\t\t);\n\t\t\t\t\tif (peerOverlap === false) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t// if the peer event's overlap is a test function, pass the subject event as the first param\n\t\t\t\t\tif (typeof peerOverlap === 'function' && !peerOverlap(event, peerEvent)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\n\t// Given an event input from the API, produces an array of event objects. Possible event inputs:\n\t// 'businessHours'\n\t// An event ID (number or string)\n\t// An object with specific start/end dates or a recurring event (like what businessHours accepts)\n\tfunction constraintToEvents(constraintInput) {\n\n\t\tif (constraintInput === 'businessHours') {\n\t\t\treturn getBusinessHoursEvents();\n\t\t}\n\n\t\tif (typeof constraintInput === 'object') {\n\t\t\treturn expandEvent(buildEventFromInput(constraintInput));\n\t\t}\n\n\t\treturn clientEvents(constraintInput); // probably an ID\n\t}\n\n\n\t// Does the event's date range fully contain the given range?\n\t// start/end already assumed to have stripped zones :(\n\tfunction eventContainsRange(event, range) {\n\t\tvar eventStart = event.start.clone().stripZone();\n\t\tvar eventEnd = t.getEventEnd(event).stripZone();\n\n\t\treturn range.start >= eventStart && range.end <= eventEnd;\n\t}\n\n\n\t// Does the event's date range intersect with the given range?\n\t// start/end already assumed to have stripped zones :(\n\tfunction eventIntersectsRange(event, range) {\n\t\tvar eventStart = event.start.clone().stripZone();\n\t\tvar eventEnd = t.getEventEnd(event).stripZone();\n\n\t\treturn range.start < eventEnd && range.end > eventStart;\n\t}\n\n\n\tt.getEventCache = function() {\n\t\treturn cache;\n\t};\n\n}\n\n\n// Returns a list of events that the given event should be compared against when being considered for a move to\n// the specified span. Attached to the Calendar's prototype because EventManager is a mixin for a Calendar.\nCalendar.prototype.getPeerEvents = function(span, event) {\n\tvar cache = this.getEventCache();\n\tvar peerEvents = [];\n\tvar i, otherEvent;\n\n\tfor (i = 0; i < cache.length; i++) {\n\t\totherEvent = cache[i];\n\t\tif (\n\t\t\t!event ||\n\t\t\tevent._id !== otherEvent._id // don't compare the event to itself or other related [repeating] events\n\t\t) {\n\t\t\tpeerEvents.push(otherEvent);\n\t\t}\n\t}\n\n\treturn peerEvents;\n};\n\n\n// updates the \"backup\" properties, which are preserved in order to compute diffs later on.\nfunction backupEventDates(event) {\n\tevent._allDay = event.allDay;\n\tevent._start = event.start.clone();\n\tevent._end = event.end ? event.end.clone() : null;\n}\n\n;;\n\n/* An abstract class for the \"basic\" views, as well as month view. Renders one or more rows of day cells.\n----------------------------------------------------------------------------------------------------------------------*/\n// It is a manager for a DayGrid subcomponent, which does most of the heavy lifting.\n// It is responsible for managing width/height.\n\nvar BasicView = FC.BasicView = View.extend({\n\n\tdayGridClass: DayGrid, // class the dayGrid will be instantiated from (overridable by subclasses)\n\tdayGrid: null, // the main subcomponent that does most of the heavy lifting\n\n\tdayNumbersVisible: false, // display day numbers on each day cell?\n\tweekNumbersVisible: false, // display week numbers along the side?\n\n\tweekNumberWidth: null, // width of all the week-number cells running down the side\n\n\theadContainerEl: null, // div that hold's the dayGrid's rendered date header\n\theadRowEl: null, // the fake row element of the day-of-week header\n\n\n\tinitialize: function() {\n\t\tthis.dayGrid = this.instantiateDayGrid();\n\t},\n\n\n\t// Generates the DayGrid object this view needs. Draws from this.dayGridClass\n\tinstantiateDayGrid: function() {\n\t\t// generate a subclass on the fly with BasicView-specific behavior\n\t\t// TODO: cache this subclass\n\t\tvar subclass = this.dayGridClass.extend(basicDayGridMethods);\n\n\t\treturn new subclass(this);\n\t},\n\n\n\t// Sets the display range and computes all necessary dates\n\tsetRange: function(range) {\n\t\tView.prototype.setRange.call(this, range); // call the super-method\n\n\t\tthis.dayGrid.breakOnWeeks = /year|month|week/.test(this.intervalUnit); // do before setRange\n\t\tthis.dayGrid.setRange(range);\n\t},\n\n\n\t// Compute the value to feed into setRange. Overrides superclass.\n\tcomputeRange: function(date) {\n\t\tvar range = View.prototype.computeRange.call(this, date); // get value from the super-method\n\n\t\t// year and month views should be aligned with weeks. this is already done for week\n\t\tif (/year|month/.test(range.intervalUnit)) {\n\t\t\trange.start.startOf('week');\n\t\t\trange.start = this.skipHiddenDays(range.start);\n\n\t\t\t// make end-of-week if not already\n\t\t\tif (range.end.weekday()) {\n\t\t\t\trange.end.add(1, 'week').startOf('week');\n\t\t\t\trange.end = this.skipHiddenDays(range.end, -1, true); // exclusively move backwards\n\t\t\t}\n\t\t}\n\n\t\treturn range;\n\t},\n\n\n\t// Renders the view into `this.el`, which should already be assigned\n\trenderDates: function() {\n\n\t\tthis.dayNumbersVisible = this.dayGrid.rowCnt > 1; // TODO: make grid responsible\n\t\tthis.weekNumbersVisible = this.opt('weekNumbers');\n\t\tthis.dayGrid.numbersVisible = this.dayNumbersVisible || this.weekNumbersVisible;\n\n\t\tthis.el.addClass('fc-basic-view').html(this.renderSkeletonHtml());\n\t\tthis.renderHead();\n\n\t\tthis.scrollerEl = this.el.find('.fc-day-grid-container');\n\n\t\tthis.dayGrid.setElement(this.el.find('.fc-day-grid'));\n\t\tthis.dayGrid.renderDates(this.hasRigidRows());\n\t},\n\n\n\t// render the day-of-week headers\n\trenderHead: function() {\n\t\tthis.headContainerEl =\n\t\t\tthis.el.find('.fc-head-container')\n\t\t\t\t.html(this.dayGrid.renderHeadHtml());\n\t\tthis.headRowEl = this.headContainerEl.find('.fc-row');\n\t},\n\n\n\t// Unrenders the content of the view. Since we haven't separated skeleton rendering from date rendering,\n\t// always completely kill the dayGrid's rendering.\n\tunrenderDates: function() {\n\t\tthis.dayGrid.unrenderDates();\n\t\tthis.dayGrid.removeElement();\n\t},\n\n\n\trenderBusinessHours: function() {\n\t\tthis.dayGrid.renderBusinessHours();\n\t},\n\n\n\t// Builds the HTML skeleton for the view.\n\t// The day-grid component will render inside of a container defined by this HTML.\n\trenderSkeletonHtml: function() {\n\t\treturn '' +\n\t\t\t'<table>' +\n\t\t\t\t'<thead class=\"fc-head\">' +\n\t\t\t\t\t'<tr>' +\n\t\t\t\t\t\t'<td class=\"fc-head-container ' + this.widgetHeaderClass + '\"></td>' +\n\t\t\t\t\t'</tr>' +\n\t\t\t\t'</thead>' +\n\t\t\t\t'<tbody class=\"fc-body\">' +\n\t\t\t\t\t'<tr>' +\n\t\t\t\t\t\t'<td class=\"' + this.widgetContentClass + '\">' +\n\t\t\t\t\t\t\t'<div class=\"fc-day-grid-container\">' +\n\t\t\t\t\t\t\t\t'<div class=\"fc-day-grid\"/>' +\n\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t'</td>' +\n\t\t\t\t\t'</tr>' +\n\t\t\t\t'</tbody>' +\n\t\t\t'</table>';\n\t},\n\n\n\t// Generates an HTML attribute string for setting the width of the week number column, if it is known\n\tweekNumberStyleAttr: function() {\n\t\tif (this.weekNumberWidth !== null) {\n\t\t\treturn 'style=\"width:' + this.weekNumberWidth + 'px\"';\n\t\t}\n\t\treturn '';\n\t},\n\n\n\t// Determines whether each row should have a constant height\n\thasRigidRows: function() {\n\t\tvar eventLimit = this.opt('eventLimit');\n\t\treturn eventLimit && typeof eventLimit !== 'number';\n\t},\n\n\n\t/* Dimensions\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Refreshes the horizontal dimensions of the view\n\tupdateWidth: function() {\n\t\tif (this.weekNumbersVisible) {\n\t\t\t// Make sure all week number cells running down the side have the same width.\n\t\t\t// Record the width for cells created later.\n\t\t\tthis.weekNumberWidth = matchCellWidths(\n\t\t\t\tthis.el.find('.fc-week-number')\n\t\t\t);\n\t\t}\n\t},\n\n\n\t// Adjusts the vertical dimensions of the view to the specified values\n\tsetHeight: function(totalHeight, isAuto) {\n\t\tvar eventLimit = this.opt('eventLimit');\n\t\tvar scrollerHeight;\n\n\t\t// reset all heights to be natural\n\t\tunsetScroller(this.scrollerEl);\n\t\tuncompensateScroll(this.headRowEl);\n\n\t\tthis.dayGrid.removeSegPopover(); // kill the \"more\" popover if displayed\n\n\t\t// is the event limit a constant level number?\n\t\tif (eventLimit && typeof eventLimit === 'number') {\n\t\t\tthis.dayGrid.limitRows(eventLimit); // limit the levels first so the height can redistribute after\n\t\t}\n\n\t\tscrollerHeight = this.computeScrollerHeight(totalHeight);\n\t\tthis.setGridHeight(scrollerHeight, isAuto);\n\n\t\t// is the event limit dynamically calculated?\n\t\tif (eventLimit && typeof eventLimit !== 'number') {\n\t\t\tthis.dayGrid.limitRows(eventLimit); // limit the levels after the grid's row heights have been set\n\t\t}\n\n\t\tif (!isAuto && setPotentialScroller(this.scrollerEl, scrollerHeight)) { // using scrollbars?\n\n\t\t\tcompensateScroll(this.headRowEl, getScrollbarWidths(this.scrollerEl));\n\n\t\t\t// doing the scrollbar compensation might have created text overflow which created more height. redo\n\t\t\tscrollerHeight = this.computeScrollerHeight(totalHeight);\n\t\t\tthis.scrollerEl.height(scrollerHeight);\n\t\t}\n\t},\n\n\n\t// Sets the height of just the DayGrid component in this view\n\tsetGridHeight: function(height, isAuto) {\n\t\tif (isAuto) {\n\t\t\tundistributeHeight(this.dayGrid.rowEls); // let the rows be their natural height with no expanding\n\t\t}\n\t\telse {\n\t\t\tdistributeHeight(this.dayGrid.rowEls, height, true); // true = compensate for height-hogging rows\n\t\t}\n\t},\n\n\n\t/* Hit Areas\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// forward all hit-related method calls to dayGrid\n\n\n\tprepareHits: function() {\n\t\tthis.dayGrid.prepareHits();\n\t},\n\n\n\treleaseHits: function() {\n\t\tthis.dayGrid.releaseHits();\n\t},\n\n\n\tqueryHit: function(left, top) {\n\t\treturn this.dayGrid.queryHit(left, top);\n\t},\n\n\n\tgetHitSpan: function(hit) {\n\t\treturn this.dayGrid.getHitSpan(hit);\n\t},\n\n\n\tgetHitEl: function(hit) {\n\t\treturn this.dayGrid.getHitEl(hit);\n\t},\n\n\n\t/* Events\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders the given events onto the view and populates the segments array\n\trenderEvents: function(events) {\n\t\tthis.dayGrid.renderEvents(events);\n\n\t\tthis.updateHeight(); // must compensate for events that overflow the row\n\t},\n\n\n\t// Retrieves all segment objects that are rendered in the view\n\tgetEventSegs: function() {\n\t\treturn this.dayGrid.getEventSegs();\n\t},\n\n\n\t// Unrenders all event elements and clears internal segment data\n\tunrenderEvents: function() {\n\t\tthis.dayGrid.unrenderEvents();\n\n\t\t// we DON'T need to call updateHeight() because:\n\t\t// A) a renderEvents() call always happens after this, which will eventually call updateHeight()\n\t\t// B) in IE8, this causes a flash whenever events are rerendered\n\t},\n\n\n\t/* Dragging (for both events and external elements)\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// A returned value of `true` signals that a mock \"helper\" event has been rendered.\n\trenderDrag: function(dropLocation, seg) {\n\t\treturn this.dayGrid.renderDrag(dropLocation, seg);\n\t},\n\n\n\tunrenderDrag: function() {\n\t\tthis.dayGrid.unrenderDrag();\n\t},\n\n\n\t/* Selection\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of a selection\n\trenderSelection: function(span) {\n\t\tthis.dayGrid.renderSelection(span);\n\t},\n\n\n\t// Unrenders a visual indications of a selection\n\tunrenderSelection: function() {\n\t\tthis.dayGrid.unrenderSelection();\n\t}\n\n});\n\n\n// Methods that will customize the rendering behavior of the BasicView's dayGrid\nvar basicDayGridMethods = {\n\n\n\t// Generates the HTML that will go before the day-of week header cells\n\trenderHeadIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\tif (view.weekNumbersVisible) {\n\t\t\treturn '' +\n\t\t\t\t'<th class=\"fc-week-number ' + view.widgetHeaderClass + '\" ' + view.weekNumberStyleAttr() + '>' +\n\t\t\t\t\t'<span>' + // needed for matchCellWidths\n\t\t\t\t\t\thtmlEscape(view.opt('weekNumberTitle')) +\n\t\t\t\t\t'</span>' +\n\t\t\t\t'</th>';\n\t\t}\n\n\t\treturn '';\n\t},\n\n\n\t// Generates the HTML that will go before content-skeleton cells that display the day/week numbers\n\trenderNumberIntroHtml: function(row) {\n\t\tvar view = this.view;\n\n\t\tif (view.weekNumbersVisible) {\n\t\t\treturn '' +\n\t\t\t\t'<td class=\"fc-week-number\" ' + view.weekNumberStyleAttr() + '>' +\n\t\t\t\t\t'<span>' + // needed for matchCellWidths\n\t\t\t\t\t\tthis.getCellDate(row, 0).format('w') +\n\t\t\t\t\t'</span>' +\n\t\t\t\t'</td>';\n\t\t}\n\n\t\treturn '';\n\t},\n\n\n\t// Generates the HTML that goes before the day bg cells for each day-row\n\trenderBgIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\tif (view.weekNumbersVisible) {\n\t\t\treturn '<td class=\"fc-week-number ' + view.widgetContentClass + '\" ' +\n\t\t\t\tview.weekNumberStyleAttr() + '></td>';\n\t\t}\n\n\t\treturn '';\n\t},\n\n\n\t// Generates the HTML that goes before every other type of row generated by DayGrid.\n\t// Affects helper-skeleton and highlight-skeleton rows.\n\trenderIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\tif (view.weekNumbersVisible) {\n\t\t\treturn '<td class=\"fc-week-number\" ' + view.weekNumberStyleAttr() + '></td>';\n\t\t}\n\n\t\treturn '';\n\t}\n\n};\n\n;;\n\n/* A month view with day cells running in rows (one-per-week) and columns\n----------------------------------------------------------------------------------------------------------------------*/\n\nvar MonthView = FC.MonthView = BasicView.extend({\n\n\t// Produces information about what range to display\n\tcomputeRange: function(date) {\n\t\tvar range = BasicView.prototype.computeRange.call(this, date); // get value from super-method\n\t\tvar rowCnt;\n\n\t\t// ensure 6 weeks\n\t\tif (this.isFixedWeeks()) {\n\t\t\trowCnt = Math.ceil(range.end.diff(range.start, 'weeks', true)); // could be partial weeks due to hiddenDays\n\t\t\trange.end.add(6 - rowCnt, 'weeks');\n\t\t}\n\n\t\treturn range;\n\t},\n\n\n\t// Overrides the default BasicView behavior to have special multi-week auto-height logic\n\tsetGridHeight: function(height, isAuto) {\n\n\t\tisAuto = isAuto || this.opt('weekMode') === 'variable'; // LEGACY: weekMode is deprecated\n\n\t\t// if auto, make the height of each row the height that it would be if there were 6 weeks\n\t\tif (isAuto) {\n\t\t\theight *= this.rowCnt / 6;\n\t\t}\n\n\t\tdistributeHeight(this.dayGrid.rowEls, height, !isAuto); // if auto, don't compensate for height-hogging rows\n\t},\n\n\n\tisFixedWeeks: function() {\n\t\tvar weekMode = this.opt('weekMode'); // LEGACY: weekMode is deprecated\n\t\tif (weekMode) {\n\t\t\treturn weekMode === 'fixed'; // if any other type of weekMode, assume NOT fixed\n\t\t}\n\n\t\treturn this.opt('fixedWeekCount');\n\t}\n\n});\n\n;;\n\nfcViews.basic = {\n\t'class': BasicView\n};\n\nfcViews.basicDay = {\n\ttype: 'basic',\n\tduration: { days: 1 }\n};\n\nfcViews.basicWeek = {\n\ttype: 'basic',\n\tduration: { weeks: 1 }\n};\n\nfcViews.month = {\n\t'class': MonthView,\n\tduration: { months: 1 }, // important for prev/next\n\tdefaults: {\n\t\tfixedWeekCount: true\n\t}\n};\n;;\n\n/* An abstract class for all agenda-related views. Displays one more columns with time slots running vertically.\n----------------------------------------------------------------------------------------------------------------------*/\n// Is a manager for the TimeGrid subcomponent and possibly the DayGrid subcomponent (if allDaySlot is on).\n// Responsible for managing width/height.\n\nvar AgendaView = FC.AgendaView = View.extend({\n\n\ttimeGridClass: TimeGrid, // class used to instantiate the timeGrid. subclasses can override\n\ttimeGrid: null, // the main time-grid subcomponent of this view\n\n\tdayGridClass: DayGrid, // class used to instantiate the dayGrid. subclasses can override\n\tdayGrid: null, // the \"all-day\" subcomponent. if all-day is turned off, this will be null\n\n\taxisWidth: null, // the width of the time axis running down the side\n\n\theadContainerEl: null, // div that hold's the timeGrid's rendered date header\n\tnoScrollRowEls: null, // set of fake row elements that must compensate when scrollerEl has scrollbars\n\n\t// when the time-grid isn't tall enough to occupy the given height, we render an <hr> underneath\n\tbottomRuleEl: null,\n\tbottomRuleHeight: null,\n\n\n\tinitialize: function() {\n\t\tthis.timeGrid = this.instantiateTimeGrid();\n\n\t\tif (this.opt('allDaySlot')) { // should we display the \"all-day\" area?\n\t\t\tthis.dayGrid = this.instantiateDayGrid(); // the all-day subcomponent of this view\n\t\t}\n\t},\n\n\n\t// Instantiates the TimeGrid object this view needs. Draws from this.timeGridClass\n\tinstantiateTimeGrid: function() {\n\t\tvar subclass = this.timeGridClass.extend(agendaTimeGridMethods);\n\n\t\treturn new subclass(this);\n\t},\n\n\n\t// Instantiates the DayGrid object this view might need. Draws from this.dayGridClass\n\tinstantiateDayGrid: function() {\n\t\tvar subclass = this.dayGridClass.extend(agendaDayGridMethods);\n\n\t\treturn new subclass(this);\n\t},\n\n\n\t/* Rendering\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Sets the display range and computes all necessary dates\n\tsetRange: function(range) {\n\t\tView.prototype.setRange.call(this, range); // call the super-method\n\n\t\tthis.timeGrid.setRange(range);\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.setRange(range);\n\t\t}\n\t},\n\n\n\t// Renders the view into `this.el`, which has already been assigned\n\trenderDates: function() {\n\n\t\tthis.el.addClass('fc-agenda-view').html(this.renderSkeletonHtml());\n\t\tthis.renderHead();\n\n\t\t// the element that wraps the time-grid that will probably scroll\n\t\tthis.scrollerEl = this.el.find('.fc-time-grid-container');\n\n\t\tthis.timeGrid.setElement(this.el.find('.fc-time-grid'));\n\t\tthis.timeGrid.renderDates();\n\n\t\t// the <hr> that sometimes displays under the time-grid\n\t\tthis.bottomRuleEl = $('<hr class=\"fc-divider ' + this.widgetHeaderClass + '\"/>')\n\t\t\t.appendTo(this.timeGrid.el); // inject it into the time-grid\n\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.setElement(this.el.find('.fc-day-grid'));\n\t\t\tthis.dayGrid.renderDates();\n\n\t\t\t// have the day-grid extend it's coordinate area over the <hr> dividing the two grids\n\t\t\tthis.dayGrid.bottomCoordPadding = this.dayGrid.el.next('hr').outerHeight();\n\t\t}\n\n\t\tthis.noScrollRowEls = this.el.find('.fc-row:not(.fc-scroller *)'); // fake rows not within the scroller\n\t},\n\n\n\t// render the day-of-week headers\n\trenderHead: function() {\n\t\tthis.headContainerEl =\n\t\t\tthis.el.find('.fc-head-container')\n\t\t\t\t.html(this.timeGrid.renderHeadHtml());\n\t},\n\n\n\t// Unrenders the content of the view. Since we haven't separated skeleton rendering from date rendering,\n\t// always completely kill each grid's rendering.\n\tunrenderDates: function() {\n\t\tthis.timeGrid.unrenderDates();\n\t\tthis.timeGrid.removeElement();\n\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.unrenderDates();\n\t\t\tthis.dayGrid.removeElement();\n\t\t}\n\t},\n\n\n\trenderBusinessHours: function() {\n\t\tthis.timeGrid.renderBusinessHours();\n\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.renderBusinessHours();\n\t\t}\n\t},\n\n\n\t// Builds the HTML skeleton for the view.\n\t// The day-grid and time-grid components will render inside containers defined by this HTML.\n\trenderSkeletonHtml: function() {\n\t\treturn '' +\n\t\t\t'<table>' +\n\t\t\t\t'<thead class=\"fc-head\">' +\n\t\t\t\t\t'<tr>' +\n\t\t\t\t\t\t'<td class=\"fc-head-container ' + this.widgetHeaderClass + '\"></td>' +\n\t\t\t\t\t'</tr>' +\n\t\t\t\t'</thead>' +\n\t\t\t\t'<tbody class=\"fc-body\">' +\n\t\t\t\t\t'<tr>' +\n\t\t\t\t\t\t'<td class=\"' + this.widgetContentClass + '\">' +\n\t\t\t\t\t\t\t(this.dayGrid ?\n\t\t\t\t\t\t\t\t'<div class=\"fc-day-grid\"/>' +\n\t\t\t\t\t\t\t\t'<hr class=\"fc-divider ' + this.widgetHeaderClass + '\"/>' :\n\t\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t\t) +\n\t\t\t\t\t\t\t'<div class=\"fc-time-grid-container\">' +\n\t\t\t\t\t\t\t\t'<div class=\"fc-time-grid\"/>' +\n\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t'</td>' +\n\t\t\t\t\t'</tr>' +\n\t\t\t\t'</tbody>' +\n\t\t\t'</table>';\n\t},\n\n\n\t// Generates an HTML attribute string for setting the width of the axis, if it is known\n\taxisStyleAttr: function() {\n\t\tif (this.axisWidth !== null) {\n\t\t\t return 'style=\"width:' + this.axisWidth + 'px\"';\n\t\t}\n\t\treturn '';\n\t},\n\n\n\t/* Dimensions\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\tupdateSize: function(isResize) {\n\t\tthis.timeGrid.updateSize(isResize);\n\n\t\tView.prototype.updateSize.call(this, isResize); // call the super-method\n\t},\n\n\n\t// Refreshes the horizontal dimensions of the view\n\tupdateWidth: function() {\n\t\t// make all axis cells line up, and record the width so newly created axis cells will have it\n\t\tthis.axisWidth = matchCellWidths(this.el.find('.fc-axis'));\n\t},\n\n\n\t// Adjusts the vertical dimensions of the view to the specified values\n\tsetHeight: function(totalHeight, isAuto) {\n\t\tvar eventLimit;\n\t\tvar scrollerHeight;\n\n\t\tif (this.bottomRuleHeight === null) {\n\t\t\t// calculate the height of the rule the very first time\n\t\t\tthis.bottomRuleHeight = this.bottomRuleEl.outerHeight();\n\t\t}\n\t\tthis.bottomRuleEl.hide(); // .show() will be called later if this <hr> is necessary\n\n\t\t// reset all dimensions back to the original state\n\t\tthis.scrollerEl.css('overflow', '');\n\t\tunsetScroller(this.scrollerEl);\n\t\tuncompensateScroll(this.noScrollRowEls);\n\n\t\t// limit number of events in the all-day area\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.removeSegPopover(); // kill the \"more\" popover if displayed\n\n\t\t\teventLimit = this.opt('eventLimit');\n\t\t\tif (eventLimit && typeof eventLimit !== 'number') {\n\t\t\t\teventLimit = AGENDA_ALL_DAY_EVENT_LIMIT; // make sure \"auto\" goes to a real number\n\t\t\t}\n\t\t\tif (eventLimit) {\n\t\t\t\tthis.dayGrid.limitRows(eventLimit);\n\t\t\t}\n\t\t}\n\n\t\tif (!isAuto) { // should we force dimensions of the scroll container, or let the contents be natural height?\n\n\t\t\tscrollerHeight = this.computeScrollerHeight(totalHeight);\n\t\t\tif (setPotentialScroller(this.scrollerEl, scrollerHeight)) { // using scrollbars?\n\n\t\t\t\t// make the all-day and header rows lines up\n\t\t\t\tcompensateScroll(this.noScrollRowEls, getScrollbarWidths(this.scrollerEl));\n\n\t\t\t\t// the scrollbar compensation might have changed text flow, which might affect height, so recalculate\n\t\t\t\t// and reapply the desired height to the scroller.\n\t\t\t\tscrollerHeight = this.computeScrollerHeight(totalHeight);\n\t\t\t\tthis.scrollerEl.height(scrollerHeight);\n\t\t\t}\n\t\t\telse { // no scrollbars\n\t\t\t\t// still, force a height and display the bottom rule (marks the end of day)\n\t\t\t\tthis.scrollerEl.height(scrollerHeight).css('overflow', 'hidden'); // in case <hr> goes outside\n\t\t\t\tthis.bottomRuleEl.show();\n\t\t\t}\n\t\t}\n\t},\n\n\n\t// Computes the initial pre-configured scroll state prior to allowing the user to change it\n\tcomputeInitialScroll: function() {\n\t\tvar scrollTime = moment.duration(this.opt('scrollTime'));\n\t\tvar top = this.timeGrid.computeTimeTop(scrollTime);\n\n\t\t// zoom can give weird floating-point values. rather scroll a little bit further\n\t\ttop = Math.ceil(top);\n\n\t\tif (top) {\n\t\t\ttop++; // to overcome top border that slots beyond the first have. looks better\n\t\t}\n\n\t\treturn top;\n\t},\n\n\n\t/* Hit Areas\n\t------------------------------------------------------------------------------------------------------------------*/\n\t// forward all hit-related method calls to the grids (dayGrid might not be defined)\n\n\n\tprepareHits: function() {\n\t\tthis.timeGrid.prepareHits();\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.prepareHits();\n\t\t}\n\t},\n\n\n\treleaseHits: function() {\n\t\tthis.timeGrid.releaseHits();\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.releaseHits();\n\t\t}\n\t},\n\n\n\tqueryHit: function(left, top) {\n\t\tvar hit = this.timeGrid.queryHit(left, top);\n\n\t\tif (!hit && this.dayGrid) {\n\t\t\thit = this.dayGrid.queryHit(left, top);\n\t\t}\n\n\t\treturn hit;\n\t},\n\n\n\tgetHitSpan: function(hit) {\n\t\t// TODO: hit.component is set as a hack to identify where the hit came from\n\t\treturn hit.component.getHitSpan(hit);\n\t},\n\n\n\tgetHitEl: function(hit) {\n\t\t// TODO: hit.component is set as a hack to identify where the hit came from\n\t\treturn hit.component.getHitEl(hit);\n\t},\n\n\n\t/* Events\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders events onto the view and populates the View's segment array\n\trenderEvents: function(events) {\n\t\tvar dayEvents = [];\n\t\tvar timedEvents = [];\n\t\tvar daySegs = [];\n\t\tvar timedSegs;\n\t\tvar i;\n\n\t\t// separate the events into all-day and timed\n\t\tfor (i = 0; i < events.length; i++) {\n\t\t\tif (events[i].allDay) {\n\t\t\t\tdayEvents.push(events[i]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttimedEvents.push(events[i]);\n\t\t\t}\n\t\t}\n\n\t\t// render the events in the subcomponents\n\t\ttimedSegs = this.timeGrid.renderEvents(timedEvents);\n\t\tif (this.dayGrid) {\n\t\t\tdaySegs = this.dayGrid.renderEvents(dayEvents);\n\t\t}\n\n\t\t// the all-day area is flexible and might have a lot of events, so shift the height\n\t\tthis.updateHeight();\n\t},\n\n\n\t// Retrieves all segment objects that are rendered in the view\n\tgetEventSegs: function() {\n\t\treturn this.timeGrid.getEventSegs().concat(\n\t\t\tthis.dayGrid ? this.dayGrid.getEventSegs() : []\n\t\t);\n\t},\n\n\n\t// Unrenders all event elements and clears internal segment data\n\tunrenderEvents: function() {\n\n\t\t// unrender the events in the subcomponents\n\t\tthis.timeGrid.unrenderEvents();\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.unrenderEvents();\n\t\t}\n\n\t\t// we DON'T need to call updateHeight() because:\n\t\t// A) a renderEvents() call always happens after this, which will eventually call updateHeight()\n\t\t// B) in IE8, this causes a flash whenever events are rerendered\n\t},\n\n\n\t/* Dragging (for events and external elements)\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// A returned value of `true` signals that a mock \"helper\" event has been rendered.\n\trenderDrag: function(dropLocation, seg) {\n\t\tif (dropLocation.start.hasTime()) {\n\t\t\treturn this.timeGrid.renderDrag(dropLocation, seg);\n\t\t}\n\t\telse if (this.dayGrid) {\n\t\t\treturn this.dayGrid.renderDrag(dropLocation, seg);\n\t\t}\n\t},\n\n\n\tunrenderDrag: function() {\n\t\tthis.timeGrid.unrenderDrag();\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.unrenderDrag();\n\t\t}\n\t},\n\n\n\t/* Selection\n\t------------------------------------------------------------------------------------------------------------------*/\n\n\n\t// Renders a visual indication of a selection\n\trenderSelection: function(span) {\n\t\tif (span.start.hasTime() || span.end.hasTime()) {\n\t\t\tthis.timeGrid.renderSelection(span);\n\t\t}\n\t\telse if (this.dayGrid) {\n\t\t\tthis.dayGrid.renderSelection(span);\n\t\t}\n\t},\n\n\n\t// Unrenders a visual indications of a selection\n\tunrenderSelection: function() {\n\t\tthis.timeGrid.unrenderSelection();\n\t\tif (this.dayGrid) {\n\t\t\tthis.dayGrid.unrenderSelection();\n\t\t}\n\t}\n\n});\n\n\n// Methods that will customize the rendering behavior of the AgendaView's timeGrid\nvar agendaTimeGridMethods = {\n\n\n\t// Generates the HTML that will go before the day-of week header cells\n\trenderHeadIntroHtml: function() {\n\t\tvar view = this.view;\n\t\tvar weekText;\n\n\t\tif (view.opt('weekNumbers')) {\n\t\t\tweekText = this.start.format(view.opt('smallWeekFormat'));\n\n\t\t\treturn '' +\n\t\t\t\t'<th class=\"fc-axis fc-week-number ' + view.widgetHeaderClass + '\" ' + view.axisStyleAttr() + '>' +\n\t\t\t\t\t'<span>' + // needed for matchCellWidths\n\t\t\t\t\t\thtmlEscape(weekText) +\n\t\t\t\t\t'</span>' +\n\t\t\t\t'</th>';\n\t\t}\n\t\telse {\n\t\t\treturn '<th class=\"fc-axis ' + view.widgetHeaderClass + '\" ' + view.axisStyleAttr() + '></th>';\n\t\t}\n\t},\n\n\n\t// Generates the HTML that goes before the bg of the TimeGrid slot area. Long vertical column.\n\trenderBgIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\treturn '<td class=\"fc-axis ' + view.widgetContentClass + '\" ' + view.axisStyleAttr() + '></td>';\n\t},\n\n\n\t// Generates the HTML that goes before all other types of cells.\n\t// Affects content-skeleton, helper-skeleton, highlight-skeleton for both the time-grid and day-grid.\n\trenderIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\treturn '<td class=\"fc-axis\" ' + view.axisStyleAttr() + '></td>';\n\t}\n\n};\n\n\n// Methods that will customize the rendering behavior of the AgendaView's dayGrid\nvar agendaDayGridMethods = {\n\n\n\t// Generates the HTML that goes before the all-day cells\n\trenderBgIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\treturn '' +\n\t\t\t'<td class=\"fc-axis ' + view.widgetContentClass + '\" ' + view.axisStyleAttr() + '>' +\n\t\t\t\t'<span>' + // needed for matchCellWidths\n\t\t\t\t\t(view.opt('allDayHtml') || htmlEscape(view.opt('allDayText'))) +\n\t\t\t\t'</span>' +\n\t\t\t'</td>';\n\t},\n\n\n\t// Generates the HTML that goes before all other types of cells.\n\t// Affects content-skeleton, helper-skeleton, highlight-skeleton for both the time-grid and day-grid.\n\trenderIntroHtml: function() {\n\t\tvar view = this.view;\n\n\t\treturn '<td class=\"fc-axis\" ' + view.axisStyleAttr() + '></td>';\n\t}\n\n};\n\n;;\n\nvar AGENDA_ALL_DAY_EVENT_LIMIT = 5;\n\n// potential nice values for the slot-duration and interval-duration\n// from largest to smallest\nvar AGENDA_STOCK_SUB_DURATIONS = [\n\t{ hours: 1 },\n\t{ minutes: 30 },\n\t{ minutes: 15 },\n\t{ seconds: 30 },\n\t{ seconds: 15 }\n];\n\nfcViews.agenda = {\n\t'class': AgendaView,\n\tdefaults: {\n\t\tallDaySlot: true,\n\t\tallDayText: 'all-day',\n\t\tslotDuration: '00:30:00',\n\t\tminTime: '00:00:00',\n\t\tmaxTime: '24:00:00',\n\t\tslotEventOverlap: true // a bad name. confused with overlap/constraint system\n\t}\n};\n\nfcViews.agendaDay = {\n\ttype: 'agenda',\n\tduration: { days: 1 }\n};\n\nfcViews.agendaWeek = {\n\ttype: 'agenda',\n\tduration: { weeks: 1 }\n};\n;;\n\nreturn FC; // export for Node/CommonJS\n});","\"use strict\";\n(function(root, factory) {\n if(typeof exports === 'object') {\n module.exports = factory();\n }\n else if(typeof define === 'function' && define.amd) {\n define(['jquery', 'googlemaps!'], factory);\n }\n else {\n root.GMaps = factory();\n }\n\n\n}(this, function() {\n\n/*!\n * GMaps.js v0.4.21\n * http://hpneo.github.com/gmaps/\n *\n * Copyright 2015, Gustavo Leon\n * Released under the MIT License.\n */\n\nvar extend_object = function(obj, new_obj) {\n var name;\n\n if (obj === new_obj) {\n return obj;\n }\n\n for (name in new_obj) {\n obj[name] = new_obj[name];\n }\n\n return obj;\n};\n\nvar replace_object = function(obj, replace) {\n var name;\n\n if (obj === replace) {\n return obj;\n }\n\n for (name in replace) {\n if (obj[name] != undefined) {\n obj[name] = replace[name];\n }\n }\n\n return obj;\n};\n\nvar array_map = function(array, callback) {\n var original_callback_params = Array.prototype.slice.call(arguments, 2),\n array_return = [],\n array_length = array.length,\n i;\n\n if (Array.prototype.map && array.map === Array.prototype.map) {\n array_return = Array.prototype.map.call(array, function(item) {\n var callback_params = original_callback_params.slice(0);\n callback_params.splice(0, 0, item);\n\n return callback.apply(this, callback_params);\n });\n }\n else {\n for (i = 0; i < array_length; i++) {\n callback_params = original_callback_params;\n callback_params.splice(0, 0, array[i]);\n array_return.push(callback.apply(this, callback_params));\n }\n }\n\n return array_return;\n};\n\nvar array_flat = function(array) {\n var new_array = [],\n i;\n\n for (i = 0; i < array.length; i++) {\n new_array = new_array.concat(array[i]);\n }\n\n return new_array;\n};\n\nvar coordsToLatLngs = function(coords, useGeoJSON) {\n var first_coord = coords[0],\n second_coord = coords[1];\n\n if (useGeoJSON) {\n first_coord = coords[1];\n second_coord = coords[0];\n }\n\n return new google.maps.LatLng(first_coord, second_coord);\n};\n\nvar arrayToLatLng = function(coords, useGeoJSON) {\n var i;\n\n for (i = 0; i < coords.length; i++) {\n if (!(coords[i] instanceof google.maps.LatLng)) {\n if (coords[i].length > 0 && typeof(coords[i][0]) === \"object\") {\n coords[i] = arrayToLatLng(coords[i], useGeoJSON);\n }\n else {\n coords[i] = coordsToLatLngs(coords[i], useGeoJSON);\n }\n }\n }\n\n return coords;\n};\n\nvar getElementsByClassName = function (class_name, context) {\n\n var element,\n _class = class_name.replace('.', '');\n\n if ('jQuery' in this && context) {\n element = $(\".\" + _class, context)[0];\n } else {\n element = document.getElementsByClassName(_class)[0];\n }\n return element;\n\n};\n\nvar getElementById = function(id, context) {\n var element,\n id = id.replace('#', '');\n\n if ('jQuery' in window && context) {\n element = $('#' + id, context)[0];\n } else {\n element = document.getElementById(id);\n };\n\n return element;\n};\n\nvar findAbsolutePosition = function(obj) {\n var curleft = 0,\n curtop = 0;\n\n if (obj.offsetParent) {\n do {\n curleft += obj.offsetLeft;\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n }\n\n return [curleft, curtop];\n};\n\nvar GMaps = (function(global) {\n \"use strict\";\n\n if (!(typeof window.google === 'object' && window.google.maps)) {\n if (typeof window.console === 'object' && window.console.error) {\n console.error('Google Maps API is required. Please register the following JavaScript library https://maps.googleapis.com/maps/api/js.');\n }\n\n return function() {};\n }\n\n var doc = document;\n\n var GMaps = function(options) {\n if (!this) return new GMaps(options);\n\n options.zoom = options.zoom || 15;\n options.mapType = options.mapType || 'roadmap';\n\n var valueOrDefault = function(value, defaultValue) {\n return value === undefined ? defaultValue : value;\n };\n\n var self = this,\n i,\n events_that_hide_context_menu = [\n 'bounds_changed', 'center_changed', 'click', 'dblclick', 'drag',\n 'dragend', 'dragstart', 'idle', 'maptypeid_changed', 'projection_changed',\n 'resize', 'tilesloaded', 'zoom_changed'\n ],\n events_that_doesnt_hide_context_menu = ['mousemove', 'mouseout', 'mouseover'],\n options_to_be_deleted = ['el', 'lat', 'lng', 'mapType', 'width', 'height', 'markerClusterer', 'enableNewStyle'],\n identifier = options.el || options.div,\n markerClustererFunction = options.markerClusterer,\n mapType = google.maps.MapTypeId[options.mapType.toUpperCase()],\n map_center = new google.maps.LatLng(options.lat, options.lng),\n zoomControl = valueOrDefault(options.zoomControl, true),\n zoomControlOpt = options.zoomControlOpt || {\n style: 'DEFAULT',\n position: 'TOP_LEFT'\n },\n zoomControlStyle = zoomControlOpt.style || 'DEFAULT',\n zoomControlPosition = zoomControlOpt.position || 'TOP_LEFT',\n panControl = valueOrDefault(options.panControl, true),\n mapTypeControl = valueOrDefault(options.mapTypeControl, true),\n scaleControl = valueOrDefault(options.scaleControl, true),\n streetViewControl = valueOrDefault(options.streetViewControl, true),\n overviewMapControl = valueOrDefault(overviewMapControl, true),\n map_options = {},\n map_base_options = {\n zoom: this.zoom,\n center: map_center,\n mapTypeId: mapType\n },\n map_controls_options = {\n panControl: panControl,\n zoomControl: zoomControl,\n zoomControlOptions: {\n style: google.maps.ZoomControlStyle[zoomControlStyle],\n position: google.maps.ControlPosition[zoomControlPosition]\n },\n mapTypeControl: mapTypeControl,\n scaleControl: scaleControl,\n streetViewControl: streetViewControl,\n overviewMapControl: overviewMapControl\n };\n\n if (typeof(options.el) === 'string' || typeof(options.div) === 'string') {\n\n if (identifier.indexOf(\"#\") > -1) {\n this.el = getElementById(identifier, options.context);\n } else {\n this.el = getElementsByClassName.apply(this, [identifier, options.context]);\n }\n\n } else {\n this.el = identifier;\n }\n\n if (typeof(this.el) === 'undefined' || this.el === null) {\n throw 'No element defined.';\n }\n\n window.context_menu = window.context_menu || {};\n window.context_menu[self.el.id] = {};\n\n this.controls = [];\n this.overlays = [];\n this.layers = []; // array with kml/georss and fusiontables layers, can be as many\n this.singleLayers = {}; // object with the other layers, only one per layer\n this.markers = [];\n this.polylines = [];\n this.routes = [];\n this.polygons = [];\n this.infoWindow = null;\n this.overlay_el = null;\n this.zoom = options.zoom;\n this.registered_events = {};\n\n this.el.style.width = options.width || this.el.scrollWidth || this.el.offsetWidth;\n this.el.style.height = options.height || this.el.scrollHeight || this.el.offsetHeight;\n\n google.maps.visualRefresh = options.enableNewStyle;\n\n for (i = 0; i < options_to_be_deleted.length; i++) {\n delete options[options_to_be_deleted[i]];\n }\n\n if(options.disableDefaultUI != true) {\n map_base_options = extend_object(map_base_options, map_controls_options);\n }\n\n map_options = extend_object(map_base_options, options);\n\n for (i = 0; i < events_that_hide_context_menu.length; i++) {\n delete map_options[events_that_hide_context_menu[i]];\n }\n\n for (i = 0; i < events_that_doesnt_hide_context_menu.length; i++) {\n delete map_options[events_that_doesnt_hide_context_menu[i]];\n }\n\n this.map = new google.maps.Map(this.el, map_options);\n\n if (markerClustererFunction) {\n this.markerClusterer = markerClustererFunction.apply(this, [this.map]);\n }\n\n var buildContextMenuHTML = function(control, e) {\n var html = '',\n options = window.context_menu[self.el.id][control];\n\n for (var i in options){\n if (options.hasOwnProperty(i)) {\n var option = options[i];\n\n html += '<li><a id=\"' + control + '_' + i + '\" href=\"#\">' + option.title + '</a></li>';\n }\n }\n\n if (!getElementById('gmaps_context_menu')) return;\n\n var context_menu_element = getElementById('gmaps_context_menu');\n\n context_menu_element.innerHTML = html;\n\n var context_menu_items = context_menu_element.getElementsByTagName('a'),\n context_menu_items_count = context_menu_items.length,\n i;\n\n for (i = 0; i < context_menu_items_count; i++) {\n var context_menu_item = context_menu_items[i];\n\n var assign_menu_item_action = function(ev){\n ev.preventDefault();\n\n options[this.id.replace(control + '_', '')].action.apply(self, [e]);\n self.hideContextMenu();\n };\n\n google.maps.event.clearListeners(context_menu_item, 'click');\n google.maps.event.addDomListenerOnce(context_menu_item, 'click', assign_menu_item_action, false);\n }\n\n var position = findAbsolutePosition.apply(this, [self.el]),\n left = position[0] + e.pixel.x - 15,\n top = position[1] + e.pixel.y- 15;\n\n context_menu_element.style.left = left + \"px\";\n context_menu_element.style.top = top + \"px\";\n\n // context_menu_element.style.display = 'block';\n };\n\n this.buildContextMenu = function(control, e) {\n if (control === 'marker') {\n e.pixel = {};\n\n var overlay = new google.maps.OverlayView();\n overlay.setMap(self.map);\n\n overlay.draw = function() {\n var projection = overlay.getProjection(),\n position = e.marker.getPosition();\n\n e.pixel = projection.fromLatLngToContainerPixel(position);\n\n buildContextMenuHTML(control, e);\n };\n }\n else {\n buildContextMenuHTML(control, e);\n }\n\n var context_menu_element = getElementById('gmaps_context_menu');\n\n setTimeout(function() {\n context_menu_element.style.display = 'block';\n }, 0);\n };\n\n this.setContextMenu = function(options) {\n window.context_menu[self.el.id][options.control] = {};\n\n var i,\n ul = doc.createElement('ul');\n\n for (i in options.options) {\n if (options.options.hasOwnProperty(i)) {\n var option = options.options[i];\n\n window.context_menu[self.el.id][options.control][option.name] = {\n title: option.title,\n action: option.action\n };\n }\n }\n\n ul.id = 'gmaps_context_menu';\n ul.style.display = 'none';\n ul.style.position = 'absolute';\n ul.style.minWidth = '100px';\n ul.style.background = 'white';\n ul.style.listStyle = 'none';\n ul.style.padding = '8px';\n ul.style.boxShadow = '2px 2px 6px #ccc';\n\n if (!getElementById('gmaps_context_menu')) {\n doc.body.appendChild(ul);\n }\n\n var context_menu_element = getElementById('gmaps_context_menu');\n\n google.maps.event.addDomListener(context_menu_element, 'mouseout', function(ev) {\n if (!ev.relatedTarget || !this.contains(ev.relatedTarget)) {\n window.setTimeout(function(){\n context_menu_element.style.display = 'none';\n }, 400);\n }\n }, false);\n };\n\n this.hideContextMenu = function() {\n var context_menu_element = getElementById('gmaps_context_menu');\n\n if (context_menu_element) {\n context_menu_element.style.display = 'none';\n }\n };\n\n var setupListener = function(object, name) {\n google.maps.event.addListener(object, name, function(e){\n if (e == undefined) {\n e = this;\n }\n\n options[name].apply(this, [e]);\n\n self.hideContextMenu();\n });\n };\n\n //google.maps.event.addListener(this.map, 'idle', this.hideContextMenu);\n google.maps.event.addListener(this.map, 'zoom_changed', this.hideContextMenu);\n\n for (var ev = 0; ev < events_that_hide_context_menu.length; ev++) {\n var name = events_that_hide_context_menu[ev];\n\n if (name in options) {\n setupListener(this.map, name);\n }\n }\n\n for (var ev = 0; ev < events_that_doesnt_hide_context_menu.length; ev++) {\n var name = events_that_doesnt_hide_context_menu[ev];\n\n if (name in options) {\n setupListener(this.map, name);\n }\n }\n\n google.maps.event.addListener(this.map, 'rightclick', function(e) {\n if (options.rightclick) {\n options.rightclick.apply(this, [e]);\n }\n\n if(window.context_menu[self.el.id]['map'] != undefined) {\n self.buildContextMenu('map', e);\n }\n });\n\n this.refresh = function() {\n google.maps.event.trigger(this.map, 'resize');\n };\n\n this.fitZoom = function() {\n var latLngs = [],\n markers_length = this.markers.length,\n i;\n\n for (i = 0; i < markers_length; i++) {\n if(typeof(this.markers[i].visible) === 'boolean' && this.markers[i].visible) {\n latLngs.push(this.markers[i].getPosition());\n }\n }\n\n this.fitLatLngBounds(latLngs);\n };\n\n this.fitLatLngBounds = function(latLngs) {\n var total = latLngs.length,\n bounds = new google.maps.LatLngBounds(),\n i;\n\n for(i = 0; i < total; i++) {\n bounds.extend(latLngs[i]);\n }\n\n this.map.fitBounds(bounds);\n };\n\n this.setCenter = function(lat, lng, callback) {\n this.map.panTo(new google.maps.LatLng(lat, lng));\n\n if (callback) {\n callback();\n }\n };\n\n this.getElement = function() {\n return this.el;\n };\n\n this.zoomIn = function(value) {\n value = value || 1;\n\n this.zoom = this.map.getZoom() + value;\n this.map.setZoom(this.zoom);\n };\n\n this.zoomOut = function(value) {\n value = value || 1;\n\n this.zoom = this.map.getZoom() - value;\n this.map.setZoom(this.zoom);\n };\n\n var native_methods = [],\n method;\n\n for (method in this.map) {\n if (typeof(this.map[method]) == 'function' && !this[method]) {\n native_methods.push(method);\n }\n }\n\n for (i = 0; i < native_methods.length; i++) {\n (function(gmaps, scope, method_name) {\n gmaps[method_name] = function(){\n return scope[method_name].apply(scope, arguments);\n };\n })(this, this.map, native_methods[i]);\n }\n };\n\n return GMaps;\n})(this);\n\nGMaps.prototype.createControl = function(options) {\n var control = document.createElement('div');\n\n control.style.cursor = 'pointer';\n \n if (options.disableDefaultStyles !== true) {\n control.style.fontFamily = 'Roboto, Arial, sans-serif';\n control.style.fontSize = '11px';\n control.style.boxShadow = 'rgba(0, 0, 0, 0.298039) 0px 1px 4px -1px';\n }\n\n for (var option in options.style) {\n control.style[option] = options.style[option];\n }\n\n if (options.id) {\n control.id = options.id;\n }\n \n if (options.title) {\n control.title = options.title;\n }\n\n if (options.classes) {\n control.className = options.classes;\n }\n\n if (options.content) {\n if (typeof options.content === 'string') {\n control.innerHTML = options.content;\n }\n else if (options.content instanceof HTMLElement) {\n control.appendChild(options.content);\n }\n }\n\n if (options.position) {\n control.position = google.maps.ControlPosition[options.position.toUpperCase()];\n }\n\n for (var ev in options.events) {\n (function(object, name) {\n google.maps.event.addDomListener(object, name, function(){\n options.events[name].apply(this, [this]);\n });\n })(control, ev);\n }\n\n control.index = 1;\n\n return control;\n};\n\nGMaps.prototype.addControl = function(options) {\n var control = this.createControl(options);\n \n this.controls.push(control);\n this.map.controls[control.position].push(control);\n\n return control;\n};\n\nGMaps.prototype.removeControl = function(control) {\n var position = null,\n i;\n\n for (i = 0; i < this.controls.length; i++) {\n if (this.controls[i] == control) {\n position = this.controls[i].position;\n this.controls.splice(i, 1);\n }\n }\n\n if (position) {\n for (i = 0; i < this.map.controls.length; i++) {\n var controlsForPosition = this.map.controls[control.position];\n\n if (controlsForPosition.getAt(i) == control) {\n controlsForPosition.removeAt(i);\n\n break;\n }\n }\n }\n\n return control;\n};\n\nGMaps.prototype.createMarker = function(options) {\n if (options.lat == undefined && options.lng == undefined && options.position == undefined) {\n throw 'No latitude or longitude defined.';\n }\n\n var self = this,\n details = options.details,\n fences = options.fences,\n outside = options.outside,\n base_options = {\n position: new google.maps.LatLng(options.lat, options.lng),\n map: null\n },\n marker_options = extend_object(base_options, options);\n\n delete marker_options.lat;\n delete marker_options.lng;\n delete marker_options.fences;\n delete marker_options.outside;\n\n var marker = new google.maps.Marker(marker_options);\n\n marker.fences = fences;\n\n if (options.infoWindow) {\n marker.infoWindow = new google.maps.InfoWindow(options.infoWindow);\n\n var info_window_events = ['closeclick', 'content_changed', 'domready', 'position_changed', 'zindex_changed'];\n\n for (var ev = 0; ev < info_window_events.length; ev++) {\n (function(object, name) {\n if (options.infoWindow[name]) {\n google.maps.event.addListener(object, name, function(e){\n options.infoWindow[name].apply(this, [e]);\n });\n }\n })(marker.infoWindow, info_window_events[ev]);\n }\n }\n\n var marker_events = ['animation_changed', 'clickable_changed', 'cursor_changed', 'draggable_changed', 'flat_changed', 'icon_changed', 'position_changed', 'shadow_changed', 'shape_changed', 'title_changed', 'visible_changed', 'zindex_changed'];\n\n var marker_events_with_mouse = ['dblclick', 'drag', 'dragend', 'dragstart', 'mousedown', 'mouseout', 'mouseover', 'mouseup'];\n\n for (var ev = 0; ev < marker_events.length; ev++) {\n (function(object, name) {\n if (options[name]) {\n google.maps.event.addListener(object, name, function(){\n options[name].apply(this, [this]);\n });\n }\n })(marker, marker_events[ev]);\n }\n\n for (var ev = 0; ev < marker_events_with_mouse.length; ev++) {\n (function(map, object, name) {\n if (options[name]) {\n google.maps.event.addListener(object, name, function(me){\n if(!me.pixel){\n me.pixel = map.getProjection().fromLatLngToPoint(me.latLng)\n }\n \n options[name].apply(this, [me]);\n });\n }\n })(this.map, marker, marker_events_with_mouse[ev]);\n }\n\n google.maps.event.addListener(marker, 'click', function() {\n this.details = details;\n\n if (options.click) {\n options.click.apply(this, [this]);\n }\n\n if (marker.infoWindow) {\n self.hideInfoWindows();\n marker.infoWindow.open(self.map, marker);\n }\n });\n\n google.maps.event.addListener(marker, 'rightclick', function(e) {\n e.marker = this;\n\n if (options.rightclick) {\n options.rightclick.apply(this, [e]);\n }\n\n if (window.context_menu[self.el.id]['marker'] != undefined) {\n self.buildContextMenu('marker', e);\n }\n });\n\n if (marker.fences) {\n google.maps.event.addListener(marker, 'dragend', function() {\n self.checkMarkerGeofence(marker, function(m, f) {\n outside(m, f);\n });\n });\n }\n\n return marker;\n};\n\nGMaps.prototype.addMarker = function(options) {\n var marker;\n if(options.hasOwnProperty('gm_accessors_')) {\n // Native google.maps.Marker object\n marker = options;\n }\n else {\n if ((options.hasOwnProperty('lat') && options.hasOwnProperty('lng')) || options.position) {\n marker = this.createMarker(options);\n }\n else {\n throw 'No latitude or longitude defined.';\n }\n }\n\n marker.setMap(this.map);\n\n if(this.markerClusterer) {\n this.markerClusterer.addMarker(marker);\n }\n\n this.markers.push(marker);\n\n GMaps.fire('marker_added', marker, this);\n\n return marker;\n};\n\nGMaps.prototype.addMarkers = function(array) {\n for (var i = 0, marker; marker=array[i]; i++) {\n this.addMarker(marker);\n }\n\n return this.markers;\n};\n\nGMaps.prototype.hideInfoWindows = function() {\n for (var i = 0, marker; marker = this.markers[i]; i++){\n if (marker.infoWindow) {\n marker.infoWindow.close();\n }\n }\n};\n\nGMaps.prototype.removeMarker = function(marker) {\n for (var i = 0; i < this.markers.length; i++) {\n if (this.markers[i] === marker) {\n this.markers[i].setMap(null);\n this.markers.splice(i, 1);\n\n if(this.markerClusterer) {\n this.markerClusterer.removeMarker(marker);\n }\n\n GMaps.fire('marker_removed', marker, this);\n\n break;\n }\n }\n\n return marker;\n};\n\nGMaps.prototype.removeMarkers = function (collection) {\n var new_markers = [];\n\n if (typeof collection == 'undefined') {\n for (var i = 0; i < this.markers.length; i++) {\n var marker = this.markers[i];\n marker.setMap(null);\n\n if(this.markerClusterer) {\n this.markerClusterer.removeMarker(marker);\n }\n\n GMaps.fire('marker_removed', marker, this);\n }\n \n this.markers = new_markers;\n }\n else {\n for (var i = 0; i < collection.length; i++) {\n var index = this.markers.indexOf(collection[i]);\n\n if (index > -1) {\n var marker = this.markers[index];\n marker.setMap(null);\n\n if(this.markerClusterer) {\n this.markerClusterer.removeMarker(marker);\n }\n\n GMaps.fire('marker_removed', marker, this);\n }\n }\n\n for (var i = 0; i < this.markers.length; i++) {\n var marker = this.markers[i];\n if (marker.getMap() != null) {\n new_markers.push(marker);\n }\n }\n\n this.markers = new_markers;\n }\n};\n\nGMaps.prototype.drawOverlay = function(options) {\n var overlay = new google.maps.OverlayView(),\n auto_show = true;\n\n overlay.setMap(this.map);\n\n if (options.auto_show != null) {\n auto_show = options.auto_show;\n }\n\n overlay.onAdd = function() {\n var el = document.createElement('div');\n\n el.style.borderStyle = \"none\";\n el.style.borderWidth = \"0px\";\n el.style.position = \"absolute\";\n el.style.zIndex = 100;\n el.innerHTML = options.content;\n\n overlay.el = el;\n\n if (!options.layer) {\n options.layer = 'overlayLayer';\n }\n \n var panes = this.getPanes(),\n overlayLayer = panes[options.layer],\n stop_overlay_events = ['contextmenu', 'DOMMouseScroll', 'dblclick', 'mousedown'];\n\n overlayLayer.appendChild(el);\n\n for (var ev = 0; ev < stop_overlay_events.length; ev++) {\n (function(object, name) {\n google.maps.event.addDomListener(object, name, function(e){\n if (navigator.userAgent.toLowerCase().indexOf('msie') != -1 && document.all) {\n e.cancelBubble = true;\n e.returnValue = false;\n }\n else {\n e.stopPropagation();\n }\n });\n })(el, stop_overlay_events[ev]);\n }\n\n if (options.click) {\n panes.overlayMouseTarget.appendChild(overlay.el);\n google.maps.event.addDomListener(overlay.el, 'click', function() {\n options.click.apply(overlay, [overlay]);\n });\n }\n\n google.maps.event.trigger(this, 'ready');\n };\n\n overlay.draw = function() {\n var projection = this.getProjection(),\n pixel = projection.fromLatLngToDivPixel(new google.maps.LatLng(options.lat, options.lng));\n\n options.horizontalOffset = options.horizontalOffset || 0;\n options.verticalOffset = options.verticalOffset || 0;\n\n var el = overlay.el,\n content = el.children[0],\n content_height = content.clientHeight,\n content_width = content.clientWidth;\n\n switch (options.verticalAlign) {\n case 'top':\n el.style.top = (pixel.y - content_height + options.verticalOffset) + 'px';\n break;\n default:\n case 'middle':\n el.style.top = (pixel.y - (content_height / 2) + options.verticalOffset) + 'px';\n break;\n case 'bottom':\n el.style.top = (pixel.y + options.verticalOffset) + 'px';\n break;\n }\n\n switch (options.horizontalAlign) {\n case 'left':\n el.style.left = (pixel.x - content_width + options.horizontalOffset) + 'px';\n break;\n default:\n case 'center':\n el.style.left = (pixel.x - (content_width / 2) + options.horizontalOffset) + 'px';\n break;\n case 'right':\n el.style.left = (pixel.x + options.horizontalOffset) + 'px';\n break;\n }\n\n el.style.display = auto_show ? 'block' : 'none';\n\n if (!auto_show) {\n options.show.apply(this, [el]);\n }\n };\n\n overlay.onRemove = function() {\n var el = overlay.el;\n\n if (options.remove) {\n options.remove.apply(this, [el]);\n }\n else {\n overlay.el.parentNode.removeChild(overlay.el);\n overlay.el = null;\n }\n };\n\n this.overlays.push(overlay);\n return overlay;\n};\n\nGMaps.prototype.removeOverlay = function(overlay) {\n for (var i = 0; i < this.overlays.length; i++) {\n if (this.overlays[i] === overlay) {\n this.overlays[i].setMap(null);\n this.overlays.splice(i, 1);\n\n break;\n }\n }\n};\n\nGMaps.prototype.removeOverlays = function() {\n for (var i = 0, item; item = this.overlays[i]; i++) {\n item.setMap(null);\n }\n\n this.overlays = [];\n};\n\nGMaps.prototype.drawPolyline = function(options) {\n var path = [],\n points = options.path;\n\n if (points.length) {\n if (points[0][0] === undefined) {\n path = points;\n }\n else {\n for (var i = 0, latlng; latlng = points[i]; i++) {\n path.push(new google.maps.LatLng(latlng[0], latlng[1]));\n }\n }\n }\n\n var polyline_options = {\n map: this.map,\n path: path,\n strokeColor: options.strokeColor,\n strokeOpacity: options.strokeOpacity,\n strokeWeight: options.strokeWeight,\n geodesic: options.geodesic,\n clickable: true,\n editable: false,\n visible: true\n };\n\n if (options.hasOwnProperty(\"clickable\")) {\n polyline_options.clickable = options.clickable;\n }\n\n if (options.hasOwnProperty(\"editable\")) {\n polyline_options.editable = options.editable;\n }\n\n if (options.hasOwnProperty(\"icons\")) {\n polyline_options.icons = options.icons;\n }\n\n if (options.hasOwnProperty(\"zIndex\")) {\n polyline_options.zIndex = options.zIndex;\n }\n\n var polyline = new google.maps.Polyline(polyline_options);\n\n var polyline_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];\n\n for (var ev = 0; ev < polyline_events.length; ev++) {\n (function(object, name) {\n if (options[name]) {\n google.maps.event.addListener(object, name, function(e){\n options[name].apply(this, [e]);\n });\n }\n })(polyline, polyline_events[ev]);\n }\n\n this.polylines.push(polyline);\n\n GMaps.fire('polyline_added', polyline, this);\n\n return polyline;\n};\n\nGMaps.prototype.removePolyline = function(polyline) {\n for (var i = 0; i < this.polylines.length; i++) {\n if (this.polylines[i] === polyline) {\n this.polylines[i].setMap(null);\n this.polylines.splice(i, 1);\n\n GMaps.fire('polyline_removed', polyline, this);\n\n break;\n }\n }\n};\n\nGMaps.prototype.removePolylines = function() {\n for (var i = 0, item; item = this.polylines[i]; i++) {\n item.setMap(null);\n }\n\n this.polylines = [];\n};\n\nGMaps.prototype.drawCircle = function(options) {\n options = extend_object({\n map: this.map,\n center: new google.maps.LatLng(options.lat, options.lng)\n }, options);\n\n delete options.lat;\n delete options.lng;\n\n var polygon = new google.maps.Circle(options),\n polygon_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];\n\n for (var ev = 0; ev < polygon_events.length; ev++) {\n (function(object, name) {\n if (options[name]) {\n google.maps.event.addListener(object, name, function(e){\n options[name].apply(this, [e]);\n });\n }\n })(polygon, polygon_events[ev]);\n }\n\n this.polygons.push(polygon);\n\n return polygon;\n};\n\nGMaps.prototype.drawRectangle = function(options) {\n options = extend_object({\n map: this.map\n }, options);\n\n var latLngBounds = new google.maps.LatLngBounds(\n new google.maps.LatLng(options.bounds[0][0], options.bounds[0][1]),\n new google.maps.LatLng(options.bounds[1][0], options.bounds[1][1])\n );\n\n options.bounds = latLngBounds;\n\n var polygon = new google.maps.Rectangle(options),\n polygon_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];\n\n for (var ev = 0; ev < polygon_events.length; ev++) {\n (function(object, name) {\n if (options[name]) {\n google.maps.event.addListener(object, name, function(e){\n options[name].apply(this, [e]);\n });\n }\n })(polygon, polygon_events[ev]);\n }\n\n this.polygons.push(polygon);\n\n return polygon;\n};\n\nGMaps.prototype.drawPolygon = function(options) {\n var useGeoJSON = false;\n\n if(options.hasOwnProperty(\"useGeoJSON\")) {\n useGeoJSON = options.useGeoJSON;\n }\n\n delete options.useGeoJSON;\n\n options = extend_object({\n map: this.map\n }, options);\n\n if (useGeoJSON == false) {\n options.paths = [options.paths.slice(0)];\n }\n\n if (options.paths.length > 0) {\n if (options.paths[0].length > 0) {\n options.paths = array_flat(array_map(options.paths, arrayToLatLng, useGeoJSON));\n }\n }\n\n var polygon = new google.maps.Polygon(options),\n polygon_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];\n\n for (var ev = 0; ev < polygon_events.length; ev++) {\n (function(object, name) {\n if (options[name]) {\n google.maps.event.addListener(object, name, function(e){\n options[name].apply(this, [e]);\n });\n }\n })(polygon, polygon_events[ev]);\n }\n\n this.polygons.push(polygon);\n\n GMaps.fire('polygon_added', polygon, this);\n\n return polygon;\n};\n\nGMaps.prototype.removePolygon = function(polygon) {\n for (var i = 0; i < this.polygons.length; i++) {\n if (this.polygons[i] === polygon) {\n this.polygons[i].setMap(null);\n this.polygons.splice(i, 1);\n\n GMaps.fire('polygon_removed', polygon, this);\n\n break;\n }\n }\n};\n\nGMaps.prototype.removePolygons = function() {\n for (var i = 0, item; item = this.polygons[i]; i++) {\n item.setMap(null);\n }\n\n this.polygons = [];\n};\n\nGMaps.prototype.getFromFusionTables = function(options) {\n var events = options.events;\n\n delete options.events;\n\n var fusion_tables_options = options,\n layer = new google.maps.FusionTablesLayer(fusion_tables_options);\n\n for (var ev in events) {\n (function(object, name) {\n google.maps.event.addListener(object, name, function(e) {\n events[name].apply(this, [e]);\n });\n })(layer, ev);\n }\n\n this.layers.push(layer);\n\n return layer;\n};\n\nGMaps.prototype.loadFromFusionTables = function(options) {\n var layer = this.getFromFusionTables(options);\n layer.setMap(this.map);\n\n return layer;\n};\n\nGMaps.prototype.getFromKML = function(options) {\n var url = options.url,\n events = options.events;\n\n delete options.url;\n delete options.events;\n\n var kml_options = options,\n layer = new google.maps.KmlLayer(url, kml_options);\n\n for (var ev in events) {\n (function(object, name) {\n google.maps.event.addListener(object, name, function(e) {\n events[name].apply(this, [e]);\n });\n })(layer, ev);\n }\n\n this.layers.push(layer);\n\n return layer;\n};\n\nGMaps.prototype.loadFromKML = function(options) {\n var layer = this.getFromKML(options);\n layer.setMap(this.map);\n\n return layer;\n};\n\nGMaps.prototype.addLayer = function(layerName, options) {\n //var default_layers = ['weather', 'clouds', 'traffic', 'transit', 'bicycling', 'panoramio', 'places'];\n options = options || {};\n var layer;\n\n switch(layerName) {\n case 'weather': this.singleLayers.weather = layer = new google.maps.weather.WeatherLayer();\n break;\n case 'clouds': this.singleLayers.clouds = layer = new google.maps.weather.CloudLayer();\n break;\n case 'traffic': this.singleLayers.traffic = layer = new google.maps.TrafficLayer();\n break;\n case 'transit': this.singleLayers.transit = layer = new google.maps.TransitLayer();\n break;\n case 'bicycling': this.singleLayers.bicycling = layer = new google.maps.BicyclingLayer();\n break;\n case 'panoramio':\n this.singleLayers.panoramio = layer = new google.maps.panoramio.PanoramioLayer();\n layer.setTag(options.filter);\n delete options.filter;\n\n //click event\n if (options.click) {\n google.maps.event.addListener(layer, 'click', function(event) {\n options.click(event);\n delete options.click;\n });\n }\n break;\n case 'places':\n this.singleLayers.places = layer = new google.maps.places.PlacesService(this.map);\n\n //search, nearbySearch, radarSearch callback, Both are the same\n if (options.search || options.nearbySearch || options.radarSearch) {\n var placeSearchRequest = {\n bounds : options.bounds || null,\n keyword : options.keyword || null,\n location : options.location || null,\n name : options.name || null,\n radius : options.radius || null,\n rankBy : options.rankBy || null,\n types : options.types || null\n };\n\n if (options.radarSearch) {\n layer.radarSearch(placeSearchRequest, options.radarSearch);\n }\n\n if (options.search) {\n layer.search(placeSearchRequest, options.search);\n }\n\n if (options.nearbySearch) {\n layer.nearbySearch(placeSearchRequest, options.nearbySearch);\n }\n }\n\n //textSearch callback\n if (options.textSearch) {\n var textSearchRequest = {\n bounds : options.bounds || null,\n location : options.location || null,\n query : options.query || null,\n radius : options.radius || null\n };\n\n layer.textSearch(textSearchRequest, options.textSearch);\n }\n break;\n }\n\n if (layer !== undefined) {\n if (typeof layer.setOptions == 'function') {\n layer.setOptions(options);\n }\n if (typeof layer.setMap == 'function') {\n layer.setMap(this.map);\n }\n\n return layer;\n }\n};\n\nGMaps.prototype.removeLayer = function(layer) {\n if (typeof(layer) == \"string\" && this.singleLayers[layer] !== undefined) {\n this.singleLayers[layer].setMap(null);\n\n delete this.singleLayers[layer];\n }\n else {\n for (var i = 0; i < this.layers.length; i++) {\n if (this.layers[i] === layer) {\n this.layers[i].setMap(null);\n this.layers.splice(i, 1);\n\n break;\n }\n }\n }\n};\n\nvar travelMode, unitSystem;\n\nGMaps.prototype.getRoutes = function(options) {\n switch (options.travelMode) {\n case 'bicycling':\n travelMode = google.maps.TravelMode.BICYCLING;\n break;\n case 'transit':\n travelMode = google.maps.TravelMode.TRANSIT;\n break;\n case 'driving':\n travelMode = google.maps.TravelMode.DRIVING;\n break;\n default:\n travelMode = google.maps.TravelMode.WALKING;\n break;\n }\n\n if (options.unitSystem === 'imperial') {\n unitSystem = google.maps.UnitSystem.IMPERIAL;\n }\n else {\n unitSystem = google.maps.UnitSystem.METRIC;\n }\n\n var base_options = {\n avoidHighways: false,\n avoidTolls: false,\n optimizeWaypoints: false,\n waypoints: []\n },\n request_options = extend_object(base_options, options);\n\n request_options.origin = /string/.test(typeof options.origin) ? options.origin : new google.maps.LatLng(options.origin[0], options.origin[1]);\n request_options.destination = /string/.test(typeof options.destination) ? options.destination : new google.maps.LatLng(options.destination[0], options.destination[1]);\n request_options.travelMode = travelMode;\n request_options.unitSystem = unitSystem;\n\n delete request_options.callback;\n delete request_options.error;\n\n var self = this,\n service = new google.maps.DirectionsService();\n\n service.route(request_options, function(result, status) {\n if (status === google.maps.DirectionsStatus.OK) {\n for (var r in result.routes) {\n if (result.routes.hasOwnProperty(r)) {\n self.routes.push(result.routes[r]);\n }\n }\n\n if (options.callback) {\n options.callback(self.routes);\n }\n }\n else {\n if (options.error) {\n options.error(result, status);\n }\n }\n });\n};\n\nGMaps.prototype.removeRoutes = function() {\n this.routes = [];\n};\n\nGMaps.prototype.getElevations = function(options) {\n options = extend_object({\n locations: [],\n path : false,\n samples : 256\n }, options);\n\n if (options.locations.length > 0) {\n if (options.locations[0].length > 0) {\n options.locations = array_flat(array_map([options.locations], arrayToLatLng, false));\n }\n }\n\n var callback = options.callback;\n delete options.callback;\n\n var service = new google.maps.ElevationService();\n\n //location request\n if (!options.path) {\n delete options.path;\n delete options.samples;\n\n service.getElevationForLocations(options, function(result, status) {\n if (callback && typeof(callback) === \"function\") {\n callback(result, status);\n }\n });\n //path request\n } else {\n var pathRequest = {\n path : options.locations,\n samples : options.samples\n };\n\n service.getElevationAlongPath(pathRequest, function(result, status) {\n if (callback && typeof(callback) === \"function\") {\n callback(result, status);\n }\n });\n }\n};\n\nGMaps.prototype.cleanRoute = GMaps.prototype.removePolylines;\n\nGMaps.prototype.drawRoute = function(options) {\n var self = this;\n\n this.getRoutes({\n origin: options.origin,\n destination: options.destination,\n travelMode: options.travelMode,\n waypoints: options.waypoints,\n unitSystem: options.unitSystem,\n error: options.error,\n callback: function(e) {\n if (e.length > 0) {\n var polyline_options = {\n path: e[e.length - 1].overview_path,\n strokeColor: options.strokeColor,\n strokeOpacity: options.strokeOpacity,\n strokeWeight: options.strokeWeight\n };\n\n if (options.hasOwnProperty(\"icons\")) {\n polyline_options.icons = options.icons;\n }\n\n self.drawPolyline(polyline_options);\n \n if (options.callback) {\n options.callback(e[e.length - 1]);\n }\n }\n }\n });\n};\n\nGMaps.prototype.travelRoute = function(options) {\n if (options.origin && options.destination) {\n this.getRoutes({\n origin: options.origin,\n destination: options.destination,\n travelMode: options.travelMode,\n waypoints : options.waypoints,\n unitSystem: options.unitSystem,\n error: options.error,\n callback: function(e) {\n //start callback\n if (e.length > 0 && options.start) {\n options.start(e[e.length - 1]);\n }\n\n //step callback\n if (e.length > 0 && options.step) {\n var route = e[e.length - 1];\n if (route.legs.length > 0) {\n var steps = route.legs[0].steps;\n for (var i = 0, step; step = steps[i]; i++) {\n step.step_number = i;\n options.step(step, (route.legs[0].steps.length - 1));\n }\n }\n }\n\n //end callback\n if (e.length > 0 && options.end) {\n options.end(e[e.length - 1]);\n }\n }\n });\n }\n else if (options.route) {\n if (options.route.legs.length > 0) {\n var steps = options.route.legs[0].steps;\n for (var i = 0, step; step = steps[i]; i++) {\n step.step_number = i;\n options.step(step);\n }\n }\n }\n};\n\nGMaps.prototype.drawSteppedRoute = function(options) {\n var self = this;\n \n if (options.origin && options.destination) {\n this.getRoutes({\n origin: options.origin,\n destination: options.destination,\n travelMode: options.travelMode,\n waypoints : options.waypoints,\n error: options.error,\n callback: function(e) {\n //start callback\n if (e.length > 0 && options.start) {\n options.start(e[e.length - 1]);\n }\n\n //step callback\n if (e.length > 0 && options.step) {\n var route = e[e.length - 1];\n if (route.legs.length > 0) {\n var steps = route.legs[0].steps;\n for (var i = 0, step; step = steps[i]; i++) {\n step.step_number = i;\n var polyline_options = {\n path: step.path,\n strokeColor: options.strokeColor,\n strokeOpacity: options.strokeOpacity,\n strokeWeight: options.strokeWeight\n };\n\n if (options.hasOwnProperty(\"icons\")) {\n polyline_options.icons = options.icons;\n }\n\n self.drawPolyline(polyline_options);\n options.step(step, (route.legs[0].steps.length - 1));\n }\n }\n }\n\n //end callback\n if (e.length > 0 && options.end) {\n options.end(e[e.length - 1]);\n }\n }\n });\n }\n else if (options.route) {\n if (options.route.legs.length > 0) {\n var steps = options.route.legs[0].steps;\n for (var i = 0, step; step = steps[i]; i++) {\n step.step_number = i;\n var polyline_options = {\n path: step.path,\n strokeColor: options.strokeColor,\n strokeOpacity: options.strokeOpacity,\n strokeWeight: options.strokeWeight\n };\n\n if (options.hasOwnProperty(\"icons\")) {\n polyline_options.icons = options.icons;\n }\n\n self.drawPolyline(polyline_options);\n options.step(step);\n }\n }\n }\n};\n\nGMaps.Route = function(options) {\n this.origin = options.origin;\n this.destination = options.destination;\n this.waypoints = options.waypoints;\n\n this.map = options.map;\n this.route = options.route;\n this.step_count = 0;\n this.steps = this.route.legs[0].steps;\n this.steps_length = this.steps.length;\n\n var polyline_options = {\n path: new google.maps.MVCArray(),\n strokeColor: options.strokeColor,\n strokeOpacity: options.strokeOpacity,\n strokeWeight: options.strokeWeight\n };\n\n if (options.hasOwnProperty(\"icons\")) {\n polyline_options.icons = options.icons;\n }\n\n this.polyline = this.map.drawPolyline(polyline_options).getPath();\n};\n\nGMaps.Route.prototype.getRoute = function(options) {\n var self = this;\n\n this.map.getRoutes({\n origin : this.origin,\n destination : this.destination,\n travelMode : options.travelMode,\n waypoints : this.waypoints || [],\n error: options.error,\n callback : function() {\n self.route = e[0];\n\n if (options.callback) {\n options.callback.call(self);\n }\n }\n });\n};\n\nGMaps.Route.prototype.back = function() {\n if (this.step_count > 0) {\n this.step_count--;\n var path = this.route.legs[0].steps[this.step_count].path;\n\n for (var p in path){\n if (path.hasOwnProperty(p)){\n this.polyline.pop();\n }\n }\n }\n};\n\nGMaps.Route.prototype.forward = function() {\n if (this.step_count < this.steps_length) {\n var path = this.route.legs[0].steps[this.step_count].path;\n\n for (var p in path){\n if (path.hasOwnProperty(p)){\n this.polyline.push(path[p]);\n }\n }\n this.step_count++;\n }\n};\n\nGMaps.prototype.checkGeofence = function(lat, lng, fence) {\n return fence.containsLatLng(new google.maps.LatLng(lat, lng));\n};\n\nGMaps.prototype.checkMarkerGeofence = function(marker, outside_callback) {\n if (marker.fences) {\n for (var i = 0, fence; fence = marker.fences[i]; i++) {\n var pos = marker.getPosition();\n if (!this.checkGeofence(pos.lat(), pos.lng(), fence)) {\n outside_callback(marker, fence);\n }\n }\n }\n};\n\nGMaps.prototype.toImage = function(options) {\n var options = options || {},\n static_map_options = {};\n\n static_map_options['size'] = options['size'] || [this.el.clientWidth, this.el.clientHeight];\n static_map_options['lat'] = this.getCenter().lat();\n static_map_options['lng'] = this.getCenter().lng();\n\n if (this.markers.length > 0) {\n static_map_options['markers'] = [];\n \n for (var i = 0; i < this.markers.length; i++) {\n static_map_options['markers'].push({\n lat: this.markers[i].getPosition().lat(),\n lng: this.markers[i].getPosition().lng()\n });\n }\n }\n\n if (this.polylines.length > 0) {\n var polyline = this.polylines[0];\n \n static_map_options['polyline'] = {};\n static_map_options['polyline']['path'] = google.maps.geometry.encoding.encodePath(polyline.getPath());\n static_map_options['polyline']['strokeColor'] = polyline.strokeColor\n static_map_options['polyline']['strokeOpacity'] = polyline.strokeOpacity\n static_map_options['polyline']['strokeWeight'] = polyline.strokeWeight\n }\n\n return GMaps.staticMapURL(static_map_options);\n};\n\nGMaps.staticMapURL = function(options){\n var parameters = [],\n data,\n static_root = (location.protocol === 'file:' ? 'http:' : location.protocol ) + '//maps.googleapis.com/maps/api/staticmap';\n\n if (options.url) {\n static_root = options.url;\n delete options.url;\n }\n\n static_root += '?';\n\n var markers = options.markers;\n \n delete options.markers;\n\n if (!markers && options.marker) {\n markers = [options.marker];\n delete options.marker;\n }\n\n var styles = options.styles;\n\n delete options.styles;\n\n var polyline = options.polyline;\n delete options.polyline;\n\n /** Map options **/\n if (options.center) {\n parameters.push('center=' + options.center);\n delete options.center;\n }\n else if (options.address) {\n parameters.push('center=' + options.address);\n delete options.address;\n }\n else if (options.lat) {\n parameters.push(['center=', options.lat, ',', options.lng].join(''));\n delete options.lat;\n delete options.lng;\n }\n else if (options.visible) {\n var visible = encodeURI(options.visible.join('|'));\n parameters.push('visible=' + visible);\n }\n\n var size = options.size;\n if (size) {\n if (size.join) {\n size = size.join('x');\n }\n delete options.size;\n }\n else {\n size = '630x300';\n }\n parameters.push('size=' + size);\n\n if (!options.zoom && options.zoom !== false) {\n options.zoom = 15;\n }\n\n var sensor = options.hasOwnProperty('sensor') ? !!options.sensor : true;\n delete options.sensor;\n parameters.push('sensor=' + sensor);\n\n for (var param in options) {\n if (options.hasOwnProperty(param)) {\n parameters.push(param + '=' + options[param]);\n }\n }\n\n /** Markers **/\n if (markers) {\n var marker, loc;\n\n for (var i = 0; data = markers[i]; i++) {\n marker = [];\n\n if (data.size && data.size !== 'normal') {\n marker.push('size:' + data.size);\n delete data.size;\n }\n else if (data.icon) {\n marker.push('icon:' + encodeURI(data.icon));\n delete data.icon;\n }\n\n if (data.color) {\n marker.push('color:' + data.color.replace('#', '0x'));\n delete data.color;\n }\n\n if (data.label) {\n marker.push('label:' + data.label[0].toUpperCase());\n delete data.label;\n }\n\n loc = (data.address ? data.address : data.lat + ',' + data.lng);\n delete data.address;\n delete data.lat;\n delete data.lng;\n\n for(var param in data){\n if (data.hasOwnProperty(param)) {\n marker.push(param + ':' + data[param]);\n }\n }\n\n if (marker.length || i === 0) {\n marker.push(loc);\n marker = marker.join('|');\n parameters.push('markers=' + encodeURI(marker));\n }\n // New marker without styles\n else {\n marker = parameters.pop() + encodeURI('|' + loc);\n parameters.push(marker);\n }\n }\n }\n\n /** Map Styles **/\n if (styles) {\n for (var i = 0; i < styles.length; i++) {\n var styleRule = [];\n if (styles[i].featureType){\n styleRule.push('feature:' + styles[i].featureType.toLowerCase());\n }\n\n if (styles[i].elementType) {\n styleRule.push('element:' + styles[i].elementType.toLowerCase());\n }\n\n for (var j = 0; j < styles[i].stylers.length; j++) {\n for (var p in styles[i].stylers[j]) {\n var ruleArg = styles[i].stylers[j][p];\n if (p == 'hue' || p == 'color') {\n ruleArg = '0x' + ruleArg.substring(1);\n }\n styleRule.push(p + ':' + ruleArg);\n }\n }\n\n var rule = styleRule.join('|');\n if (rule != '') {\n parameters.push('style=' + rule);\n }\n }\n }\n\n /** Polylines **/\n function parseColor(color, opacity) {\n if (color[0] === '#'){\n color = color.replace('#', '0x');\n\n if (opacity) {\n opacity = parseFloat(opacity);\n opacity = Math.min(1, Math.max(opacity, 0));\n if (opacity === 0) {\n return '0x00000000';\n }\n opacity = (opacity * 255).toString(16);\n if (opacity.length === 1) {\n opacity += opacity;\n }\n\n color = color.slice(0,8) + opacity;\n }\n }\n return color;\n }\n\n if (polyline) {\n data = polyline;\n polyline = [];\n\n if (data.strokeWeight) {\n polyline.push('weight:' + parseInt(data.strokeWeight, 10));\n }\n\n if (data.strokeColor) {\n var color = parseColor(data.strokeColor, data.strokeOpacity);\n polyline.push('color:' + color);\n }\n\n if (data.fillColor) {\n var fillcolor = parseColor(data.fillColor, data.fillOpacity);\n polyline.push('fillcolor:' + fillcolor);\n }\n\n var path = data.path;\n if (path.join) {\n for (var j=0, pos; pos=path[j]; j++) {\n polyline.push(pos.join(','));\n }\n }\n else {\n polyline.push('enc:' + path);\n }\n\n polyline = polyline.join('|');\n parameters.push('path=' + encodeURI(polyline));\n }\n\n /** Retina support **/\n var dpi = window.devicePixelRatio || 1;\n parameters.push('scale=' + dpi);\n\n parameters = parameters.join('&');\n return static_root + parameters;\n};\n\nGMaps.prototype.addMapType = function(mapTypeId, options) {\n if (options.hasOwnProperty(\"getTileUrl\") && typeof(options[\"getTileUrl\"]) == \"function\") {\n options.tileSize = options.tileSize || new google.maps.Size(256, 256);\n\n var mapType = new google.maps.ImageMapType(options);\n\n this.map.mapTypes.set(mapTypeId, mapType);\n }\n else {\n throw \"'getTileUrl' function required.\";\n }\n};\n\nGMaps.prototype.addOverlayMapType = function(options) {\n if (options.hasOwnProperty(\"getTile\") && typeof(options[\"getTile\"]) == \"function\") {\n var overlayMapTypeIndex = options.index;\n\n delete options.index;\n\n this.map.overlayMapTypes.insertAt(overlayMapTypeIndex, options);\n }\n else {\n throw \"'getTile' function required.\";\n }\n};\n\nGMaps.prototype.removeOverlayMapType = function(overlayMapTypeIndex) {\n this.map.overlayMapTypes.removeAt(overlayMapTypeIndex);\n};\n\nGMaps.prototype.addStyle = function(options) {\n var styledMapType = new google.maps.StyledMapType(options.styles, { name: options.styledMapName });\n\n this.map.mapTypes.set(options.mapTypeId, styledMapType);\n};\n\nGMaps.prototype.setStyle = function(mapTypeId) {\n this.map.setMapTypeId(mapTypeId);\n};\n\nGMaps.prototype.createPanorama = function(streetview_options) {\n if (!streetview_options.hasOwnProperty('lat') || !streetview_options.hasOwnProperty('lng')) {\n streetview_options.lat = this.getCenter().lat();\n streetview_options.lng = this.getCenter().lng();\n }\n\n this.panorama = GMaps.createPanorama(streetview_options);\n\n this.map.setStreetView(this.panorama);\n\n return this.panorama;\n};\n\nGMaps.createPanorama = function(options) {\n var el = getElementById(options.el, options.context);\n\n options.position = new google.maps.LatLng(options.lat, options.lng);\n\n delete options.el;\n delete options.context;\n delete options.lat;\n delete options.lng;\n\n var streetview_events = ['closeclick', 'links_changed', 'pano_changed', 'position_changed', 'pov_changed', 'resize', 'visible_changed'],\n streetview_options = extend_object({visible : true}, options);\n\n for (var i = 0; i < streetview_events.length; i++) {\n delete streetview_options[streetview_events[i]];\n }\n\n var panorama = new google.maps.StreetViewPanorama(el, streetview_options);\n\n for (var i = 0; i < streetview_events.length; i++) {\n (function(object, name) {\n if (options[name]) {\n google.maps.event.addListener(object, name, function(){\n options[name].apply(this);\n });\n }\n })(panorama, streetview_events[i]);\n }\n\n return panorama;\n};\n\nGMaps.prototype.on = function(event_name, handler) {\n return GMaps.on(event_name, this, handler);\n};\n\nGMaps.prototype.off = function(event_name) {\n GMaps.off(event_name, this);\n};\n\nGMaps.custom_events = ['marker_added', 'marker_removed', 'polyline_added', 'polyline_removed', 'polygon_added', 'polygon_removed', 'geolocated', 'geolocation_failed'];\n\nGMaps.on = function(event_name, object, handler) {\n if (GMaps.custom_events.indexOf(event_name) == -1) {\n if(object instanceof GMaps) object = object.map; \n return google.maps.event.addListener(object, event_name, handler);\n }\n else {\n var registered_event = {\n handler : handler,\n eventName : event_name\n };\n\n object.registered_events[event_name] = object.registered_events[event_name] || [];\n object.registered_events[event_name].push(registered_event);\n\n return registered_event;\n }\n};\n\nGMaps.off = function(event_name, object) {\n if (GMaps.custom_events.indexOf(event_name) == -1) {\n if(object instanceof GMaps) object = object.map; \n google.maps.event.clearListeners(object, event_name);\n }\n else {\n object.registered_events[event_name] = [];\n }\n};\n\nGMaps.fire = function(event_name, object, scope) {\n if (GMaps.custom_events.indexOf(event_name) == -1) {\n google.maps.event.trigger(object, event_name, Array.prototype.slice.apply(arguments).slice(2));\n }\n else {\n if(event_name in scope.registered_events) {\n var firing_events = scope.registered_events[event_name];\n\n for(var i = 0; i < firing_events.length; i++) {\n (function(handler, scope, object) {\n handler.apply(scope, [object]);\n })(firing_events[i]['handler'], scope, object);\n }\n }\n }\n};\n\nGMaps.geolocate = function(options) {\n var complete_callback = options.always || options.complete;\n\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function(position) {\n options.success(position);\n\n if (complete_callback) {\n complete_callback();\n }\n }, function(error) {\n options.error(error);\n\n if (complete_callback) {\n complete_callback();\n }\n }, options.options);\n }\n else {\n options.not_supported();\n\n if (complete_callback) {\n complete_callback();\n }\n }\n};\n\nGMaps.geocode = function(options) {\n this.geocoder = new google.maps.Geocoder();\n var callback = options.callback;\n if (options.hasOwnProperty('lat') && options.hasOwnProperty('lng')) {\n options.latLng = new google.maps.LatLng(options.lat, options.lng);\n }\n\n delete options.lat;\n delete options.lng;\n delete options.callback;\n \n this.geocoder.geocode(options, function(results, status) {\n callback(results, status);\n });\n};\n\nif (typeof window.google === 'object' && window.google.maps) {\n //==========================\n // Polygon containsLatLng\n // https://github.com/tparkin/Google-Maps-Point-in-Polygon\n // Poygon getBounds extension - google-maps-extensions\n // http://code.google.com/p/google-maps-extensions/source/browse/google.maps.Polygon.getBounds.js\n if (!google.maps.Polygon.prototype.getBounds) {\n google.maps.Polygon.prototype.getBounds = function(latLng) {\n var bounds = new google.maps.LatLngBounds();\n var paths = this.getPaths();\n var path;\n\n for (var p = 0; p < paths.getLength(); p++) {\n path = paths.getAt(p);\n for (var i = 0; i < path.getLength(); i++) {\n bounds.extend(path.getAt(i));\n }\n }\n\n return bounds;\n };\n }\n\n if (!google.maps.Polygon.prototype.containsLatLng) {\n // Polygon containsLatLng - method to determine if a latLng is within a polygon\n google.maps.Polygon.prototype.containsLatLng = function(latLng) {\n // Exclude points outside of bounds as there is no way they are in the poly\n var bounds = this.getBounds();\n\n if (bounds !== null && !bounds.contains(latLng)) {\n return false;\n }\n\n // Raycast point in polygon method\n var inPoly = false;\n\n var numPaths = this.getPaths().getLength();\n for (var p = 0; p < numPaths; p++) {\n var path = this.getPaths().getAt(p);\n var numPoints = path.getLength();\n var j = numPoints - 1;\n\n for (var i = 0; i < numPoints; i++) {\n var vertex1 = path.getAt(i);\n var vertex2 = path.getAt(j);\n\n if (vertex1.lng() < latLng.lng() && vertex2.lng() >= latLng.lng() || vertex2.lng() < latLng.lng() && vertex1.lng() >= latLng.lng()) {\n if (vertex1.lat() + (latLng.lng() - vertex1.lng()) / (vertex2.lng() - vertex1.lng()) * (vertex2.lat() - vertex1.lat()) < latLng.lat()) {\n inPoly = !inPoly;\n }\n }\n\n j = i;\n }\n }\n\n return inPoly;\n };\n }\n\n if (!google.maps.Circle.prototype.containsLatLng) {\n google.maps.Circle.prototype.containsLatLng = function(latLng) {\n if (google.maps.geometry) {\n return google.maps.geometry.spherical.computeDistanceBetween(this.getCenter(), latLng) <= this.getRadius();\n }\n else {\n return true;\n }\n };\n }\n\n google.maps.LatLngBounds.prototype.containsLatLng = function(latLng) {\n return this.contains(latLng);\n };\n\n google.maps.Marker.prototype.setFences = function(fences) {\n this.fences = fences;\n };\n\n google.maps.Marker.prototype.addFence = function(fence) {\n this.fences.push(fence);\n };\n\n google.maps.Marker.prototype.getId = function() {\n return this['__gm_id'];\n };\n}\n\n//==========================\n// Array indexOf\n// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {\n \"use strict\";\n if (this == null) {\n throw new TypeError();\n }\n var t = Object(this);\n var len = t.length >>> 0;\n if (len === 0) {\n return -1;\n }\n var n = 0;\n if (arguments.length > 1) {\n n = Number(arguments[1]);\n if (n != n) { // shortcut for verifying if it's NaN\n n = 0;\n } else if (n != 0 && n != Infinity && n != -Infinity) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n }\n if (n >= len) {\n return -1;\n }\n var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n for (; k < len; k++) {\n if (k in t && t[k] === searchElement) {\n return k;\n }\n }\n return -1;\n }\n}\n\nreturn GMaps;\n}));\n","// (c) 2012 Airbnb, Inc.\n//\n// infinity.js may be freely distributed under the terms of the BSD\n// license. For all licensing information, details, and documention:\n// http://airbnb.github.com/infinity\n\n!function(window, Math, $) {\n 'use strict';\n\n\n // Welcome To Infinity\n // ===================\n //\n // infinity.js is a UITableView for the web. Use it to speed up scroll\n // performance of long- or infinitely-scrolling lists of items.\n //\n // infinity.js has several caveats:\n //\n // 1. All DOM elements must either be visible or in the current layout.\n // infinity.js does not support elements that will at some point affect the\n // layout, but are currently hidden using `display:none`.\n //\n // 2. ListViews can't be nested.\n //\n // 3. Non-ListItem elements can't be the immediate children of ListView\n // elements. Only ListItems can be immediate children of ListViews.\n //\n // 4. ListView elements can't have heights set directly on them. In most\n // cases it is also likely that `min-height`s and `max-height`s will break.\n // However, setting heights on ListItems is ok.\n //\n // If you're reading this, we probably want to hear from you. If the feeling\n // is mutual: [get in touch.](http://www.airbnb.com/jobs)\n\n\n // Initial Setup\n // =============\n\n // Cached objects\n var $window = $(window);\n\n // Packaging:\n var oldInfinity = window.infinity,\n infinity = window.infinity = {},\n config = infinity.config = {};\n\n // Constants:\n var PAGE_ID_ATTRIBUTE = 'data-infinity-pageid',\n NUM_BUFFER_PAGES = 1,\n PAGES_ONSCREEN = NUM_BUFFER_PAGES * 2 + 1;\n\n // Config:\n config.PAGE_TO_SCREEN_RATIO = 3;\n config.SCROLL_THROTTLE = 350;\n\n\n\n // ListView Class\n // ==============\n\n\n // ### Constructor\n //\n // Creates a new instance of a ListView.\n //\n // Takes:\n //\n // - `$el`: a jQuery element.\n // - `options`: an optional hash of options\n\n function ListView($el, options) {\n options = options || {};\n\n this.$el = blankDiv();\n this.$shadow = blankDiv();\n $el.append(this.$el);\n // don't append the shadow element -- it's meant to only be used for\n // finding elements outside of the DOM\n\n this.lazy = !!options.lazy;\n this.lazyFn = options.lazy || null;\n\n initBuffer(this);\n\n this.top = this.$el.offset().top;\n this.width = 0;\n this.height = 0;\n\n this.pages = [];\n this.startIndex = 0;\n\n DOMEvent.attach(this);\n }\n\n\n // ### initBuffer\n //\n // Private ListView method. Initializes the buffer element.\n\n function initBuffer(listView) {\n listView._$buffer = blankDiv()\n .prependTo(listView.$el);\n }\n\n\n // ### updateBuffer\n //\n // Private ListView method. Updates the buffer to correctly push forward the\n // first page.\n\n function updateBuffer(listView) {\n var firstPage,\n pages = listView.pages,\n $buffer = listView._$buffer;\n\n if(pages.length > 0) {\n firstPage = pages[listView.startIndex];\n $buffer.height(firstPage.top);\n } else {\n $buffer.height(0);\n }\n }\n\n // ListView manipulation\n // ---------------------\n\n\n // ### append\n //\n // Appends a jQuery element or a ListItem to the ListView.\n //\n // Takes:\n //\n // - `obj`: a jQuery element, a string of valid HTML, or a ListItem.\n //\n // TODO: optimized batch appends\n\n ListView.prototype.append = function(obj) {\n if(!obj || !obj.length) return null;\n\n var lastPage,\n item = convertToItem(this, obj),\n pages = this.pages;\n\n this.height += item.height;\n this.$el.height(this.height);\n\n lastPage = pages[pages.length - 1];\n\n if(!lastPage || !lastPage.hasVacancy()) {\n lastPage = new Page(this);\n pages.push(lastPage);\n }\n\n lastPage.append(item);\n insertPagesInView(this);\n\n return item;\n };\n\n\n // ### cacheCoordsFor\n //\n // Caches the coordinates for a given ListItem within the given ListView.\n //\n // Takes:\n //\n // - `listView`: a ListView.\n // - `listItem`: the ListItem whose coordinates you want to cache.\n\n function cacheCoordsFor(listView, listItem) {\n listItem.$el.remove();\n\n // WARNING: this will always break for prepends. Once support gets added for\n // prepends, change this.\n listView.$el.append(listItem.$el);\n updateCoords(listItem, listView.height);\n listItem.$el.remove();\n }\n\n\n // ### insertPagesInView\n //\n // Inserts any uninserted pages the given ListView owns.\n //\n // Takes:\n //\n // - `listView`: the ListView whose onscreen pages you'd like to insert.\n\n function insertPagesInView(listView) {\n var index, length, curr,\n pages = listView.pages,\n inserted = false,\n inOrder = true;\n index = listView.startIndex;\n length = Math.min(index + PAGES_ONSCREEN, pages.length);\n\n for(index; index < length; index++) {\n curr = pages[index];\n if(listView.lazy) curr.lazyload(listView.lazyFn);\n if(inserted && curr.onscreen) inOrder = false;\n\n if(!inOrder) {\n curr.stash(listView.$shadow);\n curr.appendTo(listView.$el);\n } else if(!curr.onscreen) {\n inserted = true;\n curr.appendTo(listView.$el);\n }\n }\n }\n\n\n // ### updateStartIndex\n //\n // Updates a given ListView when the throttled scroll event fires. Attempts\n // to do as little work as possible: if the `startIndex` doesn't change,\n // it'll exit early. If the `startIndex` does change, it finds all pages\n // that have been scrolled out of view and removes them, then inserts only\n // pages that have been now been scrolled into view.\n //\n // Takes:\n //\n // - `listView`: the ListView needing to be updated.\n\n function updateStartIndex(listView) {\n var index, length, pages, lastIndex, nextLastIndex,\n startIndex = listView.startIndex,\n viewTop = $window.scrollTop() - listView.top,\n viewHeight = $window.height(),\n viewBottom = viewTop + viewHeight,\n nextIndex = startIndexWithinRange(listView, viewTop, viewBottom);\n\n if( nextIndex < 0 || nextIndex === startIndex) return startIndex;\n\n pages = listView.pages;\n startIndex = listView.startIndex;\n lastIndex = Math.min(startIndex + PAGES_ONSCREEN, pages.length);\n nextLastIndex = Math.min(nextIndex + PAGES_ONSCREEN, pages.length);\n\n // sweep any invalid old pages\n for(index = startIndex, length = lastIndex; index < length; index++) {\n if(index < nextIndex || index >= nextLastIndex)\n pages[index].stash(listView.$shadow);\n }\n\n listView.startIndex = nextIndex;\n\n insertPagesInView(listView);\n updateBuffer(listView);\n return nextIndex;\n }\n\n\n // ### remove\n //\n // Removes the ListView from the DOM and cleans up after it.\n\n ListView.prototype.remove = function() {\n this.$el.remove();\n this.cleanup();\n };\n\n\n // ### convertToItem\n //\n // Given an object that is either a ListItem instance, a jQuery element, or a\n // string of valid HTML, makes sure to return either the ListItem itself or\n // a new ListItem that wraps the element.\n //\n // Takes:\n //\n // - `listView`: the ListView instance that wants the item.\n // - `possibleItem`: an object that is either a ListItem, a jQuery element,\n // or a string of valid HTML.\n\n function convertToItem(listView, possibleItem) {\n var item;\n if(possibleItem instanceof ListItem) return possibleItem;\n if(typeof possibleItem === 'string') possibleItem = $(possibleItem);\n item = new ListItem(possibleItem);\n cacheCoordsFor(listView, item);\n return item;\n }\n\n\n // ### tooSmall\n //\n // Alerts the given ListView that the given Page is too small. May result\n // in modifications to the `pages` array.\n\n function tooSmall(listView, page) {\n // Naive solution:\n repartition(listView);\n }\n\n\n // ### repartition\n //\n // Repartitions the pages array. This can be used for either defragmenting\n // the array, or recalculating everything on screen resize.\n\n function repartition(listView) {\n var currPage, newPage, index, length, itemIndex, pageLength, currItems, currItem,\n nextItem,\n pages = listView.pages,\n newPages = [];\n\n newPage = new Page(listView);\n newPages.push(newPage);\n\n for(index = 0, length = pages.length; index < length; index++) {\n currPage = pages[index];\n currItems = currPage.items;\n for(itemIndex = 0, pageLength = currItems.length; itemIndex < pageLength; itemIndex++) {\n currItem = currItems[itemIndex];\n nextItem = currItem.clone();\n if(newPage.hasVacancy()) {\n newPage.append(nextItem);\n } else {\n newPage = new Page(listView);\n newPages.push(newPage);\n newPage.append(nextItem);\n }\n }\n currPage.remove();\n }\n\n listView.pages = newPages;\n insertPagesInView(listView);\n }\n\n\n // ListView querying\n // -----------------\n\n // ### find\n //\n // Given a selector string or jQuery element, return the items that hold the\n // given or matching elements.\n //\n // Note: this is slower than an ordinary jQuery find. However, using jQuery\n // to find elements will be bug-prone, since most of the elements won't be in\n // the DOM tree. Caching elements is usually important, but it's even more\n // important to do here.\n //\n // Arguments:\n //\n // - `findObj`: A selector string, or a jQuery element.\n //\n // Returns a ListItem.\n\n ListView.prototype.find = function(findObj) {\n var items, $onscreen, $offscreen;\n\n // If given a selector string, find everything matching onscreen and\n // offscreen, and return both.\n if(typeof findObj === 'string') {\n $onscreen = this.$el.find(findObj);\n $offscreen = this.$shadow.find(findObj);\n return this.find($onscreen).concat(this.find($offscreen));\n }\n\n // Silly option, but might as well.\n if(findObj instanceof ListItem) return [findObj];\n\n // jQuery element\n items = [];\n findObj.each(function() {\n var pageId, page, pageItems, index, length, currItem,\n $itemEl = $(this).parentsUntil('[' + PAGE_ID_ATTRIBUTE + ']').andSelf().first(),\n $pageEl = $itemEl.parent();\n\n\n pageId = $pageEl.attr(PAGE_ID_ATTRIBUTE);\n page = PageRegistry.lookup(pageId);\n if(page) {\n pageItems = page.items;\n for(index = 0, length = pageItems.length; index < length; index++) {\n currItem = pageItems[index];\n if(currItem.$el.is($itemEl)) {\n items.push(currItem);\n break;\n }\n }\n }\n });\n\n return items;\n };\n\n // ### startIndexWithinRange\n //\n // Finds the starting index for a listView, given a range. Wraps\n // indexWithinRange.\n //\n // Takes:\n //\n // - `listView`: the ListView whose startIndex you're calculating.\n // - `top`: the top of the range.\n // - `bottom`: the bottom of the range.\n\n function startIndexWithinRange(listView, top, bottom) {\n var index = indexWithinRange(listView, top, bottom);\n index = Math.max(index - NUM_BUFFER_PAGES, 0);\n index = Math.min(index, listView.pages.length);\n return index;\n }\n\n\n // ### indexWithinRange\n //\n // Finds the index of the page closest to being within a given range. It's\n // less useful than its wrapper function startIndexWithinRange, and you\n // probably won't need to call this unwrapped version.\n //\n // Takes:\n //\n // - `listView`: the ListView instance whose pages you're looking at.\n // - `top`: the top of the range.\n // - `bottom`: the bottom of the range.\n\n function indexWithinRange(listView, top, bottom) {\n var index, length, curr, startIndex, midpoint, diff, prevDiff,\n pages = listView.pages,\n rangeMidpoint = top + (bottom - top)/2;\n\n // Start looking at the index of the page last contained by the screen --\n // not the first page in the onscreen pages\n startIndex = Math.min(listView.startIndex + NUM_BUFFER_PAGES,\n pages.length - 1);\n\n if(pages.length <= 0) return -1;\n\n curr = pages[startIndex];\n midpoint = curr.top + curr.height/2;\n prevDiff = rangeMidpoint - midpoint;\n if(prevDiff < 0) {\n // Search above\n for(index = startIndex - 1; index >= 0; index--) {\n curr = pages[index];\n midpoint = curr.top + curr.height/2;\n diff = rangeMidpoint - midpoint;\n if(diff > 0) {\n if(diff < -prevDiff) return index;\n return index + 1;\n }\n prevDiff = diff;\n }\n return 0;\n } else if (prevDiff > 0) {\n // Search below\n for(index = startIndex + 1, length = pages.length; index < length; index++) {\n curr = pages[index];\n midpoint = curr.top + curr.height/2;\n diff = rangeMidpoint - midpoint;\n if(diff < 0) {\n if(-diff < prevDiff) return index;\n return index - 1;\n }\n prevDiff = diff;\n }\n return pages.length - 1;\n }\n\n // Perfect hit! Return it.\n return startIndex;\n }\n\n\n // ListView cleanup\n // ----------------\n\n ListView.prototype.cleanup = function() {\n var pages = this.pages,\n page;\n DOMEvent.detach(this);\n while(page = pages.pop()) {\n page.cleanup();\n }\n };\n\n\n // ListView event binding\n // ----------------------\n //\n // Internal scroll and resize binding and throttling. Allows ListViews to\n // bind to a throttled scroll event (and debounced resize event), and updates\n // them as it fires.\n\n var DOMEvent = (function() {\n var eventIsBound = false,\n scrollScheduled = false,\n resizeTimeout = null,\n boundViews = [];\n\n\n // ### scrollHandler\n //\n // Callback called on scroll. Schedules a `scrollAll` callback if needed,\n // and disallows future scheduling.\n\n function scrollHandler() {\n if(!scrollScheduled) {\n setTimeout(scrollAll, config.SCROLL_THROTTLE);\n scrollScheduled = true;\n }\n }\n\n\n // ### scrollAll\n //\n // Callback passed to the setTimeout throttle. Calls `scrollListView` on\n // every bound ListView, and then allows new scroll events to be\n // scheduled.\n\n function scrollAll() {\n var index, length;\n for(index = 0, length = boundViews.length; index < length; index++) {\n updateStartIndex(boundViews[index]);\n }\n scrollScheduled = false;\n }\n\n\n // ### resizeHandler\n //\n // Callback called on resize. Debounces a `resizeAll` callback.\n\n function resizeHandler() {\n if(resizeTimeout) clearTimeout(resizeTimeout);\n resizeTimeout = setTimeout(resizeAll, 200);\n }\n\n\n // ### resizeAll\n //\n // Handles resizing all ListViews. Just calls `repartition` on them for\n // now.\n\n function resizeAll() {\n var index, curr;\n for(index = 0; curr = boundViews[index]; index++) {\n repartition(curr);\n }\n }\n\n return {\n\n // ### attach\n //\n // Binds a given ListView to a throttled scroll event. Does not create\n // multiple event handlers if called by multiple ListViews.\n //\n // Takes:\n //\n // - `listView`: a ListView that is not currently bound to the scroll\n // event.\n\n attach: function(listView) {\n if(!eventIsBound) {\n $window.on('scroll', scrollHandler);\n $window.on('resize', resizeHandler);\n eventIsBound = true;\n }\n boundViews.push(listView);\n },\n\n\n // ### detach\n //\n // Detaches a bound ListView from the throttled scroll event. If no\n // ListViews remain bound to the throttled scroll, unbinds the scroll\n // handler from the window's scroll event.\n //\n // Returns true if the listView was successfully detached, and false\n // otherwise.\n //\n // Takes:\n //\n // - `listView`: a ListView that is currently bound to the scroll event.\n\n detach: function(listView) {\n var index, length;\n for(index = 0, length = boundViews.length; index < length; index++) {\n if(boundViews[index] === listView) {\n boundViews.splice(index, 1);\n if(boundViews.length === 0) {\n $window.off('scroll', scrollHandler);\n $window.off('resize', resizeHandler);\n eventIsBound = false;\n }\n return true;\n }\n }\n return false;\n }\n };\n }());\n\n\n // Page class\n // ==========\n //\n // An internal class used for ordering items into roughly screen-sized pages.\n // Pages are removed and added to the DOM wholesale as they come in and out\n // of view.\n\n function Page(parent) {\n this.parent = parent;\n\n this.items = [];\n this.$el = blankDiv();\n\n this.id = PageRegistry.generatePageId(this);\n this.$el.attr(PAGE_ID_ATTRIBUTE, this.id);\n\n this.top = 0;\n this.bottom = 0;\n this.width = 0;\n this.height = 0;\n\n this.lazyloaded = false;\n\n this.onscreen = false;\n }\n\n\n // ### append\n //\n // Appends a ListItem to the Page.\n //\n // Takes:\n //\n // - `item`: a ListItem.\n\n Page.prototype.append = function(item) {\n var items = this.items;\n\n // Recompute coords, sizing.\n if(items.length === 0) this.top = item.top;\n this.bottom = item.bottom;\n this.width = this.width > item.width ? this.width : item.width;\n this.height = this.bottom - this.top;\n\n items.push(item);\n item.parent = this;\n this.$el.append(item.$el);\n\n this.lazyloaded = false;\n };\n\n\n // ### prepend\n //\n // Prepends a ListItem to the Page.\n //\n // Takes:\n //\n // - `item`: a ListItem.\n\n Page.prototype.prepend = function(item) {\n var items = this.items;\n\n // Recompute coords, sizing.\n this.bottom += item.height;\n this.width = this.width > item.width ? this.width : item.width;\n this.height = this.bottom - this.top;\n\n items.push(item);\n item.parent = this;\n this.$el.prepend(item.$el);\n\n this.lazyloaded = false;\n };\n\n\n // ### hasVacancy\n //\n // Returns false if the Page is at max capacity; false otherwise.\n\n Page.prototype.hasVacancy = function() {\n return this.height < $window.height() * config.PAGE_TO_SCREEN_RATIO;\n };\n\n\n // ### appendTo\n //\n // Proxies to jQuery to append the Page to the given jQuery element.\n\n Page.prototype.appendTo = function($el) {\n if(!this.onscreen) {\n this.$el.appendTo($el);\n this.onscreen = true;\n }\n };\n\n\n // ### prependTo\n //\n // Proxies to jQuery to prepend the Page to the given jQuery element.\n\n Page.prototype.prependTo = function($el) {\n if(!this.onscreen) {\n this.$el.prependTo($el);\n this.onscreen = true;\n }\n };\n\n // ### stash\n //\n // Temporarily stash the onscreen page under a different element.\n\n Page.prototype.stash = function($el) {\n if(this.onscreen) {\n this.$el.appendTo($el);\n this.onscreen = false;\n }\n };\n\n\n // ### remove\n //\n // Removes the Page from the DOM and cleans up after it.\n\n Page.prototype.remove = function() {\n if(this.onscreen) {\n this.$el.remove();\n this.onscreen = false;\n }\n this.cleanup();\n };\n\n\n // ### cleanup\n //\n // Cleans up the Page without removing it.\n\n Page.prototype.cleanup = function() {\n var items = this.items,\n item;\n\n this.parent = null;\n PageRegistry.remove(this);\n while (item = items.pop()) {\n item.cleanup();\n }\n };\n\n\n // ### lazyload\n //\n // Runs the given lazy-loading callback on all unloaded page content.\n //\n // Takes:\n //\n // - `callback`: a function of the form `function([$el]){}`. Will run on\n // each unloaded element, and will use the element as its calling context.\n\n Page.prototype.lazyload = function(callback) {\n var $el = this.$el,\n index, length;\n if (!this.lazyloaded) {\n for (index = 0, length = $el.length; index < length; index++) {\n callback.call($el[index], $el[index]);\n }\n this.lazyloaded = true;\n }\n };\n\n\n // Page Registry\n // ------------\n\n var PageRegistry = (function() {\n var pages = [];\n return {\n generatePageId: function(page) {\n return pages.push(page) - 1;\n },\n lookup: function(id) {\n return pages[id] || null;\n },\n remove: function(page) {\n var id = page.id;\n if(!pages[id]) return false;\n pages[id] = null;\n return true;\n }\n };\n }());\n\n\n // ### removeItemFromPage\n //\n // Removes a given ListItem from the given Page.\n\n function removeItemFromPage(item, page) {\n var index, length, foundIndex,\n items = page.items;\n for(index = 0, length = items.length; index < length; index++) {\n if(items[index] === item) {\n foundIndex = index;\n break;\n }\n }\n\n if(foundIndex == null) return false;\n\n items.splice(foundIndex, 1);\n page.bottom -= item.height;\n page.height = page.bottom - page.top;\n if(page.hasVacancy()) tooSmall(page.parent, page);\n\n return true;\n }\n\n\n // ListItem class\n // ==============\n //\n // An individual item in the ListView.\n //\n // Has cached top, bottom, width, and height properties, determined from\n // jQuery. This positioning data will be determined when the ListItem is\n // inserted into a ListView; it can't be determined ahead of time.\n //\n // All positioning data is relative to the containing ListView.\n\n function ListItem($el) {\n this.$el = $el;\n\n this.parent = null;\n\n this.top = 0;\n this.bottom = 0;\n this.width = 0;\n this.height = 0;\n }\n\n\n // ### clone\n //\n // Clones the ListItem.\n ListItem.prototype.clone = function() {\n var item = new ListItem(this.$el);\n item.top = this.top;\n item.bottom = this.bottom;\n item.width = this.width;\n item.height = this.height;\n return item;\n };\n\n // ### remove\n //\n // Removes the ListItem and its elements from the page, and cleans up after\n // them.\n\n ListItem.prototype.remove = function() {\n this.$el.remove();\n removeItemFromPage(this, this.parent);\n this.cleanup();\n };\n\n\n // ### cleanup\n //\n // Cleans up after the ListItem without removing it from the page.\n\n ListItem.prototype.cleanup = function() {\n this.parent = null;\n };\n\n\n // ### updateCoords\n //\n // Updates the coordinates of the given ListItem, assuming a given y-offset\n // from the parent ListView.\n //\n // Takes:\n //\n // - `listItem`: the ListItem whose cached coordinates you want to update.\n // - `yOffset`: the y-offset of the ListItem from its ListView parent.\n\n function updateCoords(listItem, yOffset) {\n var $el = listItem.$el;\n\n listItem.top = yOffset;\n listItem.height = $el.outerHeight(true);\n listItem.bottom = listItem.top + listItem.height;\n listItem.width = $el.width();\n }\n\n\n\n // Helper functions\n // ================\n\n\n // ### blankDiv\n //\n // Returns a new, empty `<div>` jQuery element. The `<div>` will have its\n // border, margin, and padding set to zero or none, as appropriate.\n\n function blankDiv() {\n return $('<div>').css({\n margin: 0,\n padding: 0,\n border: 'none'\n });\n }\n\n\n // ### pxToInt\n //\n // Converts pixel values returned by jQuery to base-10 ints.\n //\n // Takes:\n //\n // - `px`: a string value, which starts with a number and is\n // postfixed with the string `'px'`.\n\n //function pxToInt(px) {\n // return parseInt(px, 10);\n //}\n\n\n // Export\n // ======\n\n // Classes:\n infinity.ListView = ListView;\n infinity.Page = Page;\n infinity.ListItem = ListItem;\n\n //jQuery plugin\n function registerPlugin(infinity) {\n var ListView;\n if(infinity) {\n ListView = infinity.ListView;\n\n $.fn.listView = function (options) {\n return new ListView(this, options);\n };\n }\n else {\n delete $.fn.listView;\n }\n }\n\n registerPlugin(infinity);\n\n // Destroy own packaging:\n infinity.noConflict = function() {\n window.infinity = oldInfinity;\n registerPlugin(oldInfinity);\n return infinity;\n };\n\n}(window, Math, jQuery);\n","// Ion.RangeSlider\n// version 2.1.2 Build: 350\n// © Denis Ineshin, 2015\n// https://github.com/IonDen\n//\n// Project page: http://ionden.com/a/plugins/ion.rangeSlider/en.html\n// GitHub page: https://github.com/IonDen/ion.rangeSlider\n//\n// Released under MIT licence:\n// http://ionden.com/a/plugins/licence-en.html\n// =====================================================================================================================\n\n;(function ($, document, window, navigator, undefined) {\n \"use strict\";\n\n // =================================================================================================================\n // Service\n\n var plugin_count = 0;\n\n // IE8 fix\n var is_old_ie = (function () {\n var n = navigator.userAgent,\n r = /msie\\s\\d+/i,\n v;\n if (n.search(r) > 0) {\n v = r.exec(n).toString();\n v = v.split(\" \")[1];\n if (v < 9) {\n $(\"html\").addClass(\"lt-ie9\");\n return true;\n }\n }\n return false;\n } ());\n if (!Function.prototype.bind) {\n Function.prototype.bind = function bind(that) {\n\n var target = this;\n var slice = [].slice;\n\n if (typeof target != \"function\") {\n throw new TypeError();\n }\n\n var args = slice.call(arguments, 1),\n bound = function () {\n\n if (this instanceof bound) {\n\n var F = function(){};\n F.prototype = target.prototype;\n var self = new F();\n\n var result = target.apply(\n self,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return self;\n\n } else {\n\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n\n }\n\n };\n\n return bound;\n };\n }\n if (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function(searchElement, fromIndex) {\n var k;\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n var O = Object(this);\n var len = O.length >>> 0;\n if (len === 0) {\n return -1;\n }\n var n = +fromIndex || 0;\n if (Math.abs(n) === Infinity) {\n n = 0;\n }\n if (n >= len) {\n return -1;\n }\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n while (k < len) {\n if (k in O && O[k] === searchElement) {\n return k;\n }\n k++;\n }\n return -1;\n };\n }\n\n\n\n // =================================================================================================================\n // Template\n\n var base_html =\n '<span class=\"irs\">' +\n '<span class=\"irs-line\" tabindex=\"-1\"><span class=\"irs-line-left\"></span><span class=\"irs-line-mid\"></span><span class=\"irs-line-right\"></span></span>' +\n '<span class=\"irs-min\">0</span><span class=\"irs-max\">1</span>' +\n '<span class=\"irs-from\">0</span><span class=\"irs-to\">0</span><span class=\"irs-single\">0</span>' +\n '</span>' +\n '<span class=\"irs-grid\"></span>' +\n '<span class=\"irs-bar\"></span>';\n\n var single_html =\n '<span class=\"irs-bar-edge\"></span>' +\n '<span class=\"irs-shadow shadow-single\"></span>' +\n '<span class=\"irs-slider single\"></span>';\n\n var double_html =\n '<span class=\"irs-shadow shadow-from\"></span>' +\n '<span class=\"irs-shadow shadow-to\"></span>' +\n '<span class=\"irs-slider from\"></span>' +\n '<span class=\"irs-slider to\"></span>';\n\n var disable_html =\n '<span class=\"irs-disable-mask\"></span>';\n\n\n\n // =================================================================================================================\n // Core\n\n /**\n * Main plugin constructor\n *\n * @param input {Object} link to base input element\n * @param options {Object} slider config\n * @param plugin_count {Number}\n * @constructor\n */\n var IonRangeSlider = function (input, options, plugin_count) {\n this.VERSION = \"2.1.2\";\n this.input = input;\n this.plugin_count = plugin_count;\n this.current_plugin = 0;\n this.calc_count = 0;\n this.update_tm = 0;\n this.old_from = 0;\n this.old_to = 0;\n this.old_min_interval = null;\n this.raf_id = null;\n this.dragging = false;\n this.force_redraw = false;\n this.no_diapason = false;\n this.is_key = false;\n this.is_update = false;\n this.is_start = true;\n this.is_finish = false;\n this.is_active = false;\n this.is_resize = false;\n this.is_click = false;\n\n // cache for links to all DOM elements\n this.$cache = {\n win: $(window),\n body: $(document.body),\n input: $(input),\n cont: null,\n rs: null,\n min: null,\n max: null,\n from: null,\n to: null,\n single: null,\n bar: null,\n line: null,\n s_single: null,\n s_from: null,\n s_to: null,\n shad_single: null,\n shad_from: null,\n shad_to: null,\n edge: null,\n grid: null,\n grid_labels: []\n };\n\n // storage for measure variables\n this.coords = {\n // left\n x_gap: 0,\n x_pointer: 0,\n\n // width\n w_rs: 0,\n w_rs_old: 0,\n w_handle: 0,\n\n // percents\n p_gap: 0,\n p_gap_left: 0,\n p_gap_right: 0,\n p_step: 0,\n p_pointer: 0,\n p_handle: 0,\n p_single_fake: 0,\n p_single_real: 0,\n p_from_fake: 0,\n p_from_real: 0,\n p_to_fake: 0,\n p_to_real: 0,\n p_bar_x: 0,\n p_bar_w: 0,\n\n // grid\n grid_gap: 0,\n big_num: 0,\n big: [],\n big_w: [],\n big_p: [],\n big_x: []\n };\n\n // storage for labels measure variables\n this.labels = {\n // width\n w_min: 0,\n w_max: 0,\n w_from: 0,\n w_to: 0,\n w_single: 0,\n\n // percents\n p_min: 0,\n p_max: 0,\n p_from_fake: 0,\n p_from_left: 0,\n p_to_fake: 0,\n p_to_left: 0,\n p_single_fake: 0,\n p_single_left: 0\n };\n\n\n\n /**\n * get and validate config\n */\n var $inp = this.$cache.input,\n val = $inp.prop(\"value\"),\n config, config_from_data, prop;\n\n // default config\n config = {\n type: \"single\",\n\n min: 10,\n max: 100,\n from: null,\n to: null,\n step: 1,\n\n min_interval: 0,\n max_interval: 0,\n drag_interval: false,\n\n values: [],\n p_values: [],\n\n from_fixed: false,\n from_min: null,\n from_max: null,\n from_shadow: false,\n\n to_fixed: false,\n to_min: null,\n to_max: null,\n to_shadow: false,\n\n prettify_enabled: true,\n prettify_separator: \" \",\n prettify: null,\n\n force_edges: false,\n\n keyboard: false,\n keyboard_step: 5,\n\n grid: false,\n grid_margin: true,\n grid_num: 4,\n grid_snap: false,\n\n hide_min_max: false,\n hide_from_to: false,\n\n prefix: \"\",\n postfix: \"\",\n max_postfix: \"\",\n decorate_both: true,\n values_separator: \" — \",\n\n input_values_separator: \";\",\n\n disable: false,\n\n onStart: null,\n onChange: null,\n onFinish: null,\n onUpdate: null\n };\n\n\n\n // config from data-attributes extends js config\n config_from_data = {\n type: $inp.data(\"type\"),\n\n min: $inp.data(\"min\"),\n max: $inp.data(\"max\"),\n from: $inp.data(\"from\"),\n to: $inp.data(\"to\"),\n step: $inp.data(\"step\"),\n\n min_interval: $inp.data(\"minInterval\"),\n max_interval: $inp.data(\"maxInterval\"),\n drag_interval: $inp.data(\"dragInterval\"),\n\n values: $inp.data(\"values\"),\n\n from_fixed: $inp.data(\"fromFixed\"),\n from_min: $inp.data(\"fromMin\"),\n from_max: $inp.data(\"fromMax\"),\n from_shadow: $inp.data(\"fromShadow\"),\n\n to_fixed: $inp.data(\"toFixed\"),\n to_min: $inp.data(\"toMin\"),\n to_max: $inp.data(\"toMax\"),\n to_shadow: $inp.data(\"toShadow\"),\n\n prettify_enabled: $inp.data(\"prettifyEnabled\"),\n prettify_separator: $inp.data(\"prettifySeparator\"),\n\n force_edges: $inp.data(\"forceEdges\"),\n\n keyboard: $inp.data(\"keyboard\"),\n keyboard_step: $inp.data(\"keyboardStep\"),\n\n grid: $inp.data(\"grid\"),\n grid_margin: $inp.data(\"gridMargin\"),\n grid_num: $inp.data(\"gridNum\"),\n grid_snap: $inp.data(\"gridSnap\"),\n\n hide_min_max: $inp.data(\"hideMinMax\"),\n hide_from_to: $inp.data(\"hideFromTo\"),\n\n prefix: $inp.data(\"prefix\"),\n postfix: $inp.data(\"postfix\"),\n max_postfix: $inp.data(\"maxPostfix\"),\n decorate_both: $inp.data(\"decorateBoth\"),\n values_separator: $inp.data(\"valuesSeparator\"),\n\n input_values_separator: $inp.data(\"inputValuesSeparator\"),\n\n disable: $inp.data(\"disable\")\n };\n config_from_data.values = config_from_data.values && config_from_data.values.split(\",\");\n\n for (prop in config_from_data) {\n if (config_from_data.hasOwnProperty(prop)) {\n if (!config_from_data[prop] && config_from_data[prop] !== 0) {\n delete config_from_data[prop];\n }\n }\n }\n\n\n\n // input value extends default config\n if (val) {\n val = val.split(config_from_data.input_values_separator || options.input_values_separator || \";\");\n\n if (val[0] && val[0] == +val[0]) {\n val[0] = +val[0];\n }\n if (val[1] && val[1] == +val[1]) {\n val[1] = +val[1];\n }\n\n if (options && options.values && options.values.length) {\n config.from = val[0] && options.values.indexOf(val[0]);\n config.to = val[1] && options.values.indexOf(val[1]);\n } else {\n config.from = val[0] && +val[0];\n config.to = val[1] && +val[1];\n }\n }\n\n\n\n // js config extends default config\n $.extend(config, options);\n\n\n // data config extends config\n $.extend(config, config_from_data);\n this.options = config;\n\n\n\n // validate config, to be sure that all data types are correct\n this.validate();\n\n\n\n // default result object, returned to callbacks\n this.result = {\n input: this.$cache.input,\n slider: null,\n\n min: this.options.min,\n max: this.options.max,\n\n from: this.options.from,\n from_percent: 0,\n from_value: null,\n\n to: this.options.to,\n to_percent: 0,\n to_value: null\n };\n\n\n\n this.init();\n };\n\n IonRangeSlider.prototype = {\n\n /**\n * Starts or updates the plugin instance\n *\n * @param is_update {boolean}\n */\n init: function (is_update) {\n this.no_diapason = false;\n this.coords.p_step = this.convertToPercent(this.options.step, true);\n\n this.target = \"base\";\n\n this.toggleInput();\n this.append();\n this.setMinMax();\n\n if (is_update) {\n this.force_redraw = true;\n this.calc(true);\n\n // callbacks called\n this.callOnUpdate();\n } else {\n this.force_redraw = true;\n this.calc(true);\n\n // callbacks called\n this.callOnStart();\n }\n\n this.updateScene();\n },\n\n /**\n * Appends slider template to a DOM\n */\n append: function () {\n var container_html = '<span class=\"irs js-irs-' + this.plugin_count + '\"></span>';\n this.$cache.input.before(container_html);\n this.$cache.input.prop(\"readonly\", true);\n this.$cache.cont = this.$cache.input.prev();\n this.result.slider = this.$cache.cont;\n\n this.$cache.cont.html(base_html);\n this.$cache.rs = this.$cache.cont.find(\".irs\");\n this.$cache.min = this.$cache.cont.find(\".irs-min\");\n this.$cache.max = this.$cache.cont.find(\".irs-max\");\n this.$cache.from = this.$cache.cont.find(\".irs-from\");\n this.$cache.to = this.$cache.cont.find(\".irs-to\");\n this.$cache.single = this.$cache.cont.find(\".irs-single\");\n this.$cache.bar = this.$cache.cont.find(\".irs-bar\");\n this.$cache.line = this.$cache.cont.find(\".irs-line\");\n this.$cache.grid = this.$cache.cont.find(\".irs-grid\");\n\n if (this.options.type === \"single\") {\n this.$cache.cont.append(single_html);\n this.$cache.edge = this.$cache.cont.find(\".irs-bar-edge\");\n this.$cache.s_single = this.$cache.cont.find(\".single\");\n this.$cache.from[0].style.visibility = \"hidden\";\n this.$cache.to[0].style.visibility = \"hidden\";\n this.$cache.shad_single = this.$cache.cont.find(\".shadow-single\");\n } else {\n this.$cache.cont.append(double_html);\n this.$cache.s_from = this.$cache.cont.find(\".from\");\n this.$cache.s_to = this.$cache.cont.find(\".to\");\n this.$cache.shad_from = this.$cache.cont.find(\".shadow-from\");\n this.$cache.shad_to = this.$cache.cont.find(\".shadow-to\");\n\n this.setTopHandler();\n }\n\n if (this.options.hide_from_to) {\n this.$cache.from[0].style.display = \"none\";\n this.$cache.to[0].style.display = \"none\";\n this.$cache.single[0].style.display = \"none\";\n }\n\n this.appendGrid();\n\n if (this.options.disable) {\n this.appendDisableMask();\n this.$cache.input[0].disabled = true;\n } else {\n this.$cache.cont.removeClass(\"irs-disabled\");\n this.$cache.input[0].disabled = false;\n this.bindEvents();\n }\n\n if (this.options.drag_interval) {\n this.$cache.bar[0].style.cursor = \"ew-resize\";\n }\n },\n\n /**\n * Determine which handler has a priority\n * works only for double slider type\n */\n setTopHandler: function () {\n var min = this.options.min,\n max = this.options.max,\n from = this.options.from,\n to = this.options.to;\n\n if (from > min && to === max) {\n this.$cache.s_from.addClass(\"type_last\");\n } else if (to < max) {\n this.$cache.s_to.addClass(\"type_last\");\n }\n },\n\n /**\n * Determine which handles was clicked last\n * and which handler should have hover effect\n *\n * @param target {String}\n */\n changeLevel: function (target) {\n switch (target) {\n case \"single\":\n this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_single_fake);\n break;\n case \"from\":\n this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_from_fake);\n this.$cache.s_from.addClass(\"state_hover\");\n this.$cache.s_from.addClass(\"type_last\");\n this.$cache.s_to.removeClass(\"type_last\");\n break;\n case \"to\":\n this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_to_fake);\n this.$cache.s_to.addClass(\"state_hover\");\n this.$cache.s_to.addClass(\"type_last\");\n this.$cache.s_from.removeClass(\"type_last\");\n break;\n case \"both\":\n this.coords.p_gap_left = this.toFixed(this.coords.p_pointer - this.coords.p_from_fake);\n this.coords.p_gap_right = this.toFixed(this.coords.p_to_fake - this.coords.p_pointer);\n this.$cache.s_to.removeClass(\"type_last\");\n this.$cache.s_from.removeClass(\"type_last\");\n break;\n }\n },\n\n /**\n * Then slider is disabled\n * appends extra layer with opacity\n */\n appendDisableMask: function () {\n this.$cache.cont.append(disable_html);\n this.$cache.cont.addClass(\"irs-disabled\");\n },\n\n /**\n * Remove slider instance\n * and ubind all events\n */\n remove: function () {\n this.$cache.cont.remove();\n this.$cache.cont = null;\n\n this.$cache.line.off(\"keydown.irs_\" + this.plugin_count);\n\n this.$cache.body.off(\"touchmove.irs_\" + this.plugin_count);\n this.$cache.body.off(\"mousemove.irs_\" + this.plugin_count);\n\n this.$cache.win.off(\"touchend.irs_\" + this.plugin_count);\n this.$cache.win.off(\"mouseup.irs_\" + this.plugin_count);\n\n if (is_old_ie) {\n this.$cache.body.off(\"mouseup.irs_\" + this.plugin_count);\n this.$cache.body.off(\"mouseleave.irs_\" + this.plugin_count);\n }\n\n this.$cache.grid_labels = [];\n this.coords.big = [];\n this.coords.big_w = [];\n this.coords.big_p = [];\n this.coords.big_x = [];\n\n cancelAnimationFrame(this.raf_id);\n },\n\n /**\n * bind all slider events\n */\n bindEvents: function () {\n if (this.no_diapason) {\n return;\n }\n\n this.$cache.body.on(\"touchmove.irs_\" + this.plugin_count, this.pointerMove.bind(this));\n this.$cache.body.on(\"mousemove.irs_\" + this.plugin_count, this.pointerMove.bind(this));\n\n this.$cache.win.on(\"touchend.irs_\" + this.plugin_count, this.pointerUp.bind(this));\n this.$cache.win.on(\"mouseup.irs_\" + this.plugin_count, this.pointerUp.bind(this));\n\n this.$cache.line.on(\"touchstart.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n this.$cache.line.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n\n if (this.options.drag_interval && this.options.type === \"double\") {\n this.$cache.bar.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"both\"));\n this.$cache.bar.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"both\"));\n } else {\n this.$cache.bar.on(\"touchstart.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n this.$cache.bar.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n }\n\n if (this.options.type === \"single\") {\n this.$cache.single.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"single\"));\n this.$cache.s_single.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"single\"));\n this.$cache.shad_single.on(\"touchstart.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n\n this.$cache.single.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"single\"));\n this.$cache.s_single.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"single\"));\n this.$cache.edge.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n this.$cache.shad_single.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n } else {\n this.$cache.single.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, null));\n this.$cache.single.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, null));\n\n this.$cache.from.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"from\"));\n this.$cache.s_from.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"from\"));\n this.$cache.to.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"to\"));\n this.$cache.s_to.on(\"touchstart.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"to\"));\n this.$cache.shad_from.on(\"touchstart.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n this.$cache.shad_to.on(\"touchstart.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n\n this.$cache.from.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"from\"));\n this.$cache.s_from.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"from\"));\n this.$cache.to.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"to\"));\n this.$cache.s_to.on(\"mousedown.irs_\" + this.plugin_count, this.pointerDown.bind(this, \"to\"));\n this.$cache.shad_from.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n this.$cache.shad_to.on(\"mousedown.irs_\" + this.plugin_count, this.pointerClick.bind(this, \"click\"));\n }\n\n if (this.options.keyboard) {\n this.$cache.line.on(\"keydown.irs_\" + this.plugin_count, this.key.bind(this, \"keyboard\"));\n }\n\n if (is_old_ie) {\n this.$cache.body.on(\"mouseup.irs_\" + this.plugin_count, this.pointerUp.bind(this));\n this.$cache.body.on(\"mouseleave.irs_\" + this.plugin_count, this.pointerUp.bind(this));\n }\n },\n\n /**\n * Mousemove or touchmove\n * only for handlers\n *\n * @param e {Object} event object\n */\n pointerMove: function (e) {\n if (!this.dragging) {\n return;\n }\n\n var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;\n this.coords.x_pointer = x - this.coords.x_gap;\n\n this.calc();\n },\n\n /**\n * Mouseup or touchend\n * only for handlers\n *\n * @param e {Object} event object\n */\n pointerUp: function (e) {\n if (this.current_plugin !== this.plugin_count) {\n return;\n }\n\n if (this.is_active) {\n this.is_active = false;\n } else {\n return;\n }\n\n this.$cache.cont.find(\".state_hover\").removeClass(\"state_hover\");\n\n this.force_redraw = true;\n\n if (is_old_ie) {\n $(\"*\").prop(\"unselectable\", false);\n }\n\n this.updateScene();\n this.restoreOriginalMinInterval();\n\n // callbacks call\n if ($.contains(this.$cache.cont[0], e.target) || this.dragging) {\n this.is_finish = true;\n this.callOnFinish();\n }\n \n this.dragging = false;\n },\n\n /**\n * Mousedown or touchstart\n * only for handlers\n *\n * @param target {String|null}\n * @param e {Object} event object\n */\n pointerDown: function (target, e) {\n e.preventDefault();\n var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;\n if (e.button === 2) {\n return;\n }\n\n if (target === \"both\") {\n this.setTempMinInterval();\n }\n\n if (!target) {\n target = this.target;\n }\n\n this.current_plugin = this.plugin_count;\n this.target = target;\n\n this.is_active = true;\n this.dragging = true;\n\n this.coords.x_gap = this.$cache.rs.offset().left;\n this.coords.x_pointer = x - this.coords.x_gap;\n\n this.calcPointerPercent();\n this.changeLevel(target);\n\n if (is_old_ie) {\n $(\"*\").prop(\"unselectable\", true);\n }\n\n this.$cache.line.trigger(\"focus\");\n\n this.updateScene();\n },\n\n /**\n * Mousedown or touchstart\n * for other slider elements, like diapason line\n *\n * @param target {String}\n * @param e {Object} event object\n */\n pointerClick: function (target, e) {\n e.preventDefault();\n var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;\n if (e.button === 2) {\n return;\n }\n\n this.current_plugin = this.plugin_count;\n this.target = target;\n\n this.is_click = true;\n this.coords.x_gap = this.$cache.rs.offset().left;\n this.coords.x_pointer = +(x - this.coords.x_gap).toFixed();\n\n this.force_redraw = true;\n this.calc();\n\n this.$cache.line.trigger(\"focus\");\n },\n\n /**\n * Keyborard controls for focused slider\n *\n * @param target {String}\n * @param e {Object} event object\n * @returns {boolean|undefined}\n */\n key: function (target, e) {\n if (this.current_plugin !== this.plugin_count || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {\n return;\n }\n\n switch (e.which) {\n case 83: // W\n case 65: // A\n case 40: // DOWN\n case 37: // LEFT\n e.preventDefault();\n this.moveByKey(false);\n break;\n\n case 87: // S\n case 68: // D\n case 38: // UP\n case 39: // RIGHT\n e.preventDefault();\n this.moveByKey(true);\n break;\n }\n\n return true;\n },\n\n /**\n * Move by key. Beta\n * @todo refactor than have plenty of time\n *\n * @param right {boolean} direction to move\n */\n moveByKey: function (right) {\n var p = this.coords.p_pointer;\n\n if (right) {\n p += this.options.keyboard_step;\n } else {\n p -= this.options.keyboard_step;\n }\n\n this.coords.x_pointer = this.toFixed(this.coords.w_rs / 100 * p);\n this.is_key = true;\n this.calc();\n },\n\n /**\n * Set visibility and content\n * of Min and Max labels\n */\n setMinMax: function () {\n if (!this.options) {\n return;\n }\n\n if (this.options.hide_min_max) {\n this.$cache.min[0].style.display = \"none\";\n this.$cache.max[0].style.display = \"none\";\n return;\n }\n\n if (this.options.values.length) {\n this.$cache.min.html(this.decorate(this.options.p_values[this.options.min]));\n this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));\n } else {\n this.$cache.min.html(this.decorate(this._prettify(this.options.min), this.options.min));\n this.$cache.max.html(this.decorate(this._prettify(this.options.max), this.options.max));\n }\n\n this.labels.w_min = this.$cache.min.outerWidth(false);\n this.labels.w_max = this.$cache.max.outerWidth(false);\n },\n\n /**\n * Then dragging interval, prevent interval collapsing\n * using min_interval option\n */\n setTempMinInterval: function () {\n var interval = this.result.to - this.result.from;\n\n if (this.old_min_interval === null) {\n this.old_min_interval = this.options.min_interval;\n }\n\n this.options.min_interval = interval;\n },\n\n /**\n * Restore min_interval option to original\n */\n restoreOriginalMinInterval: function () {\n if (this.old_min_interval !== null) {\n this.options.min_interval = this.old_min_interval;\n this.old_min_interval = null;\n }\n },\n\n\n\n // =============================================================================================================\n // Calculations\n\n /**\n * All calculations and measures start here\n *\n * @param update {boolean=}\n */\n calc: function (update) {\n if (!this.options) {\n return;\n }\n\n this.calc_count++;\n\n if (this.calc_count === 10 || update) {\n this.calc_count = 0;\n this.coords.w_rs = this.$cache.rs.outerWidth(false);\n\n this.calcHandlePercent();\n }\n\n if (!this.coords.w_rs) {\n return;\n }\n\n this.calcPointerPercent();\n var handle_x = this.getHandleX();\n\n if (this.target === \"click\") {\n this.coords.p_gap = this.coords.p_handle / 2;\n handle_x = this.getHandleX();\n\n if (this.options.drag_interval) {\n this.target = \"both_one\";\n } else {\n this.target = this.chooseHandle(handle_x);\n }\n }\n\n switch (this.target) {\n case \"base\":\n var w = (this.options.max - this.options.min) / 100,\n f = (this.result.from - this.options.min) / w,\n t = (this.result.to - this.options.min) / w;\n\n this.coords.p_single_real = this.toFixed(f);\n this.coords.p_from_real = this.toFixed(f);\n this.coords.p_to_real = this.toFixed(t);\n\n this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max);\n this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);\n this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);\n\n this.coords.p_single_fake = this.convertToFakePercent(this.coords.p_single_real);\n this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);\n this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);\n\n this.target = null;\n\n break;\n\n case \"single\":\n if (this.options.from_fixed) {\n break;\n }\n\n this.coords.p_single_real = this.convertToRealPercent(handle_x);\n this.coords.p_single_real = this.calcWithStep(this.coords.p_single_real);\n this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max);\n\n this.coords.p_single_fake = this.convertToFakePercent(this.coords.p_single_real);\n\n break;\n\n case \"from\":\n if (this.options.from_fixed) {\n break;\n }\n\n this.coords.p_from_real = this.convertToRealPercent(handle_x);\n this.coords.p_from_real = this.calcWithStep(this.coords.p_from_real);\n if (this.coords.p_from_real > this.coords.p_to_real) {\n this.coords.p_from_real = this.coords.p_to_real;\n }\n this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);\n this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, \"from\");\n this.coords.p_from_real = this.checkMaxInterval(this.coords.p_from_real, this.coords.p_to_real, \"from\");\n\n this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);\n\n break;\n\n case \"to\":\n if (this.options.to_fixed) {\n break;\n }\n\n this.coords.p_to_real = this.convertToRealPercent(handle_x);\n this.coords.p_to_real = this.calcWithStep(this.coords.p_to_real);\n if (this.coords.p_to_real < this.coords.p_from_real) {\n this.coords.p_to_real = this.coords.p_from_real;\n }\n this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);\n this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, \"to\");\n this.coords.p_to_real = this.checkMaxInterval(this.coords.p_to_real, this.coords.p_from_real, \"to\");\n\n this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);\n\n break;\n\n case \"both\":\n if (this.options.from_fixed || this.options.to_fixed) {\n break;\n }\n\n handle_x = this.toFixed(handle_x + (this.coords.p_handle * 0.1));\n\n this.coords.p_from_real = this.convertToRealPercent(handle_x) - this.coords.p_gap_left;\n this.coords.p_from_real = this.calcWithStep(this.coords.p_from_real);\n this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);\n this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, \"from\");\n this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);\n\n this.coords.p_to_real = this.convertToRealPercent(handle_x) + this.coords.p_gap_right;\n this.coords.p_to_real = this.calcWithStep(this.coords.p_to_real);\n this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);\n this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, \"to\");\n this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);\n\n break;\n\n case \"both_one\":\n if (this.options.from_fixed || this.options.to_fixed) {\n break;\n }\n\n var real_x = this.convertToRealPercent(handle_x),\n from = this.result.from_percent,\n to = this.result.to_percent,\n full = to - from,\n half = full / 2,\n new_from = real_x - half,\n new_to = real_x + half;\n\n if (new_from < 0) {\n new_from = 0;\n new_to = new_from + full;\n }\n\n if (new_to > 100) {\n new_to = 100;\n new_from = new_to - full;\n }\n\n this.coords.p_from_real = this.calcWithStep(new_from);\n this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);\n this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);\n\n this.coords.p_to_real = this.calcWithStep(new_to);\n this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);\n this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);\n\n break;\n }\n\n if (this.options.type === \"single\") {\n this.coords.p_bar_x = (this.coords.p_handle / 2);\n this.coords.p_bar_w = this.coords.p_single_fake;\n\n this.result.from_percent = this.coords.p_single_real;\n this.result.from = this.convertToValue(this.coords.p_single_real);\n\n if (this.options.values.length) {\n this.result.from_value = this.options.values[this.result.from];\n }\n } else {\n this.coords.p_bar_x = this.toFixed(this.coords.p_from_fake + (this.coords.p_handle / 2));\n this.coords.p_bar_w = this.toFixed(this.coords.p_to_fake - this.coords.p_from_fake);\n\n this.result.from_percent = this.coords.p_from_real;\n this.result.from = this.convertToValue(this.coords.p_from_real);\n this.result.to_percent = this.coords.p_to_real;\n this.result.to = this.convertToValue(this.coords.p_to_real);\n\n if (this.options.values.length) {\n this.result.from_value = this.options.values[this.result.from];\n this.result.to_value = this.options.values[this.result.to];\n }\n }\n\n this.calcMinMax();\n this.calcLabels();\n },\n\n\n /**\n * calculates pointer X in percent\n */\n calcPointerPercent: function () {\n if (!this.coords.w_rs) {\n this.coords.p_pointer = 0;\n return;\n }\n\n if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer) ) {\n this.coords.x_pointer = 0;\n } else if (this.coords.x_pointer > this.coords.w_rs) {\n this.coords.x_pointer = this.coords.w_rs;\n }\n\n this.coords.p_pointer = this.toFixed(this.coords.x_pointer / this.coords.w_rs * 100);\n },\n\n convertToRealPercent: function (fake) {\n var full = 100 - this.coords.p_handle;\n return fake / full * 100;\n },\n\n convertToFakePercent: function (real) {\n var full = 100 - this.coords.p_handle;\n return real / 100 * full;\n },\n\n getHandleX: function () {\n var max = 100 - this.coords.p_handle,\n x = this.toFixed(this.coords.p_pointer - this.coords.p_gap);\n\n if (x < 0) {\n x = 0;\n } else if (x > max) {\n x = max;\n }\n\n return x;\n },\n\n calcHandlePercent: function () {\n if (this.options.type === \"single\") {\n this.coords.w_handle = this.$cache.s_single.outerWidth(false);\n } else {\n this.coords.w_handle = this.$cache.s_from.outerWidth(false);\n }\n\n this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100);\n },\n\n /**\n * Find closest handle to pointer click\n *\n * @param real_x {Number}\n * @returns {String}\n */\n chooseHandle: function (real_x) {\n if (this.options.type === \"single\") {\n return \"single\";\n } else {\n var m_point = this.coords.p_from_real + ((this.coords.p_to_real - this.coords.p_from_real) / 2);\n if (real_x >= m_point) {\n return this.options.to_fixed ? \"from\" : \"to\";\n } else {\n return this.options.from_fixed ? \"to\" : \"from\";\n }\n }\n },\n\n /**\n * Measure Min and Max labels width in percent\n */\n calcMinMax: function () {\n if (!this.coords.w_rs) {\n return;\n }\n\n this.labels.p_min = this.labels.w_min / this.coords.w_rs * 100;\n this.labels.p_max = this.labels.w_max / this.coords.w_rs * 100;\n },\n\n /**\n * Measure labels width and X in percent\n */\n calcLabels: function () {\n if (!this.coords.w_rs || this.options.hide_from_to) {\n return;\n }\n\n if (this.options.type === \"single\") {\n\n this.labels.w_single = this.$cache.single.outerWidth(false);\n this.labels.p_single_fake = this.labels.w_single / this.coords.w_rs * 100;\n this.labels.p_single_left = this.coords.p_single_fake + (this.coords.p_handle / 2) - (this.labels.p_single_fake / 2);\n this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single_fake);\n\n } else {\n\n this.labels.w_from = this.$cache.from.outerWidth(false);\n this.labels.p_from_fake = this.labels.w_from / this.coords.w_rs * 100;\n this.labels.p_from_left = this.coords.p_from_fake + (this.coords.p_handle / 2) - (this.labels.p_from_fake / 2);\n this.labels.p_from_left = this.toFixed(this.labels.p_from_left);\n this.labels.p_from_left = this.checkEdges(this.labels.p_from_left, this.labels.p_from_fake);\n\n this.labels.w_to = this.$cache.to.outerWidth(false);\n this.labels.p_to_fake = this.labels.w_to / this.coords.w_rs * 100;\n this.labels.p_to_left = this.coords.p_to_fake + (this.coords.p_handle / 2) - (this.labels.p_to_fake / 2);\n this.labels.p_to_left = this.toFixed(this.labels.p_to_left);\n this.labels.p_to_left = this.checkEdges(this.labels.p_to_left, this.labels.p_to_fake);\n\n this.labels.w_single = this.$cache.single.outerWidth(false);\n this.labels.p_single_fake = this.labels.w_single / this.coords.w_rs * 100;\n this.labels.p_single_left = ((this.labels.p_from_left + this.labels.p_to_left + this.labels.p_to_fake) / 2) - (this.labels.p_single_fake / 2);\n this.labels.p_single_left = this.toFixed(this.labels.p_single_left);\n this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single_fake);\n\n }\n },\n\n\n\n // =============================================================================================================\n // Drawings\n\n /**\n * Main function called in request animation frame\n * to update everything\n */\n updateScene: function () {\n if (this.raf_id) {\n cancelAnimationFrame(this.raf_id);\n this.raf_id = null;\n }\n\n clearTimeout(this.update_tm);\n this.update_tm = null;\n\n if (!this.options) {\n return;\n }\n\n this.drawHandles();\n\n if (this.is_active) {\n this.raf_id = requestAnimationFrame(this.updateScene.bind(this));\n } else {\n this.update_tm = setTimeout(this.updateScene.bind(this), 300);\n }\n },\n\n /**\n * Draw handles\n */\n drawHandles: function () {\n this.coords.w_rs = this.$cache.rs.outerWidth(false);\n\n if (!this.coords.w_rs) {\n return;\n }\n\n if (this.coords.w_rs !== this.coords.w_rs_old) {\n this.target = \"base\";\n this.is_resize = true;\n }\n\n if (this.coords.w_rs !== this.coords.w_rs_old || this.force_redraw) {\n this.setMinMax();\n this.calc(true);\n this.drawLabels();\n if (this.options.grid) {\n this.calcGridMargin();\n this.calcGridLabels();\n }\n this.force_redraw = true;\n this.coords.w_rs_old = this.coords.w_rs;\n this.drawShadow();\n }\n\n if (!this.coords.w_rs) {\n return;\n }\n\n if (!this.dragging && !this.force_redraw && !this.is_key) {\n return;\n }\n\n if (this.old_from !== this.result.from || this.old_to !== this.result.to || this.force_redraw || this.is_key) {\n\n this.drawLabels();\n\n this.$cache.bar[0].style.left = this.coords.p_bar_x + \"%\";\n this.$cache.bar[0].style.width = this.coords.p_bar_w + \"%\";\n\n if (this.options.type === \"single\") {\n this.$cache.s_single[0].style.left = this.coords.p_single_fake + \"%\";\n\n this.$cache.single[0].style.left = this.labels.p_single_left + \"%\";\n\n if (this.options.values.length) {\n this.$cache.input.prop(\"value\", this.result.from_value);\n } else {\n this.$cache.input.prop(\"value\", this.result.from);\n }\n this.$cache.input.data(\"from\", this.result.from);\n } else {\n this.$cache.s_from[0].style.left = this.coords.p_from_fake + \"%\";\n this.$cache.s_to[0].style.left = this.coords.p_to_fake + \"%\";\n\n if (this.old_from !== this.result.from || this.force_redraw) {\n this.$cache.from[0].style.left = this.labels.p_from_left + \"%\";\n }\n if (this.old_to !== this.result.to || this.force_redraw) {\n this.$cache.to[0].style.left = this.labels.p_to_left + \"%\";\n }\n\n this.$cache.single[0].style.left = this.labels.p_single_left + \"%\";\n\n if (this.options.values.length) {\n this.$cache.input.prop(\"value\", this.result.from_value + this.options.input_values_separator + this.result.to_value);\n } else {\n this.$cache.input.prop(\"value\", this.result.from + this.options.input_values_separator + this.result.to);\n }\n this.$cache.input.data(\"from\", this.result.from);\n this.$cache.input.data(\"to\", this.result.to);\n }\n\n if ((this.old_from !== this.result.from || this.old_to !== this.result.to) && !this.is_start) {\n this.$cache.input.trigger(\"change\");\n }\n\n this.old_from = this.result.from;\n this.old_to = this.result.to;\n\n // callbacks call\n if (!this.is_resize && !this.is_update && !this.is_start && !this.is_finish) {\n this.callOnChange();\n }\n if (this.is_key || this.is_click) {\n this.is_key = false;\n this.is_click = false;\n this.callOnFinish();\n }\n\n this.is_update = false;\n this.is_resize = false;\n this.is_finish = false;\n }\n\n this.is_start = false;\n this.is_key = false;\n this.is_click = false;\n this.force_redraw = false;\n },\n\n /**\n * Draw labels\n * measure labels collisions\n * collapse close labels\n */\n drawLabels: function () {\n if (!this.options) {\n return;\n }\n\n var values_num = this.options.values.length,\n p_values = this.options.p_values,\n text_single,\n text_from,\n text_to;\n\n if (this.options.hide_from_to) {\n return;\n }\n\n if (this.options.type === \"single\") {\n\n if (values_num) {\n text_single = this.decorate(p_values[this.result.from]);\n this.$cache.single.html(text_single);\n } else {\n text_single = this.decorate(this._prettify(this.result.from), this.result.from);\n this.$cache.single.html(text_single);\n }\n\n this.calcLabels();\n\n if (this.labels.p_single_left < this.labels.p_min + 1) {\n this.$cache.min[0].style.visibility = \"hidden\";\n } else {\n this.$cache.min[0].style.visibility = \"visible\";\n }\n\n if (this.labels.p_single_left + this.labels.p_single_fake > 100 - this.labels.p_max - 1) {\n this.$cache.max[0].style.visibility = \"hidden\";\n } else {\n this.$cache.max[0].style.visibility = \"visible\";\n }\n\n } else {\n\n if (values_num) {\n\n if (this.options.decorate_both) {\n text_single = this.decorate(p_values[this.result.from]);\n text_single += this.options.values_separator;\n text_single += this.decorate(p_values[this.result.to]);\n } else {\n text_single = this.decorate(p_values[this.result.from] + this.options.values_separator + p_values[this.result.to]);\n }\n text_from = this.decorate(p_values[this.result.from]);\n text_to = this.decorate(p_values[this.result.to]);\n\n this.$cache.single.html(text_single);\n this.$cache.from.html(text_from);\n this.$cache.to.html(text_to);\n\n } else {\n\n if (this.options.decorate_both) {\n text_single = this.decorate(this._prettify(this.result.from), this.result.from);\n text_single += this.options.values_separator;\n text_single += this.decorate(this._prettify(this.result.to), this.result.to);\n } else {\n text_single = this.decorate(this._prettify(this.result.from) + this.options.values_separator + this._prettify(this.result.to), this.result.to);\n }\n text_from = this.decorate(this._prettify(this.result.from), this.result.from);\n text_to = this.decorate(this._prettify(this.result.to), this.result.to);\n\n this.$cache.single.html(text_single);\n this.$cache.from.html(text_from);\n this.$cache.to.html(text_to);\n\n }\n\n this.calcLabels();\n\n var min = Math.min(this.labels.p_single_left, this.labels.p_from_left),\n single_left = this.labels.p_single_left + this.labels.p_single_fake,\n to_left = this.labels.p_to_left + this.labels.p_to_fake,\n max = Math.max(single_left, to_left);\n\n if (this.labels.p_from_left + this.labels.p_from_fake >= this.labels.p_to_left) {\n this.$cache.from[0].style.visibility = \"hidden\";\n this.$cache.to[0].style.visibility = \"hidden\";\n this.$cache.single[0].style.visibility = \"visible\";\n\n if (this.result.from === this.result.to) {\n if (this.target === \"from\") {\n this.$cache.from[0].style.visibility = \"visible\";\n } else if (this.target === \"to\") {\n this.$cache.to[0].style.visibility = \"visible\";\n }\n this.$cache.single[0].style.visibility = \"hidden\";\n max = to_left;\n } else {\n this.$cache.from[0].style.visibility = \"hidden\";\n this.$cache.to[0].style.visibility = \"hidden\";\n this.$cache.single[0].style.visibility = \"visible\";\n max = Math.max(single_left, to_left);\n }\n } else {\n this.$cache.from[0].style.visibility = \"visible\";\n this.$cache.to[0].style.visibility = \"visible\";\n this.$cache.single[0].style.visibility = \"hidden\";\n }\n\n if (min < this.labels.p_min + 1) {\n this.$cache.min[0].style.visibility = \"hidden\";\n } else {\n this.$cache.min[0].style.visibility = \"visible\";\n }\n\n if (max > 100 - this.labels.p_max - 1) {\n this.$cache.max[0].style.visibility = \"hidden\";\n } else {\n this.$cache.max[0].style.visibility = \"visible\";\n }\n\n }\n },\n\n /**\n * Draw shadow intervals\n */\n drawShadow: function () {\n var o = this.options,\n c = this.$cache,\n\n is_from_min = typeof o.from_min === \"number\" && !isNaN(o.from_min),\n is_from_max = typeof o.from_max === \"number\" && !isNaN(o.from_max),\n is_to_min = typeof o.to_min === \"number\" && !isNaN(o.to_min),\n is_to_max = typeof o.to_max === \"number\" && !isNaN(o.to_max),\n\n from_min,\n from_max,\n to_min,\n to_max;\n\n if (o.type === \"single\") {\n if (o.from_shadow && (is_from_min || is_from_max)) {\n from_min = this.convertToPercent(is_from_min ? o.from_min : o.min);\n from_max = this.convertToPercent(is_from_max ? o.from_max : o.max) - from_min;\n from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min));\n from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max));\n from_min = from_min + (this.coords.p_handle / 2);\n\n c.shad_single[0].style.display = \"block\";\n c.shad_single[0].style.left = from_min + \"%\";\n c.shad_single[0].style.width = from_max + \"%\";\n } else {\n c.shad_single[0].style.display = \"none\";\n }\n } else {\n if (o.from_shadow && (is_from_min || is_from_max)) {\n from_min = this.convertToPercent(is_from_min ? o.from_min : o.min);\n from_max = this.convertToPercent(is_from_max ? o.from_max : o.max) - from_min;\n from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min));\n from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max));\n from_min = from_min + (this.coords.p_handle / 2);\n\n c.shad_from[0].style.display = \"block\";\n c.shad_from[0].style.left = from_min + \"%\";\n c.shad_from[0].style.width = from_max + \"%\";\n } else {\n c.shad_from[0].style.display = \"none\";\n }\n\n if (o.to_shadow && (is_to_min || is_to_max)) {\n to_min = this.convertToPercent(is_to_min ? o.to_min : o.min);\n to_max = this.convertToPercent(is_to_max ? o.to_max : o.max) - to_min;\n to_min = this.toFixed(to_min - (this.coords.p_handle / 100 * to_min));\n to_max = this.toFixed(to_max - (this.coords.p_handle / 100 * to_max));\n to_min = to_min + (this.coords.p_handle / 2);\n\n c.shad_to[0].style.display = \"block\";\n c.shad_to[0].style.left = to_min + \"%\";\n c.shad_to[0].style.width = to_max + \"%\";\n } else {\n c.shad_to[0].style.display = \"none\";\n }\n }\n },\n\n\n\n // =============================================================================================================\n // Callbacks\n\n callOnStart: function () {\n if (this.options.onStart && typeof this.options.onStart === \"function\") {\n this.options.onStart(this.result);\n }\n },\n callOnChange: function () {\n if (this.options.onChange && typeof this.options.onChange === \"function\") {\n this.options.onChange(this.result);\n }\n },\n callOnFinish: function () {\n if (this.options.onFinish && typeof this.options.onFinish === \"function\") {\n this.options.onFinish(this.result);\n }\n },\n callOnUpdate: function () {\n if (this.options.onUpdate && typeof this.options.onUpdate === \"function\") {\n this.options.onUpdate(this.result);\n }\n },\n\n\n\n // =============================================================================================================\n // Service methods\n\n toggleInput: function () {\n this.$cache.input.toggleClass(\"irs-hidden-input\");\n },\n\n /**\n * Convert real value to percent\n *\n * @param value {Number} X in real\n * @param no_min {boolean=} don't use min value\n * @returns {Number} X in percent\n */\n convertToPercent: function (value, no_min) {\n var diapason = this.options.max - this.options.min,\n one_percent = diapason / 100,\n val, percent;\n\n if (!diapason) {\n this.no_diapason = true;\n return 0;\n }\n\n if (no_min) {\n val = value;\n } else {\n val = value - this.options.min;\n }\n\n percent = val / one_percent;\n\n return this.toFixed(percent);\n },\n\n /**\n * Convert percent to real values\n *\n * @param percent {Number} X in percent\n * @returns {Number} X in real\n */\n convertToValue: function (percent) {\n var min = this.options.min,\n max = this.options.max,\n min_decimals = min.toString().split(\".\")[1],\n max_decimals = max.toString().split(\".\")[1],\n min_length, max_length,\n avg_decimals = 0,\n abs = 0;\n\n if (percent === 0) {\n return this.options.min;\n }\n if (percent === 100) {\n return this.options.max;\n }\n\n\n if (min_decimals) {\n min_length = min_decimals.length;\n avg_decimals = min_length;\n }\n if (max_decimals) {\n max_length = max_decimals.length;\n avg_decimals = max_length;\n }\n if (min_length && max_length) {\n avg_decimals = (min_length >= max_length) ? min_length : max_length;\n }\n\n if (min < 0) {\n abs = Math.abs(min);\n min = +(min + abs).toFixed(avg_decimals);\n max = +(max + abs).toFixed(avg_decimals);\n }\n\n var number = ((max - min) / 100 * percent) + min,\n string = this.options.step.toString().split(\".\")[1],\n result;\n\n if (string) {\n number = +number.toFixed(string.length);\n } else {\n number = number / this.options.step;\n number = number * this.options.step;\n\n number = +number.toFixed(0);\n }\n\n if (abs) {\n number -= abs;\n }\n\n if (string) {\n result = +number.toFixed(string.length);\n } else {\n result = this.toFixed(number);\n }\n\n if (result < this.options.min) {\n result = this.options.min;\n } else if (result > this.options.max) {\n result = this.options.max;\n }\n\n return result;\n },\n\n /**\n * Round percent value with step\n *\n * @param percent {Number}\n * @returns percent {Number} rounded\n */\n calcWithStep: function (percent) {\n var rounded = Math.round(percent / this.coords.p_step) * this.coords.p_step;\n\n if (rounded > 100) {\n rounded = 100;\n }\n if (percent === 100) {\n rounded = 100;\n }\n\n return this.toFixed(rounded);\n },\n\n checkMinInterval: function (p_current, p_next, type) {\n var o = this.options,\n current,\n next;\n\n if (!o.min_interval) {\n return p_current;\n }\n\n current = this.convertToValue(p_current);\n next = this.convertToValue(p_next);\n\n if (type === \"from\") {\n\n if (next - current < o.min_interval) {\n current = next - o.min_interval;\n }\n\n } else {\n\n if (current - next < o.min_interval) {\n current = next + o.min_interval;\n }\n\n }\n\n return this.convertToPercent(current);\n },\n\n checkMaxInterval: function (p_current, p_next, type) {\n var o = this.options,\n current,\n next;\n\n if (!o.max_interval) {\n return p_current;\n }\n\n current = this.convertToValue(p_current);\n next = this.convertToValue(p_next);\n\n if (type === \"from\") {\n\n if (next - current > o.max_interval) {\n current = next - o.max_interval;\n }\n\n } else {\n\n if (current - next > o.max_interval) {\n current = next + o.max_interval;\n }\n\n }\n\n return this.convertToPercent(current);\n },\n\n checkDiapason: function (p_num, min, max) {\n var num = this.convertToValue(p_num),\n o = this.options;\n\n if (typeof min !== \"number\") {\n min = o.min;\n }\n\n if (typeof max !== \"number\") {\n max = o.max;\n }\n\n if (num < min) {\n num = min;\n }\n\n if (num > max) {\n num = max;\n }\n\n return this.convertToPercent(num);\n },\n\n toFixed: function (num) {\n num = num.toFixed(9);\n return +num;\n },\n\n _prettify: function (num) {\n if (!this.options.prettify_enabled) {\n return num;\n }\n\n if (this.options.prettify && typeof this.options.prettify === \"function\") {\n return this.options.prettify(num);\n } else {\n return this.prettify(num);\n }\n },\n\n prettify: function (num) {\n var n = num.toString();\n return n.replace(/(\\d{1,3}(?=(?:\\d\\d\\d)+(?!\\d)))/g, \"$1\" + this.options.prettify_separator);\n },\n\n checkEdges: function (left, width) {\n if (!this.options.force_edges) {\n return this.toFixed(left);\n }\n\n if (left < 0) {\n left = 0;\n } else if (left > 100 - width) {\n left = 100 - width;\n }\n\n return this.toFixed(left);\n },\n\n validate: function () {\n var o = this.options,\n r = this.result,\n v = o.values,\n vl = v.length,\n value,\n i;\n\n if (typeof o.min === \"string\") o.min = +o.min;\n if (typeof o.max === \"string\") o.max = +o.max;\n if (typeof o.from === \"string\") o.from = +o.from;\n if (typeof o.to === \"string\") o.to = +o.to;\n if (typeof o.step === \"string\") o.step = +o.step;\n\n if (typeof o.from_min === \"string\") o.from_min = +o.from_min;\n if (typeof o.from_max === \"string\") o.from_max = +o.from_max;\n if (typeof o.to_min === \"string\") o.to_min = +o.to_min;\n if (typeof o.to_max === \"string\") o.to_max = +o.to_max;\n\n if (typeof o.keyboard_step === \"string\") o.keyboard_step = +o.keyboard_step;\n if (typeof o.grid_num === \"string\") o.grid_num = +o.grid_num;\n\n if (o.max < o.min) {\n o.max = o.min;\n }\n\n if (vl) {\n o.p_values = [];\n o.min = 0;\n o.max = vl - 1;\n o.step = 1;\n o.grid_num = o.max;\n o.grid_snap = true;\n\n\n for (i = 0; i < vl; i++) {\n value = +v[i];\n\n if (!isNaN(value)) {\n v[i] = value;\n value = this._prettify(value);\n } else {\n value = v[i];\n }\n\n o.p_values.push(value);\n }\n }\n\n if (typeof o.from !== \"number\" || isNaN(o.from)) {\n o.from = o.min;\n }\n\n if (typeof o.to !== \"number\" || isNaN(o.from)) {\n o.to = o.max;\n }\n\n if (o.type === \"single\") {\n\n if (o.from < o.min) {\n o.from = o.min;\n }\n\n if (o.from > o.max) {\n o.from = o.max;\n }\n\n } else {\n\n if (o.from < o.min || o.from > o.max) {\n o.from = o.min;\n }\n if (o.to > o.max || o.to < o.min) {\n o.to = o.max;\n }\n if (o.from > o.to) {\n o.from = o.to;\n }\n\n }\n\n if (typeof o.step !== \"number\" || isNaN(o.step) || !o.step || o.step < 0) {\n o.step = 1;\n }\n\n if (typeof o.keyboard_step !== \"number\" || isNaN(o.keyboard_step) || !o.keyboard_step || o.keyboard_step < 0) {\n o.keyboard_step = 5;\n }\n\n if (typeof o.from_min === \"number\" && o.from < o.from_min) {\n o.from = o.from_min;\n }\n\n if (typeof o.from_max === \"number\" && o.from > o.from_max) {\n o.from = o.from_max;\n }\n\n if (typeof o.to_min === \"number\" && o.to < o.to_min) {\n o.to = o.to_min;\n }\n\n if (typeof o.to_max === \"number\" && o.from > o.to_max) {\n o.to = o.to_max;\n }\n\n if (r) {\n if (r.min !== o.min) {\n r.min = o.min;\n }\n\n if (r.max !== o.max) {\n r.max = o.max;\n }\n\n if (r.from < r.min || r.from > r.max) {\n r.from = o.from;\n }\n\n if (r.to < r.min || r.to > r.max) {\n r.to = o.to;\n }\n }\n\n if (typeof o.min_interval !== \"number\" || isNaN(o.min_interval) || !o.min_interval || o.min_interval < 0) {\n o.min_interval = 0;\n }\n\n if (typeof o.max_interval !== \"number\" || isNaN(o.max_interval) || !o.max_interval || o.max_interval < 0) {\n o.max_interval = 0;\n }\n\n if (o.min_interval && o.min_interval > o.max - o.min) {\n o.min_interval = o.max - o.min;\n }\n\n if (o.max_interval && o.max_interval > o.max - o.min) {\n o.max_interval = o.max - o.min;\n }\n },\n\n decorate: function (num, original) {\n var decorated = \"\",\n o = this.options;\n\n if (o.prefix) {\n decorated += o.prefix;\n }\n\n decorated += num;\n\n if (o.max_postfix) {\n if (o.values.length && num === o.p_values[o.max]) {\n decorated += o.max_postfix;\n if (o.postfix) {\n decorated += \" \";\n }\n } else if (original === o.max) {\n decorated += o.max_postfix;\n if (o.postfix) {\n decorated += \" \";\n }\n }\n }\n\n if (o.postfix) {\n decorated += o.postfix;\n }\n\n return decorated;\n },\n\n updateFrom: function () {\n this.result.from = this.options.from;\n this.result.from_percent = this.convertToPercent(this.result.from);\n if (this.options.values) {\n this.result.from_value = this.options.values[this.result.from];\n }\n },\n\n updateTo: function () {\n this.result.to = this.options.to;\n this.result.to_percent = this.convertToPercent(this.result.to);\n if (this.options.values) {\n this.result.to_value = this.options.values[this.result.to];\n }\n },\n\n updateResult: function () {\n this.result.min = this.options.min;\n this.result.max = this.options.max;\n this.updateFrom();\n this.updateTo();\n },\n\n\n // =============================================================================================================\n // Grid\n\n appendGrid: function () {\n if (!this.options.grid) {\n return;\n }\n\n var o = this.options,\n i, z,\n\n total = o.max - o.min,\n big_num = o.grid_num,\n big_p = 0,\n big_w = 0,\n\n small_max = 4,\n local_small_max,\n small_p,\n small_w = 0,\n\n result,\n html = '';\n\n\n\n this.calcGridMargin();\n\n if (o.grid_snap) {\n big_num = total / o.step;\n big_p = this.toFixed(o.step / (total / 100));\n } else {\n big_p = this.toFixed(100 / big_num);\n }\n\n if (big_num > 4) {\n small_max = 3;\n }\n if (big_num > 7) {\n small_max = 2;\n }\n if (big_num > 14) {\n small_max = 1;\n }\n if (big_num > 28) {\n small_max = 0;\n }\n\n for (i = 0; i < big_num + 1; i++) {\n local_small_max = small_max;\n\n big_w = this.toFixed(big_p * i);\n\n if (big_w > 100) {\n big_w = 100;\n\n local_small_max -= 2;\n if (local_small_max < 0) {\n local_small_max = 0;\n }\n }\n this.coords.big[i] = big_w;\n\n small_p = (big_w - (big_p * (i - 1))) / (local_small_max + 1);\n\n for (z = 1; z <= local_small_max; z++) {\n if (big_w === 0) {\n break;\n }\n\n small_w = this.toFixed(big_w - (small_p * z));\n\n html += '<span class=\"irs-grid-pol small\" style=\"left: ' + small_w + '%\"></span>';\n }\n\n html += '<span class=\"irs-grid-pol\" style=\"left: ' + big_w + '%\"></span>';\n\n result = this.convertToValue(big_w);\n if (o.values.length) {\n result = o.p_values[result];\n } else {\n result = this._prettify(result);\n }\n\n html += '<span class=\"irs-grid-text js-grid-text-' + i + '\" style=\"left: ' + big_w + '%\">' + result + '</span>';\n }\n this.coords.big_num = Math.ceil(big_num + 1);\n\n\n\n this.$cache.cont.addClass(\"irs-with-grid\");\n this.$cache.grid.html(html);\n this.cacheGridLabels();\n },\n\n cacheGridLabels: function () {\n var $label, i,\n num = this.coords.big_num;\n\n for (i = 0; i < num; i++) {\n $label = this.$cache.grid.find(\".js-grid-text-\" + i);\n this.$cache.grid_labels.push($label);\n }\n\n this.calcGridLabels();\n },\n\n calcGridLabels: function () {\n var i, label, start = [], finish = [],\n num = this.coords.big_num;\n\n for (i = 0; i < num; i++) {\n this.coords.big_w[i] = this.$cache.grid_labels[i].outerWidth(false);\n this.coords.big_p[i] = this.toFixed(this.coords.big_w[i] / this.coords.w_rs * 100);\n this.coords.big_x[i] = this.toFixed(this.coords.big_p[i] / 2);\n\n start[i] = this.toFixed(this.coords.big[i] - this.coords.big_x[i]);\n finish[i] = this.toFixed(start[i] + this.coords.big_p[i]);\n }\n\n if (this.options.force_edges) {\n if (start[0] < -this.coords.grid_gap) {\n start[0] = -this.coords.grid_gap;\n finish[0] = this.toFixed(start[0] + this.coords.big_p[0]);\n\n this.coords.big_x[0] = this.coords.grid_gap;\n }\n\n if (finish[num - 1] > 100 + this.coords.grid_gap) {\n finish[num - 1] = 100 + this.coords.grid_gap;\n start[num - 1] = this.toFixed(finish[num - 1] - this.coords.big_p[num - 1]);\n\n this.coords.big_x[num - 1] = this.toFixed(this.coords.big_p[num - 1] - this.coords.grid_gap);\n }\n }\n\n this.calcGridCollision(2, start, finish);\n this.calcGridCollision(4, start, finish);\n\n for (i = 0; i < num; i++) {\n label = this.$cache.grid_labels[i][0];\n label.style.marginLeft = -this.coords.big_x[i] + \"%\";\n }\n },\n\n // Collisions Calc Beta\n // TODO: Refactor then have plenty of time\n calcGridCollision: function (step, start, finish) {\n var i, next_i, label,\n num = this.coords.big_num;\n\n for (i = 0; i < num; i += step) {\n next_i = i + (step / 2);\n if (next_i >= num) {\n break;\n }\n\n label = this.$cache.grid_labels[next_i][0];\n\n if (finish[i] <= start[next_i]) {\n label.style.visibility = \"visible\";\n } else {\n label.style.visibility = \"hidden\";\n }\n }\n },\n\n calcGridMargin: function () {\n if (!this.options.grid_margin) {\n return;\n }\n\n this.coords.w_rs = this.$cache.rs.outerWidth(false);\n if (!this.coords.w_rs) {\n return;\n }\n\n if (this.options.type === \"single\") {\n this.coords.w_handle = this.$cache.s_single.outerWidth(false);\n } else {\n this.coords.w_handle = this.$cache.s_from.outerWidth(false);\n }\n this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100);\n this.coords.grid_gap = this.toFixed((this.coords.p_handle / 2) - 0.1);\n\n this.$cache.grid[0].style.width = this.toFixed(100 - this.coords.p_handle) + \"%\";\n this.$cache.grid[0].style.left = this.coords.grid_gap + \"%\";\n },\n\n\n\n // =============================================================================================================\n // Public methods\n\n update: function (options) {\n if (!this.input) {\n return;\n }\n\n this.is_update = true;\n\n this.options.from = this.result.from;\n this.options.to = this.result.to;\n\n this.options = $.extend(this.options, options);\n this.validate();\n this.updateResult(options);\n\n this.toggleInput();\n this.remove();\n this.init(true);\n },\n\n reset: function () {\n if (!this.input) {\n return;\n }\n\n this.updateResult();\n this.update();\n },\n\n destroy: function () {\n if (!this.input) {\n return;\n }\n\n this.toggleInput();\n this.$cache.input.prop(\"readonly\", false);\n $.data(this.input, \"ionRangeSlider\", null);\n\n this.remove();\n this.input = null;\n this.options = null;\n }\n };\n\n $.fn.ionRangeSlider = function (options) {\n return this.each(function() {\n if (!$.data(this, \"ionRangeSlider\")) {\n $.data(this, \"ionRangeSlider\", new IonRangeSlider(this, options, plugin_count++));\n }\n });\n };\n\n\n\n // =================================================================================================================\n // http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating\n\n // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel\n\n // MIT license\n\n (function() {\n var lastTime = 0;\n var vendors = ['ms', 'moz', 'webkit', 'o'];\n for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];\n window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']\n || window[vendors[x]+'CancelRequestAnimationFrame'];\n }\n\n if (!window.requestAnimationFrame)\n window.requestAnimationFrame = function(callback, element) {\n var currTime = new Date().getTime();\n var timeToCall = Math.max(0, 16 - (currTime - lastTime));\n var id = window.setTimeout(function() { callback(currTime + timeToCall); },\n timeToCall);\n lastTime = currTime + timeToCall;\n return id;\n };\n\n if (!window.cancelAnimationFrame)\n window.cancelAnimationFrame = function(id) {\n clearTimeout(id);\n };\n }());\n\n} (jQuery, document, window, navigator));\n","(function (factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD\n define(['jquery'], factory);\n } else if (typeof exports === 'object') {\n // CommonJS\n factory(require('jquery'));\n } else {\n // Browser globals\n factory(jQuery);\n }\n}(function ($) {\n var CountTo = function (element, options) {\n this.$element = $(element);\n this.options = $.extend({}, CountTo.DEFAULTS, this.dataOptions(), options);\n this.init();\n };\n\n CountTo.DEFAULTS = {\n from: 0, // the number the element should start at\n to: 0, // the number the element should end at\n speed: 1000, // how long it should take to count between the target numbers\n refreshInterval: 100, // how often the element should be updated\n decimals: 0, // the number of decimal places to show\n formatter: formatter, // handler for formatting the value before rendering\n onUpdate: null, // callback method for every time the element is updated\n onComplete: null // callback method for when the element finishes updating\n };\n\n CountTo.prototype.init = function () {\n this.value = this.options.from;\n this.loops = Math.ceil(this.options.speed / this.options.refreshInterval);\n this.loopCount = 0;\n this.increment = (this.options.to - this.options.from) / this.loops;\n };\n\n CountTo.prototype.dataOptions = function () {\n var options = {\n from: this.$element.data('from'),\n to: this.$element.data('to'),\n speed: this.$element.data('speed'),\n refreshInterval: this.$element.data('refresh-interval'),\n decimals: this.$element.data('decimals')\n };\n\n var keys = Object.keys(options);\n\n for (var i in keys) {\n var key = keys[i];\n\n if (typeof(options[key]) === 'undefined') {\n delete options[key];\n }\n }\n\n return options;\n };\n\n CountTo.prototype.update = function () {\n this.value += this.increment;\n this.loopCount++;\n\n this.render();\n\n if (typeof(this.options.onUpdate) == 'function') {\n this.options.onUpdate.call(this.$element, this.value);\n }\n\n if (this.loopCount >= this.loops) {\n clearInterval(this.interval);\n this.value = this.options.to;\n\n if (typeof(this.options.onComplete) == 'function') {\n this.options.onComplete.call(this.$element, this.value);\n }\n }\n };\n\n CountTo.prototype.render = function () {\n var formattedValue = this.options.formatter.call(this.$element, this.value, this.options);\n this.$element.text(formattedValue);\n };\n\n CountTo.prototype.restart = function () {\n this.stop();\n this.init();\n this.start();\n };\n\n CountTo.prototype.start = function () {\n this.stop();\n this.render();\n this.interval = setInterval(this.update.bind(this), this.options.refreshInterval);\n };\n\n CountTo.prototype.stop = function () {\n if (this.interval) {\n clearInterval(this.interval);\n }\n };\n\n CountTo.prototype.toggle = function () {\n if (this.interval) {\n this.stop();\n } else {\n this.start();\n }\n };\n\n function formatter(value, options) {\n return value.toFixed(options.decimals);\n }\n\n $.fn.countTo = function (option) {\n return this.each(function () {\n var $this = $(this);\n var data = $this.data('countTo');\n var init = !data || typeof(option) === 'object';\n var options = typeof(option) === 'object' ? option : {};\n var method = typeof(option) === 'string' ? option : 'start';\n\n if (init) {\n if (data) data.stop();\n $this.data('countTo', data = new CountTo(this, options));\n }\n\n data[method].call(data);\n });\n };\n}));\n","/* Javascript plotting library for jQuery, version 0.8.3.\n\nCopyright (c) 2007-2014 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\n*/\n\n// first an inline dependency, jquery.colorhelpers.js, we inline it here\n// for convenience\n\n/* Plugin for jQuery for working with colors.\n *\n * Version 1.1.\n *\n * Inspiration from jQuery color animation plugin by John Resig.\n *\n * Released under the MIT license by Ole Laursen, October 2009.\n *\n * Examples:\n *\n * $.color.parse(\"#fff\").scale('rgb', 0.25).add('a', -0.5).toString()\n * var c = $.color.extract($(\"#mydiv\"), 'background-color');\n * console.log(c.r, c.g, c.b, c.a);\n * $.color.make(100, 50, 25, 0.4).toString() // returns \"rgba(100,50,25,0.4)\"\n *\n * Note that .scale() and .add() return the same modified object\n * instead of making a new one.\n *\n * V. 1.1: Fix error handling so e.g. parsing an empty string does\n * produce a color rather than just crashing.\n */\n(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return\"rgb(\"+[o.r,o.g,o.b].join(\",\")+\")\"}else{return\"rgba(\"+[o.r,o.g,o.b,o.a].join(\",\")+\")\"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=\"\"&&c!=\"transparent\")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),\"body\"));if(c==\"rgba(0, 0, 0, 0)\")c=\"transparent\";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name==\"transparent\")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);\n\n// the actual Flot code\n(function($) {\n\n\t// Cache the prototype hasOwnProperty for faster access\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n // A shim to provide 'detach' to jQuery versions prior to 1.4. Using a DOM\n // operation produces the same effect as detach, i.e. removing the element\n // without touching its jQuery data.\n\n // Do not merge this into Flot 0.9, since it requires jQuery 1.4.4+.\n\n if (!$.fn.detach) {\n $.fn.detach = function() {\n return this.each(function() {\n if (this.parentNode) {\n this.parentNode.removeChild( this );\n }\n });\n };\n }\n\n\t///////////////////////////////////////////////////////////////////////////\n\t// The Canvas object is a wrapper around an HTML5 <canvas> tag.\n\t//\n\t// @constructor\n\t// @param {string} cls List of classes to apply to the canvas.\n\t// @param {element} container Element onto which to append the canvas.\n\t//\n\t// Requiring a container is a little iffy, but unfortunately canvas\n\t// operations don't work unless the canvas is attached to the DOM.\n\n\tfunction Canvas(cls, container) {\n\n\t\tvar element = container.children(\".\" + cls)[0];\n\n\t\tif (element == null) {\n\n\t\t\telement = document.createElement(\"canvas\");\n\t\t\telement.className = cls;\n\n\t\t\t$(element).css({ direction: \"ltr\", position: \"absolute\", left: 0, top: 0 })\n\t\t\t\t.appendTo(container);\n\n\t\t\t// If HTML5 Canvas isn't available, fall back to [Ex|Flash]canvas\n\n\t\t\tif (!element.getContext) {\n\t\t\t\tif (window.G_vmlCanvasManager) {\n\t\t\t\t\telement = window.G_vmlCanvasManager.initElement(element);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element = element;\n\n\t\tvar context = this.context = element.getContext(\"2d\");\n\n\t\t// Determine the screen's ratio of physical to device-independent\n\t\t// pixels. This is the ratio between the canvas width that the browser\n\t\t// advertises and the number of pixels actually present in that space.\n\n\t\t// The iPhone 4, for example, has a device-independent width of 320px,\n\t\t// but its screen is actually 640px wide. It therefore has a pixel\n\t\t// ratio of 2, while most normal devices have a ratio of 1.\n\n\t\tvar devicePixelRatio = window.devicePixelRatio || 1,\n\t\t\tbackingStoreRatio =\n\t\t\t\tcontext.webkitBackingStorePixelRatio ||\n\t\t\t\tcontext.mozBackingStorePixelRatio ||\n\t\t\t\tcontext.msBackingStorePixelRatio ||\n\t\t\t\tcontext.oBackingStorePixelRatio ||\n\t\t\t\tcontext.backingStorePixelRatio || 1;\n\n\t\tthis.pixelRatio = devicePixelRatio / backingStoreRatio;\n\n\t\t// Size the canvas to match the internal dimensions of its container\n\n\t\tthis.resize(container.width(), container.height());\n\n\t\t// Collection of HTML div layers for text overlaid onto the canvas\n\n\t\tthis.textContainer = null;\n\t\tthis.text = {};\n\n\t\t// Cache of text fragments and metrics, so we can avoid expensively\n\t\t// re-calculating them when the plot is re-rendered in a loop.\n\n\t\tthis._textCache = {};\n\t}\n\n\t// Resizes the canvas to the given dimensions.\n\t//\n\t// @param {number} width New width of the canvas, in pixels.\n\t// @param {number} width New height of the canvas, in pixels.\n\n\tCanvas.prototype.resize = function(width, height) {\n\n\t\tif (width <= 0 || height <= 0) {\n\t\t\tthrow new Error(\"Invalid dimensions for plot, width = \" + width + \", height = \" + height);\n\t\t}\n\n\t\tvar element = this.element,\n\t\t\tcontext = this.context,\n\t\t\tpixelRatio = this.pixelRatio;\n\n\t\t// Resize the canvas, increasing its density based on the display's\n\t\t// pixel ratio; basically giving it more pixels without increasing the\n\t\t// size of its element, to take advantage of the fact that retina\n\t\t// displays have that many more pixels in the same advertised space.\n\n\t\t// Resizing should reset the state (excanvas seems to be buggy though)\n\n\t\tif (this.width != width) {\n\t\t\telement.width = width * pixelRatio;\n\t\t\telement.style.width = width + \"px\";\n\t\t\tthis.width = width;\n\t\t}\n\n\t\tif (this.height != height) {\n\t\t\telement.height = height * pixelRatio;\n\t\t\telement.style.height = height + \"px\";\n\t\t\tthis.height = height;\n\t\t}\n\n\t\t// Save the context, so we can reset in case we get replotted. The\n\t\t// restore ensure that we're really back at the initial state, and\n\t\t// should be safe even if we haven't saved the initial state yet.\n\n\t\tcontext.restore();\n\t\tcontext.save();\n\n\t\t// Scale the coordinate space to match the display density; so even though we\n\t\t// may have twice as many pixels, we still want lines and other drawing to\n\t\t// appear at the same size; the extra pixels will just make them crisper.\n\n\t\tcontext.scale(pixelRatio, pixelRatio);\n\t};\n\n\t// Clears the entire canvas area, not including any overlaid HTML text\n\n\tCanvas.prototype.clear = function() {\n\t\tthis.context.clearRect(0, 0, this.width, this.height);\n\t};\n\n\t// Finishes rendering the canvas, including managing the text overlay.\n\n\tCanvas.prototype.render = function() {\n\n\t\tvar cache = this._textCache;\n\n\t\t// For each text layer, add elements marked as active that haven't\n\t\t// already been rendered, and remove those that are no longer active.\n\n\t\tfor (var layerKey in cache) {\n\t\t\tif (hasOwnProperty.call(cache, layerKey)) {\n\n\t\t\t\tvar layer = this.getTextLayer(layerKey),\n\t\t\t\t\tlayerCache = cache[layerKey];\n\n\t\t\t\tlayer.hide();\n\n\t\t\t\tfor (var styleKey in layerCache) {\n\t\t\t\t\tif (hasOwnProperty.call(layerCache, styleKey)) {\n\t\t\t\t\t\tvar styleCache = layerCache[styleKey];\n\t\t\t\t\t\tfor (var key in styleCache) {\n\t\t\t\t\t\t\tif (hasOwnProperty.call(styleCache, key)) {\n\n\t\t\t\t\t\t\t\tvar positions = styleCache[key].positions;\n\n\t\t\t\t\t\t\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\t\t\t\t\t\t\tif (position.active) {\n\t\t\t\t\t\t\t\t\t\tif (!position.rendered) {\n\t\t\t\t\t\t\t\t\t\t\tlayer.append(position.element);\n\t\t\t\t\t\t\t\t\t\t\tposition.rendered = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tpositions.splice(i--, 1);\n\t\t\t\t\t\t\t\t\t\tif (position.rendered) {\n\t\t\t\t\t\t\t\t\t\t\tposition.element.detach();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (positions.length == 0) {\n\t\t\t\t\t\t\t\t\tdelete styleCache[key];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlayer.show();\n\t\t\t}\n\t\t}\n\t};\n\n\t// Creates (if necessary) and returns the text overlay container.\n\t//\n\t// @param {string} classes String of space-separated CSS classes used to\n\t// uniquely identify the text layer.\n\t// @return {object} The jQuery-wrapped text-layer div.\n\n\tCanvas.prototype.getTextLayer = function(classes) {\n\n\t\tvar layer = this.text[classes];\n\n\t\t// Create the text layer if it doesn't exist\n\n\t\tif (layer == null) {\n\n\t\t\t// Create the text layer container, if it doesn't exist\n\n\t\t\tif (this.textContainer == null) {\n\t\t\t\tthis.textContainer = $(\"<div class='flot-text'></div>\")\n\t\t\t\t\t.css({\n\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t\tright: 0,\n\t\t\t\t\t\t'font-size': \"smaller\",\n\t\t\t\t\t\tcolor: \"#545454\"\n\t\t\t\t\t})\n\t\t\t\t\t.insertAfter(this.element);\n\t\t\t}\n\n\t\t\tlayer = this.text[classes] = $(\"<div></div>\")\n\t\t\t\t.addClass(classes)\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\ttop: 0,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tbottom: 0,\n\t\t\t\t\tright: 0\n\t\t\t\t})\n\t\t\t\t.appendTo(this.textContainer);\n\t\t}\n\n\t\treturn layer;\n\t};\n\n\t// Creates (if necessary) and returns a text info object.\n\t//\n\t// The object looks like this:\n\t//\n\t// {\n\t// width: Width of the text's wrapper div.\n\t// height: Height of the text's wrapper div.\n\t// element: The jQuery-wrapped HTML div containing the text.\n\t// positions: Array of positions at which this text is drawn.\n\t// }\n\t//\n\t// The positions array contains objects that look like this:\n\t//\n\t// {\n\t// active: Flag indicating whether the text should be visible.\n\t// rendered: Flag indicating whether the text is currently visible.\n\t// element: The jQuery-wrapped HTML div containing the text.\n\t// x: X coordinate at which to draw the text.\n\t// y: Y coordinate at which to draw the text.\n\t// }\n\t//\n\t// Each position after the first receives a clone of the original element.\n\t//\n\t// The idea is that that the width, height, and general 'identity' of the\n\t// text is constant no matter where it is placed; the placements are a\n\t// secondary property.\n\t//\n\t// Canvas maintains a cache of recently-used text info objects; getTextInfo\n\t// either returns the cached element or creates a new entry.\n\t//\n\t// @param {string} layer A string of space-separated CSS classes uniquely\n\t// identifying the layer containing this text.\n\t// @param {string} text Text string to retrieve info for.\n\t// @param {(string|object)=} font Either a string of space-separated CSS\n\t// classes or a font-spec object, defining the text's font and style.\n\t// @param {number=} angle Angle at which to rotate the text, in degrees.\n\t// Angle is currently unused, it will be implemented in the future.\n\t// @param {number=} width Maximum width of the text before it wraps.\n\t// @return {object} a text info object.\n\n\tCanvas.prototype.getTextInfo = function(layer, text, font, angle, width) {\n\n\t\tvar textStyle, layerCache, styleCache, info;\n\n\t\t// Cast the value to a string, in case we were given a number or such\n\n\t\ttext = \"\" + text;\n\n\t\t// If the font is a font-spec object, generate a CSS font definition\n\n\t\tif (typeof font === \"object\") {\n\t\t\ttextStyle = font.style + \" \" + font.variant + \" \" + font.weight + \" \" + font.size + \"px/\" + font.lineHeight + \"px \" + font.family;\n\t\t} else {\n\t\t\ttextStyle = font;\n\t\t}\n\n\t\t// Retrieve (or create) the cache for the text's layer and styles\n\n\t\tlayerCache = this._textCache[layer];\n\n\t\tif (layerCache == null) {\n\t\t\tlayerCache = this._textCache[layer] = {};\n\t\t}\n\n\t\tstyleCache = layerCache[textStyle];\n\n\t\tif (styleCache == null) {\n\t\t\tstyleCache = layerCache[textStyle] = {};\n\t\t}\n\n\t\tinfo = styleCache[text];\n\n\t\t// If we can't find a matching element in our cache, create a new one\n\n\t\tif (info == null) {\n\n\t\t\tvar element = $(\"<div></div>\").html(text)\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t'max-width': width,\n\t\t\t\t\ttop: -9999\n\t\t\t\t})\n\t\t\t\t.appendTo(this.getTextLayer(layer));\n\n\t\t\tif (typeof font === \"object\") {\n\t\t\t\telement.css({\n\t\t\t\t\tfont: textStyle,\n\t\t\t\t\tcolor: font.color\n\t\t\t\t});\n\t\t\t} else if (typeof font === \"string\") {\n\t\t\t\telement.addClass(font);\n\t\t\t}\n\n\t\t\tinfo = styleCache[text] = {\n\t\t\t\twidth: element.outerWidth(true),\n\t\t\t\theight: element.outerHeight(true),\n\t\t\t\telement: element,\n\t\t\t\tpositions: []\n\t\t\t};\n\n\t\t\telement.detach();\n\t\t}\n\n\t\treturn info;\n\t};\n\n\t// Adds a text string to the canvas text overlay.\n\t//\n\t// The text isn't drawn immediately; it is marked as rendering, which will\n\t// result in its addition to the canvas on the next render pass.\n\t//\n\t// @param {string} layer A string of space-separated CSS classes uniquely\n\t// identifying the layer containing this text.\n\t// @param {number} x X coordinate at which to draw the text.\n\t// @param {number} y Y coordinate at which to draw the text.\n\t// @param {string} text Text string to draw.\n\t// @param {(string|object)=} font Either a string of space-separated CSS\n\t// classes or a font-spec object, defining the text's font and style.\n\t// @param {number=} angle Angle at which to rotate the text, in degrees.\n\t// Angle is currently unused, it will be implemented in the future.\n\t// @param {number=} width Maximum width of the text before it wraps.\n\t// @param {string=} halign Horizontal alignment of the text; either \"left\",\n\t// \"center\" or \"right\".\n\t// @param {string=} valign Vertical alignment of the text; either \"top\",\n\t// \"middle\" or \"bottom\".\n\n\tCanvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {\n\n\t\tvar info = this.getTextInfo(layer, text, font, angle, width),\n\t\t\tpositions = info.positions;\n\n\t\t// Tweak the div's position to match the text's alignment\n\n\t\tif (halign == \"center\") {\n\t\t\tx -= info.width / 2;\n\t\t} else if (halign == \"right\") {\n\t\t\tx -= info.width;\n\t\t}\n\n\t\tif (valign == \"middle\") {\n\t\t\ty -= info.height / 2;\n\t\t} else if (valign == \"bottom\") {\n\t\t\ty -= info.height;\n\t\t}\n\n\t\t// Determine whether this text already exists at this position.\n\t\t// If so, mark it for inclusion in the next render pass.\n\n\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\tif (position.x == x && position.y == y) {\n\t\t\t\tposition.active = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// If the text doesn't exist at this position, create a new entry\n\n\t\t// For the very first position we'll re-use the original element,\n\t\t// while for subsequent ones we'll clone it.\n\n\t\tposition = {\n\t\t\tactive: true,\n\t\t\trendered: false,\n\t\t\telement: positions.length ? info.element.clone() : info.element,\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\n\t\tpositions.push(position);\n\n\t\t// Move the element to its final position within the container\n\n\t\tposition.element.css({\n\t\t\ttop: Math.round(y),\n\t\t\tleft: Math.round(x),\n\t\t\t'text-align': halign\t// In case the text wraps\n\t\t});\n\t};\n\n\t// Removes one or more text strings from the canvas text overlay.\n\t//\n\t// If no parameters are given, all text within the layer is removed.\n\t//\n\t// Note that the text is not immediately removed; it is simply marked as\n\t// inactive, which will result in its removal on the next render pass.\n\t// This avoids the performance penalty for 'clear and redraw' behavior,\n\t// where we potentially get rid of all text on a layer, but will likely\n\t// add back most or all of it later, as when redrawing axes, for example.\n\t//\n\t// @param {string} layer A string of space-separated CSS classes uniquely\n\t// identifying the layer containing this text.\n\t// @param {number=} x X coordinate of the text.\n\t// @param {number=} y Y coordinate of the text.\n\t// @param {string=} text Text string to remove.\n\t// @param {(string|object)=} font Either a string of space-separated CSS\n\t// classes or a font-spec object, defining the text's font and style.\n\t// @param {number=} angle Angle at which the text is rotated, in degrees.\n\t// Angle is currently unused, it will be implemented in the future.\n\n\tCanvas.prototype.removeText = function(layer, x, y, text, font, angle) {\n\t\tif (text == null) {\n\t\t\tvar layerCache = this._textCache[layer];\n\t\t\tif (layerCache != null) {\n\t\t\t\tfor (var styleKey in layerCache) {\n\t\t\t\t\tif (hasOwnProperty.call(layerCache, styleKey)) {\n\t\t\t\t\t\tvar styleCache = layerCache[styleKey];\n\t\t\t\t\t\tfor (var key in styleCache) {\n\t\t\t\t\t\t\tif (hasOwnProperty.call(styleCache, key)) {\n\t\t\t\t\t\t\t\tvar positions = styleCache[key].positions;\n\t\t\t\t\t\t\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\t\t\t\t\t\t\tposition.active = false;\n\t\t\t\t\t\t\t\t}\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} else {\n\t\t\tvar positions = this.getTextInfo(layer, text, font, angle).positions;\n\t\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\t\tif (position.x == x && position.y == y) {\n\t\t\t\t\tposition.active = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t///////////////////////////////////////////////////////////////////////////\n\t// The top-level container for the entire plot.\n\n function Plot(placeholder, data_, options_, plugins) {\n // data is on the form:\n // [ series1, series2 ... ]\n // where series is either just the data as [ [x1, y1], [x2, y2], ... ]\n // or { data: [ [x1, y1], [x2, y2], ... ], label: \"some label\", ... }\n\n var series = [],\n options = {\n // the color theme used for graphs\n colors: [\"#edc240\", \"#afd8f8\", \"#cb4b4b\", \"#4da74d\", \"#9440ed\"],\n legend: {\n show: true,\n noColumns: 1, // number of colums in legend table\n labelFormatter: null, // fn: string -> string\n labelBoxBorderColor: \"#ccc\", // border color for the little label boxes\n container: null, // container (as jQuery object) to put legend in, null means default on top of graph\n position: \"ne\", // position of default legend container within plot\n margin: 5, // distance from grid edge to default legend container within plot\n backgroundColor: null, // null means auto-detect\n backgroundOpacity: 0.85, // set to 0 to avoid background\n sorted: null // default to no legend sorting\n },\n xaxis: {\n show: null, // null = auto-detect, true = always, false = never\n position: \"bottom\", // or \"top\"\n mode: null, // null or \"time\"\n font: null, // null (derived from CSS in placeholder) or object like { size: 11, lineHeight: 13, style: \"italic\", weight: \"bold\", family: \"sans-serif\", variant: \"small-caps\" }\n color: null, // base color, labels, ticks\n tickColor: null, // possibly different color of ticks, e.g. \"rgba(0,0,0,0.15)\"\n transform: null, // null or f: number -> number to transform axis\n inverseTransform: null, // if transform is set, this should be the inverse function\n min: null, // min. value to show, null means set automatically\n max: null, // max. value to show, null means set automatically\n autoscaleMargin: null, // margin in % to add if auto-setting min/max\n ticks: null, // either [1, 3] or [[1, \"a\"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks\n tickFormatter: null, // fn: number -> string\n labelWidth: null, // size of tick labels in pixels\n labelHeight: null,\n reserveSpace: null, // whether to reserve space even if axis isn't shown\n tickLength: null, // size in pixels of ticks, or \"full\" for whole line\n alignTicksWithAxis: null, // axis number or null for no sync\n tickDecimals: null, // no. of decimals, null means auto\n tickSize: null, // number or [number, \"unit\"]\n minTickSize: null // number or [number, \"unit\"]\n },\n yaxis: {\n autoscaleMargin: 0.02,\n position: \"left\" // or \"right\"\n },\n xaxes: [],\n yaxes: [],\n series: {\n points: {\n show: false,\n radius: 3,\n lineWidth: 2, // in pixels\n fill: true,\n fillColor: \"#ffffff\",\n symbol: \"circle\" // or callback\n },\n lines: {\n // we don't put in show: false so we can see\n // whether lines were actively disabled\n lineWidth: 2, // in pixels\n fill: false,\n fillColor: null,\n steps: false\n // Omit 'zero', so we can later default its value to\n // match that of the 'fill' option.\n },\n bars: {\n show: false,\n lineWidth: 2, // in pixels\n barWidth: 1, // in units of the x axis\n fill: true,\n fillColor: null,\n align: \"left\", // \"left\", \"right\", or \"center\"\n horizontal: false,\n zero: true\n },\n shadowSize: 3,\n highlightColor: null\n },\n grid: {\n show: true,\n aboveData: false,\n color: \"#545454\", // primary color used for outline and labels\n backgroundColor: null, // null for transparent, else color\n borderColor: null, // set if different from the grid color\n tickColor: null, // color for the ticks, e.g. \"rgba(0,0,0,0.15)\"\n margin: 0, // distance from the canvas edge to the grid\n labelMargin: 5, // in pixels\n axisMargin: 8, // in pixels\n borderWidth: 2, // in pixels\n minBorderMargin: null, // in pixels, null means taken from points radius\n markings: null, // array of ranges or fn: axes -> array of ranges\n markingsColor: \"#f4f4f4\",\n markingsLineWidth: 2,\n // interactive stuff\n clickable: false,\n hoverable: false,\n autoHighlight: true, // highlight in case mouse is near\n mouseActiveRadius: 10 // how far the mouse can be away to activate an item\n },\n interaction: {\n redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow\n },\n hooks: {}\n },\n surface = null, // the canvas for the plot itself\n overlay = null, // canvas for interactive stuff on top of plot\n eventHolder = null, // jQuery object that events should be bound to\n ctx = null, octx = null,\n xaxes = [], yaxes = [],\n plotOffset = { left: 0, right: 0, top: 0, bottom: 0},\n plotWidth = 0, plotHeight = 0,\n hooks = {\n processOptions: [],\n processRawData: [],\n processDatapoints: [],\n processOffset: [],\n drawBackground: [],\n drawSeries: [],\n draw: [],\n bindEvents: [],\n drawOverlay: [],\n shutdown: []\n },\n plot = this;\n\n // public functions\n plot.setData = setData;\n plot.setupGrid = setupGrid;\n plot.draw = draw;\n plot.getPlaceholder = function() { return placeholder; };\n plot.getCanvas = function() { return surface.element; };\n plot.getPlotOffset = function() { return plotOffset; };\n plot.width = function () { return plotWidth; };\n plot.height = function () { return plotHeight; };\n plot.offset = function () {\n var o = eventHolder.offset();\n o.left += plotOffset.left;\n o.top += plotOffset.top;\n return o;\n };\n plot.getData = function () { return series; };\n plot.getAxes = function () {\n var res = {}, i;\n $.each(xaxes.concat(yaxes), function (_, axis) {\n if (axis)\n res[axis.direction + (axis.n != 1 ? axis.n : \"\") + \"axis\"] = axis;\n });\n return res;\n };\n plot.getXAxes = function () { return xaxes; };\n plot.getYAxes = function () { return yaxes; };\n plot.c2p = canvasToAxisCoords;\n plot.p2c = axisToCanvasCoords;\n plot.getOptions = function () { return options; };\n plot.highlight = highlight;\n plot.unhighlight = unhighlight;\n plot.triggerRedrawOverlay = triggerRedrawOverlay;\n plot.pointOffset = function(point) {\n return {\n left: parseInt(xaxes[axisNumber(point, \"x\") - 1].p2c(+point.x) + plotOffset.left, 10),\n top: parseInt(yaxes[axisNumber(point, \"y\") - 1].p2c(+point.y) + plotOffset.top, 10)\n };\n };\n plot.shutdown = shutdown;\n plot.destroy = function () {\n shutdown();\n placeholder.removeData(\"plot\").empty();\n\n series = [];\n options = null;\n surface = null;\n overlay = null;\n eventHolder = null;\n ctx = null;\n octx = null;\n xaxes = [];\n yaxes = [];\n hooks = null;\n highlights = [];\n plot = null;\n };\n plot.resize = function () {\n \tvar width = placeholder.width(),\n \t\theight = placeholder.height();\n surface.resize(width, height);\n overlay.resize(width, height);\n };\n\n // public attributes\n plot.hooks = hooks;\n\n // initialize\n initPlugins(plot);\n parseOptions(options_);\n setupCanvases();\n setData(data_);\n setupGrid();\n draw();\n bindEvents();\n\n\n function executeHooks(hook, args) {\n args = [plot].concat(args);\n for (var i = 0; i < hook.length; ++i)\n hook[i].apply(this, args);\n }\n\n function initPlugins() {\n\n // References to key classes, allowing plugins to modify them\n\n var classes = {\n Canvas: Canvas\n };\n\n for (var i = 0; i < plugins.length; ++i) {\n var p = plugins[i];\n p.init(plot, classes);\n if (p.options)\n $.extend(true, options, p.options);\n }\n }\n\n function parseOptions(opts) {\n\n $.extend(true, options, opts);\n\n // $.extend merges arrays, rather than replacing them. When less\n // colors are provided than the size of the default palette, we\n // end up with those colors plus the remaining defaults, which is\n // not expected behavior; avoid it by replacing them here.\n\n if (opts && opts.colors) {\n \toptions.colors = opts.colors;\n }\n\n if (options.xaxis.color == null)\n options.xaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n if (options.yaxis.color == null)\n options.yaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n\n if (options.xaxis.tickColor == null) // grid.tickColor for back-compatibility\n options.xaxis.tickColor = options.grid.tickColor || options.xaxis.color;\n if (options.yaxis.tickColor == null) // grid.tickColor for back-compatibility\n options.yaxis.tickColor = options.grid.tickColor || options.yaxis.color;\n\n if (options.grid.borderColor == null)\n options.grid.borderColor = options.grid.color;\n if (options.grid.tickColor == null)\n options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n\n // Fill in defaults for axis options, including any unspecified\n // font-spec fields, if a font-spec was provided.\n\n // If no x/y axis options were provided, create one of each anyway,\n // since the rest of the code assumes that they exist.\n\n var i, axisOptions, axisCount,\n fontSize = placeholder.css(\"font-size\"),\n fontSizeDefault = fontSize ? +fontSize.replace(\"px\", \"\") : 13,\n fontDefaults = {\n style: placeholder.css(\"font-style\"),\n size: Math.round(0.8 * fontSizeDefault),\n variant: placeholder.css(\"font-variant\"),\n weight: placeholder.css(\"font-weight\"),\n family: placeholder.css(\"font-family\")\n };\n\n axisCount = options.xaxes.length || 1;\n for (i = 0; i < axisCount; ++i) {\n\n axisOptions = options.xaxes[i];\n if (axisOptions && !axisOptions.tickColor) {\n axisOptions.tickColor = axisOptions.color;\n }\n\n axisOptions = $.extend(true, {}, options.xaxis, axisOptions);\n options.xaxes[i] = axisOptions;\n\n if (axisOptions.font) {\n axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);\n if (!axisOptions.font.color) {\n axisOptions.font.color = axisOptions.color;\n }\n if (!axisOptions.font.lineHeight) {\n axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);\n }\n }\n }\n\n axisCount = options.yaxes.length || 1;\n for (i = 0; i < axisCount; ++i) {\n\n axisOptions = options.yaxes[i];\n if (axisOptions && !axisOptions.tickColor) {\n axisOptions.tickColor = axisOptions.color;\n }\n\n axisOptions = $.extend(true, {}, options.yaxis, axisOptions);\n options.yaxes[i] = axisOptions;\n\n if (axisOptions.font) {\n axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);\n if (!axisOptions.font.color) {\n axisOptions.font.color = axisOptions.color;\n }\n if (!axisOptions.font.lineHeight) {\n axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);\n }\n }\n }\n\n // backwards compatibility, to be removed in future\n if (options.xaxis.noTicks && options.xaxis.ticks == null)\n options.xaxis.ticks = options.xaxis.noTicks;\n if (options.yaxis.noTicks && options.yaxis.ticks == null)\n options.yaxis.ticks = options.yaxis.noTicks;\n if (options.x2axis) {\n options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);\n options.xaxes[1].position = \"top\";\n // Override the inherit to allow the axis to auto-scale\n if (options.x2axis.min == null) {\n options.xaxes[1].min = null;\n }\n if (options.x2axis.max == null) {\n options.xaxes[1].max = null;\n }\n }\n if (options.y2axis) {\n options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);\n options.yaxes[1].position = \"right\";\n // Override the inherit to allow the axis to auto-scale\n if (options.y2axis.min == null) {\n options.yaxes[1].min = null;\n }\n if (options.y2axis.max == null) {\n options.yaxes[1].max = null;\n }\n }\n if (options.grid.coloredAreas)\n options.grid.markings = options.grid.coloredAreas;\n if (options.grid.coloredAreasColor)\n options.grid.markingsColor = options.grid.coloredAreasColor;\n if (options.lines)\n $.extend(true, options.series.lines, options.lines);\n if (options.points)\n $.extend(true, options.series.points, options.points);\n if (options.bars)\n $.extend(true, options.series.bars, options.bars);\n if (options.shadowSize != null)\n options.series.shadowSize = options.shadowSize;\n if (options.highlightColor != null)\n options.series.highlightColor = options.highlightColor;\n\n // save options on axes for future reference\n for (i = 0; i < options.xaxes.length; ++i)\n getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i];\n for (i = 0; i < options.yaxes.length; ++i)\n getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i];\n\n // add hooks from options\n for (var n in hooks)\n if (options.hooks[n] && options.hooks[n].length)\n hooks[n] = hooks[n].concat(options.hooks[n]);\n\n executeHooks(hooks.processOptions, [options]);\n }\n\n function setData(d) {\n series = parseData(d);\n fillInSeriesOptions();\n processData();\n }\n\n function parseData(d) {\n var res = [];\n for (var i = 0; i < d.length; ++i) {\n var s = $.extend(true, {}, options.series);\n\n if (d[i].data != null) {\n s.data = d[i].data; // move the data instead of deep-copy\n delete d[i].data;\n\n $.extend(true, s, d[i]);\n\n d[i].data = s.data;\n }\n else\n s.data = d[i];\n res.push(s);\n }\n\n return res;\n }\n\n function axisNumber(obj, coord) {\n var a = obj[coord + \"axis\"];\n if (typeof a == \"object\") // if we got a real axis, extract number\n a = a.n;\n if (typeof a != \"number\")\n a = 1; // default to first axis\n return a;\n }\n\n function allAxes() {\n // return flat array without annoying null entries\n return $.grep(xaxes.concat(yaxes), function (a) { return a; });\n }\n\n function canvasToAxisCoords(pos) {\n // return an object with x/y corresponding to all used axes\n var res = {}, i, axis;\n for (i = 0; i < xaxes.length; ++i) {\n axis = xaxes[i];\n if (axis && axis.used)\n res[\"x\" + axis.n] = axis.c2p(pos.left);\n }\n\n for (i = 0; i < yaxes.length; ++i) {\n axis = yaxes[i];\n if (axis && axis.used)\n res[\"y\" + axis.n] = axis.c2p(pos.top);\n }\n\n if (res.x1 !== undefined)\n res.x = res.x1;\n if (res.y1 !== undefined)\n res.y = res.y1;\n\n return res;\n }\n\n function axisToCanvasCoords(pos) {\n // get canvas coords from the first pair of x/y found in pos\n var res = {}, i, axis, key;\n\n for (i = 0; i < xaxes.length; ++i) {\n axis = xaxes[i];\n if (axis && axis.used) {\n key = \"x\" + axis.n;\n if (pos[key] == null && axis.n == 1)\n key = \"x\";\n\n if (pos[key] != null) {\n res.left = axis.p2c(pos[key]);\n break;\n }\n }\n }\n\n for (i = 0; i < yaxes.length; ++i) {\n axis = yaxes[i];\n if (axis && axis.used) {\n key = \"y\" + axis.n;\n if (pos[key] == null && axis.n == 1)\n key = \"y\";\n\n if (pos[key] != null) {\n res.top = axis.p2c(pos[key]);\n break;\n }\n }\n }\n\n return res;\n }\n\n function getOrCreateAxis(axes, number) {\n if (!axes[number - 1])\n axes[number - 1] = {\n n: number, // save the number for future reference\n direction: axes == xaxes ? \"x\" : \"y\",\n options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis)\n };\n\n return axes[number - 1];\n }\n\n function fillInSeriesOptions() {\n\n var neededColors = series.length, maxIndex = -1, i;\n\n // Subtract the number of series that already have fixed colors or\n // color indexes from the number that we still need to generate.\n\n for (i = 0; i < series.length; ++i) {\n var sc = series[i].color;\n if (sc != null) {\n neededColors--;\n if (typeof sc == \"number\" && sc > maxIndex) {\n maxIndex = sc;\n }\n }\n }\n\n // If any of the series have fixed color indexes, then we need to\n // generate at least as many colors as the highest index.\n\n if (neededColors <= maxIndex) {\n neededColors = maxIndex + 1;\n }\n\n // Generate all the colors, using first the option colors and then\n // variations on those colors once they're exhausted.\n\n var c, colors = [], colorPool = options.colors,\n colorPoolSize = colorPool.length, variation = 0;\n\n for (i = 0; i < neededColors; i++) {\n\n c = $.color.parse(colorPool[i % colorPoolSize] || \"#666\");\n\n // Each time we exhaust the colors in the pool we adjust\n // a scaling factor used to produce more variations on\n // those colors. The factor alternates negative/positive\n // to produce lighter/darker colors.\n\n // Reset the variation after every few cycles, or else\n // it will end up producing only white or black colors.\n\n if (i % colorPoolSize == 0 && i) {\n if (variation >= 0) {\n if (variation < 0.5) {\n variation = -variation - 0.2;\n } else variation = 0;\n } else variation = -variation;\n }\n\n colors[i] = c.scale('rgb', 1 + variation);\n }\n\n // Finalize the series options, filling in their colors\n\n var colori = 0, s;\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n // assign colors\n if (s.color == null) {\n s.color = colors[colori].toString();\n ++colori;\n }\n else if (typeof s.color == \"number\")\n s.color = colors[s.color].toString();\n\n // turn on lines automatically in case nothing is set\n if (s.lines.show == null) {\n var v, show = true;\n for (v in s)\n if (s[v] && s[v].show) {\n show = false;\n break;\n }\n if (show)\n s.lines.show = true;\n }\n\n // If nothing was provided for lines.zero, default it to match\n // lines.fill, since areas by default should extend to zero.\n\n if (s.lines.zero == null) {\n s.lines.zero = !!s.lines.fill;\n }\n\n // setup axes\n s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, \"x\"));\n s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, \"y\"));\n }\n }\n\n function processData() {\n var topSentry = Number.POSITIVE_INFINITY,\n bottomSentry = Number.NEGATIVE_INFINITY,\n fakeInfinity = Number.MAX_VALUE,\n i, j, k, m, length,\n s, points, ps, x, y, axis, val, f, p,\n data, format;\n\n function updateAxis(axis, min, max) {\n if (min < axis.datamin && min != -fakeInfinity)\n axis.datamin = min;\n if (max > axis.datamax && max != fakeInfinity)\n axis.datamax = max;\n }\n\n $.each(allAxes(), function (_, axis) {\n // init axis\n axis.datamin = topSentry;\n axis.datamax = bottomSentry;\n axis.used = false;\n });\n\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n s.datapoints = { points: [] };\n\n executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);\n }\n\n // first pass: clean and copy data\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n data = s.data;\n format = s.datapoints.format;\n\n if (!format) {\n format = [];\n // find out how to copy\n format.push({ x: true, number: true, required: true });\n format.push({ y: true, number: true, required: true });\n\n if (s.bars.show || (s.lines.show && s.lines.fill)) {\n var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));\n format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });\n if (s.bars.horizontal) {\n delete format[format.length - 1].y;\n format[format.length - 1].x = true;\n }\n }\n\n s.datapoints.format = format;\n }\n\n if (s.datapoints.pointsize != null)\n continue; // already filled in\n\n s.datapoints.pointsize = format.length;\n\n ps = s.datapoints.pointsize;\n points = s.datapoints.points;\n\n var insertSteps = s.lines.show && s.lines.steps;\n s.xaxis.used = s.yaxis.used = true;\n\n for (j = k = 0; j < data.length; ++j, k += ps) {\n p = data[j];\n\n var nullify = p == null;\n if (!nullify) {\n for (m = 0; m < ps; ++m) {\n val = p[m];\n f = format[m];\n\n if (f) {\n if (f.number && val != null) {\n val = +val; // convert to number\n if (isNaN(val))\n val = null;\n else if (val == Infinity)\n val = fakeInfinity;\n else if (val == -Infinity)\n val = -fakeInfinity;\n }\n\n if (val == null) {\n if (f.required)\n nullify = true;\n\n if (f.defaultValue != null)\n val = f.defaultValue;\n }\n }\n\n points[k + m] = val;\n }\n }\n\n if (nullify) {\n for (m = 0; m < ps; ++m) {\n val = points[k + m];\n if (val != null) {\n f = format[m];\n // extract min/max info\n if (f.autoscale !== false) {\n if (f.x) {\n updateAxis(s.xaxis, val, val);\n }\n if (f.y) {\n updateAxis(s.yaxis, val, val);\n }\n }\n }\n points[k + m] = null;\n }\n }\n else {\n // a little bit of line specific stuff that\n // perhaps shouldn't be here, but lacking\n // better means...\n if (insertSteps && k > 0\n && points[k - ps] != null\n && points[k - ps] != points[k]\n && points[k - ps + 1] != points[k + 1]) {\n // copy the point to make room for a middle point\n for (m = 0; m < ps; ++m)\n points[k + ps + m] = points[k + m];\n\n // middle point has same y\n points[k + 1] = points[k - ps + 1];\n\n // we've added a point, better reflect that\n k += ps;\n }\n }\n }\n }\n\n // give the hooks a chance to run\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n executeHooks(hooks.processDatapoints, [ s, s.datapoints]);\n }\n\n // second pass: find datamax/datamin for auto-scaling\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n points = s.datapoints.points;\n ps = s.datapoints.pointsize;\n format = s.datapoints.format;\n\n var xmin = topSentry, ymin = topSentry,\n xmax = bottomSentry, ymax = bottomSentry;\n\n for (j = 0; j < points.length; j += ps) {\n if (points[j] == null)\n continue;\n\n for (m = 0; m < ps; ++m) {\n val = points[j + m];\n f = format[m];\n if (!f || f.autoscale === false || val == fakeInfinity || val == -fakeInfinity)\n continue;\n\n if (f.x) {\n if (val < xmin)\n xmin = val;\n if (val > xmax)\n xmax = val;\n }\n if (f.y) {\n if (val < ymin)\n ymin = val;\n if (val > ymax)\n ymax = val;\n }\n }\n }\n\n if (s.bars.show) {\n // make sure we got room for the bar on the dancing floor\n var delta;\n\n switch (s.bars.align) {\n case \"left\":\n delta = 0;\n break;\n case \"right\":\n delta = -s.bars.barWidth;\n break;\n default:\n delta = -s.bars.barWidth / 2;\n }\n\n if (s.bars.horizontal) {\n ymin += delta;\n ymax += delta + s.bars.barWidth;\n }\n else {\n xmin += delta;\n xmax += delta + s.bars.barWidth;\n }\n }\n\n updateAxis(s.xaxis, xmin, xmax);\n updateAxis(s.yaxis, ymin, ymax);\n }\n\n $.each(allAxes(), function (_, axis) {\n if (axis.datamin == topSentry)\n axis.datamin = null;\n if (axis.datamax == bottomSentry)\n axis.datamax = null;\n });\n }\n\n function setupCanvases() {\n\n // Make sure the placeholder is clear of everything except canvases\n // from a previous plot in this container that we'll try to re-use.\n\n placeholder.css(\"padding\", 0) // padding messes up the positioning\n .children().filter(function(){\n return !$(this).hasClass(\"flot-overlay\") && !$(this).hasClass('flot-base');\n }).remove();\n\n if (placeholder.css(\"position\") == 'static')\n placeholder.css(\"position\", \"relative\"); // for positioning labels and overlay\n\n surface = new Canvas(\"flot-base\", placeholder);\n overlay = new Canvas(\"flot-overlay\", placeholder); // overlay canvas for interactive features\n\n ctx = surface.context;\n octx = overlay.context;\n\n // define which element we're listening for events on\n eventHolder = $(overlay.element).unbind();\n\n // If we're re-using a plot object, shut down the old one\n\n var existing = placeholder.data(\"plot\");\n\n if (existing) {\n existing.shutdown();\n overlay.clear();\n }\n\n // save in case we get replotted\n placeholder.data(\"plot\", plot);\n }\n\n function bindEvents() {\n // bind events\n if (options.grid.hoverable) {\n eventHolder.mousemove(onMouseMove);\n\n // Use bind, rather than .mouseleave, because we officially\n // still support jQuery 1.2.6, which doesn't define a shortcut\n // for mouseenter or mouseleave. This was a bug/oversight that\n // was fixed somewhere around 1.3.x. We can return to using\n // .mouseleave when we drop support for 1.2.6.\n\n eventHolder.bind(\"mouseleave\", onMouseLeave);\n }\n\n if (options.grid.clickable)\n eventHolder.click(onClick);\n\n executeHooks(hooks.bindEvents, [eventHolder]);\n }\n\n function shutdown() {\n if (redrawTimeout)\n clearTimeout(redrawTimeout);\n\n eventHolder.unbind(\"mousemove\", onMouseMove);\n eventHolder.unbind(\"mouseleave\", onMouseLeave);\n eventHolder.unbind(\"click\", onClick);\n\n executeHooks(hooks.shutdown, [eventHolder]);\n }\n\n function setTransformationHelpers(axis) {\n // set helper functions on the axis, assumes plot area\n // has been computed already\n\n function identity(x) { return x; }\n\n var s, m, t = axis.options.transform || identity,\n it = axis.options.inverseTransform;\n\n // precompute how much the axis is scaling a point\n // in canvas space\n if (axis.direction == \"x\") {\n s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min));\n m = Math.min(t(axis.max), t(axis.min));\n }\n else {\n s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));\n s = -s;\n m = Math.max(t(axis.max), t(axis.min));\n }\n\n // data point to canvas coordinate\n if (t == identity) // slight optimization\n axis.p2c = function (p) { return (p - m) * s; };\n else\n axis.p2c = function (p) { return (t(p) - m) * s; };\n // canvas coordinate to data point\n if (!it)\n axis.c2p = function (c) { return m + c / s; };\n else\n axis.c2p = function (c) { return it(m + c / s); };\n }\n\n function measureTickLabels(axis) {\n\n var opts = axis.options,\n ticks = axis.ticks || [],\n labelWidth = opts.labelWidth || 0,\n labelHeight = opts.labelHeight || 0,\n maxWidth = labelWidth || (axis.direction == \"x\" ? Math.floor(surface.width / (ticks.length || 1)) : null),\n legacyStyles = axis.direction + \"Axis \" + axis.direction + axis.n + \"Axis\",\n layer = \"flot-\" + axis.direction + \"-axis flot-\" + axis.direction + axis.n + \"-axis \" + legacyStyles,\n font = opts.font || \"flot-tick-label tickLabel\";\n\n for (var i = 0; i < ticks.length; ++i) {\n\n var t = ticks[i];\n\n if (!t.label)\n continue;\n\n var info = surface.getTextInfo(layer, t.label, font, null, maxWidth);\n\n labelWidth = Math.max(labelWidth, info.width);\n labelHeight = Math.max(labelHeight, info.height);\n }\n\n axis.labelWidth = opts.labelWidth || labelWidth;\n axis.labelHeight = opts.labelHeight || labelHeight;\n }\n\n function allocateAxisBoxFirstPhase(axis) {\n // find the bounding box of the axis by looking at label\n // widths/heights and ticks, make room by diminishing the\n // plotOffset; this first phase only looks at one\n // dimension per axis, the other dimension depends on the\n // other axes so will have to wait\n\n var lw = axis.labelWidth,\n lh = axis.labelHeight,\n pos = axis.options.position,\n isXAxis = axis.direction === \"x\",\n tickLength = axis.options.tickLength,\n axisMargin = options.grid.axisMargin,\n padding = options.grid.labelMargin,\n innermost = true,\n outermost = true,\n first = true,\n found = false;\n\n // Determine the axis's position in its direction and on its side\n\n $.each(isXAxis ? xaxes : yaxes, function(i, a) {\n if (a && (a.show || a.reserveSpace)) {\n if (a === axis) {\n found = true;\n } else if (a.options.position === pos) {\n if (found) {\n outermost = false;\n } else {\n innermost = false;\n }\n }\n if (!found) {\n first = false;\n }\n }\n });\n\n // The outermost axis on each side has no margin\n\n if (outermost) {\n axisMargin = 0;\n }\n\n // The ticks for the first axis in each direction stretch across\n\n if (tickLength == null) {\n tickLength = first ? \"full\" : 5;\n }\n\n if (!isNaN(+tickLength))\n padding += +tickLength;\n\n if (isXAxis) {\n lh += padding;\n\n if (pos == \"bottom\") {\n plotOffset.bottom += lh + axisMargin;\n axis.box = { top: surface.height - plotOffset.bottom, height: lh };\n }\n else {\n axis.box = { top: plotOffset.top + axisMargin, height: lh };\n plotOffset.top += lh + axisMargin;\n }\n }\n else {\n lw += padding;\n\n if (pos == \"left\") {\n axis.box = { left: plotOffset.left + axisMargin, width: lw };\n plotOffset.left += lw + axisMargin;\n }\n else {\n plotOffset.right += lw + axisMargin;\n axis.box = { left: surface.width - plotOffset.right, width: lw };\n }\n }\n\n // save for future reference\n axis.position = pos;\n axis.tickLength = tickLength;\n axis.box.padding = padding;\n axis.innermost = innermost;\n }\n\n function allocateAxisBoxSecondPhase(axis) {\n // now that all axis boxes have been placed in one\n // dimension, we can set the remaining dimension coordinates\n if (axis.direction == \"x\") {\n axis.box.left = plotOffset.left - axis.labelWidth / 2;\n axis.box.width = surface.width - plotOffset.left - plotOffset.right + axis.labelWidth;\n }\n else {\n axis.box.top = plotOffset.top - axis.labelHeight / 2;\n axis.box.height = surface.height - plotOffset.bottom - plotOffset.top + axis.labelHeight;\n }\n }\n\n function adjustLayoutForThingsStickingOut() {\n // possibly adjust plot offset to ensure everything stays\n // inside the canvas and isn't clipped off\n\n var minMargin = options.grid.minBorderMargin,\n axis, i;\n\n // check stuff from the plot (FIXME: this should just read\n // a value from the series, otherwise it's impossible to\n // customize)\n if (minMargin == null) {\n minMargin = 0;\n for (i = 0; i < series.length; ++i)\n minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));\n }\n\n var margins = {\n left: minMargin,\n right: minMargin,\n top: minMargin,\n bottom: minMargin\n };\n\n // check axis labels, note we don't check the actual\n // labels but instead use the overall width/height to not\n // jump as much around with replots\n $.each(allAxes(), function (_, axis) {\n if (axis.reserveSpace && axis.ticks && axis.ticks.length) {\n if (axis.direction === \"x\") {\n margins.left = Math.max(margins.left, axis.labelWidth / 2);\n margins.right = Math.max(margins.right, axis.labelWidth / 2);\n } else {\n margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2);\n margins.top = Math.max(margins.top, axis.labelHeight / 2);\n }\n }\n });\n\n plotOffset.left = Math.ceil(Math.max(margins.left, plotOffset.left));\n plotOffset.right = Math.ceil(Math.max(margins.right, plotOffset.right));\n plotOffset.top = Math.ceil(Math.max(margins.top, plotOffset.top));\n plotOffset.bottom = Math.ceil(Math.max(margins.bottom, plotOffset.bottom));\n }\n\n function setupGrid() {\n var i, axes = allAxes(), showGrid = options.grid.show;\n\n // Initialize the plot's offset from the edge of the canvas\n\n for (var a in plotOffset) {\n var margin = options.grid.margin || 0;\n plotOffset[a] = typeof margin == \"number\" ? margin : margin[a] || 0;\n }\n\n executeHooks(hooks.processOffset, [plotOffset]);\n\n // If the grid is visible, add its border width to the offset\n\n for (var a in plotOffset) {\n if(typeof(options.grid.borderWidth) == \"object\") {\n plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;\n }\n else {\n plotOffset[a] += showGrid ? options.grid.borderWidth : 0;\n }\n }\n\n $.each(axes, function (_, axis) {\n var axisOpts = axis.options;\n axis.show = axisOpts.show == null ? axis.used : axisOpts.show;\n axis.reserveSpace = axisOpts.reserveSpace == null ? axis.show : axisOpts.reserveSpace;\n setRange(axis);\n });\n\n if (showGrid) {\n\n var allocatedAxes = $.grep(axes, function (axis) {\n return axis.show || axis.reserveSpace;\n });\n\n $.each(allocatedAxes, function (_, axis) {\n // make the ticks\n setupTickGeneration(axis);\n setTicks(axis);\n snapRangeToTicks(axis, axis.ticks);\n // find labelWidth/Height for axis\n measureTickLabels(axis);\n });\n\n // with all dimensions calculated, we can compute the\n // axis bounding boxes, start from the outside\n // (reverse order)\n for (i = allocatedAxes.length - 1; i >= 0; --i)\n allocateAxisBoxFirstPhase(allocatedAxes[i]);\n\n // make sure we've got enough space for things that\n // might stick out\n adjustLayoutForThingsStickingOut();\n\n $.each(allocatedAxes, function (_, axis) {\n allocateAxisBoxSecondPhase(axis);\n });\n }\n\n plotWidth = surface.width - plotOffset.left - plotOffset.right;\n plotHeight = surface.height - plotOffset.bottom - plotOffset.top;\n\n // now we got the proper plot dimensions, we can compute the scaling\n $.each(axes, function (_, axis) {\n setTransformationHelpers(axis);\n });\n\n if (showGrid) {\n drawAxisLabels();\n }\n\n insertLegend();\n }\n\n function setRange(axis) {\n var opts = axis.options,\n min = +(opts.min != null ? opts.min : axis.datamin),\n max = +(opts.max != null ? opts.max : axis.datamax),\n delta = max - min;\n\n if (delta == 0.0) {\n // degenerate case\n var widen = max == 0 ? 1 : 0.01;\n\n if (opts.min == null)\n min -= widen;\n // always widen max if we couldn't widen min to ensure we\n // don't fall into min == max which doesn't work\n if (opts.max == null || opts.min != null)\n max += widen;\n }\n else {\n // consider autoscaling\n var margin = opts.autoscaleMargin;\n if (margin != null) {\n if (opts.min == null) {\n min -= delta * margin;\n // make sure we don't go below zero if all values\n // are positive\n if (min < 0 && axis.datamin != null && axis.datamin >= 0)\n min = 0;\n }\n if (opts.max == null) {\n max += delta * margin;\n if (max > 0 && axis.datamax != null && axis.datamax <= 0)\n max = 0;\n }\n }\n }\n axis.min = min;\n axis.max = max;\n }\n\n function setupTickGeneration(axis) {\n var opts = axis.options;\n\n // estimate number of ticks\n var noTicks;\n if (typeof opts.ticks == \"number\" && opts.ticks > 0)\n noTicks = opts.ticks;\n else\n // heuristic based on the model a*sqrt(x) fitted to\n // some data points that seemed reasonable\n noTicks = 0.3 * Math.sqrt(axis.direction == \"x\" ? surface.width : surface.height);\n\n var delta = (axis.max - axis.min) / noTicks,\n dec = -Math.floor(Math.log(delta) / Math.LN10),\n maxDec = opts.tickDecimals;\n\n if (maxDec != null && dec > maxDec) {\n dec = maxDec;\n }\n\n var magn = Math.pow(10, -dec),\n norm = delta / magn, // norm is between 1.0 and 10.0\n size;\n\n if (norm < 1.5) {\n size = 1;\n } else if (norm < 3) {\n size = 2;\n // special case for 2.5, requires an extra decimal\n if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {\n size = 2.5;\n ++dec;\n }\n } else if (norm < 7.5) {\n size = 5;\n } else {\n size = 10;\n }\n\n size *= magn;\n\n if (opts.minTickSize != null && size < opts.minTickSize) {\n size = opts.minTickSize;\n }\n\n axis.delta = delta;\n axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);\n axis.tickSize = opts.tickSize || size;\n\n // Time mode was moved to a plug-in in 0.8, and since so many people use it\n // we'll add an especially friendly reminder to make sure they included it.\n\n if (opts.mode == \"time\" && !axis.tickGenerator) {\n throw new Error(\"Time mode requires the flot.time plugin.\");\n }\n\n // Flot supports base-10 axes; any other mode else is handled by a plug-in,\n // like flot.time.js.\n\n if (!axis.tickGenerator) {\n\n axis.tickGenerator = function (axis) {\n\n var ticks = [],\n start = floorInBase(axis.min, axis.tickSize),\n i = 0,\n v = Number.NaN,\n prev;\n\n do {\n prev = v;\n v = start + i * axis.tickSize;\n ticks.push(v);\n ++i;\n } while (v < axis.max && v != prev);\n return ticks;\n };\n\n\t\t\t\taxis.tickFormatter = function (value, axis) {\n\n\t\t\t\t\tvar factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1;\n\t\t\t\t\tvar formatted = \"\" + Math.round(value * factor) / factor;\n\n\t\t\t\t\t// If tickDecimals was specified, ensure that we have exactly that\n\t\t\t\t\t// much precision; otherwise default to the value's own precision.\n\n\t\t\t\t\tif (axis.tickDecimals != null) {\n\t\t\t\t\t\tvar decimal = formatted.indexOf(\".\");\n\t\t\t\t\t\tvar precision = decimal == -1 ? 0 : formatted.length - decimal - 1;\n\t\t\t\t\t\tif (precision < axis.tickDecimals) {\n\t\t\t\t\t\t\treturn (precision ? formatted : formatted + \".\") + (\"\" + factor).substr(1, axis.tickDecimals - precision);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n return formatted;\n };\n }\n\n if ($.isFunction(opts.tickFormatter))\n axis.tickFormatter = function (v, axis) { return \"\" + opts.tickFormatter(v, axis); };\n\n if (opts.alignTicksWithAxis != null) {\n var otherAxis = (axis.direction == \"x\" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1];\n if (otherAxis && otherAxis.used && otherAxis != axis) {\n // consider snapping min/max to outermost nice ticks\n var niceTicks = axis.tickGenerator(axis);\n if (niceTicks.length > 0) {\n if (opts.min == null)\n axis.min = Math.min(axis.min, niceTicks[0]);\n if (opts.max == null && niceTicks.length > 1)\n axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]);\n }\n\n axis.tickGenerator = function (axis) {\n // copy ticks, scaled to this axis\n var ticks = [], v, i;\n for (i = 0; i < otherAxis.ticks.length; ++i) {\n v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min);\n v = axis.min + v * (axis.max - axis.min);\n ticks.push(v);\n }\n return ticks;\n };\n\n // we might need an extra decimal since forced\n // ticks don't necessarily fit naturally\n if (!axis.mode && opts.tickDecimals == null) {\n var extraDec = Math.max(0, -Math.floor(Math.log(axis.delta) / Math.LN10) + 1),\n ts = axis.tickGenerator(axis);\n\n // only proceed if the tick interval rounded\n // with an extra decimal doesn't give us a\n // zero at end\n if (!(ts.length > 1 && /\\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec))))\n axis.tickDecimals = extraDec;\n }\n }\n }\n }\n\n function setTicks(axis) {\n var oticks = axis.options.ticks, ticks = [];\n if (oticks == null || (typeof oticks == \"number\" && oticks > 0))\n ticks = axis.tickGenerator(axis);\n else if (oticks) {\n if ($.isFunction(oticks))\n // generate the ticks\n ticks = oticks(axis);\n else\n ticks = oticks;\n }\n\n // clean up/labelify the supplied ticks, copy them over\n var i, v;\n axis.ticks = [];\n for (i = 0; i < ticks.length; ++i) {\n var label = null;\n var t = ticks[i];\n if (typeof t == \"object\") {\n v = +t[0];\n if (t.length > 1)\n label = t[1];\n }\n else\n v = +t;\n if (label == null)\n label = axis.tickFormatter(v, axis);\n if (!isNaN(v))\n axis.ticks.push({ v: v, label: label });\n }\n }\n\n function snapRangeToTicks(axis, ticks) {\n if (axis.options.autoscaleMargin && ticks.length > 0) {\n // snap to ticks\n if (axis.options.min == null)\n axis.min = Math.min(axis.min, ticks[0].v);\n if (axis.options.max == null && ticks.length > 1)\n axis.max = Math.max(axis.max, ticks[ticks.length - 1].v);\n }\n }\n\n function draw() {\n\n surface.clear();\n\n executeHooks(hooks.drawBackground, [ctx]);\n\n var grid = options.grid;\n\n // draw background, if any\n if (grid.show && grid.backgroundColor)\n drawBackground();\n\n if (grid.show && !grid.aboveData) {\n drawGrid();\n }\n\n for (var i = 0; i < series.length; ++i) {\n executeHooks(hooks.drawSeries, [ctx, series[i]]);\n drawSeries(series[i]);\n }\n\n executeHooks(hooks.draw, [ctx]);\n\n if (grid.show && grid.aboveData) {\n drawGrid();\n }\n\n surface.render();\n\n // A draw implies that either the axes or data have changed, so we\n // should probably update the overlay highlights as well.\n\n triggerRedrawOverlay();\n }\n\n function extractRange(ranges, coord) {\n var axis, from, to, key, axes = allAxes();\n\n for (var i = 0; i < axes.length; ++i) {\n axis = axes[i];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? xaxes[0] : yaxes[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n\n return { from: from, to: to, axis: axis };\n }\n\n function drawBackground() {\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, \"rgba(255, 255, 255, 0)\");\n ctx.fillRect(0, 0, plotWidth, plotHeight);\n ctx.restore();\n }\n\n function drawGrid() {\n var i, axes, bw, bc;\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n // draw markings\n var markings = options.grid.markings;\n if (markings) {\n if ($.isFunction(markings)) {\n axes = plot.getAxes();\n // xmin etc. is backwards compatibility, to be\n // removed in the future\n axes.xmin = axes.xaxis.min;\n axes.xmax = axes.xaxis.max;\n axes.ymin = axes.yaxis.min;\n axes.ymax = axes.yaxis.max;\n\n markings = markings(axes);\n }\n\n for (i = 0; i < markings.length; ++i) {\n var m = markings[i],\n xrange = extractRange(m, \"x\"),\n yrange = extractRange(m, \"y\");\n\n // fill in missing\n if (xrange.from == null)\n xrange.from = xrange.axis.min;\n if (xrange.to == null)\n xrange.to = xrange.axis.max;\n if (yrange.from == null)\n yrange.from = yrange.axis.min;\n if (yrange.to == null)\n yrange.to = yrange.axis.max;\n\n // clip\n if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max ||\n yrange.to < yrange.axis.min || yrange.from > yrange.axis.max)\n continue;\n\n xrange.from = Math.max(xrange.from, xrange.axis.min);\n xrange.to = Math.min(xrange.to, xrange.axis.max);\n yrange.from = Math.max(yrange.from, yrange.axis.min);\n yrange.to = Math.min(yrange.to, yrange.axis.max);\n\n var xequal = xrange.from === xrange.to,\n yequal = yrange.from === yrange.to;\n\n if (xequal && yequal) {\n continue;\n }\n\n // then draw\n xrange.from = Math.floor(xrange.axis.p2c(xrange.from));\n xrange.to = Math.floor(xrange.axis.p2c(xrange.to));\n yrange.from = Math.floor(yrange.axis.p2c(yrange.from));\n yrange.to = Math.floor(yrange.axis.p2c(yrange.to));\n\n if (xequal || yequal) {\n var lineWidth = m.lineWidth || options.grid.markingsLineWidth,\n subPixel = lineWidth % 2 ? 0.5 : 0;\n ctx.beginPath();\n ctx.strokeStyle = m.color || options.grid.markingsColor;\n ctx.lineWidth = lineWidth;\n if (xequal) {\n ctx.moveTo(xrange.to + subPixel, yrange.from);\n ctx.lineTo(xrange.to + subPixel, yrange.to);\n } else {\n ctx.moveTo(xrange.from, yrange.to + subPixel);\n ctx.lineTo(xrange.to, yrange.to + subPixel); \n }\n ctx.stroke();\n } else {\n ctx.fillStyle = m.color || options.grid.markingsColor;\n ctx.fillRect(xrange.from, yrange.to,\n xrange.to - xrange.from,\n yrange.from - yrange.to);\n }\n }\n }\n\n // draw the ticks\n axes = allAxes();\n bw = options.grid.borderWidth;\n\n for (var j = 0; j < axes.length; ++j) {\n var axis = axes[j], box = axis.box,\n t = axis.tickLength, x, y, xoff, yoff;\n if (!axis.show || axis.ticks.length == 0)\n continue;\n\n ctx.lineWidth = 1;\n\n // find the edges\n if (axis.direction == \"x\") {\n x = 0;\n if (t == \"full\")\n y = (axis.position == \"top\" ? 0 : plotHeight);\n else\n y = box.top - plotOffset.top + (axis.position == \"top\" ? box.height : 0);\n }\n else {\n y = 0;\n if (t == \"full\")\n x = (axis.position == \"left\" ? 0 : plotWidth);\n else\n x = box.left - plotOffset.left + (axis.position == \"left\" ? box.width : 0);\n }\n\n // draw tick bar\n if (!axis.innermost) {\n ctx.strokeStyle = axis.options.color;\n ctx.beginPath();\n xoff = yoff = 0;\n if (axis.direction == \"x\")\n xoff = plotWidth + 1;\n else\n yoff = plotHeight + 1;\n\n if (ctx.lineWidth == 1) {\n if (axis.direction == \"x\") {\n y = Math.floor(y) + 0.5;\n } else {\n x = Math.floor(x) + 0.5;\n }\n }\n\n ctx.moveTo(x, y);\n ctx.lineTo(x + xoff, y + yoff);\n ctx.stroke();\n }\n\n // draw ticks\n\n ctx.strokeStyle = axis.options.tickColor;\n\n ctx.beginPath();\n for (i = 0; i < axis.ticks.length; ++i) {\n var v = axis.ticks[i].v;\n\n xoff = yoff = 0;\n\n if (isNaN(v) || v < axis.min || v > axis.max\n // skip those lying on the axes if we got a border\n || (t == \"full\"\n && ((typeof bw == \"object\" && bw[axis.position] > 0) || bw > 0)\n && (v == axis.min || v == axis.max)))\n continue;\n\n if (axis.direction == \"x\") {\n x = axis.p2c(v);\n yoff = t == \"full\" ? -plotHeight : t;\n\n if (axis.position == \"top\")\n yoff = -yoff;\n }\n else {\n y = axis.p2c(v);\n xoff = t == \"full\" ? -plotWidth : t;\n\n if (axis.position == \"left\")\n xoff = -xoff;\n }\n\n if (ctx.lineWidth == 1) {\n if (axis.direction == \"x\")\n x = Math.floor(x) + 0.5;\n else\n y = Math.floor(y) + 0.5;\n }\n\n ctx.moveTo(x, y);\n ctx.lineTo(x + xoff, y + yoff);\n }\n\n ctx.stroke();\n }\n\n\n // draw border\n if (bw) {\n // If either borderWidth or borderColor is an object, then draw the border\n // line by line instead of as one rectangle\n bc = options.grid.borderColor;\n if(typeof bw == \"object\" || typeof bc == \"object\") {\n if (typeof bw !== \"object\") {\n bw = {top: bw, right: bw, bottom: bw, left: bw};\n }\n if (typeof bc !== \"object\") {\n bc = {top: bc, right: bc, bottom: bc, left: bc};\n }\n\n if (bw.top > 0) {\n ctx.strokeStyle = bc.top;\n ctx.lineWidth = bw.top;\n ctx.beginPath();\n ctx.moveTo(0 - bw.left, 0 - bw.top/2);\n ctx.lineTo(plotWidth, 0 - bw.top/2);\n ctx.stroke();\n }\n\n if (bw.right > 0) {\n ctx.strokeStyle = bc.right;\n ctx.lineWidth = bw.right;\n ctx.beginPath();\n ctx.moveTo(plotWidth + bw.right / 2, 0 - bw.top);\n ctx.lineTo(plotWidth + bw.right / 2, plotHeight);\n ctx.stroke();\n }\n\n if (bw.bottom > 0) {\n ctx.strokeStyle = bc.bottom;\n ctx.lineWidth = bw.bottom;\n ctx.beginPath();\n ctx.moveTo(plotWidth + bw.right, plotHeight + bw.bottom / 2);\n ctx.lineTo(0, plotHeight + bw.bottom / 2);\n ctx.stroke();\n }\n\n if (bw.left > 0) {\n ctx.strokeStyle = bc.left;\n ctx.lineWidth = bw.left;\n ctx.beginPath();\n ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom);\n ctx.lineTo(0- bw.left/2, 0);\n ctx.stroke();\n }\n }\n else {\n ctx.lineWidth = bw;\n ctx.strokeStyle = options.grid.borderColor;\n ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);\n }\n }\n\n ctx.restore();\n }\n\n function drawAxisLabels() {\n\n $.each(allAxes(), function (_, axis) {\n var box = axis.box,\n legacyStyles = axis.direction + \"Axis \" + axis.direction + axis.n + \"Axis\",\n layer = \"flot-\" + axis.direction + \"-axis flot-\" + axis.direction + axis.n + \"-axis \" + legacyStyles,\n font = axis.options.font || \"flot-tick-label tickLabel\",\n tick, x, y, halign, valign;\n\n // Remove text before checking for axis.show and ticks.length;\n // otherwise plugins, like flot-tickrotor, that draw their own\n // tick labels will end up with both theirs and the defaults.\n\n surface.removeText(layer);\n\n if (!axis.show || axis.ticks.length == 0)\n return;\n\n for (var i = 0; i < axis.ticks.length; ++i) {\n\n tick = axis.ticks[i];\n if (!tick.label || tick.v < axis.min || tick.v > axis.max)\n continue;\n\n if (axis.direction == \"x\") {\n halign = \"center\";\n x = plotOffset.left + axis.p2c(tick.v);\n if (axis.position == \"bottom\") {\n y = box.top + box.padding;\n } else {\n y = box.top + box.height - box.padding;\n valign = \"bottom\";\n }\n } else {\n valign = \"middle\";\n y = plotOffset.top + axis.p2c(tick.v);\n if (axis.position == \"left\") {\n x = box.left + box.width - box.padding;\n halign = \"right\";\n } else {\n x = box.left + box.padding;\n }\n }\n\n surface.addText(layer, x, y, tick.label, font, null, null, halign, valign);\n }\n });\n }\n\n function drawSeries(series) {\n if (series.lines.show)\n drawSeriesLines(series);\n if (series.bars.show)\n drawSeriesBars(series);\n if (series.points.show)\n drawSeriesPoints(series);\n }\n\n function drawSeriesLines(series) {\n function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {\n var points = datapoints.points,\n ps = datapoints.pointsize,\n prevx = null, prevy = null;\n\n ctx.beginPath();\n for (var i = ps; i < points.length; i += ps) {\n var x1 = points[i - ps], y1 = points[i - ps + 1],\n x2 = points[i], y2 = points[i + 1];\n\n if (x1 == null || x2 == null)\n continue;\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min) {\n if (y2 < axisy.min)\n continue; // line segment is outside\n // compute new intersection point\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n }\n else if (y2 <= y1 && y2 < axisy.min) {\n if (y1 < axisy.min)\n continue;\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max) {\n if (y2 > axisy.max)\n continue;\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n }\n else if (y2 >= y1 && y2 > axisy.max) {\n if (y1 > axisy.max)\n continue;\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min)\n continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n }\n else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min)\n continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max)\n continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n }\n else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max)\n continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (x1 != prevx || y1 != prevy)\n ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);\n\n prevx = x2;\n prevy = y2;\n ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);\n }\n ctx.stroke();\n }\n\n function plotLineArea(datapoints, axisx, axisy) {\n var points = datapoints.points,\n ps = datapoints.pointsize,\n bottom = Math.min(Math.max(0, axisy.min), axisy.max),\n i = 0, top, areaOpen = false,\n ypos = 1, segmentStart = 0, segmentEnd = 0;\n\n // we process each segment in two turns, first forward\n // direction to sketch out top, then once we hit the\n // end we go backwards to sketch the bottom\n while (true) {\n if (ps > 0 && i > points.length + ps)\n break;\n\n i += ps; // ps is negative if going backwards\n\n var x1 = points[i - ps],\n y1 = points[i - ps + ypos],\n x2 = points[i], y2 = points[i + ypos];\n\n if (areaOpen) {\n if (ps > 0 && x1 != null && x2 == null) {\n // at turning point\n segmentEnd = i;\n ps = -ps;\n ypos = 2;\n continue;\n }\n\n if (ps < 0 && i == segmentStart + ps) {\n // done with the reverse sweep\n ctx.fill();\n areaOpen = false;\n ps = -ps;\n ypos = 1;\n i = segmentStart = segmentEnd + ps;\n continue;\n }\n }\n\n if (x1 == null || x2 == null)\n continue;\n\n // clip x values\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min)\n continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n }\n else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min)\n continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max)\n continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n }\n else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max)\n continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (!areaOpen) {\n // open area\n ctx.beginPath();\n ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));\n areaOpen = true;\n }\n\n // now first check the case where both is outside\n if (y1 >= axisy.max && y2 >= axisy.max) {\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));\n continue;\n }\n else if (y1 <= axisy.min && y2 <= axisy.min) {\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));\n continue;\n }\n\n // else it's a bit more complicated, there might\n // be a flat maxed out rectangle first, then a\n // triangular cutout or reverse; to find these\n // keep track of the current x values\n var x1old = x1, x2old = x2;\n\n // clip the y values, without shortcutting, we\n // go through all cases in turn\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n }\n else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n }\n else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // if the x value was changed we got a rectangle\n // to fill\n if (x1 != x1old) {\n ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));\n // it goes to (x1, y1), but we fill that below\n }\n\n // fill triangular section, this sometimes result\n // in redundant points if (x1, y1) hasn't changed\n // from previous line to, but we just ignore that\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));\n\n // fill the other rectangle if it's there\n if (x2 != x2old) {\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));\n ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2));\n }\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n ctx.lineJoin = \"round\";\n\n var lw = series.lines.lineWidth,\n sw = series.shadowSize;\n // FIXME: consider another form of shadow when filling is turned on\n if (lw > 0 && sw > 0) {\n // draw shadow as a thick and thin line with transparency\n ctx.lineWidth = sw;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n // position shadow at angle from the mid of line\n var angle = Math.PI/18;\n plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);\n ctx.lineWidth = sw/2;\n plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight);\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n plotLineArea(series.datapoints, series.xaxis, series.yaxis);\n }\n\n if (lw > 0)\n plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis);\n ctx.restore();\n }\n\n function drawSeriesPoints(series) {\n function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {\n var points = datapoints.points, ps = datapoints.pointsize;\n\n for (var i = 0; i < points.length; i += ps) {\n var x = points[i], y = points[i + 1];\n if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)\n continue;\n\n ctx.beginPath();\n x = axisx.p2c(x);\n y = axisy.p2c(y) + offset;\n if (symbol == \"circle\")\n ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);\n else\n symbol(ctx, x, y, radius, shadow);\n ctx.closePath();\n\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n ctx.fill();\n }\n ctx.stroke();\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n var lw = series.points.lineWidth,\n sw = series.shadowSize,\n radius = series.points.radius,\n symbol = series.points.symbol;\n\n // If the user sets the line width to 0, we change it to a very \n // small value. A line width of 0 seems to force the default of 1.\n // Doing the conditional here allows the shadow setting to still be \n // optional even with a lineWidth of 0.\n\n if( lw == 0 )\n lw = 0.0001;\n\n if (lw > 0 && sw > 0) {\n // draw shadow in two steps\n var w = sw / 2;\n ctx.lineWidth = w;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n plotPoints(series.datapoints, radius, null, w + w/2, true,\n series.xaxis, series.yaxis, symbol);\n\n ctx.strokeStyle = \"rgba(0,0,0,0.2)\";\n plotPoints(series.datapoints, radius, null, w/2, true,\n series.xaxis, series.yaxis, symbol);\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n plotPoints(series.datapoints, radius,\n getFillStyle(series.points, series.color), 0, false,\n series.xaxis, series.yaxis, symbol);\n ctx.restore();\n }\n\n function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {\n var left, right, bottom, top,\n drawLeft, drawRight, drawTop, drawBottom,\n tmp;\n\n // in horizontal mode, we start the bar from the left\n // instead of from the bottom so it appears to be\n // horizontal rather than vertical\n if (horizontal) {\n drawBottom = drawRight = drawTop = true;\n drawLeft = false;\n left = b;\n right = x;\n top = y + barLeft;\n bottom = y + barRight;\n\n // account for negative bars\n if (right < left) {\n tmp = right;\n right = left;\n left = tmp;\n drawLeft = true;\n drawRight = false;\n }\n }\n else {\n drawLeft = drawRight = drawTop = true;\n drawBottom = false;\n left = x + barLeft;\n right = x + barRight;\n bottom = b;\n top = y;\n\n // account for negative bars\n if (top < bottom) {\n tmp = top;\n top = bottom;\n bottom = tmp;\n drawBottom = true;\n drawTop = false;\n }\n }\n\n // clip\n if (right < axisx.min || left > axisx.max ||\n top < axisy.min || bottom > axisy.max)\n return;\n\n if (left < axisx.min) {\n left = axisx.min;\n drawLeft = false;\n }\n\n if (right > axisx.max) {\n right = axisx.max;\n drawRight = false;\n }\n\n if (bottom < axisy.min) {\n bottom = axisy.min;\n drawBottom = false;\n }\n\n if (top > axisy.max) {\n top = axisy.max;\n drawTop = false;\n }\n\n left = axisx.p2c(left);\n bottom = axisy.p2c(bottom);\n right = axisx.p2c(right);\n top = axisy.p2c(top);\n\n // fill the bar\n if (fillStyleCallback) {\n c.fillStyle = fillStyleCallback(bottom, top);\n c.fillRect(left, top, right - left, bottom - top)\n }\n\n // draw outline\n if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) {\n c.beginPath();\n\n // FIXME: inline moveTo is buggy with excanvas\n c.moveTo(left, bottom);\n if (drawLeft)\n c.lineTo(left, top);\n else\n c.moveTo(left, top);\n if (drawTop)\n c.lineTo(right, top);\n else\n c.moveTo(right, top);\n if (drawRight)\n c.lineTo(right, bottom);\n else\n c.moveTo(right, bottom);\n if (drawBottom)\n c.lineTo(left, bottom);\n else\n c.moveTo(left, bottom);\n c.stroke();\n }\n }\n\n function drawSeriesBars(series) {\n function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {\n var points = datapoints.points, ps = datapoints.pointsize;\n\n for (var i = 0; i < points.length; i += ps) {\n if (points[i] == null)\n continue;\n drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n // FIXME: figure out a way to add shadows (for instance along the right edge)\n ctx.lineWidth = series.bars.lineWidth;\n ctx.strokeStyle = series.color;\n\n var barLeft;\n\n switch (series.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -series.bars.barWidth;\n break;\n default:\n barLeft = -series.bars.barWidth / 2;\n }\n\n var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;\n plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, fillStyleCallback, series.xaxis, series.yaxis);\n ctx.restore();\n }\n\n function getFillStyle(filloptions, seriesColor, bottom, top) {\n var fill = filloptions.fill;\n if (!fill)\n return null;\n\n if (filloptions.fillColor)\n return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);\n\n var c = $.color.parse(seriesColor);\n c.a = typeof fill == \"number\" ? fill : 0.4;\n c.normalize();\n return c.toString();\n }\n\n function insertLegend() {\n\n if (options.legend.container != null) {\n $(options.legend.container).html(\"\");\n } else {\n placeholder.find(\".legend\").remove();\n }\n\n if (!options.legend.show) {\n return;\n }\n\n var fragments = [], entries = [], rowStarted = false,\n lf = options.legend.labelFormatter, s, label;\n\n // Build a list of legend entries, with each having a label and a color\n\n for (var i = 0; i < series.length; ++i) {\n s = series[i];\n if (s.label) {\n label = lf ? lf(s.label, s) : s.label;\n if (label) {\n entries.push({\n label: label,\n color: s.color\n });\n }\n }\n }\n\n // Sort the legend using either the default or a custom comparator\n\n if (options.legend.sorted) {\n if ($.isFunction(options.legend.sorted)) {\n entries.sort(options.legend.sorted);\n } else if (options.legend.sorted == \"reverse\") {\n \tentries.reverse();\n } else {\n var ascending = options.legend.sorted != \"descending\";\n entries.sort(function(a, b) {\n return a.label == b.label ? 0 : (\n (a.label < b.label) != ascending ? 1 : -1 // Logical XOR\n );\n });\n }\n }\n\n // Generate markup for the list of entries, in their final order\n\n for (var i = 0; i < entries.length; ++i) {\n\n var entry = entries[i];\n\n if (i % options.legend.noColumns == 0) {\n if (rowStarted)\n fragments.push('</tr>');\n fragments.push('<tr>');\n rowStarted = true;\n }\n\n fragments.push(\n '<td class=\"legendColorBox\"><div style=\"border:1px solid ' + options.legend.labelBoxBorderColor + ';padding:1px\"><div style=\"width:4px;height:0;border:5px solid ' + entry.color + ';overflow:hidden\"></div></div></td>' +\n '<td class=\"legendLabel\">' + entry.label + '</td>'\n );\n }\n\n if (rowStarted)\n fragments.push('</tr>');\n\n if (fragments.length == 0)\n return;\n\n var table = '<table style=\"font-size:smaller;color:' + options.grid.color + '\">' + fragments.join(\"\") + '</table>';\n if (options.legend.container != null)\n $(options.legend.container).html(table);\n else {\n var pos = \"\",\n p = options.legend.position,\n m = options.legend.margin;\n if (m[0] == null)\n m = [m, m];\n if (p.charAt(0) == \"n\")\n pos += 'top:' + (m[1] + plotOffset.top) + 'px;';\n else if (p.charAt(0) == \"s\")\n pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';\n if (p.charAt(1) == \"e\")\n pos += 'right:' + (m[0] + plotOffset.right) + 'px;';\n else if (p.charAt(1) == \"w\")\n pos += 'left:' + (m[0] + plotOffset.left) + 'px;';\n var legend = $('<div class=\"legend\">' + table.replace('style=\"', 'style=\"position:absolute;' + pos +';') + '</div>').appendTo(placeholder);\n if (options.legend.backgroundOpacity != 0.0) {\n // put in the transparent background\n // separately to avoid blended labels and\n // label boxes\n var c = options.legend.backgroundColor;\n if (c == null) {\n c = options.grid.backgroundColor;\n if (c && typeof c == \"string\")\n c = $.color.parse(c);\n else\n c = $.color.extract(legend, 'background-color');\n c.a = 1;\n c = c.toString();\n }\n var div = legend.children();\n $('<div style=\"position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';\"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);\n }\n }\n }\n\n\n // interactive features\n\n var highlights = [],\n redrawTimeout = null;\n\n // returns the data item the mouse is over, or null if none is found\n function findNearbyItem(mouseX, mouseY, seriesFilter) {\n var maxDistance = options.grid.mouseActiveRadius,\n smallestDistance = maxDistance * maxDistance + 1,\n item = null, foundPoint = false, i, j, ps;\n\n for (i = series.length - 1; i >= 0; --i) {\n if (!seriesFilter(series[i]))\n continue;\n\n var s = series[i],\n axisx = s.xaxis,\n axisy = s.yaxis,\n points = s.datapoints.points,\n mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster\n my = axisy.c2p(mouseY),\n maxx = maxDistance / axisx.scale,\n maxy = maxDistance / axisy.scale;\n\n ps = s.datapoints.pointsize;\n // with inverse transforms, we can't use the maxx/maxy\n // optimization, sadly\n if (axisx.options.inverseTransform)\n maxx = Number.MAX_VALUE;\n if (axisy.options.inverseTransform)\n maxy = Number.MAX_VALUE;\n\n if (s.lines.show || s.points.show) {\n for (j = 0; j < points.length; j += ps) {\n var x = points[j], y = points[j + 1];\n if (x == null)\n continue;\n\n // For points and lines, the cursor must be within a\n // certain distance to the data point\n if (x - mx > maxx || x - mx < -maxx ||\n y - my > maxy || y - my < -maxy)\n continue;\n\n // We have to calculate distances in pixels, not in\n // data units, because the scales of the axes may be different\n var dx = Math.abs(axisx.p2c(x) - mouseX),\n dy = Math.abs(axisy.p2c(y) - mouseY),\n dist = dx * dx + dy * dy; // we save the sqrt\n\n // use <= to ensure last point takes precedence\n // (last generally means on top of)\n if (dist < smallestDistance) {\n smallestDistance = dist;\n item = [i, j / ps];\n }\n }\n }\n\n if (s.bars.show && !item) { // no other point can be nearby\n\n var barLeft, barRight;\n\n switch (s.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -s.bars.barWidth;\n break;\n default:\n barLeft = -s.bars.barWidth / 2;\n }\n\n barRight = barLeft + s.bars.barWidth;\n\n for (j = 0; j < points.length; j += ps) {\n var x = points[j], y = points[j + 1], b = points[j + 2];\n if (x == null)\n continue;\n\n // for a bar graph, the cursor must be inside the bar\n if (series[i].bars.horizontal ?\n (mx <= Math.max(b, x) && mx >= Math.min(b, x) &&\n my >= y + barLeft && my <= y + barRight) :\n (mx >= x + barLeft && mx <= x + barRight &&\n my >= Math.min(b, y) && my <= Math.max(b, y)))\n item = [i, j / ps];\n }\n }\n }\n\n if (item) {\n i = item[0];\n j = item[1];\n ps = series[i].datapoints.pointsize;\n\n return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),\n dataIndex: j,\n series: series[i],\n seriesIndex: i };\n }\n\n return null;\n }\n\n function onMouseMove(e) {\n if (options.grid.hoverable)\n triggerClickHoverEvent(\"plothover\", e,\n function (s) { return s[\"hoverable\"] != false; });\n }\n\n function onMouseLeave(e) {\n if (options.grid.hoverable)\n triggerClickHoverEvent(\"plothover\", e,\n function (s) { return false; });\n }\n\n function onClick(e) {\n triggerClickHoverEvent(\"plotclick\", e,\n function (s) { return s[\"clickable\"] != false; });\n }\n\n // trigger click or hover event (they send the same parameters\n // so we share their code)\n function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }\n\n function triggerRedrawOverlay() {\n var t = options.interaction.redrawOverlayInterval;\n if (t == -1) { // skip event queue\n drawOverlay();\n return;\n }\n\n if (!redrawTimeout)\n redrawTimeout = setTimeout(drawOverlay, t);\n }\n\n function drawOverlay() {\n redrawTimeout = null;\n\n // draw highlights\n octx.save();\n overlay.clear();\n octx.translate(plotOffset.left, plotOffset.top);\n\n var i, hi;\n for (i = 0; i < highlights.length; ++i) {\n hi = highlights[i];\n\n if (hi.series.bars.show)\n drawBarHighlight(hi.series, hi.point);\n else\n drawPointHighlight(hi.series, hi.point);\n }\n octx.restore();\n\n executeHooks(hooks.drawOverlay, [octx]);\n }\n\n function highlight(s, point, auto) {\n if (typeof s == \"number\")\n s = series[s];\n\n if (typeof point == \"number\") {\n var ps = s.datapoints.pointsize;\n point = s.datapoints.points.slice(ps * point, ps * (point + 1));\n }\n\n var i = indexOfHighlight(s, point);\n if (i == -1) {\n highlights.push({ series: s, point: point, auto: auto });\n\n triggerRedrawOverlay();\n }\n else if (!auto)\n highlights[i].auto = false;\n }\n\n function unhighlight(s, point) {\n if (s == null && point == null) {\n highlights = [];\n triggerRedrawOverlay();\n return;\n }\n\n if (typeof s == \"number\")\n s = series[s];\n\n if (typeof point == \"number\") {\n var ps = s.datapoints.pointsize;\n point = s.datapoints.points.slice(ps * point, ps * (point + 1));\n }\n\n var i = indexOfHighlight(s, point);\n if (i != -1) {\n highlights.splice(i, 1);\n\n triggerRedrawOverlay();\n }\n }\n\n function indexOfHighlight(s, p) {\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.series == s && h.point[0] == p[0]\n && h.point[1] == p[1])\n return i;\n }\n return -1;\n }\n\n function drawPointHighlight(series, point) {\n var x = point[0], y = point[1],\n axisx = series.xaxis, axisy = series.yaxis,\n highlightColor = (typeof series.highlightColor === \"string\") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString();\n\n if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)\n return;\n\n var pointRadius = series.points.radius + series.points.lineWidth / 2;\n octx.lineWidth = pointRadius;\n octx.strokeStyle = highlightColor;\n var radius = 1.5 * pointRadius;\n x = axisx.p2c(x);\n y = axisy.p2c(y);\n\n octx.beginPath();\n if (series.points.symbol == \"circle\")\n octx.arc(x, y, radius, 0, 2 * Math.PI, false);\n else\n series.points.symbol(octx, x, y, radius, false);\n octx.closePath();\n octx.stroke();\n }\n\n function drawBarHighlight(series, point) {\n var highlightColor = (typeof series.highlightColor === \"string\") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(),\n fillStyle = highlightColor,\n barLeft;\n\n switch (series.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -series.bars.barWidth;\n break;\n default:\n barLeft = -series.bars.barWidth / 2;\n }\n\n octx.lineWidth = series.bars.lineWidth;\n octx.strokeStyle = highlightColor;\n\n drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth,\n function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth);\n }\n\n function getColorOrGradient(spec, bottom, top, defaultColor) {\n if (typeof spec == \"string\")\n return spec;\n else {\n // assume this is a gradient spec; IE currently only\n // supports a simple vertical gradient properly, so that's\n // what we support too\n var gradient = ctx.createLinearGradient(0, top, 0, bottom);\n\n for (var i = 0, l = spec.colors.length; i < l; ++i) {\n var c = spec.colors[i];\n if (typeof c != \"string\") {\n var co = $.color.parse(defaultColor);\n if (c.brightness != null)\n co = co.scale('rgb', c.brightness);\n if (c.opacity != null)\n co.a *= c.opacity;\n c = co.toString();\n }\n gradient.addColorStop(i / (l - 1), c);\n }\n\n return gradient;\n }\n }\n }\n\n // Add the plot function to the top level of the jQuery object\n\n $.plot = function(placeholder, data, options) {\n //var t0 = new Date();\n var plot = new Plot($(placeholder), data, options, $.plot.plugins);\n //(window.console ? console.log : alert)(\"time used (msecs): \" + ((new Date()).getTime() - t0.getTime()));\n return plot;\n };\n\n $.plot.version = \"0.8.3\";\n\n $.plot.plugins = [];\n\n // Also add the plot function as a chainable property\n\n $.fn.plot = function(data, options) {\n return this.each(function() {\n $.plot(this, data, options);\n });\n };\n\n // round to nearby lower multiple of base\n function floorInBase(n, base) {\n return base * Math.floor(n / base);\n }\n\n})(jQuery);\n","/*!\n * jQuery Placeholder Plugin v2.3.0\n * https://github.com/mathiasbynens/jquery-placeholder\n *\n * Copyright 2011, 2015 Mathias Bynens\n * Released under the MIT license\n */\n(function(factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD\n define(['jquery'], factory);\n } else if (typeof module === 'object' && module.exports) {\n factory(require('jquery'));\n } else {\n // Browser globals\n factory(jQuery);\n }\n}(function($) {\n\n /****\n * Allows plugin behavior simulation in modern browsers for easier debugging. \n * When setting to true, use attribute \"placeholder-x\" rather than the usual \"placeholder\" in your inputs/textareas \n * i.e. <input type=\"text\" placeholder-x=\"my placeholder text\" />\n */\n var debugMode = false; \n\n // Opera Mini v7 doesn't support placeholder although its DOM seems to indicate so\n var isOperaMini = Object.prototype.toString.call(window.operamini) === '[object OperaMini]';\n var isInputSupported = 'placeholder' in document.createElement('input') && !isOperaMini && !debugMode;\n var isTextareaSupported = 'placeholder' in document.createElement('textarea') && !isOperaMini && !debugMode;\n var valHooks = $.valHooks;\n var propHooks = $.propHooks;\n var hooks;\n var placeholder;\n var settings = {};\n\n if (isInputSupported && isTextareaSupported) {\n\n placeholder = $.fn.placeholder = function() {\n return this;\n };\n\n placeholder.input = true;\n placeholder.textarea = true;\n\n } else {\n\n placeholder = $.fn.placeholder = function(options) {\n\n var defaults = {customClass: 'placeholder'};\n settings = $.extend({}, defaults, options);\n\n return this.filter((isInputSupported ? 'textarea' : ':input') + '[' + (debugMode ? 'placeholder-x' : 'placeholder') + ']')\n .not('.'+settings.customClass)\n .not(':radio, :checkbox, :hidden')\n .bind({\n 'focus.placeholder': clearPlaceholder,\n 'blur.placeholder': setPlaceholder\n })\n .data('placeholder-enabled', true)\n .trigger('blur.placeholder');\n };\n\n placeholder.input = isInputSupported;\n placeholder.textarea = isTextareaSupported;\n\n hooks = {\n 'get': function(element) {\n\n var $element = $(element);\n var $passwordInput = $element.data('placeholder-password');\n\n if ($passwordInput) {\n return $passwordInput[0].value;\n }\n\n return $element.data('placeholder-enabled') && $element.hasClass(settings.customClass) ? '' : element.value;\n },\n 'set': function(element, value) {\n\n var $element = $(element);\n var $replacement;\n var $passwordInput;\n\n if (value !== '') {\n\n $replacement = $element.data('placeholder-textinput');\n $passwordInput = $element.data('placeholder-password');\n\n if ($replacement) {\n clearPlaceholder.call($replacement[0], true, value) || (element.value = value);\n $replacement[0].value = value;\n\n } else if ($passwordInput) {\n clearPlaceholder.call(element, true, value) || ($passwordInput[0].value = value);\n element.value = value;\n }\n }\n\n if (!$element.data('placeholder-enabled')) {\n element.value = value;\n return $element;\n }\n\n if (value === '') {\n \n element.value = value;\n \n // Setting the placeholder causes problems if the element continues to have focus.\n if (element != safeActiveElement()) {\n // We can't use `triggerHandler` here because of dummy text/password inputs :(\n setPlaceholder.call(element);\n }\n\n } else {\n \n if ($element.hasClass(settings.customClass)) {\n clearPlaceholder.call(element);\n }\n\n element.value = value;\n }\n // `set` can not return `undefined`; see http://jsapi.info/jquery/1.7.1/val#L2363\n return $element;\n }\n };\n\n if (!isInputSupported) {\n valHooks.input = hooks;\n propHooks.value = hooks;\n }\n\n if (!isTextareaSupported) {\n valHooks.textarea = hooks;\n propHooks.value = hooks;\n }\n\n $(function() {\n // Look for forms\n $(document).delegate('form', 'submit.placeholder', function() {\n \n // Clear the placeholder values so they don't get submitted\n var $inputs = $('.'+settings.customClass, this).each(function() {\n clearPlaceholder.call(this, true, '');\n });\n\n setTimeout(function() {\n $inputs.each(setPlaceholder);\n }, 10);\n });\n });\n\n // Clear placeholder values upon page reload\n $(window).bind('beforeunload.placeholder', function() {\n\n var clearPlaceholders = true;\n\n try {\n // Prevent IE javascript:void(0) anchors from causing cleared values\n if (document.activeElement.toString() === 'javascript:void(0)') {\n clearPlaceholders = false;\n }\n } catch (exception) { }\n\n if (clearPlaceholders) {\n $('.'+settings.customClass).each(function() {\n this.value = '';\n });\n }\n });\n }\n\n function args(elem) {\n // Return an object of element attributes\n var newAttrs = {};\n var rinlinejQuery = /^jQuery\\d+$/;\n\n $.each(elem.attributes, function(i, attr) {\n if (attr.specified && !rinlinejQuery.test(attr.name)) {\n newAttrs[attr.name] = attr.value;\n }\n });\n\n return newAttrs;\n }\n\n function clearPlaceholder(event, value) {\n \n var input = this;\n var $input = $(this);\n \n if (input.value === $input.attr((debugMode ? 'placeholder-x' : 'placeholder')) && $input.hasClass(settings.customClass)) {\n \n input.value = '';\n $input.removeClass(settings.customClass);\n\n if ($input.data('placeholder-password')) {\n\n $input = $input.hide().nextAll('input[type=\"password\"]:first').show().attr('id', $input.removeAttr('id').data('placeholder-id'));\n \n // If `clearPlaceholder` was called from `$.valHooks.input.set`\n if (event === true) {\n $input[0].value = value;\n\n return value;\n }\n\n $input.focus();\n\n } else {\n input == safeActiveElement() && input.select();\n }\n }\n }\n\n function setPlaceholder(event) {\n var $replacement;\n var input = this;\n var $input = $(this);\n var id = input.id;\n\n // If the placeholder is activated, triggering blur event (`$input.trigger('blur')`) should do nothing.\n if (event && event.type === 'blur' && $input.hasClass(settings.customClass)) {\n return;\n }\n\n if (input.value === '') {\n if (input.type === 'password') {\n if (!$input.data('placeholder-textinput')) {\n \n try {\n $replacement = $input.clone().prop({ 'type': 'text' });\n } catch(e) {\n $replacement = $('<input>').attr($.extend(args(this), { 'type': 'text' }));\n }\n\n $replacement\n .removeAttr('name')\n .data({\n 'placeholder-enabled': true,\n 'placeholder-password': $input,\n 'placeholder-id': id\n })\n .bind('focus.placeholder', clearPlaceholder);\n\n $input\n .data({\n 'placeholder-textinput': $replacement,\n 'placeholder-id': id\n })\n .before($replacement);\n }\n\n input.value = '';\n $input = $input.removeAttr('id').hide().prevAll('input[type=\"text\"]:first').attr('id', $input.data('placeholder-id')).show();\n\n } else {\n \n var $passwordInput = $input.data('placeholder-password');\n\n if ($passwordInput) {\n $passwordInput[0].value = '';\n $input.attr('id', $input.data('placeholder-id')).show().nextAll('input[type=\"password\"]:last').hide().removeAttr('id');\n }\n }\n\n $input.addClass(settings.customClass);\n $input[0].value = $input.attr((debugMode ? 'placeholder-x' : 'placeholder'));\n\n } else {\n $input.removeClass(settings.customClass);\n }\n }\n\n function safeActiveElement() {\n // Avoid IE9 `document.activeElement` of death\n try {\n return document.activeElement;\n } catch (exception) {}\n }\n}));\n","/*!\n * jQuery Raty - A Star Rating Plugin\n *\n * The MIT License\n *\n * @author : Washington Botelho\n * @doc : http://wbotelhos.com/raty\n * @version : 2.7.0\n *\n */\n\n;\n(function($) {\n 'use strict';\n\n var methods = {\n init: function(options) {\n return this.each(function() {\n this.self = $(this);\n\n methods.destroy.call(this.self);\n\n this.opt = $.extend(true, {}, $.fn.raty.defaults, options);\n\n methods._adjustCallback.call(this);\n methods._adjustNumber.call(this);\n methods._adjustHints.call(this);\n\n this.opt.score = methods._adjustedScore.call(this, this.opt.score);\n\n if (this.opt.starType !== 'img') {\n methods._adjustStarType.call(this);\n }\n\n methods._adjustPath.call(this);\n methods._createStars.call(this);\n\n if (this.opt.cancel) {\n methods._createCancel.call(this);\n }\n\n if (this.opt.precision) {\n methods._adjustPrecision.call(this);\n }\n\n methods._createScore.call(this);\n methods._apply.call(this, this.opt.score);\n methods._setTitle.call(this, this.opt.score);\n methods._target.call(this, this.opt.score);\n\n if (this.opt.readOnly) {\n methods._lock.call(this);\n } else {\n this.style.cursor = 'pointer';\n\n methods._binds.call(this);\n }\n });\n },\n\n _adjustCallback: function() {\n var options = ['number', 'readOnly', 'score', 'scoreName', 'target'];\n\n for (var i = 0; i < options.length; i++) {\n if (typeof this.opt[options[i]] === 'function') {\n this.opt[options[i]] = this.opt[options[i]].call(this);\n }\n }\n },\n\n _adjustedScore: function(score) {\n if (!score) {\n return score;\n }\n\n return methods._between(score, 0, this.opt.number);\n },\n\n _adjustHints: function() {\n if (!this.opt.hints) {\n this.opt.hints = [];\n }\n\n if (!this.opt.halfShow && !this.opt.half) {\n return;\n }\n\n var steps = this.opt.precision ? 10 : 2;\n\n for (var i = 0; i < this.opt.number; i++) {\n var group = this.opt.hints[i];\n\n if (Object.prototype.toString.call(group) !== '[object Array]') {\n group = [group];\n }\n\n this.opt.hints[i] = [];\n\n for (var j = 0; j < steps; j++) {\n var\n hint = group[j],\n last = group[group.length - 1];\n\n if (last === undefined) {\n last = null;\n }\n\n this.opt.hints[i][j] = hint === undefined ? last : hint;\n }\n }\n },\n\n _adjustNumber: function() {\n this.opt.number = methods._between(this.opt.number, 1, this.opt.numberMax);\n },\n\n _adjustPath: function() {\n this.opt.path = this.opt.path || '';\n\n if (this.opt.path && this.opt.path.charAt(this.opt.path.length - 1) !== '/') {\n this.opt.path += '/';\n }\n },\n\n _adjustPrecision: function() {\n this.opt.half = true;\n },\n\n _adjustStarType: function() {\n var replaces = ['cancelOff', 'cancelOn', 'starHalf', 'starOff', 'starOn'];\n\n this.opt.path = '';\n\n for (var i = 0; i < replaces.length; i++) {\n this.opt[replaces[i]] = this.opt[replaces[i]].replace('.', '-');\n }\n },\n\n _apply: function(score) {\n methods._fill.call(this, score);\n\n if (score) {\n if (score > 0) {\n this.score.val(score);\n }\n\n methods._roundStars.call(this, score);\n }\n },\n\n _between: function(value, min, max) {\n return Math.min(Math.max(parseFloat(value), min), max);\n },\n\n _binds: function() {\n if (this.cancel) {\n methods._bindOverCancel.call(this);\n methods._bindClickCancel.call(this);\n methods._bindOutCancel.call(this);\n }\n\n methods._bindOver.call(this);\n methods._bindClick.call(this);\n methods._bindOut.call(this);\n },\n\n _bindClick: function() {\n var that = this;\n\n that.stars.on('click.raty', function(evt) {\n var\n execute = true,\n score = (that.opt.half || that.opt.precision) ? that.self.data('score') : (this.alt || $(this).data('alt'));\n\n if (that.opt.click) {\n execute = that.opt.click.call(that, +score, evt);\n }\n\n if (execute || execute === undefined) {\n if (that.opt.half && !that.opt.precision) {\n score = methods._roundHalfScore.call(that, score);\n }\n\n methods._apply.call(that, score);\n }\n });\n },\n\n _bindClickCancel: function() {\n var that = this;\n\n that.cancel.on('click.raty', function(evt) {\n that.score.removeAttr('value');\n\n if (that.opt.click) {\n that.opt.click.call(that, null, evt);\n }\n });\n },\n\n _bindOut: function() {\n var that = this;\n\n that.self.on('mouseleave.raty', function(evt) {\n var score = +that.score.val() || undefined;\n\n methods._apply.call(that, score);\n methods._target.call(that, score, evt);\n methods._resetTitle.call(that);\n\n if (that.opt.mouseout) {\n that.opt.mouseout.call(that, score, evt);\n }\n });\n },\n\n _bindOutCancel: function() {\n var that = this;\n\n that.cancel.on('mouseleave.raty', function(evt) {\n var icon = that.opt.cancelOff;\n\n if (that.opt.starType !== 'img') {\n icon = that.opt.cancelClass + ' ' + icon;\n }\n\n methods._setIcon.call(that, this, icon);\n\n if (that.opt.mouseout) {\n var score = +that.score.val() || undefined;\n\n that.opt.mouseout.call(that, score, evt);\n }\n });\n },\n\n _bindOver: function() {\n var that = this,\n action = that.opt.half ? 'mousemove.raty' : 'mouseover.raty';\n\n that.stars.on(action, function(evt) {\n var score = methods._getScoreByPosition.call(that, evt, this);\n\n methods._fill.call(that, score);\n\n if (that.opt.half) {\n methods._roundStars.call(that, score, evt);\n methods._setTitle.call(that, score, evt);\n\n that.self.data('score', score);\n }\n\n methods._target.call(that, score, evt);\n\n if (that.opt.mouseover) {\n that.opt.mouseover.call(that, score, evt);\n }\n });\n },\n\n _bindOverCancel: function() {\n var that = this;\n\n that.cancel.on('mouseover.raty', function(evt) {\n var\n starOff = that.opt.path + that.opt.starOff,\n icon = that.opt.cancelOn;\n\n if (that.opt.starType === 'img') {\n that.stars.attr('src', starOff);\n } else {\n icon = that.opt.cancelClass + ' ' + icon;\n\n that.stars.attr('class', starOff);\n }\n\n methods._setIcon.call(that, this, icon);\n methods._target.call(that, null, evt);\n\n if (that.opt.mouseover) {\n that.opt.mouseover.call(that, null);\n }\n });\n },\n\n _buildScoreField: function() {\n return $('<input />', { name: this.opt.scoreName, type: 'hidden' }).appendTo(this);\n },\n\n _createCancel: function() {\n var icon = this.opt.path + this.opt.cancelOff,\n cancel = $('<' + this.opt.starType + ' />', { title: this.opt.cancelHint, 'class': this.opt.cancelClass });\n\n if (this.opt.starType === 'img') {\n cancel.attr({ src: icon, alt: 'x' });\n } else {\n // TODO: use $.data\n cancel.attr('data-alt', 'x').addClass(icon);\n }\n\n if (this.opt.cancelPlace === 'left') {\n this.self.prepend(' ').prepend(cancel);\n } else {\n this.self.append(' ').append(cancel);\n }\n\n this.cancel = cancel;\n },\n\n _createScore: function() {\n var score = $(this.opt.targetScore);\n\n this.score = score.length ? score : methods._buildScoreField.call(this);\n },\n\n _createStars: function() {\n for (var i = 1; i <= this.opt.number; i++) {\n var\n name = methods._nameForIndex.call(this, i),\n attrs = { alt: i, src: this.opt.path + this.opt[name] };\n\n if (this.opt.starType !== 'img') {\n attrs = { 'data-alt': i, 'class': attrs.src }; // TODO: use $.data.\n }\n\n attrs.title = methods._getHint.call(this, i);\n\n $('<' + this.opt.starType + ' />', attrs).appendTo(this);\n\n if (this.opt.space) {\n this.self.append(i < this.opt.number ? ' ' : '');\n }\n }\n\n this.stars = this.self.children(this.opt.starType);\n },\n\n _error: function(message) {\n $(this).text(message);\n\n $.error(message);\n },\n\n _fill: function(score) {\n var hash = 0;\n\n for (var i = 1; i <= this.stars.length; i++) {\n var\n icon,\n star = this.stars[i - 1],\n turnOn = methods._turnOn.call(this, i, score);\n\n if (this.opt.iconRange && this.opt.iconRange.length > hash) {\n var irange = this.opt.iconRange[hash];\n\n icon = methods._getRangeIcon.call(this, irange, turnOn);\n\n if (i <= irange.range) {\n methods._setIcon.call(this, star, icon);\n }\n\n if (i === irange.range) {\n hash++;\n }\n } else {\n icon = this.opt[turnOn ? 'starOn' : 'starOff'];\n\n methods._setIcon.call(this, star, icon);\n }\n }\n },\n\n _getFirstDecimal: function(number) {\n var\n decimal = number.toString().split('.')[1],\n result = 0;\n\n if (decimal) {\n result = parseInt(decimal.charAt(0), 10);\n\n if (decimal.slice(1, 5) === '9999') {\n result++;\n }\n }\n\n return result;\n },\n\n _getRangeIcon: function(irange, turnOn) {\n return turnOn ? irange.on || this.opt.starOn : irange.off || this.opt.starOff;\n },\n\n _getScoreByPosition: function(evt, icon) {\n var score = parseInt(icon.alt || icon.getAttribute('data-alt'), 10);\n\n if (this.opt.half) {\n var\n size = methods._getWidth.call(this),\n percent = parseFloat((evt.pageX - $(icon).offset().left) / size);\n\n score = score - 1 + percent;\n }\n\n return score;\n },\n\n _getHint: function(score, evt) {\n if (score !== 0 && !score) {\n return this.opt.noRatedMsg;\n }\n\n var\n decimal = methods._getFirstDecimal.call(this, score),\n integer = Math.ceil(score),\n group = this.opt.hints[(integer || 1) - 1],\n hint = group,\n set = !evt || this.move;\n\n if (this.opt.precision) {\n if (set) {\n decimal = decimal === 0 ? 9 : decimal - 1;\n }\n\n hint = group[decimal];\n } else if (this.opt.halfShow || this.opt.half) {\n decimal = set && decimal === 0 ? 1 : decimal > 5 ? 1 : 0;\n\n hint = group[decimal];\n }\n\n return hint === '' ? '' : hint || score;\n },\n\n _getWidth: function() {\n var width = this.stars[0].width || parseFloat(this.stars.eq(0).css('font-size'));\n\n if (!width) {\n methods._error.call(this, 'Could not get the icon width!');\n }\n\n return width;\n },\n\n _lock: function() {\n var hint = methods._getHint.call(this, this.score.val());\n\n this.style.cursor = '';\n this.title = hint;\n\n this.score.prop('readonly', true);\n this.stars.prop('title', hint);\n\n if (this.cancel) {\n this.cancel.hide();\n }\n\n this.self.data('readonly', true);\n },\n\n _nameForIndex: function(i) {\n return this.opt.score && this.opt.score >= i ? 'starOn' : 'starOff';\n },\n\n _resetTitle: function(star) {\n for (var i = 0; i < this.opt.number; i++) {\n this.stars[i].title = methods._getHint.call(this, i + 1);\n }\n },\n\n _roundHalfScore: function(score) {\n var integer = parseInt(score, 10),\n decimal = methods._getFirstDecimal.call(this, score);\n\n if (decimal !== 0) {\n decimal = decimal > 5 ? 1 : 0.5;\n }\n\n return integer + decimal;\n },\n\n _roundStars: function(score, evt) {\n var\n decimal = (score % 1).toFixed(2),\n name ;\n\n if (evt || this.move) {\n name = decimal > 0.5 ? 'starOn' : 'starHalf';\n } else if (decimal > this.opt.round.down) { // Up: [x.76 .. x.99]\n name = 'starOn';\n\n if (this.opt.halfShow && decimal < this.opt.round.up) { // Half: [x.26 .. x.75]\n name = 'starHalf';\n } else if (decimal < this.opt.round.full) { // Down: [x.00 .. x.5]\n name = 'starOff';\n }\n }\n\n if (name) {\n var\n icon = this.opt[name],\n star = this.stars[Math.ceil(score) - 1];\n\n methods._setIcon.call(this, star, icon);\n } // Full down: [x.00 .. x.25]\n },\n\n _setIcon: function(star, icon) {\n star[this.opt.starType === 'img' ? 'src' : 'className'] = this.opt.path + icon;\n },\n\n _setTarget: function(target, score) {\n if (score) {\n score = this.opt.targetFormat.toString().replace('{score}', score);\n }\n\n if (target.is(':input')) {\n target.val(score);\n } else {\n target.html(score);\n }\n },\n\n _setTitle: function(score, evt) {\n if (score) {\n var\n integer = parseInt(Math.ceil(score), 10),\n star = this.stars[integer - 1];\n\n star.title = methods._getHint.call(this, score, evt);\n }\n },\n\n _target: function(score, evt) {\n if (this.opt.target) {\n var target = $(this.opt.target);\n\n if (!target.length) {\n methods._error.call(this, 'Target selector invalid or missing!');\n }\n\n var mouseover = evt && evt.type === 'mouseover';\n\n if (score === undefined) {\n score = this.opt.targetText;\n } else if (score === null) {\n score = mouseover ? this.opt.cancelHint : this.opt.targetText;\n } else {\n if (this.opt.targetType === 'hint') {\n score = methods._getHint.call(this, score, evt);\n } else if (this.opt.precision) {\n score = parseFloat(score).toFixed(1);\n }\n\n var mousemove = evt && evt.type === 'mousemove';\n\n if (!mouseover && !mousemove && !this.opt.targetKeep) {\n score = this.opt.targetText;\n }\n }\n\n methods._setTarget.call(this, target, score);\n }\n },\n\n _turnOn: function(i, score) {\n return this.opt.single ? (i === score) : (i <= score);\n },\n\n _unlock: function() {\n this.style.cursor = 'pointer';\n this.removeAttribute('title');\n\n this.score.removeAttr('readonly');\n\n this.self.data('readonly', false);\n\n for (var i = 0; i < this.opt.number; i++) {\n this.stars[i].title = methods._getHint.call(this, i + 1);\n }\n\n if (this.cancel) {\n this.cancel.css('display', '');\n }\n },\n\n cancel: function(click) {\n return this.each(function() {\n var self = $(this);\n\n if (self.data('readonly') !== true) {\n methods[click ? 'click' : 'score'].call(self, null);\n\n this.score.removeAttr('value');\n }\n });\n },\n\n click: function(score) {\n return this.each(function() {\n if ($(this).data('readonly') !== true) {\n score = methods._adjustedScore.call(this, score);\n\n methods._apply.call(this, score);\n\n if (this.opt.click) {\n this.opt.click.call(this, score, $.Event('click'));\n }\n\n methods._target.call(this, score);\n }\n });\n },\n\n destroy: function() {\n return this.each(function() {\n var self = $(this),\n raw = self.data('raw');\n\n if (raw) {\n self.off('.raty').empty().css({ cursor: raw.style.cursor }).removeData('readonly');\n } else {\n self.data('raw', self.clone()[0]);\n }\n });\n },\n\n getScore: function() {\n var score = [],\n value ;\n\n this.each(function() {\n value = this.score.val();\n\n score.push(value ? +value : undefined);\n });\n\n return (score.length > 1) ? score : score[0];\n },\n\n move: function(score) {\n return this.each(function() {\n var\n integer = parseInt(score, 10),\n decimal = methods._getFirstDecimal.call(this, score);\n\n if (integer >= this.opt.number) {\n integer = this.opt.number - 1;\n decimal = 10;\n }\n\n var\n width = methods._getWidth.call(this),\n steps = width / 10,\n star = $(this.stars[integer]),\n percent = star.offset().left + steps * decimal,\n evt = $.Event('mousemove', { pageX: percent });\n\n this.move = true;\n\n star.trigger(evt);\n\n this.move = false;\n });\n },\n\n readOnly: function(readonly) {\n return this.each(function() {\n var self = $(this);\n\n if (self.data('readonly') !== readonly) {\n if (readonly) {\n self.off('.raty').children('img').off('.raty');\n\n methods._lock.call(this);\n } else {\n methods._binds.call(this);\n methods._unlock.call(this);\n }\n\n self.data('readonly', readonly);\n }\n });\n },\n\n reload: function() {\n return methods.set.call(this, {});\n },\n\n score: function() {\n var self = $(this);\n\n return arguments.length ? methods.setScore.apply(self, arguments) : methods.getScore.call(self);\n },\n\n set: function(options) {\n return this.each(function() {\n $(this).raty($.extend({}, this.opt, options));\n });\n },\n\n setScore: function(score) {\n return this.each(function() {\n if ($(this).data('readonly') !== true) {\n score = methods._adjustedScore.call(this, score);\n\n methods._apply.call(this, score);\n methods._target.call(this, score);\n }\n });\n }\n };\n\n $.fn.raty = function(method) {\n if (methods[method]) {\n return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));\n } else if (typeof method === 'object' || !method) {\n return methods.init.apply(this, arguments);\n } else {\n $.error('Method ' + method + ' does not exist!');\n }\n };\n\n $.fn.raty.defaults = {\n cancel : false,\n cancelClass : 'raty-cancel',\n cancelHint : 'Cancel this rating!',\n cancelOff : 'cancel-off.png',\n cancelOn : 'cancel-on.png',\n cancelPlace : 'left',\n click : undefined,\n half : false,\n halfShow : true,\n hints : ['bad', 'poor', 'regular', 'good', 'gorgeous'],\n iconRange : undefined,\n mouseout : undefined,\n mouseover : undefined,\n noRatedMsg : 'Not rated yet!',\n number : 5,\n numberMax : 20,\n path : undefined,\n precision : false,\n readOnly : false,\n round : { down: 0.25, full: 0.6, up: 0.76 },\n score : undefined,\n scoreName : 'score',\n single : false,\n space : true,\n starHalf : 'star-half.png',\n starOff : 'star-off.png',\n starOn : 'star-on.png',\n starType : 'img',\n target : undefined,\n targetFormat : '{score}',\n targetKeep : false,\n targetScore : undefined,\n targetText : '',\n targetType : 'hint'\n };\n\n})(jQuery);\n","/*!\n * Scroll Lock v1.1.1\n * https://github.com/MohammadYounes/jquery-scrollLock\n *\n * Copyright (c) 2014 Mohammad Younes\n * Licensed under the MIT license.\n */\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['jquery'], factory);\n } else {\n // Browser globals\n factory(jQuery);\n }\n}(function ($) {\n\n var eventName = \"onmousewheel\" in window ? ((\"ActiveXObject\" in window) ? \"wheel\" : \"mousewheel\") : \"DOMMouseScroll\";\n var eventNamespace = \".scrollLock\";\n\n var old = $.fn.scrollLock;\n $.fn.scrollLock = function (toggle, selector, force) {\n\n if (typeof selector !== 'string')\n selector = null;\n\n if ((toggle !== undefined && !toggle) || toggle === 'off')\n return this.each(function () {\n $(this).off(eventNamespace);\n });\n else\n return this.each(function () {\n $(this).on(eventName + eventNamespace, selector, function (event) {\n //allow zooming\n if (!event.ctrlKey) {\n var $this = $(this);\n if (force === true || hasVerticalScroll($this)) {\n //Support for nested scrollable blocks (see https://github.com/MohammadYounes/jquery-scrollLock/issues/4)\n event.stopPropagation();\n var scrollTop = $this.scrollTop(),\n scrollHeight = $this.prop('scrollHeight'),\n clientHeight = $this.prop('clientHeight'),\n delta = event.originalEvent.wheelDelta || (-1 * event.originalEvent.detail) || (-1 * event.originalEvent.deltaY),\n deltaY = 0\n ;\n if (event.type === \"wheel\") {\n var ratio = $this.height() / $(window).height();\n deltaY = event.originalEvent.deltaY * ratio;\n }\n if (delta > 0 && scrollTop + deltaY <= 0 || delta < 0 && scrollTop + deltaY >= scrollHeight - clientHeight) {\n event.preventDefault();\n if (deltaY)\n $this.scrollTop(scrollTop + deltaY);\n }\n }\n }\n });\n });\n };\n function hasVerticalScroll($element) {\n var clientWidth = $element.prop('clientWidth'),\n offsetWidth = $element.prop('offsetWidth'),\n borderRightWidth = parseInt($element.css('border-right-width'), 10),\n borderLeftWidth = parseInt($element.css('border-left-width'), 10)\n ;\n\n return clientWidth + borderLeftWidth + borderRightWidth < offsetWidth;\n }\n // no conflict\n $.fn.scrollLock.noConflict = function () {\n $.fn.scrollLock = old;\n return this;\n };\n}));\n","/*global define:false require:false */\n(function (name, context, definition) {\n\tif (typeof module != 'undefined' && module.exports) module.exports = definition();\n\telse if (typeof define == 'function' && define.amd) define(definition);\n\telse context[name] = definition();\n})('jquery-scrollto', this, function(){\n\t// Prepare\n\tvar jQuery, $, ScrollTo;\n\tjQuery = $ = window.jQuery || require('jquery');\n\n\t// Fix scrolling animations on html/body on safari\n\t$.propHooks.scrollTop = $.propHooks.scrollLeft = {\n\t\tget: function(elem,prop) {\n\t\t\tvar result = null;\n\t\t\tif ( elem.tagName === 'HTML' || elem.tagName === 'BODY' ) {\n\t\t\t\tif ( prop === 'scrollLeft' ) {\n\t\t\t\t\tresult = window.scrollX;\n\t\t\t\t} else if ( prop === 'scrollTop' ) {\n\t\t\t\t\tresult = window.scrollY;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( result == null ) {\n\t\t\t\tresult = elem[prop];\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t};\n\t$.Tween.propHooks.scrollTop = $.Tween.propHooks.scrollLeft = {\n\t\tget: function(tween) {\n\t\t\treturn $.propHooks.scrollTop.get(tween.elem, tween.prop);\n\t\t},\n\t\tset: function(tween) {\n\t\t\t// Our safari fix\n\t\t\tif ( tween.elem.tagName === 'HTML' || tween.elem.tagName === 'BODY' ) {\n\t\t\t\t// Defaults\n\t\t\t\ttween.options.bodyScrollLeft = (tween.options.bodyScrollLeft || window.scrollX);\n\t\t\t\ttween.options.bodyScrollTop = (tween.options.bodyScrollTop || window.scrollY);\n\n\t\t\t\t// Apply\n\t\t\t\tif ( tween.prop === 'scrollLeft' ) {\n\t\t\t\t\ttween.options.bodyScrollLeft = Math.round(tween.now);\n\t\t\t\t}\n\t\t\t\telse if ( tween.prop === 'scrollTop' ) {\n\t\t\t\t\ttween.options.bodyScrollTop = Math.round(tween.now);\n\t\t\t\t}\n\n\t\t\t\t// Apply\n\t\t\t\twindow.scrollTo(tween.options.bodyScrollLeft, tween.options.bodyScrollTop);\n\t\t\t}\n\t\t\t// jQuery's IE8 Fix\n\t\t\telse if ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t};\n\n\t// jQuery ScrollTo\n\tScrollTo = {\n\t\t// Configuration\n\t\tconfig: {\n\t\t\tduration: 400,\n\t\t\teasing: 'swing',\n\t\t\tcallback: undefined,\n\t\t\tdurationMode: 'each',\n\t\t\toffsetTop: 0,\n\t\t\toffsetLeft: 0\n\t\t},\n\n\t\t// Set Configuration\n\t\tconfigure: function(options){\n\t\t\t// Apply Options to Config\n\t\t\t$.extend(ScrollTo.config, options||{});\n\n\t\t\t// Chain\n\t\t\treturn this;\n\t\t},\n\n\t\t// Perform the Scroll Animation for the Collections\n\t\t// We use $inline here, so we can determine the actual offset start for each overflow:scroll item\n\t\t// Each collection is for each overflow:scroll item\n\t\tscroll: function(collections, config){\n\t\t\t// Prepare\n\t\t\tvar collection, $container, container, $target, $inline, position, containerTagName,\n\t\t\t\tcontainerScrollTop, containerScrollLeft,\n\t\t\t\tcontainerScrollTopEnd, containerScrollLeftEnd,\n\t\t\t\tstartOffsetTop, targetOffsetTop, targetOffsetTopAdjusted,\n\t\t\t\tstartOffsetLeft, targetOffsetLeft, targetOffsetLeftAdjusted,\n\t\t\t\tscrollOptions,\n\t\t\t\tcallback;\n\n\t\t\t// Determine the Scroll\n\t\t\tcollection = collections.pop();\n\t\t\t$container = collection.$container;\n\t\t\t$target = collection.$target;\n\t\t\tcontainerTagName = $container.prop('tagName');\n\n\t\t\t// Prepare the Inline Element of the Container\n\t\t\t$inline = $('<span/>').css({\n\t\t\t\t'position': 'absolute',\n\t\t\t\t'top': '0px',\n\t\t\t\t'left': '0px'\n\t\t\t});\n\t\t\tposition = $container.css('position');\n\n\t\t\t// Insert the Inline Element of the Container\n\t\t\t$container.css({position:'relative'});\n\t\t\t$inline.appendTo($container);\n\n\t\t\t// Determine the top offset\n\t\t\tstartOffsetTop = $inline.offset().top;\n\t\t\ttargetOffsetTop = $target.offset().top;\n\t\t\ttargetOffsetTopAdjusted = targetOffsetTop - startOffsetTop - parseInt(config.offsetTop,10);\n\n\t\t\t// Determine the left offset\n\t\t\tstartOffsetLeft = $inline.offset().left;\n\t\t\ttargetOffsetLeft = $target.offset().left;\n\t\t\ttargetOffsetLeftAdjusted = targetOffsetLeft - startOffsetLeft - parseInt(config.offsetLeft,10);\n\n\t\t\t// Determine current scroll positions\n\t\t\tcontainerScrollTop = $container.prop('scrollTop');\n\t\t\tcontainerScrollLeft = $container.prop('scrollLeft');\n\n\t\t\t// Reset the Inline Element of the Container\n\t\t\t$inline.remove();\n\t\t\t$container.css({position:position});\n\n\t\t\t// Prepare the scroll options\n\t\t\tscrollOptions = {};\n\n\t\t\t// Prepare the callback\n\t\t\tcallback = function(event){\n\t\t\t\t// Check\n\t\t\t\tif ( collections.length === 0 ) {\n\t\t\t\t\t// Callback\n\t\t\t\t\tif ( typeof config.callback === 'function' ) {\n\t\t\t\t\t\tconfig.callback();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Recurse\n\t\t\t\t\tScrollTo.scroll(collections,config);\n\t\t\t\t}\n\t\t\t\t// Return true\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\t// Handle if we only want to scroll if we are outside the viewport\n\t\t\tif ( config.onlyIfOutside ) {\n\t\t\t\t// Determine current scroll positions\n\t\t\t\tcontainerScrollTopEnd = containerScrollTop + $container.height();\n\t\t\t\tcontainerScrollLeftEnd = containerScrollLeft + $container.width();\n\n\t\t\t\t// Check if we are in the range of the visible area of the container\n\t\t\t\tif ( containerScrollTop < targetOffsetTopAdjusted && targetOffsetTopAdjusted < containerScrollTopEnd ) {\n\t\t\t\t\ttargetOffsetTopAdjusted = containerScrollTop;\n\t\t\t\t}\n\t\t\t\tif ( containerScrollLeft < targetOffsetLeftAdjusted && targetOffsetLeftAdjusted < containerScrollLeftEnd ) {\n\t\t\t\t\ttargetOffsetLeftAdjusted = containerScrollLeft;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Determine the scroll options\n\t\t\tif ( targetOffsetTopAdjusted !== containerScrollTop ) {\n\t\t\t\tscrollOptions.scrollTop = targetOffsetTopAdjusted;\n\t\t\t}\n\t\t\tif ( targetOffsetLeftAdjusted !== containerScrollLeft ) {\n\t\t\t\tscrollOptions.scrollLeft = targetOffsetLeftAdjusted;\n\t\t\t}\n\n\t\t\t// Check to see if the scroll is necessary\n\t\t\tif ( $container.prop('scrollHeight') === $container.width() ) {\n\t\t\t\tdelete scrollOptions.scrollTop;\n\t\t\t}\n\t\t\tif ( $container.prop('scrollWidth') === $container.width() ) {\n\t\t\t\tdelete scrollOptions.scrollLeft;\n\t\t\t}\n\n\t\t\t// Perform the scroll\n\t\t\tif ( scrollOptions.scrollTop != null || scrollOptions.scrollLeft != null ) {\n\t\t\t\t$container.animate(scrollOptions, {\n\t\t\t\t\tduration: config.duration,\n\t\t\t\t\teasing: config.easing,\n\t\t\t\t\tcomplete: callback\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcallback();\n\t\t\t}\n\n\t\t\t// Return true\n\t\t\treturn true;\n\t\t},\n\n\t\t// ScrollTo the Element using the Options\n\t\tfn: function(options){\n\t\t\t// Prepare\n\t\t\tvar collections, config, $container, container;\n\t\t\tcollections = [];\n\n\t\t\t// Prepare\n\t\t\tvar\t$target = $(this);\n\t\t\tif ( $target.length === 0 ) {\n\t\t\t\t// Chain\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\t// Handle Options\n\t\t\tconfig = $.extend({},ScrollTo.config,options);\n\n\t\t\t// Fetch\n\t\t\t$container = $target.parent();\n\t\t\tcontainer = $container.get(0);\n\n\t\t\t// Cycle through the containers\n\t\t\twhile ( ($container.length === 1) && (container !== document.body) && (container !== document) ) {\n\t\t\t\t// Check Container for scroll differences\n\t\t\t\tvar containerScrollTop, containerScrollLeft;\n\t\t\t\tcontainerScrollTop = $container.css('overflow-y') !== 'visible' && container.scrollHeight !== container.clientHeight;\n\t\t\t\tcontainerScrollLeft = $container.css('overflow-x') !== 'visible' && container.scrollWidth !== container.clientWidth;\n\t\t\t\tif ( containerScrollTop || containerScrollLeft ) {\n\t\t\t\t\t// Push the Collection\n\t\t\t\t\tcollections.push({\n\t\t\t\t\t\t'$container': $container,\n\t\t\t\t\t\t'$target': $target\n\t\t\t\t\t});\n\t\t\t\t\t// Update the Target\n\t\t\t\t\t$target = $container;\n\t\t\t\t}\n\t\t\t\t// Update the Container\n\t\t\t\t$container = $container.parent();\n\t\t\t\tcontainer = $container.get(0);\n\t\t\t}\n\n\t\t\t// Add the final collection\n\t\t\tcollections.push({\n\t\t\t\t'$container': $('html'),\n\t\t\t\t// document.body doesn't work in firefox, html works for all\n\t\t\t\t// internet explorer starts at the beggining\n\t\t\t\t'$target': $target\n\t\t\t});\n\n\t\t\t// Adjust the Config\n\t\t\tif ( config.durationMode === 'all' ) {\n\t\t\t\tconfig.duration /= collections.length;\n\t\t\t}\n\n\t\t\t// Handle\n\t\t\tScrollTo.scroll(collections,config);\n\n\t\t\t// Chain\n\t\t\treturn this;\n\t\t}\n\t};\n\n\t// Apply our extensions to jQuery\n\t$.ScrollTo = $.ScrollTo || ScrollTo;\n\t$.fn.ScrollTo = $.fn.ScrollTo || ScrollTo.fn;\n\n\t// Export\n\treturn ScrollTo;\n});","/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)\n * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)\n * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\n *\n * Version: 1.3.7\n *\n */\n(function($) {\n\n $.fn.extend({\n slimScroll: function(options) {\n\n var defaults = {\n\n // width in pixels of the visible scroll area\n width : 'auto',\n\n // height in pixels of the visible scroll area\n height : '250px',\n\n // width in pixels of the scrollbar and rail\n size : '7px',\n\n // scrollbar color, accepts any hex/color value\n color: '#000',\n\n // scrollbar position - left/right\n position : 'right',\n\n // distance in pixels between the side edge and the scrollbar\n distance : '1px',\n\n // default scroll position on load - top / bottom / $('selector')\n start : 'top',\n\n // sets scrollbar opacity\n opacity : .4,\n\n // enables always-on mode for the scrollbar\n alwaysVisible : false,\n\n // check if we should hide the scrollbar when user is hovering over\n disableFadeOut : false,\n\n // sets visibility of the rail\n railVisible : false,\n\n // sets rail color\n railColor : '#333',\n\n // sets rail opacity\n railOpacity : .2,\n\n // whether we should use jQuery UI Draggable to enable bar dragging\n railDraggable : true,\n\n // defautlt CSS class of the slimscroll rail\n railClass : 'slimScrollRail',\n\n // defautlt CSS class of the slimscroll bar\n barClass : 'slimScrollBar',\n\n // defautlt CSS class of the slimscroll wrapper\n wrapperClass : 'slimScrollDiv',\n\n // check if mousewheel should scroll the window if we reach top/bottom\n allowPageScroll : false,\n\n // scroll amount applied to each mouse wheel step\n wheelStep : 20,\n\n // scroll amount applied when user is using gestures\n touchScrollStep : 200,\n\n // sets border radius\n borderRadius: '7px',\n\n // sets border radius of the rail\n railBorderRadius : '7px'\n };\n\n var o = $.extend(defaults, options);\n\n // do it for every element that matches selector\n this.each(function(){\n\n var isOverPanel, isOverBar, isDragg, queueHide, touchDif,\n barHeight, percentScroll, lastScroll,\n divS = '<div></div>',\n minBarHeight = 30,\n releaseScroll = false;\n\n // used in event handlers and for better minification\n var me = $(this);\n\n // ensure we are not binding it again\n if (me.parent().hasClass(o.wrapperClass))\n {\n // start from last bar position\n var offset = me.scrollTop();\n\n // find bar and rail\n bar = me.siblings('.' + o.barClass);\n rail = me.siblings('.' + o.railClass);\n\n getBarHeight();\n\n // check if we should scroll existing instance\n if ($.isPlainObject(options))\n {\n // Pass height: auto to an existing slimscroll object to force a resize after contents have changed\n if ( 'height' in options && options.height == 'auto' ) {\n me.parent().css('height', 'auto');\n me.css('height', 'auto');\n var height = me.parent().parent().height();\n me.parent().css('height', height);\n me.css('height', height);\n } else if ('height' in options) {\n var h = options.height;\n me.parent().css('height', h);\n me.css('height', h);\n }\n\n if ('scrollTo' in options)\n {\n // jump to a static point\n offset = parseInt(o.scrollTo);\n }\n else if ('scrollBy' in options)\n {\n // jump by value pixels\n offset += parseInt(o.scrollBy);\n }\n else if ('destroy' in options)\n {\n // remove slimscroll elements\n bar.remove();\n rail.remove();\n me.unwrap();\n return;\n }\n\n // scroll content by the given offset\n scrollContent(offset, false, true);\n }\n\n return;\n }\n else if ($.isPlainObject(options))\n {\n if ('destroy' in options)\n {\n \treturn;\n }\n }\n\n // optionally set height to the parent's height\n o.height = (o.height == 'auto') ? me.parent().height() : o.height;\n\n // wrap content\n var wrapper = $(divS)\n .addClass(o.wrapperClass)\n .css({\n position: 'relative',\n overflow: 'hidden',\n width: o.width,\n height: o.height\n });\n\n // update style for the div\n me.css({\n overflow: 'hidden',\n width: o.width,\n height: o.height\n });\n\n // create scrollbar rail\n var rail = $(divS)\n .addClass(o.railClass)\n .css({\n width: o.size,\n height: '100%',\n position: 'absolute',\n top: 0,\n display: (o.alwaysVisible && o.railVisible) ? 'block' : 'none',\n 'border-radius': o.railBorderRadius,\n background: o.railColor,\n opacity: o.railOpacity,\n zIndex: 90\n });\n\n // create scrollbar\n var bar = $(divS)\n .addClass(o.barClass)\n .css({\n background: o.color,\n width: o.size,\n position: 'absolute',\n top: 0,\n opacity: o.opacity,\n display: o.alwaysVisible ? 'block' : 'none',\n 'border-radius' : o.borderRadius,\n BorderRadius: o.borderRadius,\n MozBorderRadius: o.borderRadius,\n WebkitBorderRadius: o.borderRadius,\n zIndex: 99\n });\n\n // set position\n var posCss = (o.position == 'right') ? { right: o.distance } : { left: o.distance };\n rail.css(posCss);\n bar.css(posCss);\n\n // wrap it\n me.wrap(wrapper);\n\n // append to parent div\n me.parent().append(bar);\n me.parent().append(rail);\n\n // make it draggable and no longer dependent on the jqueryUI\n if (o.railDraggable){\n bar.bind(\"mousedown\", function(e) {\n var $doc = $(document);\n isDragg = true;\n t = parseFloat(bar.css('top'));\n pageY = e.pageY;\n\n $doc.bind(\"mousemove.slimscroll\", function(e){\n currTop = t + e.pageY - pageY;\n bar.css('top', currTop);\n scrollContent(0, bar.position().top, false);// scroll content\n });\n\n $doc.bind(\"mouseup.slimscroll\", function(e) {\n isDragg = false;hideBar();\n $doc.unbind('.slimscroll');\n });\n return false;\n }).bind(\"selectstart.slimscroll\", function(e){\n e.stopPropagation();\n e.preventDefault();\n return false;\n });\n }\n\n // on rail over\n rail.hover(function(){\n showBar();\n }, function(){\n hideBar();\n });\n\n // on bar over\n bar.hover(function(){\n isOverBar = true;\n }, function(){\n isOverBar = false;\n });\n\n // show on parent mouseover\n me.hover(function(){\n isOverPanel = true;\n showBar();\n hideBar();\n }, function(){\n isOverPanel = false;\n hideBar();\n });\n\n // support for mobile\n me.bind('touchstart', function(e,b){\n if (e.originalEvent.touches.length)\n {\n // record where touch started\n touchDif = e.originalEvent.touches[0].pageY;\n }\n });\n\n me.bind('touchmove', function(e){\n // prevent scrolling the page if necessary\n if(!releaseScroll)\n {\n \t\t e.originalEvent.preventDefault();\n\t\t }\n if (e.originalEvent.touches.length)\n {\n // see how far user swiped\n var diff = (touchDif - e.originalEvent.touches[0].pageY) / o.touchScrollStep;\n // scroll content\n scrollContent(diff, true);\n touchDif = e.originalEvent.touches[0].pageY;\n }\n });\n\n // set up initial height\n getBarHeight();\n\n // check start position\n if (o.start === 'bottom')\n {\n // scroll content to bottom\n bar.css({ top: me.outerHeight() - bar.outerHeight() });\n scrollContent(0, true);\n }\n else if (o.start !== 'top')\n {\n // assume jQuery selector\n scrollContent($(o.start).position().top, null, true);\n\n // make sure bar stays hidden\n if (!o.alwaysVisible) { bar.hide(); }\n }\n\n // attach scroll events\n attachWheel(this);\n\n function _onWheel(e)\n {\n // use mouse wheel only when mouse is over\n if (!isOverPanel) { return; }\n\n var e = e || window.event;\n\n var delta = 0;\n if (e.wheelDelta) { delta = -e.wheelDelta/120; }\n if (e.detail) { delta = e.detail / 3; }\n\n var target = e.target || e.srcTarget || e.srcElement;\n if ($(target).closest('.' + o.wrapperClass).is(me.parent())) {\n // scroll content\n scrollContent(delta, true);\n }\n\n // stop window scroll\n if (e.preventDefault && !releaseScroll) { e.preventDefault(); }\n if (!releaseScroll) { e.returnValue = false; }\n }\n\n function scrollContent(y, isWheel, isJump)\n {\n releaseScroll = false;\n var delta = y;\n var maxTop = me.outerHeight() - bar.outerHeight();\n\n if (isWheel)\n {\n // move bar with mouse wheel\n delta = parseInt(bar.css('top')) + y * parseInt(o.wheelStep) / 100 * bar.outerHeight();\n\n // move bar, make sure it doesn't go out\n delta = Math.min(Math.max(delta, 0), maxTop);\n\n // if scrolling down, make sure a fractional change to the\n // scroll position isn't rounded away when the scrollbar's CSS is set\n // this flooring of delta would happened automatically when\n // bar.css is set below, but we floor here for clarity\n delta = (y > 0) ? Math.ceil(delta) : Math.floor(delta);\n\n // scroll the scrollbar\n bar.css({ top: delta + 'px' });\n }\n\n // calculate actual scroll amount\n percentScroll = parseInt(bar.css('top')) / (me.outerHeight() - bar.outerHeight());\n delta = percentScroll * (me[0].scrollHeight - me.outerHeight());\n\n if (isJump)\n {\n delta = y;\n var offsetTop = delta / me[0].scrollHeight * me.outerHeight();\n offsetTop = Math.min(Math.max(offsetTop, 0), maxTop);\n bar.css({ top: offsetTop + 'px' });\n }\n\n // scroll content\n me.scrollTop(delta);\n\n // fire scrolling event\n me.trigger('slimscrolling', ~~delta);\n\n // ensure bar is visible\n showBar();\n\n // trigger hide when scroll is stopped\n hideBar();\n }\n\n function attachWheel(target)\n {\n if (window.addEventListener)\n {\n target.addEventListener('DOMMouseScroll', _onWheel, false );\n target.addEventListener('mousewheel', _onWheel, false );\n }\n else\n {\n document.attachEvent(\"onmousewheel\", _onWheel)\n }\n }\n\n function getBarHeight()\n {\n // calculate scrollbar height and make sure it is not too small\n barHeight = Math.max((me.outerHeight() / me[0].scrollHeight) * me.outerHeight(), minBarHeight);\n bar.css({ height: barHeight + 'px' });\n\n // hide scrollbar if content is not long enough\n var display = barHeight == me.outerHeight() ? 'none' : 'block';\n bar.css({ display: display });\n }\n\n function showBar()\n {\n // recalculate bar height\n getBarHeight();\n clearTimeout(queueHide);\n\n // when bar reached top or bottom\n if (percentScroll == ~~percentScroll)\n {\n //release wheel\n releaseScroll = o.allowPageScroll;\n\n // publish approporiate event\n if (lastScroll != percentScroll)\n {\n var msg = (~~percentScroll == 0) ? 'top' : 'bottom';\n me.trigger('slimscroll', msg);\n }\n }\n else\n {\n releaseScroll = false;\n }\n lastScroll = percentScroll;\n\n // show only when required\n if(barHeight >= me.outerHeight()) {\n //allow window scroll\n releaseScroll = true;\n return;\n }\n bar.stop(true,true).fadeIn('fast');\n if (o.railVisible) { rail.stop(true,true).fadeIn('fast'); }\n }\n\n function hideBar()\n {\n // only hide when options allow it\n if (!o.alwaysVisible)\n {\n queueHide = setTimeout(function(){\n if (!(o.disableFadeOut && isOverPanel) && !isOverBar && !isDragg)\n {\n bar.fadeOut('slow');\n rail.fadeOut('slow');\n }\n }, 1000);\n }\n }\n\n });\n\n // maintain chainability\n return this;\n }\n });\n\n $.fn.extend({\n slimscroll: $.fn.slimScroll\n });\n\n})(jQuery);\n","/*\n\n\tjQuery Tags Input Plugin 1.3.3\n\n\tCopyright (c) 2011 XOXCO, Inc\n\n\tDocumentation for this plugin lives here:\n\thttp://xoxco.com/clickable/jquery-tags-input\n\n\tLicensed under the MIT license:\n\thttp://www.opensource.org/licenses/mit-license.php\n\n\tben@xoxco.com\n\n*/\n\n(function($) {\n\n\tvar delimiter = new Array();\n\tvar tags_callbacks = new Array();\n\t$.fn.doAutosize = function(o){\n\t var minWidth = $(this).data('minwidth'),\n\t maxWidth = $(this).data('maxwidth'),\n\t val = '',\n\t input = $(this),\n\t testSubject = $('#'+$(this).data('tester_id'));\n\n\t if (val === (val = input.val())) {return;}\n\n\t // Enter new content into testSubject\n\t var escaped = val.replace(/&/g, '&').replace(/\\s/g,' ').replace(/</g, '<').replace(/>/g, '>');\n\t testSubject.html(escaped);\n\t // Calculate new width + whether to change\n\t var testerWidth = testSubject.width(),\n\t newWidth = (testerWidth + o.comfortZone) >= minWidth ? testerWidth + o.comfortZone : minWidth,\n\t currentWidth = input.width(),\n\t isValidWidthChange = (newWidth < currentWidth && newWidth >= minWidth)\n\t || (newWidth > minWidth && newWidth < maxWidth);\n\n\t // Animate width\n\t if (isValidWidthChange) {\n\t input.width(newWidth);\n\t }\n\n\n };\n $.fn.resetAutosize = function(options){\n // alert(JSON.stringify(options));\n var minWidth = $(this).data('minwidth') || options.minInputWidth || $(this).width(),\n maxWidth = $(this).data('maxwidth') || options.maxInputWidth || ($(this).closest('.tagsinput').width() - options.inputPadding),\n val = '',\n input = $(this),\n testSubject = $('<tester/>').css({\n position: 'absolute',\n top: -9999,\n left: -9999,\n width: 'auto',\n fontSize: input.css('fontSize'),\n fontFamily: input.css('fontFamily'),\n fontWeight: input.css('fontWeight'),\n letterSpacing: input.css('letterSpacing'),\n whiteSpace: 'nowrap'\n }),\n testerId = $(this).attr('id')+'_autosize_tester';\n if(! $('#'+testerId).length > 0){\n testSubject.attr('id', testerId);\n testSubject.appendTo('body');\n }\n\n input.data('minwidth', minWidth);\n input.data('maxwidth', maxWidth);\n input.data('tester_id', testerId);\n input.css('width', minWidth);\n };\n\n\t$.fn.addTag = function(value,options) {\n\t\t\toptions = jQuery.extend({focus:false,callback:true},options);\n\t\t\tthis.each(function() {\n\t\t\t\tvar id = $(this).attr('id');\n\n\t\t\t\tvar tagslist = $(this).val().split(delimiter[id]);\n\t\t\t\tif (tagslist[0] == '') {\n\t\t\t\t\ttagslist = new Array();\n\t\t\t\t}\n\n\t\t\t\tvalue = jQuery.trim(value);\n\n\t\t\t\tif (options.unique) {\n\t\t\t\t\tvar skipTag = $(this).tagExist(value);\n\t\t\t\t\tif(skipTag == true) {\n\t\t\t\t\t //Marks fake input as not_valid to let styling it\n \t\t\t\t $('#'+id+'_tag').addClass('not_valid');\n \t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar skipTag = false;\n\t\t\t\t}\n\n\t\t\t\tif (value !='' && skipTag != true) {\n $('<span>').addClass('tag').append(\n $('<span>').text(value).append(' '),\n $('<a>', {\n href : '#',\n title : 'Removing tag',\n text : 'x'\n }).click(function () {\n return $('#' + id).removeTag(escape(value));\n })\n ).insertBefore('#' + id + '_addTag');\n\n\t\t\t\t\ttagslist.push(value);\n\n\t\t\t\t\t$('#'+id+'_tag').val('');\n\t\t\t\t\tif (options.focus) {\n\t\t\t\t\t\t$('#'+id+'_tag').focus();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$('#'+id+'_tag').blur();\n\t\t\t\t\t}\n\n\t\t\t\t\t$.fn.tagsInput.updateTagsField(this,tagslist);\n\n\t\t\t\t\tif (options.callback && tags_callbacks[id] && tags_callbacks[id]['onAddTag']) {\n\t\t\t\t\t\tvar f = tags_callbacks[id]['onAddTag'];\n\t\t\t\t\t\tf.call(this, value);\n\t\t\t\t\t}\n\t\t\t\t\tif(tags_callbacks[id] && tags_callbacks[id]['onChange'])\n\t\t\t\t\t{\n\t\t\t\t\t\tvar i = tagslist.length;\n\t\t\t\t\t\tvar f = tags_callbacks[id]['onChange'];\n\t\t\t\t\t\tf.call(this, $(this), tagslist[i-1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\treturn false;\n\t\t};\n\n\t$.fn.removeTag = function(value) {\n\t\t\tvalue = unescape(value);\n\t\t\tthis.each(function() {\n\t\t\t\tvar id = $(this).attr('id');\n\n\t\t\t\tvar old = $(this).val().split(delimiter[id]);\n\n\t\t\t\t$('#'+id+'_tagsinput .tag').remove();\n\t\t\t\tstr = '';\n\t\t\t\tfor (i=0; i< old.length; i++) {\n\t\t\t\t\tif (old[i]!=value) {\n\t\t\t\t\t\tstr = str + delimiter[id] +old[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$.fn.tagsInput.importTags(this,str);\n\n\t\t\t\tif (tags_callbacks[id] && tags_callbacks[id]['onRemoveTag']) {\n\t\t\t\t\tvar f = tags_callbacks[id]['onRemoveTag'];\n\t\t\t\t\tf.call(this, value);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn false;\n\t\t};\n\n\t$.fn.tagExist = function(val) {\n\t\tvar id = $(this).attr('id');\n\t\tvar tagslist = $(this).val().split(delimiter[id]);\n\t\treturn (jQuery.inArray(val, tagslist) >= 0); //true when tag exists, false when not\n\t};\n\n // clear all existing tags and import new ones from a string\n $.fn.importTags = function(str) {\n var id = $(this).attr('id');\n $('#'+id+'_tagsinput .tag').remove();\n $.fn.tagsInput.importTags(this,str);\n }\n\n\t$.fn.tagsInput = function(options) {\n var settings = jQuery.extend({\n interactive:true,\n defaultText:'add a tag',\n minChars:0,\n width:'300px',\n height:'100px',\n autocomplete: {selectFirst: false },\n hide:true,\n delimiter: ',',\n unique:true,\n removeWithBackspace:true,\n placeholderColor:'#666666',\n autosize: true,\n comfortZone: 20,\n inputPadding: 6*2\n },options);\n\n \tvar uniqueIdCounter = 0;\n\n\t\tthis.each(function() {\n // If we have already initialized the field, do not do it again\n if (typeof $(this).attr('data-tagsinput-init') !== 'undefined') {\n return;\n }\n\n // Mark the field as having been initialized\n $(this).attr('data-tagsinput-init', true);\n\n\t\t\tif (settings.hide) {\n\t\t\t\t$(this).hide();\n\t\t\t}\n\t\t\tvar id = $(this).attr('id');\n\t\t\tif (!id || delimiter[$(this).attr('id')]) {\n\t\t\t\tid = $(this).attr('id', 'tags' + new Date().getTime() + (uniqueIdCounter++)).attr('id');\n\t\t\t}\n\n\t\t\tvar data = jQuery.extend({\n\t\t\t\tpid:id,\n\t\t\t\treal_input: '#'+id,\n\t\t\t\tholder: '#'+id+'_tagsinput',\n\t\t\t\tinput_wrapper: '#'+id+'_addTag',\n\t\t\t\tfake_input: '#'+id+'_tag'\n\t\t\t},settings);\n\n\t\t\tdelimiter[id] = data.delimiter;\n\n\t\t\tif (settings.onAddTag || settings.onRemoveTag || settings.onChange) {\n\t\t\t\ttags_callbacks[id] = new Array();\n\t\t\t\ttags_callbacks[id]['onAddTag'] = settings.onAddTag;\n\t\t\t\ttags_callbacks[id]['onRemoveTag'] = settings.onRemoveTag;\n\t\t\t\ttags_callbacks[id]['onChange'] = settings.onChange;\n\t\t\t}\n\n\t\t\tvar markup = '<div id=\"'+id+'_tagsinput\" class=\"tagsinput\"><div id=\"'+id+'_addTag\">';\n\n\t\t\tif (settings.interactive) {\n\t\t\t\tmarkup = markup + '<input id=\"'+id+'_tag\" value=\"\" data-default=\"'+settings.defaultText+'\" />';\n\t\t\t}\n\n\t\t\tmarkup = markup + '</div><div class=\"tags_clear\"></div></div>';\n\n\t\t\t$(markup).insertAfter(this);\n\n\t\t\t$(data.holder).css('width',settings.width);\n\t\t\t$(data.holder).css('min-height',settings.height);\n\t\t\t$(data.holder).css('height',settings.height);\n\n\t\t\tif ($(data.real_input).val()!='') {\n\t\t\t\t$.fn.tagsInput.importTags($(data.real_input),$(data.real_input).val());\n\t\t\t}\n\t\t\tif (settings.interactive) {\n\t\t\t\t$(data.fake_input).val($(data.fake_input).attr('data-default'));\n\t\t\t\t$(data.fake_input).css('color',settings.placeholderColor);\n\t\t $(data.fake_input).resetAutosize(settings);\n\n\t\t\t\t$(data.holder).bind('click',data,function(event) {\n\t\t\t\t\t$(event.data.fake_input).focus();\n\t\t\t\t});\n\n\t\t\t\t$(data.fake_input).bind('focus',data,function(event) {\n\t\t\t\t\tif ($(event.data.fake_input).val()==$(event.data.fake_input).attr('data-default')) {\n\t\t\t\t\t\t$(event.data.fake_input).val('');\n\t\t\t\t\t}\n\t\t\t\t\t$(event.data.fake_input).css('color','#000000');\n\t\t\t\t});\n\n\t\t\t\tif (settings.autocomplete_url != undefined) {\n\t\t\t\t\tautocomplete_options = {source: settings.autocomplete_url};\n\t\t\t\t\tfor (attrname in settings.autocomplete) {\n\t\t\t\t\t\tautocomplete_options[attrname] = settings.autocomplete[attrname];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (jQuery.Autocompleter !== undefined) {\n\t\t\t\t\t\t$(data.fake_input).autocomplete(settings.autocomplete_url, settings.autocomplete);\n\t\t\t\t\t\t$(data.fake_input).bind('result',data,function(event,data,formatted) {\n\t\t\t\t\t\t\tif (data) {\n\t\t\t\t\t\t\t\t$('#'+id).addTag(data[0] + \"\",{focus:true,unique:(settings.unique)});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t \t});\n\t\t\t\t\t} else if (jQuery.ui.autocomplete !== undefined) {\n\t\t\t\t\t\t$(data.fake_input).autocomplete(autocomplete_options);\n\t\t\t\t\t\t$(data.fake_input).bind('autocompleteselect',data,function(event,ui) {\n\t\t\t\t\t\t\t$(event.data.real_input).addTag(ui.item.value,{focus:true,unique:(settings.unique)});\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\n\t\t\t\t} else {\n\t\t\t\t\t\t// if a user tabs out of the field, create a new tag\n\t\t\t\t\t\t// this is only available if autocomplete is not used.\n\t\t\t\t\t\t$(data.fake_input).bind('blur',data,function(event) {\n\t\t\t\t\t\t\tvar d = $(this).attr('data-default');\n\t\t\t\t\t\t\tif ($(event.data.fake_input).val()!='' && $(event.data.fake_input).val()!=d) {\n\t\t\t\t\t\t\t\tif( (event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)) )\n\t\t\t\t\t\t\t\t\t$(event.data.real_input).addTag($(event.data.fake_input).val(),{focus:true,unique:(settings.unique)});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$(event.data.fake_input).val($(event.data.fake_input).attr('data-default'));\n\t\t\t\t\t\t\t\t$(event.data.fake_input).css('color',settings.placeholderColor);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t\t// if user types a default delimiter like comma,semicolon and then create a new tag\n\t\t\t\t$(data.fake_input).bind('keypress',data,function(event) {\n\t\t\t\t\tif (_checkDelimiter(event)) {\n\t\t\t\t\t event.preventDefault();\n\t\t\t\t\t\tif( (event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)) )\n\t\t\t\t\t\t\t$(event.data.real_input).addTag($(event.data.fake_input).val(),{focus:true,unique:(settings.unique)});\n\t\t\t\t\t \t$(event.data.fake_input).resetAutosize(settings);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (event.data.autosize) {\n\t\t\t $(event.data.fake_input).doAutosize(settings);\n\n \t\t\t}\n\t\t\t\t});\n\t\t\t\t//Delete last tag on backspace\n\t\t\t\tdata.removeWithBackspace && $(data.fake_input).bind('keydown', function(event)\n\t\t\t\t{\n\t\t\t\t\tif(event.keyCode == 8 && $(this).val() == '')\n\t\t\t\t\t{\n\t\t\t\t\t\t event.preventDefault();\n\t\t\t\t\t\t var last_tag = $(this).closest('.tagsinput').find('.tag:last').text();\n\t\t\t\t\t\t var id = $(this).attr('id').replace(/_tag$/, '');\n\t\t\t\t\t\t last_tag = last_tag.replace(/[\\s]+x$/, '');\n\t\t\t\t\t\t $('#' + id).removeTag(escape(last_tag));\n\t\t\t\t\t\t $(this).trigger('focus');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$(data.fake_input).blur();\n\n\t\t\t\t//Removes the not_valid class when user changes the value of the fake input\n\t\t\t\tif(data.unique) {\n\t\t\t\t $(data.fake_input).keydown(function(event){\n\t\t\t\t if(event.keyCode == 8 || String.fromCharCode(event.which).match(/\\w+|[áéÃóúÃÉÃÓÚñÑ,/]+/)) {\n\t\t\t\t $(this).removeClass('not_valid');\n\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t}\n\t\t\t} // if settings.interactive\n\t\t});\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.tagsInput.updateTagsField = function(obj,tagslist) {\n\t\tvar id = $(obj).attr('id');\n\t\t$(obj).val(tagslist.join(delimiter[id]));\n\t};\n\n\t$.fn.tagsInput.importTags = function(obj,val) {\n\t\t$(obj).val('');\n\t\tvar id = $(obj).attr('id');\n\t\tvar tags = val.split(delimiter[id]);\n\t\tfor (i=0; i<tags.length; i++) {\n\t\t\t$(obj).addTag(tags[i],{focus:false,callback:false});\n\t\t}\n\t\tif(tags_callbacks[id] && tags_callbacks[id]['onChange'])\n\t\t{\n\t\t\tvar f = tags_callbacks[id]['onChange'];\n\t\t\tf.call(obj, obj, tags[i]);\n\t\t}\n\t};\n\n /**\n * check delimiter Array\n * @param event\n * @returns {boolean}\n * @private\n */\n var _checkDelimiter = function(event){\n var found = false;\n if (event.which == 13) {\n return true;\n }\n\n if (typeof event.data.delimiter === 'string') {\n if (event.which == event.data.delimiter.charCodeAt(0)) {\n found = true;\n }\n } else {\n $.each(event.data.delimiter, function(index, delimiter) {\n if (event.which == delimiter.charCodeAt(0)) {\n found = true;\n }\n });\n }\n\n return found;\n }\n})(jQuery);\n","/*! jQuery UI - v1.11.4 - 2015-03-11\n* http://jqueryui.com\n* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js\n* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */\n\n(function( factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([ \"jquery\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n}(function( $ ) {\n/*!\n * jQuery UI Core 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\n\n// $.ui might exist from components with no dependencies, e.g., $.ui.position\n$.ui = $.ui || {};\n\n$.extend( $.ui, {\n\tversion: \"1.11.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\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\tscrollParent: function( includeHidden ) {\n\t\tvar position = this.css( \"position\" ),\n\t\t\texcludeStaticParent = position === \"absolute\",\n\t\t\toverflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,\n\t\t\tscrollParent = this.parents().filter( function() {\n\t\t\t\tvar parent = $( this );\n\t\t\t\tif ( excludeStaticParent && parent.css( \"position\" ) === \"static\" ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn overflowRegex.test( parent.css( \"overflow\" ) + parent.css( \"overflow-y\" ) + parent.css( \"overflow-x\" ) );\n\t\t\t}).eq( 0 );\n\n\t\treturn position === \"fixed\" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;\n\t},\n\n\tuniqueId: (function() {\n\t\tvar uuid = 0;\n\n\t\treturn function() {\n\t\t\treturn this.each(function() {\n\t\t\t\tif ( !this.id ) {\n\t\t\t\t\tthis.id = \"ui-id-\" + ( ++uuid );\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t})(),\n\n\tremoveUniqueId: function() {\n\t\treturn this.each(function() {\n\t\t\tif ( /^ui-id-\\d+$/.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// deprecated\n$.ui.ie = !!/msie [\\w.]+/.exec( navigator.userAgent.toLowerCase() );\n\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\tdisableSelection: (function() {\n\t\tvar eventType = \"onselectstart\" in document.createElement( \"div\" ) ?\n\t\t\t\"selectstart\" :\n\t\t\t\"mousedown\";\n\n\t\treturn function() {\n\t\t\treturn this.bind( eventType + \".ui-disableSelection\", function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t});\n\t\t};\n\t})(),\n\n\tenableSelection: function() {\n\t\treturn this.unbind( \".ui-disableSelection\" );\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\n// $.ui.plugin is deprecated. Use $.widget() extensions instead.\n$.ui.plugin = {\n\tadd: function( module, option, set ) {\n\t\tvar i,\n\t\t\tproto = $.ui[ module ].prototype;\n\t\tfor ( i in set ) {\n\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t}\n\t},\n\tcall: function( instance, name, args, allowDisconnected ) {\n\t\tvar i,\n\t\t\tset = instance.plugins[ name ];\n\n\t\tif ( !set ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n/*!\n * jQuery UI Widget 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\n\nvar widget_uuid = 0,\n\twidget_slice = Array.prototype.slice;\n\n$.cleanData = (function( orig ) {\n\treturn function( elems ) {\n\t\tvar events, elem, i;\n\t\tfor ( i = 0; (elem = elems[i]) != null; i++ ) {\n\t\t\ttry {\n\n\t\t\t\t// Only trigger remove when necessary to save time\n\t\t\t\tevents = $._data( elem, \"events\" );\n\t\t\t\tif ( events && events.remove ) {\n\t\t\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t\t\t}\n\n\t\t\t// http://bugs.jquery.com/ticket/8235\n\t\t\t} catch ( e ) {}\n\t\t}\n\t\torig( elems );\n\t};\n})( $.cleanData );\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\treturn constructor;\n};\n\n$.widget.extend = function( target ) {\n\tvar input = widget_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 = widget_slice.call( arguments, 1 ),\n\t\t\treturnValue = this;\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 ( options === \"instance\" ) {\n\t\t\t\t\treturnValue = instance;\n\t\t\t\t\treturn false;\n\t\t\t\t}\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\n\t\t\t// Allow multiple hashes to be passed on init\n\t\t\tif ( args.length ) {\n\t\t\t\toptions = $.widget.extend.apply( null, [ options ].concat(args) );\n\t\t\t}\n\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 || {} );\n\t\t\t\t\tif ( instance._init ) {\n\t\t\t\t\t\tinstance._init();\n\t\t\t\t\t}\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 = widget_uuid++;\n\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\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.options = $.widget.extend( {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\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.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\", !!value );\n\n\t\t\t// If the widget is becoming disabled, then nothing is interactive\n\t\t\tif ( value ) {\n\t\t\t\tthis.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\t\tthis.focusable.removeClass( \"ui-state-focus\" );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tenable: function() {\n\t\treturn this._setOptions({ disabled: false });\n\t},\n\tdisable: function() {\n\t\treturn this._setOptions({ 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\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 + \" \" ) +\n\t\t\tthis.eventNamespace;\n\t\telement.unbind( eventName ).undelegate( eventName );\n\n\t\t// Clear the stack to avoid memory leaks (#10056)\n\t\tthis.bindings = $( this.bindings.not( element ).get() );\n\t\tthis.focusable = $( this.focusable.not( element ).get() );\n\t\tthis.hoverable = $( this.hoverable.not( element ).get() );\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\nvar widget = $.widget;\n\n\n/*!\n * jQuery UI Mouse 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\n\nvar mouseHandled = false;\n$( document ).mouseup( function() {\n\tmouseHandled = false;\n});\n\nvar mouse = $.widget(\"ui.mouse\", {\n\tversion: \"1.11.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\tthis.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 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._mouseMoved = false;\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\n\t\tthis.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// Only check for mouseups outside the document if you've moved inside the document\n\t\t// at least once. This prevents the firing of mouseup in the case of IE<9, which will\n\t\t// fire a mousemove event if content is placed under the cursor. See #7778\n\t\t// Support: IE <9\n\t\tif ( this._mouseMoved ) {\n\t\t\t// IE mouseup check - mouseup happened when mouse was out of window\n\t\t\tif ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {\n\t\t\t\treturn this._mouseUp(event);\n\n\t\t\t// Iframe mouseup check - mouseup occurred in another document\n\t\t\t} else if ( !event.which ) {\n\t\t\t\treturn this._mouseUp( event );\n\t\t\t}\n\t\t}\n\n\t\tif ( event.which || event.button ) {\n\t\t\tthis._mouseMoved = true;\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\tthis.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\tmouseHandled = false;\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\n/*!\n * jQuery UI Position 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\n(function() {\n\n$.ui = $.ui || {};\n\nvar cachedScrollbarWidth, supportsOffsetFractions,\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\n\t\t\t// support: jQuery 1.6.x\n\t\t\t// jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows\n\t\t\twidth: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),\n\t\t\theight: isWindow || isDocument ? 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 ( !supportsOffsetFractions ) {\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} else 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 ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tnewOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;\n\t\t\t\tif ( 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\tsupportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;\n\n\ttestElement.innerHTML = \"\";\n\ttestElementParent.removeChild( testElement );\n})();\n\n})();\n\nvar position = $.ui.position;\n\n\n/*!\n * jQuery UI Accordion 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/accordion/\n */\n\n\nvar accordion = $.widget( \"ui.accordion\", {\n\tversion: \"1.11.4\",\n\toptions: {\n\t\tactive: 0,\n\t\tanimate: {},\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\theader: \"> li > :first-child,> :not(li):even\",\n\t\theightStyle: \"auto\",\n\t\ticons: {\n\t\t\tactiveHeader: \"ui-icon-triangle-1-s\",\n\t\t\theader: \"ui-icon-triangle-1-e\"\n\t\t},\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tbeforeActivate: null\n\t},\n\n\thideProps: {\n\t\tborderTopWidth: \"hide\",\n\t\tborderBottomWidth: \"hide\",\n\t\tpaddingTop: \"hide\",\n\t\tpaddingBottom: \"hide\",\n\t\theight: \"hide\"\n\t},\n\n\tshowProps: {\n\t\tborderTopWidth: \"show\",\n\t\tborderBottomWidth: \"show\",\n\t\tpaddingTop: \"show\",\n\t\tpaddingBottom: \"show\",\n\t\theight: \"show\"\n\t},\n\n\t_create: function() {\n\t\tvar options = this.options;\n\t\tthis.prevShow = this.prevHide = $();\n\t\tthis.element.addClass( \"ui-accordion ui-widget ui-helper-reset\" )\n\t\t\t// ARIA\n\t\t\t.attr( \"role\", \"tablist\" );\n\n\t\t// don't allow collapsible: false and active: false / null\n\t\tif ( !options.collapsible && (options.active === false || options.active == null) ) {\n\t\t\toptions.active = 0;\n\t\t}\n\n\t\tthis._processPanels();\n\t\t// handle negative values\n\t\tif ( options.active < 0 ) {\n\t\t\toptions.active += this.headers.length;\n\t\t}\n\t\tthis._refresh();\n\t},\n\n\t_getCreateEventData: function() {\n\t\treturn {\n\t\t\theader: this.active,\n\t\t\tpanel: !this.active.length ? $() : this.active.next()\n\t\t};\n\t},\n\n\t_createIcons: function() {\n\t\tvar icons = this.options.icons;\n\t\tif ( icons ) {\n\t\t\t$( \"<span>\" )\n\t\t\t\t.addClass( \"ui-accordion-header-icon ui-icon \" + icons.header )\n\t\t\t\t.prependTo( this.headers );\n\t\t\tthis.active.children( \".ui-accordion-header-icon\" )\n\t\t\t\t.removeClass( icons.header )\n\t\t\t\t.addClass( icons.activeHeader );\n\t\t\tthis.headers.addClass( \"ui-accordion-icons\" );\n\t\t}\n\t},\n\n\t_destroyIcons: function() {\n\t\tthis.headers\n\t\t\t.removeClass( \"ui-accordion-icons\" )\n\t\t\t.children( \".ui-accordion-header-icon\" )\n\t\t\t\t.remove();\n\t},\n\n\t_destroy: function() {\n\t\tvar contents;\n\n\t\t// clean up main element\n\t\tthis.element\n\t\t\t.removeClass( \"ui-accordion ui-widget ui-helper-reset\" )\n\t\t\t.removeAttr( \"role\" );\n\n\t\t// clean up headers\n\t\tthis.headers\n\t\t\t.removeClass( \"ui-accordion-header ui-accordion-header-active ui-state-default \" +\n\t\t\t\t\"ui-corner-all ui-state-active ui-state-disabled ui-corner-top\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t.removeAttr( \"aria-selected\" )\n\t\t\t.removeAttr( \"aria-controls\" )\n\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t.removeUniqueId();\n\n\t\tthis._destroyIcons();\n\n\t\t// clean up content panels\n\t\tcontents = this.headers.next()\n\t\t\t.removeClass( \"ui-helper-reset ui-widget-content ui-corner-bottom \" +\n\t\t\t\t\"ui-accordion-content ui-accordion-content-active ui-state-disabled\" )\n\t\t\t.css( \"display\", \"\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t.removeUniqueId();\n\n\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\tcontents.css( \"height\", \"\" );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"active\" ) {\n\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\tthis._activate( value );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"event\" ) {\n\t\t\tif ( this.options.event ) {\n\t\t\t\tthis._off( this.headers, this.options.event );\n\t\t\t}\n\t\t\tthis._setupEvents( value );\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\t// setting collapsible: false while collapsed; open first panel\n\t\tif ( key === \"collapsible\" && !value && this.options.active === false ) {\n\t\t\tthis._activate( 0 );\n\t\t}\n\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis._destroyIcons();\n\t\t\tif ( value ) {\n\t\t\t\tthis._createIcons();\n\t\t\t}\n\t\t}\n\n\t\t// #5332 - opacity doesn't cascade to positioned elements in IE\n\t\t// so we need to add the disabled class to the headers and panels\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.element\n\t\t\t\t.toggleClass( \"ui-state-disabled\", !!value )\n\t\t\t\t.attr( \"aria-disabled\", value );\n\t\t\tthis.headers.add( this.headers.next() )\n\t\t\t\t.toggleClass( \"ui-state-disabled\", !!value );\n\t\t}\n\t},\n\n\t_keydown: function( event ) {\n\t\tif ( event.altKey || event.ctrlKey ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar keyCode = $.ui.keyCode,\n\t\t\tlength = this.headers.length,\n\t\t\tcurrentIndex = this.headers.index( event.target ),\n\t\t\ttoFocus = false;\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase keyCode.RIGHT:\n\t\t\tcase keyCode.DOWN:\n\t\t\t\ttoFocus = this.headers[ ( currentIndex + 1 ) % length ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.LEFT:\n\t\t\tcase keyCode.UP:\n\t\t\t\ttoFocus = this.headers[ ( currentIndex - 1 + length ) % length ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.SPACE:\n\t\t\tcase keyCode.ENTER:\n\t\t\t\tthis._eventHandler( event );\n\t\t\t\tbreak;\n\t\t\tcase keyCode.HOME:\n\t\t\t\ttoFocus = this.headers[ 0 ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.END:\n\t\t\t\ttoFocus = this.headers[ length - 1 ];\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( toFocus ) {\n\t\t\t$( event.target ).attr( \"tabIndex\", -1 );\n\t\t\t$( toFocus ).attr( \"tabIndex\", 0 );\n\t\t\ttoFocus.focus();\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t_panelKeyDown: function( event ) {\n\t\tif ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {\n\t\t\t$( event.currentTarget ).prev().focus();\n\t\t}\n\t},\n\n\trefresh: function() {\n\t\tvar options = this.options;\n\t\tthis._processPanels();\n\n\t\t// was collapsed or no panel\n\t\tif ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {\n\t\t\toptions.active = false;\n\t\t\tthis.active = $();\n\t\t// active false only when collapsible is true\n\t\t} else if ( options.active === false ) {\n\t\t\tthis._activate( 0 );\n\t\t// was active, but active panel is gone\n\t\t} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\t\t\t// all remaining panel are disabled\n\t\t\tif ( this.headers.length === this.headers.find(\".ui-state-disabled\").length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\t\t\t// activate previous panel\n\t\t\t} else {\n\t\t\t\tthis._activate( Math.max( 0, options.active - 1 ) );\n\t\t\t}\n\t\t// was active, active panel still exists\n\t\t} else {\n\t\t\t// make sure active index is correct\n\t\t\toptions.active = this.headers.index( this.active );\n\t\t}\n\n\t\tthis._destroyIcons();\n\n\t\tthis._refresh();\n\t},\n\n\t_processPanels: function() {\n\t\tvar prevHeaders = this.headers,\n\t\t\tprevPanels = this.panels;\n\n\t\tthis.headers = this.element.find( this.options.header )\n\t\t\t.addClass( \"ui-accordion-header ui-state-default ui-corner-all\" );\n\n\t\tthis.panels = this.headers.next()\n\t\t\t.addClass( \"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom\" )\n\t\t\t.filter( \":not(.ui-accordion-content-active)\" )\n\t\t\t.hide();\n\n\t\t// Avoid memory leaks (#10056)\n\t\tif ( prevPanels ) {\n\t\t\tthis._off( prevHeaders.not( this.headers ) );\n\t\t\tthis._off( prevPanels.not( this.panels ) );\n\t\t}\n\t},\n\n\t_refresh: function() {\n\t\tvar maxHeight,\n\t\t\toptions = this.options,\n\t\t\theightStyle = options.heightStyle,\n\t\t\tparent = this.element.parent();\n\n\t\tthis.active = this._findActive( options.active )\n\t\t\t.addClass( \"ui-accordion-header-active ui-state-active ui-corner-top\" )\n\t\t\t.removeClass( \"ui-corner-all\" );\n\t\tthis.active.next()\n\t\t\t.addClass( \"ui-accordion-content-active\" )\n\t\t\t.show();\n\n\t\tthis.headers\n\t\t\t.attr( \"role\", \"tab\" )\n\t\t\t.each(function() {\n\t\t\t\tvar header = $( this ),\n\t\t\t\t\theaderId = header.uniqueId().attr( \"id\" ),\n\t\t\t\t\tpanel = header.next(),\n\t\t\t\t\tpanelId = panel.uniqueId().attr( \"id\" );\n\t\t\t\theader.attr( \"aria-controls\", panelId );\n\t\t\t\tpanel.attr( \"aria-labelledby\", headerId );\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.attr( \"role\", \"tabpanel\" );\n\n\t\tthis.headers\n\t\t\t.not( this.active )\n\t\t\t.attr({\n\t\t\t\t\"aria-selected\": \"false\",\n\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\ttabIndex: -1\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t\t})\n\t\t\t\t.hide();\n\n\t\t// make sure at least one header is in the tab order\n\t\tif ( !this.active.length ) {\n\t\t\tthis.headers.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tthis.active.attr({\n\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\ttabIndex: 0\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t});\n\t\t}\n\n\t\tthis._createIcons();\n\n\t\tthis._setupEvents( options.event );\n\n\t\tif ( heightStyle === \"fill\" ) {\n\t\t\tmaxHeight = parent.height();\n\t\t\tthis.element.siblings( \":visible\" ).each(function() {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tposition = elem.css( \"position\" );\n\n\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.headers.each(function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.headers.next()\n\t\t\t\t.each(function() {\n\t\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t\t})\n\t\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.headers.next()\n\t\t\t\t.each(function() {\n\t\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).css( \"height\", \"\" ).height() );\n\t\t\t\t})\n\t\t\t\t.height( maxHeight );\n\t\t}\n\t},\n\n\t_activate: function( index ) {\n\t\tvar active = this._findActive( index )[ 0 ];\n\n\t\t// trying to activate the already active panel\n\t\tif ( active === this.active[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// trying to collapse, simulate a click on the currently active header\n\t\tactive = active || this.active[ 0 ];\n\n\t\tthis._eventHandler({\n\t\t\ttarget: active,\n\t\t\tcurrentTarget: active,\n\t\t\tpreventDefault: $.noop\n\t\t});\n\t},\n\n\t_findActive: function( selector ) {\n\t\treturn typeof selector === \"number\" ? this.headers.eq( selector ) : $();\n\t},\n\n\t_setupEvents: function( event ) {\n\t\tvar events = {\n\t\t\tkeydown: \"_keydown\"\n\t\t};\n\t\tif ( event ) {\n\t\t\t$.each( event.split( \" \" ), function( index, eventName ) {\n\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t});\n\t\t}\n\n\t\tthis._off( this.headers.add( this.headers.next() ) );\n\t\tthis._on( this.headers, events );\n\t\tthis._on( this.headers.next(), { keydown: \"_panelKeyDown\" });\n\t\tthis._hoverable( this.headers );\n\t\tthis._focusable( this.headers );\n\t},\n\n\t_eventHandler: function( event ) {\n\t\tvar options = this.options,\n\t\t\tactive = this.active,\n\t\t\tclicked = $( event.currentTarget ),\n\t\t\tclickedIsActive = clicked[ 0 ] === active[ 0 ],\n\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\ttoShow = collapsing ? $() : clicked.next(),\n\t\t\ttoHide = active.next(),\n\t\t\teventData = {\n\t\t\t\toldHeader: active,\n\t\t\t\toldPanel: toHide,\n\t\t\t\tnewHeader: collapsing ? $() : clicked,\n\t\t\t\tnewPanel: toShow\n\t\t\t};\n\n\t\tevent.preventDefault();\n\n\t\tif (\n\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\t\t\t\t// allow canceling activation\n\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions.active = collapsing ? false : this.headers.index( clicked );\n\n\t\t// when the call to ._toggle() comes after the class changes\n\t\t// it causes a very odd bug in IE 8 (see #6720)\n\t\tthis.active = clickedIsActive ? $() : clicked;\n\t\tthis._toggle( eventData );\n\n\t\t// switch classes\n\t\t// corner classes on the previously active header stay after the animation\n\t\tactive.removeClass( \"ui-accordion-header-active ui-state-active\" );\n\t\tif ( options.icons ) {\n\t\t\tactive.children( \".ui-accordion-header-icon\" )\n\t\t\t\t.removeClass( options.icons.activeHeader )\n\t\t\t\t.addClass( options.icons.header );\n\t\t}\n\n\t\tif ( !clickedIsActive ) {\n\t\t\tclicked\n\t\t\t\t.removeClass( \"ui-corner-all\" )\n\t\t\t\t.addClass( \"ui-accordion-header-active ui-state-active ui-corner-top\" );\n\t\t\tif ( options.icons ) {\n\t\t\t\tclicked.children( \".ui-accordion-header-icon\" )\n\t\t\t\t\t.removeClass( options.icons.header )\n\t\t\t\t\t.addClass( options.icons.activeHeader );\n\t\t\t}\n\n\t\t\tclicked\n\t\t\t\t.next()\n\t\t\t\t.addClass( \"ui-accordion-content-active\" );\n\t\t}\n\t},\n\n\t_toggle: function( data ) {\n\t\tvar toShow = data.newPanel,\n\t\t\ttoHide = this.prevShow.length ? this.prevShow : data.oldPanel;\n\n\t\t// handle activating a panel during the animation for another activation\n\t\tthis.prevShow.add( this.prevHide ).stop( true, true );\n\t\tthis.prevShow = toShow;\n\t\tthis.prevHide = toHide;\n\n\t\tif ( this.options.animate ) {\n\t\t\tthis._animate( toShow, toHide, data );\n\t\t} else {\n\t\t\ttoHide.hide();\n\t\t\ttoShow.show();\n\t\t\tthis._toggleComplete( data );\n\t\t}\n\n\t\ttoHide.attr({\n\t\t\t\"aria-hidden\": \"true\"\n\t\t});\n\t\ttoHide.prev().attr({\n\t\t\t\"aria-selected\": \"false\",\n\t\t\t\"aria-expanded\": \"false\"\n\t\t});\n\t\t// if we're switching panels, remove the old header from the tab order\n\t\t// if we're opening from collapsed state, remove the previous header from the tab order\n\t\t// if we're collapsing, then keep the collapsing header in the tab order\n\t\tif ( toShow.length && toHide.length ) {\n\t\t\ttoHide.prev().attr({\n\t\t\t\t\"tabIndex\": -1,\n\t\t\t\t\"aria-expanded\": \"false\"\n\t\t\t});\n\t\t} else if ( toShow.length ) {\n\t\t\tthis.headers.filter(function() {\n\t\t\t\treturn parseInt( $( this ).attr( \"tabIndex\" ), 10 ) === 0;\n\t\t\t})\n\t\t\t.attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\ttoShow\n\t\t\t.attr( \"aria-hidden\", \"false\" )\n\t\t\t.prev()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t});\n\t},\n\n\t_animate: function( toShow, toHide, data ) {\n\t\tvar total, easing, duration,\n\t\t\tthat = this,\n\t\t\tadjust = 0,\n\t\t\tboxSizing = toShow.css( \"box-sizing\" ),\n\t\t\tdown = toShow.length &&\n\t\t\t\t( !toHide.length || ( toShow.index() < toHide.index() ) ),\n\t\t\tanimate = this.options.animate || {},\n\t\t\toptions = down && animate.down || animate,\n\t\t\tcomplete = function() {\n\t\t\t\tthat._toggleComplete( data );\n\t\t\t};\n\n\t\tif ( typeof options === \"number\" ) {\n\t\t\tduration = options;\n\t\t}\n\t\tif ( typeof options === \"string\" ) {\n\t\t\teasing = options;\n\t\t}\n\t\t// fall back from options to animation in case of partial down settings\n\t\teasing = easing || options.easing || animate.easing;\n\t\tduration = duration || options.duration || animate.duration;\n\n\t\tif ( !toHide.length ) {\n\t\t\treturn toShow.animate( this.showProps, duration, easing, complete );\n\t\t}\n\t\tif ( !toShow.length ) {\n\t\t\treturn toHide.animate( this.hideProps, duration, easing, complete );\n\t\t}\n\n\t\ttotal = toShow.show().outerHeight();\n\t\ttoHide.animate( this.hideProps, {\n\t\t\tduration: duration,\n\t\t\teasing: easing,\n\t\t\tstep: function( now, fx ) {\n\t\t\t\tfx.now = Math.round( now );\n\t\t\t}\n\t\t});\n\t\ttoShow\n\t\t\t.hide()\n\t\t\t.animate( this.showProps, {\n\t\t\t\tduration: duration,\n\t\t\t\teasing: easing,\n\t\t\t\tcomplete: complete,\n\t\t\t\tstep: function( now, fx ) {\n\t\t\t\t\tfx.now = Math.round( now );\n\t\t\t\t\tif ( fx.prop !== \"height\" ) {\n\t\t\t\t\t\tif ( boxSizing === \"content-box\" ) {\n\t\t\t\t\t\t\tadjust += fx.now;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( that.options.heightStyle !== \"content\" ) {\n\t\t\t\t\t\tfx.now = Math.round( total - toHide.outerHeight() - adjust );\n\t\t\t\t\t\tadjust = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t},\n\n\t_toggleComplete: function( data ) {\n\t\tvar toHide = data.oldPanel;\n\n\t\ttoHide\n\t\t\t.removeClass( \"ui-accordion-content-active\" )\n\t\t\t.prev()\n\t\t\t\t.removeClass( \"ui-corner-top\" )\n\t\t\t\t.addClass( \"ui-corner-all\" );\n\n\t\t// Work around for rendering bug in IE (#5421)\n\t\tif ( toHide.length ) {\n\t\t\ttoHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;\n\t\t}\n\t\tthis._trigger( \"activate\", null, data );\n\t}\n});\n\n\n/*!\n * jQuery UI Menu 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\n\nvar menu = $.widget( \"ui.menu\", {\n\tversion: \"1.11.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\titems: \"> *\",\n\t\tmenus: \"ul\",\n\t\tposition: {\n\t\t\tmy: \"left-1 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\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\" )\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\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\": function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\t\"click .ui-menu-item\": function( event ) {\n\t\t\t\tvar target = $( event.target );\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\t// Ignore mouse events while typeahead is active, see #10458.\n\t\t\t\t// Prevents focusing the wrong item when typeahead causes a scroll while the mouse\n\t\t\t\t// is over an item in the menu\n\t\t\t\tif ( this.previousFilter ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\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( \".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.find( this.options.items ).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 ( this._closeOnDocumentClick( event ) ) {\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-menu-icons ui-front\" )\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.removeUniqueId()\n\t\t\t.removeClass( \"ui-state-hover\" )\n\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-haspopup\" )\n\t\t\t.children().each( function() {\n\t\t\t\tvar elem = $( this );\n\t\t\t\tif ( elem.data( \"ui-menu-submenu-carat\" ) ) {\n\t\t\t\t\telem.remove();\n\t\t\t\t}\n\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,\n\t\t\tpreventDefault = true;\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\tmatch = this._filterMenuItems( character );\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\tmatch = this._filterMenuItems( character );\n\t\t\t}\n\n\t\t\tif ( match.length ) {\n\t\t\t\tthis.focus( event, match );\n\t\t\t\tthis.previousFilter = character;\n\t\t\t\tthis.filterTimer = this._delay(function() {\n\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t}, 1000 );\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.is( \"[aria-haspopup='true']\" ) ) {\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, items,\n\t\t\tthat = this,\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-front\" )\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.parent(),\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\t\titems = menus.find( this.options.items );\n\n\t\t// Initialize menu-items containing spaces and/or dashes only as dividers\n\t\titems.not( \".ui-menu-item\" ).each(function() {\n\t\t\tvar item = $( this );\n\t\t\tif ( that._isDivider( item ) ) {\n\t\t\t\titem.addClass( \"ui-widget-content ui-menu-divider\" );\n\t\t\t}\n\t\t});\n\n\t\t// Don't refresh list items that are already adapted\n\t\titems.not( \".ui-menu-item, .ui-menu-divider\" )\n\t\t\t.addClass( \"ui-menu-item\" )\n\t\t\t.uniqueId()\n\t\t\t.attr({\n\t\t\t\ttabIndex: -1,\n\t\t\t\trole: this._itemRole()\n\t\t\t});\n\n\t\t// Add aria-disabled attribute to any disabled menu item\n\t\titems.filter( \".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\tif ( key === \"disabled\" ) {\n\t\t\tthis.element\n\t\t\t\t.toggleClass( \"ui-state-disabled\", !!value )\n\t\t\t\t.attr( \"aria-disabled\", value );\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.addClass( \"ui-state-focus\" ).removeClass( \"ui-state-active\" );\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.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.outerHeight();\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.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( \".ui-state-active\" ).not( \".ui-state-focus\" )\n\t\t\t\t.removeClass( \"ui-state-active\" );\n\t},\n\n\t_closeOnDocumentClick: function( event ) {\n\t\treturn !$( event.target ).closest( \".ui-menu\" ).length;\n\t},\n\n\t_isDivider: function( item ) {\n\n\t\t// Match hyphen, em dash, en dash\n\t\treturn !/[^\\-\\u2014\\u2013\\s]/.test( item.text() );\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.find( this.options.items )\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.find( this.options.items )[ 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.find( this.options.items )\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.find( this.options.items ).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\t_filterMenuItems: function(character) {\n\t\tvar escapedCharacter = character.replace( /[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\" ),\n\t\t\tregex = new RegExp( \"^\" + escapedCharacter, \"i\" );\n\n\t\treturn this.activeMenu\n\t\t\t.find( this.options.items )\n\n\t\t\t// Only match on items, not dividers or other content (#10571)\n\t\t\t.filter( \".ui-menu-item\" )\n\t\t\t.filter(function() {\n\t\t\t\treturn regex.test( $.trim( $( this ).text() ) );\n\t\t\t});\n\t}\n});\n\n\n/*!\n * jQuery UI Autocomplete 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\n\n$.widget( \"ui.autocomplete\", {\n\tversion: \"1.11.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\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\tif ( !this.isMultiLine ) {\n\t\t\t\t\t\t\tthis._value( this.term );\n\t\t\t\t\t\t}\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.menu( \"instance\" );\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\tvar label, item;\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\titem = 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}\n\n\t\t\t\t// Announce the value in the liveRegion\n\t\t\t\tlabel = ui.item.attr( \"aria-label\" ) || item.value;\n\t\t\t\tif ( label && $.trim( label ).length ) {\n\t\t\t\t\tthis.liveRegion.children().hide();\n\t\t\t\t\t$( \"<div>\" ).text( label ).appendTo( this.liveRegion );\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\": \"assertive\",\n\t\t\t\t\"aria-relevant\": \"additions\"\n\t\t\t})\n\t\t\t.addClass( \"ui-helper-hidden-accessible\" )\n\t\t\t.appendTo( this.document[ 0 ].body );\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 || !element[ 0 ] ) {\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\n\t\t\t// Search if the value has changed, or if the user retypes the same value (see #7434)\n\t\t\tvar equalValues = this.term === this._value(),\n\t\t\t\tmenuVisible = this.menu.element.is( \":visible\" ),\n\t\t\t\tmodifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n\n\t\t\tif ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {\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( {}, item, {\n\t\t\t\tlabel: item.label || item.value,\n\t\t\t\tvalue: item.value || item.label\n\t\t\t});\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>\" ).text( item.label ).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\n\t\t\tif ( !this.isMultiLine ) {\n\t\t\t\tthis._value( this.term );\n\t\t\t}\n\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// 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.children().hide();\n\t\t$( \"<div>\" ).text( message ).appendTo( this.liveRegion );\n\t}\n});\n\nvar autocomplete = $.ui.autocomplete;\n\n\n/*!\n * jQuery UI Button 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\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 + \"'][type=radio]\" );\n\t\t\t} else {\n\t\t\t\tradios = $( \"[name='\" + name + \"'][type=radio]\", 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.11.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\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.widget().toggleClass( \"ui-state-disabled\", !!value );\n\t\t\tthis.element.prop( \"disabled\", !!value );\n\t\t\tif ( value ) {\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t\t\tthis.buttonElement.removeClass( \"ui-state-focus\" );\n\t\t\t\t} else {\n\t\t\t\t\tthis.buttonElement.removeClass( \"ui-state-focus ui-state-active\" );\n\t\t\t\t}\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.11.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\t\t\tallButtons = this.element.find( this.options.items ),\n\t\t\texistingButtons = allButtons.filter( \":ui-button\" );\n\n\t\t// Initialize new buttons\n\t\tallButtons.not( \":ui-button\" ).button();\n\n\t\t// Refresh existing buttons\n\t\texistingButtons.button( \"refresh\" );\n\n\t\tthis.buttons = allButtons\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\nvar button = $.ui.button;\n\n\n/*!\n * jQuery UI Datepicker 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\n\n$.extend($.ui, { datepicker: { version: \"1.11.4\" } });\n\nvar datepicker_instActive;\n\nfunction datepicker_getZindex( elem ) {\n\tvar position, value;\n\twhile ( elem.length && elem[ 0 ] !== document ) {\n\t\t// Ignore z-index if position is set to a value where z-index is ignored by the browser\n\t\t// This makes behavior of this function consistent across browsers\n\t\t// WebKit always returns auto if the element is positioned\n\t\tposition = elem.css( \"position\" );\n\t\tif ( position === \"absolute\" || position === \"relative\" || position === \"fixed\" ) {\n\t\t\t// IE returns 0 when zIndex is not specified\n\t\t\t// other browsers return a string\n\t\t\t// we ignore the case of nested elements with an explicit value of 0\n\t\t\t// <div style=\"z-index: -10;\"><div style=\"z-index: 0;\"></div></div>\n\t\t\tvalue = parseInt( elem.css( \"zIndex\" ), 10 );\n\t\t\tif ( !isNaN( value ) && value !== 0 ) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\telem = elem.parent();\n\t}\n\n\treturn 0;\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.regional.en = $.extend( true, {}, this.regional[ \"\" ]);\n\tthis.regional[ \"en-US\" ] = $.extend( true, {}, this.regional.en );\n\tthis.dpDiv = datepicker_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\tdatepicker_extendRemove(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\tdatepicker_bindHover($(\"<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, \"datepicker\", 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, \"datepicker\", 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], \"datepicker\", inst);\n\t\t}\n\t\tdatepicker_extendRemove(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], \"datepicker\", 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, \"datepicker\");\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, \"datepicker\");\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\n\t\tif ( datepicker_instActive === inst ) {\n\t\t\tdatepicker_instActive = null;\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, \"datepicker\");\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, \"datepicker\");\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, \"datepicker\");\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\tdatepicker_extendRemove(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\tdatepicker_extendRemove(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.css( \"z-index\", datepicker_getZindex( $( input ) ) + 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\tdatepicker_instActive = inst; // for delegate hover events\n\t\tinst.dpDiv.empty().append(this._generateHTML(inst));\n\t\tthis._attachHandlers(inst);\n\n\t\tvar origyearshtml,\n\t\t\tnumMonths = this._getNumberOfMonths(inst),\n\t\t\tcols = numMonths[1],\n\t\t\twidth = 17,\n\t\t\tactiveCell = inst.dpDiv.find( \".\" + this._dayOverClass + \" a\" );\n\n\t\tif ( activeCell.length > 0 ) {\n\t\t\tdatepicker_handleMouseover.apply( activeCell.get( 0 ) );\n\t\t}\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, \"datepicker\"))) {\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\tminSize = (match === \"y\" ? size : 1),\n\t\t\t\t\tdigits = new RegExp(\"^\\\\d{\" + minSize + \",\" + 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 scope='col'\" + ((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 datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.\n */\nfunction datepicker_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\", datepicker_handleMouseover );\n}\n\nfunction datepicker_handleMouseover() {\n\tif (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) {\n\t\t$(this).parents(\".ui-datepicker-calendar\").find(\"a\").removeClass(\"ui-state-hover\");\n\t\t$(this).addClass(\"ui-state-hover\");\n\t\tif (this.className.indexOf(\"ui-datepicker-prev\") !== -1) {\n\t\t\t$(this).addClass(\"ui-datepicker-prev-hover\");\n\t\t}\n\t\tif (this.className.indexOf(\"ui-datepicker-next\") !== -1) {\n\t\t\t$(this).addClass(\"ui-datepicker-next-hover\");\n\t\t}\n\t}\n}\n\n/* jQuery extend now ignores nulls! */\nfunction datepicker_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.11.4\";\n\nvar datepicker = $.datepicker;\n\n\n/*!\n * jQuery UI Draggable 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/draggable/\n */\n\n\n$.widget(\"ui.draggable\", $.ui.mouse, {\n\tversion: \"1.11.4\",\n\twidgetEventPrefix: \"drag\",\n\toptions: {\n\t\taddClasses: true,\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectToSortable: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\tiframeFix: false,\n\t\topacity: false,\n\t\trefreshPositions: false,\n\t\trevert: false,\n\t\trevertDuration: 500,\n\t\tscope: \"default\",\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tsnap: false,\n\t\tsnapMode: \"both\",\n\t\tsnapTolerance: 20,\n\t\tstack: false,\n\t\tzIndex: false,\n\n\t\t// callbacks\n\t\tdrag: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\t_create: function() {\n\n\t\tif ( this.options.helper === \"original\" ) {\n\t\t\tthis._setPositionRelative();\n\t\t}\n\t\tif (this.options.addClasses){\n\t\t\tthis.element.addClass(\"ui-draggable\");\n\t\t}\n\t\tif (this.options.disabled){\n\t\t\tthis.element.addClass(\"ui-draggable-disabled\");\n\t\t}\n\t\tthis._setHandleClassName();\n\n\t\tthis._mouseInit();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"handle\" ) {\n\t\t\tthis._removeHandleClassName();\n\t\t\tthis._setHandleClassName();\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tif ( ( this.helper || this.element ).is( \".ui-draggable-dragging\" ) ) {\n\t\t\tthis.destroyOnClear = true;\n\t\t\treturn;\n\t\t}\n\t\tthis.element.removeClass( \"ui-draggable ui-draggable-dragging ui-draggable-disabled\" );\n\t\tthis._removeHandleClassName();\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function(event) {\n\t\tvar o = this.options;\n\n\t\tthis._blurActiveElement( event );\n\n\t\t// among others, prevent a drag on a resizable-handle\n\t\tif (this.helper || o.disabled || $(event.target).closest(\".ui-resizable-handle\").length > 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//Quit if we're not on a valid handle\n\t\tthis.handle = this._getHandle(event);\n\t\tif (!this.handle) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis._blockFrames( o.iframeFix === true ? \"iframe\" : o.iframeFix );\n\n\t\treturn true;\n\n\t},\n\n\t_blockFrames: function( selector ) {\n\t\tthis.iframeBlocks = this.document.find( selector ).map(function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css( \"position\", \"absolute\" )\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.outerWidth( iframe.outerWidth() )\n\t\t\t\t.outerHeight( iframe.outerHeight() )\n\t\t\t\t.offset( iframe.offset() )[ 0 ];\n\t\t});\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_blurActiveElement: function( event ) {\n\t\tvar document = this.document[ 0 ];\n\n\t\t// Only need to blur if the event occurred on the draggable itself, see #10527\n\t\tif ( !this.handleElement.is( event.target ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// support: IE9\n\t\t// IE9 throws an \"Unspecified error\" accessing document.activeElement from an <iframe>\n\t\ttry {\n\n\t\t\t// Support: IE9, IE10\n\t\t\t// If the <body> is blurred, IE will switch windows, see #9520\n\t\t\tif ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== \"body\" ) {\n\n\t\t\t\t// Blur any element that currently has focus, see #4261\n\t\t\t\t$( document.activeElement ).blur();\n\t\t\t}\n\t\t} catch ( error ) {}\n\t},\n\n\t_mouseStart: function(event) {\n\n\t\tvar o = this.options;\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper(event);\n\n\t\tthis.helper.addClass(\"ui-draggable-dragging\");\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//If ddmanager is used for droppables, set the global draggable\n\t\tif ($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\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//Store the helper's css position\n\t\tthis.cssPosition = this.helper.css( \"position\" );\n\t\tthis.scrollParent = this.helper.scrollParent( true );\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tthis.hasFixedAncestor = this.helper.parents().filter(function() {\n\t\t\t\treturn $( this ).css( \"position\" ) === \"fixed\";\n\t\t\t}).length > 0;\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.positionAbs = this.element.offset();\n\t\tthis._refreshOffsets( event );\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this.position = this._generatePosition( event, false );\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//Set a containment if given in the options\n\t\tthis._setContainment();\n\n\t\t//Trigger event + callbacks\n\t\tif (this._trigger(\"start\", event) === false) {\n\t\t\tthis._clear();\n\t\t\treturn false;\n\t\t}\n\n\t\t//Recache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//Prepare the droppable offsets\n\t\tif ($.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t}\n\n\t\t// Reset helper's right/bottom css if they're set and set explicit width/height instead\n\t\t// as this prevents resizing of elements with right/bottom set (see #7772)\n\t\tthis._normalizeRightBottom();\n\n\t\tthis._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n\n\t\t//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStart(this, event);\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t_refreshOffsets: function( event ) {\n\t\tthis.offset = {\n\t\t\ttop: this.positionAbs.top - this.margins.top,\n\t\t\tleft: this.positionAbs.left - this.margins.left,\n\t\t\tscroll: false,\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset()\n\t\t};\n\n\t\tthis.offset.click = {\n\t\t\tleft: event.pageX - this.offset.left,\n\t\t\ttop: event.pageY - this.offset.top\n\t\t};\n\t},\n\n\t_mouseDrag: function(event, noPropagation) {\n\t\t// reset any necessary cached properties (see #5009)\n\t\tif ( this.hasFixedAncestor ) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition( event, true );\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\t//Call plugins and callbacks and use the resulting position if something is returned\n\t\tif (!noPropagation) {\n\t\t\tvar ui = this._uiHash();\n\t\t\tif (this._trigger(\"drag\", event, ui) === false) {\n\t\t\t\tthis._mouseUp({});\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.position = ui.position;\n\t\t}\n\n\t\tthis.helper[ 0 ].style.left = this.position.left + \"px\";\n\t\tthis.helper[ 0 ].style.top = this.position.top + \"px\";\n\n\t\tif ($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.drag(this, event);\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tvar that = this,\n\t\t\tdropped = false;\n\t\tif ($.ui.ddmanager && !this.options.dropBehaviour) {\n\t\t\tdropped = $.ui.ddmanager.drop(this, event);\n\t\t}\n\n\t\t//if a drop comes from outside (a sortable)\n\t\tif (this.dropped) {\n\t\t\tdropped = this.dropped;\n\t\t\tthis.dropped = false;\n\t\t}\n\n\t\tif ((this.options.revert === \"invalid\" && !dropped) || (this.options.revert === \"valid\" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {\n\t\t\t$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {\n\t\t\t\tif (that._trigger(\"stop\", event) !== false) {\n\t\t\t\t\tthat._clear();\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tif (this._trigger(\"stop\", event) !== false) {\n\t\t\t\tthis._clear();\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseUp: function( event ) {\n\t\tthis._unblockFrames();\n\n\t\t//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStop(this, event);\n\t\t}\n\n\t\t// Only need to focus if the event occurred on the draggable itself, see #10527\n\t\tif ( this.handleElement.is( event.target ) ) {\n\t\t\t// The interaction is over; whether or not the click resulted in a drag, focus the element\n\t\t\tthis.element.focus();\n\t\t}\n\n\t\treturn $.ui.mouse.prototype._mouseUp.call(this, event);\n\t},\n\n\tcancel: function() {\n\n\t\tif (this.helper.is(\".ui-draggable-dragging\")) {\n\t\t\tthis._mouseUp({});\n\t\t} else {\n\t\t\tthis._clear();\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\t_getHandle: function(event) {\n\t\treturn this.options.handle ?\n\t\t\t!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :\n\t\t\ttrue;\n\t},\n\n\t_setHandleClassName: function() {\n\t\tthis.handleElement = this.options.handle ?\n\t\t\tthis.element.find( this.options.handle ) : this.element;\n\t\tthis.handleElement.addClass( \"ui-draggable-handle\" );\n\t},\n\n\t_removeHandleClassName: function() {\n\t\tthis.handleElement.removeClass( \"ui-draggable-handle\" );\n\t},\n\n\t_createHelper: function(event) {\n\n\t\tvar o = this.options,\n\t\t\thelperIsFunction = $.isFunction( o.helper ),\n\t\t\thelper = helperIsFunction ?\n\t\t\t\t$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :\n\t\t\t\t( o.helper === \"clone\" ?\n\t\t\t\t\tthis.element.clone().removeAttr( \"id\" ) :\n\t\t\t\t\tthis.element );\n\n\t\tif (!helper.parents(\"body\").length) {\n\t\t\thelper.appendTo((o.appendTo === \"parent\" ? this.element[0].parentNode : o.appendTo));\n\t\t}\n\n\t\t// http://bugs.jqueryui.com/ticket/9446\n\t\t// a helper function can return the original element\n\t\t// which wouldn't have been set to relative in _create\n\t\tif ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {\n\t\t\tthis._setPositionRelative();\n\t\t}\n\n\t\tif (helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css(\"position\"))) {\n\t\t\thelper.css(\"position\", \"absolute\");\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_setPositionRelative: function() {\n\t\tif ( !( /^(?:r|a|f)/ ).test( this.element.css( \"position\" ) ) ) {\n\t\t\tthis.element[ 0 ].style.position = \"relative\";\n\t\t}\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_isRootNode: function( element ) {\n\t\treturn ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tvar po = this.offsetParent.offset(),\n\t\t\tdocument = this.document[ 0 ];\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\tif ( this._isRootNode( this.offsetParent[ 0 ] ) ) {\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\t\tif ( this.cssPosition !== \"relative\" ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\tvar p = this.element.position(),\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );\n\n\t\treturn {\n\t\t\ttop: p.top - ( parseInt(this.helper.css( \"top\" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),\n\t\t\tleft: p.left - ( parseInt(this.helper.css( \"left\" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )\n\t\t};\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: (parseInt(this.element.css(\"marginLeft\"), 10) || 0),\n\t\t\ttop: (parseInt(this.element.css(\"marginTop\"), 10) || 0),\n\t\t\tright: (parseInt(this.element.css(\"marginRight\"), 10) || 0),\n\t\t\tbottom: (parseInt(this.element.css(\"marginBottom\"), 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 isUserScrollable, c, ce,\n\t\t\to = this.options,\n\t\t\tdocument = this.document[ 0 ];\n\n\t\tthis.relativeContainer = null;\n\n\t\tif ( !o.containment ) {\n\t\t\tthis.containment = null;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"window\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t$( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t$( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"document\") {\n\t\t\tthis.containment = [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t$( document ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment.constructor === Array ) {\n\t\t\tthis.containment = o.containment;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"parent\" ) {\n\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t}\n\n\t\tc = $( o.containment );\n\t\tce = c[ 0 ];\n\n\t\tif ( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tisUserScrollable = /(scroll|auto)/.test( c.css( \"overflow\" ) );\n\n\t\tthis.containment = [\n\t\t\t( parseInt( c.css( \"borderLeftWidth\" ), 10 ) || 0 ) + ( parseInt( c.css( \"paddingLeft\" ), 10 ) || 0 ),\n\t\t\t( parseInt( c.css( \"borderTopWidth\" ), 10 ) || 0 ) + ( parseInt( c.css( \"paddingTop\" ), 10 ) || 0 ),\n\t\t\t( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -\n\t\t\t\t( parseInt( c.css( \"borderRightWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( c.css( \"paddingRight\" ), 10 ) || 0 ) -\n\t\t\t\tthis.helperProportions.width -\n\t\t\t\tthis.margins.left -\n\t\t\t\tthis.margins.right,\n\t\t\t( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -\n\t\t\t\t( parseInt( c.css( \"borderBottomWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( c.css( \"paddingBottom\" ), 10 ) || 0 ) -\n\t\t\t\tthis.helperProportions.height -\n\t\t\t\tthis.margins.top -\n\t\t\t\tthis.margins.bottom\n\t\t];\n\t\tthis.relativeContainer = c;\n\t},\n\n\t_convertPositionTo: function(d, pos) {\n\n\t\tif (!pos) {\n\t\t\tpos = this.position;\n\t\t}\n\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );\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// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * 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.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod)\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function( event, constrainPosition ) {\n\n\t\tvar containment, co, top, left,\n\t\t\to = this.options,\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY;\n\n\t\t// Cache the scroll\n\t\tif ( !scrollIsRootNode || !this.offset.scroll ) {\n\t\t\tthis.offset.scroll = {\n\t\t\t\ttop: this.scrollParent.scrollTop(),\n\t\t\t\tleft: this.scrollParent.scrollLeft()\n\t\t\t};\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\t// If we are not dragging yet, we won't check for options\n\t\tif ( constrainPosition ) {\n\t\t\tif ( this.containment ) {\n\t\t\t\tif ( this.relativeContainer ){\n\t\t\t\t\tco = this.relativeContainer.offset();\n\t\t\t\t\tcontainment = [\n\t\t\t\t\t\tthis.containment[ 0 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 1 ] + co.top,\n\t\t\t\t\t\tthis.containment[ 2 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 3 ] + co.top\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\tcontainment = this.containment;\n\t\t\t\t}\n\n\t\t\t\tif (event.pageX - this.offset.click.left < containment[0]) {\n\t\t\t\t\tpageX = containment[0] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif (event.pageY - this.offset.click.top < containment[1]) {\n\t\t\t\t\tpageY = containment[1] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif (event.pageX - this.offset.click.left > containment[2]) {\n\t\t\t\t\tpageX = containment[2] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif (event.pageY - this.offset.click.top > containment[3]) {\n\t\t\t\t\tpageY = 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\t//Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)\n\t\t\t\ttop = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;\n\t\t\t\tpageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\n\t\t\t\tleft = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;\n\t\t\t\tpageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n\t\t\t}\n\n\t\t\tif ( o.axis === \"y\" ) {\n\t\t\t\tpageX = this.originalPageX;\n\t\t\t}\n\n\t\t\tif ( o.axis === \"x\" ) {\n\t\t\t\tpageY = this.originalPageY;\n\t\t\t}\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\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.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) )\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\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.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_clear: function() {\n\t\tthis.helper.removeClass(\"ui-draggable-dragging\");\n\t\tif (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {\n\t\t\tthis.helper.remove();\n\t\t}\n\t\tthis.helper = null;\n\t\tthis.cancelHelperRemoval = false;\n\t\tif ( this.destroyOnClear ) {\n\t\t\tthis.destroy();\n\t\t}\n\t},\n\n\t_normalizeRightBottom: function() {\n\t\tif ( this.options.axis !== \"y\" && this.helper.css( \"right\" ) !== \"auto\" ) {\n\t\t\tthis.helper.width( this.helper.width() );\n\t\t\tthis.helper.css( \"right\", \"auto\" );\n\t\t}\n\t\tif ( this.options.axis !== \"x\" && this.helper.css( \"bottom\" ) !== \"auto\" ) {\n\t\t\tthis.helper.height( this.helper.height() );\n\t\t\tthis.helper.css( \"bottom\", \"auto\" );\n\t\t}\n\t},\n\n\t// From now on bulk stuff - mainly helpers\n\n\t_trigger: function( type, event, ui ) {\n\t\tui = ui || this._uiHash();\n\t\t$.ui.plugin.call( this, type, [ event, ui, this ], true );\n\n\t\t// Absolute position and offset (see #6884 ) have to be recalculated after plugins\n\t\tif ( /^(drag|start|stop)/.test( type ) ) {\n\t\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\t\t\tui.offset = this.positionAbs;\n\t\t}\n\t\treturn $.Widget.prototype._trigger.call( this, type, event, ui );\n\t},\n\n\tplugins: {},\n\n\t_uiHash: function() {\n\t\treturn {\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\toriginalPosition: this.originalPosition,\n\t\t\toffset: this.positionAbs\n\t\t};\n\t}\n\n});\n\n$.ui.plugin.add( \"draggable\", \"connectToSortable\", {\n\tstart: function( event, ui, draggable ) {\n\t\tvar uiSortable = $.extend( {}, ui, {\n\t\t\titem: draggable.element\n\t\t});\n\n\t\tdraggable.sortables = [];\n\t\t$( draggable.options.connectToSortable ).each(function() {\n\t\t\tvar sortable = $( this ).sortable( \"instance\" );\n\n\t\t\tif ( sortable && !sortable.options.disabled ) {\n\t\t\t\tdraggable.sortables.push( sortable );\n\n\t\t\t\t// refreshPositions is called at drag start to refresh the containerCache\n\t\t\t\t// which is used in drag. This ensures it's initialized and synchronized\n\t\t\t\t// with any changes that might have happened on the page since initialization.\n\t\t\t\tsortable.refreshPositions();\n\t\t\t\tsortable._trigger(\"activate\", event, uiSortable);\n\t\t\t}\n\t\t});\n\t},\n\tstop: function( event, ui, draggable ) {\n\t\tvar uiSortable = $.extend( {}, ui, {\n\t\t\titem: draggable.element\n\t\t});\n\n\t\tdraggable.cancelHelperRemoval = false;\n\n\t\t$.each( draggable.sortables, function() {\n\t\t\tvar sortable = this;\n\n\t\t\tif ( sortable.isOver ) {\n\t\t\t\tsortable.isOver = 0;\n\n\t\t\t\t// Allow this sortable to handle removing the helper\n\t\t\t\tdraggable.cancelHelperRemoval = true;\n\t\t\t\tsortable.cancelHelperRemoval = false;\n\n\t\t\t\t// Use _storedCSS To restore properties in the sortable,\n\t\t\t\t// as this also handles revert (#9675) since the draggable\n\t\t\t\t// may have modified them in unexpected ways (#8809)\n\t\t\t\tsortable._storedCSS = {\n\t\t\t\t\tposition: sortable.placeholder.css( \"position\" ),\n\t\t\t\t\ttop: sortable.placeholder.css( \"top\" ),\n\t\t\t\t\tleft: sortable.placeholder.css( \"left\" )\n\t\t\t\t};\n\n\t\t\t\tsortable._mouseStop(event);\n\n\t\t\t\t// Once drag has ended, the sortable should return to using\n\t\t\t\t// its original helper, not the shared helper from draggable\n\t\t\t\tsortable.options.helper = sortable.options._helper;\n\t\t\t} else {\n\t\t\t\t// Prevent this Sortable from removing the helper.\n\t\t\t\t// However, don't set the draggable to remove the helper\n\t\t\t\t// either as another connected Sortable may yet handle the removal.\n\t\t\t\tsortable.cancelHelperRemoval = true;\n\n\t\t\t\tsortable._trigger( \"deactivate\", event, uiSortable );\n\t\t\t}\n\t\t});\n\t},\n\tdrag: function( event, ui, draggable ) {\n\t\t$.each( draggable.sortables, function() {\n\t\t\tvar innermostIntersecting = false,\n\t\t\t\tsortable = this;\n\n\t\t\t// Copy over variables that sortable's _intersectsWith uses\n\t\t\tsortable.positionAbs = draggable.positionAbs;\n\t\t\tsortable.helperProportions = draggable.helperProportions;\n\t\t\tsortable.offset.click = draggable.offset.click;\n\n\t\t\tif ( sortable._intersectsWith( sortable.containerCache ) ) {\n\t\t\t\tinnermostIntersecting = true;\n\n\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t// Copy over variables that sortable's _intersectsWith uses\n\t\t\t\t\tthis.positionAbs = draggable.positionAbs;\n\t\t\t\t\tthis.helperProportions = draggable.helperProportions;\n\t\t\t\t\tthis.offset.click = draggable.offset.click;\n\n\t\t\t\t\tif ( this !== sortable &&\n\t\t\t\t\t\t\tthis._intersectsWith( this.containerCache ) &&\n\t\t\t\t\t\t\t$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {\n\t\t\t\t\t\tinnermostIntersecting = false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn innermostIntersecting;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( innermostIntersecting ) {\n\t\t\t\t// If it intersects, we use a little isOver variable and set it once,\n\t\t\t\t// so that the move-in stuff gets fired only once.\n\t\t\t\tif ( !sortable.isOver ) {\n\t\t\t\t\tsortable.isOver = 1;\n\n\t\t\t\t\t// Store draggable's parent in case we need to reappend to it later.\n\t\t\t\t\tdraggable._parent = ui.helper.parent();\n\n\t\t\t\t\tsortable.currentItem = ui.helper\n\t\t\t\t\t\t.appendTo( sortable.element )\n\t\t\t\t\t\t.data( \"ui-sortable-item\", true );\n\n\t\t\t\t\t// Store helper option to later restore it\n\t\t\t\t\tsortable.options._helper = sortable.options.helper;\n\n\t\t\t\t\tsortable.options.helper = function() {\n\t\t\t\t\t\treturn ui.helper[ 0 ];\n\t\t\t\t\t};\n\n\t\t\t\t\t// Fire the start events of the sortable with our passed browser event,\n\t\t\t\t\t// and our own helper (so it doesn't create a new one)\n\t\t\t\t\tevent.target = sortable.currentItem[ 0 ];\n\t\t\t\t\tsortable._mouseCapture( event, true );\n\t\t\t\t\tsortable._mouseStart( event, true, true );\n\n\t\t\t\t\t// Because the browser event is way off the new appended portlet,\n\t\t\t\t\t// modify necessary variables to reflect the changes\n\t\t\t\t\tsortable.offset.click.top = draggable.offset.click.top;\n\t\t\t\t\tsortable.offset.click.left = draggable.offset.click.left;\n\t\t\t\t\tsortable.offset.parent.left -= draggable.offset.parent.left -\n\t\t\t\t\t\tsortable.offset.parent.left;\n\t\t\t\t\tsortable.offset.parent.top -= draggable.offset.parent.top -\n\t\t\t\t\t\tsortable.offset.parent.top;\n\n\t\t\t\t\tdraggable._trigger( \"toSortable\", event );\n\n\t\t\t\t\t// Inform draggable that the helper is in a valid drop zone,\n\t\t\t\t\t// used solely in the revert option to handle \"valid/invalid\".\n\t\t\t\t\tdraggable.dropped = sortable.element;\n\n\t\t\t\t\t// Need to refreshPositions of all sortables in the case that\n\t\t\t\t\t// adding to one sortable changes the location of the other sortables (#9675)\n\t\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t\tthis.refreshPositions();\n\t\t\t\t\t});\n\n\t\t\t\t\t// hack so receive/update callbacks work (mostly)\n\t\t\t\t\tdraggable.currentItem = draggable.element;\n\t\t\t\t\tsortable.fromOutside = draggable;\n\t\t\t\t}\n\n\t\t\t\tif ( sortable.currentItem ) {\n\t\t\t\t\tsortable._mouseDrag( event );\n\t\t\t\t\t// Copy the sortable's position because the draggable's can potentially reflect\n\t\t\t\t\t// a relative position, while sortable is always absolute, which the dragged\n\t\t\t\t\t// element has now become. (#8809)\n\t\t\t\t\tui.position = sortable.position;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If it doesn't intersect with the sortable, and it intersected before,\n\t\t\t\t// we fake the drag stop of the sortable, but make sure it doesn't remove\n\t\t\t\t// the helper by using cancelHelperRemoval.\n\t\t\t\tif ( sortable.isOver ) {\n\n\t\t\t\t\tsortable.isOver = 0;\n\t\t\t\t\tsortable.cancelHelperRemoval = true;\n\n\t\t\t\t\t// Calling sortable's mouseStop would trigger a revert,\n\t\t\t\t\t// so revert must be temporarily false until after mouseStop is called.\n\t\t\t\t\tsortable.options._revert = sortable.options.revert;\n\t\t\t\t\tsortable.options.revert = false;\n\n\t\t\t\t\tsortable._trigger( \"out\", event, sortable._uiHash( sortable ) );\n\t\t\t\t\tsortable._mouseStop( event, true );\n\n\t\t\t\t\t// restore sortable behaviors that were modfied\n\t\t\t\t\t// when the draggable entered the sortable area (#9481)\n\t\t\t\t\tsortable.options.revert = sortable.options._revert;\n\t\t\t\t\tsortable.options.helper = sortable.options._helper;\n\n\t\t\t\t\tif ( sortable.placeholder ) {\n\t\t\t\t\t\tsortable.placeholder.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Restore and recalculate the draggable's offset considering the sortable\n\t\t\t\t\t// may have modified them in unexpected ways. (#8809, #10669)\n\t\t\t\t\tui.helper.appendTo( draggable._parent );\n\t\t\t\t\tdraggable._refreshOffsets( event );\n\t\t\t\t\tui.position = draggable._generatePosition( event, true );\n\n\t\t\t\t\tdraggable._trigger( \"fromSortable\", event );\n\n\t\t\t\t\t// Inform draggable that the helper is no longer in a valid drop zone\n\t\t\t\t\tdraggable.dropped = false;\n\n\t\t\t\t\t// Need to refreshPositions of all sortables just in case removing\n\t\t\t\t\t// from one sortable changes the location of other sortables (#9675)\n\t\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t\tthis.refreshPositions();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"cursor\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( \"body\" ),\n\t\t\to = instance.options;\n\n\t\tif (t.css(\"cursor\")) {\n\t\t\to._cursor = t.css(\"cursor\");\n\t\t}\n\t\tt.css(\"cursor\", o.cursor);\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\t\tif (o._cursor) {\n\t\t\t$(\"body\").css(\"cursor\", o._cursor);\n\t\t}\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"opacity\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( ui.helper ),\n\t\t\to = instance.options;\n\t\tif (t.css(\"opacity\")) {\n\t\t\to._opacity = t.css(\"opacity\");\n\t\t}\n\t\tt.css(\"opacity\", o.opacity);\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\t\tif (o._opacity) {\n\t\t\t$(ui.helper).css(\"opacity\", o._opacity);\n\t\t}\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"scroll\", {\n\tstart: function( event, ui, i ) {\n\t\tif ( !i.scrollParentNotHidden ) {\n\t\t\ti.scrollParentNotHidden = i.helper.scrollParent( false );\n\t\t}\n\n\t\tif ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && i.scrollParentNotHidden[ 0 ].tagName !== \"HTML\" ) {\n\t\t\ti.overflowOffset = i.scrollParentNotHidden.offset();\n\t\t}\n\t},\n\tdrag: function( event, ui, i ) {\n\n\t\tvar o = i.options,\n\t\t\tscrolled = false,\n\t\t\tscrollParent = i.scrollParentNotHidden[ 0 ],\n\t\t\tdocument = i.document[ 0 ];\n\n\t\tif ( scrollParent !== document && scrollParent.tagName !== \"HTML\" ) {\n\t\t\tif ( !o.axis || o.axis !== \"x\" ) {\n\t\t\t\tif ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !o.axis || o.axis !== \"y\" ) {\n\t\t\t\tif ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif (!o.axis || o.axis !== \"x\") {\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\t\t\t}\n\n\t\t\tif (!o.axis || o.axis !== \"y\") {\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\t\t\t}\n\n\t\t}\n\n\t\tif (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t$.ui.ddmanager.prepareOffsets(i, event);\n\t\t}\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"snap\", {\n\tstart: function( event, ui, i ) {\n\n\t\tvar o = i.options;\n\n\t\ti.snapElements = [];\n\n\t\t$(o.snap.constructor !== String ? ( o.snap.items || \":data(ui-draggable)\" ) : o.snap).each(function() {\n\t\t\tvar $t = $(this),\n\t\t\t\t$o = $t.offset();\n\t\t\tif (this !== i.element[0]) {\n\t\t\t\ti.snapElements.push({\n\t\t\t\t\titem: this,\n\t\t\t\t\twidth: $t.outerWidth(), height: $t.outerHeight(),\n\t\t\t\t\ttop: $o.top, left: $o.left\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t},\n\tdrag: function( event, ui, inst ) {\n\n\t\tvar ts, bs, ls, rs, l, r, t, b, i, first,\n\t\t\to = inst.options,\n\t\t\td = o.snapTolerance,\n\t\t\tx1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,\n\t\t\ty1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;\n\n\t\tfor (i = inst.snapElements.length - 1; i >= 0; i--){\n\n\t\t\tl = inst.snapElements[i].left - inst.margins.left;\n\t\t\tr = l + inst.snapElements[i].width;\n\t\t\tt = inst.snapElements[i].top - inst.margins.top;\n\t\t\tb = t + inst.snapElements[i].height;\n\n\t\t\tif ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {\n\t\t\t\tif (inst.snapElements[i].snapping) {\n\t\t\t\t\t(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));\n\t\t\t\t}\n\t\t\t\tinst.snapElements[i].snapping = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (o.snapMode !== \"inner\") {\n\t\t\t\tts = Math.abs(t - y2) <= d;\n\t\t\t\tbs = Math.abs(b - y1) <= d;\n\t\t\t\tls = Math.abs(l - x2) <= d;\n\t\t\t\trs = Math.abs(r - x1) <= d;\n\t\t\t\tif (ts) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: t - inst.helperProportions.height, left: 0 }).top;\n\t\t\t\t}\n\t\t\t\tif (bs) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: b, left: 0 }).top;\n\t\t\t\t}\n\t\t\t\tif (ls) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: l - inst.helperProportions.width }).left;\n\t\t\t\t}\n\t\t\t\tif (rs) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: r }).left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfirst = (ts || bs || ls || rs);\n\n\t\t\tif (o.snapMode !== \"outer\") {\n\t\t\t\tts = Math.abs(t - y1) <= d;\n\t\t\t\tbs = Math.abs(b - y2) <= d;\n\t\t\t\tls = Math.abs(l - x1) <= d;\n\t\t\t\trs = Math.abs(r - x2) <= d;\n\t\t\t\tif (ts) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: t, left: 0 }).top;\n\t\t\t\t}\n\t\t\t\tif (bs) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: b - inst.helperProportions.height, left: 0 }).top;\n\t\t\t\t}\n\t\t\t\tif (ls) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: l }).left;\n\t\t\t\t}\n\t\t\t\tif (rs) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: r - inst.helperProportions.width }).left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {\n\t\t\t\t(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));\n\t\t\t}\n\t\t\tinst.snapElements[i].snapping = (ts || bs || ls || rs || first);\n\n\t\t}\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"stack\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar min,\n\t\t\to = instance.options,\n\t\t\tgroup = $.makeArray($(o.stack)).sort(function(a, b) {\n\t\t\t\treturn (parseInt($(a).css(\"zIndex\"), 10) || 0) - (parseInt($(b).css(\"zIndex\"), 10) || 0);\n\t\t\t});\n\n\t\tif (!group.length) { return; }\n\n\t\tmin = parseInt($(group[0]).css(\"zIndex\"), 10) || 0;\n\t\t$(group).each(function(i) {\n\t\t\t$(this).css(\"zIndex\", min + i);\n\t\t});\n\t\tthis.css(\"zIndex\", (min + group.length));\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"zIndex\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( ui.helper ),\n\t\t\to = instance.options;\n\n\t\tif (t.css(\"zIndex\")) {\n\t\t\to._zIndex = t.css(\"zIndex\");\n\t\t}\n\t\tt.css(\"zIndex\", o.zIndex);\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\n\t\tif (o._zIndex) {\n\t\t\t$(ui.helper).css(\"zIndex\", o._zIndex);\n\t\t}\n\t}\n});\n\nvar draggable = $.ui.draggable;\n\n\n/*!\n * jQuery UI Resizable 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/resizable/\n */\n\n\n$.widget(\"ui.resizable\", $.ui.mouse, {\n\tversion: \"1.11.4\",\n\twidgetEventPrefix: \"resize\",\n\toptions: {\n\t\talsoResize: false,\n\t\tanimate: false,\n\t\tanimateDuration: \"slow\",\n\t\tanimateEasing: \"swing\",\n\t\taspectRatio: false,\n\t\tautoHide: false,\n\t\tcontainment: false,\n\t\tghost: false,\n\t\tgrid: false,\n\t\thandles: \"e,s,se\",\n\t\thelper: false,\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 10,\n\t\tminWidth: 10,\n\t\t// See #7960\n\t\tzIndex: 90,\n\n\t\t// callbacks\n\t\tresize: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_num: function( value ) {\n\t\treturn parseInt( value, 10 ) || 0;\n\t},\n\n\t_isNumber: function( value ) {\n\t\treturn !isNaN( parseInt( value, 10 ) );\n\t},\n\n\t_hasScroll: function( el, a ) {\n\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\t_create: function() {\n\n\t\tvar n, i, handle, axis, hname,\n\t\t\tthat = this,\n\t\t\to = this.options;\n\t\tthis.element.addClass(\"ui-resizable\");\n\n\t\t$.extend(this, {\n\t\t\t_aspectRatio: !!(o.aspectRatio),\n\t\t\taspectRatio: o.aspectRatio,\n\t\t\toriginalElement: this.element,\n\t\t\t_proportionallyResizeElements: [],\n\t\t\t_helper: o.helper || o.ghost || o.animate ? o.helper || \"ui-resizable-helper\" : null\n\t\t});\n\n\t\t// Wrap the element if it cannot hold child nodes\n\t\tif (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) {\n\n\t\t\tthis.element.wrap(\n\t\t\t\t$(\"<div class='ui-wrapper' style='overflow: hidden;'></div>\").css({\n\t\t\t\t\tposition: this.element.css(\"position\"),\n\t\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\t\ttop: this.element.css(\"top\"),\n\t\t\t\t\tleft: this.element.css(\"left\")\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tthis.element = this.element.parent().data(\n\t\t\t\t\"ui-resizable\", this.element.resizable( \"instance\" )\n\t\t\t);\n\n\t\t\tthis.elementIsWrapper = true;\n\n\t\t\tthis.element.css({\n\t\t\t\tmarginLeft: this.originalElement.css(\"marginLeft\"),\n\t\t\t\tmarginTop: this.originalElement.css(\"marginTop\"),\n\t\t\t\tmarginRight: this.originalElement.css(\"marginRight\"),\n\t\t\t\tmarginBottom: this.originalElement.css(\"marginBottom\")\n\t\t\t});\n\t\t\tthis.originalElement.css({\n\t\t\t\tmarginLeft: 0,\n\t\t\t\tmarginTop: 0,\n\t\t\t\tmarginRight: 0,\n\t\t\t\tmarginBottom: 0\n\t\t\t});\n\t\t\t// support: Safari\n\t\t\t// Prevent Safari textarea resize\n\t\t\tthis.originalResizeStyle = this.originalElement.css(\"resize\");\n\t\t\tthis.originalElement.css(\"resize\", \"none\");\n\n\t\t\tthis._proportionallyResizeElements.push( this.originalElement.css({\n\t\t\t\tposition: \"static\",\n\t\t\t\tzoom: 1,\n\t\t\t\tdisplay: \"block\"\n\t\t\t}) );\n\n\t\t\t// support: IE9\n\t\t\t// avoid IE jump (hard set the margin)\n\t\t\tthis.originalElement.css({ margin: this.originalElement.css(\"margin\") });\n\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\tthis.handles = o.handles ||\n\t\t\t( !$(\".ui-resizable-handle\", this.element).length ?\n\t\t\t\t\"e,s,se\" : {\n\t\t\t\t\tn: \".ui-resizable-n\",\n\t\t\t\t\te: \".ui-resizable-e\",\n\t\t\t\t\ts: \".ui-resizable-s\",\n\t\t\t\t\tw: \".ui-resizable-w\",\n\t\t\t\t\tse: \".ui-resizable-se\",\n\t\t\t\t\tsw: \".ui-resizable-sw\",\n\t\t\t\t\tne: \".ui-resizable-ne\",\n\t\t\t\t\tnw: \".ui-resizable-nw\"\n\t\t\t\t} );\n\n\t\tthis._handles = $();\n\t\tif ( this.handles.constructor === String ) {\n\n\t\t\tif ( this.handles === \"all\") {\n\t\t\t\tthis.handles = \"n,e,s,w,se,sw,ne,nw\";\n\t\t\t}\n\n\t\t\tn = this.handles.split(\",\");\n\t\t\tthis.handles = {};\n\n\t\t\tfor (i = 0; i < n.length; i++) {\n\n\t\t\t\thandle = $.trim(n[i]);\n\t\t\t\thname = \"ui-resizable-\" + handle;\n\t\t\t\taxis = $(\"<div class='ui-resizable-handle \" + hname + \"'></div>\");\n\n\t\t\t\taxis.css({ zIndex: o.zIndex });\n\n\t\t\t\t// TODO : What's going on here?\n\t\t\t\tif (\"se\" === handle) {\n\t\t\t\t\taxis.addClass(\"ui-icon ui-icon-gripsmall-diagonal-se\");\n\t\t\t\t}\n\n\t\t\t\tthis.handles[handle] = \".ui-resizable-\" + handle;\n\t\t\t\tthis.element.append(axis);\n\t\t\t}\n\n\t\t}\n\n\t\tthis._renderAxis = function(target) {\n\n\t\t\tvar i, axis, padPos, padWrapper;\n\n\t\t\ttarget = target || this.element;\n\n\t\t\tfor (i in this.handles) {\n\n\t\t\t\tif (this.handles[i].constructor === String) {\n\t\t\t\t\tthis.handles[i] = this.element.children( this.handles[ i ] ).first().show();\n\t\t\t\t} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {\n\t\t\t\t\tthis.handles[ i ] = $( this.handles[ i ] );\n\t\t\t\t\tthis._on( this.handles[ i ], { \"mousedown\": that._mouseDown });\n\t\t\t\t}\n\n\t\t\t\tif (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) {\n\n\t\t\t\t\taxis = $(this.handles[i], this.element);\n\n\t\t\t\t\tpadWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();\n\n\t\t\t\t\tpadPos = [ \"padding\",\n\t\t\t\t\t\t/ne|nw|n/.test(i) ? \"Top\" :\n\t\t\t\t\t\t/se|sw|s/.test(i) ? \"Bottom\" :\n\t\t\t\t\t\t/^e$/.test(i) ? \"Right\" : \"Left\" ].join(\"\");\n\n\t\t\t\t\ttarget.css(padPos, padWrapper);\n\n\t\t\t\t\tthis._proportionallyResize();\n\t\t\t\t}\n\n\t\t\t\tthis._handles = this._handles.add( this.handles[ i ] );\n\t\t\t}\n\t\t};\n\n\t\t// TODO: make renderAxis a prototype function\n\t\tthis._renderAxis(this.element);\n\n\t\tthis._handles = this._handles.add( this.element.find( \".ui-resizable-handle\" ) );\n\t\tthis._handles.disableSelection();\n\n\t\tthis._handles.mouseover(function() {\n\t\t\tif (!that.resizing) {\n\t\t\t\tif (this.className) {\n\t\t\t\t\taxis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);\n\t\t\t\t}\n\t\t\t\tthat.axis = axis && axis[1] ? axis[1] : \"se\";\n\t\t\t}\n\t\t});\n\n\t\tif (o.autoHide) {\n\t\t\tthis._handles.hide();\n\t\t\t$(this.element)\n\t\t\t\t.addClass(\"ui-resizable-autohide\")\n\t\t\t\t.mouseenter(function() {\n\t\t\t\t\tif (o.disabled) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$(this).removeClass(\"ui-resizable-autohide\");\n\t\t\t\t\tthat._handles.show();\n\t\t\t\t})\n\t\t\t\t.mouseleave(function() {\n\t\t\t\t\tif (o.disabled) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (!that.resizing) {\n\t\t\t\t\t\t$(this).addClass(\"ui-resizable-autohide\");\n\t\t\t\t\t\tthat._handles.hide();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}\n\n\t\tthis._mouseInit();\n\t},\n\n\t_destroy: function() {\n\n\t\tthis._mouseDestroy();\n\n\t\tvar wrapper,\n\t\t\t_destroy = function(exp) {\n\t\t\t\t$(exp)\n\t\t\t\t\t.removeClass(\"ui-resizable ui-resizable-disabled ui-resizable-resizing\")\n\t\t\t\t\t.removeData(\"resizable\")\n\t\t\t\t\t.removeData(\"ui-resizable\")\n\t\t\t\t\t.unbind(\".resizable\")\n\t\t\t\t\t.find(\".ui-resizable-handle\")\n\t\t\t\t\t\t.remove();\n\t\t\t};\n\n\t\t// TODO: Unwrap at same DOM position\n\t\tif (this.elementIsWrapper) {\n\t\t\t_destroy(this.element);\n\t\t\twrapper = this.element;\n\t\t\tthis.originalElement.css({\n\t\t\t\tposition: wrapper.css(\"position\"),\n\t\t\t\twidth: wrapper.outerWidth(),\n\t\t\t\theight: wrapper.outerHeight(),\n\t\t\t\ttop: wrapper.css(\"top\"),\n\t\t\t\tleft: wrapper.css(\"left\")\n\t\t\t}).insertAfter( wrapper );\n\t\t\twrapper.remove();\n\t\t}\n\n\t\tthis.originalElement.css(\"resize\", this.originalResizeStyle);\n\t\t_destroy(this.originalElement);\n\n\t\treturn this;\n\t},\n\n\t_mouseCapture: function(event) {\n\t\tvar i, handle,\n\t\t\tcapture = false;\n\n\t\tfor (i in this.handles) {\n\t\t\thandle = $(this.handles[i])[0];\n\t\t\tif (handle === event.target || $.contains(handle, event.target)) {\n\t\t\t\tcapture = true;\n\t\t\t}\n\t\t}\n\n\t\treturn !this.options.disabled && capture;\n\t},\n\n\t_mouseStart: function(event) {\n\n\t\tvar curleft, curtop, cursor,\n\t\t\to = this.options,\n\t\t\tel = this.element;\n\n\t\tthis.resizing = true;\n\n\t\tthis._renderProxy();\n\n\t\tcurleft = this._num(this.helper.css(\"left\"));\n\t\tcurtop = this._num(this.helper.css(\"top\"));\n\n\t\tif (o.containment) {\n\t\t\tcurleft += $(o.containment).scrollLeft() || 0;\n\t\t\tcurtop += $(o.containment).scrollTop() || 0;\n\t\t}\n\n\t\tthis.offset = this.helper.offset();\n\t\tthis.position = { left: curleft, top: curtop };\n\n\t\tthis.size = this._helper ? {\n\t\t\t\twidth: this.helper.width(),\n\t\t\t\theight: this.helper.height()\n\t\t\t} : {\n\t\t\t\twidth: el.width(),\n\t\t\t\theight: el.height()\n\t\t\t};\n\n\t\tthis.originalSize = this._helper ? {\n\t\t\t\twidth: el.outerWidth(),\n\t\t\t\theight: el.outerHeight()\n\t\t\t} : {\n\t\t\t\twidth: el.width(),\n\t\t\t\theight: el.height()\n\t\t\t};\n\n\t\tthis.sizeDiff = {\n\t\t\twidth: el.outerWidth() - el.width(),\n\t\t\theight: el.outerHeight() - el.height()\n\t\t};\n\n\t\tthis.originalPosition = { left: curleft, top: curtop };\n\t\tthis.originalMousePosition = { left: event.pageX, top: event.pageY };\n\n\t\tthis.aspectRatio = (typeof o.aspectRatio === \"number\") ?\n\t\t\to.aspectRatio :\n\t\t\t((this.originalSize.width / this.originalSize.height) || 1);\n\n\t\tcursor = $(\".ui-resizable-\" + this.axis).css(\"cursor\");\n\t\t$(\"body\").css(\"cursor\", cursor === \"auto\" ? this.axis + \"-resize\" : cursor);\n\n\t\tel.addClass(\"ui-resizable-resizing\");\n\t\tthis._propagate(\"start\", event);\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function(event) {\n\n\t\tvar data, props,\n\t\t\tsmp = this.originalMousePosition,\n\t\t\ta = this.axis,\n\t\t\tdx = (event.pageX - smp.left) || 0,\n\t\t\tdy = (event.pageY - smp.top) || 0,\n\t\t\ttrigger = this._change[a];\n\n\t\tthis._updatePrevProperties();\n\n\t\tif (!trigger) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdata = trigger.apply(this, [ event, dx, dy ]);\n\n\t\tthis._updateVirtualBoundaries(event.shiftKey);\n\t\tif (this._aspectRatio || event.shiftKey) {\n\t\t\tdata = this._updateRatio(data, event);\n\t\t}\n\n\t\tdata = this._respectSize(data, event);\n\n\t\tthis._updateCache(data);\n\n\t\tthis._propagate(\"resize\", event);\n\n\t\tprops = this._applyChanges();\n\n\t\tif ( !this._helper && this._proportionallyResizeElements.length ) {\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\tif ( !$.isEmptyObject( props ) ) {\n\t\t\tthis._updatePrevProperties();\n\t\t\tthis._trigger( \"resize\", event, this.ui() );\n\t\t\tthis._applyChanges();\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\n\t\tthis.resizing = false;\n\t\tvar pr, ista, soffseth, soffsetw, s, left, top,\n\t\t\to = this.options, that = this;\n\n\t\tif (this._helper) {\n\n\t\t\tpr = this._proportionallyResizeElements;\n\t\t\tista = pr.length && (/textarea/i).test(pr[0].nodeName);\n\t\t\tsoffseth = ista && this._hasScroll(pr[0], \"left\") ? 0 : that.sizeDiff.height;\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width;\n\n\t\t\ts = {\n\t\t\t\twidth: (that.helper.width() - soffsetw),\n\t\t\t\theight: (that.helper.height() - soffseth)\n\t\t\t};\n\t\t\tleft = (parseInt(that.element.css(\"left\"), 10) +\n\t\t\t\t(that.position.left - that.originalPosition.left)) || null;\n\t\t\ttop = (parseInt(that.element.css(\"top\"), 10) +\n\t\t\t\t(that.position.top - that.originalPosition.top)) || null;\n\n\t\t\tif (!o.animate) {\n\t\t\t\tthis.element.css($.extend(s, { top: top, left: left }));\n\t\t\t}\n\n\t\t\tthat.helper.height(that.size.height);\n\t\t\tthat.helper.width(that.size.width);\n\n\t\t\tif (this._helper && !o.animate) {\n\t\t\t\tthis._proportionallyResize();\n\t\t\t}\n\t\t}\n\n\t\t$(\"body\").css(\"cursor\", \"auto\");\n\n\t\tthis.element.removeClass(\"ui-resizable-resizing\");\n\n\t\tthis._propagate(\"stop\", event);\n\n\t\tif (this._helper) {\n\t\t\tthis.helper.remove();\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\t_updatePrevProperties: function() {\n\t\tthis.prevPosition = {\n\t\t\ttop: this.position.top,\n\t\t\tleft: this.position.left\n\t\t};\n\t\tthis.prevSize = {\n\t\t\twidth: this.size.width,\n\t\t\theight: this.size.height\n\t\t};\n\t},\n\n\t_applyChanges: function() {\n\t\tvar props = {};\n\n\t\tif ( this.position.top !== this.prevPosition.top ) {\n\t\t\tprops.top = this.position.top + \"px\";\n\t\t}\n\t\tif ( this.position.left !== this.prevPosition.left ) {\n\t\t\tprops.left = this.position.left + \"px\";\n\t\t}\n\t\tif ( this.size.width !== this.prevSize.width ) {\n\t\t\tprops.width = this.size.width + \"px\";\n\t\t}\n\t\tif ( this.size.height !== this.prevSize.height ) {\n\t\t\tprops.height = this.size.height + \"px\";\n\t\t}\n\n\t\tthis.helper.css( props );\n\n\t\treturn props;\n\t},\n\n\t_updateVirtualBoundaries: function(forceAspectRatio) {\n\t\tvar pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,\n\t\t\to = this.options;\n\n\t\tb = {\n\t\t\tminWidth: this._isNumber(o.minWidth) ? o.minWidth : 0,\n\t\t\tmaxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : Infinity,\n\t\t\tminHeight: this._isNumber(o.minHeight) ? o.minHeight : 0,\n\t\t\tmaxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : Infinity\n\t\t};\n\n\t\tif (this._aspectRatio || forceAspectRatio) {\n\t\t\tpMinWidth = b.minHeight * this.aspectRatio;\n\t\t\tpMinHeight = b.minWidth / this.aspectRatio;\n\t\t\tpMaxWidth = b.maxHeight * this.aspectRatio;\n\t\t\tpMaxHeight = b.maxWidth / this.aspectRatio;\n\n\t\t\tif (pMinWidth > b.minWidth) {\n\t\t\t\tb.minWidth = pMinWidth;\n\t\t\t}\n\t\t\tif (pMinHeight > b.minHeight) {\n\t\t\t\tb.minHeight = pMinHeight;\n\t\t\t}\n\t\t\tif (pMaxWidth < b.maxWidth) {\n\t\t\t\tb.maxWidth = pMaxWidth;\n\t\t\t}\n\t\t\tif (pMaxHeight < b.maxHeight) {\n\t\t\t\tb.maxHeight = pMaxHeight;\n\t\t\t}\n\t\t}\n\t\tthis._vBoundaries = b;\n\t},\n\n\t_updateCache: function(data) {\n\t\tthis.offset = this.helper.offset();\n\t\tif (this._isNumber(data.left)) {\n\t\t\tthis.position.left = data.left;\n\t\t}\n\t\tif (this._isNumber(data.top)) {\n\t\t\tthis.position.top = data.top;\n\t\t}\n\t\tif (this._isNumber(data.height)) {\n\t\t\tthis.size.height = data.height;\n\t\t}\n\t\tif (this._isNumber(data.width)) {\n\t\t\tthis.size.width = data.width;\n\t\t}\n\t},\n\n\t_updateRatio: function( data ) {\n\n\t\tvar cpos = this.position,\n\t\t\tcsize = this.size,\n\t\t\ta = this.axis;\n\n\t\tif (this._isNumber(data.height)) {\n\t\t\tdata.width = (data.height * this.aspectRatio);\n\t\t} else if (this._isNumber(data.width)) {\n\t\t\tdata.height = (data.width / this.aspectRatio);\n\t\t}\n\n\t\tif (a === \"sw\") {\n\t\t\tdata.left = cpos.left + (csize.width - data.width);\n\t\t\tdata.top = null;\n\t\t}\n\t\tif (a === \"nw\") {\n\t\t\tdata.top = cpos.top + (csize.height - data.height);\n\t\t\tdata.left = cpos.left + (csize.width - data.width);\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_respectSize: function( data ) {\n\n\t\tvar o = this._vBoundaries,\n\t\t\ta = this.axis,\n\t\t\tismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width),\n\t\t\tismaxh = this._isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),\n\t\t\tisminw = this._isNumber(data.width) && o.minWidth && (o.minWidth > data.width),\n\t\t\tisminh = this._isNumber(data.height) && o.minHeight && (o.minHeight > data.height),\n\t\t\tdw = this.originalPosition.left + this.originalSize.width,\n\t\t\tdh = this.position.top + this.size.height,\n\t\t\tcw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);\n\t\tif (isminw) {\n\t\t\tdata.width = o.minWidth;\n\t\t}\n\t\tif (isminh) {\n\t\t\tdata.height = o.minHeight;\n\t\t}\n\t\tif (ismaxw) {\n\t\t\tdata.width = o.maxWidth;\n\t\t}\n\t\tif (ismaxh) {\n\t\t\tdata.height = o.maxHeight;\n\t\t}\n\n\t\tif (isminw && cw) {\n\t\t\tdata.left = dw - o.minWidth;\n\t\t}\n\t\tif (ismaxw && cw) {\n\t\t\tdata.left = dw - o.maxWidth;\n\t\t}\n\t\tif (isminh && ch) {\n\t\t\tdata.top = dh - o.minHeight;\n\t\t}\n\t\tif (ismaxh && ch) {\n\t\t\tdata.top = dh - o.maxHeight;\n\t\t}\n\n\t\t// Fixing jump error on top/left - bug #2330\n\t\tif (!data.width && !data.height && !data.left && data.top) {\n\t\t\tdata.top = null;\n\t\t} else if (!data.width && !data.height && !data.top && data.left) {\n\t\t\tdata.left = null;\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_getPaddingPlusBorderDimensions: function( element ) {\n\t\tvar i = 0,\n\t\t\twidths = [],\n\t\t\tborders = [\n\t\t\t\telement.css( \"borderTopWidth\" ),\n\t\t\t\telement.css( \"borderRightWidth\" ),\n\t\t\t\telement.css( \"borderBottomWidth\" ),\n\t\t\t\telement.css( \"borderLeftWidth\" )\n\t\t\t],\n\t\t\tpaddings = [\n\t\t\t\telement.css( \"paddingTop\" ),\n\t\t\t\telement.css( \"paddingRight\" ),\n\t\t\t\telement.css( \"paddingBottom\" ),\n\t\t\t\telement.css( \"paddingLeft\" )\n\t\t\t];\n\n\t\tfor ( ; i < 4; i++ ) {\n\t\t\twidths[ i ] = ( parseInt( borders[ i ], 10 ) || 0 );\n\t\t\twidths[ i ] += ( parseInt( paddings[ i ], 10 ) || 0 );\n\t\t}\n\n\t\treturn {\n\t\t\theight: widths[ 0 ] + widths[ 2 ],\n\t\t\twidth: widths[ 1 ] + widths[ 3 ]\n\t\t};\n\t},\n\n\t_proportionallyResize: function() {\n\n\t\tif (!this._proportionallyResizeElements.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar prel,\n\t\t\ti = 0,\n\t\t\telement = this.helper || this.element;\n\n\t\tfor ( ; i < this._proportionallyResizeElements.length; i++) {\n\n\t\t\tprel = this._proportionallyResizeElements[i];\n\n\t\t\t// TODO: Seems like a bug to cache this.outerDimensions\n\t\t\t// considering that we are in a loop.\n\t\t\tif (!this.outerDimensions) {\n\t\t\t\tthis.outerDimensions = this._getPaddingPlusBorderDimensions( prel );\n\t\t\t}\n\n\t\t\tprel.css({\n\t\t\t\theight: (element.height() - this.outerDimensions.height) || 0,\n\t\t\t\twidth: (element.width() - this.outerDimensions.width) || 0\n\t\t\t});\n\n\t\t}\n\n\t},\n\n\t_renderProxy: function() {\n\n\t\tvar el = this.element, o = this.options;\n\t\tthis.elementOffset = el.offset();\n\n\t\tif (this._helper) {\n\n\t\t\tthis.helper = this.helper || $(\"<div style='overflow:hidden;'></div>\");\n\n\t\t\tthis.helper.addClass(this._helper).css({\n\t\t\t\twidth: this.element.outerWidth() - 1,\n\t\t\t\theight: this.element.outerHeight() - 1,\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tleft: this.elementOffset.left + \"px\",\n\t\t\t\ttop: this.elementOffset.top + \"px\",\n\t\t\t\tzIndex: ++o.zIndex //TODO: Don't modify option\n\t\t\t});\n\n\t\t\tthis.helper\n\t\t\t\t.appendTo(\"body\")\n\t\t\t\t.disableSelection();\n\n\t\t} else {\n\t\t\tthis.helper = this.element;\n\t\t}\n\n\t},\n\n\t_change: {\n\t\te: function(event, dx) {\n\t\t\treturn { width: this.originalSize.width + dx };\n\t\t},\n\t\tw: function(event, dx) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { left: sp.left + dx, width: cs.width - dx };\n\t\t},\n\t\tn: function(event, dx, dy) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { top: sp.top + dy, height: cs.height - dy };\n\t\t},\n\t\ts: function(event, dx, dy) {\n\t\t\treturn { height: this.originalSize.height + dy };\n\t\t},\n\t\tse: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.s.apply(this, arguments),\n\t\t\t\tthis._change.e.apply(this, [ event, dx, dy ]));\n\t\t},\n\t\tsw: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.s.apply(this, arguments),\n\t\t\t\tthis._change.w.apply(this, [ event, dx, dy ]));\n\t\t},\n\t\tne: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.n.apply(this, arguments),\n\t\t\t\tthis._change.e.apply(this, [ event, dx, dy ]));\n\t\t},\n\t\tnw: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.n.apply(this, arguments),\n\t\t\t\tthis._change.w.apply(this, [ event, dx, dy ]));\n\t\t}\n\t},\n\n\t_propagate: function(n, event) {\n\t\t$.ui.plugin.call(this, n, [ event, this.ui() ]);\n\t\t(n !== \"resize\" && this._trigger(n, event, this.ui()));\n\t},\n\n\tplugins: {},\n\n\tui: function() {\n\t\treturn {\n\t\t\toriginalElement: this.originalElement,\n\t\t\telement: this.element,\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\tsize: this.size,\n\t\t\toriginalSize: this.originalSize,\n\t\t\toriginalPosition: this.originalPosition\n\t\t};\n\t}\n\n});\n\n/*\n * Resizable Extensions\n */\n\n$.ui.plugin.add(\"resizable\", \"animate\", {\n\n\tstop: function( event ) {\n\t\tvar that = $(this).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tpr = that._proportionallyResizeElements,\n\t\t\tista = pr.length && (/textarea/i).test(pr[0].nodeName),\n\t\t\tsoffseth = ista && that._hasScroll(pr[0], \"left\") ? 0 : that.sizeDiff.height,\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width,\n\t\t\tstyle = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },\n\t\t\tleft = (parseInt(that.element.css(\"left\"), 10) +\n\t\t\t\t(that.position.left - that.originalPosition.left)) || null,\n\t\t\ttop = (parseInt(that.element.css(\"top\"), 10) +\n\t\t\t\t(that.position.top - that.originalPosition.top)) || null;\n\n\t\tthat.element.animate(\n\t\t\t$.extend(style, top && left ? { top: top, left: left } : {}), {\n\t\t\t\tduration: o.animateDuration,\n\t\t\t\teasing: o.animateEasing,\n\t\t\t\tstep: function() {\n\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\twidth: parseInt(that.element.css(\"width\"), 10),\n\t\t\t\t\t\theight: parseInt(that.element.css(\"height\"), 10),\n\t\t\t\t\t\ttop: parseInt(that.element.css(\"top\"), 10),\n\t\t\t\t\t\tleft: parseInt(that.element.css(\"left\"), 10)\n\t\t\t\t\t};\n\n\t\t\t\t\tif (pr && pr.length) {\n\t\t\t\t\t\t$(pr[0]).css({ width: data.width, height: data.height });\n\t\t\t\t\t}\n\n\t\t\t\t\t// propagating resize, and updating values for each animation step\n\t\t\t\t\tthat._updateCache(data);\n\t\t\t\t\tthat._propagate(\"resize\", event);\n\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n});\n\n$.ui.plugin.add( \"resizable\", \"containment\", {\n\n\tstart: function() {\n\t\tvar element, p, co, ch, cw, width, height,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tel = that.element,\n\t\t\toc = o.containment,\n\t\t\tce = ( oc instanceof $ ) ? oc.get( 0 ) : ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;\n\n\t\tif ( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthat.containerElement = $( ce );\n\n\t\tif ( /document/.test( oc ) || oc === document ) {\n\t\t\tthat.containerOffset = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t};\n\t\t\tthat.containerPosition = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t};\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: $( document ),\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0,\n\t\t\t\twidth: $( document ).width(),\n\t\t\t\theight: $( document ).height() || document.body.parentNode.scrollHeight\n\t\t\t};\n\t\t} else {\n\t\t\telement = $( ce );\n\t\t\tp = [];\n\t\t\t$([ \"Top\", \"Right\", \"Left\", \"Bottom\" ]).each(function( i, name ) {\n\t\t\t\tp[ i ] = that._num( element.css( \"padding\" + name ) );\n\t\t\t});\n\n\t\t\tthat.containerOffset = element.offset();\n\t\t\tthat.containerPosition = element.position();\n\t\t\tthat.containerSize = {\n\t\t\t\theight: ( element.innerHeight() - p[ 3 ] ),\n\t\t\t\twidth: ( element.innerWidth() - p[ 1 ] )\n\t\t\t};\n\n\t\t\tco = that.containerOffset;\n\t\t\tch = that.containerSize.height;\n\t\t\tcw = that.containerSize.width;\n\t\t\twidth = ( that._hasScroll ( ce, \"left\" ) ? ce.scrollWidth : cw );\n\t\t\theight = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: ce,\n\t\t\t\tleft: co.left,\n\t\t\t\ttop: co.top,\n\t\t\t\twidth: width,\n\t\t\t\theight: height\n\t\t\t};\n\t\t}\n\t},\n\n\tresize: function( event ) {\n\t\tvar woset, hoset, isParent, isOffsetRelative,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcp = that.position,\n\t\t\tpRatio = that._aspectRatio || event.shiftKey,\n\t\t\tcop = {\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0\n\t\t\t},\n\t\t\tce = that.containerElement,\n\t\t\tcontinueResize = true;\n\n\t\tif ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\tcop = co;\n\t\t}\n\n\t\tif ( cp.left < ( that._helper ? co.left : 0 ) ) {\n\t\t\tthat.size.width = that.size.width +\n\t\t\t\t( that._helper ?\n\t\t\t\t\t( that.position.left - co.left ) :\n\t\t\t\t\t( that.position.left - cop.left ) );\n\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t\tthat.position.left = o.helper ? co.left : 0;\n\t\t}\n\n\t\tif ( cp.top < ( that._helper ? co.top : 0 ) ) {\n\t\t\tthat.size.height = that.size.height +\n\t\t\t\t( that._helper ?\n\t\t\t\t\t( that.position.top - co.top ) :\n\t\t\t\t\tthat.position.top );\n\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t\tthat.position.top = that._helper ? co.top : 0;\n\t\t}\n\n\t\tisParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );\n\t\tisOffsetRelative = /relative|absolute/.test( that.containerElement.css( \"position\" ) );\n\n\t\tif ( isParent && isOffsetRelative ) {\n\t\t\tthat.offset.left = that.parentData.left + that.position.left;\n\t\t\tthat.offset.top = that.parentData.top + that.position.top;\n\t\t} else {\n\t\t\tthat.offset.left = that.element.offset().left;\n\t\t\tthat.offset.top = that.element.offset().top;\n\t\t}\n\n\t\twoset = Math.abs( that.sizeDiff.width +\n\t\t\t(that._helper ?\n\t\t\t\tthat.offset.left - cop.left :\n\t\t\t\t(that.offset.left - co.left)) );\n\n\t\thoset = Math.abs( that.sizeDiff.height +\n\t\t\t(that._helper ?\n\t\t\t\tthat.offset.top - cop.top :\n\t\t\t\t(that.offset.top - co.top)) );\n\n\t\tif ( woset + that.size.width >= that.parentData.width ) {\n\t\t\tthat.size.width = that.parentData.width - woset;\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( hoset + that.size.height >= that.parentData.height ) {\n\t\t\tthat.size.height = that.parentData.height - hoset;\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( !continueResize ) {\n\t\t\tthat.position.left = that.prevPosition.left;\n\t\t\tthat.position.top = that.prevPosition.top;\n\t\t\tthat.size.width = that.prevSize.width;\n\t\t\tthat.size.height = that.prevSize.height;\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcop = that.containerPosition,\n\t\t\tce = that.containerElement,\n\t\t\thelper = $( that.helper ),\n\t\t\tho = helper.offset(),\n\t\t\tw = helper.outerWidth() - that.sizeDiff.width,\n\t\t\th = helper.outerHeight() - that.sizeDiff.height;\n\n\t\tif ( that._helper && !o.animate && ( /relative/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\t$( this ).css({\n\t\t\t\tleft: ho.left - cop.left - co.left,\n\t\t\t\twidth: w,\n\t\t\t\theight: h\n\t\t\t});\n\t\t}\n\n\t\tif ( that._helper && !o.animate && ( /static/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\t$( this ).css({\n\t\t\t\tleft: ho.left - cop.left - co.left,\n\t\t\t\twidth: w,\n\t\t\t\theight: h\n\t\t\t});\n\t\t}\n\t}\n});\n\n$.ui.plugin.add(\"resizable\", \"alsoResize\", {\n\n\tstart: function() {\n\t\tvar that = $(this).resizable( \"instance\" ),\n\t\t\to = that.options;\n\n\t\t$(o.alsoResize).each(function() {\n\t\t\tvar el = $(this);\n\t\t\tel.data(\"ui-resizable-alsoresize\", {\n\t\t\t\twidth: parseInt(el.width(), 10), height: parseInt(el.height(), 10),\n\t\t\t\tleft: parseInt(el.css(\"left\"), 10), top: parseInt(el.css(\"top\"), 10)\n\t\t\t});\n\t\t});\n\t},\n\n\tresize: function(event, ui) {\n\t\tvar that = $(this).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\tdelta = {\n\t\t\t\theight: (that.size.height - os.height) || 0,\n\t\t\t\twidth: (that.size.width - os.width) || 0,\n\t\t\t\ttop: (that.position.top - op.top) || 0,\n\t\t\t\tleft: (that.position.left - op.left) || 0\n\t\t\t};\n\n\t\t\t$(o.alsoResize).each(function() {\n\t\t\t\tvar el = $(this), start = $(this).data(\"ui-resizable-alsoresize\"), style = {},\n\t\t\t\t\tcss = el.parents(ui.originalElement[0]).length ?\n\t\t\t\t\t\t\t[ \"width\", \"height\" ] :\n\t\t\t\t\t\t\t[ \"width\", \"height\", \"top\", \"left\" ];\n\n\t\t\t\t$.each(css, function(i, prop) {\n\t\t\t\t\tvar sum = (start[prop] || 0) + (delta[prop] || 0);\n\t\t\t\t\tif (sum && sum >= 0) {\n\t\t\t\t\t\tstyle[prop] = sum || null;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tel.css(style);\n\t\t\t});\n\t},\n\n\tstop: function() {\n\t\t$(this).removeData(\"resizable-alsoresize\");\n\t}\n});\n\n$.ui.plugin.add(\"resizable\", \"ghost\", {\n\n\tstart: function() {\n\n\t\tvar that = $(this).resizable( \"instance\" ), o = that.options, cs = that.size;\n\n\t\tthat.ghost = that.originalElement.clone();\n\t\tthat.ghost\n\t\t\t.css({\n\t\t\t\topacity: 0.25,\n\t\t\t\tdisplay: \"block\",\n\t\t\t\tposition: \"relative\",\n\t\t\t\theight: cs.height,\n\t\t\t\twidth: cs.width,\n\t\t\t\tmargin: 0,\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t})\n\t\t\t.addClass(\"ui-resizable-ghost\")\n\t\t\t.addClass(typeof o.ghost === \"string\" ? o.ghost : \"\");\n\n\t\tthat.ghost.appendTo(that.helper);\n\n\t},\n\n\tresize: function() {\n\t\tvar that = $(this).resizable( \"instance\" );\n\t\tif (that.ghost) {\n\t\t\tthat.ghost.css({\n\t\t\t\tposition: \"relative\",\n\t\t\t\theight: that.size.height,\n\t\t\t\twidth: that.size.width\n\t\t\t});\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $(this).resizable( \"instance\" );\n\t\tif (that.ghost && that.helper) {\n\t\t\tthat.helper.get(0).removeChild(that.ghost.get(0));\n\t\t}\n\t}\n\n});\n\n$.ui.plugin.add(\"resizable\", \"grid\", {\n\n\tresize: function() {\n\t\tvar outerDimensions,\n\t\t\tthat = $(this).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tcs = that.size,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\ta = that.axis,\n\t\t\tgrid = typeof o.grid === \"number\" ? [ o.grid, o.grid ] : o.grid,\n\t\t\tgridX = (grid[0] || 1),\n\t\t\tgridY = (grid[1] || 1),\n\t\t\tox = Math.round((cs.width - os.width) / gridX) * gridX,\n\t\t\toy = Math.round((cs.height - os.height) / gridY) * gridY,\n\t\t\tnewWidth = os.width + ox,\n\t\t\tnewHeight = os.height + oy,\n\t\t\tisMaxWidth = o.maxWidth && (o.maxWidth < newWidth),\n\t\t\tisMaxHeight = o.maxHeight && (o.maxHeight < newHeight),\n\t\t\tisMinWidth = o.minWidth && (o.minWidth > newWidth),\n\t\t\tisMinHeight = o.minHeight && (o.minHeight > newHeight);\n\n\t\to.grid = grid;\n\n\t\tif (isMinWidth) {\n\t\t\tnewWidth += gridX;\n\t\t}\n\t\tif (isMinHeight) {\n\t\t\tnewHeight += gridY;\n\t\t}\n\t\tif (isMaxWidth) {\n\t\t\tnewWidth -= gridX;\n\t\t}\n\t\tif (isMaxHeight) {\n\t\t\tnewHeight -= gridY;\n\t\t}\n\n\t\tif (/^(se|s|e)$/.test(a)) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t} else if (/^(ne)$/.test(a)) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.top = op.top - oy;\n\t\t} else if (/^(sw)$/.test(a)) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.left = op.left - ox;\n\t\t} else {\n\t\t\tif ( newHeight - gridY <= 0 || newWidth - gridX <= 0) {\n\t\t\t\touterDimensions = that._getPaddingPlusBorderDimensions( this );\n\t\t\t}\n\n\t\t\tif ( newHeight - gridY > 0 ) {\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top - oy;\n\t\t\t} else {\n\t\t\t\tnewHeight = gridY - outerDimensions.height;\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top + os.height - newHeight;\n\t\t\t}\n\t\t\tif ( newWidth - gridX > 0 ) {\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.position.left = op.left - ox;\n\t\t\t} else {\n\t\t\t\tnewWidth = gridX - outerDimensions.width;\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.position.left = op.left + os.width - newWidth;\n\t\t\t}\n\t\t}\n\t}\n\n});\n\nvar resizable = $.ui.resizable;\n\n\n/*!\n * jQuery UI Dialog 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/dialog/\n */\n\n\nvar dialog = $.widget( \"ui.dialog\", {\n\tversion: \"1.11.4\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoOpen: true,\n\t\tbuttons: [],\n\t\tcloseOnEscape: true,\n\t\tcloseText: \"Close\",\n\t\tdialogClass: \"\",\n\t\tdraggable: true,\n\t\thide: null,\n\t\theight: \"auto\",\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 150,\n\t\tminWidth: 150,\n\t\tmodal: false,\n\t\tposition: {\n\t\t\tmy: \"center\",\n\t\t\tat: \"center\",\n\t\t\tof: window,\n\t\t\tcollision: \"fit\",\n\t\t\t// Ensure the titlebar is always visible\n\t\t\tusing: function( pos ) {\n\t\t\t\tvar topOffset = $( this ).css( pos ).offset().top;\n\t\t\t\tif ( topOffset < 0 ) {\n\t\t\t\t\t$( this ).css( \"top\", pos.top - topOffset );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tresizable: true,\n\t\tshow: null,\n\t\ttitle: null,\n\t\twidth: 300,\n\n\t\t// callbacks\n\t\tbeforeClose: null,\n\t\tclose: null,\n\t\tdrag: null,\n\t\tdragStart: null,\n\t\tdragStop: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresize: null,\n\t\tresizeStart: null,\n\t\tresizeStop: null\n\t},\n\n\tsizeRelatedOptions: {\n\t\tbuttons: true,\n\t\theight: true,\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true,\n\t\twidth: true\n\t},\n\n\tresizableRelatedOptions: {\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true\n\t},\n\n\t_create: function() {\n\t\tthis.originalCss = {\n\t\t\tdisplay: this.element[ 0 ].style.display,\n\t\t\twidth: this.element[ 0 ].style.width,\n\t\t\tminHeight: this.element[ 0 ].style.minHeight,\n\t\t\tmaxHeight: this.element[ 0 ].style.maxHeight,\n\t\t\theight: this.element[ 0 ].style.height\n\t\t};\n\t\tthis.originalPosition = {\n\t\t\tparent: this.element.parent(),\n\t\t\tindex: this.element.parent().children().index( this.element )\n\t\t};\n\t\tthis.originalTitle = this.element.attr( \"title\" );\n\t\tthis.options.title = this.options.title || this.originalTitle;\n\n\t\tthis._createWrapper();\n\n\t\tthis.element\n\t\t\t.show()\n\t\t\t.removeAttr( \"title\" )\n\t\t\t.addClass( \"ui-dialog-content ui-widget-content\" )\n\t\t\t.appendTo( this.uiDialog );\n\n\t\tthis._createTitlebar();\n\t\tthis._createButtonPane();\n\n\t\tif ( this.options.draggable && $.fn.draggable ) {\n\t\t\tthis._makeDraggable();\n\t\t}\n\t\tif ( this.options.resizable && $.fn.resizable ) {\n\t\t\tthis._makeResizable();\n\t\t}\n\n\t\tthis._isOpen = false;\n\n\t\tthis._trackFocus();\n\t},\n\n\t_init: function() {\n\t\tif ( this.options.autoOpen ) {\n\t\t\tthis.open();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\t\tif ( element && (element.jquery || element.nodeType) ) {\n\t\t\treturn $( element );\n\t\t}\n\t\treturn this.document.find( element || \"body\" ).eq( 0 );\n\t},\n\n\t_destroy: function() {\n\t\tvar next,\n\t\t\toriginalPosition = this.originalPosition;\n\n\t\tthis._untrackInstance();\n\t\tthis._destroyOverlay();\n\n\t\tthis.element\n\t\t\t.removeUniqueId()\n\t\t\t.removeClass( \"ui-dialog-content ui-widget-content\" )\n\t\t\t.css( this.originalCss )\n\t\t\t// Without detaching first, the following becomes really slow\n\t\t\t.detach();\n\n\t\tthis.uiDialog.stop( true, true ).remove();\n\n\t\tif ( this.originalTitle ) {\n\t\t\tthis.element.attr( \"title\", this.originalTitle );\n\t\t}\n\n\t\tnext = originalPosition.parent.children().eq( originalPosition.index );\n\t\t// Don't try to place the dialog next to itself (#8613)\n\t\tif ( next.length && next[ 0 ] !== this.element[ 0 ] ) {\n\t\t\tnext.before( this.element );\n\t\t} else {\n\t\t\toriginalPosition.parent.append( this.element );\n\t\t}\n\t},\n\n\twidget: function() {\n\t\treturn this.uiDialog;\n\t},\n\n\tdisable: $.noop,\n\tenable: $.noop,\n\n\tclose: function( event ) {\n\t\tvar activeElement,\n\t\t\tthat = this;\n\n\t\tif ( !this._isOpen || this._trigger( \"beforeClose\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = false;\n\t\tthis._focusedElement = null;\n\t\tthis._destroyOverlay();\n\t\tthis._untrackInstance();\n\n\t\tif ( !this.opener.filter( \":focusable\" ).focus().length ) {\n\n\t\t\t// support: IE9\n\t\t\t// IE9 throws an \"Unspecified error\" accessing document.activeElement from an <iframe>\n\t\t\ttry {\n\t\t\t\tactiveElement = this.document[ 0 ].activeElement;\n\n\t\t\t\t// Support: IE9, IE10\n\t\t\t\t// If the <body> is blurred, IE will switch windows, see #4520\n\t\t\t\tif ( activeElement && activeElement.nodeName.toLowerCase() !== \"body\" ) {\n\n\t\t\t\t\t// Hiding a focused element doesn't trigger blur in WebKit\n\t\t\t\t\t// so in case we have nothing to focus on, explicitly blur the active element\n\t\t\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=47182\n\t\t\t\t\t$( activeElement ).blur();\n\t\t\t\t}\n\t\t\t} catch ( error ) {}\n\t\t}\n\n\t\tthis._hide( this.uiDialog, this.options.hide, function() {\n\t\t\tthat._trigger( \"close\", event );\n\t\t});\n\t},\n\n\tisOpen: function() {\n\t\treturn this._isOpen;\n\t},\n\n\tmoveToTop: function() {\n\t\tthis._moveToTop();\n\t},\n\n\t_moveToTop: function( event, silent ) {\n\t\tvar moved = false,\n\t\t\tzIndices = this.uiDialog.siblings( \".ui-front:visible\" ).map(function() {\n\t\t\t\treturn +$( this ).css( \"z-index\" );\n\t\t\t}).get(),\n\t\t\tzIndexMax = Math.max.apply( null, zIndices );\n\n\t\tif ( zIndexMax >= +this.uiDialog.css( \"z-index\" ) ) {\n\t\t\tthis.uiDialog.css( \"z-index\", zIndexMax + 1 );\n\t\t\tmoved = true;\n\t\t}\n\n\t\tif ( moved && !silent ) {\n\t\t\tthis._trigger( \"focus\", event );\n\t\t}\n\t\treturn moved;\n\t},\n\n\topen: function() {\n\t\tvar that = this;\n\t\tif ( this._isOpen ) {\n\t\t\tif ( this._moveToTop() ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = true;\n\t\tthis.opener = $( this.document[ 0 ].activeElement );\n\n\t\tthis._size();\n\t\tthis._position();\n\t\tthis._createOverlay();\n\t\tthis._moveToTop( null, true );\n\n\t\t// Ensure the overlay is moved to the top with the dialog, but only when\n\t\t// opening. The overlay shouldn't move after the dialog is open so that\n\t\t// modeless dialogs opened after the modal dialog stack properly.\n\t\tif ( this.overlay ) {\n\t\t\tthis.overlay.css( \"z-index\", this.uiDialog.css( \"z-index\" ) - 1 );\n\t\t}\n\n\t\tthis._show( this.uiDialog, this.options.show, function() {\n\t\t\tthat._focusTabbable();\n\t\t\tthat._trigger( \"focus\" );\n\t\t});\n\n\t\t// Track the dialog immediately upon openening in case a focus event\n\t\t// somehow occurs outside of the dialog before an element inside the\n\t\t// dialog is focused (#10152)\n\t\tthis._makeFocusTarget();\n\n\t\tthis._trigger( \"open\" );\n\t},\n\n\t_focusTabbable: function() {\n\t\t// Set focus to the first match:\n\t\t// 1. An element that was focused previously\n\t\t// 2. First element inside the dialog matching [autofocus]\n\t\t// 3. Tabbable element inside the content element\n\t\t// 4. Tabbable element inside the buttonpane\n\t\t// 5. The close button\n\t\t// 6. The dialog itself\n\t\tvar hasFocus = this._focusedElement;\n\t\tif ( !hasFocus ) {\n\t\t\thasFocus = this.element.find( \"[autofocus]\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.element.find( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogButtonPane.find( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogTitlebarClose.filter( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialog;\n\t\t}\n\t\thasFocus.eq( 0 ).focus();\n\t},\n\n\t_keepFocus: function( event ) {\n\t\tfunction checkFocus() {\n\t\t\tvar activeElement = this.document[0].activeElement,\n\t\t\t\tisActive = this.uiDialog[0] === activeElement ||\n\t\t\t\t\t$.contains( this.uiDialog[0], activeElement );\n\t\t\tif ( !isActive ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t}\n\t\tevent.preventDefault();\n\t\tcheckFocus.call( this );\n\t\t// support: IE\n\t\t// IE <= 8 doesn't prevent moving focus even with event.preventDefault()\n\t\t// so we check again later\n\t\tthis._delay( checkFocus );\n\t},\n\n\t_createWrapper: function() {\n\t\tthis.uiDialog = $(\"<div>\")\n\t\t\t.addClass( \"ui-dialog ui-widget ui-widget-content ui-corner-all ui-front \" +\n\t\t\t\tthis.options.dialogClass )\n\t\t\t.hide()\n\t\t\t.attr({\n\t\t\t\t// Setting tabIndex makes the div focusable\n\t\t\t\ttabIndex: -1,\n\t\t\t\trole: \"dialog\"\n\t\t\t})\n\t\t\t.appendTo( this._appendTo() );\n\n\t\tthis._on( this.uiDialog, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\tif ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&\n\t\t\t\t\t\tevent.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.close( event );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// prevent tabbing out of dialogs\n\t\t\t\tif ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar tabbables = this.uiDialog.find( \":tabbable\" ),\n\t\t\t\t\tfirst = tabbables.filter( \":first\" ),\n\t\t\t\t\tlast = tabbables.filter( \":last\" );\n\n\t\t\t\tif ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tfirst.focus();\n\t\t\t\t\t});\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tlast.focus();\n\t\t\t\t\t});\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\tmousedown: function( event ) {\n\t\t\t\tif ( this._moveToTop( event ) ) {\n\t\t\t\t\tthis._focusTabbable();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// We assume that any existing aria-describedby attribute means\n\t\t// that the dialog content is marked up properly\n\t\t// otherwise we brute force the content as the description\n\t\tif ( !this.element.find( \"[aria-describedby]\" ).length ) {\n\t\t\tthis.uiDialog.attr({\n\t\t\t\t\"aria-describedby\": this.element.uniqueId().attr( \"id\" )\n\t\t\t});\n\t\t}\n\t},\n\n\t_createTitlebar: function() {\n\t\tvar uiDialogTitle;\n\n\t\tthis.uiDialogTitlebar = $( \"<div>\" )\n\t\t\t.addClass( \"ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix\" )\n\t\t\t.prependTo( this.uiDialog );\n\t\tthis._on( this.uiDialogTitlebar, {\n\t\t\tmousedown: function( event ) {\n\t\t\t\t// Don't prevent click on close button (#8838)\n\t\t\t\t// Focusing a dialog that is partially scrolled out of view\n\t\t\t\t// causes the browser to scroll it into view, preventing the click event\n\t\t\t\tif ( !$( event.target ).closest( \".ui-dialog-titlebar-close\" ) ) {\n\t\t\t\t\t// Dialog isn't getting focus when dragging (#8063)\n\t\t\t\t\tthis.uiDialog.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// support: IE\n\t\t// Use type=\"button\" to prevent enter keypresses in textboxes from closing the\n\t\t// dialog in IE (#9312)\n\t\tthis.uiDialogTitlebarClose = $( \"<button type='button'></button>\" )\n\t\t\t.button({\n\t\t\t\tlabel: this.options.closeText,\n\t\t\t\ticons: {\n\t\t\t\t\tprimary: \"ui-icon-closethick\"\n\t\t\t\t},\n\t\t\t\ttext: false\n\t\t\t})\n\t\t\t.addClass( \"ui-dialog-titlebar-close\" )\n\t\t\t.appendTo( this.uiDialogTitlebar );\n\t\tthis._on( this.uiDialogTitlebarClose, {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.close( event );\n\t\t\t}\n\t\t});\n\n\t\tuiDialogTitle = $( \"<span>\" )\n\t\t\t.uniqueId()\n\t\t\t.addClass( \"ui-dialog-title\" )\n\t\t\t.prependTo( this.uiDialogTitlebar );\n\t\tthis._title( uiDialogTitle );\n\n\t\tthis.uiDialog.attr({\n\t\t\t\"aria-labelledby\": uiDialogTitle.attr( \"id\" )\n\t\t});\n\t},\n\n\t_title: function( title ) {\n\t\tif ( !this.options.title ) {\n\t\t\ttitle.html( \" \" );\n\t\t}\n\t\ttitle.text( this.options.title );\n\t},\n\n\t_createButtonPane: function() {\n\t\tthis.uiDialogButtonPane = $( \"<div>\" )\n\t\t\t.addClass( \"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix\" );\n\n\t\tthis.uiButtonSet = $( \"<div>\" )\n\t\t\t.addClass( \"ui-dialog-buttonset\" )\n\t\t\t.appendTo( this.uiDialogButtonPane );\n\n\t\tthis._createButtons();\n\t},\n\n\t_createButtons: function() {\n\t\tvar that = this,\n\t\t\tbuttons = this.options.buttons;\n\n\t\t// if we already have a button pane, remove it\n\t\tthis.uiDialogButtonPane.remove();\n\t\tthis.uiButtonSet.empty();\n\n\t\tif ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {\n\t\t\tthis.uiDialog.removeClass( \"ui-dialog-buttons\" );\n\t\t\treturn;\n\t\t}\n\n\t\t$.each( buttons, function( name, props ) {\n\t\t\tvar click, buttonOptions;\n\t\t\tprops = $.isFunction( props ) ?\n\t\t\t\t{ click: props, text: name } :\n\t\t\t\tprops;\n\t\t\t// Default to a non-submitting button\n\t\t\tprops = $.extend( { type: \"button\" }, props );\n\t\t\t// Change the context for the click callback to be the main element\n\t\t\tclick = props.click;\n\t\t\tprops.click = function() {\n\t\t\t\tclick.apply( that.element[ 0 ], arguments );\n\t\t\t};\n\t\t\tbuttonOptions = {\n\t\t\t\ticons: props.icons,\n\t\t\t\ttext: props.showText\n\t\t\t};\n\t\t\tdelete props.icons;\n\t\t\tdelete props.showText;\n\t\t\t$( \"<button></button>\", props )\n\t\t\t\t.button( buttonOptions )\n\t\t\t\t.appendTo( that.uiButtonSet );\n\t\t});\n\t\tthis.uiDialog.addClass( \"ui-dialog-buttons\" );\n\t\tthis.uiDialogButtonPane.appendTo( this.uiDialog );\n\t},\n\n\t_makeDraggable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\tposition: ui.position,\n\t\t\t\toffset: ui.offset\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.draggable({\n\t\t\tcancel: \".ui-dialog-content, .ui-dialog-titlebar-close\",\n\t\t\thandle: \".ui-dialog-titlebar\",\n\t\t\tcontainment: \"document\",\n\t\t\tstart: function( event, ui ) {\n\t\t\t\t$( this ).addClass( \"ui-dialog-dragging\" );\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"dragStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tdrag: function( event, ui ) {\n\t\t\t\tthat._trigger( \"drag\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\tvar left = ui.offset.left - that.document.scrollLeft(),\n\t\t\t\t\ttop = ui.offset.top - that.document.scrollTop();\n\n\t\t\t\toptions.position = {\n\t\t\t\t\tmy: \"left top\",\n\t\t\t\t\tat: \"left\" + (left >= 0 ? \"+\" : \"\") + left + \" \" +\n\t\t\t\t\t\t\"top\" + (top >= 0 ? \"+\" : \"\") + top,\n\t\t\t\t\tof: that.window\n\t\t\t\t};\n\t\t\t\t$( this ).removeClass( \"ui-dialog-dragging\" );\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"dragStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t});\n\t},\n\n\t_makeResizable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options,\n\t\t\thandles = options.resizable,\n\t\t\t// .ui-resizable has position: relative defined in the stylesheet\n\t\t\t// but dialogs have to use absolute or fixed positioning\n\t\t\tposition = this.uiDialog.css(\"position\"),\n\t\t\tresizeHandles = typeof handles === \"string\" ?\n\t\t\t\thandles\t:\n\t\t\t\t\"n,e,s,w,se,sw,ne,nw\";\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\toriginalPosition: ui.originalPosition,\n\t\t\t\toriginalSize: ui.originalSize,\n\t\t\t\tposition: ui.position,\n\t\t\t\tsize: ui.size\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.resizable({\n\t\t\tcancel: \".ui-dialog-content\",\n\t\t\tcontainment: \"document\",\n\t\t\talsoResize: this.element,\n\t\t\tmaxWidth: options.maxWidth,\n\t\t\tmaxHeight: options.maxHeight,\n\t\t\tminWidth: options.minWidth,\n\t\t\tminHeight: this._minHeight(),\n\t\t\thandles: resizeHandles,\n\t\t\tstart: function( event, ui ) {\n\t\t\t\t$( this ).addClass( \"ui-dialog-resizing\" );\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"resizeStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tresize: function( event, ui ) {\n\t\t\t\tthat._trigger( \"resize\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\tvar offset = that.uiDialog.offset(),\n\t\t\t\t\tleft = offset.left - that.document.scrollLeft(),\n\t\t\t\t\ttop = offset.top - that.document.scrollTop();\n\n\t\t\t\toptions.height = that.uiDialog.height();\n\t\t\t\toptions.width = that.uiDialog.width();\n\t\t\t\toptions.position = {\n\t\t\t\t\tmy: \"left top\",\n\t\t\t\t\tat: \"left\" + (left >= 0 ? \"+\" : \"\") + left + \" \" +\n\t\t\t\t\t\t\"top\" + (top >= 0 ? \"+\" : \"\") + top,\n\t\t\t\t\tof: that.window\n\t\t\t\t};\n\t\t\t\t$( this ).removeClass( \"ui-dialog-resizing\" );\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"resizeStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t})\n\t\t.css( \"position\", position );\n\t},\n\n\t_trackFocus: function() {\n\t\tthis._on( this.widget(), {\n\t\t\tfocusin: function( event ) {\n\t\t\t\tthis._makeFocusTarget();\n\t\t\t\tthis._focusedElement = $( event.target );\n\t\t\t}\n\t\t});\n\t},\n\n\t_makeFocusTarget: function() {\n\t\tthis._untrackInstance();\n\t\tthis._trackingInstances().unshift( this );\n\t},\n\n\t_untrackInstance: function() {\n\t\tvar instances = this._trackingInstances(),\n\t\t\texists = $.inArray( this, instances );\n\t\tif ( exists !== -1 ) {\n\t\t\tinstances.splice( exists, 1 );\n\t\t}\n\t},\n\n\t_trackingInstances: function() {\n\t\tvar instances = this.document.data( \"ui-dialog-instances\" );\n\t\tif ( !instances ) {\n\t\t\tinstances = [];\n\t\t\tthis.document.data( \"ui-dialog-instances\", instances );\n\t\t}\n\t\treturn instances;\n\t},\n\n\t_minHeight: function() {\n\t\tvar options = this.options;\n\n\t\treturn options.height === \"auto\" ?\n\t\t\toptions.minHeight :\n\t\t\tMath.min( options.minHeight, options.height );\n\t},\n\n\t_position: function() {\n\t\t// Need to show the dialog to get the actual offset in the position plugin\n\t\tvar isVisible = this.uiDialog.is( \":visible\" );\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.show();\n\t\t}\n\t\tthis.uiDialog.position( this.options.position );\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.hide();\n\t\t}\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar that = this,\n\t\t\tresize = false,\n\t\t\tresizableOptions = {};\n\n\t\t$.each( options, function( key, value ) {\n\t\t\tthat._setOption( key, value );\n\n\t\t\tif ( key in that.sizeRelatedOptions ) {\n\t\t\t\tresize = true;\n\t\t\t}\n\t\t\tif ( key in that.resizableRelatedOptions ) {\n\t\t\t\tresizableOptions[ key ] = value;\n\t\t\t}\n\t\t});\n\n\t\tif ( resize ) {\n\t\t\tthis._size();\n\t\t\tthis._position();\n\t\t}\n\t\tif ( this.uiDialog.is( \":data(ui-resizable)\" ) ) {\n\t\t\tthis.uiDialog.resizable( \"option\", resizableOptions );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar isDraggable, isResizable,\n\t\t\tuiDialog = this.uiDialog;\n\n\t\tif ( key === \"dialogClass\" ) {\n\t\t\tuiDialog\n\t\t\t\t.removeClass( this.options.dialogClass )\n\t\t\t\t.addClass( value );\n\t\t}\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.uiDialog.appendTo( this._appendTo() );\n\t\t}\n\n\t\tif ( key === \"buttons\" ) {\n\t\t\tthis._createButtons();\n\t\t}\n\n\t\tif ( key === \"closeText\" ) {\n\t\t\tthis.uiDialogTitlebarClose.button({\n\t\t\t\t// Ensure that we always pass a string\n\t\t\t\tlabel: \"\" + value\n\t\t\t});\n\t\t}\n\n\t\tif ( key === \"draggable\" ) {\n\t\t\tisDraggable = uiDialog.is( \":data(ui-draggable)\" );\n\t\t\tif ( isDraggable && !value ) {\n\t\t\t\tuiDialog.draggable( \"destroy\" );\n\t\t\t}\n\n\t\t\tif ( !isDraggable && value ) {\n\t\t\t\tthis._makeDraggable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"position\" ) {\n\t\t\tthis._position();\n\t\t}\n\n\t\tif ( key === \"resizable\" ) {\n\t\t\t// currently resizable, becoming non-resizable\n\t\t\tisResizable = uiDialog.is( \":data(ui-resizable)\" );\n\t\t\tif ( isResizable && !value ) {\n\t\t\t\tuiDialog.resizable( \"destroy\" );\n\t\t\t}\n\n\t\t\t// currently resizable, changing handles\n\t\t\tif ( isResizable && typeof value === \"string\" ) {\n\t\t\t\tuiDialog.resizable( \"option\", \"handles\", value );\n\t\t\t}\n\n\t\t\t// currently non-resizable, becoming resizable\n\t\t\tif ( !isResizable && value !== false ) {\n\t\t\t\tthis._makeResizable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"title\" ) {\n\t\t\tthis._title( this.uiDialogTitlebar.find( \".ui-dialog-title\" ) );\n\t\t}\n\t},\n\n\t_size: function() {\n\t\t// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content\n\t\t// divs will both have width and height set, so we need to reset them\n\t\tvar nonContentHeight, minContentHeight, maxContentHeight,\n\t\t\toptions = this.options;\n\n\t\t// Reset content sizing\n\t\tthis.element.show().css({\n\t\t\twidth: \"auto\",\n\t\t\tminHeight: 0,\n\t\t\tmaxHeight: \"none\",\n\t\t\theight: 0\n\t\t});\n\n\t\tif ( options.minWidth > options.width ) {\n\t\t\toptions.width = options.minWidth;\n\t\t}\n\n\t\t// reset wrapper sizing\n\t\t// determine the height of all the non-content elements\n\t\tnonContentHeight = this.uiDialog.css({\n\t\t\t\theight: \"auto\",\n\t\t\t\twidth: options.width\n\t\t\t})\n\t\t\t.outerHeight();\n\t\tminContentHeight = Math.max( 0, options.minHeight - nonContentHeight );\n\t\tmaxContentHeight = typeof options.maxHeight === \"number\" ?\n\t\t\tMath.max( 0, options.maxHeight - nonContentHeight ) :\n\t\t\t\"none\";\n\n\t\tif ( options.height === \"auto\" ) {\n\t\t\tthis.element.css({\n\t\t\t\tminHeight: minContentHeight,\n\t\t\t\tmaxHeight: maxContentHeight,\n\t\t\t\theight: \"auto\"\n\t\t\t});\n\t\t} else {\n\t\t\tthis.element.height( Math.max( 0, options.height - nonContentHeight ) );\n\t\t}\n\n\t\tif ( this.uiDialog.is( \":data(ui-resizable)\" ) ) {\n\t\t\tthis.uiDialog.resizable( \"option\", \"minHeight\", this._minHeight() );\n\t\t}\n\t},\n\n\t_blockFrames: function() {\n\t\tthis.iframeBlocks = this.document.find( \"iframe\" ).map(function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\twidth: iframe.outerWidth(),\n\t\t\t\t\theight: iframe.outerHeight()\n\t\t\t\t})\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.offset( iframe.offset() )[0];\n\t\t});\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_allowInteraction: function( event ) {\n\t\tif ( $( event.target ).closest( \".ui-dialog\" ).length ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: Remove hack when datepicker implements\n\t\t// the .ui-front logic (#8989)\n\t\treturn !!$( event.target ).closest( \".ui-datepicker\" ).length;\n\t},\n\n\t_createOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We use a delay in case the overlay is created from an\n\t\t// event that we're going to be cancelling (#2804)\n\t\tvar isOpening = true;\n\t\tthis._delay(function() {\n\t\t\tisOpening = false;\n\t\t});\n\n\t\tif ( !this.document.data( \"ui-dialog-overlays\" ) ) {\n\n\t\t\t// Prevent use of anchors and inputs\n\t\t\t// Using _on() for an event handler shared across many instances is\n\t\t\t// safe because the dialogs stack and must be closed in reverse order\n\t\t\tthis._on( this.document, {\n\t\t\t\tfocusin: function( event ) {\n\t\t\t\t\tif ( isOpening ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !this._allowInteraction( event ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis._trackingInstances()[ 0 ]._focusTabbable();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis.overlay = $( \"<div>\" )\n\t\t\t.addClass( \"ui-widget-overlay ui-front\" )\n\t\t\t.appendTo( this._appendTo() );\n\t\tthis._on( this.overlay, {\n\t\t\tmousedown: \"_keepFocus\"\n\t\t});\n\t\tthis.document.data( \"ui-dialog-overlays\",\n\t\t\t(this.document.data( \"ui-dialog-overlays\" ) || 0) + 1 );\n\t},\n\n\t_destroyOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.overlay ) {\n\t\t\tvar overlays = this.document.data( \"ui-dialog-overlays\" ) - 1;\n\n\t\t\tif ( !overlays ) {\n\t\t\t\tthis.document\n\t\t\t\t\t.unbind( \"focusin\" )\n\t\t\t\t\t.removeData( \"ui-dialog-overlays\" );\n\t\t\t} else {\n\t\t\t\tthis.document.data( \"ui-dialog-overlays\", overlays );\n\t\t\t}\n\n\t\t\tthis.overlay.remove();\n\t\t\tthis.overlay = null;\n\t\t}\n\t}\n});\n\n\n/*!\n * jQuery UI Droppable 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/droppable/\n */\n\n\n$.widget( \"ui.droppable\", {\n\tversion: \"1.11.4\",\n\twidgetEventPrefix: \"drop\",\n\toptions: {\n\t\taccept: \"*\",\n\t\tactiveClass: false,\n\t\taddClasses: true,\n\t\tgreedy: false,\n\t\thoverClass: false,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tdeactivate: null,\n\t\tdrop: null,\n\t\tout: null,\n\t\tover: null\n\t},\n\t_create: function() {\n\n\t\tvar proportions,\n\t\t\to = this.options,\n\t\t\taccept = o.accept;\n\n\t\tthis.isover = false;\n\t\tthis.isout = true;\n\n\t\tthis.accept = $.isFunction( accept ) ? accept : function( d ) {\n\t\t\treturn d.is( accept );\n\t\t};\n\n\t\tthis.proportions = function( /* valueToWrite */ ) {\n\t\t\tif ( arguments.length ) {\n\t\t\t\t// Store the droppable's proportions\n\t\t\t\tproportions = arguments[ 0 ];\n\t\t\t} else {\n\t\t\t\t// Retrieve or derive the droppable's proportions\n\t\t\t\treturn proportions ?\n\t\t\t\t\tproportions :\n\t\t\t\t\tproportions = {\n\t\t\t\t\t\twidth: this.element[ 0 ].offsetWidth,\n\t\t\t\t\t\theight: this.element[ 0 ].offsetHeight\n\t\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\tthis._addToManager( o.scope );\n\n\t\to.addClasses && this.element.addClass( \"ui-droppable\" );\n\n\t},\n\n\t_addToManager: function( scope ) {\n\t\t// Add the reference and positions to the manager\n\t\t$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];\n\t\t$.ui.ddmanager.droppables[ scope ].push( this );\n\t},\n\n\t_splice: function( drop ) {\n\t\tvar i = 0;\n\t\tfor ( ; i < drop.length; i++ ) {\n\t\t\tif ( drop[ i ] === this ) {\n\t\t\t\tdrop.splice( i, 1 );\n\t\t\t}\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tvar drop = $.ui.ddmanager.droppables[ this.options.scope ];\n\n\t\tthis._splice( drop );\n\n\t\tthis.element.removeClass( \"ui-droppable ui-droppable-disabled\" );\n\t},\n\n\t_setOption: function( key, value ) {\n\n\t\tif ( key === \"accept\" ) {\n\t\t\tthis.accept = $.isFunction( value ) ? value : function( d ) {\n\t\t\t\treturn d.is( value );\n\t\t\t};\n\t\t} else if ( key === \"scope\" ) {\n\t\t\tvar drop = $.ui.ddmanager.droppables[ this.options.scope ];\n\n\t\t\tthis._splice( drop );\n\t\t\tthis._addToManager( value );\n\t\t}\n\n\t\tthis._super( key, value );\n\t},\n\n\t_activate: function( event ) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\t\tif ( this.options.activeClass ) {\n\t\t\tthis.element.addClass( this.options.activeClass );\n\t\t}\n\t\tif ( draggable ){\n\t\t\tthis._trigger( \"activate\", event, this.ui( draggable ) );\n\t\t}\n\t},\n\n\t_deactivate: function( event ) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\t\tif ( this.options.activeClass ) {\n\t\t\tthis.element.removeClass( this.options.activeClass );\n\t\t}\n\t\tif ( draggable ){\n\t\t\tthis._trigger( \"deactivate\", event, this.ui( draggable ) );\n\t\t}\n\t},\n\n\t_over: function( event ) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {\n\t\t\tif ( this.options.hoverClass ) {\n\t\t\t\tthis.element.addClass( this.options.hoverClass );\n\t\t\t}\n\t\t\tthis._trigger( \"over\", event, this.ui( draggable ) );\n\t\t}\n\n\t},\n\n\t_out: function( event ) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {\n\t\t\tif ( this.options.hoverClass ) {\n\t\t\t\tthis.element.removeClass( this.options.hoverClass );\n\t\t\t}\n\t\t\tthis._trigger( \"out\", event, this.ui( draggable ) );\n\t\t}\n\n\t},\n\n\t_drop: function( event, custom ) {\n\n\t\tvar draggable = custom || $.ui.ddmanager.current,\n\t\t\tchildrenIntersection = false;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.element.find( \":data(ui-droppable)\" ).not( \".ui-draggable-dragging\" ).each(function() {\n\t\t\tvar inst = $( this ).droppable( \"instance\" );\n\t\t\tif (\n\t\t\t\tinst.options.greedy &&\n\t\t\t\t!inst.options.disabled &&\n\t\t\t\tinst.options.scope === draggable.options.scope &&\n\t\t\t\tinst.accept.call( inst.element[ 0 ], ( draggable.currentItem || draggable.element ) ) &&\n\t\t\t\t$.ui.intersect( draggable, $.extend( inst, { offset: inst.element.offset() } ), inst.options.tolerance, event )\n\t\t\t) { childrenIntersection = true; return false; }\n\t\t});\n\t\tif ( childrenIntersection ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {\n\t\t\tif ( this.options.activeClass ) {\n\t\t\t\tthis.element.removeClass( this.options.activeClass );\n\t\t\t}\n\t\t\tif ( this.options.hoverClass ) {\n\t\t\t\tthis.element.removeClass( this.options.hoverClass );\n\t\t\t}\n\t\t\tthis._trigger( \"drop\", event, this.ui( draggable ) );\n\t\t\treturn this.element;\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tui: function( c ) {\n\t\treturn {\n\t\t\tdraggable: ( c.currentItem || c.element ),\n\t\t\thelper: c.helper,\n\t\t\tposition: c.position,\n\t\t\toffset: c.positionAbs\n\t\t};\n\t}\n\n});\n\n$.ui.intersect = (function() {\n\tfunction isOverAxis( x, reference, size ) {\n\t\treturn ( x >= reference ) && ( x < ( reference + size ) );\n\t}\n\n\treturn function( draggable, droppable, toleranceMode, event ) {\n\n\t\tif ( !droppable.offset ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar x1 = ( draggable.positionAbs || draggable.position.absolute ).left + draggable.margins.left,\n\t\t\ty1 = ( draggable.positionAbs || draggable.position.absolute ).top + draggable.margins.top,\n\t\t\tx2 = x1 + draggable.helperProportions.width,\n\t\t\ty2 = y1 + draggable.helperProportions.height,\n\t\t\tl = droppable.offset.left,\n\t\t\tt = droppable.offset.top,\n\t\t\tr = l + droppable.proportions().width,\n\t\t\tb = t + droppable.proportions().height;\n\n\t\tswitch ( toleranceMode ) {\n\t\tcase \"fit\":\n\t\t\treturn ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );\n\t\tcase \"intersect\":\n\t\t\treturn ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half\n\t\t\t\tx2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half\n\t\t\t\tt < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half\n\t\t\t\ty2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half\n\t\tcase \"pointer\":\n\t\t\treturn isOverAxis( event.pageY, t, droppable.proportions().height ) && isOverAxis( event.pageX, l, droppable.proportions().width );\n\t\tcase \"touch\":\n\t\t\treturn (\n\t\t\t\t( y1 >= t && y1 <= b ) || // Top edge touching\n\t\t\t\t( y2 >= t && y2 <= b ) || // Bottom edge touching\n\t\t\t\t( y1 < t && y2 > b ) // Surrounded vertically\n\t\t\t) && (\n\t\t\t\t( x1 >= l && x1 <= r ) || // Left edge touching\n\t\t\t\t( x2 >= l && x2 <= r ) || // Right edge touching\n\t\t\t\t( x1 < l && x2 > r ) // Surrounded horizontally\n\t\t\t);\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t};\n})();\n\n/*\n\tThis manager tracks offsets of draggables and droppables\n*/\n$.ui.ddmanager = {\n\tcurrent: null,\n\tdroppables: { \"default\": [] },\n\tprepareOffsets: function( t, event ) {\n\n\t\tvar i, j,\n\t\t\tm = $.ui.ddmanager.droppables[ t.options.scope ] || [],\n\t\t\ttype = event ? event.type : null, // workaround for #2317\n\t\t\tlist = ( t.currentItem || t.element ).find( \":data(ui-droppable)\" ).addBack();\n\n\t\tdroppablesLoop: for ( i = 0; i < m.length; i++ ) {\n\n\t\t\t// No disabled and non-accepted\n\t\t\tif ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], ( t.currentItem || t.element ) ) ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Filter out elements in the current dragged item\n\t\t\tfor ( j = 0; j < list.length; j++ ) {\n\t\t\t\tif ( list[ j ] === m[ i ].element[ 0 ] ) {\n\t\t\t\t\tm[ i ].proportions().height = 0;\n\t\t\t\t\tcontinue droppablesLoop;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tm[ i ].visible = m[ i ].element.css( \"display\" ) !== \"none\";\n\t\t\tif ( !m[ i ].visible ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Activate the droppable if used directly from draggables\n\t\t\tif ( type === \"mousedown\" ) {\n\t\t\t\tm[ i ]._activate.call( m[ i ], event );\n\t\t\t}\n\n\t\t\tm[ i ].offset = m[ i ].element.offset();\n\t\t\tm[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight });\n\n\t\t}\n\n\t},\n\tdrop: function( draggable, event ) {\n\n\t\tvar dropped = false;\n\t\t// Create a copy of the droppables in case the list changes during the drop (#9116)\n\t\t$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {\n\n\t\t\tif ( !this.options ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !this.options.disabled && this.visible && $.ui.intersect( draggable, this, this.options.tolerance, event ) ) {\n\t\t\t\tdropped = this._drop.call( this, event ) || dropped;\n\t\t\t}\n\n\t\t\tif ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {\n\t\t\t\tthis.isout = true;\n\t\t\t\tthis.isover = false;\n\t\t\t\tthis._deactivate.call( this, event );\n\t\t\t}\n\n\t\t});\n\t\treturn dropped;\n\n\t},\n\tdragStart: function( draggable, event ) {\n\t\t// Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)\n\t\tdraggable.element.parentsUntil( \"body\" ).bind( \"scroll.droppable\", function() {\n\t\t\tif ( !draggable.options.refreshPositions ) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t\t}\n\t\t});\n\t},\n\tdrag: function( draggable, event ) {\n\n\t\t// If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.\n\t\tif ( draggable.options.refreshPositions ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t}\n\n\t\t// Run through all droppables and check their positions based on specific tolerance options\n\t\t$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {\n\n\t\t\tif ( this.options.disabled || this.greedyChild || !this.visible ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar parentInstance, scope, parent,\n\t\t\t\tintersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),\n\t\t\t\tc = !intersects && this.isover ? \"isout\" : ( intersects && !this.isover ? \"isover\" : null );\n\t\t\tif ( !c ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.options.greedy ) {\n\t\t\t\t// find droppable parents with same scope\n\t\t\t\tscope = this.options.scope;\n\t\t\t\tparent = this.element.parents( \":data(ui-droppable)\" ).filter(function() {\n\t\t\t\t\treturn $( this ).droppable( \"instance\" ).options.scope === scope;\n\t\t\t\t});\n\n\t\t\t\tif ( parent.length ) {\n\t\t\t\t\tparentInstance = $( parent[ 0 ] ).droppable( \"instance\" );\n\t\t\t\t\tparentInstance.greedyChild = ( c === \"isover\" );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// we just moved into a greedy child\n\t\t\tif ( parentInstance && c === \"isover\" ) {\n\t\t\t\tparentInstance.isover = false;\n\t\t\t\tparentInstance.isout = true;\n\t\t\t\tparentInstance._out.call( parentInstance, event );\n\t\t\t}\n\n\t\t\tthis[ c ] = true;\n\t\t\tthis[c === \"isout\" ? \"isover\" : \"isout\"] = false;\n\t\t\tthis[c === \"isover\" ? \"_over\" : \"_out\"].call( this, event );\n\n\t\t\t// we just moved out of a greedy child\n\t\t\tif ( parentInstance && c === \"isout\" ) {\n\t\t\t\tparentInstance.isout = false;\n\t\t\t\tparentInstance.isover = true;\n\t\t\t\tparentInstance._over.call( parentInstance, event );\n\t\t\t}\n\t\t});\n\n\t},\n\tdragStop: function( draggable, event ) {\n\t\tdraggable.element.parentsUntil( \"body\" ).unbind( \"scroll.droppable\" );\n\t\t// Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)\n\t\tif ( !draggable.options.refreshPositions ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t}\n\t}\n};\n\nvar droppable = $.ui.droppable;\n\n\n/*!\n * jQuery UI Effects 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/effects-core/\n */\n\n\nvar dataSpace = \"ui-effects-\",\n\n\t// Create a local jQuery because jQuery Color relies on it and the\n\t// global may not exist with AMD and a custom build (#10199)\n\tjQuery = $;\n\n$.effects = {\n\teffect: {}\n};\n\n/*!\n * jQuery Color Animations v2.1.2\n * https://github.com/jquery/jquery-color\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * Date: Wed Jan 16 08:47:09 2013 -0600\n */\n(function( jQuery, undefined ) {\n\n\tvar stepHooks = \"backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor\",\n\n\t// plusequals test for += 100 -= 100\n\trplusequals = /^([\\-+])=\\s*(\\d+\\.?\\d*)/,\n\t// a set of RE's that can match strings and generate color tuples.\n\tstringParsers = [ {\n\t\t\tre: /rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\texecResult[ 2 ],\n\t\t\t\t\texecResult[ 3 ],\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\tre: /rgba?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ] * 2.55,\n\t\t\t\t\texecResult[ 2 ] * 2.55,\n\t\t\t\t\texecResult[ 3 ] * 2.55,\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\t// this regex ignores A-F because it's compared against an already lowercased string\n\t\t\tre: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\tparseInt( execResult[ 1 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 2 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 3 ], 16 )\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\t// this regex ignores A-F because it's compared against an already lowercased string\n\t\t\tre: /#([a-f0-9])([a-f0-9])([a-f0-9])/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\tparseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 3 ] + execResult[ 3 ], 16 )\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\tre: /hsla?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tspace: \"hsla\",\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\texecResult[ 2 ] / 100,\n\t\t\t\t\texecResult[ 3 ] / 100,\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t} ],\n\n\t// jQuery.Color( )\n\tcolor = jQuery.Color = function( color, green, blue, alpha ) {\n\t\treturn new jQuery.Color.fn.parse( color, green, blue, alpha );\n\t},\n\tspaces = {\n\t\trgba: {\n\t\t\tprops: {\n\t\t\t\tred: {\n\t\t\t\t\tidx: 0,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t},\n\t\t\t\tgreen: {\n\t\t\t\t\tidx: 1,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t},\n\t\t\t\tblue: {\n\t\t\t\t\tidx: 2,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\thsla: {\n\t\t\tprops: {\n\t\t\t\thue: {\n\t\t\t\t\tidx: 0,\n\t\t\t\t\ttype: \"degrees\"\n\t\t\t\t},\n\t\t\t\tsaturation: {\n\t\t\t\t\tidx: 1,\n\t\t\t\t\ttype: \"percent\"\n\t\t\t\t},\n\t\t\t\tlightness: {\n\t\t\t\t\tidx: 2,\n\t\t\t\t\ttype: \"percent\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tpropTypes = {\n\t\t\"byte\": {\n\t\t\tfloor: true,\n\t\t\tmax: 255\n\t\t},\n\t\t\"percent\": {\n\t\t\tmax: 1\n\t\t},\n\t\t\"degrees\": {\n\t\t\tmod: 360,\n\t\t\tfloor: true\n\t\t}\n\t},\n\tsupport = color.support = {},\n\n\t// element for support tests\n\tsupportElem = jQuery( \"<p>\" )[ 0 ],\n\n\t// colors = jQuery.Color.names\n\tcolors,\n\n\t// local aliases of functions called often\n\teach = jQuery.each;\n\n// determine rgba support immediately\nsupportElem.style.cssText = \"background-color:rgba(1,1,1,.5)\";\nsupport.rgba = supportElem.style.backgroundColor.indexOf( \"rgba\" ) > -1;\n\n// define cache name and alpha properties\n// for rgba and hsla spaces\neach( spaces, function( spaceName, space ) {\n\tspace.cache = \"_\" + spaceName;\n\tspace.props.alpha = {\n\t\tidx: 3,\n\t\ttype: \"percent\",\n\t\tdef: 1\n\t};\n});\n\nfunction clamp( value, prop, allowEmpty ) {\n\tvar type = propTypes[ prop.type ] || {};\n\n\tif ( value == null ) {\n\t\treturn (allowEmpty || !prop.def) ? null : prop.def;\n\t}\n\n\t// ~~ is an short way of doing floor for positive numbers\n\tvalue = type.floor ? ~~value : parseFloat( value );\n\n\t// IE will pass in empty strings as value for alpha,\n\t// which will hit this case\n\tif ( isNaN( value ) ) {\n\t\treturn prop.def;\n\t}\n\n\tif ( type.mod ) {\n\t\t// we add mod before modding to make sure that negatives values\n\t\t// get converted properly: -10 -> 350\n\t\treturn (value + type.mod) % type.mod;\n\t}\n\n\t// for now all property types without mod have min and max\n\treturn 0 > value ? 0 : type.max < value ? type.max : value;\n}\n\nfunction stringParse( string ) {\n\tvar inst = color(),\n\t\trgba = inst._rgba = [];\n\n\tstring = string.toLowerCase();\n\n\teach( stringParsers, function( i, parser ) {\n\t\tvar parsed,\n\t\t\tmatch = parser.re.exec( string ),\n\t\t\tvalues = match && parser.parse( match ),\n\t\t\tspaceName = parser.space || \"rgba\";\n\n\t\tif ( values ) {\n\t\t\tparsed = inst[ spaceName ]( values );\n\n\t\t\t// if this was an rgba parse the assignment might happen twice\n\t\t\t// oh well....\n\t\t\tinst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];\n\t\t\trgba = inst._rgba = parsed._rgba;\n\n\t\t\t// exit each( stringParsers ) here because we matched\n\t\t\treturn false;\n\t\t}\n\t});\n\n\t// Found a stringParser that handled it\n\tif ( rgba.length ) {\n\n\t\t// if this came from a parsed string, force \"transparent\" when alpha is 0\n\t\t// chrome, (and maybe others) return \"transparent\" as rgba(0,0,0,0)\n\t\tif ( rgba.join() === \"0,0,0,0\" ) {\n\t\t\tjQuery.extend( rgba, colors.transparent );\n\t\t}\n\t\treturn inst;\n\t}\n\n\t// named colors\n\treturn colors[ string ];\n}\n\ncolor.fn = jQuery.extend( color.prototype, {\n\tparse: function( red, green, blue, alpha ) {\n\t\tif ( red === undefined ) {\n\t\t\tthis._rgba = [ null, null, null, null ];\n\t\t\treturn this;\n\t\t}\n\t\tif ( red.jquery || red.nodeType ) {\n\t\t\tred = jQuery( red ).css( green );\n\t\t\tgreen = undefined;\n\t\t}\n\n\t\tvar inst = this,\n\t\t\ttype = jQuery.type( red ),\n\t\t\trgba = this._rgba = [];\n\n\t\t// more than 1 argument specified - assume ( red, green, blue, alpha )\n\t\tif ( green !== undefined ) {\n\t\t\tred = [ red, green, blue, alpha ];\n\t\t\ttype = \"array\";\n\t\t}\n\n\t\tif ( type === \"string\" ) {\n\t\t\treturn this.parse( stringParse( red ) || colors._default );\n\t\t}\n\n\t\tif ( type === \"array\" ) {\n\t\t\teach( spaces.rgba.props, function( key, prop ) {\n\t\t\t\trgba[ prop.idx ] = clamp( red[ prop.idx ], prop );\n\t\t\t});\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( type === \"object\" ) {\n\t\t\tif ( red instanceof color ) {\n\t\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\t\tif ( red[ space.cache ] ) {\n\t\t\t\t\t\tinst[ space.cache ] = red[ space.cache ].slice();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\t\tvar cache = space.cache;\n\t\t\t\t\teach( space.props, function( key, prop ) {\n\n\t\t\t\t\t\t// if the cache doesn't exist, and we know how to convert\n\t\t\t\t\t\tif ( !inst[ cache ] && space.to ) {\n\n\t\t\t\t\t\t\t// if the value was null, we don't need to copy it\n\t\t\t\t\t\t\t// if the key was alpha, we don't need to copy it either\n\t\t\t\t\t\t\tif ( key === \"alpha\" || red[ key ] == null ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tinst[ cache ] = space.to( inst._rgba );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// this is the only case where we allow nulls for ALL properties.\n\t\t\t\t\t\t// call clamp with alwaysAllowEmpty\n\t\t\t\t\t\tinst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );\n\t\t\t\t\t});\n\n\t\t\t\t\t// everything defined but alpha?\n\t\t\t\t\tif ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {\n\t\t\t\t\t\t// use the default of 1\n\t\t\t\t\t\tinst[ cache ][ 3 ] = 1;\n\t\t\t\t\t\tif ( space.from ) {\n\t\t\t\t\t\t\tinst._rgba = space.from( inst[ cache ] );\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\treturn this;\n\t\t}\n\t},\n\tis: function( compare ) {\n\t\tvar is = color( compare ),\n\t\t\tsame = true,\n\t\t\tinst = this;\n\n\t\teach( spaces, function( _, space ) {\n\t\t\tvar localCache,\n\t\t\t\tisCache = is[ space.cache ];\n\t\t\tif (isCache) {\n\t\t\t\tlocalCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];\n\t\t\t\teach( space.props, function( _, prop ) {\n\t\t\t\t\tif ( isCache[ prop.idx ] != null ) {\n\t\t\t\t\t\tsame = ( isCache[ prop.idx ] === localCache[ prop.idx ] );\n\t\t\t\t\t\treturn same;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn same;\n\t\t});\n\t\treturn same;\n\t},\n\t_space: function() {\n\t\tvar used = [],\n\t\t\tinst = this;\n\t\teach( spaces, function( spaceName, space ) {\n\t\t\tif ( inst[ space.cache ] ) {\n\t\t\t\tused.push( spaceName );\n\t\t\t}\n\t\t});\n\t\treturn used.pop();\n\t},\n\ttransition: function( other, distance ) {\n\t\tvar end = color( other ),\n\t\t\tspaceName = end._space(),\n\t\t\tspace = spaces[ spaceName ],\n\t\t\tstartColor = this.alpha() === 0 ? color( \"transparent\" ) : this,\n\t\t\tstart = startColor[ space.cache ] || space.to( startColor._rgba ),\n\t\t\tresult = start.slice();\n\n\t\tend = end[ space.cache ];\n\t\teach( space.props, function( key, prop ) {\n\t\t\tvar index = prop.idx,\n\t\t\t\tstartValue = start[ index ],\n\t\t\t\tendValue = end[ index ],\n\t\t\t\ttype = propTypes[ prop.type ] || {};\n\n\t\t\t// if null, don't override start value\n\t\t\tif ( endValue === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if null - use end\n\t\t\tif ( startValue === null ) {\n\t\t\t\tresult[ index ] = endValue;\n\t\t\t} else {\n\t\t\t\tif ( type.mod ) {\n\t\t\t\t\tif ( endValue - startValue > type.mod / 2 ) {\n\t\t\t\t\t\tstartValue += type.mod;\n\t\t\t\t\t} else if ( startValue - endValue > type.mod / 2 ) {\n\t\t\t\t\t\tstartValue -= type.mod;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );\n\t\t\t}\n\t\t});\n\t\treturn this[ spaceName ]( result );\n\t},\n\tblend: function( opaque ) {\n\t\t// if we are already opaque - return ourself\n\t\tif ( this._rgba[ 3 ] === 1 ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tvar rgb = this._rgba.slice(),\n\t\t\ta = rgb.pop(),\n\t\t\tblend = color( opaque )._rgba;\n\n\t\treturn color( jQuery.map( rgb, function( v, i ) {\n\t\t\treturn ( 1 - a ) * blend[ i ] + a * v;\n\t\t}));\n\t},\n\ttoRgbaString: function() {\n\t\tvar prefix = \"rgba(\",\n\t\t\trgba = jQuery.map( this._rgba, function( v, i ) {\n\t\t\t\treturn v == null ? ( i > 2 ? 1 : 0 ) : v;\n\t\t\t});\n\n\t\tif ( rgba[ 3 ] === 1 ) {\n\t\t\trgba.pop();\n\t\t\tprefix = \"rgb(\";\n\t\t}\n\n\t\treturn prefix + rgba.join() + \")\";\n\t},\n\ttoHslaString: function() {\n\t\tvar prefix = \"hsla(\",\n\t\t\thsla = jQuery.map( this.hsla(), function( v, i ) {\n\t\t\t\tif ( v == null ) {\n\t\t\t\t\tv = i > 2 ? 1 : 0;\n\t\t\t\t}\n\n\t\t\t\t// catch 1 and 2\n\t\t\t\tif ( i && i < 3 ) {\n\t\t\t\t\tv = Math.round( v * 100 ) + \"%\";\n\t\t\t\t}\n\t\t\t\treturn v;\n\t\t\t});\n\n\t\tif ( hsla[ 3 ] === 1 ) {\n\t\t\thsla.pop();\n\t\t\tprefix = \"hsl(\";\n\t\t}\n\t\treturn prefix + hsla.join() + \")\";\n\t},\n\ttoHexString: function( includeAlpha ) {\n\t\tvar rgba = this._rgba.slice(),\n\t\t\talpha = rgba.pop();\n\n\t\tif ( includeAlpha ) {\n\t\t\trgba.push( ~~( alpha * 255 ) );\n\t\t}\n\n\t\treturn \"#\" + jQuery.map( rgba, function( v ) {\n\n\t\t\t// default to 0 when nulls exist\n\t\t\tv = ( v || 0 ).toString( 16 );\n\t\t\treturn v.length === 1 ? \"0\" + v : v;\n\t\t}).join(\"\");\n\t},\n\ttoString: function() {\n\t\treturn this._rgba[ 3 ] === 0 ? \"transparent\" : this.toRgbaString();\n\t}\n});\ncolor.fn.parse.prototype = color.fn;\n\n// hsla conversions adapted from:\n// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021\n\nfunction hue2rgb( p, q, h ) {\n\th = ( h + 1 ) % 1;\n\tif ( h * 6 < 1 ) {\n\t\treturn p + ( q - p ) * h * 6;\n\t}\n\tif ( h * 2 < 1) {\n\t\treturn q;\n\t}\n\tif ( h * 3 < 2 ) {\n\t\treturn p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;\n\t}\n\treturn p;\n}\n\nspaces.hsla.to = function( rgba ) {\n\tif ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {\n\t\treturn [ null, null, null, rgba[ 3 ] ];\n\t}\n\tvar r = rgba[ 0 ] / 255,\n\t\tg = rgba[ 1 ] / 255,\n\t\tb = rgba[ 2 ] / 255,\n\t\ta = rgba[ 3 ],\n\t\tmax = Math.max( r, g, b ),\n\t\tmin = Math.min( r, g, b ),\n\t\tdiff = max - min,\n\t\tadd = max + min,\n\t\tl = add * 0.5,\n\t\th, s;\n\n\tif ( min === max ) {\n\t\th = 0;\n\t} else if ( r === max ) {\n\t\th = ( 60 * ( g - b ) / diff ) + 360;\n\t} else if ( g === max ) {\n\t\th = ( 60 * ( b - r ) / diff ) + 120;\n\t} else {\n\t\th = ( 60 * ( r - g ) / diff ) + 240;\n\t}\n\n\t// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%\n\t// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)\n\tif ( diff === 0 ) {\n\t\ts = 0;\n\t} else if ( l <= 0.5 ) {\n\t\ts = diff / add;\n\t} else {\n\t\ts = diff / ( 2 - add );\n\t}\n\treturn [ Math.round(h) % 360, s, l, a == null ? 1 : a ];\n};\n\nspaces.hsla.from = function( hsla ) {\n\tif ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {\n\t\treturn [ null, null, null, hsla[ 3 ] ];\n\t}\n\tvar h = hsla[ 0 ] / 360,\n\t\ts = hsla[ 1 ],\n\t\tl = hsla[ 2 ],\n\t\ta = hsla[ 3 ],\n\t\tq = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,\n\t\tp = 2 * l - q;\n\n\treturn [\n\t\tMath.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),\n\t\tMath.round( hue2rgb( p, q, h ) * 255 ),\n\t\tMath.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),\n\t\ta\n\t];\n};\n\neach( spaces, function( spaceName, space ) {\n\tvar props = space.props,\n\t\tcache = space.cache,\n\t\tto = space.to,\n\t\tfrom = space.from;\n\n\t// makes rgba() and hsla()\n\tcolor.fn[ spaceName ] = function( value ) {\n\n\t\t// generate a cache for this space if it doesn't exist\n\t\tif ( to && !this[ cache ] ) {\n\t\t\tthis[ cache ] = to( this._rgba );\n\t\t}\n\t\tif ( value === undefined ) {\n\t\t\treturn this[ cache ].slice();\n\t\t}\n\n\t\tvar ret,\n\t\t\ttype = jQuery.type( value ),\n\t\t\tarr = ( type === \"array\" || type === \"object\" ) ? value : arguments,\n\t\t\tlocal = this[ cache ].slice();\n\n\t\teach( props, function( key, prop ) {\n\t\t\tvar val = arr[ type === \"object\" ? key : prop.idx ];\n\t\t\tif ( val == null ) {\n\t\t\t\tval = local[ prop.idx ];\n\t\t\t}\n\t\t\tlocal[ prop.idx ] = clamp( val, prop );\n\t\t});\n\n\t\tif ( from ) {\n\t\t\tret = color( from( local ) );\n\t\t\tret[ cache ] = local;\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn color( local );\n\t\t}\n\t};\n\n\t// makes red() green() blue() alpha() hue() saturation() lightness()\n\teach( props, function( key, prop ) {\n\t\t// alpha is included in more than one space\n\t\tif ( color.fn[ key ] ) {\n\t\t\treturn;\n\t\t}\n\t\tcolor.fn[ key ] = function( value ) {\n\t\t\tvar vtype = jQuery.type( value ),\n\t\t\t\tfn = ( key === \"alpha\" ? ( this._hsla ? \"hsla\" : \"rgba\" ) : spaceName ),\n\t\t\t\tlocal = this[ fn ](),\n\t\t\t\tcur = local[ prop.idx ],\n\t\t\t\tmatch;\n\n\t\t\tif ( vtype === \"undefined\" ) {\n\t\t\t\treturn cur;\n\t\t\t}\n\n\t\t\tif ( vtype === \"function\" ) {\n\t\t\t\tvalue = value.call( this, cur );\n\t\t\t\tvtype = jQuery.type( value );\n\t\t\t}\n\t\t\tif ( value == null && prop.empty ) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tif ( vtype === \"string\" ) {\n\t\t\t\tmatch = rplusequals.exec( value );\n\t\t\t\tif ( match ) {\n\t\t\t\t\tvalue = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === \"+\" ? 1 : -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\tlocal[ prop.idx ] = value;\n\t\t\treturn this[ fn ]( local );\n\t\t};\n\t});\n});\n\n// add cssHook and .fx.step function for each named hook.\n// accept a space separated string of properties\ncolor.hook = function( hook ) {\n\tvar hooks = hook.split( \" \" );\n\teach( hooks, function( i, hook ) {\n\t\tjQuery.cssHooks[ hook ] = {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar parsed, curElem,\n\t\t\t\t\tbackgroundColor = \"\";\n\n\t\t\t\tif ( value !== \"transparent\" && ( jQuery.type( value ) !== \"string\" || ( parsed = stringParse( value ) ) ) ) {\n\t\t\t\t\tvalue = color( parsed || value );\n\t\t\t\t\tif ( !support.rgba && value._rgba[ 3 ] !== 1 ) {\n\t\t\t\t\t\tcurElem = hook === \"backgroundColor\" ? elem.parentNode : elem;\n\t\t\t\t\t\twhile (\n\t\t\t\t\t\t\t(backgroundColor === \"\" || backgroundColor === \"transparent\") &&\n\t\t\t\t\t\t\tcurElem && curElem.style\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tbackgroundColor = jQuery.css( curElem, \"backgroundColor\" );\n\t\t\t\t\t\t\t\tcurElem = curElem.parentNode;\n\t\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvalue = value.blend( backgroundColor && backgroundColor !== \"transparent\" ?\n\t\t\t\t\t\t\tbackgroundColor :\n\t\t\t\t\t\t\t\"_default\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tvalue = value.toRgbaString();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\telem.style[ hook ] = value;\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\t// wrapped to prevent IE from throwing errors on \"invalid\" values like 'auto' or 'inherit'\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tjQuery.fx.step[ hook ] = function( fx ) {\n\t\t\tif ( !fx.colorInit ) {\n\t\t\t\tfx.start = color( fx.elem, hook );\n\t\t\t\tfx.end = color( fx.end );\n\t\t\t\tfx.colorInit = true;\n\t\t\t}\n\t\t\tjQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );\n\t\t};\n\t});\n\n};\n\ncolor.hook( stepHooks );\n\njQuery.cssHooks.borderColor = {\n\texpand: function( value ) {\n\t\tvar expanded = {};\n\n\t\teach( [ \"Top\", \"Right\", \"Bottom\", \"Left\" ], function( i, part ) {\n\t\t\texpanded[ \"border\" + part + \"Color\" ] = value;\n\t\t});\n\t\treturn expanded;\n\t}\n};\n\n// Basic color names only.\n// Usage of any of the other color names requires adding yourself or including\n// jquery.color.svg-names.js.\ncolors = jQuery.Color.names = {\n\t// 4.1. Basic color keywords\n\taqua: \"#00ffff\",\n\tblack: \"#000000\",\n\tblue: \"#0000ff\",\n\tfuchsia: \"#ff00ff\",\n\tgray: \"#808080\",\n\tgreen: \"#008000\",\n\tlime: \"#00ff00\",\n\tmaroon: \"#800000\",\n\tnavy: \"#000080\",\n\tolive: \"#808000\",\n\tpurple: \"#800080\",\n\tred: \"#ff0000\",\n\tsilver: \"#c0c0c0\",\n\tteal: \"#008080\",\n\twhite: \"#ffffff\",\n\tyellow: \"#ffff00\",\n\n\t// 4.2.3. \"transparent\" color keyword\n\ttransparent: [ null, null, null, 0 ],\n\n\t_default: \"#ffffff\"\n};\n\n})( jQuery );\n\n/******************************************************************************/\n/****************************** CLASS ANIMATIONS ******************************/\n/******************************************************************************/\n(function() {\n\nvar classAnimationActions = [ \"add\", \"remove\", \"toggle\" ],\n\tshorthandStyles = {\n\t\tborder: 1,\n\t\tborderBottom: 1,\n\t\tborderColor: 1,\n\t\tborderLeft: 1,\n\t\tborderRight: 1,\n\t\tborderTop: 1,\n\t\tborderWidth: 1,\n\t\tmargin: 1,\n\t\tpadding: 1\n\t};\n\n$.each([ \"borderLeftStyle\", \"borderRightStyle\", \"borderBottomStyle\", \"borderTopStyle\" ], function( _, prop ) {\n\t$.fx.step[ prop ] = function( fx ) {\n\t\tif ( fx.end !== \"none\" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {\n\t\t\tjQuery.style( fx.elem, prop, fx.end );\n\t\t\tfx.setAttr = true;\n\t\t}\n\t};\n});\n\nfunction getElementStyles( elem ) {\n\tvar key, len,\n\t\tstyle = elem.ownerDocument.defaultView ?\n\t\t\telem.ownerDocument.defaultView.getComputedStyle( elem, null ) :\n\t\t\telem.currentStyle,\n\t\tstyles = {};\n\n\tif ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {\n\t\tlen = style.length;\n\t\twhile ( len-- ) {\n\t\t\tkey = style[ len ];\n\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\tstyles[ $.camelCase( key ) ] = style[ key ];\n\t\t\t}\n\t\t}\n\t// support: Opera, IE <9\n\t} else {\n\t\tfor ( key in style ) {\n\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\tstyles[ key ] = style[ key ];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn styles;\n}\n\nfunction styleDifference( oldStyle, newStyle ) {\n\tvar diff = {},\n\t\tname, value;\n\n\tfor ( name in newStyle ) {\n\t\tvalue = newStyle[ name ];\n\t\tif ( oldStyle[ name ] !== value ) {\n\t\t\tif ( !shorthandStyles[ name ] ) {\n\t\t\t\tif ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {\n\t\t\t\t\tdiff[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn diff;\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$.effects.animateClass = function( value, duration, easing, callback ) {\n\tvar o = $.speed( duration, easing, callback );\n\n\treturn this.queue( function() {\n\t\tvar animated = $( this ),\n\t\t\tbaseClass = animated.attr( \"class\" ) || \"\",\n\t\t\tapplyClassChange,\n\t\t\tallAnimations = o.children ? animated.find( \"*\" ).addBack() : animated;\n\n\t\t// map the animated objects to store the original styles.\n\t\tallAnimations = allAnimations.map(function() {\n\t\t\tvar el = $( this );\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tstart: getElementStyles( this )\n\t\t\t};\n\t\t});\n\n\t\t// apply class change\n\t\tapplyClassChange = function() {\n\t\t\t$.each( classAnimationActions, function(i, action) {\n\t\t\t\tif ( value[ action ] ) {\n\t\t\t\t\tanimated[ action + \"Class\" ]( value[ action ] );\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\tapplyClassChange();\n\n\t\t// map all animated objects again - calculate new styles and diff\n\t\tallAnimations = allAnimations.map(function() {\n\t\t\tthis.end = getElementStyles( this.el[ 0 ] );\n\t\t\tthis.diff = styleDifference( this.start, this.end );\n\t\t\treturn this;\n\t\t});\n\n\t\t// apply original class\n\t\tanimated.attr( \"class\", baseClass );\n\n\t\t// map all animated objects again - this time collecting a promise\n\t\tallAnimations = allAnimations.map(function() {\n\t\t\tvar styleInfo = this,\n\t\t\t\tdfd = $.Deferred(),\n\t\t\t\topts = $.extend({}, o, {\n\t\t\t\t\tqueue: false,\n\t\t\t\t\tcomplete: function() {\n\t\t\t\t\t\tdfd.resolve( styleInfo );\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\tthis.el.animate( this.diff, opts );\n\t\t\treturn dfd.promise();\n\t\t});\n\n\t\t// once all animations have completed:\n\t\t$.when.apply( $, allAnimations.get() ).done(function() {\n\n\t\t\t// set the final class\n\t\t\tapplyClassChange();\n\n\t\t\t// for each animated element,\n\t\t\t// clear all css properties that were animated\n\t\t\t$.each( arguments, function() {\n\t\t\t\tvar el = this.el;\n\t\t\t\t$.each( this.diff, function(key) {\n\t\t\t\t\tel.css( key, \"\" );\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// this is guarnteed to be there if you use jQuery.speed()\n\t\t\t// it also handles dequeuing the next anim...\n\t\t\to.complete.call( animated[ 0 ] );\n\t\t});\n\t});\n};\n\n$.fn.extend({\n\taddClass: (function( orig ) {\n\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\treturn speed ?\n\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t{ add: classNames }, speed, easing, callback ) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t})( $.fn.addClass ),\n\n\tremoveClass: (function( orig ) {\n\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\treturn arguments.length > 1 ?\n\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t{ remove: classNames }, speed, easing, callback ) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t})( $.fn.removeClass ),\n\n\ttoggleClass: (function( orig ) {\n\t\treturn function( classNames, force, speed, easing, callback ) {\n\t\t\tif ( typeof force === \"boolean\" || force === undefined ) {\n\t\t\t\tif ( !speed ) {\n\t\t\t\t\t// without speed parameter\n\t\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t\t} else {\n\t\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t\t(force ? { add: classNames } : { remove: classNames }),\n\t\t\t\t\t\tspeed, easing, callback );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// without force parameter\n\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t{ toggle: classNames }, force, speed, easing );\n\t\t\t}\n\t\t};\n\t})( $.fn.toggleClass ),\n\n\tswitchClass: function( remove, add, speed, easing, callback) {\n\t\treturn $.effects.animateClass.call( this, {\n\t\t\tadd: add,\n\t\t\tremove: remove\n\t\t}, speed, easing, callback );\n\t}\n});\n\n})();\n\n/******************************************************************************/\n/*********************************** EFFECTS **********************************/\n/******************************************************************************/\n\n(function() {\n\n$.extend( $.effects, {\n\tversion: \"1.11.4\",\n\n\t// Saves a set of properties in a data storage\n\tsave: function( element, set ) {\n\t\tfor ( var i = 0; i < set.length; i++ ) {\n\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\telement.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );\n\t\t\t}\n\t\t}\n\t},\n\n\t// Restores a set of previously saved properties from a data storage\n\trestore: function( element, set ) {\n\t\tvar val, i;\n\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\tval = element.data( dataSpace + set[ i ] );\n\t\t\t\t// support: jQuery 1.6.2\n\t\t\t\t// http://bugs.jquery.com/ticket/9917\n\t\t\t\t// jQuery 1.6.2 incorrectly returns undefined for any falsy value.\n\t\t\t\t// We can't differentiate between \"\" and 0 here, so we just assume\n\t\t\t\t// empty string since it's likely to be a more common value...\n\t\t\t\tif ( val === undefined ) {\n\t\t\t\t\tval = \"\";\n\t\t\t\t}\n\t\t\t\telement.css( set[ i ], val );\n\t\t\t}\n\t\t}\n\t},\n\n\tsetMode: function( el, mode ) {\n\t\tif (mode === \"toggle\") {\n\t\t\tmode = el.is( \":hidden\" ) ? \"show\" : \"hide\";\n\t\t}\n\t\treturn mode;\n\t},\n\n\t// Translates a [top,left] array into a baseline value\n\t// this should be a little more flexible in the future to handle a string & hash\n\tgetBaseline: function( origin, original ) {\n\t\tvar y, x;\n\t\tswitch ( origin[ 0 ] ) {\n\t\t\tcase \"top\": y = 0; break;\n\t\t\tcase \"middle\": y = 0.5; break;\n\t\t\tcase \"bottom\": y = 1; break;\n\t\t\tdefault: y = origin[ 0 ] / original.height;\n\t\t}\n\t\tswitch ( origin[ 1 ] ) {\n\t\t\tcase \"left\": x = 0; break;\n\t\t\tcase \"center\": x = 0.5; break;\n\t\t\tcase \"right\": x = 1; break;\n\t\t\tdefault: x = origin[ 1 ] / original.width;\n\t\t}\n\t\treturn {\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\t},\n\n\t// Wraps the element around a wrapper that copies position properties\n\tcreateWrapper: function( element ) {\n\n\t\t// if the element is already wrapped, return it\n\t\tif ( element.parent().is( \".ui-effects-wrapper\" )) {\n\t\t\treturn element.parent();\n\t\t}\n\n\t\t// wrap the element\n\t\tvar props = {\n\t\t\t\twidth: element.outerWidth(true),\n\t\t\t\theight: element.outerHeight(true),\n\t\t\t\t\"float\": element.css( \"float\" )\n\t\t\t},\n\t\t\twrapper = $( \"<div></div>\" )\n\t\t\t\t.addClass( \"ui-effects-wrapper\" )\n\t\t\t\t.css({\n\t\t\t\t\tfontSize: \"100%\",\n\t\t\t\t\tbackground: \"transparent\",\n\t\t\t\t\tborder: \"none\",\n\t\t\t\t\tmargin: 0,\n\t\t\t\t\tpadding: 0\n\t\t\t\t}),\n\t\t\t// Store the size in case width/height are defined in % - Fixes #5245\n\t\t\tsize = {\n\t\t\t\twidth: element.width(),\n\t\t\t\theight: element.height()\n\t\t\t},\n\t\t\tactive = document.activeElement;\n\n\t\t// support: Firefox\n\t\t// Firefox incorrectly exposes anonymous content\n\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=561664\n\t\ttry {\n\t\t\tactive.id;\n\t\t} catch ( e ) {\n\t\t\tactive = document.body;\n\t\t}\n\n\t\telement.wrap( wrapper );\n\n\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t$( active ).focus();\n\t\t}\n\n\t\twrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element\n\n\t\t// transfer positioning properties to the wrapper\n\t\tif ( element.css( \"position\" ) === \"static\" ) {\n\t\t\twrapper.css({ position: \"relative\" });\n\t\t\telement.css({ position: \"relative\" });\n\t\t} else {\n\t\t\t$.extend( props, {\n\t\t\t\tposition: element.css( \"position\" ),\n\t\t\t\tzIndex: element.css( \"z-index\" )\n\t\t\t});\n\t\t\t$.each([ \"top\", \"left\", \"bottom\", \"right\" ], function(i, pos) {\n\t\t\t\tprops[ pos ] = element.css( pos );\n\t\t\t\tif ( isNaN( parseInt( props[ pos ], 10 ) ) ) {\n\t\t\t\t\tprops[ pos ] = \"auto\";\n\t\t\t\t}\n\t\t\t});\n\t\t\telement.css({\n\t\t\t\tposition: \"relative\",\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\tright: \"auto\",\n\t\t\t\tbottom: \"auto\"\n\t\t\t});\n\t\t}\n\t\telement.css(size);\n\n\t\treturn wrapper.css( props ).show();\n\t},\n\n\tremoveWrapper: function( element ) {\n\t\tvar active = document.activeElement;\n\n\t\tif ( element.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t\telement.parent().replaceWith( element );\n\n\t\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t\t$( active ).focus();\n\t\t\t}\n\t\t}\n\n\t\treturn element;\n\t},\n\n\tsetTransition: function( element, list, factor, value ) {\n\t\tvalue = value || {};\n\t\t$.each( list, function( i, x ) {\n\t\t\tvar unit = element.cssUnit( x );\n\t\t\tif ( unit[ 0 ] > 0 ) {\n\t\t\t\tvalue[ x ] = unit[ 0 ] * factor + unit[ 1 ];\n\t\t\t}\n\t\t});\n\t\treturn value;\n\t}\n});\n\n// return an effect options object for the given parameters:\nfunction _normalizeArguments( effect, options, speed, callback ) {\n\n\t// allow passing all options as the first parameter\n\tif ( $.isPlainObject( effect ) ) {\n\t\toptions = effect;\n\t\teffect = effect.effect;\n\t}\n\n\t// convert to an object\n\teffect = { effect: effect };\n\n\t// catch (effect, null, ...)\n\tif ( options == null ) {\n\t\toptions = {};\n\t}\n\n\t// catch (effect, callback)\n\tif ( $.isFunction( options ) ) {\n\t\tcallback = options;\n\t\tspeed = null;\n\t\toptions = {};\n\t}\n\n\t// catch (effect, speed, ?)\n\tif ( typeof options === \"number\" || $.fx.speeds[ options ] ) {\n\t\tcallback = speed;\n\t\tspeed = options;\n\t\toptions = {};\n\t}\n\n\t// catch (effect, options, callback)\n\tif ( $.isFunction( speed ) ) {\n\t\tcallback = speed;\n\t\tspeed = null;\n\t}\n\n\t// add options to effect\n\tif ( options ) {\n\t\t$.extend( effect, options );\n\t}\n\n\tspeed = speed || options.duration;\n\teffect.duration = $.fx.off ? 0 :\n\t\ttypeof speed === \"number\" ? speed :\n\t\tspeed in $.fx.speeds ? $.fx.speeds[ speed ] :\n\t\t$.fx.speeds._default;\n\n\teffect.complete = callback || options.complete;\n\n\treturn effect;\n}\n\nfunction standardAnimationOption( option ) {\n\t// Valid standard speeds (nothing, number, named speed)\n\tif ( !option || typeof option === \"number\" || $.fx.speeds[ option ] ) {\n\t\treturn true;\n\t}\n\n\t// Invalid strings - treat as \"normal\" speed\n\tif ( typeof option === \"string\" && !$.effects.effect[ option ] ) {\n\t\treturn true;\n\t}\n\n\t// Complete callback\n\tif ( $.isFunction( option ) ) {\n\t\treturn true;\n\t}\n\n\t// Options hash (but not naming an effect)\n\tif ( typeof option === \"object\" && !option.effect ) {\n\t\treturn true;\n\t}\n\n\t// Didn't match any standard API\n\treturn false;\n}\n\n$.fn.extend({\n\teffect: function( /* effect, options, speed, callback */ ) {\n\t\tvar args = _normalizeArguments.apply( this, arguments ),\n\t\t\tmode = args.mode,\n\t\t\tqueue = args.queue,\n\t\t\teffectMethod = $.effects.effect[ args.effect ];\n\n\t\tif ( $.fx.off || !effectMethod ) {\n\t\t\t// delegate to the original method (e.g., .show()) if possible\n\t\t\tif ( mode ) {\n\t\t\t\treturn this[ mode ]( args.duration, args.complete );\n\t\t\t} else {\n\t\t\t\treturn this.each( function() {\n\t\t\t\t\tif ( args.complete ) {\n\t\t\t\t\t\targs.complete.call( this );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfunction run( next ) {\n\t\t\tvar elem = $( this ),\n\t\t\t\tcomplete = args.complete,\n\t\t\t\tmode = args.mode;\n\n\t\t\tfunction done() {\n\t\t\t\tif ( $.isFunction( complete ) ) {\n\t\t\t\t\tcomplete.call( elem[0] );\n\t\t\t\t}\n\t\t\t\tif ( $.isFunction( next ) ) {\n\t\t\t\t\tnext();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If the element already has the correct final state, delegate to\n\t\t\t// the core methods so the internal tracking of \"olddisplay\" works.\n\t\t\tif ( elem.is( \":hidden\" ) ? mode === \"hide\" : mode === \"show\" ) {\n\t\t\t\telem[ mode ]();\n\t\t\t\tdone();\n\t\t\t} else {\n\t\t\t\teffectMethod.call( elem[0], args, done );\n\t\t\t}\n\t\t}\n\n\t\treturn queue === false ? this.each( run ) : this.queue( queue || \"fx\", run );\n\t},\n\n\tshow: (function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"show\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t})( $.fn.show ),\n\n\thide: (function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"hide\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t})( $.fn.hide ),\n\n\ttoggle: (function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) || typeof option === \"boolean\" ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"toggle\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t})( $.fn.toggle ),\n\n\t// helper functions\n\tcssUnit: function(key) {\n\t\tvar style = this.css( key ),\n\t\t\tval = [];\n\n\t\t$.each( [ \"em\", \"px\", \"%\", \"pt\" ], function( i, unit ) {\n\t\t\tif ( style.indexOf( unit ) > 0 ) {\n\t\t\t\tval = [ parseFloat( style ), unit ];\n\t\t\t}\n\t\t});\n\t\treturn val;\n\t}\n});\n\n})();\n\n/******************************************************************************/\n/*********************************** EASING ***********************************/\n/******************************************************************************/\n\n(function() {\n\n// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)\n\nvar baseEasings = {};\n\n$.each( [ \"Quad\", \"Cubic\", \"Quart\", \"Quint\", \"Expo\" ], function( i, name ) {\n\tbaseEasings[ name ] = function( p ) {\n\t\treturn Math.pow( p, i + 2 );\n\t};\n});\n\n$.extend( baseEasings, {\n\tSine: function( p ) {\n\t\treturn 1 - Math.cos( p * Math.PI / 2 );\n\t},\n\tCirc: function( p ) {\n\t\treturn 1 - Math.sqrt( 1 - p * p );\n\t},\n\tElastic: function( p ) {\n\t\treturn p === 0 || p === 1 ? p :\n\t\t\t-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );\n\t},\n\tBack: function( p ) {\n\t\treturn p * p * ( 3 * p - 2 );\n\t},\n\tBounce: function( p ) {\n\t\tvar pow2,\n\t\t\tbounce = 4;\n\n\t\twhile ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}\n\t\treturn 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );\n\t}\n});\n\n$.each( baseEasings, function( name, easeIn ) {\n\t$.easing[ \"easeIn\" + name ] = easeIn;\n\t$.easing[ \"easeOut\" + name ] = function( p ) {\n\t\treturn 1 - easeIn( 1 - p );\n\t};\n\t$.easing[ \"easeInOut\" + name ] = function( p ) {\n\t\treturn p < 0.5 ?\n\t\t\teaseIn( p * 2 ) / 2 :\n\t\t\t1 - easeIn( p * -2 + 2 ) / 2;\n\t};\n});\n\n})();\n\nvar effect = $.effects;\n\n\n/*!\n * jQuery UI Effects Blind 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/blind-effect/\n */\n\n\nvar effectBlind = $.effects.effect.blind = function( o, done ) {\n\t// Create element\n\tvar el = $( this ),\n\t\trvertical = /up|down|vertical/,\n\t\trpositivemotion = /up|left|vertical|horizontal/,\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tdirection = o.direction || \"up\",\n\t\tvertical = rvertical.test( direction ),\n\t\tref = vertical ? \"height\" : \"width\",\n\t\tref2 = vertical ? \"top\" : \"left\",\n\t\tmotion = rpositivemotion.test( direction ),\n\t\tanimation = {},\n\t\tshow = mode === \"show\",\n\t\twrapper, distance, margin;\n\n\t// if already wrapped, the wrapper's properties are my property. #6245\n\tif ( el.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t$.effects.save( el.parent(), props );\n\t} else {\n\t\t$.effects.save( el, props );\n\t}\n\tel.show();\n\twrapper = $.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\n\tdistance = wrapper[ ref ]();\n\tmargin = parseFloat( wrapper.css( ref2 ) ) || 0;\n\n\tanimation[ ref ] = show ? distance : 0;\n\tif ( !motion ) {\n\t\tel\n\t\t\t.css( vertical ? \"bottom\" : \"right\", 0 )\n\t\t\t.css( vertical ? \"top\" : \"left\", \"auto\" )\n\t\t\t.css({ position: \"absolute\" });\n\n\t\tanimation[ ref2 ] = show ? margin : distance + margin;\n\t}\n\n\t// start at 0 if we are showing\n\tif ( show ) {\n\t\twrapper.css( ref, 0 );\n\t\tif ( !motion ) {\n\t\t\twrapper.css( ref2, margin + distance );\n\t\t}\n\t}\n\n\t// Animate\n\twrapper.animate( animation, {\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tqueue: false,\n\t\tcomplete: function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n};\n\n\n/*!\n * jQuery UI Effects Bounce 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/bounce-effect/\n */\n\n\nvar effectBounce = $.effects.effect.bounce = function( o, done ) {\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\n\t\t// defaults:\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\thide = mode === \"hide\",\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"up\",\n\t\tdistance = o.distance,\n\t\ttimes = o.times || 5,\n\n\t\t// number of internal animations\n\t\tanims = times * 2 + ( show || hide ? 1 : 0 ),\n\t\tspeed = o.duration / anims,\n\t\teasing = o.easing,\n\n\t\t// utility:\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tmotion = ( direction === \"up\" || direction === \"left\" ),\n\t\ti,\n\t\tupAnim,\n\t\tdownAnim,\n\n\t\t// we will need to re-assemble the queue to stack our animations in place\n\t\tqueue = el.queue(),\n\t\tqueuelen = queue.length;\n\n\t// Avoid touching opacity to prevent clearType and PNG issues in IE\n\tif ( show || hide ) {\n\t\tprops.push( \"opacity\" );\n\t}\n\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el ); // Create Wrapper\n\n\t// default distance for the BIGGEST bounce is the outer Distance / 3\n\tif ( !distance ) {\n\t\tdistance = el[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]() / 3;\n\t}\n\n\tif ( show ) {\n\t\tdownAnim = { opacity: 1 };\n\t\tdownAnim[ ref ] = 0;\n\n\t\t// if we are showing, force opacity 0 and set the initial position\n\t\t// then do the \"first\" animation\n\t\tel.css( \"opacity\", 0 )\n\t\t\t.css( ref, motion ? -distance * 2 : distance * 2 )\n\t\t\t.animate( downAnim, speed, easing );\n\t}\n\n\t// start at the smallest distance if we are hiding\n\tif ( hide ) {\n\t\tdistance = distance / Math.pow( 2, times - 1 );\n\t}\n\n\tdownAnim = {};\n\tdownAnim[ ref ] = 0;\n\t// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here\n\tfor ( i = 0; i < times; i++ ) {\n\t\tupAnim = {};\n\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\n\t\tel.animate( upAnim, speed, easing )\n\t\t\t.animate( downAnim, speed, easing );\n\n\t\tdistance = hide ? distance * 2 : distance / 2;\n\t}\n\n\t// Last Bounce when Hiding\n\tif ( hide ) {\n\t\tupAnim = { opacity: 0 };\n\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\n\t\tel.animate( upAnim, speed, easing );\n\t}\n\n\tel.queue(function() {\n\t\tif ( hide ) {\n\t\t\tel.hide();\n\t\t}\n\t\t$.effects.restore( el, props );\n\t\t$.effects.removeWrapper( el );\n\t\tdone();\n\t});\n\n\t// inject all the animations we just queued to be first in line (after \"inprogress\")\n\tif ( queuelen > 1) {\n\t\tqueue.splice.apply( queue,\n\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t}\n\tel.dequeue();\n\n};\n\n\n/*!\n * jQuery UI Effects Clip 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/clip-effect/\n */\n\n\nvar effectClip = $.effects.effect.clip = function( o, done ) {\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"vertical\",\n\t\tvert = direction === \"vertical\",\n\t\tsize = vert ? \"height\" : \"width\",\n\t\tposition = vert ? \"top\" : \"left\",\n\t\tanimation = {},\n\t\twrapper, animate, distance;\n\n\t// Save & Show\n\t$.effects.save( el, props );\n\tel.show();\n\n\t// Create Wrapper\n\twrapper = $.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\tanimate = ( el[0].tagName === \"IMG\" ) ? wrapper : el;\n\tdistance = animate[ size ]();\n\n\t// Shift\n\tif ( show ) {\n\t\tanimate.css( size, 0 );\n\t\tanimate.css( position, distance / 2 );\n\t}\n\n\t// Create Animation Object:\n\tanimation[ size ] = show ? distance : 0;\n\tanimation[ position ] = show ? 0 : distance / 2;\n\n\t// Animate\n\tanimate.animate( animation, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( !show ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n\n};\n\n\n/*!\n * jQuery UI Effects Drop 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/drop-effect/\n */\n\n\nvar effectDrop = $.effects.effect.drop = function( o, done ) {\n\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"opacity\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"left\",\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tmotion = ( direction === \"up\" || direction === \"left\" ) ? \"pos\" : \"neg\",\n\t\tanimation = {\n\t\t\topacity: show ? 1 : 0\n\t\t},\n\t\tdistance;\n\n\t// Adjust\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el );\n\n\tdistance = o.distance || el[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]( true ) / 2;\n\n\tif ( show ) {\n\t\tel\n\t\t\t.css( \"opacity\", 0 )\n\t\t\t.css( ref, motion === \"pos\" ? -distance : distance );\n\t}\n\n\t// Animation\n\tanimation[ ref ] = ( show ?\n\t\t( motion === \"pos\" ? \"+=\" : \"-=\" ) :\n\t\t( motion === \"pos\" ? \"-=\" : \"+=\" ) ) +\n\t\tdistance;\n\n\t// Animate\n\tel.animate( animation, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n};\n\n\n/*!\n * jQuery UI Effects Explode 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/explode-effect/\n */\n\n\nvar effectExplode = $.effects.effect.explode = function( o, done ) {\n\n\tvar rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,\n\t\tcells = rows,\n\t\tel = $( this ),\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\n\t\t// show and then visibility:hidden the element before calculating offset\n\t\toffset = el.show().css( \"visibility\", \"hidden\" ).offset(),\n\n\t\t// width and height of a piece\n\t\twidth = Math.ceil( el.outerWidth() / cells ),\n\t\theight = Math.ceil( el.outerHeight() / rows ),\n\t\tpieces = [],\n\n\t\t// loop\n\t\ti, j, left, top, mx, my;\n\n\t// children animate complete:\n\tfunction childComplete() {\n\t\tpieces.push( this );\n\t\tif ( pieces.length === rows * cells ) {\n\t\t\tanimComplete();\n\t\t}\n\t}\n\n\t// clone the element for each row and cell.\n\tfor ( i = 0; i < rows ; i++ ) { // ===>\n\t\ttop = offset.top + i * height;\n\t\tmy = i - ( rows - 1 ) / 2 ;\n\n\t\tfor ( j = 0; j < cells ; j++ ) { // |||\n\t\t\tleft = offset.left + j * width;\n\t\t\tmx = j - ( cells - 1 ) / 2 ;\n\n\t\t\t// Create a clone of the now hidden main element that will be absolute positioned\n\t\t\t// within a wrapper div off the -left and -top equal to size of our pieces\n\t\t\tel\n\t\t\t\t.clone()\n\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t.wrap( \"<div></div>\" )\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\tvisibility: \"visible\",\n\t\t\t\t\tleft: -j * width,\n\t\t\t\t\ttop: -i * height\n\t\t\t\t})\n\n\t\t\t// select the wrapper - make it overflow: hidden and absolute positioned based on\n\t\t\t// where the original was located +left and +top equal to the size of pieces\n\t\t\t\t.parent()\n\t\t\t\t.addClass( \"ui-effects-explode\" )\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\twidth: width,\n\t\t\t\t\theight: height,\n\t\t\t\t\tleft: left + ( show ? mx * width : 0 ),\n\t\t\t\t\ttop: top + ( show ? my * height : 0 ),\n\t\t\t\t\topacity: show ? 0 : 1\n\t\t\t\t}).animate({\n\t\t\t\t\tleft: left + ( show ? 0 : mx * width ),\n\t\t\t\t\ttop: top + ( show ? 0 : my * height ),\n\t\t\t\t\topacity: show ? 1 : 0\n\t\t\t\t}, o.duration || 500, o.easing, childComplete );\n\t\t}\n\t}\n\n\tfunction animComplete() {\n\t\tel.css({\n\t\t\tvisibility: \"visible\"\n\t\t});\n\t\t$( pieces ).remove();\n\t\tif ( !show ) {\n\t\t\tel.hide();\n\t\t}\n\t\tdone();\n\t}\n};\n\n\n/*!\n * jQuery UI Effects Fade 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/fade-effect/\n */\n\n\nvar effectFade = $.effects.effect.fade = function( o, done ) {\n\tvar el = $( this ),\n\t\tmode = $.effects.setMode( el, o.mode || \"toggle\" );\n\n\tel.animate({\n\t\topacity: mode\n\t}, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: done\n\t});\n};\n\n\n/*!\n * jQuery UI Effects Fold 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/fold-effect/\n */\n\n\nvar effectFold = $.effects.effect.fold = function( o, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\t\thide = mode === \"hide\",\n\t\tsize = o.size || 15,\n\t\tpercent = /([0-9]+)%/.exec( size ),\n\t\thorizFirst = !!o.horizFirst,\n\t\twidthFirst = show !== horizFirst,\n\t\tref = widthFirst ? [ \"width\", \"height\" ] : [ \"height\", \"width\" ],\n\t\tduration = o.duration / 2,\n\t\twrapper, distance,\n\t\tanimation1 = {},\n\t\tanimation2 = {};\n\n\t$.effects.save( el, props );\n\tel.show();\n\n\t// Create Wrapper\n\twrapper = $.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\tdistance = widthFirst ?\n\t\t[ wrapper.width(), wrapper.height() ] :\n\t\t[ wrapper.height(), wrapper.width() ];\n\n\tif ( percent ) {\n\t\tsize = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];\n\t}\n\tif ( show ) {\n\t\twrapper.css( horizFirst ? {\n\t\t\theight: 0,\n\t\t\twidth: size\n\t\t} : {\n\t\t\theight: size,\n\t\t\twidth: 0\n\t\t});\n\t}\n\n\t// Animation\n\tanimation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;\n\tanimation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;\n\n\t// Animate\n\twrapper\n\t\t.animate( animation1, duration, o.easing )\n\t\t.animate( animation2, duration, o.easing, function() {\n\t\t\tif ( hide ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t});\n\n};\n\n\n/*!\n * jQuery UI Effects Highlight 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/highlight-effect/\n */\n\n\nvar effectHighlight = $.effects.effect.highlight = function( o, done ) {\n\tvar elem = $( this ),\n\t\tprops = [ \"backgroundImage\", \"backgroundColor\", \"opacity\" ],\n\t\tmode = $.effects.setMode( elem, o.mode || \"show\" ),\n\t\tanimation = {\n\t\t\tbackgroundColor: elem.css( \"backgroundColor\" )\n\t\t};\n\n\tif (mode === \"hide\") {\n\t\tanimation.opacity = 0;\n\t}\n\n\t$.effects.save( elem, props );\n\n\telem\n\t\t.show()\n\t\t.css({\n\t\t\tbackgroundImage: \"none\",\n\t\t\tbackgroundColor: o.color || \"#ffff99\"\n\t\t})\n\t\t.animate( animation, {\n\t\t\tqueue: false,\n\t\t\tduration: o.duration,\n\t\t\teasing: o.easing,\n\t\t\tcomplete: function() {\n\t\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\t\telem.hide();\n\t\t\t\t}\n\t\t\t\t$.effects.restore( elem, props );\n\t\t\t\tdone();\n\t\t\t}\n\t\t});\n};\n\n\n/*!\n * jQuery UI Effects Size 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/size-effect/\n */\n\n\nvar effectSize = $.effects.effect.size = function( o, done ) {\n\n\t// Create element\n\tvar original, baseline, factor,\n\t\tel = $( this ),\n\t\tprops0 = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"width\", \"height\", \"overflow\", \"opacity\" ],\n\n\t\t// Always restore\n\t\tprops1 = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"overflow\", \"opacity\" ],\n\n\t\t// Copy for children\n\t\tprops2 = [ \"width\", \"height\", \"overflow\" ],\n\t\tcProps = [ \"fontSize\" ],\n\t\tvProps = [ \"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\" ],\n\t\thProps = [ \"borderLeftWidth\", \"borderRightWidth\", \"paddingLeft\", \"paddingRight\" ],\n\n\t\t// Set options\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\trestore = o.restore || mode !== \"effect\",\n\t\tscale = o.scale || \"both\",\n\t\torigin = o.origin || [ \"middle\", \"center\" ],\n\t\tposition = el.css( \"position\" ),\n\t\tprops = restore ? props0 : props1,\n\t\tzero = {\n\t\t\theight: 0,\n\t\t\twidth: 0,\n\t\t\touterHeight: 0,\n\t\t\touterWidth: 0\n\t\t};\n\n\tif ( mode === \"show\" ) {\n\t\tel.show();\n\t}\n\toriginal = {\n\t\theight: el.height(),\n\t\twidth: el.width(),\n\t\touterHeight: el.outerHeight(),\n\t\touterWidth: el.outerWidth()\n\t};\n\n\tif ( o.mode === \"toggle\" && mode === \"show\" ) {\n\t\tel.from = o.to || zero;\n\t\tel.to = o.from || original;\n\t} else {\n\t\tel.from = o.from || ( mode === \"show\" ? zero : original );\n\t\tel.to = o.to || ( mode === \"hide\" ? zero : original );\n\t}\n\n\t// Set scaling factor\n\tfactor = {\n\t\tfrom: {\n\t\t\ty: el.from.height / original.height,\n\t\t\tx: el.from.width / original.width\n\t\t},\n\t\tto: {\n\t\t\ty: el.to.height / original.height,\n\t\t\tx: el.to.width / original.width\n\t\t}\n\t};\n\n\t// Scale the css box\n\tif ( scale === \"box\" || scale === \"both\" ) {\n\n\t\t// Vertical props scaling\n\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\tprops = props.concat( vProps );\n\t\t\tel.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );\n\t\t\tel.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );\n\t\t}\n\n\t\t// Horizontal props scaling\n\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\tprops = props.concat( hProps );\n\t\t\tel.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );\n\t\t\tel.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );\n\t\t}\n\t}\n\n\t// Scale the content\n\tif ( scale === \"content\" || scale === \"both\" ) {\n\n\t\t// Vertical props scaling\n\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\tprops = props.concat( cProps ).concat( props2 );\n\t\t\tel.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );\n\t\t\tel.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );\n\t\t}\n\t}\n\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el );\n\tel.css( \"overflow\", \"hidden\" ).css( el.from );\n\n\t// Adjust\n\tif (origin) { // Calculate baseline shifts\n\t\tbaseline = $.effects.getBaseline( origin, original );\n\t\tel.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;\n\t\tel.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;\n\t\tel.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;\n\t\tel.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;\n\t}\n\tel.css( el.from ); // set top & left\n\n\t// Animate\n\tif ( scale === \"content\" || scale === \"both\" ) { // Scale the children\n\n\t\t// Add margins/font-size\n\t\tvProps = vProps.concat([ \"marginTop\", \"marginBottom\" ]).concat(cProps);\n\t\thProps = hProps.concat([ \"marginLeft\", \"marginRight\" ]);\n\t\tprops2 = props0.concat(vProps).concat(hProps);\n\n\t\tel.find( \"*[width]\" ).each( function() {\n\t\t\tvar child = $( this ),\n\t\t\t\tc_original = {\n\t\t\t\t\theight: child.height(),\n\t\t\t\t\twidth: child.width(),\n\t\t\t\t\touterHeight: child.outerHeight(),\n\t\t\t\t\touterWidth: child.outerWidth()\n\t\t\t\t};\n\t\t\tif (restore) {\n\t\t\t\t$.effects.save(child, props2);\n\t\t\t}\n\n\t\t\tchild.from = {\n\t\t\t\theight: c_original.height * factor.from.y,\n\t\t\t\twidth: c_original.width * factor.from.x,\n\t\t\t\touterHeight: c_original.outerHeight * factor.from.y,\n\t\t\t\touterWidth: c_original.outerWidth * factor.from.x\n\t\t\t};\n\t\t\tchild.to = {\n\t\t\t\theight: c_original.height * factor.to.y,\n\t\t\t\twidth: c_original.width * factor.to.x,\n\t\t\t\touterHeight: c_original.height * factor.to.y,\n\t\t\t\touterWidth: c_original.width * factor.to.x\n\t\t\t};\n\n\t\t\t// Vertical props scaling\n\t\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\t\tchild.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );\n\t\t\t\tchild.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );\n\t\t\t}\n\n\t\t\t// Horizontal props scaling\n\t\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\t\tchild.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );\n\t\t\t\tchild.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );\n\t\t\t}\n\n\t\t\t// Animate children\n\t\t\tchild.css( child.from );\n\t\t\tchild.animate( child.to, o.duration, o.easing, function() {\n\n\t\t\t\t// Restore children\n\t\t\t\tif ( restore ) {\n\t\t\t\t\t$.effects.restore( child, props2 );\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t// Animate\n\tel.animate( el.to, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( el.to.opacity === 0 ) {\n\t\t\t\tel.css( \"opacity\", el.from.opacity );\n\t\t\t}\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\tif ( !restore ) {\n\n\t\t\t\t// we need to calculate our new positioning based on the scaling\n\t\t\t\tif ( position === \"static\" ) {\n\t\t\t\t\tel.css({\n\t\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\t\ttop: el.to.top,\n\t\t\t\t\t\tleft: el.to.left\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t$.each([ \"top\", \"left\" ], function( idx, pos ) {\n\t\t\t\t\t\tel.css( pos, function( _, str ) {\n\t\t\t\t\t\t\tvar val = parseInt( str, 10 ),\n\t\t\t\t\t\t\t\ttoRef = idx ? el.to.left : el.to.top;\n\n\t\t\t\t\t\t\t// if original was \"auto\", recalculate the new value from wrapper\n\t\t\t\t\t\t\tif ( str === \"auto\" ) {\n\t\t\t\t\t\t\t\treturn toRef + \"px\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn val + toRef + \"px\";\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n\n};\n\n\n/*!\n * jQuery UI Effects Scale 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/scale-effect/\n */\n\n\nvar effectScale = $.effects.effect.scale = function( o, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\toptions = $.extend( true, {}, o ),\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\tpercent = parseInt( o.percent, 10 ) ||\n\t\t\t( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === \"hide\" ? 0 : 100 ) ),\n\t\tdirection = o.direction || \"both\",\n\t\torigin = o.origin,\n\t\toriginal = {\n\t\t\theight: el.height(),\n\t\t\twidth: el.width(),\n\t\t\touterHeight: el.outerHeight(),\n\t\t\touterWidth: el.outerWidth()\n\t\t},\n\t\tfactor = {\n\t\t\ty: direction !== \"horizontal\" ? (percent / 100) : 1,\n\t\t\tx: direction !== \"vertical\" ? (percent / 100) : 1\n\t\t};\n\n\t// We are going to pass this effect to the size effect:\n\toptions.effect = \"size\";\n\toptions.queue = false;\n\toptions.complete = done;\n\n\t// Set default origin and restore for show/hide\n\tif ( mode !== \"effect\" ) {\n\t\toptions.origin = origin || [ \"middle\", \"center\" ];\n\t\toptions.restore = true;\n\t}\n\n\toptions.from = o.from || ( mode === \"show\" ? {\n\t\theight: 0,\n\t\twidth: 0,\n\t\touterHeight: 0,\n\t\touterWidth: 0\n\t} : original );\n\toptions.to = {\n\t\theight: original.height * factor.y,\n\t\twidth: original.width * factor.x,\n\t\touterHeight: original.outerHeight * factor.y,\n\t\touterWidth: original.outerWidth * factor.x\n\t};\n\n\t// Fade option to support puff\n\tif ( options.fade ) {\n\t\tif ( mode === \"show\" ) {\n\t\t\toptions.from.opacity = 0;\n\t\t\toptions.to.opacity = 1;\n\t\t}\n\t\tif ( mode === \"hide\" ) {\n\t\t\toptions.from.opacity = 1;\n\t\t\toptions.to.opacity = 0;\n\t\t}\n\t}\n\n\t// Animate\n\tel.effect( options );\n\n};\n\n\n/*!\n * jQuery UI Effects Puff 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/puff-effect/\n */\n\n\nvar effectPuff = $.effects.effect.puff = function( o, done ) {\n\tvar elem = $( this ),\n\t\tmode = $.effects.setMode( elem, o.mode || \"hide\" ),\n\t\thide = mode === \"hide\",\n\t\tpercent = parseInt( o.percent, 10 ) || 150,\n\t\tfactor = percent / 100,\n\t\toriginal = {\n\t\t\theight: elem.height(),\n\t\t\twidth: elem.width(),\n\t\t\touterHeight: elem.outerHeight(),\n\t\t\touterWidth: elem.outerWidth()\n\t\t};\n\n\t$.extend( o, {\n\t\teffect: \"scale\",\n\t\tqueue: false,\n\t\tfade: true,\n\t\tmode: mode,\n\t\tcomplete: done,\n\t\tpercent: hide ? percent : 100,\n\t\tfrom: hide ?\n\t\t\toriginal :\n\t\t\t{\n\t\t\t\theight: original.height * factor,\n\t\t\t\twidth: original.width * factor,\n\t\t\t\touterHeight: original.outerHeight * factor,\n\t\t\t\touterWidth: original.outerWidth * factor\n\t\t\t}\n\t});\n\n\telem.effect( o );\n};\n\n\n/*!\n * jQuery UI Effects Pulsate 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/pulsate-effect/\n */\n\n\nvar effectPulsate = $.effects.effect.pulsate = function( o, done ) {\n\tvar elem = $( this ),\n\t\tmode = $.effects.setMode( elem, o.mode || \"show\" ),\n\t\tshow = mode === \"show\",\n\t\thide = mode === \"hide\",\n\t\tshowhide = ( show || mode === \"hide\" ),\n\n\t\t// showing or hiding leaves of the \"last\" animation\n\t\tanims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),\n\t\tduration = o.duration / anims,\n\t\tanimateTo = 0,\n\t\tqueue = elem.queue(),\n\t\tqueuelen = queue.length,\n\t\ti;\n\n\tif ( show || !elem.is(\":visible\")) {\n\t\telem.css( \"opacity\", 0 ).show();\n\t\tanimateTo = 1;\n\t}\n\n\t// anims - 1 opacity \"toggles\"\n\tfor ( i = 1; i < anims; i++ ) {\n\t\telem.animate({\n\t\t\topacity: animateTo\n\t\t}, duration, o.easing );\n\t\tanimateTo = 1 - animateTo;\n\t}\n\n\telem.animate({\n\t\topacity: animateTo\n\t}, duration, o.easing);\n\n\telem.queue(function() {\n\t\tif ( hide ) {\n\t\t\telem.hide();\n\t\t}\n\t\tdone();\n\t});\n\n\t// We just queued up \"anims\" animations, we need to put them next in the queue\n\tif ( queuelen > 1 ) {\n\t\tqueue.splice.apply( queue,\n\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t}\n\telem.dequeue();\n};\n\n\n/*!\n * jQuery UI Effects Shake 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/shake-effect/\n */\n\n\nvar effectShake = $.effects.effect.shake = function( o, done ) {\n\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\tdirection = o.direction || \"left\",\n\t\tdistance = o.distance || 20,\n\t\ttimes = o.times || 3,\n\t\tanims = times * 2 + 1,\n\t\tspeed = Math.round( o.duration / anims ),\n\t\tref = (direction === \"up\" || direction === \"down\") ? \"top\" : \"left\",\n\t\tpositiveMotion = (direction === \"up\" || direction === \"left\"),\n\t\tanimation = {},\n\t\tanimation1 = {},\n\t\tanimation2 = {},\n\t\ti,\n\n\t\t// we will need to re-assemble the queue to stack our animations in place\n\t\tqueue = el.queue(),\n\t\tqueuelen = queue.length;\n\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el );\n\n\t// Animation\n\tanimation[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance;\n\tanimation1[ ref ] = ( positiveMotion ? \"+=\" : \"-=\" ) + distance * 2;\n\tanimation2[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance * 2;\n\n\t// Animate\n\tel.animate( animation, speed, o.easing );\n\n\t// Shakes\n\tfor ( i = 1; i < times; i++ ) {\n\t\tel.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );\n\t}\n\tel\n\t\t.animate( animation1, speed, o.easing )\n\t\t.animate( animation, speed / 2, o.easing )\n\t\t.queue(function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t});\n\n\t// inject all the animations we just queued to be first in line (after \"inprogress\")\n\tif ( queuelen > 1) {\n\t\tqueue.splice.apply( queue,\n\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t}\n\tel.dequeue();\n\n};\n\n\n/*!\n * jQuery UI Effects Slide 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/slide-effect/\n */\n\n\nvar effectSlide = $.effects.effect.slide = function( o, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"width\", \"height\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"show\" ),\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"left\",\n\t\tref = (direction === \"up\" || direction === \"down\") ? \"top\" : \"left\",\n\t\tpositiveMotion = (direction === \"up\" || direction === \"left\"),\n\t\tdistance,\n\t\tanimation = {};\n\n\t// Adjust\n\t$.effects.save( el, props );\n\tel.show();\n\tdistance = o.distance || el[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]( true );\n\n\t$.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\n\tif ( show ) {\n\t\tel.css( ref, positiveMotion ? (isNaN(distance) ? \"-\" + distance : -distance) : distance );\n\t}\n\n\t// Animation\n\tanimation[ ref ] = ( show ?\n\t\t( positiveMotion ? \"+=\" : \"-=\") :\n\t\t( positiveMotion ? \"-=\" : \"+=\")) +\n\t\tdistance;\n\n\t// Animate\n\tel.animate( animation, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n};\n\n\n/*!\n * jQuery UI Effects Transfer 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/transfer-effect/\n */\n\n\nvar effectTransfer = $.effects.effect.transfer = function( o, done ) {\n\tvar elem = $( this ),\n\t\ttarget = $( o.to ),\n\t\ttargetFixed = target.css( \"position\" ) === \"fixed\",\n\t\tbody = $(\"body\"),\n\t\tfixTop = targetFixed ? body.scrollTop() : 0,\n\t\tfixLeft = targetFixed ? body.scrollLeft() : 0,\n\t\tendPosition = target.offset(),\n\t\tanimation = {\n\t\t\ttop: endPosition.top - fixTop,\n\t\t\tleft: endPosition.left - fixLeft,\n\t\t\theight: target.innerHeight(),\n\t\t\twidth: target.innerWidth()\n\t\t},\n\t\tstartPosition = elem.offset(),\n\t\ttransfer = $( \"<div class='ui-effects-transfer'></div>\" )\n\t\t\t.appendTo( document.body )\n\t\t\t.addClass( o.className )\n\t\t\t.css({\n\t\t\t\ttop: startPosition.top - fixTop,\n\t\t\t\tleft: startPosition.left - fixLeft,\n\t\t\t\theight: elem.innerHeight(),\n\t\t\t\twidth: elem.innerWidth(),\n\t\t\t\tposition: targetFixed ? \"fixed\" : \"absolute\"\n\t\t\t})\n\t\t\t.animate( animation, o.duration, o.easing, function() {\n\t\t\t\ttransfer.remove();\n\t\t\t\tdone();\n\t\t\t});\n};\n\n\n/*!\n * jQuery UI Progressbar 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/progressbar/\n */\n\n\nvar progressbar = $.widget( \"ui.progressbar\", {\n\tversion: \"1.11.4\",\n\toptions: {\n\t\tmax: 100,\n\t\tvalue: 0,\n\n\t\tchange: null,\n\t\tcomplete: null\n\t},\n\n\tmin: 0,\n\n\t_create: function() {\n\t\t// Constrain initial value\n\t\tthis.oldValue = this.options.value = this._constrainedValue();\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-progressbar ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.attr({\n\t\t\t\t// Only set static values, aria-valuenow and aria-valuemax are\n\t\t\t\t// set inside _refreshValue()\n\t\t\t\trole: \"progressbar\",\n\t\t\t\t\"aria-valuemin\": this.min\n\t\t\t});\n\n\t\tthis.valueDiv = $( \"<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>\" )\n\t\t\t.appendTo( this.element );\n\n\t\tthis._refreshValue();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-progressbar ui-widget ui-widget-content ui-corner-all\" )\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\n\t\tthis.valueDiv.remove();\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( newValue === undefined ) {\n\t\t\treturn this.options.value;\n\t\t}\n\n\t\tthis.options.value = this._constrainedValue( newValue );\n\t\tthis._refreshValue();\n\t},\n\n\t_constrainedValue: function( newValue ) {\n\t\tif ( newValue === undefined ) {\n\t\t\tnewValue = this.options.value;\n\t\t}\n\n\t\tthis.indeterminate = newValue === false;\n\n\t\t// sanitize value\n\t\tif ( typeof newValue !== \"number\" ) {\n\t\t\tnewValue = 0;\n\t\t}\n\n\t\treturn this.indeterminate ? false :\n\t\t\tMath.min( this.options.max, Math.max( this.min, newValue ) );\n\t},\n\n\t_setOptions: function( options ) {\n\t\t// Ensure \"value\" option is set after other values (like max)\n\t\tvar value = options.value;\n\t\tdelete options.value;\n\n\t\tthis._super( options );\n\n\t\tthis.options.value = this._constrainedValue( value );\n\t\tthis._refreshValue();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"max\" ) {\n\t\t\t// Don't allow a max less than min\n\t\t\tvalue = Math.max( this.min, value );\n\t\t}\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.element\n\t\t\t\t.toggleClass( \"ui-state-disabled\", !!value )\n\t\t\t\t.attr( \"aria-disabled\", value );\n\t\t}\n\t\tthis._super( key, value );\n\t},\n\n\t_percentage: function() {\n\t\treturn this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );\n\t},\n\n\t_refreshValue: function() {\n\t\tvar value = this.options.value,\n\t\t\tpercentage = this._percentage();\n\n\t\tthis.valueDiv\n\t\t\t.toggle( this.indeterminate || value > this.min )\n\t\t\t.toggleClass( \"ui-corner-right\", value === this.options.max )\n\t\t\t.width( percentage.toFixed(0) + \"%\" );\n\n\t\tthis.element.toggleClass( \"ui-progressbar-indeterminate\", this.indeterminate );\n\n\t\tif ( this.indeterminate ) {\n\t\t\tthis.element.removeAttr( \"aria-valuenow\" );\n\t\t\tif ( !this.overlayDiv ) {\n\t\t\t\tthis.overlayDiv = $( \"<div class='ui-progressbar-overlay'></div>\" ).appendTo( this.valueDiv );\n\t\t\t}\n\t\t} else {\n\t\t\tthis.element.attr({\n\t\t\t\t\"aria-valuemax\": this.options.max,\n\t\t\t\t\"aria-valuenow\": value\n\t\t\t});\n\t\t\tif ( this.overlayDiv ) {\n\t\t\t\tthis.overlayDiv.remove();\n\t\t\t\tthis.overlayDiv = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( this.oldValue !== value ) {\n\t\t\tthis.oldValue = value;\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t\tif ( value === this.options.max ) {\n\t\t\tthis._trigger( \"complete\" );\n\t\t}\n\t}\n});\n\n\n/*!\n * jQuery UI Selectable 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/selectable/\n */\n\n\nvar selectable = $.widget(\"ui.selectable\", $.ui.mouse, {\n\tversion: \"1.11.4\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoRefresh: true,\n\t\tdistance: 0,\n\t\tfilter: \"*\",\n\t\ttolerance: \"touch\",\n\n\t\t// callbacks\n\t\tselected: null,\n\t\tselecting: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tunselected: null,\n\t\tunselecting: null\n\t},\n\t_create: function() {\n\t\tvar selectees,\n\t\t\tthat = this;\n\n\t\tthis.element.addClass(\"ui-selectable\");\n\n\t\tthis.dragged = false;\n\n\t\t// cache selectee children based on filter\n\t\tthis.refresh = function() {\n\t\t\tselectees = $(that.options.filter, that.element[0]);\n\t\t\tselectees.addClass(\"ui-selectee\");\n\t\t\tselectees.each(function() {\n\t\t\t\tvar $this = $(this),\n\t\t\t\t\tpos = $this.offset();\n\t\t\t\t$.data(this, \"selectable-item\", {\n\t\t\t\t\telement: this,\n\t\t\t\t\t$element: $this,\n\t\t\t\t\tleft: pos.left,\n\t\t\t\t\ttop: pos.top,\n\t\t\t\t\tright: pos.left + $this.outerWidth(),\n\t\t\t\t\tbottom: pos.top + $this.outerHeight(),\n\t\t\t\t\tstartselected: false,\n\t\t\t\t\tselected: $this.hasClass(\"ui-selected\"),\n\t\t\t\t\tselecting: $this.hasClass(\"ui-selecting\"),\n\t\t\t\t\tunselecting: $this.hasClass(\"ui-unselecting\")\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t\tthis.refresh();\n\n\t\tthis.selectees = selectees.addClass(\"ui-selectee\");\n\n\t\tthis._mouseInit();\n\n\t\tthis.helper = $(\"<div class='ui-selectable-helper'></div>\");\n\t},\n\n\t_destroy: function() {\n\t\tthis.selectees\n\t\t\t.removeClass(\"ui-selectee\")\n\t\t\t.removeData(\"selectable-item\");\n\t\tthis.element\n\t\t\t.removeClass(\"ui-selectable ui-selectable-disabled\");\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseStart: function(event) {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.opos = [ event.pageX, event.pageY ];\n\n\t\tif (this.options.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selectees = $(options.filter, this.element[0]);\n\n\t\tthis._trigger(\"start\", event);\n\n\t\t$(options.appendTo).append(this.helper);\n\t\t// position helper (lasso)\n\t\tthis.helper.css({\n\t\t\t\"left\": event.pageX,\n\t\t\t\"top\": event.pageY,\n\t\t\t\"width\": 0,\n\t\t\t\"height\": 0\n\t\t});\n\n\t\tif (options.autoRefresh) {\n\t\t\tthis.refresh();\n\t\t}\n\n\t\tthis.selectees.filter(\".ui-selected\").each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.startselected = true;\n\t\t\tif (!event.metaKey && !event.ctrlKey) {\n\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\tselectee.selected = false;\n\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\tselectee.unselecting = true;\n\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t$(event.target).parents().addBack().each(function() {\n\t\t\tvar doSelect,\n\t\t\t\tselectee = $.data(this, \"selectable-item\");\n\t\t\tif (selectee) {\n\t\t\t\tdoSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass(\"ui-selected\");\n\t\t\t\tselectee.$element\n\t\t\t\t\t.removeClass(doSelect ? \"ui-unselecting\" : \"ui-selected\")\n\t\t\t\t\t.addClass(doSelect ? \"ui-selecting\" : \"ui-unselecting\");\n\t\t\t\tselectee.unselecting = !doSelect;\n\t\t\t\tselectee.selecting = doSelect;\n\t\t\t\tselectee.selected = doSelect;\n\t\t\t\t// selectable (UN)SELECTING callback\n\t\t\t\tif (doSelect) {\n\t\t\t\t\tthat._trigger(\"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t},\n\n\t_mouseDrag: function(event) {\n\n\t\tthis.dragged = true;\n\n\t\tif (this.options.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar tmp,\n\t\t\tthat = this,\n\t\t\toptions = this.options,\n\t\t\tx1 = this.opos[0],\n\t\t\ty1 = this.opos[1],\n\t\t\tx2 = event.pageX,\n\t\t\ty2 = event.pageY;\n\n\t\tif (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }\n\t\tif (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }\n\t\tthis.helper.css({ left: x1, top: y1, width: x2 - x1, height: y2 - y1 });\n\n\t\tthis.selectees.each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\"),\n\t\t\t\thit = false;\n\n\t\t\t//prevent helper from being selected if appendTo: selectable\n\t\t\tif (!selectee || selectee.element === that.element[0]) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (options.tolerance === \"touch\") {\n\t\t\t\thit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );\n\t\t\t} else if (options.tolerance === \"fit\") {\n\t\t\t\thit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);\n\t\t\t}\n\n\t\t\tif (hit) {\n\t\t\t\t// SELECT\n\t\t\t\tif (selectee.selected) {\n\t\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\t\tselectee.selected = false;\n\t\t\t\t}\n\t\t\t\tif (selectee.unselecting) {\n\t\t\t\t\tselectee.$element.removeClass(\"ui-unselecting\");\n\t\t\t\t\tselectee.unselecting = false;\n\t\t\t\t}\n\t\t\t\tif (!selectee.selecting) {\n\t\t\t\t\tselectee.$element.addClass(\"ui-selecting\");\n\t\t\t\t\tselectee.selecting = true;\n\t\t\t\t\t// selectable SELECTING callback\n\t\t\t\t\tthat._trigger(\"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// UNSELECT\n\t\t\t\tif (selectee.selecting) {\n\t\t\t\t\tif ((event.metaKey || event.ctrlKey) && selectee.startselected) {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selecting\");\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tselectee.$element.addClass(\"ui-selected\");\n\t\t\t\t\t\tselectee.selected = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selecting\");\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tif (selectee.startselected) {\n\t\t\t\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (selectee.selected) {\n\t\t\t\t\tif (!event.metaKey && !event.ctrlKey && !selectee.startselected) {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\t\t\tselectee.selected = false;\n\n\t\t\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\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});\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\t\tvar that = this;\n\n\t\tthis.dragged = false;\n\n\t\t$(\".ui-unselecting\", this.element[0]).each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.$element.removeClass(\"ui-unselecting\");\n\t\t\tselectee.unselecting = false;\n\t\t\tselectee.startselected = false;\n\t\t\tthat._trigger(\"unselected\", event, {\n\t\t\t\tunselected: selectee.element\n\t\t\t});\n\t\t});\n\t\t$(\".ui-selecting\", this.element[0]).each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.$element.removeClass(\"ui-selecting\").addClass(\"ui-selected\");\n\t\t\tselectee.selecting = false;\n\t\t\tselectee.selected = true;\n\t\t\tselectee.startselected = true;\n\t\t\tthat._trigger(\"selected\", event, {\n\t\t\t\tselected: selectee.element\n\t\t\t});\n\t\t});\n\t\tthis._trigger(\"stop\", event);\n\n\t\tthis.helper.remove();\n\n\t\treturn false;\n\t}\n\n});\n\n\n/*!\n * jQuery UI Selectmenu 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/selectmenu\n */\n\n\nvar selectmenu = $.widget( \"ui.selectmenu\", {\n\tversion: \"1.11.4\",\n\tdefaultElement: \"<select>\",\n\toptions: {\n\t\tappendTo: null,\n\t\tdisabled: null,\n\t\ticons: {\n\t\t\tbutton: \"ui-icon-triangle-1-s\"\n\t\t},\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\twidth: null,\n\n\t\t// callbacks\n\t\tchange: null,\n\t\tclose: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tselect: null\n\t},\n\n\t_create: function() {\n\t\tvar selectmenuId = this.element.uniqueId().attr( \"id\" );\n\t\tthis.ids = {\n\t\t\telement: selectmenuId,\n\t\t\tbutton: selectmenuId + \"-button\",\n\t\t\tmenu: selectmenuId + \"-menu\"\n\t\t};\n\n\t\tthis._drawButton();\n\t\tthis._drawMenu();\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis.disable();\n\t\t}\n\t},\n\n\t_drawButton: function() {\n\t\tvar that = this;\n\n\t\t// Associate existing label with the new button\n\t\tthis.label = $( \"label[for='\" + this.ids.element + \"']\" ).attr( \"for\", this.ids.button );\n\t\tthis._on( this.label, {\n\t\t\tclick: function( event ) {\n\t\t\t\tthis.button.focus();\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t});\n\n\t\t// Hide original select element\n\t\tthis.element.hide();\n\n\t\t// Create button\n\t\tthis.button = $( \"<span>\", {\n\t\t\t\"class\": \"ui-selectmenu-button ui-widget ui-state-default ui-corner-all\",\n\t\t\ttabindex: this.options.disabled ? -1 : 0,\n\t\t\tid: this.ids.button,\n\t\t\trole: \"combobox\",\n\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\"aria-autocomplete\": \"list\",\n\t\t\t\"aria-owns\": this.ids.menu,\n\t\t\t\"aria-haspopup\": \"true\"\n\t\t})\n\t\t\t.insertAfter( this.element );\n\n\t\t$( \"<span>\", {\n\t\t\t\"class\": \"ui-icon \" + this.options.icons.button\n\t\t})\n\t\t\t.prependTo( this.button );\n\n\t\tthis.buttonText = $( \"<span>\", {\n\t\t\t\"class\": \"ui-selectmenu-text\"\n\t\t})\n\t\t\t.appendTo( this.button );\n\n\t\tthis._setText( this.buttonText, this.element.find( \"option:selected\" ).text() );\n\t\tthis._resizeButton();\n\n\t\tthis._on( this.button, this._buttonEvents );\n\t\tthis.button.one( \"focusin\", function() {\n\n\t\t\t// Delay rendering the menu items until the button receives focus.\n\t\t\t// The menu may have already been rendered via a programmatic open.\n\t\t\tif ( !that.menuItems ) {\n\t\t\t\tthat._refreshMenu();\n\t\t\t}\n\t\t});\n\t\tthis._hoverable( this.button );\n\t\tthis._focusable( this.button );\n\t},\n\n\t_drawMenu: function() {\n\t\tvar that = this;\n\n\t\t// Create menu\n\t\tthis.menu = $( \"<ul>\", {\n\t\t\t\"aria-hidden\": \"true\",\n\t\t\t\"aria-labelledby\": this.ids.button,\n\t\t\tid: this.ids.menu\n\t\t});\n\n\t\t// Wrap menu\n\t\tthis.menuWrap = $( \"<div>\", {\n\t\t\t\"class\": \"ui-selectmenu-menu ui-front\"\n\t\t})\n\t\t\t.append( this.menu )\n\t\t\t.appendTo( this._appendTo() );\n\n\t\t// Initialize menu widget\n\t\tthis.menuInstance = this.menu\n\t\t\t.menu({\n\t\t\t\trole: \"listbox\",\n\t\t\t\tselect: function( event, ui ) {\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t// support: IE8\n\t\t\t\t\t// If the item was selected via a click, the text selection\n\t\t\t\t\t// will be destroyed in IE\n\t\t\t\t\tthat._setSelection();\n\n\t\t\t\t\tthat._select( ui.item.data( \"ui-selectmenu-item\" ), event );\n\t\t\t\t},\n\t\t\t\tfocus: function( event, ui ) {\n\t\t\t\t\tvar item = ui.item.data( \"ui-selectmenu-item\" );\n\n\t\t\t\t\t// Prevent inital focus from firing and check if its a newly focused item\n\t\t\t\t\tif ( that.focusIndex != null && item.index !== that.focusIndex ) {\n\t\t\t\t\t\tthat._trigger( \"focus\", event, { item: item } );\n\t\t\t\t\t\tif ( !that.isOpen ) {\n\t\t\t\t\t\t\tthat._select( item, event );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthat.focusIndex = item.index;\n\n\t\t\t\t\tthat.button.attr( \"aria-activedescendant\",\n\t\t\t\t\t\tthat.menuItems.eq( item.index ).attr( \"id\" ) );\n\t\t\t\t}\n\t\t\t})\n\t\t\t.menu( \"instance\" );\n\n\t\t// Adjust menu styles to dropdown\n\t\tthis.menu\n\t\t\t.addClass( \"ui-corner-bottom\" )\n\t\t\t.removeClass( \"ui-corner-all\" );\n\n\t\t// Don't close the menu on mouseleave\n\t\tthis.menuInstance._off( this.menu, \"mouseleave\" );\n\n\t\t// Cancel the menu's collapseAll on document click\n\t\tthis.menuInstance._closeOnDocumentClick = function() {\n\t\t\treturn false;\n\t\t};\n\n\t\t// Selects often contain empty items, but never contain dividers\n\t\tthis.menuInstance._isDivider = function() {\n\t\t\treturn false;\n\t\t};\n\t},\n\n\trefresh: function() {\n\t\tthis._refreshMenu();\n\t\tthis._setText( this.buttonText, this._getSelectedItem().text() );\n\t\tif ( !this.options.width ) {\n\t\t\tthis._resizeButton();\n\t\t}\n\t},\n\n\t_refreshMenu: function() {\n\t\tthis.menu.empty();\n\n\t\tvar item,\n\t\t\toptions = this.element.find( \"option\" );\n\n\t\tif ( !options.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._parseOptions( options );\n\t\tthis._renderMenu( this.menu, this.items );\n\n\t\tthis.menuInstance.refresh();\n\t\tthis.menuItems = this.menu.find( \"li\" ).not( \".ui-selectmenu-optgroup\" );\n\n\t\titem = this._getSelectedItem();\n\n\t\t// Update the menu to have the correct item focused\n\t\tthis.menuInstance.focus( null, item );\n\t\tthis._setAria( item.data( \"ui-selectmenu-item\" ) );\n\n\t\t// Set disabled state\n\t\tthis._setOption( \"disabled\", this.element.prop( \"disabled\" ) );\n\t},\n\n\topen: function( event ) {\n\t\tif ( this.options.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If this is the first time the menu is being opened, render the items\n\t\tif ( !this.menuItems ) {\n\t\t\tthis._refreshMenu();\n\t\t} else {\n\n\t\t\t// Menu clears focus on close, reset focus to selected item\n\t\t\tthis.menu.find( \".ui-state-focus\" ).removeClass( \"ui-state-focus\" );\n\t\t\tthis.menuInstance.focus( null, this._getSelectedItem() );\n\t\t}\n\n\t\tthis.isOpen = true;\n\t\tthis._toggleAttr();\n\t\tthis._resizeMenu();\n\t\tthis._position();\n\n\t\tthis._on( this.document, this._documentClick );\n\n\t\tthis._trigger( \"open\", event );\n\t},\n\n\t_position: function() {\n\t\tthis.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );\n\t},\n\n\tclose: function( event ) {\n\t\tif ( !this.isOpen ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isOpen = false;\n\t\tthis._toggleAttr();\n\n\t\tthis.range = null;\n\t\tthis._off( this.document );\n\n\t\tthis._trigger( \"close\", event );\n\t},\n\n\twidget: function() {\n\t\treturn this.button;\n\t},\n\n\tmenuWidget: function() {\n\t\treturn this.menu;\n\t},\n\n\t_renderMenu: function( ul, items ) {\n\t\tvar that = this,\n\t\t\tcurrentOptgroup = \"\";\n\n\t\t$.each( items, function( index, item ) {\n\t\t\tif ( item.optgroup !== currentOptgroup ) {\n\t\t\t\t$( \"<li>\", {\n\t\t\t\t\t\"class\": \"ui-selectmenu-optgroup ui-menu-divider\" +\n\t\t\t\t\t\t( item.element.parent( \"optgroup\" ).prop( \"disabled\" ) ?\n\t\t\t\t\t\t\t\" ui-state-disabled\" :\n\t\t\t\t\t\t\t\"\" ),\n\t\t\t\t\ttext: item.optgroup\n\t\t\t\t})\n\t\t\t\t\t.appendTo( ul );\n\n\t\t\t\tcurrentOptgroup = item.optgroup;\n\t\t\t}\n\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-selectmenu-item\", item );\n\t},\n\n\t_renderItem: function( ul, item ) {\n\t\tvar li = $( \"<li>\" );\n\n\t\tif ( item.disabled ) {\n\t\t\tli.addClass( \"ui-state-disabled\" );\n\t\t}\n\t\tthis._setText( li, item.label );\n\n\t\treturn li.appendTo( ul );\n\t},\n\n\t_setText: function( element, value ) {\n\t\tif ( value ) {\n\t\t\telement.text( value );\n\t\t} else {\n\t\t\telement.html( \" \" );\n\t\t}\n\t},\n\n\t_move: function( direction, event ) {\n\t\tvar item, next,\n\t\t\tfilter = \".ui-menu-item\";\n\n\t\tif ( this.isOpen ) {\n\t\t\titem = this.menuItems.eq( this.focusIndex );\n\t\t} else {\n\t\t\titem = this.menuItems.eq( this.element[ 0 ].selectedIndex );\n\t\t\tfilter += \":not(.ui-state-disabled)\";\n\t\t}\n\n\t\tif ( direction === \"first\" || direction === \"last\" ) {\n\t\t\tnext = item[ direction === \"first\" ? \"prevAll\" : \"nextAll\" ]( filter ).eq( -1 );\n\t\t} else {\n\t\t\tnext = item[ direction + \"All\" ]( filter ).eq( 0 );\n\t\t}\n\n\t\tif ( next.length ) {\n\t\t\tthis.menuInstance.focus( event, next );\n\t\t}\n\t},\n\n\t_getSelectedItem: function() {\n\t\treturn this.menuItems.eq( this.element[ 0 ].selectedIndex );\n\t},\n\n\t_toggle: function( event ) {\n\t\tthis[ this.isOpen ? \"close\" : \"open\" ]( event );\n\t},\n\n\t_setSelection: function() {\n\t\tvar selection;\n\n\t\tif ( !this.range ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( window.getSelection ) {\n\t\t\tselection = window.getSelection();\n\t\t\tselection.removeAllRanges();\n\t\t\tselection.addRange( this.range );\n\n\t\t// support: IE8\n\t\t} else {\n\t\t\tthis.range.select();\n\t\t}\n\n\t\t// support: IE\n\t\t// Setting the text selection kills the button focus in IE, but\n\t\t// restoring the focus doesn't kill the selection.\n\t\tthis.button.focus();\n\t},\n\n\t_documentClick: {\n\t\tmousedown: function( event ) {\n\t\t\tif ( !this.isOpen ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !$( event.target ).closest( \".ui-selectmenu-menu, #\" + this.ids.button ).length ) {\n\t\t\t\tthis.close( event );\n\t\t\t}\n\t\t}\n\t},\n\n\t_buttonEvents: {\n\n\t\t// Prevent text selection from being reset when interacting with the selectmenu (#10144)\n\t\tmousedown: function() {\n\t\t\tvar selection;\n\n\t\t\tif ( window.getSelection ) {\n\t\t\t\tselection = window.getSelection();\n\t\t\t\tif ( selection.rangeCount ) {\n\t\t\t\t\tthis.range = selection.getRangeAt( 0 );\n\t\t\t\t}\n\n\t\t\t// support: IE8\n\t\t\t} else {\n\t\t\t\tthis.range = document.selection.createRange();\n\t\t\t}\n\t\t},\n\n\t\tclick: function( event ) {\n\t\t\tthis._setSelection();\n\t\t\tthis._toggle( event );\n\t\t},\n\n\t\tkeydown: function( event ) {\n\t\t\tvar preventDefault = true;\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.TAB:\n\t\t\t\tcase $.ui.keyCode.ESCAPE:\n\t\t\t\t\tthis.close( event );\n\t\t\t\t\tpreventDefault = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.ENTER:\n\t\t\t\t\tif ( this.isOpen ) {\n\t\t\t\t\t\tthis._selectFocusedItem( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\t\tif ( event.altKey ) {\n\t\t\t\t\t\tthis._toggle( event );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._move( \"prev\", event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\t\tif ( event.altKey ) {\n\t\t\t\t\t\tthis._toggle( event );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._move( \"next\", event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.SPACE:\n\t\t\t\t\tif ( this.isOpen ) {\n\t\t\t\t\t\tthis._selectFocusedItem( event );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._toggle( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tthis._move( \"prev\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\tthis._move( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\tthis._move( \"first\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\tthis._move( \"last\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.menu.trigger( event );\n\t\t\t\t\tpreventDefault = false;\n\t\t\t}\n\n\t\t\tif ( preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t},\n\n\t_selectFocusedItem: function( event ) {\n\t\tvar item = this.menuItems.eq( this.focusIndex );\n\t\tif ( !item.hasClass( \"ui-state-disabled\" ) ) {\n\t\t\tthis._select( item.data( \"ui-selectmenu-item\" ), event );\n\t\t}\n\t},\n\n\t_select: function( item, event ) {\n\t\tvar oldIndex = this.element[ 0 ].selectedIndex;\n\n\t\t// Change native select element\n\t\tthis.element[ 0 ].selectedIndex = item.index;\n\t\tthis._setText( this.buttonText, item.label );\n\t\tthis._setAria( item );\n\t\tthis._trigger( \"select\", event, { item: item } );\n\n\t\tif ( item.index !== oldIndex ) {\n\t\t\tthis._trigger( \"change\", event, { item: item } );\n\t\t}\n\n\t\tthis.close( event );\n\t},\n\n\t_setAria: function( item ) {\n\t\tvar id = this.menuItems.eq( item.index ).attr( \"id\" );\n\n\t\tthis.button.attr({\n\t\t\t\"aria-labelledby\": id,\n\t\t\t\"aria-activedescendant\": id\n\t\t});\n\t\tthis.menu.attr( \"aria-activedescendant\", id );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis.button.find( \"span.ui-icon\" )\n\t\t\t\t.removeClass( this.options.icons.button )\n\t\t\t\t.addClass( value.button );\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.menuWrap.appendTo( this._appendTo() );\n\t\t}\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.menuInstance.option( \"disabled\", value );\n\t\t\tthis.button\n\t\t\t\t.toggleClass( \"ui-state-disabled\", value )\n\t\t\t\t.attr( \"aria-disabled\", value );\n\n\t\t\tthis.element.prop( \"disabled\", value );\n\t\t\tif ( value ) {\n\t\t\t\tthis.button.attr( \"tabindex\", -1 );\n\t\t\t\tthis.close();\n\t\t\t} else {\n\t\t\t\tthis.button.attr( \"tabindex\", 0 );\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"width\" ) {\n\t\t\tthis._resizeButton();\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 || !element[ 0 ] ) {\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_toggleAttr: function() {\n\t\tthis.button\n\t\t\t.toggleClass( \"ui-corner-top\", this.isOpen )\n\t\t\t.toggleClass( \"ui-corner-all\", !this.isOpen )\n\t\t\t.attr( \"aria-expanded\", this.isOpen );\n\t\tthis.menuWrap.toggleClass( \"ui-selectmenu-open\", this.isOpen );\n\t\tthis.menu.attr( \"aria-hidden\", !this.isOpen );\n\t},\n\n\t_resizeButton: function() {\n\t\tvar width = this.options.width;\n\n\t\tif ( !width ) {\n\t\t\twidth = this.element.show().outerWidth();\n\t\t\tthis.element.hide();\n\t\t}\n\n\t\tthis.button.outerWidth( width );\n\t},\n\n\t_resizeMenu: function() {\n\t\tthis.menu.outerWidth( Math.max(\n\t\t\tthis.button.outerWidth(),\n\n\t\t\t// support: IE10\n\t\t\t// IE10 wraps long text (possibly a rounding bug)\n\t\t\t// so we add 1px to avoid the wrapping\n\t\t\tthis.menu.width( \"\" ).outerWidth() + 1\n\t\t) );\n\t},\n\n\t_getCreateOptions: function() {\n\t\treturn { disabled: this.element.prop( \"disabled\" ) };\n\t},\n\n\t_parseOptions: function( options ) {\n\t\tvar data = [];\n\t\toptions.each(function( index, item ) {\n\t\t\tvar option = $( item ),\n\t\t\t\toptgroup = option.parent( \"optgroup\" );\n\t\t\tdata.push({\n\t\t\t\telement: option,\n\t\t\t\tindex: index,\n\t\t\t\tvalue: option.val(),\n\t\t\t\tlabel: option.text(),\n\t\t\t\toptgroup: optgroup.attr( \"label\" ) || \"\",\n\t\t\t\tdisabled: optgroup.prop( \"disabled\" ) || option.prop( \"disabled\" )\n\t\t\t});\n\t\t});\n\t\tthis.items = data;\n\t},\n\n\t_destroy: function() {\n\t\tthis.menuWrap.remove();\n\t\tthis.button.remove();\n\t\tthis.element.show();\n\t\tthis.element.removeUniqueId();\n\t\tthis.label.attr( \"for\", this.ids.element );\n\t}\n});\n\n\n/*!\n * jQuery UI Slider 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\n\nvar slider = $.widget( \"ui.slider\", $.ui.mouse, {\n\tversion: \"1.11.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// number of pages in a slider\n\t// (how many times can you page up/down to go through the whole range)\n\tnumPages: 5,\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\t\tthis._calculateNewMax();\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 = \"<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>\",\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\tthis._off( this.handles );\n\t\tthis._on( this.handles, this._handleEvents );\n\t\tthis._hoverable( this.handles );\n\t\tthis._focusable( this.handles );\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\tif ( key === \"disabled\" ) {\n\t\t\tthis.element.toggleClass( \"ui-state-disabled\", !!value );\n\t\t}\n\n\t\tthis._super( key, value );\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\n\t\t\t\t// Reset positioning from previous orientation\n\t\t\t\tthis.handles.css( value === \"horizontal\" ? \"bottom\" : \"left\", \"\" );\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 \"step\":\n\t\t\tcase \"min\":\n\t\t\tcase \"max\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._calculateNewMax();\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_calculateNewMax: function() {\n\t\tvar max = this.options.max,\n\t\t\tmin = this._valueMin(),\n\t\t\tstep = this.options.step,\n\t\t\taboveMin = Math.floor( ( +( max - min ).toFixed( this._precision() ) ) / step ) * step;\n\t\tmax = aboveMin + min;\n\t\tthis.max = parseFloat( max.toFixed( this._precision() ) );\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_valueMin: function() {\n\t\treturn this.options.min;\n\t},\n\n\t_valueMax: function() {\n\t\treturn this.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(\n\t\t\t\t\t\tcurVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\tnewVal = this._trimAlignValue(\n\t\t\t\t\t\tcurVal - ( (this._valueMax() - this._valueMin()) / this.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\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/*!\n * jQuery UI Sortable 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\n\nvar sortable = $.widget(\"ui.sortable\", $.ui.mouse, {\n\tversion: \"1.11.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\n\t_isOverAxis: function( x, reference, size ) {\n\t\treturn ( x >= reference ) && ( x < ( reference + size ) );\n\t},\n\n\t_isFloating: function( item ) {\n\t\treturn (/left|right/).test(item.css(\"float\")) || (/inline|table-cell/).test(item.css(\"display\"));\n\t},\n\n\t_create: function() {\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 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\tthis._setHandleClassName();\n\n\t\t//We're ready to go\n\t\tthis.ready = true;\n\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"handle\" ) {\n\t\t\tthis._setHandleClassName();\n\t\t}\n\t},\n\n\t_setHandleClassName: function() {\n\t\tthis.element.find( \".ui-sortable-handle\" ).removeClass( \"ui-sortable-handle\" );\n\t\t$.each( this.items, function() {\n\t\t\t( this.instance.options.handle ?\n\t\t\t\tthis.item.find( this.instance.options.handle ) : this.item )\n\t\t\t\t.addClass( \"ui-sortable-handle\" );\n\t\t});\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-sortable ui-sortable-disabled\" )\n\t\t\t.find( \".ui-sortable-handle\" )\n\t\t\t\t.removeClass( \"ui-sortable-handle\" );\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_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] !== this.document[0] && 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] !== this.document[0] && 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 - this.document.scrollTop() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed);\n\t\t\t\t} else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed);\n\t\t\t\t}\n\n\t\t\t\tif(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed);\n\t\t\t\t} else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = this.document.scrollLeft(this.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 between 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] === this.document[0].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] === this.document[0].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\") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),\n\t\t\tisOverElementWidth = (this.options.axis === \"y\") || this._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 = this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),\n\t\t\tisOverRightHalf = this._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._setHandleClassName();\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], this.document[0]);\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], this.document[0]);\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// Determine whether items are being displayed horizontally\n\t\tthis.floating = this.items.length ?\n\t\t\tthis.options.axis === \"x\" || this._isFloating( this.items[ 0 ].item ) :\n\t\t\tfalse;\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 = 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 === \"tbody\" ) {\n\t\t\t\t\t\tthat._createTrPlaceholder(\n\t\t\t\t\t\t\tthat.currentItem.find( \"tr\" ).eq( 0 ),\n\t\t\t\t\t\t\t$( \"<tr>\", that.document[ 0 ] ).appendTo( element )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( nodeName === \"tr\" ) {\n\t\t\t\t\t\tthat._createTrPlaceholder( that.currentItem, element );\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_createTrPlaceholder: function( sourceTr, targetTr ) {\n\t\tvar that = this;\n\n\t\tsourceTr.children().each(function() {\n\t\t\t$( \"<td> </td>\", that.document[ 0 ] )\n\t\t\t\t.attr( \"colspan\", $( this ).attr( \"colspan\" ) || 1 )\n\t\t\t\t.appendTo( targetTr );\n\t\t});\n\t},\n\n\t_contactContainers: function(event) {\n\t\tvar i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis,\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 || this._isFloating(this.currentItem);\n\t\t\tposProperty = floating ? \"left\" : \"top\";\n\t\t\tsizeProperty = floating ? \"width\" : \"height\";\n\t\t\taxis = floating ? \"clientX\" : \"clientY\";\n\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\n\t\t\t\tcur = this.items[j].item.offset()[posProperty];\n\t\t\t\tnearBottom = false;\n\t\t\t\tif ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {\n\t\t\t\t\tnearBottom = true;\n\t\t\t\t}\n\n\t\t\t\tif ( Math.abs( event[ axis ] - cur ) < dist ) {\n\t\t\t\t\tdist = Math.abs( event[ axis ] - cur );\n\t\t\t\t\titemWithLeastDistance = 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\tif ( !this.currentContainer.containerCache.over ) {\n\t\t\t\t\tthis.containers[ innermostIndex ]._trigger( \"over\", event, this._uiHash() );\n\t\t\t\t\tthis.currentContainer.containerCache.over = 1;\n\t\t\t\t}\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] !== this.document[0] && $.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] === this.document[0].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\to.containment === \"document\" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t(o.containment === \"document\" ? this.document.width() : this.window.height() || this.document[0].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] !== this.document[0] && $.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] !== this.document[0] && $.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] !== this.document[0] && 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\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.cancelHelperRemoval ) {\n\t\t\tif ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\t\t\tthis.helper = null;\n\t\t}\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 !this.cancelHelperRemoval;\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\n/*!\n * jQuery UI Spinner 1.11.4\n * http://jqueryui.com\n *\n * Copyright 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\n\nfunction spinner_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\nvar spinner = $.widget( \"ui.spinner\", {\n\tversion: \"1.11.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\tthis.widget().toggleClass( \"ui-state-disabled\", !!value );\n\t\t\tthis.element.prop( \"disabled\", !!value );\n\t\t\tthis.buttons.button( value ? \"disable\" : \"enable\" );\n\t\t}\n\t},\n\n\t_setOptions: spinner_modifier(function( options ) {\n\t\tthis._super( options );\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\tisValid: function() {\n\t\tvar value = this.value();\n\n\t\t// null is invalid\n\t\tif ( value === null ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// if value gets adjusted, it's invalid\n\t\treturn value === this._adjustValue( value );\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: spinner_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: spinner_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: spinner_modifier(function( pages ) {\n\t\tthis._stepUp( (pages || 1) * this.options.page );\n\t}),\n\n\tpageDown: spinner_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\tspinner_modifier( this._value ).call( this, newVal );\n\t},\n\n\twidget: function() {\n\t\treturn this.uiSpinner;\n\t}\n});\n\n\n/*!\n * jQuery UI Tabs 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/tabs/\n */\n\n\nvar tabs = $.widget( \"ui.tabs\", {\n\tversion: \"1.11.4\",\n\tdelay: 300,\n\toptions: {\n\t\tactive: null,\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\theightStyle: \"content\",\n\t\thide: null,\n\t\tshow: null,\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tbeforeActivate: null,\n\t\tbeforeLoad: null,\n\t\tload: null\n\t},\n\n\t_isLocal: (function() {\n\t\tvar rhash = /#.*$/;\n\n\t\treturn function( anchor ) {\n\t\t\tvar anchorUrl, locationUrl;\n\n\t\t\t// support: IE7\n\t\t\t// IE7 doesn't normalize the href property when set via script (#9317)\n\t\t\tanchor = anchor.cloneNode( false );\n\n\t\t\tanchorUrl = anchor.href.replace( rhash, \"\" );\n\t\t\tlocationUrl = location.href.replace( rhash, \"\" );\n\n\t\t\t// decoding may throw an error if the URL isn't UTF-8 (#9518)\n\t\t\ttry {\n\t\t\t\tanchorUrl = decodeURIComponent( anchorUrl );\n\t\t\t} catch ( error ) {}\n\t\t\ttry {\n\t\t\t\tlocationUrl = decodeURIComponent( locationUrl );\n\t\t\t} catch ( error ) {}\n\n\t\t\treturn anchor.hash.length > 1 && anchorUrl === locationUrl;\n\t\t};\n\t})(),\n\n\t_create: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.running = false;\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-tabs ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.toggleClass( \"ui-tabs-collapsible\", options.collapsible );\n\n\t\tthis._processTabs();\n\t\toptions.active = this._initialActive();\n\n\t\t// Take disabling tabs via class attribute from HTML\n\t\t// into account and update option properly.\n\t\tif ( $.isArray( options.disabled ) ) {\n\t\t\toptions.disabled = $.unique( options.disabled.concat(\n\t\t\t\t$.map( this.tabs.filter( \".ui-state-disabled\" ), function( li ) {\n\t\t\t\t\treturn that.tabs.index( li );\n\t\t\t\t})\n\t\t\t) ).sort();\n\t\t}\n\n\t\t// check for length avoids error when initializing empty list\n\t\tif ( this.options.active !== false && this.anchors.length ) {\n\t\t\tthis.active = this._findActive( options.active );\n\t\t} else {\n\t\t\tthis.active = $();\n\t\t}\n\n\t\tthis._refresh();\n\n\t\tif ( this.active.length ) {\n\t\t\tthis.load( options.active );\n\t\t}\n\t},\n\n\t_initialActive: function() {\n\t\tvar active = this.options.active,\n\t\t\tcollapsible = this.options.collapsible,\n\t\t\tlocationHash = location.hash.substring( 1 );\n\n\t\tif ( active === null ) {\n\t\t\t// check the fragment identifier in the URL\n\t\t\tif ( locationHash ) {\n\t\t\t\tthis.tabs.each(function( i, tab ) {\n\t\t\t\t\tif ( $( tab ).attr( \"aria-controls\" ) === locationHash ) {\n\t\t\t\t\t\tactive = i;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// check for a tab marked active via a class\n\t\t\tif ( active === null ) {\n\t\t\t\tactive = this.tabs.index( this.tabs.filter( \".ui-tabs-active\" ) );\n\t\t\t}\n\n\t\t\t// no active tab, set to false\n\t\t\tif ( active === null || active === -1 ) {\n\t\t\t\tactive = this.tabs.length ? 0 : false;\n\t\t\t}\n\t\t}\n\n\t\t// handle numbers: negative, out of range\n\t\tif ( active !== false ) {\n\t\t\tactive = this.tabs.index( this.tabs.eq( active ) );\n\t\t\tif ( active === -1 ) {\n\t\t\t\tactive = collapsible ? false : 0;\n\t\t\t}\n\t\t}\n\n\t\t// don't allow collapsible: false and active: false\n\t\tif ( !collapsible && active === false && this.anchors.length ) {\n\t\t\tactive = 0;\n\t\t}\n\n\t\treturn active;\n\t},\n\n\t_getCreateEventData: function() {\n\t\treturn {\n\t\t\ttab: this.active,\n\t\t\tpanel: !this.active.length ? $() : this._getPanelForTab( this.active )\n\t\t};\n\t},\n\n\t_tabKeydown: function( event ) {\n\t\tvar focusedTab = $( this.document[0].activeElement ).closest( \"li\" ),\n\t\t\tselectedIndex = this.tabs.index( focusedTab ),\n\t\t\tgoingForward = true;\n\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tselectedIndex++;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.UP:\n\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\tgoingForward = false;\n\t\t\t\tselectedIndex--;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tselectedIndex = this.anchors.length - 1;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tselectedIndex = 0;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.SPACE:\n\t\t\t\t// Activate only, no collapsing\n\t\t\t\tevent.preventDefault();\n\t\t\t\tclearTimeout( this.activating );\n\t\t\t\tthis._activate( selectedIndex );\n\t\t\t\treturn;\n\t\t\tcase $.ui.keyCode.ENTER:\n\t\t\t\t// Toggle (cancel delayed activation, allow collapsing)\n\t\t\t\tevent.preventDefault();\n\t\t\t\tclearTimeout( this.activating );\n\t\t\t\t// Determine if we should collapse or activate\n\t\t\t\tthis._activate( selectedIndex === this.options.active ? false : selectedIndex );\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\n\t\t// Focus the appropriate tab, based on which key was pressed\n\t\tevent.preventDefault();\n\t\tclearTimeout( this.activating );\n\t\tselectedIndex = this._focusNextTab( selectedIndex, goingForward );\n\n\t\t// Navigating with control/command key will prevent automatic activation\n\t\tif ( !event.ctrlKey && !event.metaKey ) {\n\n\t\t\t// Update aria-selected immediately so that AT think the tab is already selected.\n\t\t\t// Otherwise AT may confuse the user by stating that they need to activate the tab,\n\t\t\t// but the tab will already be activated by the time the announcement finishes.\n\t\t\tfocusedTab.attr( \"aria-selected\", \"false\" );\n\t\t\tthis.tabs.eq( selectedIndex ).attr( \"aria-selected\", \"true\" );\n\n\t\t\tthis.activating = this._delay(function() {\n\t\t\t\tthis.option( \"active\", selectedIndex );\n\t\t\t}, this.delay );\n\t\t}\n\t},\n\n\t_panelKeydown: function( event ) {\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ctrl+up moves focus to the current tab\n\t\tif ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.active.focus();\n\t\t}\n\t},\n\n\t// Alt+page up/down moves focus to the previous/next tab (and activates)\n\t_handlePageNav: function( event ) {\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active - 1, false ) );\n\t\t\treturn true;\n\t\t}\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active + 1, true ) );\n\t\t\treturn true;\n\t\t}\n\t},\n\n\t_findNextTab: function( index, goingForward ) {\n\t\tvar lastTabIndex = this.tabs.length - 1;\n\n\t\tfunction constrain() {\n\t\t\tif ( index > lastTabIndex ) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tif ( index < 0 ) {\n\t\t\t\tindex = lastTabIndex;\n\t\t\t}\n\t\t\treturn index;\n\t\t}\n\n\t\twhile ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {\n\t\t\tindex = goingForward ? index + 1 : index - 1;\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_focusNextTab: function( index, goingForward ) {\n\t\tindex = this._findNextTab( index, goingForward );\n\t\tthis.tabs.eq( index ).focus();\n\t\treturn index;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"active\" ) {\n\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\tthis._activate( value );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\t// don't use the widget factory's disabled handling\n\t\t\tthis._setupDisabled( value );\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value);\n\n\t\tif ( key === \"collapsible\" ) {\n\t\t\tthis.element.toggleClass( \"ui-tabs-collapsible\", value );\n\t\t\t// Setting collapsible: false while collapsed; open first panel\n\t\t\tif ( !value && this.options.active === false ) {\n\t\t\t\tthis._activate( 0 );\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"event\" ) {\n\t\t\tthis._setupEvents( value );\n\t\t}\n\n\t\tif ( key === \"heightStyle\" ) {\n\t\t\tthis._setupHeightStyle( value );\n\t\t}\n\t},\n\n\t_sanitizeSelector: function( hash ) {\n\t\treturn hash ? hash.replace( /[!\"$%&'()*+,.\\/:;<=>?@\\[\\]\\^`{|}~]/g, \"\\\\$&\" ) : \"\";\n\t},\n\n\trefresh: function() {\n\t\tvar options = this.options,\n\t\t\tlis = this.tablist.children( \":has(a[href])\" );\n\n\t\t// get disabled tabs from class attribute from HTML\n\t\t// this will get converted to a boolean if needed in _refresh()\n\t\toptions.disabled = $.map( lis.filter( \".ui-state-disabled\" ), function( tab ) {\n\t\t\treturn lis.index( tab );\n\t\t});\n\n\t\tthis._processTabs();\n\n\t\t// was collapsed or no tabs\n\t\tif ( options.active === false || !this.anchors.length ) {\n\t\t\toptions.active = false;\n\t\t\tthis.active = $();\n\t\t// was active, but active tab is gone\n\t\t} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {\n\t\t\t// all remaining tabs are disabled\n\t\t\tif ( this.tabs.length === options.disabled.length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\t\t\t// activate previous tab\n\t\t\t} else {\n\t\t\t\tthis._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );\n\t\t\t}\n\t\t// was active, active tab still exists\n\t\t} else {\n\t\t\t// make sure active index is correct\n\t\t\toptions.active = this.tabs.index( this.active );\n\t\t}\n\n\t\tthis._refresh();\n\t},\n\n\t_refresh: function() {\n\t\tthis._setupDisabled( this.options.disabled );\n\t\tthis._setupEvents( this.options.event );\n\t\tthis._setupHeightStyle( this.options.heightStyle );\n\n\t\tthis.tabs.not( this.active ).attr({\n\t\t\t\"aria-selected\": \"false\",\n\t\t\t\"aria-expanded\": \"false\",\n\t\t\ttabIndex: -1\n\t\t});\n\t\tthis.panels.not( this._getPanelForTab( this.active ) )\n\t\t\t.hide()\n\t\t\t.attr({\n\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t});\n\n\t\t// Make sure one tab is in the tab order\n\t\tif ( !this.active.length ) {\n\t\t\tthis.tabs.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tthis.active\n\t\t\t\t.addClass( \"ui-tabs-active ui-state-active\" )\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t});\n\t\t\tthis._getPanelForTab( this.active )\n\t\t\t\t.show()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t});\n\t\t}\n\t},\n\n\t_processTabs: function() {\n\t\tvar that = this,\n\t\t\tprevTabs = this.tabs,\n\t\t\tprevAnchors = this.anchors,\n\t\t\tprevPanels = this.panels;\n\n\t\tthis.tablist = this._getList()\n\t\t\t.addClass( \"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\" )\n\t\t\t.attr( \"role\", \"tablist\" )\n\n\t\t\t// Prevent users from focusing disabled tabs via click\n\t\t\t.delegate( \"> li\", \"mousedown\" + this.eventNamespace, function( event ) {\n\t\t\t\tif ( $( this ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// support: IE <9\n\t\t\t// Preventing the default action in mousedown doesn't prevent IE\n\t\t\t// from focusing the element, so if the anchor gets focused, blur.\n\t\t\t// We don't have to worry about focusing the previously focused\n\t\t\t// element since clicking on a non-focusable element should focus\n\t\t\t// the body anyway.\n\t\t\t.delegate( \".ui-tabs-anchor\", \"focus\" + this.eventNamespace, function() {\n\t\t\t\tif ( $( this ).closest( \"li\" ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis.tabs = this.tablist.find( \"> li:has(a[href])\" )\n\t\t\t.addClass( \"ui-state-default ui-corner-top\" )\n\t\t\t.attr({\n\t\t\t\trole: \"tab\",\n\t\t\t\ttabIndex: -1\n\t\t\t});\n\n\t\tthis.anchors = this.tabs.map(function() {\n\t\t\t\treturn $( \"a\", this )[ 0 ];\n\t\t\t})\n\t\t\t.addClass( \"ui-tabs-anchor\" )\n\t\t\t.attr({\n\t\t\t\trole: \"presentation\",\n\t\t\t\ttabIndex: -1\n\t\t\t});\n\n\t\tthis.panels = $();\n\n\t\tthis.anchors.each(function( i, anchor ) {\n\t\t\tvar selector, panel, panelId,\n\t\t\t\tanchorId = $( anchor ).uniqueId().attr( \"id\" ),\n\t\t\t\ttab = $( anchor ).closest( \"li\" ),\n\t\t\t\toriginalAriaControls = tab.attr( \"aria-controls\" );\n\n\t\t\t// inline tab\n\t\t\tif ( that._isLocal( anchor ) ) {\n\t\t\t\tselector = anchor.hash;\n\t\t\t\tpanelId = selector.substring( 1 );\n\t\t\t\tpanel = that.element.find( that._sanitizeSelector( selector ) );\n\t\t\t// remote tab\n\t\t\t} else {\n\t\t\t\t// If the tab doesn't already have aria-controls,\n\t\t\t\t// generate an id by using a throw-away element\n\t\t\t\tpanelId = tab.attr( \"aria-controls\" ) || $( {} ).uniqueId()[ 0 ].id;\n\t\t\t\tselector = \"#\" + panelId;\n\t\t\t\tpanel = that.element.find( selector );\n\t\t\t\tif ( !panel.length ) {\n\t\t\t\t\tpanel = that._createPanel( panelId );\n\t\t\t\t\tpanel.insertAfter( that.panels[ i - 1 ] || that.tablist );\n\t\t\t\t}\n\t\t\t\tpanel.attr( \"aria-live\", \"polite\" );\n\t\t\t}\n\n\t\t\tif ( panel.length) {\n\t\t\t\tthat.panels = that.panels.add( panel );\n\t\t\t}\n\t\t\tif ( originalAriaControls ) {\n\t\t\t\ttab.data( \"ui-tabs-aria-controls\", originalAriaControls );\n\t\t\t}\n\t\t\ttab.attr({\n\t\t\t\t\"aria-controls\": panelId,\n\t\t\t\t\"aria-labelledby\": anchorId\n\t\t\t});\n\t\t\tpanel.attr( \"aria-labelledby\", anchorId );\n\t\t});\n\n\t\tthis.panels\n\t\t\t.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom\" )\n\t\t\t.attr( \"role\", \"tabpanel\" );\n\n\t\t// Avoid memory leaks (#10056)\n\t\tif ( prevTabs ) {\n\t\t\tthis._off( prevTabs.not( this.tabs ) );\n\t\t\tthis._off( prevAnchors.not( this.anchors ) );\n\t\t\tthis._off( prevPanels.not( this.panels ) );\n\t\t}\n\t},\n\n\t// allow overriding how to find the list for rare usage scenarios (#7715)\n\t_getList: function() {\n\t\treturn this.tablist || this.element.find( \"ol,ul\" ).eq( 0 );\n\t},\n\n\t_createPanel: function( id ) {\n\t\treturn $( \"<div>\" )\n\t\t\t.attr( \"id\", id )\n\t\t\t.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom\" )\n\t\t\t.data( \"ui-tabs-destroy\", true );\n\t},\n\n\t_setupDisabled: function( disabled ) {\n\t\tif ( $.isArray( disabled ) ) {\n\t\t\tif ( !disabled.length ) {\n\t\t\t\tdisabled = false;\n\t\t\t} else if ( disabled.length === this.anchors.length ) {\n\t\t\t\tdisabled = true;\n\t\t\t}\n\t\t}\n\n\t\t// disable tabs\n\t\tfor ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {\n\t\t\tif ( disabled === true || $.inArray( i, disabled ) !== -1 ) {\n\t\t\t\t$( li )\n\t\t\t\t\t.addClass( \"ui-state-disabled\" )\n\t\t\t\t\t.attr( \"aria-disabled\", \"true\" );\n\t\t\t} else {\n\t\t\t\t$( li )\n\t\t\t\t\t.removeClass( \"ui-state-disabled\" )\n\t\t\t\t\t.removeAttr( \"aria-disabled\" );\n\t\t\t}\n\t\t}\n\n\t\tthis.options.disabled = disabled;\n\t},\n\n\t_setupEvents: function( event ) {\n\t\tvar events = {};\n\t\tif ( event ) {\n\t\t\t$.each( event.split(\" \"), function( index, eventName ) {\n\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t});\n\t\t}\n\n\t\tthis._off( this.anchors.add( this.tabs ).add( this.panels ) );\n\t\t// Always prevent the default action, even when disabled\n\t\tthis._on( true, this.anchors, {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t});\n\t\tthis._on( this.anchors, events );\n\t\tthis._on( this.tabs, { keydown: \"_tabKeydown\" } );\n\t\tthis._on( this.panels, { keydown: \"_panelKeydown\" } );\n\n\t\tthis._focusable( this.tabs );\n\t\tthis._hoverable( this.tabs );\n\t},\n\n\t_setupHeightStyle: function( heightStyle ) {\n\t\tvar maxHeight,\n\t\t\tparent = this.element.parent();\n\n\t\tif ( heightStyle === \"fill\" ) {\n\t\t\tmaxHeight = parent.height();\n\t\t\tmaxHeight -= this.element.outerHeight() - this.element.height();\n\n\t\t\tthis.element.siblings( \":visible\" ).each(function() {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tposition = elem.css( \"position\" );\n\n\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.element.children().not( this.panels ).each(function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.panels.each(function() {\n\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t})\n\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.panels.each(function() {\n\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).height( \"\" ).height() );\n\t\t\t}).height( maxHeight );\n\t\t}\n\t},\n\n\t_eventHandler: function( event ) {\n\t\tvar options = this.options,\n\t\t\tactive = this.active,\n\t\t\tanchor = $( event.currentTarget ),\n\t\t\ttab = anchor.closest( \"li\" ),\n\t\t\tclickedIsActive = tab[ 0 ] === active[ 0 ],\n\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\ttoShow = collapsing ? $() : this._getPanelForTab( tab ),\n\t\t\ttoHide = !active.length ? $() : this._getPanelForTab( active ),\n\t\t\teventData = {\n\t\t\t\toldTab: active,\n\t\t\t\toldPanel: toHide,\n\t\t\t\tnewTab: collapsing ? $() : tab,\n\t\t\t\tnewPanel: toShow\n\t\t\t};\n\n\t\tevent.preventDefault();\n\n\t\tif ( tab.hasClass( \"ui-state-disabled\" ) ||\n\t\t\t\t// tab is already loading\n\t\t\t\ttab.hasClass( \"ui-tabs-loading\" ) ||\n\t\t\t\t// can't switch durning an animation\n\t\t\t\tthis.running ||\n\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\t\t\t\t// allow canceling activation\n\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions.active = collapsing ? false : this.tabs.index( tab );\n\n\t\tthis.active = clickedIsActive ? $() : tab;\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tif ( !toHide.length && !toShow.length ) {\n\t\t\t$.error( \"jQuery UI Tabs: Mismatching fragment identifier.\" );\n\t\t}\n\n\t\tif ( toShow.length ) {\n\t\t\tthis.load( this.tabs.index( tab ), event );\n\t\t}\n\t\tthis._toggle( event, eventData );\n\t},\n\n\t// handles show/hide for selecting tabs\n\t_toggle: function( event, eventData ) {\n\t\tvar that = this,\n\t\t\ttoShow = eventData.newPanel,\n\t\t\ttoHide = eventData.oldPanel;\n\n\t\tthis.running = true;\n\n\t\tfunction complete() {\n\t\t\tthat.running = false;\n\t\t\tthat._trigger( \"activate\", event, eventData );\n\t\t}\n\n\t\tfunction show() {\n\t\t\teventData.newTab.closest( \"li\" ).addClass( \"ui-tabs-active ui-state-active\" );\n\n\t\t\tif ( toShow.length && that.options.show ) {\n\t\t\t\tthat._show( toShow, that.options.show, complete );\n\t\t\t} else {\n\t\t\t\ttoShow.show();\n\t\t\t\tcomplete();\n\t\t\t}\n\t\t}\n\n\t\t// start out by hiding, then showing, then completing\n\t\tif ( toHide.length && this.options.hide ) {\n\t\t\tthis._hide( toHide, this.options.hide, function() {\n\t\t\t\teventData.oldTab.closest( \"li\" ).removeClass( \"ui-tabs-active ui-state-active\" );\n\t\t\t\tshow();\n\t\t\t});\n\t\t} else {\n\t\t\teventData.oldTab.closest( \"li\" ).removeClass( \"ui-tabs-active ui-state-active\" );\n\t\t\ttoHide.hide();\n\t\t\tshow();\n\t\t}\n\n\t\ttoHide.attr( \"aria-hidden\", \"true\" );\n\t\teventData.oldTab.attr({\n\t\t\t\"aria-selected\": \"false\",\n\t\t\t\"aria-expanded\": \"false\"\n\t\t});\n\t\t// If we're switching tabs, remove the old tab from the tab order.\n\t\t// If we're opening from collapsed state, remove the previous tab from the tab order.\n\t\t// If we're collapsing, then keep the collapsing tab in the tab order.\n\t\tif ( toShow.length && toHide.length ) {\n\t\t\teventData.oldTab.attr( \"tabIndex\", -1 );\n\t\t} else if ( toShow.length ) {\n\t\t\tthis.tabs.filter(function() {\n\t\t\t\treturn $( this ).attr( \"tabIndex\" ) === 0;\n\t\t\t})\n\t\t\t.attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\ttoShow.attr( \"aria-hidden\", \"false\" );\n\t\teventData.newTab.attr({\n\t\t\t\"aria-selected\": \"true\",\n\t\t\t\"aria-expanded\": \"true\",\n\t\t\ttabIndex: 0\n\t\t});\n\t},\n\n\t_activate: function( index ) {\n\t\tvar anchor,\n\t\t\tactive = this._findActive( index );\n\n\t\t// trying to activate the already active panel\n\t\tif ( active[ 0 ] === this.active[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// trying to collapse, simulate a click on the current active header\n\t\tif ( !active.length ) {\n\t\t\tactive = this.active;\n\t\t}\n\n\t\tanchor = active.find( \".ui-tabs-anchor\" )[ 0 ];\n\t\tthis._eventHandler({\n\t\t\ttarget: anchor,\n\t\t\tcurrentTarget: anchor,\n\t\t\tpreventDefault: $.noop\n\t\t});\n\t},\n\n\t_findActive: function( index ) {\n\t\treturn index === false ? $() : this.tabs.eq( index );\n\t},\n\n\t_getIndex: function( index ) {\n\t\t// meta-function to give users option to provide a href string instead of a numerical index.\n\t\tif ( typeof index === \"string\" ) {\n\t\t\tindex = this.anchors.index( this.anchors.filter( \"[href$='\" + index + \"']\" ) );\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_destroy: function() {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tthis.element.removeClass( \"ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible\" );\n\n\t\tthis.tablist\n\t\t\t.removeClass( \"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\" )\n\t\t\t.removeAttr( \"role\" );\n\n\t\tthis.anchors\n\t\t\t.removeClass( \"ui-tabs-anchor\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t.removeUniqueId();\n\n\t\tthis.tablist.unbind( this.eventNamespace );\n\n\t\tthis.tabs.add( this.panels ).each(function() {\n\t\t\tif ( $.data( this, \"ui-tabs-destroy\" ) ) {\n\t\t\t\t$( this ).remove();\n\t\t\t} else {\n\t\t\t\t$( this )\n\t\t\t\t\t.removeClass( \"ui-state-default ui-state-active ui-state-disabled \" +\n\t\t\t\t\t\t\"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel\" )\n\t\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t\t.removeAttr( \"aria-live\" )\n\t\t\t\t\t.removeAttr( \"aria-busy\" )\n\t\t\t\t\t.removeAttr( \"aria-selected\" )\n\t\t\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t\t\t.removeAttr( \"role\" );\n\t\t\t}\n\t\t});\n\n\t\tthis.tabs.each(function() {\n\t\t\tvar li = $( this ),\n\t\t\t\tprev = li.data( \"ui-tabs-aria-controls\" );\n\t\t\tif ( prev ) {\n\t\t\t\tli\n\t\t\t\t\t.attr( \"aria-controls\", prev )\n\t\t\t\t\t.removeData( \"ui-tabs-aria-controls\" );\n\t\t\t} else {\n\t\t\t\tli.removeAttr( \"aria-controls\" );\n\t\t\t}\n\t\t});\n\n\t\tthis.panels.show();\n\n\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\tthis.panels.css( \"height\", \"\" );\n\t\t}\n\t},\n\n\tenable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = false;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.map( disabled, function( num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdisabled = $.map( this.tabs, function( li, num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tthis._setupDisabled( disabled );\n\t},\n\n\tdisable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = true;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.inArray( index, disabled ) !== -1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.merge( [ index ], disabled ).sort();\n\t\t\t} else {\n\t\t\t\tdisabled = [ index ];\n\t\t\t}\n\t\t}\n\t\tthis._setupDisabled( disabled );\n\t},\n\n\tload: function( index, event ) {\n\t\tindex = this._getIndex( index );\n\t\tvar that = this,\n\t\t\ttab = this.tabs.eq( index ),\n\t\t\tanchor = tab.find( \".ui-tabs-anchor\" ),\n\t\t\tpanel = this._getPanelForTab( tab ),\n\t\t\teventData = {\n\t\t\t\ttab: tab,\n\t\t\t\tpanel: panel\n\t\t\t},\n\t\t\tcomplete = function( jqXHR, status ) {\n\t\t\t\tif ( status === \"abort\" ) {\n\t\t\t\t\tthat.panels.stop( false, true );\n\t\t\t\t}\n\n\t\t\t\ttab.removeClass( \"ui-tabs-loading\" );\n\t\t\t\tpanel.removeAttr( \"aria-busy\" );\n\n\t\t\t\tif ( jqXHR === that.xhr ) {\n\t\t\t\t\tdelete that.xhr;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// not remote\n\t\tif ( this._isLocal( anchor[ 0 ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );\n\n\t\t// support: jQuery <1.8\n\t\t// jQuery <1.8 returns false if the request is canceled in beforeSend,\n\t\t// but as of 1.8, $.ajax() always returns a jqXHR object.\n\t\tif ( this.xhr && this.xhr.statusText !== \"canceled\" ) {\n\t\t\ttab.addClass( \"ui-tabs-loading\" );\n\t\t\tpanel.attr( \"aria-busy\", \"true\" );\n\n\t\t\tthis.xhr\n\t\t\t\t.done(function( response, status, jqXHR ) {\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tpanel.html( response );\n\t\t\t\t\t\tthat._trigger( \"load\", event, eventData );\n\n\t\t\t\t\t\tcomplete( jqXHR, status );\n\t\t\t\t\t}, 1 );\n\t\t\t\t})\n\t\t\t\t.fail(function( jqXHR, status ) {\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tcomplete( jqXHR, status );\n\t\t\t\t\t}, 1 );\n\t\t\t\t});\n\t\t}\n\t},\n\n\t_ajaxSettings: function( anchor, event, eventData ) {\n\t\tvar that = this;\n\t\treturn {\n\t\t\turl: anchor.attr( \"href\" ),\n\t\t\tbeforeSend: function( jqXHR, settings ) {\n\t\t\t\treturn that._trigger( \"beforeLoad\", event,\n\t\t\t\t\t$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );\n\t\t\t}\n\t\t};\n\t},\n\n\t_getPanelForTab: function( tab ) {\n\t\tvar id = $( tab ).attr( \"aria-controls\" );\n\t\treturn this.element.find( this._sanitizeSelector( \"#\" + id ) );\n\t}\n});\n\n\n/*!\n * jQuery UI Tooltip 1.11.4\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/tooltip/\n */\n\n\nvar tooltip = $.widget( \"ui.tooltip\", {\n\tversion: \"1.11.4\",\n\toptions: {\n\t\tcontent: function() {\n\t\t\t// support: IE<9, Opera in jQuery <1.7\n\t\t\t// .text() can't accept undefined, so coerce to a string\n\t\t\tvar title = $( this ).attr( \"title\" ) || \"\";\n\t\t\t// Escape title, since we're going from an attribute to raw HTML\n\t\t\treturn $( \"<a>\" ).text( title ).html();\n\t\t},\n\t\thide: true,\n\t\t// Disabled elements have inconsistent behavior across browsers (#8661)\n\t\titems: \"[title]:not([disabled])\",\n\t\tposition: {\n\t\t\tmy: \"left top+15\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"flipfit flip\"\n\t\t},\n\t\tshow: true,\n\t\ttooltipClass: null,\n\t\ttrack: false,\n\n\t\t// callbacks\n\t\tclose: null,\n\t\topen: null\n\t},\n\n\t_addDescribedBy: function( elem, id ) {\n\t\tvar describedby = (elem.attr( \"aria-describedby\" ) || \"\").split( /\\s+/ );\n\t\tdescribedby.push( id );\n\t\telem\n\t\t\t.data( \"ui-tooltip-id\", id )\n\t\t\t.attr( \"aria-describedby\", $.trim( describedby.join( \" \" ) ) );\n\t},\n\n\t_removeDescribedBy: function( elem ) {\n\t\tvar id = elem.data( \"ui-tooltip-id\" ),\n\t\t\tdescribedby = (elem.attr( \"aria-describedby\" ) || \"\").split( /\\s+/ ),\n\t\t\tindex = $.inArray( id, describedby );\n\n\t\tif ( index !== -1 ) {\n\t\t\tdescribedby.splice( index, 1 );\n\t\t}\n\n\t\telem.removeData( \"ui-tooltip-id\" );\n\t\tdescribedby = $.trim( describedby.join( \" \" ) );\n\t\tif ( describedby ) {\n\t\t\telem.attr( \"aria-describedby\", describedby );\n\t\t} else {\n\t\t\telem.removeAttr( \"aria-describedby\" );\n\t\t}\n\t},\n\n\t_create: function() {\n\t\tthis._on({\n\t\t\tmouseover: \"open\",\n\t\t\tfocusin: \"open\"\n\t\t});\n\n\t\t// IDs of generated tooltips, needed for destroy\n\t\tthis.tooltips = {};\n\n\t\t// IDs of parent tooltips where we removed the title attribute\n\t\tthis.parents = {};\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis._disable();\n\t\t}\n\n\t\t// Append the aria-live region so tooltips announce correctly\n\t\tthis.liveRegion = $( \"<div>\" )\n\t\t\t.attr({\n\t\t\t\trole: \"log\",\n\t\t\t\t\"aria-live\": \"assertive\",\n\t\t\t\t\"aria-relevant\": \"additions\"\n\t\t\t})\n\t\t\t.addClass( \"ui-helper-hidden-accessible\" )\n\t\t\t.appendTo( this.document[ 0 ].body );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar that = this;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis[ value ? \"_disable\" : \"_enable\" ]();\n\t\t\tthis.options[ key ] = value;\n\t\t\t// disable element style changes\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"content\" ) {\n\t\t\t$.each( this.tooltips, function( id, tooltipData ) {\n\t\t\t\tthat._updateContent( tooltipData.element );\n\t\t\t});\n\t\t}\n\t},\n\n\t_disable: function() {\n\t\tvar that = this;\n\n\t\t// close open tooltips\n\t\t$.each( this.tooltips, function( id, tooltipData ) {\n\t\t\tvar event = $.Event( \"blur\" );\n\t\t\tevent.target = event.currentTarget = tooltipData.element[ 0 ];\n\t\t\tthat.close( event, true );\n\t\t});\n\n\t\t// remove title attributes to prevent native tooltips\n\t\tthis.element.find( this.options.items ).addBack().each(function() {\n\t\t\tvar element = $( this );\n\t\t\tif ( element.is( \"[title]\" ) ) {\n\t\t\t\telement\n\t\t\t\t\t.data( \"ui-tooltip-title\", element.attr( \"title\" ) )\n\t\t\t\t\t.removeAttr( \"title\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_enable: function() {\n\t\t// restore title attributes\n\t\tthis.element.find( this.options.items ).addBack().each(function() {\n\t\t\tvar element = $( this );\n\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t}\n\t\t});\n\t},\n\n\topen: function( event ) {\n\t\tvar that = this,\n\t\t\ttarget = $( event ? event.target : this.element )\n\t\t\t\t// we need closest here due to mouseover bubbling,\n\t\t\t\t// but always pointing at the same event target\n\t\t\t\t.closest( this.options.items );\n\n\t\t// No element to show a tooltip for or the tooltip is already open\n\t\tif ( !target.length || target.data( \"ui-tooltip-id\" ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( target.attr( \"title\" ) ) {\n\t\t\ttarget.data( \"ui-tooltip-title\", target.attr( \"title\" ) );\n\t\t}\n\n\t\ttarget.data( \"ui-tooltip-open\", true );\n\n\t\t// kill parent tooltips, custom or native, for hover\n\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\ttarget.parents().each(function() {\n\t\t\t\tvar parent = $( this ),\n\t\t\t\t\tblurEvent;\n\t\t\t\tif ( parent.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\t\tblurEvent = $.Event( \"blur\" );\n\t\t\t\t\tblurEvent.target = blurEvent.currentTarget = this;\n\t\t\t\t\tthat.close( blurEvent, true );\n\t\t\t\t}\n\t\t\t\tif ( parent.attr( \"title\" ) ) {\n\t\t\t\t\tparent.uniqueId();\n\t\t\t\t\tthat.parents[ this.id ] = {\n\t\t\t\t\t\telement: this,\n\t\t\t\t\t\ttitle: parent.attr( \"title\" )\n\t\t\t\t\t};\n\t\t\t\t\tparent.attr( \"title\", \"\" );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis._registerCloseHandlers( event, target );\n\t\tthis._updateContent( target, event );\n\t},\n\n\t_updateContent: function( target, event ) {\n\t\tvar content,\n\t\t\tcontentOption = this.options.content,\n\t\t\tthat = this,\n\t\t\teventType = event ? event.type : null;\n\n\t\tif ( typeof contentOption === \"string\" ) {\n\t\t\treturn this._open( event, target, contentOption );\n\t\t}\n\n\t\tcontent = contentOption.call( target[0], function( response ) {\n\n\t\t\t// IE may instantly serve a cached response for ajax requests\n\t\t\t// delay this call to _open so the other call to _open runs first\n\t\t\tthat._delay(function() {\n\n\t\t\t\t// Ignore async response if tooltip was closed already\n\t\t\t\tif ( !target.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// jQuery creates a special event for focusin when it doesn't\n\t\t\t\t// exist natively. To improve performance, the native event\n\t\t\t\t// object is reused and the type is changed. Therefore, we can't\n\t\t\t\t// rely on the type being correct after the event finished\n\t\t\t\t// bubbling, so we set it back to the previous value. (#8740)\n\t\t\t\tif ( event ) {\n\t\t\t\t\tevent.type = eventType;\n\t\t\t\t}\n\t\t\t\tthis._open( event, target, response );\n\t\t\t});\n\t\t});\n\t\tif ( content ) {\n\t\t\tthis._open( event, target, content );\n\t\t}\n\t},\n\n\t_open: function( event, target, content ) {\n\t\tvar tooltipData, tooltip, delayedShow, a11yContent,\n\t\t\tpositionOption = $.extend( {}, this.options.position );\n\n\t\tif ( !content ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Content can be updated multiple times. If the tooltip already\n\t\t// exists, then just update the content and bail.\n\t\ttooltipData = this._find( target );\n\t\tif ( tooltipData ) {\n\t\t\ttooltipData.tooltip.find( \".ui-tooltip-content\" ).html( content );\n\t\t\treturn;\n\t\t}\n\n\t\t// if we have a title, clear it to prevent the native tooltip\n\t\t// we have to check first to avoid defining a title if none exists\n\t\t// (we don't want to cause an element to start matching [title])\n\t\t//\n\t\t// We use removeAttr only for key events, to allow IE to export the correct\n\t\t// accessible attributes. For mouse events, set to empty string to avoid\n\t\t// native tooltip showing up (happens only when removing inside mouseover).\n\t\tif ( target.is( \"[title]\" ) ) {\n\t\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\t\ttarget.attr( \"title\", \"\" );\n\t\t\t} else {\n\t\t\t\ttarget.removeAttr( \"title\" );\n\t\t\t}\n\t\t}\n\n\t\ttooltipData = this._tooltip( target );\n\t\ttooltip = tooltipData.tooltip;\n\t\tthis._addDescribedBy( target, tooltip.attr( \"id\" ) );\n\t\ttooltip.find( \".ui-tooltip-content\" ).html( content );\n\n\t\t// Support: Voiceover on OS X, JAWS on IE <= 9\n\t\t// JAWS announces deletions even when aria-relevant=\"additions\"\n\t\t// Voiceover will sometimes re-read the entire log region's contents from the beginning\n\t\tthis.liveRegion.children().hide();\n\t\tif ( content.clone ) {\n\t\t\ta11yContent = content.clone();\n\t\t\ta11yContent.removeAttr( \"id\" ).find( \"[id]\" ).removeAttr( \"id\" );\n\t\t} else {\n\t\t\ta11yContent = content;\n\t\t}\n\t\t$( \"<div>\" ).html( a11yContent ).appendTo( this.liveRegion );\n\n\t\tfunction position( event ) {\n\t\t\tpositionOption.of = event;\n\t\t\tif ( tooltip.is( \":hidden\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttooltip.position( positionOption );\n\t\t}\n\t\tif ( this.options.track && event && /^mouse/.test( event.type ) ) {\n\t\t\tthis._on( this.document, {\n\t\t\t\tmousemove: position\n\t\t\t});\n\t\t\t// trigger once to override element-relative positioning\n\t\t\tposition( event );\n\t\t} else {\n\t\t\ttooltip.position( $.extend({\n\t\t\t\tof: target\n\t\t\t}, this.options.position ) );\n\t\t}\n\n\t\ttooltip.hide();\n\n\t\tthis._show( tooltip, this.options.show );\n\t\t// Handle tracking tooltips that are shown with a delay (#8644). As soon\n\t\t// as the tooltip is visible, position the tooltip using the most recent\n\t\t// event.\n\t\tif ( this.options.show && this.options.show.delay ) {\n\t\t\tdelayedShow = this.delayedShow = setInterval(function() {\n\t\t\t\tif ( tooltip.is( \":visible\" ) ) {\n\t\t\t\t\tposition( positionOption.of );\n\t\t\t\t\tclearInterval( delayedShow );\n\t\t\t\t}\n\t\t\t}, $.fx.interval );\n\t\t}\n\n\t\tthis._trigger( \"open\", event, { tooltip: tooltip } );\n\t},\n\n\t_registerCloseHandlers: function( event, target ) {\n\t\tvar events = {\n\t\t\tkeyup: function( event ) {\n\t\t\t\tif ( event.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tvar fakeEvent = $.Event(event);\n\t\t\t\t\tfakeEvent.currentTarget = target[0];\n\t\t\t\t\tthis.close( fakeEvent, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Only bind remove handler for delegated targets. Non-delegated\n\t\t// tooltips will handle this in destroy.\n\t\tif ( target[ 0 ] !== this.element[ 0 ] ) {\n\t\t\tevents.remove = function() {\n\t\t\t\tthis._removeTooltip( this._find( target ).tooltip );\n\t\t\t};\n\t\t}\n\n\t\tif ( !event || event.type === \"mouseover\" ) {\n\t\t\tevents.mouseleave = \"close\";\n\t\t}\n\t\tif ( !event || event.type === \"focusin\" ) {\n\t\t\tevents.focusout = \"close\";\n\t\t}\n\t\tthis._on( true, target, events );\n\t},\n\n\tclose: function( event ) {\n\t\tvar tooltip,\n\t\t\tthat = this,\n\t\t\ttarget = $( event ? event.currentTarget : this.element ),\n\t\t\ttooltipData = this._find( target );\n\n\t\t// The tooltip may already be closed\n\t\tif ( !tooltipData ) {\n\n\t\t\t// We set ui-tooltip-open immediately upon open (in open()), but only set the\n\t\t\t// additional data once there's actually content to show (in _open()). So even if the\n\t\t\t// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in\n\t\t\t// the period between open() and _open().\n\t\t\ttarget.removeData( \"ui-tooltip-open\" );\n\t\t\treturn;\n\t\t}\n\n\t\ttooltip = tooltipData.tooltip;\n\n\t\t// disabling closes the tooltip, so we need to track when we're closing\n\t\t// to avoid an infinite loop in case the tooltip becomes disabled on close\n\t\tif ( tooltipData.closing ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Clear the interval for delayed tracking tooltips\n\t\tclearInterval( this.delayedShow );\n\n\t\t// only set title if we had one before (see comment in _open())\n\t\t// If the title attribute has changed since open(), don't restore\n\t\tif ( target.data( \"ui-tooltip-title\" ) && !target.attr( \"title\" ) ) {\n\t\t\ttarget.attr( \"title\", target.data( \"ui-tooltip-title\" ) );\n\t\t}\n\n\t\tthis._removeDescribedBy( target );\n\n\t\ttooltipData.hiding = true;\n\t\ttooltip.stop( true );\n\t\tthis._hide( tooltip, this.options.hide, function() {\n\t\t\tthat._removeTooltip( $( this ) );\n\t\t});\n\n\t\ttarget.removeData( \"ui-tooltip-open\" );\n\t\tthis._off( target, \"mouseleave focusout keyup\" );\n\n\t\t// Remove 'remove' binding only on delegated targets\n\t\tif ( target[ 0 ] !== this.element[ 0 ] ) {\n\t\t\tthis._off( target, \"remove\" );\n\t\t}\n\t\tthis._off( this.document, \"mousemove\" );\n\n\t\tif ( event && event.type === \"mouseleave\" ) {\n\t\t\t$.each( this.parents, function( id, parent ) {\n\t\t\t\t$( parent.element ).attr( \"title\", parent.title );\n\t\t\t\tdelete that.parents[ id ];\n\t\t\t});\n\t\t}\n\n\t\ttooltipData.closing = true;\n\t\tthis._trigger( \"close\", event, { tooltip: tooltip } );\n\t\tif ( !tooltipData.hiding ) {\n\t\t\ttooltipData.closing = false;\n\t\t}\n\t},\n\n\t_tooltip: function( element ) {\n\t\tvar tooltip = $( \"<div>\" )\n\t\t\t\t.attr( \"role\", \"tooltip\" )\n\t\t\t\t.addClass( \"ui-tooltip ui-widget ui-corner-all ui-widget-content \" +\n\t\t\t\t\t( this.options.tooltipClass || \"\" ) ),\n\t\t\tid = tooltip.uniqueId().attr( \"id\" );\n\n\t\t$( \"<div>\" )\n\t\t\t.addClass( \"ui-tooltip-content\" )\n\t\t\t.appendTo( tooltip );\n\n\t\ttooltip.appendTo( this.document[0].body );\n\n\t\treturn this.tooltips[ id ] = {\n\t\t\telement: element,\n\t\t\ttooltip: tooltip\n\t\t};\n\t},\n\n\t_find: function( target ) {\n\t\tvar id = target.data( \"ui-tooltip-id\" );\n\t\treturn id ? this.tooltips[ id ] : null;\n\t},\n\n\t_removeTooltip: function( tooltip ) {\n\t\ttooltip.remove();\n\t\tdelete this.tooltips[ tooltip.attr( \"id\" ) ];\n\t},\n\n\t_destroy: function() {\n\t\tvar that = this;\n\n\t\t// close open tooltips\n\t\t$.each( this.tooltips, function( id, tooltipData ) {\n\t\t\t// Delegate to close method to handle common cleanup\n\t\t\tvar event = $.Event( \"blur\" ),\n\t\t\t\telement = tooltipData.element;\n\t\t\tevent.target = event.currentTarget = element[ 0 ];\n\t\t\tthat.close( event, true );\n\n\t\t\t// Remove immediately; destroying an open tooltip doesn't use the\n\t\t\t// hide animation\n\t\t\t$( \"#\" + id ).remove();\n\n\t\t\t// Restore the title\n\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\t// If the title attribute has changed since open(), don't restore\n\t\t\t\tif ( !element.attr( \"title\" ) ) {\n\t\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t\t}\n\t\t\t\telement.removeData( \"ui-tooltip-title\" );\n\t\t\t}\n\t\t});\n\t\tthis.liveRegion.remove();\n\t}\n});\n\n\n\n}));","/*!\n** Unobtrusive validation support library for jQuery and jQuery Validate\n** Copyright (C) Microsoft Corporation. All rights reserved.\n*/\n\n/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */\n/*global document: false, jQuery: false */\n\n(function ($) {\n var $jQval = $.validator,\n adapters,\n data_validation = \"unobtrusiveValidation\";\n\n function setValidationValues(options, ruleName, value) {\n options.rules[ruleName] = value;\n if (options.message) {\n options.messages[ruleName] = options.message;\n }\n }\n\n function splitAndTrim(value) {\n return value.replace(/^\\s+|\\s+$/g, \"\").split(/\\s*,\\s*/g);\n }\n\n function escapeAttributeValue(value) {\n // As mentioned on http://api.jquery.com/category/selectors/\n return value.replace(/([!\"#$%&'()*+,./:;<=>?@\\[\\\\\\]^`{|}~])/g, \"\\\\$1\");\n }\n\n function getModelPrefix(fieldName) {\n return fieldName.substr(0, fieldName.lastIndexOf(\".\") + 1);\n }\n\n function appendModelPrefix(value, prefix) {\n if (value.indexOf(\"*.\") === 0) {\n value = value.replace(\"*.\", prefix);\n }\n return value;\n }\n\n function onError(error, inputElement) { // 'this' is the form element\n var container = $(this).find(\"[data-valmsg-for='\" + escapeAttributeValue(inputElement[0].name) + \"']\"),\n replaceAttrValue = container.attr(\"data-valmsg-replace\"),\n replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null;\n\n container.removeClass(\"field-validation-valid\").addClass(\"field-validation-error\");\n error.data(\"unobtrusiveContainer\", container);\n\n if (replace) {\n container.empty();\n error.removeClass(\"input-validation-error\").appendTo(container);\n }\n else {\n error.hide();\n }\n }\n\n function onErrors(event, validator) { // 'this' is the form element\n var container = $(this).find(\"[data-valmsg-summary=true]\"),\n list = container.find(\"ul\");\n\n if (list && list.length && validator.errorList.length) {\n list.empty();\n container.addClass(\"validation-summary-errors\").removeClass(\"validation-summary-valid\");\n\n $.each(validator.errorList, function () {\n $(\"<li />\").html(this.message).appendTo(list);\n });\n }\n }\n\n function onSuccess(error) { // 'this' is the form element\n var container = error.data(\"unobtrusiveContainer\");\n\n if (container) {\n var replaceAttrValue = container.attr(\"data-valmsg-replace\"),\n replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;\n\n container.addClass(\"field-validation-valid\").removeClass(\"field-validation-error\");\n error.removeData(\"unobtrusiveContainer\");\n\n if (replace) {\n container.empty();\n }\n }\n }\n\n function onReset(event) { // 'this' is the form element\n var $form = $(this),\n key = '__jquery_unobtrusive_validation_form_reset';\n if ($form.data(key)) {\n return;\n }\n // Set a flag that indicates we're currently resetting the form.\n $form.data(key, true);\n try {\n $form.data(\"validator\").resetForm();\n } finally {\n $form.removeData(key);\n }\n\n $form.find(\".validation-summary-errors\")\n .addClass(\"validation-summary-valid\")\n .removeClass(\"validation-summary-errors\");\n $form.find(\".field-validation-error\")\n .addClass(\"field-validation-valid\")\n .removeClass(\"field-validation-error\")\n .removeData(\"unobtrusiveContainer\")\n .find(\">*\") // If we were using valmsg-replace, get the underlying error\n .removeData(\"unobtrusiveContainer\");\n }\n\n function validationInfo(form) {\n var $form = $(form),\n result = $form.data(data_validation),\n onResetProxy = $.proxy(onReset, form),\n defaultOptions = $jQval.unobtrusive.options || {},\n execInContext = function (name, args) {\n var func = defaultOptions[name];\n func && $.isFunction(func) && func.apply(form, args);\n }\n\n if (!result) {\n result = {\n options: { // options structure passed to jQuery Validate's validate() method\n errorClass: defaultOptions.errorClass || \"input-validation-error\",\n errorElement: defaultOptions.errorElement || \"span\",\n errorPlacement: function () {\n onError.apply(form, arguments);\n execInContext(\"errorPlacement\", arguments);\n },\n invalidHandler: function () {\n onErrors.apply(form, arguments);\n execInContext(\"invalidHandler\", arguments);\n },\n messages: {},\n rules: {},\n success: function () {\n onSuccess.apply(form, arguments);\n execInContext(\"success\", arguments);\n }\n },\n attachValidation: function () {\n $form\n .off(\"reset.\" + data_validation, onResetProxy)\n .on(\"reset.\" + data_validation, onResetProxy)\n .validate(this.options);\n },\n validate: function () { // a validation function that is called by unobtrusive Ajax\n $form.validate();\n return $form.valid();\n }\n };\n $form.data(data_validation, result);\n }\n\n return result;\n }\n\n $jQval.unobtrusive = {\n adapters: [],\n\n parseElement: function (element, skipAttach) {\n /// <summary>\n /// Parses a single HTML element for unobtrusive validation attributes.\n /// </summary>\n /// <param name=\"element\" domElement=\"true\">The HTML element to be parsed.</param>\n /// <param name=\"skipAttach\" type=\"Boolean\">[Optional] true to skip attaching the\n /// validation to the form. If parsing just this single element, you should specify true.\n /// If parsing several elements, you should specify false, and manually attach the validation\n /// to the form when you are finished. The default is false.</param>\n var $element = $(element),\n form = $element.parents(\"form\")[0],\n valInfo, rules, messages;\n\n if (!form) { // Cannot do client-side validation without a form\n return;\n }\n\n valInfo = validationInfo(form);\n valInfo.options.rules[element.name] = rules = {};\n valInfo.options.messages[element.name] = messages = {};\n\n $.each(this.adapters, function () {\n var prefix = \"data-val-\" + this.name,\n message = $element.attr(prefix),\n paramValues = {};\n\n if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy)\n prefix += \"-\";\n\n $.each(this.params, function () {\n paramValues[this] = $element.attr(prefix + this);\n });\n\n this.adapt({\n element: element,\n form: form,\n message: message,\n params: paramValues,\n rules: rules,\n messages: messages\n });\n }\n });\n\n $.extend(rules, { \"__dummy__\": true });\n\n if (!skipAttach) {\n valInfo.attachValidation();\n }\n },\n\n parse: function (selector) {\n /// <summary>\n /// Parses all the HTML elements in the specified selector. It looks for input elements decorated\n /// with the [data-val=true] attribute value and enables validation according to the data-val-*\n /// attribute values.\n /// </summary>\n /// <param name=\"selector\" type=\"String\">Any valid jQuery selector.</param>\n\n // $forms includes all forms in selector's DOM hierarchy (parent, children and self) that have at least one\n // element with data-val=true\n var $selector = $(selector),\n $forms = $selector.parents()\n .addBack()\n .filter(\"form\")\n .add($selector.find(\"form\"))\n .has(\"[data-val=true]\");\n\n $selector.find(\"[data-val=true]\").each(function () {\n $jQval.unobtrusive.parseElement(this, true);\n });\n\n $forms.each(function () {\n var info = validationInfo(this);\n if (info) {\n info.attachValidation();\n }\n });\n }\n };\n\n adapters = $jQval.unobtrusive.adapters;\n\n adapters.add = function (adapterName, params, fn) {\n /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.</summary>\n /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\n /// <param name=\"params\" type=\"Array\" optional=\"true\">[Optional] An array of parameter names (strings) that will\n /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and\n /// mmmm is the parameter name).</param>\n /// <param name=\"fn\" type=\"Function\">The function to call, which adapts the values from the HTML\n /// attributes into jQuery Validate rules and/or messages.</param>\n /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n if (!fn) { // Called with no params, just a function\n fn = params;\n params = [];\n }\n this.push({ name: adapterName, params: params, adapt: fn });\n return this;\n };\n\n adapters.addBool = function (adapterName, ruleName) {\n /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\n /// the jQuery Validate validation rule has no parameter values.</summary>\n /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\n /// <param name=\"ruleName\" type=\"String\" optional=\"true\">[Optional] The name of the jQuery Validate rule. If not provided, the value\n /// of adapterName will be used instead.</param>\n /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n return this.add(adapterName, function (options) {\n setValidationValues(options, ruleName || adapterName, true);\n });\n };\n\n adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {\n /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\n /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and\n /// one for min-and-max). The HTML parameters are expected to be named -min and -max.</summary>\n /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>\n /// <param name=\"minRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you only\n /// have a minimum value.</param>\n /// <param name=\"maxRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you only\n /// have a maximum value.</param>\n /// <param name=\"minMaxRuleName\" type=\"String\">The name of the jQuery Validate rule to be used when you\n /// have both a minimum and maximum value.</param>\n /// <param name=\"minAttribute\" type=\"String\" optional=\"true\">[Optional] The name of the HTML attribute that\n /// contains the minimum value. The default is \"min\".</param>\n /// <param name=\"maxAttribute\" type=\"String\" optional=\"true\">[Optional] The name of the HTML attribute that\n /// contains the maximum value. The default is \"max\".</param>\n /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n return this.add(adapterName, [minAttribute || \"min\", maxAttribute || \"max\"], function (options) {\n var min = options.params.min,\n max = options.params.max;\n\n if (min && max) {\n setValidationValues(options, minMaxRuleName, [min, max]);\n }\n else if (min) {\n setValidationValues(options, minRuleName, min);\n }\n else if (max) {\n setValidationValues(options, maxRuleName, max);\n }\n });\n };\n\n adapters.addSingleVal = function (adapterName, attribute, ruleName) {\n /// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where\n /// the jQuery Validate validation rule has a single value.</summary>\n /// <param name=\"adapterName\" type=\"String\">The name of the adapter to be added. This matches the name used\n /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).</param>\n /// <param name=\"attribute\" type=\"String\">[Optional] The name of the HTML attribute that contains the value.\n /// The default is \"val\".</param>\n /// <param name=\"ruleName\" type=\"String\" optional=\"true\">[Optional] The name of the jQuery Validate rule. If not provided, the value\n /// of adapterName will be used instead.</param>\n /// <returns type=\"jQuery.validator.unobtrusive.adapters\" />\n return this.add(adapterName, [attribute || \"val\"], function (options) {\n setValidationValues(options, ruleName || adapterName, options.params[attribute]);\n });\n };\n\n $jQval.addMethod(\"__dummy__\", function (value, element, params) {\n return true;\n });\n\n $jQval.addMethod(\"regex\", function (value, element, params) {\n var match;\n if (this.optional(element)) {\n return true;\n }\n\n match = new RegExp(params).exec(value);\n return (match && (match.index === 0) && (match[0].length === value.length));\n });\n\n $jQval.addMethod(\"nonalphamin\", function (value, element, nonalphamin) {\n var match;\n if (nonalphamin) {\n match = value.match(/\\W/g);\n match = match && match.length >= nonalphamin;\n }\n return match;\n });\n\n if ($jQval.methods.extension) {\n adapters.addSingleVal(\"accept\", \"mimtype\");\n adapters.addSingleVal(\"extension\", \"extension\");\n } else {\n // for backward compatibility, when the 'extension' validation method does not exist, such as with versions\n // of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for\n // validating the extension, and ignore mime-type validations as they are not supported.\n adapters.addSingleVal(\"extension\", \"extension\", \"accept\");\n }\n\n adapters.addSingleVal(\"regex\", \"pattern\");\n adapters.addBool(\"creditcard\").addBool(\"date\").addBool(\"digits\").addBool(\"email\").addBool(\"number\").addBool(\"url\");\n adapters.addMinMax(\"length\", \"minlength\", \"maxlength\", \"rangelength\").addMinMax(\"range\", \"min\", \"max\", \"range\");\n adapters.addMinMax(\"minlength\", \"minlength\").addMinMax(\"maxlength\", \"minlength\", \"maxlength\");\n adapters.add(\"equalto\", [\"other\"], function (options) {\n var prefix = getModelPrefix(options.element.name),\n other = options.params.other,\n fullOtherName = appendModelPrefix(other, prefix),\n element = $(options.form).find(\":input\").filter(\"[name='\" + escapeAttributeValue(fullOtherName) + \"']\")[0];\n\n setValidationValues(options, \"equalTo\", element);\n });\n adapters.add(\"required\", function (options) {\n // jQuery Validate equates \"required\" with \"mandatory\" for checkbox elements\n if (options.element.tagName.toUpperCase() !== \"INPUT\" || options.element.type.toUpperCase() !== \"CHECKBOX\") {\n setValidationValues(options, \"required\", true);\n }\n });\n adapters.add(\"remote\", [\"url\", \"type\", \"additionalfields\"], function (options) {\n var value = {\n url: options.params.url,\n type: options.params.type || \"GET\",\n data: {}\n },\n prefix = getModelPrefix(options.element.name);\n\n $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {\n var paramName = appendModelPrefix(fieldName, prefix);\n value.data[paramName] = function () {\n var field = $(options.form).find(\":input\").filter(\"[name='\" + escapeAttributeValue(paramName) + \"']\");\n // For checkboxes and radio buttons, only pick up values from checked fields.\n if (field.is(\":checkbox\")) {\n return field.filter(\":checked\").val() || field.filter(\":hidden\").val() || '';\n }\n else if (field.is(\":radio\")) {\n return field.filter(\":checked\").val() || '';\n }\n return field.val();\n };\n });\n\n setValidationValues(options, \"remote\", value);\n });\n adapters.add(\"password\", [\"min\", \"nonalphamin\", \"regex\"], function (options) {\n if (options.params.min) {\n setValidationValues(options, \"minlength\", options.params.min);\n }\n if (options.params.nonalphamin) {\n setValidationValues(options, \"nonalphamin\", options.params.nonalphamin);\n }\n if (options.params.regex) {\n setValidationValues(options, \"regex\", options.params.regex);\n }\n });\n\n $(function () {\n $jQval.unobtrusive.parse(document);\n });\n}(jQuery));","/*\r\n * jQuery.appear\r\n * https://github.com/bas2k/jquery.appear/\r\n * http://code.google.com/p/jquery-appear/\r\n * http://bas2k.ru/\r\n *\r\n * Copyright (c) 2009 Michael Hixson\r\n * Copyright (c) 2012-2014 Alexander Brovikov\r\n * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)\r\n */\r\n(function($) {\r\n $.fn.appear = function(fn, options) {\r\n\r\n var settings = $.extend({\r\n\r\n //arbitrary data to pass to fn\r\n data: undefined,\r\n\r\n //call fn only on the first appear?\r\n one: true,\r\n\r\n // X & Y accuracy\r\n accX: 0,\r\n accY: 0\r\n\r\n }, options);\r\n\r\n return this.each(function() {\r\n\r\n var t = $(this);\r\n\r\n //whether the element is currently visible\r\n t.appeared = false;\r\n\r\n if (!fn) {\r\n\r\n //trigger the custom event\r\n t.trigger('appear', settings.data);\r\n return;\r\n }\r\n\r\n var w = $(window);\r\n\r\n //fires the appear event when appropriate\r\n var check = function() {\r\n\r\n //is the element hidden?\r\n if (!t.is(':visible')) {\r\n\r\n //it became hidden\r\n t.appeared = false;\r\n return;\r\n }\r\n\r\n //is the element inside the visible window?\r\n var a = w.scrollLeft();\r\n var b = w.scrollTop();\r\n var o = t.offset();\r\n var x = o.left;\r\n var y = o.top;\r\n\r\n var ax = settings.accX;\r\n var ay = settings.accY;\r\n var th = t.height();\r\n var wh = w.height();\r\n var tw = t.width();\r\n var ww = w.width();\r\n\r\n if (y + th + ay >= b &&\r\n y <= b + wh + ay &&\r\n x + tw + ax >= a &&\r\n x <= a + ww + ax) {\r\n\r\n //trigger the custom event\r\n if (!t.appeared) t.trigger('appear', settings.data);\r\n\r\n } else {\r\n\r\n //it scrolled out of view\r\n t.appeared = false;\r\n }\r\n };\r\n\r\n //create a modified fn with some additional logic\r\n var modifiedFn = function() {\r\n\r\n //mark the element as visible\r\n t.appeared = true;\r\n\r\n //is this supposed to happen only once?\r\n if (settings.one) {\r\n\r\n //remove the check\r\n w.unbind('scroll', check);\r\n var i = $.inArray(check, $.fn.appear.checks);\r\n if (i >= 0) $.fn.appear.checks.splice(i, 1);\r\n }\r\n\r\n //trigger the original fn\r\n fn.apply(this, arguments);\r\n };\r\n\r\n //bind the modified fn to the element\r\n if (settings.one) t.one('appear', settings.data, modifiedFn);\r\n else t.bind('appear', settings.data, modifiedFn);\r\n\r\n //check whenever the window scrolls\r\n w.scroll(check);\r\n\r\n //check whenever the dom changes\r\n $.fn.appear.checks.push(check);\r\n\r\n //check now\r\n (check)();\r\n });\r\n };\r\n\r\n //keep a queue of appearance checks\r\n $.extend($.fn.appear, {\r\n\r\n checks: [],\r\n timeout: null,\r\n\r\n //process the queue\r\n checkAll: function() {\r\n var length = $.fn.appear.checks.length;\r\n if (length > 0) while (length--) ($.fn.appear.checks[length])();\r\n },\r\n\r\n //check the queue asynchronously\r\n run: function() {\r\n if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout);\r\n $.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20);\r\n }\r\n });\r\n\r\n //run checks when these methods are called\r\n $.each(['append', 'prepend', 'after', 'before', 'attr',\r\n 'removeAttr', 'addClass', 'removeClass', 'toggleClass',\r\n 'remove', 'css', 'show', 'hide'], function(i, n) {\r\n var old = $.fn[n];\r\n if (old) {\r\n $.fn[n] = function() {\r\n var r = old.apply(this, arguments);\r\n $.fn.appear.run();\r\n return r;\r\n }\r\n }\r\n });\r\n\r\n})(jQuery);\r\n","/*!\n * The Final Countdown for jQuery v2.1.0 (http://hilios.github.io/jQuery.countdown/)\n * Copyright (c) 2015 Edson Hilios\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n(function(factory) {\n \"use strict\";\n if (typeof define === \"function\" && define.amd) {\n define([ \"jquery\" ], factory);\n } else {\n factory(jQuery);\n }\n})(function($) {\n \"use strict\";\n var instances = [], matchers = [], defaultOptions = {\n precision: 100,\n elapse: false\n };\n matchers.push(/^[0-9]*$/.source);\n matchers.push(/([0-9]{1,2}\\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);\n matchers.push(/[0-9]{4}([\\/\\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);\n matchers = new RegExp(matchers.join(\"|\"));\n function parseDateString(dateString) {\n if (dateString instanceof Date) {\n return dateString;\n }\n if (String(dateString).match(matchers)) {\n if (String(dateString).match(/^[0-9]*$/)) {\n dateString = Number(dateString);\n }\n if (String(dateString).match(/\\-/)) {\n dateString = String(dateString).replace(/\\-/g, \"/\");\n }\n return new Date(dateString);\n } else {\n throw new Error(\"Couldn't cast `\" + dateString + \"` to a date object.\");\n }\n }\n var DIRECTIVE_KEY_MAP = {\n Y: \"years\",\n m: \"months\",\n n: \"daysToMonth\",\n w: \"weeks\",\n d: \"daysToWeek\",\n D: \"totalDays\",\n H: \"hours\",\n M: \"minutes\",\n S: \"seconds\"\n };\n function escapedRegExp(str) {\n var sanitize = str.toString().replace(/([.?*+^$[\\]\\\\(){}|-])/g, \"\\\\$1\");\n return new RegExp(sanitize);\n }\n function strftime(offsetObject) {\n return function(format) {\n var directives = format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);\n if (directives) {\n for (var i = 0, len = directives.length; i < len; ++i) {\n var directive = directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/), regexp = escapedRegExp(directive[0]), modifier = directive[1] || \"\", plural = directive[3] || \"\", value = null;\n directive = directive[2];\n if (DIRECTIVE_KEY_MAP.hasOwnProperty(directive)) {\n value = DIRECTIVE_KEY_MAP[directive];\n value = Number(offsetObject[value]);\n }\n if (value !== null) {\n if (modifier === \"!\") {\n value = pluralize(plural, value);\n }\n if (modifier === \"\") {\n if (value < 10) {\n value = \"0\" + value.toString();\n }\n }\n format = format.replace(regexp, value.toString());\n }\n }\n }\n format = format.replace(/%%/, \"%\");\n return format;\n };\n }\n function pluralize(format, count) {\n var plural = \"s\", singular = \"\";\n if (format) {\n format = format.replace(/(:|;|\\s)/gi, \"\").split(/\\,/);\n if (format.length === 1) {\n plural = format[0];\n } else {\n singular = format[0];\n plural = format[1];\n }\n }\n if (Math.abs(count) === 1) {\n return singular;\n } else {\n return plural;\n }\n }\n var Countdown = function(el, finalDate, options) {\n this.el = el;\n this.$el = $(el);\n this.interval = null;\n this.offset = {};\n this.options = $.extend({}, defaultOptions);\n this.instanceNumber = instances.length;\n instances.push(this);\n this.$el.data(\"countdown-instance\", this.instanceNumber);\n if (options) {\n if (typeof options === \"function\") {\n this.$el.on(\"update.countdown\", options);\n this.$el.on(\"stoped.countdown\", options);\n this.$el.on(\"finish.countdown\", options);\n } else {\n this.options = $.extend({}, defaultOptions, options);\n }\n }\n this.setFinalDate(finalDate);\n this.start();\n };\n $.extend(Countdown.prototype, {\n start: function() {\n if (this.interval !== null) {\n clearInterval(this.interval);\n }\n var self = this;\n this.update();\n this.interval = setInterval(function() {\n self.update.call(self);\n }, this.options.precision);\n },\n stop: function() {\n clearInterval(this.interval);\n this.interval = null;\n this.dispatchEvent(\"stoped\");\n },\n toggle: function() {\n if (this.interval) {\n this.stop();\n } else {\n this.start();\n }\n },\n pause: function() {\n this.stop();\n },\n resume: function() {\n this.start();\n },\n remove: function() {\n this.stop.call(this);\n instances[this.instanceNumber] = null;\n delete this.$el.data().countdownInstance;\n },\n setFinalDate: function(value) {\n this.finalDate = parseDateString(value);\n },\n update: function() {\n if (this.$el.closest(\"html\").length === 0) {\n this.remove();\n return;\n }\n var hasEventsAttached = $._data(this.el, \"events\") !== undefined, now = new Date(), newTotalSecsLeft;\n newTotalSecsLeft = this.finalDate.getTime() - now.getTime();\n newTotalSecsLeft = Math.ceil(newTotalSecsLeft / 1e3);\n newTotalSecsLeft = !this.options.elapse && newTotalSecsLeft < 0 ? 0 : Math.abs(newTotalSecsLeft);\n if (this.totalSecsLeft === newTotalSecsLeft || !hasEventsAttached) {\n return;\n } else {\n this.totalSecsLeft = newTotalSecsLeft;\n }\n this.elapsed = now >= this.finalDate;\n this.offset = {\n seconds: this.totalSecsLeft % 60,\n minutes: Math.floor(this.totalSecsLeft / 60) % 60,\n hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24,\n days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,\n daysToWeek: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,\n daysToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 % 30.4368),\n totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24),\n weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7),\n months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368),\n years: Math.abs(this.finalDate.getFullYear() - now.getFullYear())\n };\n if (!this.options.elapse && this.totalSecsLeft === 0) {\n this.stop();\n this.dispatchEvent(\"finish\");\n } else {\n this.dispatchEvent(\"update\");\n }\n },\n dispatchEvent: function(eventName) {\n var event = $.Event(eventName + \".countdown\");\n event.finalDate = this.finalDate;\n event.elapsed = this.elapsed;\n event.offset = $.extend({}, this.offset);\n event.strftime = strftime(this.offset);\n this.$el.trigger(event);\n }\n });\n $.fn.countdown = function() {\n var argumentsArray = Array.prototype.slice.call(arguments, 0);\n return this.each(function() {\n var instanceNumber = $(this).data(\"countdown-instance\");\n if (instanceNumber !== undefined) {\n var instance = instances[instanceNumber], method = argumentsArray[0];\n if (Countdown.prototype.hasOwnProperty(method)) {\n instance[method].apply(instance, argumentsArray.slice(1));\n } else if (String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i) === null) {\n instance.setFinalDate.call(instance, method);\n instance.start();\n } else {\n $.error(\"Method %s does not exist on jQuery.countdown\".replace(/\\%s/gi, method));\n }\n } else {\n new Countdown(this, argumentsArray[0], argumentsArray[1]);\n }\n });\n };\n});","/**\n * File: jquery.idle.js\n * Title: JQuery Idle.\n * A dead simple jQuery plugin that executes a callback function if the user is idle.\n * About: Author\n * Henrique Boaventura (hboaventura@gmail.com).\n * About: Version\n * 1.2.6\n * About: License\n * Copyright (C) 2013, Henrique Boaventura (hboaventura@gmail.com).\n * MIT License:\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * - The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n * - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n **/\n/*jslint browser: true */\n/*global jQuery: false */\n(function ($) {\n 'use strict';\n\n $.fn.idle = function (options) {\n var defaults = {\n idle: 60000, //idle time in ms\n events: 'mousemove keydown mousedown touchstart', //events that will trigger the idle resetter\n onIdle: function () {}, //callback function to be executed after idle time\n onActive: function () {}, //callback function to be executed after back from idleness\n onHide: function () {}, //callback function to be executed when window is hidden\n onShow: function () {}, //callback function to be executed when window is visible\n keepTracking: true, //set it to false if you want to track only the first time\n startAtIdle: false,\n recurIdleCall: false\n },\n idle = options.startAtIdle || false,\n visible = !options.startAtIdle || true,\n settings = $.extend({}, defaults, options),\n lastId = null,\n resetTimeout,\n timeout;\n\n //event to clear all idle events\n $(this).on( \"idle:stop\", {}, function( event) {\n $(this).off(settings.events);\n settings.keepTracking = false;\n resetTimeout(lastId, settings);\n });\n\n resetTimeout = function (id, settings) {\n if (idle) {\n settings.onActive.call();\n idle = false;\n }\n clearTimeout(id);\n if(settings.keepTracking) {\n return timeout(settings);\n }\n };\n\n timeout = function (settings) {\n var timer = (settings.recurIdleCall ? setInterval : setTimeout), id;\n id = timer(function () {\n idle = true;\n settings.onIdle.call();\n }, settings.idle);\n return id;\n };\n\n return this.each(function () {\n lastId = timeout(settings);\n $(this).on(settings.events, function (e) {\n lastId = resetTimeout(lastId, settings);\n });\n if (settings.onShow || settings.onHide) {\n $(document).on(\"visibilitychange webkitvisibilitychange mozvisibilitychange msvisibilitychange\", function () {\n if (document.hidden || document.webkitHidden || document.mozHidden || document.msHidden) {\n if (visible) {\n visible = false;\n settings.onHide.call();\n }\n } else {\n if (!visible) {\n visible = true;\n settings.onShow.call();\n }\n }\n });\n }\n });\n\n };\n}(jQuery));\n","/*\n jQuery Masked Input Plugin\n Copyright (c) 2007 - 2015 Josh Bush (digitalbush.com)\n Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)\n Version: 1.4.1\n*/\n!function(factory) {\n \"function\" == typeof define && define.amd ? define([ \"jquery\" ], factory) : factory(\"object\" == typeof exports ? require(\"jquery\") : jQuery);\n}(function($) {\n var caretTimeoutId, ua = navigator.userAgent, iPhone = /iphone/i.test(ua), chrome = /chrome/i.test(ua), android = /android/i.test(ua);\n $.mask = {\n definitions: {\n \"9\": \"[0-9]\",\n a: \"[A-Za-z]\",\n \"*\": \"[A-Za-z0-9]\"\n },\n autoclear: !0,\n dataName: \"rawMaskFn\",\n placeholder: \"_\"\n }, $.fn.extend({\n caret: function(begin, end) {\n var range;\n if (0 !== this.length && !this.is(\":hidden\")) return \"number\" == typeof begin ? (end = \"number\" == typeof end ? end : begin, \n this.each(function() {\n this.setSelectionRange ? this.setSelectionRange(begin, end) : this.createTextRange && (range = this.createTextRange(), \n range.collapse(!0), range.moveEnd(\"character\", end), range.moveStart(\"character\", begin), \n range.select());\n })) : (this[0].setSelectionRange ? (begin = this[0].selectionStart, end = this[0].selectionEnd) : document.selection && document.selection.createRange && (range = document.selection.createRange(), \n begin = 0 - range.duplicate().moveStart(\"character\", -1e5), end = begin + range.text.length), \n {\n begin: begin,\n end: end\n });\n },\n unmask: function() {\n return this.trigger(\"unmask\");\n },\n mask: function(mask, settings) {\n var input, defs, tests, partialPosition, firstNonMaskPos, lastRequiredNonMaskPos, len, oldVal;\n if (!mask && this.length > 0) {\n input = $(this[0]);\n var fn = input.data($.mask.dataName);\n return fn ? fn() : void 0;\n }\n return settings = $.extend({\n autoclear: $.mask.autoclear,\n placeholder: $.mask.placeholder,\n completed: null\n }, settings), defs = $.mask.definitions, tests = [], partialPosition = len = mask.length, \n firstNonMaskPos = null, $.each(mask.split(\"\"), function(i, c) {\n \"?\" == c ? (len--, partialPosition = i) : defs[c] ? (tests.push(new RegExp(defs[c])), \n null === firstNonMaskPos && (firstNonMaskPos = tests.length - 1), partialPosition > i && (lastRequiredNonMaskPos = tests.length - 1)) : tests.push(null);\n }), this.trigger(\"unmask\").each(function() {\n function tryFireCompleted() {\n if (settings.completed) {\n for (var i = firstNonMaskPos; lastRequiredNonMaskPos >= i; i++) if (tests[i] && buffer[i] === getPlaceholder(i)) return;\n settings.completed.call(input);\n }\n }\n function getPlaceholder(i) {\n return settings.placeholder.charAt(i < settings.placeholder.length ? i : 0);\n }\n function seekNext(pos) {\n for (;++pos < len && !tests[pos]; ) ;\n return pos;\n }\n function seekPrev(pos) {\n for (;--pos >= 0 && !tests[pos]; ) ;\n return pos;\n }\n function shiftL(begin, end) {\n var i, j;\n if (!(0 > begin)) {\n for (i = begin, j = seekNext(end); len > i; i++) if (tests[i]) {\n if (!(len > j && tests[i].test(buffer[j]))) break;\n buffer[i] = buffer[j], buffer[j] = getPlaceholder(j), j = seekNext(j);\n }\n writeBuffer(), input.caret(Math.max(firstNonMaskPos, begin));\n }\n }\n function shiftR(pos) {\n var i, c, j, t;\n for (i = pos, c = getPlaceholder(pos); len > i; i++) if (tests[i]) {\n if (j = seekNext(i), t = buffer[i], buffer[i] = c, !(len > j && tests[j].test(t))) break;\n c = t;\n }\n }\n function androidInputEvent() {\n var curVal = input.val(), pos = input.caret();\n if (oldVal && oldVal.length && oldVal.length > curVal.length) {\n for (checkVal(!0); pos.begin > 0 && !tests[pos.begin - 1]; ) pos.begin--;\n if (0 === pos.begin) for (;pos.begin < firstNonMaskPos && !tests[pos.begin]; ) pos.begin++;\n input.caret(pos.begin, pos.begin);\n } else {\n for (checkVal(!0); pos.begin < len && !tests[pos.begin]; ) pos.begin++;\n input.caret(pos.begin, pos.begin);\n }\n tryFireCompleted();\n }\n function blurEvent() {\n checkVal(), input.val() != focusText && input.change();\n }\n function keydownEvent(e) {\n if (!input.prop(\"readonly\")) {\n var pos, begin, end, k = e.which || e.keyCode;\n oldVal = input.val(), 8 === k || 46 === k || iPhone && 127 === k ? (pos = input.caret(), \n begin = pos.begin, end = pos.end, end - begin === 0 && (begin = 46 !== k ? seekPrev(begin) : end = seekNext(begin - 1), \n end = 46 === k ? seekNext(end) : end), clearBuffer(begin, end), shiftL(begin, end - 1), \n e.preventDefault()) : 13 === k ? blurEvent.call(this, e) : 27 === k && (input.val(focusText), \n input.caret(0, checkVal()), e.preventDefault());\n }\n }\n function keypressEvent(e) {\n if (!input.prop(\"readonly\")) {\n var p, c, next, k = e.which || e.keyCode, pos = input.caret();\n if (!(e.ctrlKey || e.altKey || e.metaKey || 32 > k) && k && 13 !== k) {\n if (pos.end - pos.begin !== 0 && (clearBuffer(pos.begin, pos.end), shiftL(pos.begin, pos.end - 1)), \n p = seekNext(pos.begin - 1), len > p && (c = String.fromCharCode(k), tests[p].test(c))) {\n if (shiftR(p), buffer[p] = c, writeBuffer(), next = seekNext(p), android) {\n var proxy = function() {\n $.proxy($.fn.caret, input, next)();\n };\n setTimeout(proxy, 0);\n } else input.caret(next);\n pos.begin <= lastRequiredNonMaskPos && tryFireCompleted();\n }\n e.preventDefault();\n }\n }\n }\n function clearBuffer(start, end) {\n var i;\n for (i = start; end > i && len > i; i++) tests[i] && (buffer[i] = getPlaceholder(i));\n }\n function writeBuffer() {\n input.val(buffer.join(\"\"));\n }\n function checkVal(allow) {\n var i, c, pos, test = input.val(), lastMatch = -1;\n for (i = 0, pos = 0; len > i; i++) if (tests[i]) {\n for (buffer[i] = getPlaceholder(i); pos++ < test.length; ) if (c = test.charAt(pos - 1), \n tests[i].test(c)) {\n buffer[i] = c, lastMatch = i;\n break;\n }\n if (pos > test.length) {\n clearBuffer(i + 1, len);\n break;\n }\n } else buffer[i] === test.charAt(pos) && pos++, partialPosition > i && (lastMatch = i);\n return allow ? writeBuffer() : partialPosition > lastMatch + 1 ? settings.autoclear || buffer.join(\"\") === defaultBuffer ? (input.val() && input.val(\"\"), \n clearBuffer(0, len)) : writeBuffer() : (writeBuffer(), input.val(input.val().substring(0, lastMatch + 1))), \n partialPosition ? i : firstNonMaskPos;\n }\n var input = $(this), buffer = $.map(mask.split(\"\"), function(c, i) {\n return \"?\" != c ? defs[c] ? getPlaceholder(i) : c : void 0;\n }), defaultBuffer = buffer.join(\"\"), focusText = input.val();\n input.data($.mask.dataName, function() {\n return $.map(buffer, function(c, i) {\n return tests[i] && c != getPlaceholder(i) ? c : null;\n }).join(\"\");\n }), input.one(\"unmask\", function() {\n input.off(\".mask\").removeData($.mask.dataName);\n }).on(\"focus.mask\", function() {\n if (!input.prop(\"readonly\")) {\n clearTimeout(caretTimeoutId);\n var pos;\n focusText = input.val(), pos = checkVal(), caretTimeoutId = setTimeout(function() {\n input.get(0) === document.activeElement && (writeBuffer(), pos == mask.replace(\"?\", \"\").length ? input.caret(0, pos) : input.caret(pos));\n }, 10);\n }\n }).on(\"blur.mask\", blurEvent).on(\"keydown.mask\", keydownEvent).on(\"keypress.mask\", keypressEvent).on(\"input.mask paste.mask\", function() {\n input.prop(\"readonly\") || setTimeout(function() {\n var pos = checkVal(!0);\n input.caret(pos), tryFireCompleted();\n }, 0);\n }), chrome && android && input.off(\"input.mask\").on(\"input.mask\", androidInputEvent), \n checkVal();\n });\n }\n });\n});","/*!\n * JavaScript Cookie v2.0.4\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n(function (factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t} else if (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t} else {\n\t\tvar _OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = _OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api (key, value, attributes) {\n\t\t\tvar result;\n\n\t\t\t// Write\n\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tattributes = extend({\n\t\t\t\t\tpath: '/'\n\t\t\t\t}, api.defaults, attributes);\n\n\t\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\t\tvar expires = new Date();\n\t\t\t\t\texpires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n\t\t\t\t\tattributes.expires = expires;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tresult = JSON.stringify(value);\n\t\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\t\tvalue = result;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\n\t\t\t\tvalue = encodeURIComponent(String(value));\n\t\t\t\tvalue = value.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\t\tkey = encodeURIComponent(String(key));\n\t\t\t\tkey = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);\n\t\t\t\tkey = key.replace(/[\\(\\)]/g, escape);\n\n\t\t\t\treturn (document.cookie = [\n\t\t\t\t\tkey, '=', value,\n\t\t\t\t\tattributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE\n\t\t\t\t\tattributes.path && '; path=' + attributes.path,\n\t\t\t\t\tattributes.domain && '; domain=' + attributes.domain,\n\t\t\t\t\tattributes.secure ? '; secure' : ''\n\t\t\t\t].join(''));\n\t\t\t}\n\n\t\t\t// Read\n\n\t\t\tif (!key) {\n\t\t\t\tresult = {};\n\t\t\t}\n\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t\t// calling \"get()\"\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar rdecode = /(%[0-9A-Z]{2})+/g;\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar name = parts[0].replace(rdecode, decodeURIComponent);\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tcookie = converter && converter(cookie, name) || cookie.replace(rdecode, decodeURIComponent);\n\n\t\t\t\t\tif (this.json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tresult = cookie;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!key) {\n\t\t\t\t\t\tresult[name] = cookie;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tapi.get = api.set = api;\n\t\tapi.getJSON = function () {\n\t\t\treturn api.apply({\n\t\t\t\tjson: true\n\t\t\t}, [].slice.call(arguments));\n\t\t};\n\t\tapi.defaults = {};\n\n\t\tapi.remove = function (key, attributes) {\n\t\t\tapi(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init();\n}));\n","/**\n * jVectorMap version 2.0.4\n *\n * Copyright 2011-2014, Kirill Lebedev\n *\n */\n\n(function( $ ){\n var apiParams = {\n set: {\n colors: 1,\n values: 1,\n backgroundColor: 1,\n scaleColors: 1,\n normalizeFunction: 1,\n focus: 1\n },\n get: {\n selectedRegions: 1,\n selectedMarkers: 1,\n mapObject: 1,\n regionName: 1\n }\n };\n\n $.fn.vectorMap = function(options) {\n var map,\n methodName,\n map = this.children('.jvectormap-container').data('mapObject');\n\n if (options === 'addMap') {\n jvm.Map.maps[arguments[1]] = arguments[2];\n } else if ((options === 'set' || options === 'get') && apiParams[options][arguments[1]]) {\n methodName = arguments[1].charAt(0).toUpperCase()+arguments[1].substr(1);\n return map[options+methodName].apply(map, Array.prototype.slice.call(arguments, 2));\n } else {\n options = options || {};\n options.container = this;\n map = new jvm.Map(options);\n }\n\n return this;\n };\n})( jQuery );\n","/**\n * @license\n * lodash 4.0.1 (Custom Build) <https://lodash.com/>\n * Build: `lodash -o ./dist/lodash.js`\n * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.0.1';\n\n /** Used to compose bitmasks for wrapper metadata. */\n var BIND_FLAG = 1,\n BIND_KEY_FLAG = 2,\n CURRY_BOUND_FLAG = 4,\n CURRY_FLAG = 8,\n CURRY_RIGHT_FLAG = 16,\n PARTIAL_FLAG = 32,\n PARTIAL_RIGHT_FLAG = 64,\n ARY_FLAG = 128,\n REARG_FLAG = 256,\n FLIP_FLAG = 512;\n\n /** Used to compose bitmasks for comparison styles. */\n var UNORDERED_COMPARE_FLAG = 1,\n PARTIAL_COMPARE_FLAG = 2;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 150,\n HOT_SPAN = 16;\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as the `TypeError` message for \"Functions\" methods. */\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,\n reUnescapedHtml = /[&<>\"'`]/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]/g;\n\n /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading and trailing whitespace. */\n var reTrim = /^\\s+|\\s+$/g,\n reTrimStart = /^\\s+/,\n reTrimEnd = /\\s+$/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect hexadecimal string values. */\n var reHasHexPrefix = /^0x/i;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari > 5). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match latin-1 supplementary letters (excluding mathematical operators). */\n var reLatin1 = /[\\xc0-\\xd6\\xd8-\\xde\\xdf-\\xf6\\xf8-\\xff]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe23',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20f0',\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsQuoteRange = '\\\\u2018\\\\u2019\\\\u201c\\\\u201d',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsQuoteRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',\n rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');\n\n /** Used to match non-compound words composed of alphanumeric characters. */\n var reBasicWord = /[a-zA-Z0-9]+/g;\n\n /** Used to match complex or compound words. */\n var reComplexWord = RegExp([\n rsUpper + '?' + rsLower + '+(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsUpperMisc + '+(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',\n rsUpper + '?' + rsLowerMisc + '+',\n rsUpper + '+',\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasComplexWord = /[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Date', 'Error', 'Float32Array', 'Float64Array', 'Function',\n 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Reflect', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', '_',\n 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dateTag] = typedArrayTags[errorTag] =\n typedArrayTags[funcTag] = typedArrayTags[mapTag] =\n typedArrayTags[numberTag] = typedArrayTags[objectTag] =\n typedArrayTags[regexpTag] = typedArrayTags[setTag] =\n typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =\n cloneableTags[dateTag] = cloneableTags[float32Tag] =\n cloneableTags[float64Tag] = cloneableTags[int8Tag] =\n cloneableTags[int16Tag] = cloneableTags[int32Tag] =\n cloneableTags[mapTag] = cloneableTags[numberTag] =\n cloneableTags[objectTag] = cloneableTags[regexpTag] =\n cloneableTags[setTag] = cloneableTags[stringTag] =\n cloneableTags[symbolTag] = cloneableTags[uint8Tag] =\n cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =\n cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map latin-1 supplementary letters to basic latin letters. */\n var deburredLetters = {\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcC': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xeC': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\",\n '`': '`'\n };\n\n /** Used to determine if values are of the language type `Object`. */\n var objectTypes = {\n 'function': true,\n 'object': true\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `exports`. */\n var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;\n\n /** Detect free variable `module`. */\n var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);\n\n /** Detect free variable `self`. */\n var freeSelf = checkGlobal(objectTypes[typeof self] && self);\n\n /** Detect free variable `window`. */\n var freeWindow = checkGlobal(objectTypes[typeof window] && window);\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = (freeModule && freeModule.exports === freeExports) ? freeExports : null;\n\n /** Detect `this` as the global object. */\n var thisGlobal = checkGlobal(objectTypes[typeof this] && this);\n\n /**\n * Used as a reference to the global object.\n *\n * The `this` value is used if it's the global object to avoid Greasemonkey's\n * restricted `window` object, otherwise the `window` object is used.\n */\n var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\n function addMapEntry(map, pair) {\n map.set(pair[0], pair[1]);\n return map;\n }\n\n /**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\n function addSetEntry(set, value) {\n set.add(value);\n return set;\n }\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n var length = args ? args.length : 0;\n switch (length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * Creates a new array concatenating `array` with `other`.\n *\n * @private\n * @param {Array} array The first array to concatenate.\n * @param {Array} other The second array to concatenate.\n * @returns {Array} Returns the new concatenated array.\n */\n function arrayConcat(array, other) {\n var index = -1,\n length = array.length,\n othIndex = -1,\n othLength = other.length,\n result = Array(length + othLength);\n\n while (++index < length) {\n result[index] = array[index];\n }\n while (++othIndex < othLength) {\n result[index++] = other[othIndex];\n }\n return result;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check, else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array.length,\n resIndex = -1,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[++resIndex] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} array The array to search.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n return !!array.length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * A specialized version of `_.includesWith` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} array The array to search.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? current === current\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of methods like `_.find` and `_.findKey`, without\n * support for iteratee shorthands, which iterates over `collection` using\n * `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to search.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @param {boolean} [retKey] Specify returning the key of the found element instead of the element itself.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFind(collection, predicate, eachFunc, retKey) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = retKey ? key : value;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to search.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to search.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n if (value !== value) {\n return indexOfNaN(array, fromIndex);\n }\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define\n * the sort order of `array` and replaces criteria objects with their\n * corresponding values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the new array of key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.unary` without support for storing wrapper metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Checks if `value` is a global object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {null|Object} Returns `value` if it's a global object, else `null`.\n */\n function checkGlobal(value) {\n return (value && value.Object === Object) ? value : null;\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsNull = value === null,\n valIsUndef = value === undefined,\n valIsReflexive = value === value;\n\n var othIsNull = other === null,\n othIsUndef = other === undefined,\n othIsReflexive = other === other;\n\n if ((value > other && !othIsNull) || !valIsReflexive ||\n (valIsNull && !othIsUndef && othIsReflexive) ||\n (valIsUndef && othIsReflexive)) {\n return 1;\n }\n if ((value < other && !valIsNull) || !othIsReflexive ||\n (othIsNull && !valIsUndef && valIsReflexive) ||\n (othIsUndef && valIsReflexive)) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://code.google.com/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n function deburrLetter(letter) {\n return deburredLetters[letter];\n }\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeHtmlChar(chr) {\n return htmlEscapes[chr];\n }\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the index at which the first occurrence of `NaN` is found in `array`.\n *\n * @private\n * @param {Array} array The array to search.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched `NaN`, else `-1`.\n */\n function indexOfNaN(array, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 0 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n var other = array[index];\n if (other !== other) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\n function isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\n length = length == null ? MAX_SAFE_INTEGER : length;\n return value > -1 && value % 1 == 0 && value < length;\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to an array.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the converted array.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = -1,\n result = [];\n\n while (++index < length) {\n if (array[index] === placeholder) {\n array[index] = PLACEHOLDER;\n result[++resIndex] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the converted array.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n if (!(string && reHasComplexSymbol.test(string))) {\n return string.length;\n }\n var result = reComplexSymbol.lastIndex = 0;\n while (reComplexSymbol.test(string)) {\n result++;\n }\n return result;\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return string.match(reComplexSymbol);\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n function unescapeHtmlChar(chr) {\n return htmlUnescapes[chr];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // using `context` to mock `Date#getTime` use in `_.now`\n * var mock = _.runInContext({\n * 'Date': function() {\n * return { 'getTime': getTimeMock };\n * }\n * });\n *\n * // or creating a suped-up `defer` in Node.js\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n function runInContext(context) {\n context = context ? _.defaults({}, context, _.pick(root, contextProps)) : root;\n\n /** Built-in constructor references. */\n var Date = context.Date,\n Error = context.Error,\n Math = context.Math,\n RegExp = context.RegExp,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = context.Array.prototype,\n objectProto = context.Object.prototype;\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = context.Function.prototype.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objectToString = objectProto.toString;\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Reflect = context.Reflect,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n clearTimeout = context.clearTimeout,\n enumerate = Reflect ? Reflect.enumerate : undefined,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertySymbols = Object.getOwnPropertySymbols,\n iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n setTimeout = context.setTimeout,\n splice = arrayProto.splice;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = Object.keys,\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var Map = getNative(context, 'Map'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to detect maps and sets. */\n var mapCtorString = Map ? funcToString.call(Map) : '',\n setCtorString = Set ? funcToString.call(Set) : '';\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = Symbol ? symbolProto.valueOf : undefined,\n symbolToString = Symbol ? symbolProto.toString : undefined;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chaining. Methods that operate on and return arrays, collections, and\n * functions can be chained together. Methods that retrieve a single value or\n * may return a primitive value will automatically end the chain sequence and\n * return the unwrapped value. Otherwise, the value must be unwrapped with\n * `_#value`.\n *\n * Explicit chaining, which must be unwrapped with `_#value` in all cases,\n * may be enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion. Shortcut\n * fusion is an optimization to merge iteratee calls; this avoids the creation\n * of intermediate arrays and can greatly reduce the number of iteratee executions.\n * Sections of a chain sequence qualify for shortcut fusion if the section is\n * applied to an array of at least two hundred elements and any iteratees\n * accept only one argument. The heuristic for whether a section qualifies\n * for shortcut fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`,\n * `at`, `before`, `bind`, `bindAll`, `bindKey`, `chain`, `chunk`, `commit`,\n * `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, `curry`,\n * `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`,\n * `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`,\n * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flip`, `flow`,\n * `flowRight`, `fromPairs`, `functions`, `functionsIn`, `groupBy`, `initial`,\n * `intersection`, `intersectionBy`, `intersectionWith`, `invert`, `invokeMap`,\n * `iteratee`, `keyBy`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`,\n * `matches`, `matchesProperty`, `memoize`, `merge`, `mergeWith`, `method`,\n * `methodOf`, `mixin`, `negate`, `nthArg`, `omit`, `omitBy`, `once`, `orderBy`,\n * `over`, `overArgs`, `overEvery`, `overSome`, `partial`, `partialRight`,\n * `partition`, `pick`, `pickBy`, `plant`, `property`, `propertyOf`, `pull`,\n * `pullAll`, `pullAllBy`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`,\n * `reject`, `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`,\n * `shuffle`, `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`,\n * `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`,\n * `toArray`, `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`,\n * `unary`, `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`,\n * `unset`, `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, `without`,\n * `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, `zipObject`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`,\n * `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,\n * `findLast`, `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,\n * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,\n * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMatch`, `isMatchWith`,\n * `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, `isObject`, `isObjectLike`,\n * `isPlainObject`, `isRegExp`, `isSafeInteger`, `isString`, `isUndefined`,\n * `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`,\n * `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`,\n * `noConflict`, `noop`, `now`, `pad`, `padEnd`, `padStart`, `parseInt`,\n * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,\n * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,\n * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,\n * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toLower`,\n * `toInteger`, `toLength`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`,\n * `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`,\n * `upperCase`, `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // returns an unwrapped value\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // returns a wrapped value\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The function whose prototype all chaining wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable chaining for all wrapper methods.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB). Change the following template settings to use\n * alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type Object\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type RegExp\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type RegExp\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type RegExp\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type string\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type Object\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type Function\n */\n '_': lodash\n }\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || arrLength < LARGE_ARRAY_SIZE || (arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an hash object.\n *\n * @private\n * @returns {Object} Returns the new hash object.\n */\n function Hash() {}\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(hash, key) {\n return hashHas(hash, key) && delete hash[key];\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @param {Object} hash The hash to query.\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(hash, key) {\n if (nativeCreate) {\n var result = hash[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(hash, key) ? hash[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @param {Object} hash The hash to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(hash, key) {\n return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n */\n function hashSet(hash, key, value) {\n hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @param {Array} [values] The values to cache.\n */\n function MapCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = values[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapDelete(key) {\n var data = this.__data__;\n if (isKeyable(key)) {\n return hashDelete(typeof key == 'string' ? data.string : data.hash, key);\n }\n return Map ? data.map['delete'](key) : assocDelete(data.map, key);\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapGet(key) {\n var data = this.__data__;\n if (isKeyable(key)) {\n return hashGet(typeof key == 'string' ? data.string : data.hash, key);\n }\n return Map ? data.map.get(key) : assocGet(data.map, key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapHas(key) {\n var data = this.__data__;\n if (isKeyable(key)) {\n return hashHas(typeof key == 'string' ? data.string : data.hash, key);\n }\n return Map ? data.map.has(key) : assocHas(data.map, key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache object.\n */\n function mapSet(key, value) {\n var data = this.__data__;\n if (isKeyable(key)) {\n hashSet(typeof key == 'string' ? data.string : data.hash, key, value);\n } else if (Map) {\n data.map.set(key, value);\n } else {\n assocSet(data.map, key, value);\n }\n return this;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates a set cache object to store unique values.\n *\n * @private\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.push(values[index]);\n }\n }\n\n /**\n * Checks if `value` is in `cache`.\n *\n * @private\n * @param {Object} cache The set cache to search.\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function cacheHas(cache, value) {\n var map = cache.__data__;\n if (isKeyable(value)) {\n var data = map.__data__,\n hash = typeof value == 'string' ? data.string : data.hash;\n\n return hash[value] === HASH_UNDEFINED;\n }\n return map.has(value);\n }\n\n /**\n * Adds `value` to the set cache.\n *\n * @private\n * @name push\n * @memberOf SetCache\n * @param {*} value The value to cache.\n */\n function cachePush(value) {\n var map = this.__data__;\n if (isKeyable(value)) {\n var data = map.__data__,\n hash = typeof value == 'string' ? data.string : data.hash;\n\n hash[value] = HASH_UNDEFINED;\n }\n else {\n map.set(value, HASH_UNDEFINED);\n }\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @param {Array} [values] The values to cache.\n */\n function Stack(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = values[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = { 'array': [], 'map': null };\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n array = data.array;\n\n return array ? assocDelete(array, key) : data.map['delete'](key);\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n var data = this.__data__,\n array = data.array;\n\n return array ? assocGet(array, key) : data.map.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n var data = this.__data__,\n array = data.array;\n\n return array ? assocHas(array, key) : data.map.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache object.\n */\n function stackSet(key, value) {\n var data = this.__data__,\n array = data.array;\n\n if (array) {\n if (array.length < (LARGE_ARRAY_SIZE - 1)) {\n assocSet(array, key, value);\n } else {\n data.array = null;\n data.map = new MapCache(array);\n }\n }\n var map = data.map;\n if (map) {\n map.set(key, value);\n }\n return this;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Removes `key` and its value from the associative array.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function assocDelete(array, key) {\n var index = assocIndexOf(array, key);\n if (index < 0) {\n return false;\n }\n var lastIndex = array.length - 1;\n if (index == lastIndex) {\n array.pop();\n } else {\n splice.call(array, index, 1);\n }\n return true;\n }\n\n /**\n * Gets the associative array value for `key`.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function assocGet(array, key) {\n var index = assocIndexOf(array, key);\n return index < 0 ? undefined : array[index][1];\n }\n\n /**\n * Checks if an associative array value for `key` exists.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function assocHas(array, key) {\n return assocIndexOf(array, key) > -1;\n }\n\n /**\n * Gets the index at which the first occurrence of `key` is found in `array`\n * of key-value pairs.\n *\n * @private\n * @param {Array} array The array to search.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Sets the associative array `key` to `value`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n */\n function assocSet(array, key, value) {\n var index = assocIndexOf(array, key);\n if (index < 0) {\n array.push([key, value]);\n } else {\n array[index][1] = value;\n }\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function assignInDefaults(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (typeof key == 'number' && value === undefined && !(key in object))) {\n object[key] = value;\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if ((!eq(objValue, value) ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths of elements to pick.\n * @returns {Array} Returns the new array of picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n isNil = object == null,\n length = paths.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = isNil ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments to numbers.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, isDeep, customizer, key, object, stack) {\n var result;\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n if (isHostObject(value)) {\n return object ? value : {};\n }\n result = initCloneObject(isFunc ? {} : value);\n if (!isDeep) {\n return copySymbols(value, baseAssign(result, value));\n }\n } else {\n return cloneableTags[tag]\n ? initCloneByTag(value, tag, isDeep)\n : (object ? value : {});\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n // Recursively populate clone (susceptible to call stack limits).\n (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {\n assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));\n });\n return isArr ? result : copySymbols(value, result);\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new function.\n */\n function baseConforms(source) {\n var props = keys(source),\n length = props.length;\n\n return function(object) {\n if (object == null) {\n return !length;\n }\n var index = length;\n while (index--) {\n var key = props[index],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in Object(object))) || !predicate(value)) {\n return false;\n }\n }\n return true;\n };\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(prototype) {\n if (isObject(prototype)) {\n object.prototype = prototype;\n var result = new object;\n object.prototype = undefined;\n }\n return result || {};\n };\n }());\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts an array\n * of `func` arguments.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Object} args The arguments provide to `func`.\n * @returns {number} Returns the timer id.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support for\n * excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check, else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {boolean} [isDeep] Specify a deep flatten.\n * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, isDeep, isStrict, result) {\n result || (result = []);\n\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index];\n if (isArrayLikeObject(value) &&\n (isStrict || isArray(value) || isArguments(value))) {\n if (isDeep) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, isDeep, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForIn` and `baseForOwn` which iterates\n * over `object` properties returned by `keysFunc` invoking `iteratee` for\n * each property. Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forIn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForIn(object, iteratee) {\n return object == null ? object : baseFor(object, iteratee, keysIn);\n }\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from those provided.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the new array of filtered property names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = isKey(path, object) ? [path + ''] : baseToPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[path[index++]];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,\n // that are composed entirely of index properties, return `false` for\n // `hasOwnProperty` checks of them.\n return hasOwnProperty.call(object, key) ||\n (typeof object == 'object' && key in object && getPrototypeOf(object) === null);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments to numbers.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n caches[othIndex] = !comparator && (iteratee || array.length >= 120)\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n length = array.length,\n seen = caches[0];\n\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) {\n var othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator))) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n if (!isKey(path, object)) {\n path = baseToPath(path);\n object = parent(object, path);\n path = last(path);\n }\n var func = object == null ? object : object[path];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {boolean} [bitmask] The bitmask of comparison flags.\n * The bitmask may be composed of the following flags:\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, customizer, bitmask, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = arrayTag,\n othTag = arrayTag;\n\n if (!objIsArr) {\n objTag = getTag(object);\n if (objTag == argsTag) {\n objTag = objectTag;\n } else if (objTag != objectTag) {\n objIsArr = isTypedArray(object);\n }\n }\n if (!othIsArr) {\n othTag = getTag(other);\n if (othTag == argsTag) {\n othTag = objectTag;\n } else if (othTag != objectTag) {\n othIsArr = isTypedArray(other);\n }\n }\n var objIsObj = objTag == objectTag && !isHostObject(object),\n othIsObj = othTag == objectTag && !isHostObject(other),\n isSameTag = objTag == othTag;\n\n if (isSameTag && !(objIsArr || objIsObj)) {\n return equalByTag(object, other, objTag, equalFunc, customizer, bitmask);\n }\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n if (!isPartial) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack);\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack,\n result = customizer ? customizer(objValue, srcValue, key, object, source, stack) : undefined;\n\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n var type = typeof value;\n if (type == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (type == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't skip the constructor\n * property of prototypes or treat sparse arrays as dense.\n *\n * @private\n * @type Function\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n return nativeKeys(Object(object));\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't skip the constructor\n * property of prototypes or treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n object = object == null ? object : Object(object);\n\n var result = [];\n for (var key in object) {\n result.push(key);\n }\n return result;\n }\n\n // Fallback for IE < 9 with es6-shim.\n if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {\n baseKeysIn = function(object) {\n return iteratorToArray(enumerate(object));\n };\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n var key = matchData[0][0],\n value = matchData[0][1];\n\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === value &&\n (value !== undefined || (key in Object(object)));\n };\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new function.\n */\n function baseMatchesProperty(path, srcValue) {\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n var props = (isArray(source) || isTypedArray(source)) ? undefined : keysIn(source);\n arrayEach(props || source, function(srcValue, key) {\n if (props) {\n key = srcValue;\n srcValue = source[key];\n }\n if (isObject(srcValue)) {\n stack || (stack = new Stack);\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer ? customizer(object[key], srcValue, (key + ''), object, source, stack) : undefined;\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n });\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = object[key],\n srcValue = source[key],\n stacked = stack.get(srcValue) || stack.get(objValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined,\n isCommon = newValue === undefined;\n\n if (isCommon) {\n newValue = srcValue;\n if (isArray(srcValue) || isTypedArray(srcValue)) {\n if (isArray(objValue)) {\n newValue = srcIndex ? copyArray(objValue) : objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else {\n newValue = baseClone(srcValue);\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\n newValue = baseClone(srcValue);\n }\n else {\n newValue = srcIndex ? baseClone(objValue) : objValue;\n }\n }\n else {\n isCommon = false;\n }\n }\n stack.set(srcValue, newValue);\n\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n var index = -1,\n toIteratee = getIteratee();\n\n iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) {\n return toIteratee(iteratee);\n });\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property names.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property names to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, props) {\n object = Object(object);\n return arrayReduce(props, function(result, key) {\n if (key in object) {\n result[key] = object[key];\n }\n return result;\n }, {});\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, predicate) {\n var result = {};\n baseForIn(object, function(value, key) {\n if (predicate(value, key)) {\n result[key] = value;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAll`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values) {\n return basePullAllBy(array, values);\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAllBy(array, values, iteratee) {\n var index = -1,\n length = values.length,\n seen = array;\n\n if (iteratee) {\n seen = arrayMap(array, function(value) { return iteratee(value); });\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = baseIndexOf(seen, computed, fromIndex)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (lastIndex == length || index != previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n }\n else if (!isKey(index, array)) {\n var path = baseToPath(index),\n object = parent(array, path);\n\n if (object != null) {\n delete object[last(path)];\n }\n }\n else {\n delete array[index];\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments to numbers.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the new array of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n path = isKey(path, object) ? [path + ''] : baseToPath(path);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = path[index];\n if (isObject(nested)) {\n var newValue = value;\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = objValue == null ? (isIndex(path[index + 1]) ? [] : {}) : objValue;\n }\n }\n assignValue(nested, key, newValue);\n }\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop detection.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array ? array.length : low;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n value = iteratee(value);\n\n var low = 0,\n high = array ? array.length : 0,\n valIsNaN = value !== value,\n valIsNull = value === null,\n valIsUndef = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n isDef = computed !== undefined,\n isReflexive = computed === computed;\n\n if (valIsNaN) {\n var setLow = isReflexive || retHighest;\n } else if (valIsNull) {\n setLow = isReflexive && isDef && (retHighest || computed != null);\n } else if (valIsUndef) {\n setLow = isReflexive && (retHighest || isDef);\n } else if (computed == null) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array) {\n return baseSortedUniqBy(array);\n }\n\n /**\n * The base implementation of `_.sortedUniqBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniqBy(array, iteratee) {\n var index = 0,\n length = array.length,\n value = array[0],\n computed = iteratee ? iteratee(value) : value,\n seen = computed,\n resIndex = 0,\n result = [value];\n\n while (++index < length) {\n value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!eq(computed, seen)) {\n seen = computed;\n result[++resIndex] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPath` which only converts `value` to a\n * path if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Array} Returns the property path array.\n */\n function baseToPath(value) {\n return isArray(value) ? value : stringToPath(value);\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = isKey(path, object) ? [path + ''] : baseToPath(path);\n object = parent(object, path);\n var key = last(path);\n return (object != null && has(object, key)) ? delete object[key] : true;\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var index = -1,\n length = arrays.length;\n\n while (++index < length) {\n var result = result\n ? arrayPush(\n baseDifference(result, arrays[index], iteratee, comparator),\n baseDifference(arrays[index], result, iteratee, comparator)\n )\n : arrays[index];\n }\n return (result && result.length) ? baseUniq(result, iteratee, comparator) : [];\n }\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {ArrayBuffer} buffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneBuffer(buffer) {\n var Ctor = buffer.constructor,\n result = new Ctor(buffer.byteLength),\n view = new Uint8Array(result);\n\n view.set(new Uint8Array(buffer));\n return result;\n }\n\n /**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @returns {Object} Returns the cloned map.\n */\n function cloneMap(map) {\n var Ctor = map.constructor;\n return arrayReduce(mapToArray(map), addMapEntry, new Ctor);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var Ctor = regexp.constructor,\n result = new Ctor(regexp.source, reFlags.exec(regexp));\n\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @returns {Object} Returns the cloned set.\n */\n function cloneSet(set) {\n var Ctor = set.constructor;\n return arrayReduce(setToArray(set), addSetEntry, new Ctor);\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return Symbol ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = typedArray.buffer,\n Ctor = typedArray.constructor;\n\n return new Ctor(isDeep ? cloneBuffer(buffer) : buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array|Object} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders) {\n var holdersLength = holders.length,\n argsIndex = -1,\n argsLength = nativeMax(args.length - holdersLength, 0),\n leftIndex = -1,\n leftLength = partials.length,\n result = Array(leftLength + argsLength);\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n while (argsLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array|Object} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders) {\n var holdersIndex = -1,\n holdersLength = holders.length,\n argsIndex = -1,\n argsLength = nativeMax(args.length - holdersLength, 0),\n rightIndex = -1,\n rightLength = partials.length,\n result = Array(argsLength + rightLength);\n\n while (++argsIndex < argsLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property names to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object) {\n return copyObjectWith(source, props, object);\n }\n\n /**\n * This function is like `copyObject` except that it accepts a function to\n * customize copied values.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property names to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObjectWith(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index],\n newValue = customizer ? customizer(object[key], source[key], key, object, source) : source[key];\n\n assignValue(object, key, newValue);\n }\n return object;\n }\n\n /**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set keys and values of the accumulator object.\n * @param {Function} [initializer] The function to initialize the accumulator object.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var result = initializer ? initializer() : {};\n iteratee = getIteratee(iteratee);\n\n if (isArray(collection)) {\n var index = -1,\n length = collection.length;\n\n while (++index < length) {\n var value = collection[index];\n setter(result, value, iteratee(value), collection);\n }\n } else {\n baseEach(collection, function(value, key, collection) {\n setter(result, value, iteratee(value), collection);\n });\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return rest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = typeof customizer == 'function' ? (length--, customizer) : undefined;\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBaseWrapper(func, bitmask, thisArg) {\n var isBind = bitmask & BIND_FLAG,\n Ctor = createCtorWrapper(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = reHasComplexSymbol.test(string) ? stringToArray(string) : undefined,\n chr = strSymbols ? strSymbols[0] : string.charAt(0),\n trailing = strSymbols ? strSymbols.slice(1).join('') : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string)), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtorWrapper(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors.\n // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurryWrapper(func, bitmask, arity) {\n var Ctor = createCtorWrapper(func);\n\n function wrapper() {\n var length = arguments.length,\n index = length,\n args = Array(length),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func,\n placeholder = wrapper.placeholder;\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n return length < arity\n ? createRecurryWrapper(func, bitmask, createHybridWrapper, placeholder, undefined, args, holders, undefined, undefined, arity - length)\n : apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return rest(function(funcs) {\n funcs = baseFlatten(funcs);\n\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & ARY_FLAG,\n isBind = bitmask & BIND_FLAG,\n isBindKey = bitmask & BIND_KEY_FLAG,\n isCurry = bitmask & CURRY_FLAG,\n isCurryRight = bitmask & CURRY_RIGHT_FLAG,\n isFlip = bitmask & FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtorWrapper(func);\n\n function wrapper() {\n var length = arguments.length,\n index = length,\n args = Array(length);\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (partials) {\n args = composeArgs(args, partials, holders);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight);\n }\n if (isCurry || isCurryRight) {\n var placeholder = wrapper.placeholder,\n argsHolders = replaceHolders(args, placeholder);\n\n length -= argsHolders.length;\n if (length < arity) {\n return createRecurryWrapper(func, bitmask, createHybridWrapper, placeholder, thisArg, args, argsHolders, argPos, ary, arity - length);\n }\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && args.length > 1) {\n args.reverse();\n }\n if (isAry && ary < args.length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtorWrapper(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new invoker function.\n */\n function createOver(arrayFunc) {\n return rest(function(iteratees) {\n iteratees = arrayMap(baseFlatten(iteratees), getIteratee());\n return rest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {string} string The string to create padding for.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(string, length, chars) {\n length = toInteger(length);\n\n var strLength = stringSize(string);\n if (!length || strLength >= length) {\n return '';\n }\n var padLength = length - strLength;\n chars = chars === undefined ? ' ' : (chars + '');\n\n var result = repeat(chars, nativeCeil(padLength / stringSize(chars)));\n return reHasComplexSymbol.test(chars)\n ? stringToArray(result).slice(0, padLength).join('')\n : result.slice(0, padLength);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg` and the `partials` prepended to those provided to\n * the wrapper.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartialWrapper(func, bitmask, thisArg, partials) {\n var isBind = bitmask & BIND_FLAG,\n Ctor = createCtorWrapper(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toNumber(start);\n start = start === start ? start : 0;\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toNumber(end) || 0;\n }\n step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder to replace.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & CURRY_FLAG,\n newArgPos = argPos ? copyArray(argPos) : undefined,\n newsHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);\n\n if (!(bitmask & CURRY_BOUND_FLAG)) {\n bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);\n }\n var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, arity],\n result = wrapFunc.apply(undefined, newData);\n\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return result;\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = toInteger(precision);\n if (precision) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && new Set([1, 2]).size === 2) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask of wrapper flags.\n * The bitmask may be composed of the following flags:\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func),\n newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] == null\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {\n bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == BIND_FLAG) {\n var result = createBaseWrapper(func, bitmask, thisArg);\n } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {\n result = createCurryWrapper(func, bitmask, arity);\n } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {\n result = createPartialWrapper(func, bitmask, thisArg, partials);\n } else {\n result = createHybridWrapper.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setter(result, newData);\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.\n * @param {Object} [stack] Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {\n var index = -1,\n isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n isUnordered = bitmask & UNORDERED_COMPARE_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked) {\n return stacked == other;\n }\n var result = true;\n stack.set(array, other);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (isUnordered) {\n if (!arraySome(other, function(othValue) {\n return arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack);\n })) {\n result = false;\n break;\n }\n } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {\n switch (tag) {\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n // Coerce dates and booleans to numbers, dates to milliseconds and booleans\n // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.\n return +object == +other;\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case numberTag:\n // Treat `NaN` vs. `NaN` as equal.\n return (object != +object) ? other != +other : object == +other;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings primitives and string\n // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n convert || (convert = setToArray);\n\n // Recursively compare objects (susceptible to call stack limits).\n return (isPartial || object.size == other.size) &&\n equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG);\n\n case symbolTag:\n return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other));\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n objProps = keys(object),\n objLength = objProps.length,\n othProps = keys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : baseHas(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n return result;\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If the `_.iteratee` method is\n * customized this function returns the custom method, otherwise it returns\n * `baseIteratee`. If arguments are provided the chosen function is invoked\n * with them and its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\n var getLength = baseProperty('length');\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = toPairs(object),\n length = result.length;\n\n while (length--) {\n result[length][2] = isStrictComparable(result[length][1]);\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return isNative(value) ? value : undefined;\n }\n\n /**\n * Creates an array of the own symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = getOwnPropertySymbols || function() {\n return [];\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function getTag(value) {\n return objectToString.call(value);\n }\n\n // Fallback for IE 11 providing `toStringTag` values for maps and sets.\n if ((Map && getTag(new Map) != mapTag) || (Set && getTag(new Set) != setTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : null,\n ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';\n\n if (ctorString) {\n if (ctorString == mapCtorString) {\n return mapTag;\n }\n if (ctorString == setCtorString) {\n return setTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n if (object == null) {\n return false;\n }\n var result = hasFunc(object, path);\n if (!result && !isKey(path)) {\n path = baseToPath(path);\n object = parent(object, path);\n if (object != null) {\n path = last(path);\n result = hasFunc(object, path);\n }\n }\n return result || (isLength(object && object.length) && isIndex(path, object.length) &&\n (isArray(object) || isString(object) || isArguments(object)));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n var Ctor = object.constructor;\n return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return cloneMap(object);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return cloneSet(object);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Creates an array of index keys for `object` values of arrays,\n * `arguments` objects, and strings, otherwise `null` is returned.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array|null} Returns index keys, else `null`.\n */\n function indexKeys(object) {\n var length = object ? object.length : undefined;\n return (isLength(length) && (isArray(object) || isString(object) || isArguments(object)))\n ? baseTimes(length, String)\n : null;\n }\n\n /**\n * Checks if the provided arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (typeof value == 'number') {\n return true;\n }\n return !isArray(value) &&\n (reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object)));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return type == 'number' || type == 'boolean' ||\n (type == 'string' && value !== '__proto__') || value == null;\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`\n * modify function arguments, making the order in which they are executed important,\n * preventing the merging of metadata. However, we make an exception for a safe\n * combined case where curried functions have `_.ary` and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (BIND_FLAG | BIND_KEY_FLAG | ARY_FLAG);\n\n var isCombo =\n (srcBitmask == ARY_FLAG && (bitmask == CURRY_FLAG)) ||\n (srcBitmask == ARY_FLAG && (bitmask == REARG_FLAG) && (data[7].length <= source[8])) ||\n (srcBitmask == (ARY_FLAG | REARG_FLAG) && (source[7].length <= source[8]) && (bitmask == CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : copyArray(value);\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : copyArray(source[4]);\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : copyArray(value);\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : copyArray(source[6]);\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = copyArray(value);\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged counterparts.\n * @returns {*} Returns the value to assign.\n */\n function mergeDefaults(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);\n }\n return objValue;\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length == 1 ? object : get(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity function\n * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = (function() {\n var count = 0,\n lastCalled = 0;\n\n return function(key, value) {\n var stamp = now(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return key;\n }\n } else {\n count = 0;\n }\n return baseSetData(key, value);\n };\n }());\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n function stringToPath(string) {\n var result = [];\n toString(string).replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n }\n\n /**\n * Converts `value` to an array-like object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Array} Returns the array-like object.\n */\n function toArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Converts `value` to a function if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Function} Returns the function.\n */\n function toFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=0] The length of each chunk.\n * @returns {Array} Returns the new array containing chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size) {\n size = nativeMax(toInteger(size), 0);\n\n var length = array ? array.length : 0;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = -1,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[++resIndex] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array ? array.length : 0,\n resIndex = -1,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[++resIndex] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n var concat = rest(function(array, values) {\n if (!isArray(array)) {\n array = array == null ? [] : [Object(array)];\n }\n values = baseFlatten(values);\n return arrayConcat(array, values);\n });\n\n /**\n * Creates an array of unique `array` values not included in the other\n * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.difference([3, 2, 1], [4, 2]);\n * // => [3, 1]\n */\n var difference = rest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, false, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor);\n * // => [3.1, 1.3]\n *\n * // using the `_.property` iteratee shorthand\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = rest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, false, true), getIteratee(iteratee))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = rest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, false, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // using the `_.matches` iteratee shorthand\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // using the `_.property` iteratee shorthand\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // using the `_.matches` iteratee shorthand\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // using the `_.property` iteratee shorthand\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // using the `_.matches` iteratee shorthand\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // using the `_.property` iteratee shorthand\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate) {\n return (array && array.length)\n ? baseFindIndex(array, getIteratee(predicate, 3))\n : -1;\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // using the `_.matches` iteratee shorthand\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // using the `_.property` iteratee shorthand\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate) {\n return (array && array.length)\n ? baseFindIndex(array, getIteratee(predicate, 3), true)\n : -1;\n }\n\n /**\n * Creates an array of flattened values by running each element in `array`\n * through `iteratee` and concating its result to the other mapped values.\n * The iteratee is invoked with three arguments: (value, index|key, array).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(array, iteratee) {\n var length = array ? array.length : 0;\n return length ? baseFlatten(arrayMap(array, getIteratee(iteratee, 3))) : [];\n }\n\n /**\n * Flattens `array` a single level.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, 3, [4]]]);\n * // => [1, 2, 3, [4]]\n */\n function flatten(array) {\n var length = array ? array.length : 0;\n return length ? baseFlatten(array) : [];\n }\n\n /**\n * This method is like `_.flatten` except that it recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to recursively flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, 3, [4]]]);\n * // => [1, 2, 3, 4]\n */\n function flattenDeep(array) {\n var length = array ? array.length : 0;\n return length ? baseFlatten(array, true) : [];\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['fred', 30], ['barney', 40]]);\n * // => { 'fred': 30, 'barney': 40 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs ? pairs.length : 0,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return array ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the offset\n * from the end of `array`. If `array` is sorted providing `true` for `fromIndex`\n * performs a faster binary search.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to search.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // using `fromIndex`\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array ? array.length : 0;\n if (!length) {\n return -1;\n }\n fromIndex = toInteger(fromIndex);\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return baseIndexOf(array, value, fromIndex);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n return dropRight(array, 1);\n }\n\n /**\n * Creates an array of unique values that are included in all of the provided\n * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of shared values.\n * @example\n *\n * _.intersection([2, 1], [4, 2], [1, 2]);\n * // => [2]\n */\n var intersection = rest(function(arrays) {\n var mapped = arrayMap(arrays, toArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of shared values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);\n * // => [2.1]\n *\n * // using the `_.property` iteratee shorthand\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = rest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, toArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = rest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, toArrayLikeObject);\n\n if (comparator === last(mapped)) {\n comparator = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array ? nativeJoin.call(array, separator) : '';\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array ? array.length : 0;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to search.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // using `fromIndex`\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array ? array.length : 0;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = (index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1)) + 1;\n }\n if (value !== value) {\n return indexOfNaN(array, index, true);\n }\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * Removes all provided values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3, 1, 2, 3];\n *\n * _.pull(array, 2, 3);\n * console.log(array);\n * // => [1, 1]\n */\n var pull = rest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3, 1, 2, 3];\n *\n * _.pullAll(array, [2, 3]);\n * console.log(array);\n * // => [1, 1]\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to to generate the criterion\n * by which uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAllBy(array, values, getIteratee(iteratee))\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove,\n * specified individually or in arrays.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [5, 10, 15, 20];\n * var evens = _.pullAt(array, 1, 3);\n *\n * console.log(array);\n * // => [5, 15]\n *\n * console.log(evens);\n * // => [10, 20]\n */\n var pullAt = rest(function(array, indexes) {\n indexes = arrayMap(baseFlatten(indexes), String);\n\n var result = baseAt(array, indexes);\n basePullAt(array, indexes.sort(compareAscending));\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @category Array\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array ? nativeReverse.call(array) : array;\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of [`Array#slice`](https://mdn.io/Array/slice)\n * to ensure dense arrays are returned.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value` should\n * be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n *\n * _.sortedIndex([4, 5], 4);\n * // => 0\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted into `array`.\n * @example\n *\n * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };\n *\n * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));\n * // => 1\n *\n * // using the `_.property` iteratee shorthand\n * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to search.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([1, 1, 2, 2], 2);\n * // => 2\n */\n function sortedIndexOf(array, value) {\n var length = array ? array.length : 0;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5], 4);\n * // => 1\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted into `array`.\n * @example\n *\n * // using the `_.property` iteratee shorthand\n * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to search.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([1, 1, 2, 2], 2);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array ? array.length : 0;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.2]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniqBy(array, getIteratee(iteratee))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n return drop(array, 1);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array ? array.length : 0;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with three\n * arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // using the `_.matches` iteratee shorthand\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // using the `_.property` iteratee shorthand\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false},\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // using the `_.matches` iteratee shorthand\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // using the `_.property` iteratee shorthand\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all of the provided arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2, 1], [4, 2], [1, 2]);\n * // => [2, 1, 4]\n */\n var union = rest(function(arrays) {\n return baseUniq(baseFlatten(arrays, false, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor);\n * // => [2.1, 1.2, 4.3]\n *\n * // using the `_.property` iteratee shorthand\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = rest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, false, true), getIteratee(iteratee));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = rest(function(arrays) {\n var comparator = last(arrays);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return baseUniq(baseFlatten(arrays, false, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length)\n ? baseUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // using the `_.property` iteratee shorthand\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length)\n ? baseUniq(array, getIteratee(iteratee))\n : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The comparator is invoked with\n * two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n return (array && array.length)\n ? baseUniq(array, undefined, comparator)\n : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);\n * // => [['fred', 30, true], ['barney', 40, false]]\n *\n * _.unzip(zipped);\n * // => [['fred', 'barney'], [30, 40], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all provided values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} array The array to filter.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.without([1, 2, 1, 3], 1, 2);\n * // => [3]\n */\n var without = rest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the provided arrays.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of values.\n * @example\n *\n * _.xor([2, 1], [4, 2]);\n * // => [1, 4]\n */\n var xor = rest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);\n * // => [1.2, 4.3]\n *\n * // using the `_.property` iteratee shorthand\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = rest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The comparator is invoked with\n * two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = rest(function(arrays) {\n var comparator = last(arrays);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the first\n * elements of the given arrays, the second of which contains the second elements\n * of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['fred', 'barney'], [30, 40], [true, false]);\n * // => [['fred', 30, true], ['barney', 40, false]]\n */\n var zip = rest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property names and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} [props=[]] The property names.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['fred', 'barney'], [30, 40]);\n * // => { 'fred': 30, 'barney': 40 }\n */\n function zipObject(props, values) {\n var index = -1,\n length = props ? props.length : 0,\n valsLength = values ? values.length : 0,\n result = {};\n\n while (++index < length) {\n baseSet(result, props[index], index < valsLength ? values[index] : undefined);\n }\n return result;\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = rest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object that wraps `value` with explicit method chaining enabled.\n * The result of such method chaining must be unwrapped with `_#value`.\n *\n * @static\n * @memberOf _\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor is\n * invoked with one argument; (value). The purpose of this method is to \"tap into\"\n * a method chain in order to perform operations on intermediate results within\n * the chain.\n *\n * @static\n * @memberOf _\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n *\n * @static\n * @memberOf _\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths of elements to pick,\n * specified individually or in arrays.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n *\n * _(['a', 'b', 'c']).at(0, 2).value();\n * // => ['a', 'c']\n */\n var wrapperAt = rest(function(paths) {\n paths = baseFlatten(paths);\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Enables explicit method chaining on the wrapper object.\n *\n * @name chain\n * @memberOf _\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // without explicit chaining\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // with explicit chaining\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chained sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * This method is the wrapper version of `_.flatMap`.\n *\n * @name flatMap\n * @memberOf _\n * @category Seq\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _([1, 2]).flatMap(duplicate).value();\n * // => [1, 1, 2, 2]\n */\n function wrapperFlatMap(iteratee) {\n return this.map(iteratee).flatten();\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chained sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({ 'func': thru, 'args': [reverse], 'thisArg': undefined });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chained sequence to extract the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` through `iteratee`. The corresponding value\n * of each key is the number of times the key was returned by `iteratee`.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check, else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // using the `_.matches` iteratee shorthand\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.every(users, ['active', false]);\n * // => true\n *\n * // using the `_.property` iteratee shorthand\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three arguments:\n * (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // using the `_.matches` iteratee shorthand\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // using the `_.property` iteratee shorthand\n * _.filter(users, 'active');\n * // => objects for ['barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three arguments:\n * (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // using the `_.matches` iteratee shorthand\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // using the `_.property` iteratee shorthand\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n function find(collection, predicate) {\n predicate = getIteratee(predicate, 3);\n if (isArray(collection)) {\n var index = baseFindIndex(collection, predicate);\n return index > -1 ? collection[index] : undefined;\n }\n return baseFind(collection, predicate, baseEach);\n }\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n function findLast(collection, predicate) {\n predicate = getIteratee(predicate, 3);\n if (isArray(collection)) {\n var index = baseFindIndex(collection, predicate, true);\n return index > -1 ? collection[index] : undefined;\n }\n return baseFind(collection, predicate, baseEachRight);\n }\n\n /**\n * Iterates over elements of `collection` invoking `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\" property\n * are iterated like arrays. To avoid this behavior use `_.forIn` or `_.forOwn`\n * for object iteration.\n *\n * @static\n * @memberOf _\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @example\n *\n * _([1, 2]).forEach(function(value) {\n * console.log(value);\n * });\n * // => logs `1` then `2`\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => logs 'a' then 'b' (iteration order is not guaranteed)\n */\n function forEach(collection, iteratee) {\n return (typeof iteratee == 'function' && isArray(collection))\n ? arrayEach(collection, iteratee)\n : baseEach(collection, toFunction(iteratee));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => logs `2` then `1`\n */\n function forEachRight(collection, iteratee) {\n return (typeof iteratee == 'function' && isArray(collection))\n ? arrayEachRight(collection, iteratee)\n : baseEachRight(collection, toFunction(iteratee));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` through `iteratee`. The corresponding value\n * of each key is an array of elements responsible for generating the key.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // using the `_.property` iteratee shorthand\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n result[key] = [value];\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string it's checked\n * for a substring of `value`, otherwise [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object|string} collection The collection to search.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');\n * // => true\n *\n * _.includes('pebbles', 'eb');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `methodName` is a function it's\n * invoked for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = rest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n isProp = isKey(path),\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);\n result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` through `iteratee`. The corresponding value\n * of each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var keyData = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(keyData, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(keyData, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n result[key] = value;\n });\n\n /**\n * Creates an array of values by running each element in `collection` through\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, `fill`,\n * `invert`, `parseInt`, `random`, `range`, `rangeRight`, `slice`, `some`,\n * `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimEnd`, `trimStart`,\n * and `words`\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // using the `_.property` iteratee shorthand\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} [iteratees=[_.identity]] The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 42 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // sort by `user` in ascending order and by `age` in descending order\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // using the `_.matches` iteratee shorthand\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // using the `_.property` iteratee shorthand\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` through `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not provided the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * });\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // using the `_.matches` iteratee shorthand\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // using the `_.property` iteratee shorthand\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n predicate = getIteratee(predicate, 3);\n return func(collection, function(value, index, collection) {\n return !predicate(value, index, collection);\n });\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var array = isArrayLike(collection) ? collection : values(collection),\n length = array.length;\n\n return length > 0 ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=0] The number of elements to sample.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n) {\n var index = -1,\n result = toArray(collection),\n length = result.length,\n lastIndex = length - 1;\n\n n = baseClamp(toInteger(n), 0, length);\n while (++index < n) {\n var rand = baseRandom(index, lastIndex),\n value = result[rand];\n\n result[rand] = result[index];\n result[index] = value;\n }\n result.length = n;\n return result;\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n return sampleSize(collection, MAX_ARRAY_LENGTH);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable properties for objects.\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n var result = collection.length;\n return (result && isString(collection)) ? stringSize(collection) : result;\n }\n return keys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // using the `_.matches` iteratee shorthand\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.some(users, ['active', false]);\n * // => true\n *\n * // using the `_.property` iteratee shorthand\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection through each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[]|Object|Object[]|string|string[])} [iteratees=[_.identity]]\n * The iteratees to sort by, specified individually or in arrays.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 42 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, function(o) { return o.user; });\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]\n *\n * _.sortBy(users, 'user', function(o) {\n * return Math.floor(o.age / 10);\n * });\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]\n */\n var sortBy = rest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees.length = 1;\n }\n return baseOrderBy(collection, baseFlatten(iteratees), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @type Function\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => logs the number of milliseconds it took for the deferred function to be invoked\n */\n var now = Date.now;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => logs 'done saving!' after the two async saves have completed\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that accepts up to `n` arguments, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {Function} Returns the new function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => allows adding up to 4 contacts to the list\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and prepends any additional `_.bind` arguments to those provided to the\n * bound function.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind` this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var greet = function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * };\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // using placeholders\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = rest(function(func, thisArg, partials) {\n var bitmask = BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, bind.placeholder);\n bitmask |= PARTIAL_FLAG;\n }\n return createWrapper(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` and prepends\n * any additional `_.bindKey` arguments to those provided to the bound function.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist.\n * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // using placeholders\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = rest(function(object, key, partials) {\n var bitmask = BIND_FLAG | BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, bindKey.placeholder);\n bitmask |= PARTIAL_FLAG;\n }\n return createWrapper(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // using placeholders\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // using placeholders\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide an options object to indicate whether `func` should be invoked on\n * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent calls\n * to the debounced function return the result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the debounced function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=false] Specify invoking on the leading\n * edge of the timeout.\n * @param {number} [options.maxWait] The maximum time `func` is allowed to be\n * delayed before it's invoked.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // avoid costly calculations while the window size is in flux\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // invoke `sendMail` when clicked, debouncing subsequent calls\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // ensure `batchLog` is invoked once after 1 second of debounced calls\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // cancel a trailing debounced invocation\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var args,\n maxTimeoutId,\n result,\n stamp,\n thisArg,\n timeoutId,\n trailingCall,\n lastCalled = 0,\n leading = false,\n maxWait = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxWait = 'maxWait' in options && nativeMax(toNumber(options.maxWait) || 0, wait);\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function cancel() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (maxTimeoutId) {\n clearTimeout(maxTimeoutId);\n }\n lastCalled = 0;\n args = maxTimeoutId = thisArg = timeoutId = trailingCall = undefined;\n }\n\n function complete(isCalled, id) {\n if (id) {\n clearTimeout(id);\n }\n maxTimeoutId = timeoutId = trailingCall = undefined;\n if (isCalled) {\n lastCalled = now();\n result = func.apply(thisArg, args);\n if (!timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n }\n }\n\n function delayed() {\n var remaining = wait - (now() - stamp);\n if (remaining <= 0 || remaining > wait) {\n complete(trailingCall, maxTimeoutId);\n } else {\n timeoutId = setTimeout(delayed, remaining);\n }\n }\n\n function flush() {\n if ((timeoutId && trailingCall) || (maxTimeoutId && trailing)) {\n result = func.apply(thisArg, args);\n }\n cancel();\n return result;\n }\n\n function maxDelayed() {\n complete(trailing, timeoutId);\n }\n\n function debounced() {\n args = arguments;\n stamp = now();\n thisArg = this;\n trailingCall = trailing && (timeoutId || !leading);\n\n if (maxWait === false) {\n var leadingCall = leading && !timeoutId;\n } else {\n if (!maxTimeoutId && !leading) {\n lastCalled = stamp;\n }\n var remaining = maxWait - (stamp - lastCalled),\n isCalled = remaining <= 0 || remaining > maxWait;\n\n if (isCalled) {\n if (maxTimeoutId) {\n maxTimeoutId = clearTimeout(maxTimeoutId);\n }\n lastCalled = stamp;\n result = func.apply(thisArg, args);\n }\n else if (!maxTimeoutId) {\n maxTimeoutId = setTimeout(maxDelayed, remaining);\n }\n }\n if (isCalled && timeoutId) {\n timeoutId = clearTimeout(timeoutId);\n }\n else if (!timeoutId && wait !== maxWait) {\n timeoutId = setTimeout(delayed, wait);\n }\n if (leadingCall) {\n isCalled = true;\n result = func.apply(thisArg, args);\n }\n if (isCalled && !timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // logs 'deferred' after one or more milliseconds\n */\n var defer = rest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => logs 'later' after one second\n */\n var delay = rest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrapper(func, FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoizing function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // modifying the result cache\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // replacing `_.memoize.Cache`\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new memoize.Cache;\n return memoized;\n }\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n return !predicate.apply(this, arguments);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // `initialize` invokes `createApplication` once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with arguments transformed by\n * corresponding `transforms`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms] The functions to transform\n * arguments, specified individually or in arrays.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, square, doubled);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = rest(function(func, transforms) {\n transforms = arrayMap(baseFlatten(transforms), getIteratee());\n\n var funcsLength = transforms.length;\n return rest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partial` arguments prepended\n * to those provided to the new function. This method is like `_.bind` except\n * it does **not** alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * var greet = function(greeting, name) {\n * return greeting + ' ' + name;\n * };\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // using placeholders\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = rest(function(func, partials) {\n var holders = replaceHolders(partials, partial.placeholder);\n return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to those provided to the new function.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * var greet = function(greeting, name) {\n * return greeting + ' ' + name;\n * };\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // using placeholders\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = rest(function(func, partials) {\n var holders = replaceHolders(partials, partialRight.placeholder);\n return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified indexes where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes,\n * specified individually or in arrays.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, 2, 0, 1);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = rest(function(func, indexes) {\n return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes));\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as an array.\n *\n * **Note:** This method is based on the [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n switch (start) {\n case 0: return func.call(this, array);\n case 1: return func.call(this, args[0], array);\n case 2: return func.call(this, args[0], args[1], array);\n }\n var otherArgs = Array(start + 1);\n index = -1;\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the created\n * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3).\n *\n * **Note:** This method is based on the [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * // with a Promise\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function(array) {\n return apply(func, this, array);\n };\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide an options object to indicate whether\n * `func` should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the throttled function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=true] Specify invoking on the leading\n * edge of the timeout.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // avoid excessively updating the position while scrolling\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // cancel a trailing throttled invocation\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, { 'leading': leading, 'maxWait': wait, 'trailing': trailing });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to the wrapper function as its\n * first argument. Any additional arguments provided to the function are\n * appended to those provided to the wrapper function. The wrapper is invoked\n * with the `this` binding of the created function.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} wrapper The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '<p>' + func(text) + '</p>';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '<p>fred, barney, & pebbles</p>'\n */\n function wrap(value, wrapper) {\n wrapper = wrapper == null ? identity : wrapper;\n return partial(wrapper, value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n return baseClone(value, false, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, true);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n return baseClone(value, true, customizer);\n }\n\n /**\n * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'user': 'fred' };\n * var other = { 'user': 'fred' };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`.\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n function gt(value, other) {\n return value > other;\n }\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`.\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n function gte(value, other) {\n return value >= other;\n }\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n function isArguments(value) {\n // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n }\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @type Function\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @type Function\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null &&\n !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @type Function\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && objectToString.call(value) == boolTag);\n }\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n function isDate(value) {\n return isObjectLike(value) && objectToString.call(value) == dateTag;\n }\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('<body>');\n * // => false\n */\n function isElement(value) {\n return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is empty. A value is considered empty unless it's an\n * `arguments` object, array, string, or jQuery-like collection with a length\n * greater than `0` or an object with own enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {Array|Object|string} value The value to inspect.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n return (!isObjectLike(value) || isFunction(value.splice))\n ? !size(value)\n : !keys(value).length;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are **not** supported.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'user': 'fred' };\n * var other = { 'user': 'fred' };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which is\n * invoked to compare values. If `customizer` returns `undefined` comparisons are\n * handled by the method instead. The `customizer` is invoked with up to six arguments:\n * (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n return isObjectLike(value) &&\n typeof value.message == 'string' && objectToString.call(value) == errorTag;\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MAX_VALUE);\n * // => true\n *\n * _.isFinite(3.14);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8 which returns 'object' for typed array constructors, and\n // PhantomJS 1.9 which returns 'function' for `NodeList` instances.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return !!value && typeof value == 'object';\n }\n\n /**\n * Performs a deep comparison between `object` and `source` to determine if\n * `object` contains equivalent property values.\n *\n * **Note:** This method supports comparing the same values as `_.isEqual`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'user': 'fred', 'age': 40 };\n *\n * _.isMatch(object, { 'age': 40 });\n * // => true\n *\n * _.isMatch(object, { 'age': 36 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined` comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4)\n * which returns `true` for `undefined` and other non-numeric values.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (value == null) {\n return false;\n }\n if (isFunction(value)) {\n return reIsNative.test(funcToString.call(value));\n }\n return isObjectLike(value) &&\n (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified\n * as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && objectToString.call(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {\n return false;\n }\n var proto = objectProto;\n if (typeof value.constructor == 'function') {\n proto = getPrototypeOf(value);\n }\n if (proto === null) {\n return true;\n }\n var Ctor = proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n function isRegExp(value) {\n return isObject(value) && objectToString.call(value) == regexpTag;\n }\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n function isTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n }\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`.\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n function lt(value, other) {\n return value < other;\n }\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`.\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n function lte(value, other) {\n return value <= other;\n }\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (iteratorSymbol && value[iteratorSymbol]) {\n return iteratorToArray(value[iteratorSymbol]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3');\n * // => 3\n */\n function toInteger(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n var remainder = value % 1;\n return value === value ? (remainder ? value - remainder : value) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3);\n * // => 3\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3');\n * // => 3\n */\n function toNumber(value) {\n if (isObject(value)) {\n var other = isFunction(value.valueOf) ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable\n * properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3');\n * // => 3\n */\n function toSafeInteger(value) {\n return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\n }\n\n /**\n * Converts `value` to a string if it's not one. An empty string is returned\n * for `null` and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (value == null) {\n return '';\n }\n if (isSymbol(value)) {\n return Symbol ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable properties of source objects to the destination\n * object. Source objects are applied from left to right. Subsequent sources\n * overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function Foo() {\n * this.c = 3;\n * }\n *\n * function Bar() {\n * this.e = 5;\n * }\n *\n * Foo.prototype.d = 4;\n * Bar.prototype.f = 6;\n *\n * _.assign({ 'a': 1 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3, 'e': 5 }\n */\n var assign = createAssigner(function(object, source) {\n copyObject(source, keys(source), object);\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * function Bar() {\n * this.d = 4;\n * }\n *\n * Foo.prototype.c = 3;\n * Bar.prototype.e = 5;\n *\n * _.assignIn({ 'a': 1 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer` which\n * is invoked to produce the assigned values. If `customizer` returns `undefined`\n * assignment is handled by the method instead. The `customizer` is invoked\n * with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObjectWith(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer` which\n * is invoked to produce the assigned values. If `customizer` returns `undefined`\n * assignment is handled by the method instead. The `customizer` is invoked\n * with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObjectWith(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths of elements to pick,\n * specified individually or in arrays.\n * @returns {Array} Returns the new array of picked elements.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n *\n * _.at(['a', 'b', 'c'], 0, 2);\n * // => ['a', 'c']\n */\n var at = rest(function(object, paths) {\n return baseAt(object, baseFlatten(paths));\n });\n\n /**\n * Creates an object that inherits from the `prototype` object. If a `properties`\n * object is provided its own enumerable properties are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties ? baseAssign(result, properties) : result;\n }\n\n /**\n * Assigns own and inherited enumerable properties of source objects to the\n * destination object for all destination properties that resolve to `undefined`.\n * Source objects are applied from left to right. Once a property is set,\n * additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });\n * // => { 'user': 'barney', 'age': 36 }\n */\n var defaults = rest(function(args) {\n args.push(undefined, assignInDefaults);\n return apply(assignInWith, undefined, args);\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });\n * // => { 'user': { 'name': 'barney', 'age': 36 } }\n *\n */\n var defaultsDeep = rest(function(args) {\n args.push(undefined, mergeDefaults);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element, else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // using the `_.matches` iteratee shorthand\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // using the `_.property` iteratee shorthand\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFind(object, getIteratee(predicate, 3), baseForOwn, true);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to search.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element, else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // using the `_.matches` iteratee shorthand\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // using the `_.matchesProperty` iteratee shorthand\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // using the `_.property` iteratee shorthand\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFind(object, getIteratee(predicate, 3), baseForOwnRight, true);\n }\n\n /**\n * Iterates over own and inherited enumerable properties of an object invoking\n * `iteratee` for each property. The iteratee is invoked with three arguments:\n * (value, key, object). Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => logs 'a', 'b', then 'c' (iteration order is not guaranteed)\n */\n function forIn(object, iteratee) {\n return object == null ? object : baseFor(object, toFunction(iteratee), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'\n */\n function forInRight(object, iteratee) {\n return object == null ? object : baseForRight(object, toFunction(iteratee), keysIn);\n }\n\n /**\n * Iterates over own enumerable properties of an object invoking `iteratee`\n * for each property. The iteratee is invoked with three arguments:\n * (value, key, object). Iteratee functions may exit iteration early by\n * explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => logs 'a' then 'b' (iteration order is not guaranteed)\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, toFunction(iteratee));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, toFunction(iteratee));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the new array of property names.\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the new array of property names.\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined` the `defaultValue` is used in its place.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': { 'c': 3 } } };\n * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b.c');\n * // => true\n *\n * _.has(object, ['a', 'b', 'c']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b.c');\n * // => true\n *\n * _.hasIn(object, ['a', 'b', 'c']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite property\n * assignments of previous values unless `multiVal` is `true`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to invert.\n * @param {boolean} [multiVal] Allow multiple values per key.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n *\n * // with `multiVal`\n * _.invert(object, true);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function invert(object, multiVal, guard) {\n return arrayReduce(keys(object), function(result, key) {\n var value = object[key];\n if (multiVal && !guard) {\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }\n else {\n result[value] = key;\n }\n return result;\n }, {});\n }\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = rest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n var isProto = isPrototype(object);\n if (!(isProto || isArrayLike(object))) {\n return baseKeys(object);\n }\n var indexes = indexKeys(object),\n skipIndexes = !!indexes,\n result = indexes || [],\n length = result.length;\n\n for (var key in object) {\n if (baseHas(object, key) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length))) &&\n !(isProto && key == 'constructor')) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n var index = -1,\n isProto = isPrototype(object),\n props = baseKeysIn(object),\n propsLength = props.length,\n indexes = indexKeys(object),\n skipIndexes = !!indexes,\n result = indexes || [],\n length = result.length;\n\n while (++index < propsLength) {\n var key = props[index];\n if (!(skipIndexes && (key == 'length' || isIndex(key, length))) &&\n !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * property of `object` through `iteratee`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n result[iteratee(value, key, object)] = value;\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated by\n * running each own enumerable property of `object` through `iteratee`. The\n * iteratee function is invoked with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // using the `_.property` iteratee shorthand\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n result[key] = iteratee(value, key, object);\n });\n return result;\n }\n\n /**\n * Recursively merges own and inherited enumerable properties of source\n * objects into the destination object, skipping source properties that resolve\n * to `undefined`. Array and plain object properties are merged recursively.\n * Other objects and value types are overridden by assignment. Source objects\n * are applied from left to right. Subsequent sources overwrite property\n * assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var users = {\n * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]\n * };\n *\n * var ages = {\n * 'data': [{ 'age': 36 }, { 'age': 40 }]\n * };\n *\n * _.merge(users, ages);\n * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined` merging is handled by the\n * method instead. The `customizer` is invoked with seven arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = {\n * 'fruits': ['apple'],\n * 'vegetables': ['beet']\n * };\n *\n * var other = {\n * 'fruits': ['banana'],\n * 'vegetables': ['carrot']\n * };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that are not omitted.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [props] The property names to omit, specified\n * individually or in arrays..\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = rest(function(object, props) {\n if (object == null) {\n return {};\n }\n props = arrayMap(baseFlatten(props), String);\n return basePick(object, baseDifference(keysIn(object), props));\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of the\n * own and inherited enumerable properties of `object` that `predicate`\n * doesn't return truthy for.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n predicate = getIteratee(predicate, 2);\n return basePickBy(object, function(value, key) {\n return !predicate(value, key);\n });\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [props] The property names to pick, specified\n * individually or in arrays.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = rest(function(object, props) {\n return object == null ? {} : basePick(object, baseFlatten(props));\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {Function|Object|string} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n return object == null ? {} : basePickBy(object, getIteratee(predicate, 2));\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a function\n * it's invoked with the `this` binding of its parent object and its result\n * is returned.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n if (!isKey(path, object)) {\n path = baseToPath(path);\n var result = get(object, path);\n object = parent(object, path);\n } else {\n result = object == null ? undefined : object[path];\n }\n if (result === undefined) {\n result = defaultValue;\n }\n return isFunction(result) ? result.call(object) : result;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, 'x[0].y.z', 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * _.setWith({ '0': { 'length': 2 } }, '[0][1][2]', 3, Object);\n * // => { '0': { '1': { '2': 3 }, 'length': 2 } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable key-value pairs for `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the new array of key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n function toPairs(object) {\n return baseToPairs(object, keys(object));\n }\n\n /**\n * Creates an array of own and inherited enumerable key-value pairs for `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the new array of key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed)\n */\n function toPairsIn(object) {\n return baseToPairs(object, keysIn(object));\n }\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own enumerable\n * properties through `iteratee`, with each invocation potentially mutating\n * the `accumulator` object. The iteratee is invoked with four arguments:\n * (accumulator, value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Array|Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * });\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * });\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object) || isTypedArray(object);\n iteratee = getIteratee(iteratee, 4);\n\n if (accumulator == null) {\n if (isArr || isObject(object)) {\n var Ctor = object.constructor;\n if (isArr) {\n accumulator = isArray(object) ? new Ctor : [];\n } else {\n accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);\n }\n } else {\n accumulator = {};\n }\n }\n (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * Creates an array of the own enumerable property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object ? baseValues(object, keys(object)) : [];\n }\n\n /**\n * Creates an array of the own and inherited enumerable property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? baseValues(object, keysIn(object)) : [];\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to but not including, `end`. If\n * `end` is not specified it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toNumber(start) || 0;\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toNumber(end) || 0;\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are floats,\n * a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toNumber(lower) || 0;\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toNumber(upper) || 0;\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar');\n * // => 'fooBar'\n *\n * _.camelCase('__foo_bar__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to search.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search from.\n * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = typeof target == 'string' ? target : (target + '');\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n position -= target.length;\n return position >= 0 && string.indexOf(target, position) == position;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', \"'\", and \"\\`\" in `string` to\n * their corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value.\n * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * Backticks are escaped because in IE < 9, they can break out of\n * attribute values or HTML comments. See [#59](https://html5sec.org/#59),\n * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and\n * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)\n * for more details.\n *\n * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping)\n * to reduce XSS vectors.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__foo_bar__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\n var upperFirst = createCaseFirst('toUpperCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = stringSize(string);\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2,\n leftLength = nativeFloor(mid),\n rightLength = nativeCeil(mid);\n\n return createPadding('', leftLength, chars) + string + createPadding('', rightLength, chars);\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n return string + createPadding(string, length, chars);\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n return createPadding(string, length, chars) + string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal,\n * in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#x15.1.2.2)\n * of `parseInt`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n // Chrome fails to trim leading <BOM> whitespace characters.\n // See https://code.google.com/p/v8/issues/detail?id=3109 for more details.\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n string = toString(string).replace(reTrim, '');\n return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=0] The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n) {\n string = toString(string);\n n = toInteger(n);\n\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n string += string;\n } while (n);\n\n return result;\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--foo-bar');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the new array of string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n return toString(string).split(separator, limit);\n }\n\n /**\n * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__foo_bar__');\n * // => 'Foo Bar'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + capitalize(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to search.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = baseClamp(toInteger(position), 0, string.length);\n return string.lastIndexOf(target, position) == position;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is provided it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options] The options object.\n * @param {RegExp} [options.escape] The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate] The \"evaluate\" delimiter.\n * @param {Object} [options.imports] An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate] The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.\n * @param {string} [options.variable] The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // using the \"interpolate\" delimiter to create a compiled template\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // using the HTML \"escape\" delimiter to escape data property values\n * var compiled = _.template('<b><%- value %></b>');\n * compiled({ 'value': '<script>' });\n * // => '<b><script></b>'\n *\n * // using the \"evaluate\" delimiter to execute JavaScript and generate HTML\n * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // using the internal `print` function in \"evaluate\" delimiters\n * var compiled = _.template('<% print(\"hello \" + user); %>!');\n * compiled({ 'user': 'barney' });\n * // => 'hello barney!'\n *\n * // using the ES delimiter as an alternative to the default \"interpolate\" delimiter\n * var compiled = _.template('hello ${ user }!');\n * compiled({ 'user': 'pebbles' });\n * // => 'hello pebbles!'\n *\n * // using custom template delimiters\n * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n * var compiled = _.template('hello {{ user }}!');\n * compiled({ 'user': 'mustache' });\n * // => 'hello mustache!'\n *\n * // using backslashes to treat delimiters as plain text\n * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n * compiled({ 'value': 'ignored' });\n * // => '<%- value %>'\n *\n * // using the `imports` option to import `jQuery` as `jq`\n * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // using the `sourceURL` option to specify a custom sourceURL for the template\n * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n * compiled(data);\n * // => find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector\n *\n * // using the `variable` option to ensure a with-statement isn't used in the compiled template\n * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n * compiled.source;\n * // => function(data) {\n * // var __t, __p = '';\n * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n * // return __p;\n * // }\n *\n * // using the `source` property to inline compiled templates for meaningful\n * // line numbers in error messages and a stack trace\n * fs.writeFileSync(path.join(cwd, 'jst.js'), '\\\n * var JST = {\\\n * \"main\": ' + _.template(mainText).source + '\\\n * };\\\n * ');\n */\n function template(string, options, guard) {\n // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)\n // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n var settings = lodash.templateSettings;\n\n if (guard && isIterateeCall(string, options, guard)) {\n options = undefined;\n }\n string = toString(string);\n options = assignInWith({}, options, settings, assignInDefaults);\n\n var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),\n importsKeys = keys(imports),\n importsValues = baseValues(imports, importsKeys);\n\n var isEscaping,\n isEvaluating,\n index = 0,\n interpolate = options.interpolate || reNoMatch,\n source = \"__p += '\";\n\n // Compile the regexp to match each delimiter.\n var reDelimiters = RegExp(\n (options.escape || reNoMatch).source + '|' +\n interpolate.source + '|' +\n (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n (options.evaluate || reNoMatch).source + '|$'\n , 'g');\n\n // Use a sourceURL for easier debugging.\n var sourceURL = '//# sourceURL=' +\n ('sourceURL' in options\n ? options.sourceURL\n : ('lodash.templateSources[' + (++templateCounter) + ']')\n ) + '\\n';\n\n string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n interpolateValue || (interpolateValue = esTemplateValue);\n\n // Escape characters that can't be included in string literals.\n source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n // Replace delimiters with snippets.\n if (escapeValue) {\n isEscaping = true;\n source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n }\n if (evaluateValue) {\n isEvaluating = true;\n source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n }\n if (interpolateValue) {\n source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n }\n index = offset + match.length;\n\n // The JS engine embedded in Adobe products needs `match` returned in\n // order to produce the correct `offset` value.\n return match;\n });\n\n source += \"';\\n\";\n\n // If `variable` is not specified wrap a with-statement around the generated\n // code to add the data object to the top of the scope chain.\n var variable = options.variable;\n if (!variable) {\n source = 'with (obj) {\\n' + source + '\\n}\\n';\n }\n // Cleanup code by stripping empty strings.\n source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n .replace(reEmptyStringMiddle, '$1')\n .replace(reEmptyStringTrailing, '$1;');\n\n // Frame code as the function body.\n source = 'function(' + (variable || 'obj') + ') {\\n' +\n (variable\n ? ''\n : 'obj || (obj = {});\\n'\n ) +\n \"var __t, __p = ''\" +\n (isEscaping\n ? ', __e = _.escape'\n : ''\n ) +\n (isEvaluating\n ? ', __j = Array.prototype.join;\\n' +\n \"function print() { __p += __j.call(arguments, '') }\\n\"\n : ';\\n'\n ) +\n source +\n 'return __p\\n}';\n\n var result = attempt(function() {\n return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);\n });\n\n // Provide the compiled function's source by its `toString` method or\n // the `source` property as a convenience for inlining compiled templates.\n result.source = source;\n if (isError(result)) {\n throw result;\n }\n return result;\n }\n\n /**\n * Converts `string`, as a whole, to lower case.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.toLower('--Foo-Bar');\n * // => '--foo-bar'\n *\n * _.toLower('fooBar');\n * // => 'foobar'\n *\n * _.toLower('__FOO_BAR__');\n * // => '__foo_bar__'\n */\n function toLower(value) {\n return toString(value).toLowerCase();\n }\n\n /**\n * Converts `string`, as a whole, to upper case.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.toUpper('--foo-bar');\n * // => '--FOO-BAR'\n *\n * _.toUpper('fooBar');\n * // => 'FOOBAR'\n *\n * _.toUpper('__foo_bar__');\n * // => '__FOO_BAR__'\n */\n function toUpper(value) {\n return toString(value).toUpperCase();\n }\n\n /**\n * Removes leading and trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trim(' abc ');\n * // => 'abc'\n *\n * _.trim('-_-abc-_-', '_-');\n * // => 'abc'\n *\n * _.map([' foo ', ' bar '], _.trim);\n * // => ['foo', 'bar']\n */\n function trim(string, chars, guard) {\n string = toString(string);\n if (!string) {\n return string;\n }\n if (guard || chars === undefined) {\n return string.replace(reTrim, '');\n }\n chars = (chars + '');\n if (!chars) {\n return string;\n }\n var strSymbols = stringToArray(string),\n chrSymbols = stringToArray(chars);\n\n return strSymbols.slice(charsStartIndex(strSymbols, chrSymbols), charsEndIndex(strSymbols, chrSymbols) + 1).join('');\n }\n\n /**\n * Removes trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimEnd(' abc ');\n * // => ' abc'\n *\n * _.trimEnd('-_-abc-_-', '_-');\n * // => '-_-abc'\n */\n function trimEnd(string, chars, guard) {\n string = toString(string);\n if (!string) {\n return string;\n }\n if (guard || chars === undefined) {\n return string.replace(reTrimEnd, '');\n }\n chars = (chars + '');\n if (!chars) {\n return string;\n }\n var strSymbols = stringToArray(string);\n return strSymbols.slice(0, charsEndIndex(strSymbols, stringToArray(chars)) + 1).join('');\n }\n\n /**\n * Removes leading whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimStart(' abc ');\n * // => 'abc '\n *\n * _.trimStart('-_-abc-_-', '_-');\n * // => 'abc-_-'\n */\n function trimStart(string, chars, guard) {\n string = toString(string);\n if (!string) {\n return string;\n }\n if (guard || chars === undefined) {\n return string.replace(reTrimStart, '');\n }\n chars = (chars + '');\n if (!chars) {\n return string;\n }\n var strSymbols = stringToArray(string);\n return strSymbols.slice(charsStartIndex(strSymbols, stringToArray(chars))).join('');\n }\n\n /**\n * Truncates `string` if it's longer than the given maximum string length.\n * The last characters of the truncated string are replaced with the omission\n * string which defaults to \"...\".\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to truncate.\n * @param {Object} [options] The options object.\n * @param {number} [options.length=30] The maximum string length.\n * @param {string} [options.omission='...'] The string to indicate text is omitted.\n * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n * @returns {string} Returns the truncated string.\n * @example\n *\n * _.truncate('hi-diddly-ho there, neighborino');\n * // => 'hi-diddly-ho there, neighbo...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': ' '\n * });\n * // => 'hi-diddly-ho there,...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': /,? +/\n * });\n * // => 'hi-diddly-ho there...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'omission': ' [...]'\n * });\n * // => 'hi-diddly-ho there, neig [...]'\n */\n function truncate(string, options) {\n var length = DEFAULT_TRUNC_LENGTH,\n omission = DEFAULT_TRUNC_OMISSION;\n\n if (isObject(options)) {\n var separator = 'separator' in options ? options.separator : separator;\n length = 'length' in options ? toInteger(options.length) : length;\n omission = 'omission' in options ? toString(options.omission) : omission;\n }\n string = toString(string);\n\n var strLength = string.length;\n if (reHasComplexSymbol.test(string)) {\n var strSymbols = stringToArray(string);\n strLength = strSymbols.length;\n }\n if (length >= strLength) {\n return string;\n }\n var end = length - stringSize(omission);\n if (end < 1) {\n return omission;\n }\n var result = strSymbols\n ? strSymbols.slice(0, end).join('')\n : string.slice(0, end);\n\n if (separator === undefined) {\n return result + omission;\n }\n if (strSymbols) {\n end += (result.length - end);\n }\n if (isRegExp(separator)) {\n if (string.slice(end).search(separator)) {\n var match,\n substring = result;\n\n if (!separator.global) {\n separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n }\n separator.lastIndex = 0;\n while ((match = separator.exec(substring))) {\n var newEnd = match.index;\n }\n result = result.slice(0, newEnd === undefined ? end : newEnd);\n }\n } else if (string.indexOf(separator, end) != end) {\n var index = result.lastIndexOf(separator);\n if (index > -1) {\n result = result.slice(0, index);\n }\n }\n return result + omission;\n }\n\n /**\n * The inverse of `_.escape`; this method converts the HTML entities\n * `&`, `<`, `>`, `"`, `'`, and ``` in `string` to their\n * corresponding characters.\n *\n * **Note:** No other HTML entities are unescaped. To unescape additional HTML\n * entities use a third-party library like [_he_](https://mths.be/he).\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to unescape.\n * @returns {string} Returns the unescaped string.\n * @example\n *\n * _.unescape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function unescape(string) {\n string = toString(string);\n return (string && reHasEscapedHtml.test(string))\n ? string.replace(reEscapedHtml, unescapeHtmlChar)\n : string;\n }\n\n /**\n * Converts `string`, as space separated words, to upper case.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.upperCase('--foo-bar');\n * // => 'FOO BAR'\n *\n * _.upperCase('fooBar');\n * // => 'FOO BAR'\n *\n * _.upperCase('__foo_bar__');\n * // => 'FOO BAR'\n */\n var upperCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toUpperCase();\n });\n\n /**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\n function words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord;\n }\n return string.match(pattern) || [];\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Attempts to invoke `func`, returning either the result or the caught error\n * object. Any additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Function} func The function to attempt.\n * @returns {*} Returns the `func` result or error object.\n * @example\n *\n * // avoid throwing errors for invalid selectors\n * var elements = _.attempt(function(selector) {\n * return document.querySelectorAll(selector);\n * }, '>_>');\n *\n * if (_.isError(elements)) {\n * elements = [];\n * }\n */\n var attempt = rest(function(func, args) {\n try {\n return apply(func, undefined, args);\n } catch (e) {\n return isError(e) ? e : new Error(e);\n }\n });\n\n /**\n * Binds methods of an object to the object itself, overwriting the existing\n * method.\n *\n * **Note:** This method doesn't set the \"length\" property of bound functions.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Object} object The object to bind and assign the bound methods to.\n * @param {...(string|string[])} methodNames The object method names to bind,\n * specified individually or in arrays.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var view = {\n * 'label': 'docs',\n * 'onClick': function() {\n * console.log('clicked ' + this.label);\n * }\n * };\n *\n * _.bindAll(view, 'onClick');\n * jQuery(element).on('click', view.onClick);\n * // => logs 'clicked docs' when clicked\n */\n var bindAll = rest(function(object, methodNames) {\n arrayEach(baseFlatten(methodNames), function(key) {\n object[key] = bind(object[key], object);\n });\n return object;\n });\n\n /**\n * Creates a function that iterates over `pairs` invoking the corresponding\n * function of the first predicate to return truthy. The predicate-function\n * pairs are invoked with the `this` binding and arguments of the created\n * function.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Array} pairs The predicate-function pairs.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.cond([\n * [_.matches({ 'a': 1 }), _.constant('matches A')],\n * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n * [_.constant(true), _.constant('no match')]\n * ]);\n *\n * func({ 'a': 1, 'b': 2 });\n * // => 'matches A'\n *\n * func({ 'a': 0, 'b': 1 });\n * // => 'matches B'\n *\n * func({ 'a': '1', 'b': '2' });\n * // => 'no match'\n */\n function cond(pairs) {\n var length = pairs ? pairs.length : 0,\n toIteratee = getIteratee();\n\n pairs = !length ? [] : arrayMap(pairs, function(pair) {\n if (typeof pair[1] != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return [toIteratee(pair[0]), pair[1]];\n });\n\n return rest(function(args) {\n var index = -1;\n while (++index < length) {\n var pair = pairs[index];\n if (apply(pair[0], this, args)) {\n return apply(pair[1], this, args);\n }\n }\n });\n }\n\n /**\n * Creates a function that invokes the predicate properties of `source` with\n * the corresponding property values of a given object, returning `true` if\n * all predicates return truthy, else `false`.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) }));\n * // => [{ 'user': 'fred', 'age': 40 }]\n */\n function conforms(source) {\n return baseConforms(baseClone(source, true));\n }\n\n /**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var object = { 'user': 'fred' };\n * var getter = _.constant(object);\n *\n * getter() === object;\n * // => true\n */\n function constant(value) {\n return function() {\n return value;\n };\n }\n\n /**\n * Creates a function that returns the result of invoking the provided\n * functions with the `this` binding of the created function, where each\n * successive invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} [funcs] Functions to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flow(_.add, square);\n * addSquare(1, 2);\n * // => 9\n */\n var flow = createFlow();\n\n /**\n * This method is like `_.flow` except that it creates a function that\n * invokes the provided functions from right to left.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} [funcs] Functions to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flowRight(square, _.add);\n * addSquare(1, 2);\n * // => 9\n */\n var flowRight = createFlow(true);\n\n /**\n * This method returns the first argument provided to it.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'user': 'fred' };\n *\n * _.identity(object) === object;\n * // => true\n */\n function identity(value) {\n return value;\n }\n\n /**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name the created callback returns the\n * property value for a given element. If `func` is an object the created\n * callback returns `true` for elements that contain the equivalent object properties, otherwise it returns `false`.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // create custom iteratee shorthands\n * _.iteratee = _.wrap(_.iteratee, function(callback, func) {\n * var p = /^(\\S+)\\s*([<>])\\s*(\\S+)$/.exec(func);\n * return !p ? callback(func) : function(object) {\n * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]);\n * };\n * });\n *\n * _.filter(users, 'age > 36');\n * // => [{ 'user': 'fred', 'age': 40 }]\n */\n function iteratee(func) {\n return (isObjectLike(func) && !isArray(func))\n ? matches(func)\n : baseIteratee(func);\n }\n\n /**\n * Creates a function that performs a deep partial comparison between a given\n * object and `source`, returning `true` if the given object has equivalent\n * property values, else `false`.\n *\n * **Note:** This method supports comparing the same values as `_.isEqual`.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, _.matches({ 'age': 40, 'active': false }));\n * // => [{ 'user': 'fred', 'age': 40, 'active': false }]\n */\n function matches(source) {\n return baseMatches(baseClone(source, true));\n }\n\n /**\n * Creates a function that performs a deep partial comparison between the\n * value at `path` of a given object to `srcValue`, returning `true` if the\n * object value is equivalent, else `false`.\n *\n * **Note:** This method supports comparing the same values as `_.isEqual`.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * _.find(users, _.matchesProperty('user', 'fred'));\n * // => { 'user': 'fred' }\n */\n function matchesProperty(path, srcValue) {\n return baseMatchesProperty(path, baseClone(srcValue, true));\n }\n\n /**\n * Creates a function that invokes the method at `path` of a given object.\n * Any additional arguments are provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': { 'c': _.constant(2) } } },\n * { 'a': { 'b': { 'c': _.constant(1) } } }\n * ];\n *\n * _.map(objects, _.method('a.b.c'));\n * // => [2, 1]\n *\n * _.invokeMap(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');\n * // => [1, 2]\n */\n var method = rest(function(path, args) {\n return function(object) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * The opposite of `_.method`; this method creates a function that invokes\n * the method at a given path of `object`. Any additional arguments are\n * provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Object} object The object to query.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var array = _.times(3, _.constant),\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n * // => [2, 0]\n */\n var methodOf = rest(function(object, args) {\n return function(path) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * Adds all own enumerable function properties of a source object to the\n * destination object. If `object` is a function then methods are added to\n * its prototype as well.\n *\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n * avoid conflicts caused by modifying the original.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Function|Object} [object=lodash] The destination object.\n * @param {Object} source The object of functions to add.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.chain=true] Specify whether the functions added\n * are chainable.\n * @returns {Function|Object} Returns `object`.\n * @example\n *\n * function vowels(string) {\n * return _.filter(string, function(v) {\n * return /[aeiou]/i.test(v);\n * });\n * }\n *\n * _.mixin({ 'vowels': vowels });\n * _.vowels('fred');\n * // => ['e']\n *\n * _('fred').vowels().value();\n * // => ['e']\n *\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\n * _('fred').vowels();\n * // => ['e']\n */\n function mixin(object, source, options) {\n var props = keys(source),\n methodNames = baseFunctions(source, props);\n\n if (options == null &&\n !(isObject(source) && (methodNames.length || !props.length))) {\n options = source;\n source = object;\n object = this;\n methodNames = baseFunctions(source, keys(source));\n }\n var chain = (isObject(options) && 'chain' in options) ? options.chain : true,\n isFunc = isFunction(object);\n\n arrayEach(methodNames, function(methodName) {\n var func = source[methodName];\n object[methodName] = func;\n if (isFunc) {\n object.prototype[methodName] = function() {\n var chainAll = this.__chain__;\n if (chain || chainAll) {\n var result = object(this.__wrapped__),\n actions = result.__actions__ = copyArray(this.__actions__);\n\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n result.__chain__ = chainAll;\n return result;\n }\n return func.apply(object, arrayPush([this.value()], arguments));\n };\n }\n });\n\n return object;\n }\n\n /**\n * Reverts the `_` variable to its previous value and returns a reference to\n * the `lodash` function.\n *\n * @static\n * @memberOf _\n * @category Util\n * @returns {Function} Returns the `lodash` function.\n * @example\n *\n * var lodash = _.noConflict();\n */\n function noConflict() {\n if (root._ === this) {\n root._ = oldDash;\n }\n return this;\n }\n\n /**\n * A no-operation function that returns `undefined` regardless of the\n * arguments it receives.\n *\n * @static\n * @memberOf _\n * @category Util\n * @example\n *\n * var object = { 'user': 'fred' };\n *\n * _.noop(object) === undefined;\n * // => true\n */\n function noop() {\n // No operation performed.\n }\n\n /**\n * Creates a function that returns its nth argument.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {number} [n=0] The index of the argument to return.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.nthArg(1);\n *\n * func('a', 'b', 'c');\n * // => 'b'\n */\n function nthArg(n) {\n n = toInteger(n);\n return function() {\n return arguments[n];\n };\n }\n\n /**\n * Creates a function that invokes `iteratees` with the arguments provided\n * to the created function and returns their results.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} iteratees The iteratees to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.over(Math.max, Math.min);\n *\n * func(1, 2, 3, 4);\n * // => [4, 1]\n */\n var over = createOver(arrayMap);\n\n /**\n * Creates a function that checks if **all** of the `predicates` return\n * truthy when invoked with the arguments provided to the created function.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} predicates The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overEvery(Boolean, isFinite);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => false\n *\n * func(NaN);\n * // => false\n */\n var overEvery = createOver(arrayEvery);\n\n /**\n * Creates a function that checks if **any** of the `predicates` return\n * truthy when invoked with the arguments provided to the created function.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} predicates The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overSome(Boolean, isFinite);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => true\n *\n * func(NaN);\n * // => false\n */\n var overSome = createOver(arraySome);\n\n /**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': { 'c': 2 } } },\n * { 'a': { 'b': { 'c': 1 } } }\n * ];\n *\n * _.map(objects, _.property('a.b.c'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');\n * // => [1, 2]\n */\n function property(path) {\n return isKey(path) ? baseProperty(path) : basePropertyDeep(path);\n }\n\n /**\n * The opposite of `_.property`; this method creates a function that returns\n * the value at a given path of `object`.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var array = [0, 1, 2],\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n * // => [2, 0]\n */\n function propertyOf(object) {\n return function(path) {\n return object == null ? undefined : baseGet(object, path);\n };\n }\n\n /**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the new array of numbers.\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\n var range = createRange();\n\n /**\n * This method is like `_.range` except that it populates values in\n * descending order.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the new array of numbers.\n * @example\n *\n * _.rangeRight(4);\n * // => [3, 2, 1, 0]\n *\n * _.rangeRight(-4);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 5);\n * // => [4, 3, 2, 1]\n *\n * _.rangeRight(0, 20, 5);\n * // => [15, 10, 5, 0]\n *\n * _.rangeRight(0, -4, -1);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.rangeRight(0);\n * // => []\n */\n var rangeRight = createRange(true);\n\n /**\n * Invokes the iteratee function `n` times, returning an array of the results\n * of each invocation. The iteratee is invoked with one argument; (index).\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.times(3, String);\n * // => ['0', '1', '2']\n *\n * _.times(4, _.constant(true));\n * // => [true, true, true, true]\n */\n function times(n, iteratee) {\n n = toInteger(n);\n if (n < 1 || n > MAX_SAFE_INTEGER) {\n return [];\n }\n var index = MAX_ARRAY_LENGTH,\n length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n iteratee = toFunction(iteratee);\n n -= MAX_ARRAY_LENGTH;\n\n var result = baseTimes(length, iteratee);\n while (++index < n) {\n iteratee(index);\n }\n return result;\n }\n\n /**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n *\n * var path = ['a', 'b', 'c'],\n * newPath = _.toPath(path);\n *\n * console.log(newPath);\n * // => ['a', 'b', 'c']\n *\n * console.log(path === newPath);\n * // => false\n */\n function toPath(value) {\n return isArray(value) ? arrayMap(value, String) : stringToPath(value);\n }\n\n /**\n * Generates a unique ID. If `prefix` is provided the ID is appended to it.\n *\n * @static\n * @memberOf _\n * @category Util\n * @param {string} [prefix] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\n function uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\n function add(augend, addend) {\n var result;\n if (augend !== undefined) {\n result = augend;\n }\n if (addend !== undefined) {\n result = result === undefined ? addend : (result + addend);\n }\n return result;\n }\n\n /**\n * Computes `number` rounded up to `precision`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {number} number The number to round up.\n * @param {number} [precision=0] The precision to round up to.\n * @returns {number} Returns the rounded up number.\n * @example\n *\n * _.ceil(4.006);\n * // => 5\n *\n * _.ceil(6.004, 2);\n * // => 6.01\n *\n * _.ceil(6040, -2);\n * // => 6100\n */\n var ceil = createRound('ceil');\n\n /**\n * Computes `number` rounded down to `precision`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {number} number The number to round down.\n * @param {number} [precision=0] The precision to round down to.\n * @returns {number} Returns the rounded down number.\n * @example\n *\n * _.floor(4.006);\n * // => 4\n *\n * _.floor(0.046, 2);\n * // => 0.04\n *\n * _.floor(4060, -2);\n * // => 4000\n */\n var floor = createRound('floor');\n\n /**\n * Computes the maximum value of `array`. If `array` is empty or falsey\n * `undefined` is returned.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\n function max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, gt)\n : undefined;\n }\n\n /**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // using the `_.property` iteratee shorthand\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\n function maxBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee), gt)\n : undefined;\n }\n\n /**\n * Computes the mean of the values in `array`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the mean.\n * @example\n *\n * _.mean([4, 2, 8, 6]);\n * // => 5\n */\n function mean(array) {\n return sum(array) / (array ? array.length : 0);\n }\n\n /**\n * Computes the minimum value of `array`. If `array` is empty or falsey\n * `undefined` is returned.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\n function min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, lt)\n : undefined;\n }\n\n /**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // using the `_.property` iteratee shorthand\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\n function minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee), lt)\n : undefined;\n }\n\n /**\n * Computes `number` rounded to `precision`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {number} number The number to round.\n * @param {number} [precision=0] The precision to round to.\n * @returns {number} Returns the rounded number.\n * @example\n *\n * _.round(4.006);\n * // => 4\n *\n * _.round(4.006, 2);\n * // => 4.01\n *\n * _.round(4060, -2);\n * // => 4100\n */\n var round = createRound('round');\n\n /**\n * Subtract two numbers.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {number} minuend The first number in a subtraction.\n * @param {number} subtrahend The second number in a subtraction.\n * @returns {number} Returns the difference.\n * @example\n *\n * _.subtract(6, 4);\n * // => 2\n */\n function subtract(minuend, subtrahend) {\n var result;\n if (minuend !== undefined) {\n result = minuend;\n }\n if (subtrahend !== undefined) {\n result = result === undefined ? subtrahend : (result - subtrahend);\n }\n return result;\n }\n\n /**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\n function sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : undefined;\n }\n\n /**\n * This method is like `_.sum` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be summed.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the sum.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.sumBy(objects, function(o) { return o.n; });\n * // => 20\n *\n * // using the `_.property` iteratee shorthand\n * _.sumBy(objects, 'n');\n * // => 20\n */\n function sumBy(array, iteratee) {\n return (array && array.length)\n ? baseSum(array, getIteratee(iteratee))\n : undefined;\n }\n\n /*------------------------------------------------------------------------*/\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n // Avoid inheriting from `Object.prototype` when possible.\n Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;\n\n // Add functions to the `MapCache`.\n MapCache.prototype.clear = mapClear;\n MapCache.prototype['delete'] = mapDelete;\n MapCache.prototype.get = mapGet;\n MapCache.prototype.has = mapHas;\n MapCache.prototype.set = mapSet;\n\n // Add functions to the `SetCache`.\n SetCache.prototype.push = cachePush;\n\n // Add functions to the `Stack` cache.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n // Assign cache to `_.memoize`.\n memoize.Cache = MapCache;\n\n // Add functions that return wrapped values when chaining.\n lodash.after = after;\n lodash.ary = ary;\n lodash.assign = assign;\n lodash.assignIn = assignIn;\n lodash.assignInWith = assignInWith;\n lodash.assignWith = assignWith;\n lodash.at = at;\n lodash.before = before;\n lodash.bind = bind;\n lodash.bindAll = bindAll;\n lodash.bindKey = bindKey;\n lodash.chain = chain;\n lodash.chunk = chunk;\n lodash.compact = compact;\n lodash.concat = concat;\n lodash.cond = cond;\n lodash.conforms = conforms;\n lodash.constant = constant;\n lodash.countBy = countBy;\n lodash.create = create;\n lodash.curry = curry;\n lodash.curryRight = curryRight;\n lodash.debounce = debounce;\n lodash.defaults = defaults;\n lodash.defaultsDeep = defaultsDeep;\n lodash.defer = defer;\n lodash.delay = delay;\n lodash.difference = difference;\n lodash.differenceBy = differenceBy;\n lodash.differenceWith = differenceWith;\n lodash.drop = drop;\n lodash.dropRight = dropRight;\n lodash.dropRightWhile = dropRightWhile;\n lodash.dropWhile = dropWhile;\n lodash.fill = fill;\n lodash.filter = filter;\n lodash.flatMap = flatMap;\n lodash.flatten = flatten;\n lodash.flattenDeep = flattenDeep;\n lodash.flip = flip;\n lodash.flow = flow;\n lodash.flowRight = flowRight;\n lodash.fromPairs = fromPairs;\n lodash.functions = functions;\n lodash.functionsIn = functionsIn;\n lodash.groupBy = groupBy;\n lodash.initial = initial;\n lodash.intersection = intersection;\n lodash.intersectionBy = intersectionBy;\n lodash.intersectionWith = intersectionWith;\n lodash.invert = invert;\n lodash.invokeMap = invokeMap;\n lodash.iteratee = iteratee;\n lodash.keyBy = keyBy;\n lodash.keys = keys;\n lodash.keysIn = keysIn;\n lodash.map = map;\n lodash.mapKeys = mapKeys;\n lodash.mapValues = mapValues;\n lodash.matches = matches;\n lodash.matchesProperty = matchesProperty;\n lodash.memoize = memoize;\n lodash.merge = merge;\n lodash.mergeWith = mergeWith;\n lodash.method = method;\n lodash.methodOf = methodOf;\n lodash.mixin = mixin;\n lodash.negate = negate;\n lodash.nthArg = nthArg;\n lodash.omit = omit;\n lodash.omitBy = omitBy;\n lodash.once = once;\n lodash.orderBy = orderBy;\n lodash.over = over;\n lodash.overArgs = overArgs;\n lodash.overEvery = overEvery;\n lodash.overSome = overSome;\n lodash.partial = partial;\n lodash.partialRight = partialRight;\n lodash.partition = partition;\n lodash.pick = pick;\n lodash.pickBy = pickBy;\n lodash.property = property;\n lodash.propertyOf = propertyOf;\n lodash.pull = pull;\n lodash.pullAll = pullAll;\n lodash.pullAllBy = pullAllBy;\n lodash.pullAt = pullAt;\n lodash.range = range;\n lodash.rangeRight = rangeRight;\n lodash.rearg = rearg;\n lodash.reject = reject;\n lodash.remove = remove;\n lodash.rest = rest;\n lodash.reverse = reverse;\n lodash.sampleSize = sampleSize;\n lodash.set = set;\n lodash.setWith = setWith;\n lodash.shuffle = shuffle;\n lodash.slice = slice;\n lodash.sortBy = sortBy;\n lodash.sortedUniq = sortedUniq;\n lodash.sortedUniqBy = sortedUniqBy;\n lodash.split = split;\n lodash.spread = spread;\n lodash.tail = tail;\n lodash.take = take;\n lodash.takeRight = takeRight;\n lodash.takeRightWhile = takeRightWhile;\n lodash.takeWhile = takeWhile;\n lodash.tap = tap;\n lodash.throttle = throttle;\n lodash.thru = thru;\n lodash.toArray = toArray;\n lodash.toPairs = toPairs;\n lodash.toPairsIn = toPairsIn;\n lodash.toPath = toPath;\n lodash.toPlainObject = toPlainObject;\n lodash.transform = transform;\n lodash.unary = unary;\n lodash.union = union;\n lodash.unionBy = unionBy;\n lodash.unionWith = unionWith;\n lodash.uniq = uniq;\n lodash.uniqBy = uniqBy;\n lodash.uniqWith = uniqWith;\n lodash.unset = unset;\n lodash.unzip = unzip;\n lodash.unzipWith = unzipWith;\n lodash.values = values;\n lodash.valuesIn = valuesIn;\n lodash.without = without;\n lodash.words = words;\n lodash.wrap = wrap;\n lodash.xor = xor;\n lodash.xorBy = xorBy;\n lodash.xorWith = xorWith;\n lodash.zip = zip;\n lodash.zipObject = zipObject;\n lodash.zipWith = zipWith;\n\n // Add aliases.\n lodash.extend = assignIn;\n lodash.extendWith = assignInWith;\n\n // Add functions to `lodash.prototype`.\n mixin(lodash, lodash);\n\n /*------------------------------------------------------------------------*/\n\n // Add functions that return unwrapped values when chaining.\n lodash.add = add;\n lodash.attempt = attempt;\n lodash.camelCase = camelCase;\n lodash.capitalize = capitalize;\n lodash.ceil = ceil;\n lodash.clamp = clamp;\n lodash.clone = clone;\n lodash.cloneDeep = cloneDeep;\n lodash.cloneDeepWith = cloneDeepWith;\n lodash.cloneWith = cloneWith;\n lodash.deburr = deburr;\n lodash.endsWith = endsWith;\n lodash.eq = eq;\n lodash.escape = escape;\n lodash.escapeRegExp = escapeRegExp;\n lodash.every = every;\n lodash.find = find;\n lodash.findIndex = findIndex;\n lodash.findKey = findKey;\n lodash.findLast = findLast;\n lodash.findLastIndex = findLastIndex;\n lodash.findLastKey = findLastKey;\n lodash.floor = floor;\n lodash.forEach = forEach;\n lodash.forEachRight = forEachRight;\n lodash.forIn = forIn;\n lodash.forInRight = forInRight;\n lodash.forOwn = forOwn;\n lodash.forOwnRight = forOwnRight;\n lodash.get = get;\n lodash.gt = gt;\n lodash.gte = gte;\n lodash.has = has;\n lodash.hasIn = hasIn;\n lodash.head = head;\n lodash.identity = identity;\n lodash.includes = includes;\n lodash.indexOf = indexOf;\n lodash.inRange = inRange;\n lodash.invoke = invoke;\n lodash.isArguments = isArguments;\n lodash.isArray = isArray;\n lodash.isArrayLike = isArrayLike;\n lodash.isArrayLikeObject = isArrayLikeObject;\n lodash.isBoolean = isBoolean;\n lodash.isDate = isDate;\n lodash.isElement = isElement;\n lodash.isEmpty = isEmpty;\n lodash.isEqual = isEqual;\n lodash.isEqualWith = isEqualWith;\n lodash.isError = isError;\n lodash.isFinite = isFinite;\n lodash.isFunction = isFunction;\n lodash.isInteger = isInteger;\n lodash.isLength = isLength;\n lodash.isMatch = isMatch;\n lodash.isMatchWith = isMatchWith;\n lodash.isNaN = isNaN;\n lodash.isNative = isNative;\n lodash.isNil = isNil;\n lodash.isNull = isNull;\n lodash.isNumber = isNumber;\n lodash.isObject = isObject;\n lodash.isObjectLike = isObjectLike;\n lodash.isPlainObject = isPlainObject;\n lodash.isRegExp = isRegExp;\n lodash.isSafeInteger = isSafeInteger;\n lodash.isString = isString;\n lodash.isSymbol = isSymbol;\n lodash.isTypedArray = isTypedArray;\n lodash.isUndefined = isUndefined;\n lodash.join = join;\n lodash.kebabCase = kebabCase;\n lodash.last = last;\n lodash.lastIndexOf = lastIndexOf;\n lodash.lowerCase = lowerCase;\n lodash.lowerFirst = lowerFirst;\n lodash.lt = lt;\n lodash.lte = lte;\n lodash.max = max;\n lodash.maxBy = maxBy;\n lodash.mean = mean;\n lodash.min = min;\n lodash.minBy = minBy;\n lodash.noConflict = noConflict;\n lodash.noop = noop;\n lodash.now = now;\n lodash.pad = pad;\n lodash.padEnd = padEnd;\n lodash.padStart = padStart;\n lodash.parseInt = parseInt;\n lodash.random = random;\n lodash.reduce = reduce;\n lodash.reduceRight = reduceRight;\n lodash.repeat = repeat;\n lodash.replace = replace;\n lodash.result = result;\n lodash.round = round;\n lodash.runInContext = runInContext;\n lodash.sample = sample;\n lodash.size = size;\n lodash.snakeCase = snakeCase;\n lodash.some = some;\n lodash.sortedIndex = sortedIndex;\n lodash.sortedIndexBy = sortedIndexBy;\n lodash.sortedIndexOf = sortedIndexOf;\n lodash.sortedLastIndex = sortedLastIndex;\n lodash.sortedLastIndexBy = sortedLastIndexBy;\n lodash.sortedLastIndexOf = sortedLastIndexOf;\n lodash.startCase = startCase;\n lodash.startsWith = startsWith;\n lodash.subtract = subtract;\n lodash.sum = sum;\n lodash.sumBy = sumBy;\n lodash.template = template;\n lodash.times = times;\n lodash.toInteger = toInteger;\n lodash.toLength = toLength;\n lodash.toLower = toLower;\n lodash.toNumber = toNumber;\n lodash.toSafeInteger = toSafeInteger;\n lodash.toString = toString;\n lodash.toUpper = toUpper;\n lodash.trim = trim;\n lodash.trimEnd = trimEnd;\n lodash.trimStart = trimStart;\n lodash.truncate = truncate;\n lodash.unescape = unescape;\n lodash.uniqueId = uniqueId;\n lodash.upperCase = upperCase;\n lodash.upperFirst = upperFirst;\n\n // Add aliases.\n lodash.each = forEach;\n lodash.eachRight = forEachRight;\n lodash.first = head;\n\n mixin(lodash, (function() {\n var source = {};\n baseForOwn(lodash, function(func, methodName) {\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n source[methodName] = func;\n }\n });\n return source;\n }()), { 'chain': false });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The semantic version number.\n *\n * @static\n * @memberOf _\n * @type string\n */\n lodash.VERSION = VERSION;\n\n // Assign default placeholders.\n arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n lodash[methodName].placeholder = lodash;\n });\n\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n arrayEach(['drop', 'take'], function(methodName, index) {\n LazyWrapper.prototype[methodName] = function(n) {\n var filtered = this.__filtered__;\n if (filtered && !index) {\n return new LazyWrapper(this);\n }\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n var result = this.clone();\n if (filtered) {\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\n } else {\n result.__views__.push({ 'size': nativeMin(n, MAX_ARRAY_LENGTH), 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') });\n }\n return result;\n };\n\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n return this.reverse()[methodName](n).reverse();\n };\n });\n\n // Add `LazyWrapper` methods that accept an `iteratee` value.\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n var type = index + 1,\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n LazyWrapper.prototype[methodName] = function(iteratee) {\n var result = this.clone();\n result.__iteratees__.push({ 'iteratee': getIteratee(iteratee, 3), 'type': type });\n result.__filtered__ = result.__filtered__ || isFilter;\n return result;\n };\n });\n\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\n arrayEach(['head', 'last'], function(methodName, index) {\n var takeName = 'take' + (index ? 'Right' : '');\n\n LazyWrapper.prototype[methodName] = function() {\n return this[takeName](1).value()[0];\n };\n });\n\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n arrayEach(['initial', 'tail'], function(methodName, index) {\n var dropName = 'drop' + (index ? '' : 'Right');\n\n LazyWrapper.prototype[methodName] = function() {\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n };\n });\n\n LazyWrapper.prototype.compact = function() {\n return this.filter(identity);\n };\n\n LazyWrapper.prototype.find = function(predicate) {\n return this.filter(predicate).head();\n };\n\n LazyWrapper.prototype.findLast = function(predicate) {\n return this.reverse().find(predicate);\n };\n\n LazyWrapper.prototype.invokeMap = rest(function(path, args) {\n if (typeof path == 'function') {\n return new LazyWrapper(this);\n }\n return this.map(function(value) {\n return baseInvoke(value, path, args);\n });\n });\n\n LazyWrapper.prototype.reject = function(predicate) {\n predicate = getIteratee(predicate, 3);\n return this.filter(function(value) {\n return !predicate(value);\n });\n };\n\n LazyWrapper.prototype.slice = function(start, end) {\n start = toInteger(start);\n\n var result = this;\n if (result.__filtered__ && (start > 0 || end < 0)) {\n return new LazyWrapper(result);\n }\n if (start < 0) {\n result = result.takeRight(-start);\n } else if (start) {\n result = result.drop(start);\n }\n if (end !== undefined) {\n end = toInteger(end);\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n }\n return result;\n };\n\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\n return this.reverse().takeWhile(predicate).reverse();\n };\n\n LazyWrapper.prototype.toArray = function() {\n return this.take(MAX_ARRAY_LENGTH);\n };\n\n // Add `LazyWrapper` methods to `lodash.prototype`.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n isTaker = /^(?:head|last)$/.test(methodName),\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n retUnwrapped = isTaker || /^find/.test(methodName);\n\n if (!lodashFunc) {\n return;\n }\n lodash.prototype[methodName] = function() {\n var value = this.__wrapped__,\n args = isTaker ? [1] : arguments,\n isLazy = value instanceof LazyWrapper,\n iteratee = args[0],\n useLazy = isLazy || isArray(value);\n\n var interceptor = function(value) {\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\n return (isTaker && chainAll) ? result[0] : result;\n };\n\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n isLazy = useLazy = false;\n }\n var chainAll = this.__chain__,\n isHybrid = !!this.__actions__.length,\n isUnwrapped = retUnwrapped && !chainAll,\n onlyLazy = isLazy && !isHybrid;\n\n if (!retUnwrapped && useLazy) {\n value = onlyLazy ? value : new LazyWrapper(this);\n var result = func.apply(value, args);\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n return new LodashWrapper(result, chainAll);\n }\n if (isUnwrapped && onlyLazy) {\n return func.apply(this, args);\n }\n result = this.thru(interceptor);\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n };\n });\n\n // Add `Array` and `String` methods to `lodash.prototype`.\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n var func = arrayProto[methodName],\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n lodash.prototype[methodName] = function() {\n var args = arguments;\n if (retUnwrapped && !this.__chain__) {\n return func.apply(this.value(), args);\n }\n return this[chainName](function(value) {\n return func.apply(value, args);\n });\n };\n });\n\n // Map minified function names to their real names.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var lodashFunc = lodash[methodName];\n if (lodashFunc) {\n var key = (lodashFunc.name + ''),\n names = realNames[key] || (realNames[key] = []);\n\n names.push({ 'name': methodName, 'func': lodashFunc });\n }\n });\n\n realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{ 'name': 'wrapper', 'func': undefined }];\n\n // Add functions to the lazy wrapper.\n LazyWrapper.prototype.clone = lazyClone;\n LazyWrapper.prototype.reverse = lazyReverse;\n LazyWrapper.prototype.value = lazyValue;\n\n // Add chaining functions to the `lodash` wrapper.\n lodash.prototype.at = wrapperAt;\n lodash.prototype.chain = wrapperChain;\n lodash.prototype.commit = wrapperCommit;\n lodash.prototype.flatMap = wrapperFlatMap;\n lodash.prototype.next = wrapperNext;\n lodash.prototype.plant = wrapperPlant;\n lodash.prototype.reverse = wrapperReverse;\n lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n if (iteratorSymbol) {\n lodash.prototype[iteratorSymbol] = wrapperToIterator;\n }\n return lodash;\n }\n\n /*--------------------------------------------------------------------------*/\n\n // Export lodash.\n var _ = runInContext();\n\n // Expose lodash on the free variable `window` or `self` when available. This\n // prevents errors in cases where lodash is loaded by a script tag in the presence\n // of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch for more details.\n (freeWindow || freeSelf || {})._ = _;\n\n // Some AMD build optimizers like r.js check for condition patterns like the following:\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n // Define as an anonymous module so, through path mapping, it can be\n // referenced as the \"underscore\" module.\n define(function() {\n return _;\n });\n }\n // Check for `exports` after `define` in case a build optimizer adds an `exports` object.\n else if (freeExports && freeModule) {\n // Export for Node.js.\n if (moduleExports) {\n (freeModule.exports = _)._ = _;\n }\n // Export for CommonJS support.\n freeExports._ = _;\n }\n else {\n // Export to the global object.\n root._ = _;\n }\n}.call(this));\n","/*! Magnific Popup - v1.0.0 - 2014-12-12\n* http://dimsemenov.com/plugins/magnific-popup/\n* Copyright (c) 2014 Dmitry Semenov; */\n;(function (factory) { \nif (typeof define === 'function' && define.amd) { \n // AMD. Register as an anonymous module. \n define(['jquery'], factory); \n } else if (typeof exports === 'object') { \n // Node/CommonJS \n factory(require('jquery')); \n } else { \n // Browser globals \n factory(window.jQuery || window.Zepto); \n } \n }(function($) { \n\n/*>>core*/\n/**\n * \n * Magnific Popup Core JS file\n * \n */\n\n\n/**\n * Private static constants\n */\nvar CLOSE_EVENT = 'Close',\n\tBEFORE_CLOSE_EVENT = 'BeforeClose',\n\tAFTER_CLOSE_EVENT = 'AfterClose',\n\tBEFORE_APPEND_EVENT = 'BeforeAppend',\n\tMARKUP_PARSE_EVENT = 'MarkupParse',\n\tOPEN_EVENT = 'Open',\n\tCHANGE_EVENT = 'Change',\n\tNS = 'mfp',\n\tEVENT_NS = '.' + NS,\n\tREADY_CLASS = 'mfp-ready',\n\tREMOVING_CLASS = 'mfp-removing',\n\tPREVENT_CLOSE_CLASS = 'mfp-prevent-close';\n\n\n/**\n * Private vars \n */\nvar mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'\n\tMagnificPopup = function(){},\n\t_isJQ = !!(window.jQuery),\n\t_prevStatus,\n\t_window = $(window),\n\t_body,\n\t_document,\n\t_prevContentType,\n\t_wrapClasses,\n\t_currPopupType;\n\n\n/**\n * Private functions\n */\nvar _mfpOn = function(name, f) {\n\t\tmfp.ev.on(NS + name + EVENT_NS, f);\n\t},\n\t_getEl = function(className, appendTo, html, raw) {\n\t\tvar el = document.createElement('div');\n\t\tel.className = 'mfp-'+className;\n\t\tif(html) {\n\t\t\tel.innerHTML = html;\n\t\t}\n\t\tif(!raw) {\n\t\t\tel = $(el);\n\t\t\tif(appendTo) {\n\t\t\t\tel.appendTo(appendTo);\n\t\t\t}\n\t\t} else if(appendTo) {\n\t\t\tappendTo.appendChild(el);\n\t\t}\n\t\treturn el;\n\t},\n\t_mfpTrigger = function(e, data) {\n\t\tmfp.ev.triggerHandler(NS + e, data);\n\n\t\tif(mfp.st.callbacks) {\n\t\t\t// converts \"mfpEventName\" to \"eventName\" callback and triggers it if it's present\n\t\t\te = e.charAt(0).toLowerCase() + e.slice(1);\n\t\t\tif(mfp.st.callbacks[e]) {\n\t\t\t\tmfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);\n\t\t\t}\n\t\t}\n\t},\n\t_getCloseBtn = function(type) {\n\t\tif(type !== _currPopupType || !mfp.currTemplate.closeBtn) {\n\t\t\tmfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );\n\t\t\t_currPopupType = type;\n\t\t}\n\t\treturn mfp.currTemplate.closeBtn;\n\t},\n\t// Initialize Magnific Popup only when called at least once\n\t_checkInstance = function() {\n\t\tif(!$.magnificPopup.instance) {\n\t\t\tmfp = new MagnificPopup();\n\t\t\tmfp.init();\n\t\t\t$.magnificPopup.instance = mfp;\n\t\t}\n\t},\n\t// CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr\n\tsupportsTransitions = function() {\n\t\tvar s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist\n\t\t\tv = ['ms','O','Moz','Webkit']; // 'v' for vendor\n\n\t\tif( s['transition'] !== undefined ) {\n\t\t\treturn true; \n\t\t}\n\t\t\t\n\t\twhile( v.length ) {\n\t\t\tif( v.pop() + 'Transition' in s ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn false;\n\t};\n\n\n\n/**\n * Public functions\n */\nMagnificPopup.prototype = {\n\n\tconstructor: MagnificPopup,\n\n\t/**\n\t * Initializes Magnific Popup plugin. \n\t * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed\n\t */\n\tinit: function() {\n\t\tvar appVersion = navigator.appVersion;\n\t\tmfp.isIE7 = appVersion.indexOf(\"MSIE 7.\") !== -1; \n\t\tmfp.isIE8 = appVersion.indexOf(\"MSIE 8.\") !== -1;\n\t\tmfp.isLowIE = mfp.isIE7 || mfp.isIE8;\n\t\tmfp.isAndroid = (/android/gi).test(appVersion);\n\t\tmfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);\n\t\tmfp.supportsTransition = supportsTransitions();\n\n\t\t// We disable fixed positioned lightbox on devices that don't handle it nicely.\n\t\t// If you know a better way of detecting this - let me know.\n\t\tmfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );\n\t\t_document = $(document);\n\n\t\tmfp.popupsCache = {};\n\t},\n\n\t/**\n\t * Opens popup\n\t * @param data [description]\n\t */\n\topen: function(data) {\n\n\t\tif(!_body) {\n\t\t\t_body = $(document.body);\n\t\t}\n\n\t\tvar i;\n\n\t\tif(data.isObj === false) { \n\t\t\t// convert jQuery collection to array to avoid conflicts later\n\t\t\tmfp.items = data.items.toArray();\n\n\t\t\tmfp.index = 0;\n\t\t\tvar items = data.items,\n\t\t\t\titem;\n\t\t\tfor(i = 0; i < items.length; i++) {\n\t\t\t\titem = items[i];\n\t\t\t\tif(item.parsed) {\n\t\t\t\t\titem = item.el[0];\n\t\t\t\t}\n\t\t\t\tif(item === data.el[0]) {\n\t\t\t\t\tmfp.index = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tmfp.items = $.isArray(data.items) ? data.items : [data.items];\n\t\t\tmfp.index = data.index || 0;\n\t\t}\n\n\t\t// if popup is already opened - we just update the content\n\t\tif(mfp.isOpen) {\n\t\t\tmfp.updateItemHTML();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmfp.types = []; \n\t\t_wrapClasses = '';\n\t\tif(data.mainEl && data.mainEl.length) {\n\t\t\tmfp.ev = data.mainEl.eq(0);\n\t\t} else {\n\t\t\tmfp.ev = _document;\n\t\t}\n\n\t\tif(data.key) {\n\t\t\tif(!mfp.popupsCache[data.key]) {\n\t\t\t\tmfp.popupsCache[data.key] = {};\n\t\t\t}\n\t\t\tmfp.currTemplate = mfp.popupsCache[data.key];\n\t\t} else {\n\t\t\tmfp.currTemplate = {};\n\t\t}\n\n\n\n\t\tmfp.st = $.extend(true, {}, $.magnificPopup.defaults, data ); \n\t\tmfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;\n\n\t\tif(mfp.st.modal) {\n\t\t\tmfp.st.closeOnContentClick = false;\n\t\t\tmfp.st.closeOnBgClick = false;\n\t\t\tmfp.st.showCloseBtn = false;\n\t\t\tmfp.st.enableEscapeKey = false;\n\t\t}\n\t\t\n\n\t\t// Building markup\n\t\t// main containers are created only once\n\t\tif(!mfp.bgOverlay) {\n\n\t\t\t// Dark overlay\n\t\t\tmfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {\n\t\t\t\tmfp.close();\n\t\t\t});\n\n\t\t\tmfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {\n\t\t\t\tif(mfp._checkIfClose(e.target)) {\n\t\t\t\t\tmfp.close();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmfp.container = _getEl('container', mfp.wrap);\n\t\t}\n\n\t\tmfp.contentContainer = _getEl('content');\n\t\tif(mfp.st.preloader) {\n\t\t\tmfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);\n\t\t}\n\n\n\t\t// Initializing modules\n\t\tvar modules = $.magnificPopup.modules;\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar n = modules[i];\n\t\t\tn = n.charAt(0).toUpperCase() + n.slice(1);\n\t\t\tmfp['init'+n].call(mfp);\n\t\t}\n\t\t_mfpTrigger('BeforeOpen');\n\n\n\t\tif(mfp.st.showCloseBtn) {\n\t\t\t// Close button\n\t\t\tif(!mfp.st.closeBtnInside) {\n\t\t\t\tmfp.wrap.append( _getCloseBtn() );\n\t\t\t} else {\n\t\t\t\t_mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {\n\t\t\t\t\tvalues.close_replaceWith = _getCloseBtn(item.type);\n\t\t\t\t});\n\t\t\t\t_wrapClasses += ' mfp-close-btn-in';\n\t\t\t}\n\t\t}\n\n\t\tif(mfp.st.alignTop) {\n\t\t\t_wrapClasses += ' mfp-align-top';\n\t\t}\n\n\t\n\n\t\tif(mfp.fixedContentPos) {\n\t\t\tmfp.wrap.css({\n\t\t\t\toverflow: mfp.st.overflowY,\n\t\t\t\toverflowX: 'hidden',\n\t\t\t\toverflowY: mfp.st.overflowY\n\t\t\t});\n\t\t} else {\n\t\t\tmfp.wrap.css({ \n\t\t\t\ttop: _window.scrollTop(),\n\t\t\t\tposition: 'absolute'\n\t\t\t});\n\t\t}\n\t\tif( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {\n\t\t\tmfp.bgOverlay.css({\n\t\t\t\theight: _document.height(),\n\t\t\t\tposition: 'absolute'\n\t\t\t});\n\t\t}\n\n\t\t\n\n\t\tif(mfp.st.enableEscapeKey) {\n\t\t\t// Close on ESC key\n\t\t\t_document.on('keyup' + EVENT_NS, function(e) {\n\t\t\t\tif(e.keyCode === 27) {\n\t\t\t\t\tmfp.close();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t_window.on('resize' + EVENT_NS, function() {\n\t\t\tmfp.updateSize();\n\t\t});\n\n\n\t\tif(!mfp.st.closeOnContentClick) {\n\t\t\t_wrapClasses += ' mfp-auto-cursor';\n\t\t}\n\t\t\n\t\tif(_wrapClasses)\n\t\t\tmfp.wrap.addClass(_wrapClasses);\n\n\n\t\t// this triggers recalculation of layout, so we get it once to not to trigger twice\n\t\tvar windowHeight = mfp.wH = _window.height();\n\n\t\t\n\t\tvar windowStyles = {};\n\n\t\tif( mfp.fixedContentPos ) {\n if(mfp._hasScrollBar(windowHeight)){\n var s = mfp._getScrollbarSize();\n if(s) {\n windowStyles.marginRight = s;\n }\n }\n }\n\n\t\tif(mfp.fixedContentPos) {\n\t\t\tif(!mfp.isIE7) {\n\t\t\t\twindowStyles.overflow = 'hidden';\n\t\t\t} else {\n\t\t\t\t// ie7 double-scroll bug\n\t\t\t\t$('body, html').css('overflow', 'hidden');\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t\n\t\tvar classesToadd = mfp.st.mainClass;\n\t\tif(mfp.isIE7) {\n\t\t\tclassesToadd += ' mfp-ie7';\n\t\t}\n\t\tif(classesToadd) {\n\t\t\tmfp._addClassToMFP( classesToadd );\n\t\t}\n\n\t\t// add content\n\t\tmfp.updateItemHTML();\n\n\t\t_mfpTrigger('BuildControls');\n\n\t\t// remove scrollbar, add margin e.t.c\n\t\t$('html').css(windowStyles);\n\t\t\n\t\t// add everything to DOM\n\t\tmfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || _body );\n\n\t\t// Save last focused element\n\t\tmfp._lastFocusedEl = document.activeElement;\n\t\t\n\t\t// Wait for next cycle to allow CSS transition\n\t\tsetTimeout(function() {\n\t\t\t\n\t\t\tif(mfp.content) {\n\t\t\t\tmfp._addClassToMFP(READY_CLASS);\n\t\t\t\tmfp._setFocus();\n\t\t\t} else {\n\t\t\t\t// if content is not defined (not loaded e.t.c) we add class only for BG\n\t\t\t\tmfp.bgOverlay.addClass(READY_CLASS);\n\t\t\t}\n\t\t\t\n\t\t\t// Trap the focus in popup\n\t\t\t_document.on('focusin' + EVENT_NS, mfp._onFocusIn);\n\n\t\t}, 16);\n\n\t\tmfp.isOpen = true;\n\t\tmfp.updateSize(windowHeight);\n\t\t_mfpTrigger(OPEN_EVENT);\n\n\t\treturn data;\n\t},\n\n\t/**\n\t * Closes the popup\n\t */\n\tclose: function() {\n\t\tif(!mfp.isOpen) return;\n\t\t_mfpTrigger(BEFORE_CLOSE_EVENT);\n\n\t\tmfp.isOpen = false;\n\t\t// for CSS3 animation\n\t\tif(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) {\n\t\t\tmfp._addClassToMFP(REMOVING_CLASS);\n\t\t\tsetTimeout(function() {\n\t\t\t\tmfp._close();\n\t\t\t}, mfp.st.removalDelay);\n\t\t} else {\n\t\t\tmfp._close();\n\t\t}\n\t},\n\n\t/**\n\t * Helper for close() function\n\t */\n\t_close: function() {\n\t\t_mfpTrigger(CLOSE_EVENT);\n\n\t\tvar classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';\n\n\t\tmfp.bgOverlay.detach();\n\t\tmfp.wrap.detach();\n\t\tmfp.container.empty();\n\n\t\tif(mfp.st.mainClass) {\n\t\t\tclassesToRemove += mfp.st.mainClass + ' ';\n\t\t}\n\n\t\tmfp._removeClassFromMFP(classesToRemove);\n\n\t\tif(mfp.fixedContentPos) {\n\t\t\tvar windowStyles = {marginRight: ''};\n\t\t\tif(mfp.isIE7) {\n\t\t\t\t$('body, html').css('overflow', '');\n\t\t\t} else {\n\t\t\t\twindowStyles.overflow = '';\n\t\t\t}\n\t\t\t$('html').css(windowStyles);\n\t\t}\n\t\t\n\t\t_document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);\n\t\tmfp.ev.off(EVENT_NS);\n\n\t\t// clean up DOM elements that aren't removed\n\t\tmfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');\n\t\tmfp.bgOverlay.attr('class', 'mfp-bg');\n\t\tmfp.container.attr('class', 'mfp-container');\n\n\t\t// remove close button from target element\n\t\tif(mfp.st.showCloseBtn &&\n\t\t(!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {\n\t\t\tif(mfp.currTemplate.closeBtn)\n\t\t\t\tmfp.currTemplate.closeBtn.detach();\n\t\t}\n\n\n\t\tif(mfp._lastFocusedEl) {\n\t\t\t$(mfp._lastFocusedEl).focus(); // put tab focus back\n\t\t}\n\t\tmfp.currItem = null;\t\n\t\tmfp.content = null;\n\t\tmfp.currTemplate = null;\n\t\tmfp.prevHeight = 0;\n\n\t\t_mfpTrigger(AFTER_CLOSE_EVENT);\n\t},\n\t\n\tupdateSize: function(winHeight) {\n\n\t\tif(mfp.isIOS) {\n\t\t\t// fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2\n\t\t\tvar zoomLevel = document.documentElement.clientWidth / window.innerWidth;\n\t\t\tvar height = window.innerHeight * zoomLevel;\n\t\t\tmfp.wrap.css('height', height);\n\t\t\tmfp.wH = height;\n\t\t} else {\n\t\t\tmfp.wH = winHeight || _window.height();\n\t\t}\n\t\t// Fixes #84: popup incorrectly positioned with position:relative on body\n\t\tif(!mfp.fixedContentPos) {\n\t\t\tmfp.wrap.css('height', mfp.wH);\n\t\t}\n\n\t\t_mfpTrigger('Resize');\n\n\t},\n\n\t/**\n\t * Set content of popup based on current index\n\t */\n\tupdateItemHTML: function() {\n\t\tvar item = mfp.items[mfp.index];\n\n\t\t// Detach and perform modifications\n\t\tmfp.contentContainer.detach();\n\n\t\tif(mfp.content)\n\t\t\tmfp.content.detach();\n\n\t\tif(!item.parsed) {\n\t\t\titem = mfp.parseEl( mfp.index );\n\t\t}\n\n\t\tvar type = item.type;\t\n\n\t\t_mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);\n\t\t// BeforeChange event works like so:\n\t\t// _mfpOn('BeforeChange', function(e, prevType, newType) { });\n\t\t\n\t\tmfp.currItem = item;\n\n\t\t\n\n\t\t\n\n\t\tif(!mfp.currTemplate[type]) {\n\t\t\tvar markup = mfp.st[type] ? mfp.st[type].markup : false;\n\n\t\t\t// allows to modify markup\n\t\t\t_mfpTrigger('FirstMarkupParse', markup);\n\n\t\t\tif(markup) {\n\t\t\t\tmfp.currTemplate[type] = $(markup);\n\t\t\t} else {\n\t\t\t\t// if there is no markup found we just define that template is parsed\n\t\t\t\tmfp.currTemplate[type] = true;\n\t\t\t}\n\t\t}\n\n\t\tif(_prevContentType && _prevContentType !== item.type) {\n\t\t\tmfp.container.removeClass('mfp-'+_prevContentType+'-holder');\n\t\t}\n\t\t\n\t\tvar newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);\n\t\tmfp.appendContent(newContent, type);\n\n\t\titem.preloaded = true;\n\n\t\t_mfpTrigger(CHANGE_EVENT, item);\n\t\t_prevContentType = item.type;\n\t\t\n\t\t// Append container back after its content changed\n\t\tmfp.container.prepend(mfp.contentContainer);\n\n\t\t_mfpTrigger('AfterChange');\n\t},\n\n\n\t/**\n\t * Set HTML content of popup\n\t */\n\tappendContent: function(newContent, type) {\n\t\tmfp.content = newContent;\n\t\t\n\t\tif(newContent) {\n\t\t\tif(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&\n\t\t\t\tmfp.currTemplate[type] === true) {\n\t\t\t\t// if there is no markup, we just append close button element inside\n\t\t\t\tif(!mfp.content.find('.mfp-close').length) {\n\t\t\t\t\tmfp.content.append(_getCloseBtn());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmfp.content = newContent;\n\t\t\t}\n\t\t} else {\n\t\t\tmfp.content = '';\n\t\t}\n\n\t\t_mfpTrigger(BEFORE_APPEND_EVENT);\n\t\tmfp.container.addClass('mfp-'+type+'-holder');\n\n\t\tmfp.contentContainer.append(mfp.content);\n\t},\n\n\n\n\t\n\t/**\n\t * Creates Magnific Popup data object based on given data\n\t * @param {int} index Index of item to parse\n\t */\n\tparseEl: function(index) {\n\t\tvar item = mfp.items[index],\n\t\t\ttype;\n\n\t\tif(item.tagName) {\n\t\t\titem = { el: $(item) };\n\t\t} else {\n\t\t\ttype = item.type;\n\t\t\titem = { data: item, src: item.src };\n\t\t}\n\n\t\tif(item.el) {\n\t\t\tvar types = mfp.types;\n\n\t\t\t// check for 'mfp-TYPE' class\n\t\t\tfor(var i = 0; i < types.length; i++) {\n\t\t\t\tif( item.el.hasClass('mfp-'+types[i]) ) {\n\t\t\t\t\ttype = types[i];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\titem.src = item.el.attr('data-mfp-src');\n\t\t\tif(!item.src) {\n\t\t\t\titem.src = item.el.attr('href');\n\t\t\t}\n\t\t}\n\n\t\titem.type = type || mfp.st.type || 'inline';\n\t\titem.index = index;\n\t\titem.parsed = true;\n\t\tmfp.items[index] = item;\n\t\t_mfpTrigger('ElementParse', item);\n\n\t\treturn mfp.items[index];\n\t},\n\n\n\t/**\n\t * Initializes single popup or a group of popups\n\t */\n\taddGroup: function(el, options) {\n\t\tvar eHandler = function(e) {\n\t\t\te.mfpEl = this;\n\t\t\tmfp._openClick(e, el, options);\n\t\t};\n\n\t\tif(!options) {\n\t\t\toptions = {};\n\t\t} \n\n\t\tvar eName = 'click.magnificPopup';\n\t\toptions.mainEl = el;\n\t\t\n\t\tif(options.items) {\n\t\t\toptions.isObj = true;\n\t\t\tel.off(eName).on(eName, eHandler);\n\t\t} else {\n\t\t\toptions.isObj = false;\n\t\t\tif(options.delegate) {\n\t\t\t\tel.off(eName).on(eName, options.delegate , eHandler);\n\t\t\t} else {\n\t\t\t\toptions.items = el;\n\t\t\t\tel.off(eName).on(eName, eHandler);\n\t\t\t}\n\t\t}\n\t},\n\t_openClick: function(e, el, options) {\n\t\tvar midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;\n\n\n\t\tif(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;\n\n\t\tif(disableOn) {\n\t\t\tif($.isFunction(disableOn)) {\n\t\t\t\tif( !disableOn.call(mfp) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else { // else it's number\n\t\t\t\tif( _window.width() < disableOn ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(e.type) {\n\t\t\te.preventDefault();\n\n\t\t\t// This will prevent popup from closing if element is inside and popup is already opened\n\t\t\tif(mfp.isOpen) {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t}\n\t\t\t\n\n\t\toptions.el = $(e.mfpEl);\n\t\tif(options.delegate) {\n\t\t\toptions.items = el.find(options.delegate);\n\t\t}\n\t\tmfp.open(options);\n\t},\n\n\n\t/**\n\t * Updates text on preloader\n\t */\n\tupdateStatus: function(status, text) {\n\n\t\tif(mfp.preloader) {\n\t\t\tif(_prevStatus !== status) {\n\t\t\t\tmfp.container.removeClass('mfp-s-'+_prevStatus);\n\t\t\t}\n\n\t\t\tif(!text && status === 'loading') {\n\t\t\t\ttext = mfp.st.tLoading;\n\t\t\t}\n\n\t\t\tvar data = {\n\t\t\t\tstatus: status,\n\t\t\t\ttext: text\n\t\t\t};\n\t\t\t// allows to modify status\n\t\t\t_mfpTrigger('UpdateStatus', data);\n\n\t\t\tstatus = data.status;\n\t\t\ttext = data.text;\n\n\t\t\tmfp.preloader.html(text);\n\n\t\t\tmfp.preloader.find('a').on('click', function(e) {\n\t\t\t\te.stopImmediatePropagation();\n\t\t\t});\n\n\t\t\tmfp.container.addClass('mfp-s-'+status);\n\t\t\t_prevStatus = status;\n\t\t}\n\t},\n\n\n\t/*\n\t\t\"Private\" helpers that aren't private at all\n\t */\n\t// Check to close popup or not\n\t// \"target\" is an element that was clicked\n\t_checkIfClose: function(target) {\n\n\t\tif($(target).hasClass(PREVENT_CLOSE_CLASS)) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar closeOnContent = mfp.st.closeOnContentClick;\n\t\tvar closeOnBg = mfp.st.closeOnBgClick;\n\n\t\tif(closeOnContent && closeOnBg) {\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\t// We close the popup if click is on close button or on preloader. Or if there is no content.\n\t\t\tif(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// if click is outside the content\n\t\t\tif( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {\n\t\t\t\tif(closeOnBg) {\n\t\t\t\t\t// last check, if the clicked element is in DOM, (in case it's removed onclick)\n\t\t\t\t\tif( $.contains(document, target) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if(closeOnContent) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t},\n\t_addClassToMFP: function(cName) {\n\t\tmfp.bgOverlay.addClass(cName);\n\t\tmfp.wrap.addClass(cName);\n\t},\n\t_removeClassFromMFP: function(cName) {\n\t\tthis.bgOverlay.removeClass(cName);\n\t\tmfp.wrap.removeClass(cName);\n\t},\n\t_hasScrollBar: function(winHeight) {\n\t\treturn ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );\n\t},\n\t_setFocus: function() {\n\t\t(mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();\n\t},\n\t_onFocusIn: function(e) {\n\t\tif( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {\n\t\t\tmfp._setFocus();\n\t\t\treturn false;\n\t\t}\n\t},\n\t_parseMarkup: function(template, values, item) {\n\t\tvar arr;\n\t\tif(item.data) {\n\t\t\tvalues = $.extend(item.data, values);\n\t\t}\n\t\t_mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );\n\n\t\t$.each(values, function(key, value) {\n\t\t\tif(value === undefined || value === false) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tarr = key.split('_');\n\t\t\tif(arr.length > 1) {\n\t\t\t\tvar el = template.find(EVENT_NS + '-'+arr[0]);\n\n\t\t\t\tif(el.length > 0) {\n\t\t\t\t\tvar attr = arr[1];\n\t\t\t\t\tif(attr === 'replaceWith') {\n\t\t\t\t\t\tif(el[0] !== value[0]) {\n\t\t\t\t\t\t\tel.replaceWith(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(attr === 'img') {\n\t\t\t\t\t\tif(el.is('img')) {\n\t\t\t\t\t\t\tel.attr('src', value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tel.replaceWith( '<img src=\"'+value+'\" class=\"' + el.attr('class') + '\" />' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tel.attr(arr[1], value);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\ttemplate.find(EVENT_NS + '-'+key).html(value);\n\t\t\t}\n\t\t});\n\t},\n\n\t_getScrollbarSize: function() {\n\t\t// thx David\n\t\tif(mfp.scrollbarSize === undefined) {\n\t\t\tvar scrollDiv = document.createElement(\"div\");\n\t\t\tscrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';\n\t\t\tdocument.body.appendChild(scrollDiv);\n\t\t\tmfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n\t\t\tdocument.body.removeChild(scrollDiv);\n\t\t}\n\t\treturn mfp.scrollbarSize;\n\t}\n\n}; /* MagnificPopup core prototype end */\n\n\n\n\n/**\n * Public static functions\n */\n$.magnificPopup = {\n\tinstance: null,\n\tproto: MagnificPopup.prototype,\n\tmodules: [],\n\n\topen: function(options, index) {\n\t\t_checkInstance();\t\n\n\t\tif(!options) {\n\t\t\toptions = {};\n\t\t} else {\n\t\t\toptions = $.extend(true, {}, options);\n\t\t}\n\t\t\t\n\n\t\toptions.isObj = true;\n\t\toptions.index = index || 0;\n\t\treturn this.instance.open(options);\n\t},\n\n\tclose: function() {\n\t\treturn $.magnificPopup.instance && $.magnificPopup.instance.close();\n\t},\n\n\tregisterModule: function(name, module) {\n\t\tif(module.options) {\n\t\t\t$.magnificPopup.defaults[name] = module.options;\n\t\t}\n\t\t$.extend(this.proto, module.proto);\t\t\t\n\t\tthis.modules.push(name);\n\t},\n\n\tdefaults: { \n\n\t\t// Info about options is in docs:\n\t\t// http://dimsemenov.com/plugins/magnific-popup/documentation.html#options\n\t\t\n\t\tdisableOn: 0,\t\n\n\t\tkey: null,\n\n\t\tmidClick: false,\n\n\t\tmainClass: '',\n\n\t\tpreloader: true,\n\n\t\tfocus: '', // CSS selector of input to focus after popup is opened\n\t\t\n\t\tcloseOnContentClick: false,\n\n\t\tcloseOnBgClick: true,\n\n\t\tcloseBtnInside: true, \n\n\t\tshowCloseBtn: true,\n\n\t\tenableEscapeKey: true,\n\n\t\tmodal: false,\n\n\t\talignTop: false,\n\t\n\t\tremovalDelay: 0,\n\n\t\tprependTo: null,\n\t\t\n\t\tfixedContentPos: 'auto', \n\t\n\t\tfixedBgPos: 'auto',\n\n\t\toverflowY: 'auto',\n\n\t\tcloseMarkup: '<button title=\"%title%\" type=\"button\" class=\"mfp-close\">×</button>',\n\n\t\ttClose: 'Close (Esc)',\n\n\t\ttLoading: 'Loading...'\n\n\t}\n};\n\n\n\n$.fn.magnificPopup = function(options) {\n\t_checkInstance();\n\n\tvar jqEl = $(this);\n\n\t// We call some API method of first param is a string\n\tif (typeof options === \"string\" ) {\n\n\t\tif(options === 'open') {\n\t\t\tvar items,\n\t\t\t\titemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,\n\t\t\t\tindex = parseInt(arguments[1], 10) || 0;\n\n\t\t\tif(itemOpts.items) {\n\t\t\t\titems = itemOpts.items[index];\n\t\t\t} else {\n\t\t\t\titems = jqEl;\n\t\t\t\tif(itemOpts.delegate) {\n\t\t\t\t\titems = items.find(itemOpts.delegate);\n\t\t\t\t}\n\t\t\t\titems = items.eq( index );\n\t\t\t}\n\t\t\tmfp._openClick({mfpEl:items}, jqEl, itemOpts);\n\t\t} else {\n\t\t\tif(mfp.isOpen)\n\t\t\t\tmfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));\n\t\t}\n\n\t} else {\n\t\t// clone options obj\n\t\toptions = $.extend(true, {}, options);\n\t\t\n\t\t/*\n\t\t * As Zepto doesn't support .data() method for objects \n\t\t * and it works only in normal browsers\n\t\t * we assign \"options\" object directly to the DOM element. FTW!\n\t\t */\n\t\tif(_isJQ) {\n\t\t\tjqEl.data('magnificPopup', options);\n\t\t} else {\n\t\t\tjqEl[0].magnificPopup = options;\n\t\t}\n\n\t\tmfp.addGroup(jqEl, options);\n\n\t}\n\treturn jqEl;\n};\n\n\n//Quick benchmark\n/*\nvar start = performance.now(),\n\ti,\n\trounds = 1000;\n\nfor(i = 0; i < rounds; i++) {\n\n}\nconsole.log('Test #1:', performance.now() - start);\n\nstart = performance.now();\nfor(i = 0; i < rounds; i++) {\n\n}\nconsole.log('Test #2:', performance.now() - start);\n*/\n\n\n/*>>core*/\n\n/*>>inline*/\n\nvar INLINE_NS = 'inline',\n\t_hiddenClass,\n\t_inlinePlaceholder, \n\t_lastInlineElement,\n\t_putInlineElementsBack = function() {\n\t\tif(_lastInlineElement) {\n\t\t\t_inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();\n\t\t\t_lastInlineElement = null;\n\t\t}\n\t};\n\n$.magnificPopup.registerModule(INLINE_NS, {\n\toptions: {\n\t\thiddenClass: 'hide', // will be appended with `mfp-` prefix\n\t\tmarkup: '',\n\t\ttNotFound: 'Content not found'\n\t},\n\tproto: {\n\n\t\tinitInline: function() {\n\t\t\tmfp.types.push(INLINE_NS);\n\n\t\t\t_mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {\n\t\t\t\t_putInlineElementsBack();\n\t\t\t});\n\t\t},\n\n\t\tgetInline: function(item, template) {\n\n\t\t\t_putInlineElementsBack();\n\n\t\t\tif(item.src) {\n\t\t\t\tvar inlineSt = mfp.st.inline,\n\t\t\t\t\tel = $(item.src);\n\n\t\t\t\tif(el.length) {\n\n\t\t\t\t\t// If target element has parent - we replace it with placeholder and put it back after popup is closed\n\t\t\t\t\tvar parent = el[0].parentNode;\n\t\t\t\t\tif(parent && parent.tagName) {\n\t\t\t\t\t\tif(!_inlinePlaceholder) {\n\t\t\t\t\t\t\t_hiddenClass = inlineSt.hiddenClass;\n\t\t\t\t\t\t\t_inlinePlaceholder = _getEl(_hiddenClass);\n\t\t\t\t\t\t\t_hiddenClass = 'mfp-'+_hiddenClass;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// replace target inline element with placeholder\n\t\t\t\t\t\t_lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);\n\t\t\t\t\t}\n\n\t\t\t\t\tmfp.updateStatus('ready');\n\t\t\t\t} else {\n\t\t\t\t\tmfp.updateStatus('error', inlineSt.tNotFound);\n\t\t\t\t\tel = $('<div>');\n\t\t\t\t}\n\n\t\t\t\titem.inlineElement = el;\n\t\t\t\treturn el;\n\t\t\t}\n\n\t\t\tmfp.updateStatus('ready');\n\t\t\tmfp._parseMarkup(template, {}, item);\n\t\t\treturn template;\n\t\t}\n\t}\n});\n\n/*>>inline*/\n\n/*>>ajax*/\nvar AJAX_NS = 'ajax',\n\t_ajaxCur,\n\t_removeAjaxCursor = function() {\n\t\tif(_ajaxCur) {\n\t\t\t_body.removeClass(_ajaxCur);\n\t\t}\n\t},\n\t_destroyAjaxRequest = function() {\n\t\t_removeAjaxCursor();\n\t\tif(mfp.req) {\n\t\t\tmfp.req.abort();\n\t\t}\n\t};\n\n$.magnificPopup.registerModule(AJAX_NS, {\n\n\toptions: {\n\t\tsettings: null,\n\t\tcursor: 'mfp-ajax-cur',\n\t\ttError: '<a href=\"%url%\">The content</a> could not be loaded.'\n\t},\n\n\tproto: {\n\t\tinitAjax: function() {\n\t\t\tmfp.types.push(AJAX_NS);\n\t\t\t_ajaxCur = mfp.st.ajax.cursor;\n\n\t\t\t_mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);\n\t\t\t_mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);\n\t\t},\n\t\tgetAjax: function(item) {\n\n\t\t\tif(_ajaxCur)\n\t\t\t\t_body.addClass(_ajaxCur);\n\n\t\t\tmfp.updateStatus('loading');\n\n\t\t\tvar opts = $.extend({\n\t\t\t\turl: item.src,\n\t\t\t\tsuccess: function(data, textStatus, jqXHR) {\n\t\t\t\t\tvar temp = {\n\t\t\t\t\t\tdata:data,\n\t\t\t\t\t\txhr:jqXHR\n\t\t\t\t\t};\n\n\t\t\t\t\t_mfpTrigger('ParseAjax', temp);\n\n\t\t\t\t\tmfp.appendContent( $(temp.data), AJAX_NS );\n\n\t\t\t\t\titem.finished = true;\n\n\t\t\t\t\t_removeAjaxCursor();\n\n\t\t\t\t\tmfp._setFocus();\n\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tmfp.wrap.addClass(READY_CLASS);\n\t\t\t\t\t}, 16);\n\n\t\t\t\t\tmfp.updateStatus('ready');\n\n\t\t\t\t\t_mfpTrigger('AjaxContentAdded');\n\t\t\t\t},\n\t\t\t\terror: function() {\n\t\t\t\t\t_removeAjaxCursor();\n\t\t\t\t\titem.finished = item.loadError = true;\n\t\t\t\t\tmfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));\n\t\t\t\t}\n\t\t\t}, mfp.st.ajax.settings);\n\n\t\t\tmfp.req = $.ajax(opts);\n\n\t\t\treturn '';\n\t\t}\n\t}\n});\n\n\n\n\n\n\t\n\n/*>>ajax*/\n\n/*>>image*/\nvar _imgInterval,\n\t_getTitle = function(item) {\n\t\tif(item.data && item.data.title !== undefined) \n\t\t\treturn item.data.title;\n\n\t\tvar src = mfp.st.image.titleSrc;\n\n\t\tif(src) {\n\t\t\tif($.isFunction(src)) {\n\t\t\t\treturn src.call(mfp, item);\n\t\t\t} else if(item.el) {\n\t\t\t\treturn item.el.attr(src) || '';\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t};\n\n$.magnificPopup.registerModule('image', {\n\n\toptions: {\n\t\tmarkup: '<div class=\"mfp-figure\">'+\n\t\t\t\t\t'<div class=\"mfp-close\"></div>'+\n\t\t\t\t\t'<figure>'+\n\t\t\t\t\t\t'<div class=\"mfp-img\"></div>'+\n\t\t\t\t\t\t'<figcaption>'+\n\t\t\t\t\t\t\t'<div class=\"mfp-bottom-bar\">'+\n\t\t\t\t\t\t\t\t'<div class=\"mfp-title\"></div>'+\n\t\t\t\t\t\t\t\t'<div class=\"mfp-counter\"></div>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t'</figcaption>'+\n\t\t\t\t\t'</figure>'+\n\t\t\t\t'</div>',\n\t\tcursor: 'mfp-zoom-out-cur',\n\t\ttitleSrc: 'title', \n\t\tverticalFit: true,\n\t\ttError: '<a href=\"%url%\">The image</a> could not be loaded.'\n\t},\n\n\tproto: {\n\t\tinitImage: function() {\n\t\t\tvar imgSt = mfp.st.image,\n\t\t\t\tns = '.image';\n\n\t\t\tmfp.types.push('image');\n\n\t\t\t_mfpOn(OPEN_EVENT+ns, function() {\n\t\t\t\tif(mfp.currItem.type === 'image' && imgSt.cursor) {\n\t\t\t\t\t_body.addClass(imgSt.cursor);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_mfpOn(CLOSE_EVENT+ns, function() {\n\t\t\t\tif(imgSt.cursor) {\n\t\t\t\t\t_body.removeClass(imgSt.cursor);\n\t\t\t\t}\n\t\t\t\t_window.off('resize' + EVENT_NS);\n\t\t\t});\n\n\t\t\t_mfpOn('Resize'+ns, mfp.resizeImage);\n\t\t\tif(mfp.isLowIE) {\n\t\t\t\t_mfpOn('AfterChange', mfp.resizeImage);\n\t\t\t}\n\t\t},\n\t\tresizeImage: function() {\n\t\t\tvar item = mfp.currItem;\n\t\t\tif(!item || !item.img) return;\n\n\t\t\tif(mfp.st.image.verticalFit) {\n\t\t\t\tvar decr = 0;\n\t\t\t\t// fix box-sizing in ie7/8\n\t\t\t\tif(mfp.isLowIE) {\n\t\t\t\t\tdecr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);\n\t\t\t\t}\n\t\t\t\titem.img.css('max-height', mfp.wH-decr);\n\t\t\t}\n\t\t},\n\t\t_onImageHasSize: function(item) {\n\t\t\tif(item.img) {\n\t\t\t\t\n\t\t\t\titem.hasSize = true;\n\n\t\t\t\tif(_imgInterval) {\n\t\t\t\t\tclearInterval(_imgInterval);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\titem.isCheckingImgSize = false;\n\n\t\t\t\t_mfpTrigger('ImageHasSize', item);\n\n\t\t\t\tif(item.imgHidden) {\n\t\t\t\t\tif(mfp.content)\n\t\t\t\t\t\tmfp.content.removeClass('mfp-loading');\n\t\t\t\t\t\n\t\t\t\t\titem.imgHidden = false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Function that loops until the image has size to display elements that rely on it asap\n\t\t */\n\t\tfindImageSize: function(item) {\n\n\t\t\tvar counter = 0,\n\t\t\t\timg = item.img[0],\n\t\t\t\tmfpSetInterval = function(delay) {\n\n\t\t\t\t\tif(_imgInterval) {\n\t\t\t\t\t\tclearInterval(_imgInterval);\n\t\t\t\t\t}\n\t\t\t\t\t// decelerating interval that checks for size of an image\n\t\t\t\t\t_imgInterval = setInterval(function() {\n\t\t\t\t\t\tif(img.naturalWidth > 0) {\n\t\t\t\t\t\t\tmfp._onImageHasSize(item);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(counter > 200) {\n\t\t\t\t\t\t\tclearInterval(_imgInterval);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\tif(counter === 3) {\n\t\t\t\t\t\t\tmfpSetInterval(10);\n\t\t\t\t\t\t} else if(counter === 40) {\n\t\t\t\t\t\t\tmfpSetInterval(50);\n\t\t\t\t\t\t} else if(counter === 100) {\n\t\t\t\t\t\t\tmfpSetInterval(500);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, delay);\n\t\t\t\t};\n\n\t\t\tmfpSetInterval(1);\n\t\t},\n\n\t\tgetImage: function(item, template) {\n\n\t\t\tvar guard = 0,\n\n\t\t\t\t// image load complete handler\n\t\t\t\tonLoadComplete = function() {\n\t\t\t\t\tif(item) {\n\t\t\t\t\t\tif (item.img[0].complete) {\n\t\t\t\t\t\t\titem.img.off('.mfploader');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(item === mfp.currItem){\n\t\t\t\t\t\t\t\tmfp._onImageHasSize(item);\n\n\t\t\t\t\t\t\t\tmfp.updateStatus('ready');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\titem.hasSize = true;\n\t\t\t\t\t\t\titem.loaded = true;\n\n\t\t\t\t\t\t\t_mfpTrigger('ImageLoadComplete');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// if image complete check fails 200 times (20 sec), we assume that there was an error.\n\t\t\t\t\t\t\tguard++;\n\t\t\t\t\t\t\tif(guard < 200) {\n\t\t\t\t\t\t\t\tsetTimeout(onLoadComplete,100);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tonLoadError();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t// image error handler\n\t\t\t\tonLoadError = function() {\n\t\t\t\t\tif(item) {\n\t\t\t\t\t\titem.img.off('.mfploader');\n\t\t\t\t\t\tif(item === mfp.currItem){\n\t\t\t\t\t\t\tmfp._onImageHasSize(item);\n\t\t\t\t\t\t\tmfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\titem.hasSize = true;\n\t\t\t\t\t\titem.loaded = true;\n\t\t\t\t\t\titem.loadError = true;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\timgSt = mfp.st.image;\n\n\n\t\t\tvar el = template.find('.mfp-img');\n\t\t\tif(el.length) {\n\t\t\t\tvar img = document.createElement('img');\n\t\t\t\timg.className = 'mfp-img';\n\t\t\t\tif(item.el && item.el.find('img').length) {\n\t\t\t\t\timg.alt = item.el.find('img').attr('alt');\n\t\t\t\t}\n\t\t\t\titem.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);\n\t\t\t\timg.src = item.src;\n\n\t\t\t\t// without clone() \"error\" event is not firing when IMG is replaced by new IMG\n\t\t\t\t// TODO: find a way to avoid such cloning\n\t\t\t\tif(el.is('img')) {\n\t\t\t\t\titem.img = item.img.clone();\n\t\t\t\t}\n\n\t\t\t\timg = item.img[0];\n\t\t\t\tif(img.naturalWidth > 0) {\n\t\t\t\t\titem.hasSize = true;\n\t\t\t\t} else if(!img.width) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\titem.hasSize = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmfp._parseMarkup(template, {\n\t\t\t\ttitle: _getTitle(item),\n\t\t\t\timg_replaceWith: item.img\n\t\t\t}, item);\n\n\t\t\tmfp.resizeImage();\n\n\t\t\tif(item.hasSize) {\n\t\t\t\tif(_imgInterval) clearInterval(_imgInterval);\n\n\t\t\t\tif(item.loadError) {\n\t\t\t\t\ttemplate.addClass('mfp-loading');\n\t\t\t\t\tmfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );\n\t\t\t\t} else {\n\t\t\t\t\ttemplate.removeClass('mfp-loading');\n\t\t\t\t\tmfp.updateStatus('ready');\n\t\t\t\t}\n\t\t\t\treturn template;\n\t\t\t}\n\n\t\t\tmfp.updateStatus('loading');\n\t\t\titem.loading = true;\n\n\t\t\tif(!item.hasSize) {\n\t\t\t\titem.imgHidden = true;\n\t\t\t\ttemplate.addClass('mfp-loading');\n\t\t\t\tmfp.findImageSize(item);\n\t\t\t} \n\n\t\t\treturn template;\n\t\t}\n\t}\n});\n\n\n\n/*>>image*/\n\n/*>>zoom*/\nvar hasMozTransform,\n\tgetHasMozTransform = function() {\n\t\tif(hasMozTransform === undefined) {\n\t\t\thasMozTransform = document.createElement('p').style.MozTransform !== undefined;\n\t\t}\n\t\treturn hasMozTransform;\t\t\n\t};\n\n$.magnificPopup.registerModule('zoom', {\n\n\toptions: {\n\t\tenabled: false,\n\t\teasing: 'ease-in-out',\n\t\tduration: 300,\n\t\topener: function(element) {\n\t\t\treturn element.is('img') ? element : element.find('img');\n\t\t}\n\t},\n\n\tproto: {\n\n\t\tinitZoom: function() {\n\t\t\tvar zoomSt = mfp.st.zoom,\n\t\t\t\tns = '.zoom',\n\t\t\t\timage;\n\t\t\t\t\n\t\t\tif(!zoomSt.enabled || !mfp.supportsTransition) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar duration = zoomSt.duration,\n\t\t\t\tgetElToAnimate = function(image) {\n\t\t\t\t\tvar newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),\n\t\t\t\t\t\ttransition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,\n\t\t\t\t\t\tcssObj = {\n\t\t\t\t\t\t\tposition: 'fixed',\n\t\t\t\t\t\t\tzIndex: 9999,\n\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t'-webkit-backface-visibility': 'hidden'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tt = 'transition';\n\n\t\t\t\t\tcssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;\n\n\t\t\t\t\tnewImg.css(cssObj);\n\t\t\t\t\treturn newImg;\n\t\t\t\t},\n\t\t\t\tshowMainContent = function() {\n\t\t\t\t\tmfp.content.css('visibility', 'visible');\n\t\t\t\t},\n\t\t\t\topenTimeout,\n\t\t\t\tanimatedImg;\n\n\t\t\t_mfpOn('BuildControls'+ns, function() {\n\t\t\t\tif(mfp._allowZoom()) {\n\n\t\t\t\t\tclearTimeout(openTimeout);\n\t\t\t\t\tmfp.content.css('visibility', 'hidden');\n\n\t\t\t\t\t// Basically, all code below does is clones existing image, puts in on top of the current one and animated it\n\t\t\t\t\t\n\t\t\t\t\timage = mfp._getItemToZoom();\n\n\t\t\t\t\tif(!image) {\n\t\t\t\t\t\tshowMainContent();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tanimatedImg = getElToAnimate(image); \n\t\t\t\t\t\n\t\t\t\t\tanimatedImg.css( mfp._getOffset() );\n\n\t\t\t\t\tmfp.wrap.append(animatedImg);\n\n\t\t\t\t\topenTimeout = setTimeout(function() {\n\t\t\t\t\t\tanimatedImg.css( mfp._getOffset( true ) );\n\t\t\t\t\t\topenTimeout = setTimeout(function() {\n\n\t\t\t\t\t\t\tshowMainContent();\n\n\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\tanimatedImg.remove();\n\t\t\t\t\t\t\t\timage = animatedImg = null;\n\t\t\t\t\t\t\t\t_mfpTrigger('ZoomAnimationEnded');\n\t\t\t\t\t\t\t}, 16); // avoid blink when switching images \n\n\t\t\t\t\t\t}, duration); // this timeout equals animation duration\n\n\t\t\t\t\t}, 16); // by adding this timeout we avoid short glitch at the beginning of animation\n\n\n\t\t\t\t\t// Lots of timeouts...\n\t\t\t\t}\n\t\t\t});\n\t\t\t_mfpOn(BEFORE_CLOSE_EVENT+ns, function() {\n\t\t\t\tif(mfp._allowZoom()) {\n\n\t\t\t\t\tclearTimeout(openTimeout);\n\n\t\t\t\t\tmfp.st.removalDelay = duration;\n\n\t\t\t\t\tif(!image) {\n\t\t\t\t\t\timage = mfp._getItemToZoom();\n\t\t\t\t\t\tif(!image) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimatedImg = getElToAnimate(image);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tanimatedImg.css( mfp._getOffset(true) );\n\t\t\t\t\tmfp.wrap.append(animatedImg);\n\t\t\t\t\tmfp.content.css('visibility', 'hidden');\n\t\t\t\t\t\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tanimatedImg.css( mfp._getOffset() );\n\t\t\t\t\t}, 16);\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\t_mfpOn(CLOSE_EVENT+ns, function() {\n\t\t\t\tif(mfp._allowZoom()) {\n\t\t\t\t\tshowMainContent();\n\t\t\t\t\tif(animatedImg) {\n\t\t\t\t\t\tanimatedImg.remove();\n\t\t\t\t\t}\n\t\t\t\t\timage = null;\n\t\t\t\t}\t\n\t\t\t});\n\t\t},\n\n\t\t_allowZoom: function() {\n\t\t\treturn mfp.currItem.type === 'image';\n\t\t},\n\n\t\t_getItemToZoom: function() {\n\t\t\tif(mfp.currItem.hasSize) {\n\t\t\t\treturn mfp.currItem.img;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Get element postion relative to viewport\n\t\t_getOffset: function(isLarge) {\n\t\t\tvar el;\n\t\t\tif(isLarge) {\n\t\t\t\tel = mfp.currItem.img;\n\t\t\t} else {\n\t\t\t\tel = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);\n\t\t\t}\n\n\t\t\tvar offset = el.offset();\n\t\t\tvar paddingTop = parseInt(el.css('padding-top'),10);\n\t\t\tvar paddingBottom = parseInt(el.css('padding-bottom'),10);\n\t\t\toffset.top -= ( $(window).scrollTop() - paddingTop );\n\n\n\t\t\t/*\n\t\t\t\n\t\t\tAnimating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.\n\n\t\t\t */\n\t\t\tvar obj = {\n\t\t\t\twidth: el.width(),\n\t\t\t\t// fix Zepto height+padding issue\n\t\t\t\theight: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop\n\t\t\t};\n\n\t\t\t// I hate to do this, but there is no another option\n\t\t\tif( getHasMozTransform() ) {\n\t\t\t\tobj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';\n\t\t\t} else {\n\t\t\t\tobj.left = offset.left;\n\t\t\t\tobj.top = offset.top;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}\n\n\t}\n});\n\n\n\n/*>>zoom*/\n\n/*>>iframe*/\n\nvar IFRAME_NS = 'iframe',\n\t_emptyPage = '//about:blank',\n\t\n\t_fixIframeBugs = function(isShowing) {\n\t\tif(mfp.currTemplate[IFRAME_NS]) {\n\t\t\tvar el = mfp.currTemplate[IFRAME_NS].find('iframe');\n\t\t\tif(el.length) { \n\t\t\t\t// reset src after the popup is closed to avoid \"video keeps playing after popup is closed\" bug\n\t\t\t\tif(!isShowing) {\n\t\t\t\t\tel[0].src = _emptyPage;\n\t\t\t\t}\n\n\t\t\t\t// IE8 black screen bug fix\n\t\t\t\tif(mfp.isIE8) {\n\t\t\t\t\tel.css('display', isShowing ? 'block' : 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n$.magnificPopup.registerModule(IFRAME_NS, {\n\n\toptions: {\n\t\tmarkup: '<div class=\"mfp-iframe-scaler\">'+\n\t\t\t\t\t'<div class=\"mfp-close\"></div>'+\n\t\t\t\t\t'<iframe class=\"mfp-iframe\" src=\"//about:blank\" frameborder=\"0\" allowfullscreen></iframe>'+\n\t\t\t\t'</div>',\n\n\t\tsrcAction: 'iframe_src',\n\n\t\t// we don't care and support only one default type of URL by default\n\t\tpatterns: {\n\t\t\tyoutube: {\n\t\t\t\tindex: 'youtube.com', \n\t\t\t\tid: 'v=', \n\t\t\t\tsrc: '//www.youtube.com/embed/%id%?autoplay=1'\n\t\t\t},\n\t\t\tvimeo: {\n\t\t\t\tindex: 'vimeo.com/',\n\t\t\t\tid: '/',\n\t\t\t\tsrc: '//player.vimeo.com/video/%id%?autoplay=1'\n\t\t\t},\n\t\t\tgmaps: {\n\t\t\t\tindex: '//maps.google.',\n\t\t\t\tsrc: '%id%&output=embed'\n\t\t\t}\n\t\t}\n\t},\n\n\tproto: {\n\t\tinitIframe: function() {\n\t\t\tmfp.types.push(IFRAME_NS);\n\n\t\t\t_mfpOn('BeforeChange', function(e, prevType, newType) {\n\t\t\t\tif(prevType !== newType) {\n\t\t\t\t\tif(prevType === IFRAME_NS) {\n\t\t\t\t\t\t_fixIframeBugs(); // iframe if removed\n\t\t\t\t\t} else if(newType === IFRAME_NS) {\n\t\t\t\t\t\t_fixIframeBugs(true); // iframe is showing\n\t\t\t\t\t} \n\t\t\t\t}// else {\n\t\t\t\t\t// iframe source is switched, don't do anything\n\t\t\t\t//}\n\t\t\t});\n\n\t\t\t_mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {\n\t\t\t\t_fixIframeBugs();\n\t\t\t});\n\t\t},\n\n\t\tgetIframe: function(item, template) {\n\t\t\tvar embedSrc = item.src;\n\t\t\tvar iframeSt = mfp.st.iframe;\n\t\t\t\t\n\t\t\t$.each(iframeSt.patterns, function() {\n\t\t\t\tif(embedSrc.indexOf( this.index ) > -1) {\n\t\t\t\t\tif(this.id) {\n\t\t\t\t\t\tif(typeof this.id === 'string') {\n\t\t\t\t\t\t\tembedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tembedSrc = this.id.call( this, embedSrc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tembedSrc = this.src.replace('%id%', embedSrc );\n\t\t\t\t\treturn false; // break;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tvar dataObj = {};\n\t\t\tif(iframeSt.srcAction) {\n\t\t\t\tdataObj[iframeSt.srcAction] = embedSrc;\n\t\t\t}\n\t\t\tmfp._parseMarkup(template, dataObj, item);\n\n\t\t\tmfp.updateStatus('ready');\n\n\t\t\treturn template;\n\t\t}\n\t}\n});\n\n\n\n/*>>iframe*/\n\n/*>>gallery*/\n/**\n * Get looped index depending on number of slides\n */\nvar _getLoopedId = function(index) {\n\t\tvar numSlides = mfp.items.length;\n\t\tif(index > numSlides - 1) {\n\t\t\treturn index - numSlides;\n\t\t} else if(index < 0) {\n\t\t\treturn numSlides + index;\n\t\t}\n\t\treturn index;\n\t},\n\t_replaceCurrTotal = function(text, curr, total) {\n\t\treturn text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);\n\t};\n\n$.magnificPopup.registerModule('gallery', {\n\n\toptions: {\n\t\tenabled: false,\n\t\tarrowMarkup: '<button title=\"%title%\" type=\"button\" class=\"mfp-arrow mfp-arrow-%dir%\"></button>',\n\t\tpreload: [0,2],\n\t\tnavigateByImgClick: true,\n\t\tarrows: true,\n\n\t\ttPrev: 'Previous (Left arrow key)',\n\t\ttNext: 'Next (Right arrow key)',\n\t\ttCounter: '%curr% of %total%'\n\t},\n\n\tproto: {\n\t\tinitGallery: function() {\n\n\t\t\tvar gSt = mfp.st.gallery,\n\t\t\t\tns = '.mfp-gallery',\n\t\t\t\tsupportsFastClick = Boolean($.fn.mfpFastClick);\n\n\t\t\tmfp.direction = true; // true - next, false - prev\n\t\t\t\n\t\t\tif(!gSt || !gSt.enabled ) return false;\n\n\t\t\t_wrapClasses += ' mfp-gallery';\n\n\t\t\t_mfpOn(OPEN_EVENT+ns, function() {\n\n\t\t\t\tif(gSt.navigateByImgClick) {\n\t\t\t\t\tmfp.wrap.on('click'+ns, '.mfp-img', function() {\n\t\t\t\t\t\tif(mfp.items.length > 1) {\n\t\t\t\t\t\t\tmfp.next();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t_document.on('keydown'+ns, function(e) {\n\t\t\t\t\tif (e.keyCode === 37) {\n\t\t\t\t\t\tmfp.prev();\n\t\t\t\t\t} else if (e.keyCode === 39) {\n\t\t\t\t\t\tmfp.next();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t_mfpOn('UpdateStatus'+ns, function(e, data) {\n\t\t\t\tif(data.text) {\n\t\t\t\t\tdata.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {\n\t\t\t\tvar l = mfp.items.length;\n\t\t\t\tvalues.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';\n\t\t\t});\n\n\t\t\t_mfpOn('BuildControls' + ns, function() {\n\t\t\t\tif(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {\n\t\t\t\t\tvar markup = gSt.arrowMarkup,\n\t\t\t\t\t\tarrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),\t\t\t\n\t\t\t\t\t\tarrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);\n\n\t\t\t\t\tvar eName = supportsFastClick ? 'mfpFastClick' : 'click';\n\t\t\t\t\tarrowLeft[eName](function() {\n\t\t\t\t\t\tmfp.prev();\n\t\t\t\t\t});\t\t\t\n\t\t\t\t\tarrowRight[eName](function() {\n\t\t\t\t\t\tmfp.next();\n\t\t\t\t\t});\t\n\n\t\t\t\t\t// Polyfill for :before and :after (adds elements with classes mfp-a and mfp-b)\n\t\t\t\t\tif(mfp.isIE7) {\n\t\t\t\t\t\t_getEl('b', arrowLeft[0], false, true);\n\t\t\t\t\t\t_getEl('a', arrowLeft[0], false, true);\n\t\t\t\t\t\t_getEl('b', arrowRight[0], false, true);\n\t\t\t\t\t\t_getEl('a', arrowRight[0], false, true);\n\t\t\t\t\t}\n\n\t\t\t\t\tmfp.container.append(arrowLeft.add(arrowRight));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_mfpOn(CHANGE_EVENT+ns, function() {\n\t\t\t\tif(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);\n\n\t\t\t\tmfp._preloadTimeout = setTimeout(function() {\n\t\t\t\t\tmfp.preloadNearbyImages();\n\t\t\t\t\tmfp._preloadTimeout = null;\n\t\t\t\t}, 16);\t\t\n\t\t\t});\n\n\n\t\t\t_mfpOn(CLOSE_EVENT+ns, function() {\n\t\t\t\t_document.off(ns);\n\t\t\t\tmfp.wrap.off('click'+ns);\n\t\t\t\n\t\t\t\tif(mfp.arrowLeft && supportsFastClick) {\n\t\t\t\t\tmfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick();\n\t\t\t\t}\n\t\t\t\tmfp.arrowRight = mfp.arrowLeft = null;\n\t\t\t});\n\n\t\t}, \n\t\tnext: function() {\n\t\t\tmfp.direction = true;\n\t\t\tmfp.index = _getLoopedId(mfp.index + 1);\n\t\t\tmfp.updateItemHTML();\n\t\t},\n\t\tprev: function() {\n\t\t\tmfp.direction = false;\n\t\t\tmfp.index = _getLoopedId(mfp.index - 1);\n\t\t\tmfp.updateItemHTML();\n\t\t},\n\t\tgoTo: function(newIndex) {\n\t\t\tmfp.direction = (newIndex >= mfp.index);\n\t\t\tmfp.index = newIndex;\n\t\t\tmfp.updateItemHTML();\n\t\t},\n\t\tpreloadNearbyImages: function() {\n\t\t\tvar p = mfp.st.gallery.preload,\n\t\t\t\tpreloadBefore = Math.min(p[0], mfp.items.length),\n\t\t\t\tpreloadAfter = Math.min(p[1], mfp.items.length),\n\t\t\t\ti;\n\n\t\t\tfor(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {\n\t\t\t\tmfp._preloadItem(mfp.index+i);\n\t\t\t}\n\t\t\tfor(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {\n\t\t\t\tmfp._preloadItem(mfp.index-i);\n\t\t\t}\n\t\t},\n\t\t_preloadItem: function(index) {\n\t\t\tindex = _getLoopedId(index);\n\n\t\t\tif(mfp.items[index].preloaded) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar item = mfp.items[index];\n\t\t\tif(!item.parsed) {\n\t\t\t\titem = mfp.parseEl( index );\n\t\t\t}\n\n\t\t\t_mfpTrigger('LazyLoad', item);\n\n\t\t\tif(item.type === 'image') {\n\t\t\t\titem.img = $('<img class=\"mfp-img\" />').on('load.mfploader', function() {\n\t\t\t\t\titem.hasSize = true;\n\t\t\t\t}).on('error.mfploader', function() {\n\t\t\t\t\titem.hasSize = true;\n\t\t\t\t\titem.loadError = true;\n\t\t\t\t\t_mfpTrigger('LazyLoadError', item);\n\t\t\t\t}).attr('src', item.src);\n\t\t\t}\n\n\n\t\t\titem.preloaded = true;\n\t\t}\n\t}\n});\n\n/*\nTouch Support that might be implemented some day\n\naddSwipeGesture: function() {\n\tvar startX,\n\t\tmoved,\n\t\tmultipleTouches;\n\n\t\treturn;\n\n\tvar namespace = '.mfp',\n\t\taddEventNames = function(pref, down, move, up, cancel) {\n\t\t\tmfp._tStart = pref + down + namespace;\n\t\t\tmfp._tMove = pref + move + namespace;\n\t\t\tmfp._tEnd = pref + up + namespace;\n\t\t\tmfp._tCancel = pref + cancel + namespace;\n\t\t};\n\n\tif(window.navigator.msPointerEnabled) {\n\t\taddEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');\n\t} else if('ontouchstart' in window) {\n\t\taddEventNames('touch', 'start', 'move', 'end', 'cancel');\n\t} else {\n\t\treturn;\n\t}\n\t_window.on(mfp._tStart, function(e) {\n\t\tvar oE = e.originalEvent;\n\t\tmultipleTouches = moved = false;\n\t\tstartX = oE.pageX || oE.changedTouches[0].pageX;\n\t}).on(mfp._tMove, function(e) {\n\t\tif(e.originalEvent.touches.length > 1) {\n\t\t\tmultipleTouches = e.originalEvent.touches.length;\n\t\t} else {\n\t\t\t//e.preventDefault();\n\t\t\tmoved = true;\n\t\t}\n\t}).on(mfp._tEnd + ' ' + mfp._tCancel, function(e) {\n\t\tif(moved && !multipleTouches) {\n\t\t\tvar oE = e.originalEvent,\n\t\t\t\tdiff = startX - (oE.pageX || oE.changedTouches[0].pageX);\n\n\t\t\tif(diff > 20) {\n\t\t\t\tmfp.next();\n\t\t\t} else if(diff < -20) {\n\t\t\t\tmfp.prev();\n\t\t\t}\n\t\t}\n\t});\n},\n*/\n\n\n/*>>gallery*/\n\n/*>>retina*/\n\nvar RETINA_NS = 'retina';\n\n$.magnificPopup.registerModule(RETINA_NS, {\n\toptions: {\n\t\treplaceSrc: function(item) {\n\t\t\treturn item.src.replace(/\\.\\w+$/, function(m) { return '@2x' + m; });\n\t\t},\n\t\tratio: 1 // Function or number. Set to 1 to disable.\n\t},\n\tproto: {\n\t\tinitRetina: function() {\n\t\t\tif(window.devicePixelRatio > 1) {\n\n\t\t\t\tvar st = mfp.st.retina,\n\t\t\t\t\tratio = st.ratio;\n\n\t\t\t\tratio = !isNaN(ratio) ? ratio : ratio();\n\n\t\t\t\tif(ratio > 1) {\n\t\t\t\t\t_mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {\n\t\t\t\t\t\titem.img.css({\n\t\t\t\t\t\t\t'max-width': item.img[0].naturalWidth / ratio,\n\t\t\t\t\t\t\t'width': '100%'\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\t_mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {\n\t\t\t\t\t\titem.src = st.replaceSrc(item, ratio);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n});\n\n/*>>retina*/\n\n/*>>fastclick*/\n/**\n * FastClick event implementation. (removes 300ms delay on touch devices)\n * Based on https://developers.google.com/mobile/articles/fast_buttons\n *\n * You may use it outside the Magnific Popup by calling just:\n *\n * $('.your-el').mfpFastClick(function() {\n * console.log('Clicked!');\n * });\n *\n * To unbind:\n * $('.your-el').destroyMfpFastClick();\n * \n * \n * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound.\n * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick\n * \n */\n\n(function() {\n\tvar ghostClickDelay = 1000,\n\t\tsupportsTouch = 'ontouchstart' in window,\n\t\tunbindTouchMove = function() {\n\t\t\t_window.off('touchmove'+ns+' touchend'+ns);\n\t\t},\n\t\teName = 'mfpFastClick',\n\t\tns = '.'+eName;\n\n\n\t// As Zepto.js doesn't have an easy way to add custom events (like jQuery), so we implement it in this way\n\t$.fn.mfpFastClick = function(callback) {\n\n\t\treturn $(this).each(function() {\n\n\t\t\tvar elem = $(this),\n\t\t\t\tlock;\n\n\t\t\tif( supportsTouch ) {\n\n\t\t\t\tvar timeout,\n\t\t\t\t\tstartX,\n\t\t\t\t\tstartY,\n\t\t\t\t\tpointerMoved,\n\t\t\t\t\tpoint,\n\t\t\t\t\tnumPointers;\n\n\t\t\t\telem.on('touchstart' + ns, function(e) {\n\t\t\t\t\tpointerMoved = false;\n\t\t\t\t\tnumPointers = 1;\n\n\t\t\t\t\tpoint = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0];\n\t\t\t\t\tstartX = point.clientX;\n\t\t\t\t\tstartY = point.clientY;\n\n\t\t\t\t\t_window.on('touchmove'+ns, function(e) {\n\t\t\t\t\t\tpoint = e.originalEvent ? e.originalEvent.touches : e.touches;\n\t\t\t\t\t\tnumPointers = point.length;\n\t\t\t\t\t\tpoint = point[0];\n\t\t\t\t\t\tif (Math.abs(point.clientX - startX) > 10 ||\n\t\t\t\t\t\t\tMath.abs(point.clientY - startY) > 10) {\n\t\t\t\t\t\t\tpointerMoved = true;\n\t\t\t\t\t\t\tunbindTouchMove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).on('touchend'+ns, function(e) {\n\t\t\t\t\t\tunbindTouchMove();\n\t\t\t\t\t\tif(pointerMoved || numPointers > 1) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlock = true;\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\t\ttimeout = setTimeout(function() {\n\t\t\t\t\t\t\tlock = false;\n\t\t\t\t\t\t}, ghostClickDelay);\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\telem.on('click' + ns, function() {\n\t\t\t\tif(!lock) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\n\t$.fn.destroyMfpFastClick = function() {\n\t\t$(this).off('touchstart' + ns + ' click' + ns);\n\t\tif(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns);\n\t};\n})();\n\n/*>>fastclick*/\n _checkInstance(); }));","/*!\n * numbro.js\n * version : 1.6.2\n * author : Företagsplatsen AB\n * license : MIT\n * http://www.foretagsplatsen.se\n */\n\n(function () {\n 'use strict';\n\n /************************************\n Constants\n ************************************/\n\n var numbro,\n VERSION = '1.6.2',\n // internal storage for culture config files\n cultures = {},\n // Todo: Remove in 2.0.0\n languages = cultures,\n currentCulture = 'en-US',\n zeroFormat = null,\n defaultFormat = '0,0',\n defaultCurrencyFormat = '0$',\n // check for nodeJS\n hasModule = (typeof module !== 'undefined' && module.exports),\n // default culture\n enUS = {\n delimiters: {\n thousands: ',',\n decimal: '.'\n },\n abbreviations: {\n thousand: 'k',\n million: 'm',\n billion: 'b',\n trillion: 't'\n },\n ordinal: function(number) {\n var b = number % 10;\n return (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n },\n currency: {\n symbol: '$',\n position: 'prefix'\n },\n defaults: {\n currencyFormat: ',0000 a'\n },\n formats: {\n fourDigits: '0000 a',\n fullWithTwoDecimals: '$ ,0.00',\n fullWithTwoDecimalsNoCurrency: ',0.00'\n }\n };\n\n /************************************\n Constructors\n ************************************/\n\n\n // Numbro prototype object\n function Numbro(number) {\n this._value = number;\n }\n\n function zeroes(count) {\n var i, ret = '';\n\n for (i = 0; i < count; i++) {\n ret += '0';\n }\n\n return ret;\n }\n /**\n * Implementation of toFixed() for numbers with exponent > 21\n *\n *\n */\n function toFixedLarge(value, precision) {\n var mantissa,\n beforeDec,\n afterDec,\n exponent,\n str;\n\n str = value.toString();\n\n mantissa = str.split('e')[0];\n exponent = str.split('e')[1];\n\n beforeDec = mantissa.split('.')[0];\n afterDec = mantissa.split('.')[1] || '';\n\n str = beforeDec + afterDec + zeroes(exponent - afterDec.length);\n if (precision > 0) {\n str += '.' + zeroes(precision);\n }\n\n return str;\n }\n\n /**\n * Implementation of toFixed() that treats floats more like decimals\n *\n * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present\n * problems for accounting- and finance-related software.\n */\n function toFixed(value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n\n if (value.toFixed(0).search('e') > -1) {\n // Above 1e21, toFixed returns scientific notation, which\n // is useless and unexpected\n output = toFixedLarge(value, precision);\n }\n else {\n //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value * power) / power).toFixed(precision);\n }\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }\n\n /************************************\n Formatting\n ************************************/\n\n // determine what type of formatting we need to do\n function formatNumbro(n, format, roundingFunction) {\n var output;\n\n // figure out what kind of format we are dealing with\n if (format.indexOf('$') > -1) { // currency!!!!!\n output = formatCurrency(n, format, roundingFunction);\n } else if (format.indexOf('%') > -1) { // percentage\n output = formatPercentage(n, format, roundingFunction);\n } else if (format.indexOf(':') > -1) { // time\n output = formatTime(n, format);\n } else { // plain ol' numbers or bytes\n output = formatNumber(n._value, format, roundingFunction);\n }\n\n // return string\n return output;\n }\n\n // revert to number\n function unformatNumbro(n, string) {\n var stringOriginal = string,\n thousandRegExp,\n millionRegExp,\n billionRegExp,\n trillionRegExp,\n binarySuffixes = ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'],\n decimalSuffixes = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n bytesMultiplier = false,\n power;\n\n if (string.indexOf(':') > -1) {\n n._value = unformatTime(string);\n } else {\n if (string === zeroFormat) {\n n._value = 0;\n } else {\n if (cultures[currentCulture].delimiters.decimal !== '.') {\n string = string.replace(/\\./g, '').replace(cultures[currentCulture].delimiters.decimal, '.');\n }\n\n // see if abbreviations are there so that we can multiply to the correct number\n thousandRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.thousand +\n '(?:\\\\)|(\\\\' + cultures[currentCulture].currency.symbol + ')?(?:\\\\))?)?$');\n millionRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.million +\n '(?:\\\\)|(\\\\' + cultures[currentCulture].currency.symbol + ')?(?:\\\\))?)?$');\n billionRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.billion +\n '(?:\\\\)|(\\\\' + cultures[currentCulture].currency.symbol + ')?(?:\\\\))?)?$');\n trillionRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.trillion +\n '(?:\\\\)|(\\\\' + cultures[currentCulture].currency.symbol + ')?(?:\\\\))?)?$');\n\n // see if bytes are there so that we can multiply to the correct number\n for (power = 0; power <= binarySuffixes.length && !bytesMultiplier; power++) {\n if (string.indexOf(binarySuffixes[power]) > -1) {\n bytesMultiplier = Math.pow(1024, power + 1);\n } else if (string.indexOf(decimalSuffixes[power]) > -1) {\n bytesMultiplier = Math.pow(1000, power + 1);\n }\n }\n\n // do some math to create our number\n n._value = ((bytesMultiplier) ? bytesMultiplier : 1) *\n ((stringOriginal.match(thousandRegExp)) ? Math.pow(10, 3) : 1) *\n ((stringOriginal.match(millionRegExp)) ? Math.pow(10, 6) : 1) *\n ((stringOriginal.match(billionRegExp)) ? Math.pow(10, 9) : 1) *\n ((stringOriginal.match(trillionRegExp)) ? Math.pow(10, 12) : 1) *\n ((string.indexOf('%') > -1) ? 0.01 : 1) *\n (((string.split('-').length +\n Math.min(string.split('(').length - 1, string.split(')').length - 1)) % 2) ? 1 : -1) *\n Number(string.replace(/[^0-9\\.]+/g, ''));\n\n // round if we are talking about bytes\n n._value = (bytesMultiplier) ? Math.ceil(n._value) : n._value;\n }\n }\n return n._value;\n }\n\n function formatCurrency(n, originalFormat, roundingFunction) {\n var format = originalFormat,\n symbolIndex = format.indexOf('$'),\n openParenIndex = format.indexOf('('),\n plusSignIndex = format.indexOf('+'),\n minusSignIndex = format.indexOf('-'),\n space = '',\n decimalSeparator = '',\n spliceIndex,\n output;\n\n if(format.indexOf('$') === -1){\n // Use defaults instead of the format provided\n if (cultures[currentCulture].currency.position === 'infix') {\n decimalSeparator = cultures[currentCulture].currency.symbol;\n if (cultures[currentCulture].currency.spaceSeparated) {\n decimalSeparator = ' ' + decimalSeparator + ' ';\n }\n } else if (cultures[currentCulture].currency.spaceSeparated) {\n space = ' ';\n }\n } else {\n // check for space before or after currency\n if (format.indexOf(' $') > -1) {\n space = ' ';\n format = format.replace(' $', '');\n } else if (format.indexOf('$ ') > -1) {\n space = ' ';\n format = format.replace('$ ', '');\n } else {\n format = format.replace('$', '');\n }\n }\n\n // Format The Number\n output = formatNumber(n._value, format, roundingFunction, decimalSeparator);\n\n if (originalFormat.indexOf('$') === -1) {\n // Use defaults instead of the format provided\n switch (cultures[currentCulture].currency.position) {\n case 'postfix':\n if (output.indexOf(')') > -1) {\n output = output.split('');\n output.splice(-1, 0, space + cultures[currentCulture].currency.symbol);\n output = output.join('');\n } else {\n output = output + space + cultures[currentCulture].currency.symbol;\n }\n break;\n case 'infix':\n break;\n case 'prefix':\n if (output.indexOf('(') > -1 || output.indexOf('-') > -1) {\n output = output.split('');\n spliceIndex = Math.max(openParenIndex, minusSignIndex) + 1;\n\n output.splice(spliceIndex, 0, cultures[currentCulture].currency.symbol + space);\n output = output.join('');\n } else {\n output = cultures[currentCulture].currency.symbol + space + output;\n }\n break;\n default:\n throw Error('Currency position should be among [\"prefix\", \"infix\", \"postfix\"]');\n }\n } else {\n // position the symbol\n if (symbolIndex <= 1) {\n if (output.indexOf('(') > -1 || output.indexOf('+') > -1 || output.indexOf('-') > -1) {\n output = output.split('');\n spliceIndex = 1;\n if (symbolIndex < openParenIndex || symbolIndex < plusSignIndex || symbolIndex < minusSignIndex) {\n // the symbol appears before the \"(\", \"+\" or \"-\"\n spliceIndex = 0;\n }\n output.splice(spliceIndex, 0, cultures[currentCulture].currency.symbol + space);\n output = output.join('');\n } else {\n output = cultures[currentCulture].currency.symbol + space + output;\n }\n } else {\n if (output.indexOf(')') > -1) {\n output = output.split('');\n output.splice(-1, 0, space + cultures[currentCulture].currency.symbol);\n output = output.join('');\n } else {\n output = output + space + cultures[currentCulture].currency.symbol;\n }\n }\n }\n\n return output;\n }\n\n function formatPercentage(n, format, roundingFunction) {\n var space = '',\n output,\n value = n._value * 100;\n\n // check for space before %\n if (format.indexOf(' %') > -1) {\n space = ' ';\n format = format.replace(' %', '');\n } else {\n format = format.replace('%', '');\n }\n\n output = formatNumber(value, format, roundingFunction);\n\n if (output.indexOf(')') > -1) {\n output = output.split('');\n output.splice(-1, 0, space + '%');\n output = output.join('');\n } else {\n output = output + space + '%';\n }\n\n return output;\n }\n\n function formatTime(n) {\n var hours = Math.floor(n._value / 60 / 60),\n minutes = Math.floor((n._value - (hours * 60 * 60)) / 60),\n seconds = Math.round(n._value - (hours * 60 * 60) - (minutes * 60));\n return hours + ':' +\n ((minutes < 10) ? '0' + minutes : minutes) + ':' +\n ((seconds < 10) ? '0' + seconds : seconds);\n }\n\n function unformatTime(string) {\n var timeArray = string.split(':'),\n seconds = 0;\n // turn hours and minutes into seconds and add them all up\n if (timeArray.length === 3) {\n // hours\n seconds = seconds + (Number(timeArray[0]) * 60 * 60);\n // minutes\n seconds = seconds + (Number(timeArray[1]) * 60);\n // seconds\n seconds = seconds + Number(timeArray[2]);\n } else if (timeArray.length === 2) {\n // minutes\n seconds = seconds + (Number(timeArray[0]) * 60);\n // seconds\n seconds = seconds + Number(timeArray[1]);\n }\n return Number(seconds);\n }\n\n function formatNumber (value, format, roundingFunction, sep) {\n var negP = false,\n signed = false,\n optDec = false,\n abbr = '',\n i,\n abbrK = false, // force abbreviation to thousands\n abbrM = false, // force abbreviation to millions\n abbrB = false, // force abbreviation to billions\n abbrT = false, // force abbreviation to trillions\n abbrForce = false, // force abbreviation\n bytes = '',\n ord = '',\n abs = Math.abs(value),\n binarySuffixes = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'],\n decimalSuffixes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n min,\n max,\n power,\n totalLength,\n length,\n minimumPrecision,\n pow,\n w,\n intPrecision,\n precision,\n prefix,\n postfix,\n thousands,\n d = '',\n forcedNeg = false,\n neg = false,\n indexOpenP,\n size,\n indexMinus,\n paren = '',\n minlen;\n\n // check if number is zero and a custom zero format has been set\n if (value === 0 && zeroFormat !== null) {\n return zeroFormat;\n }\n\n if (!isFinite(value)) {\n return '' + value;\n }\n\n if (format.indexOf('{') === 0) {\n var end = format.indexOf('}');\n if (end === -1) {\n throw Error('Format should also contain a \"}\"');\n }\n prefix = format.slice(1, end);\n format = format.slice(end + 1);\n } else {\n prefix = '';\n }\n\n if (format.indexOf('}') === format.length - 1) {\n var start = format.indexOf('{');\n if (start === -1) {\n throw Error('Format should also contain a \"{\"');\n }\n postfix = format.slice(start + 1, -1);\n format = format.slice(0, start + 1);\n } else {\n postfix = '';\n }\n\n // check for min length\n var info;\n if (format.indexOf('.') === -1) {\n info = format.match(/([0-9]+).*/);\n } else {\n info = format.match(/([0-9]+)\\..*/);\n }\n minlen = info === null ? -1 : info[1].length;\n\n // see if we should use parentheses for negative number or if we should prefix with a sign\n // if both are present we default to parentheses\n if (format.indexOf('-') !== -1) {\n forcedNeg = true;\n }\n if (format.indexOf('(') > -1) {\n negP = true;\n format = format.slice(1, -1);\n } else if (format.indexOf('+') > -1) {\n signed = true;\n format = format.replace(/\\+/g, '');\n }\n\n // see if abbreviation is wanted\n if (format.indexOf('a') > -1) {\n intPrecision = format.split('.')[0].match(/[0-9]+/g) || ['0'];\n intPrecision = parseInt(intPrecision[0], 10);\n\n // check if abbreviation is specified\n abbrK = format.indexOf('aK') >= 0;\n abbrM = format.indexOf('aM') >= 0;\n abbrB = format.indexOf('aB') >= 0;\n abbrT = format.indexOf('aT') >= 0;\n abbrForce = abbrK || abbrM || abbrB || abbrT;\n\n // check for space before abbreviation\n if (format.indexOf(' a') > -1) {\n abbr = ' ';\n format = format.replace(' a', '');\n } else {\n format = format.replace('a', '');\n }\n\n totalLength = Math.floor(Math.log(abs) / Math.LN10) + 1;\n\n minimumPrecision = totalLength % 3;\n minimumPrecision = minimumPrecision === 0 ? 3 : minimumPrecision;\n\n if (intPrecision && abs !== 0) {\n\n length = Math.floor(Math.log(abs) / Math.LN10) + 1 - intPrecision;\n\n pow = 3 * ~~((Math.min(intPrecision, totalLength) - minimumPrecision) / 3);\n\n abs = abs / Math.pow(10, pow);\n\n if (format.indexOf('.') === -1 && intPrecision > 3) {\n format += '[.]';\n\n size = length === 0 ? 0 : 3 * ~~(length / 3) - length;\n size = size < 0 ? size + 3 : size;\n\n for (i = 0; i < size; i++) {\n format += '0';\n }\n }\n }\n\n if (Math.floor(Math.log(Math.abs(value)) / Math.LN10) + 1 !== intPrecision) {\n if (abs >= Math.pow(10, 12) && !abbrForce || abbrT) {\n // trillion\n abbr = abbr + cultures[currentCulture].abbreviations.trillion;\n value = value / Math.pow(10, 12);\n } else if (abs < Math.pow(10, 12) && abs >= Math.pow(10, 9) && !abbrForce || abbrB) {\n // billion\n abbr = abbr + cultures[currentCulture].abbreviations.billion;\n value = value / Math.pow(10, 9);\n } else if (abs < Math.pow(10, 9) && abs >= Math.pow(10, 6) && !abbrForce || abbrM) {\n // million\n abbr = abbr + cultures[currentCulture].abbreviations.million;\n value = value / Math.pow(10, 6);\n } else if (abs < Math.pow(10, 6) && abs >= Math.pow(10, 3) && !abbrForce || abbrK) {\n // thousand\n abbr = abbr + cultures[currentCulture].abbreviations.thousand;\n value = value / Math.pow(10, 3);\n }\n }\n }\n\n // see if we are formatting binary bytes\n if (format.indexOf('b') > -1) {\n // check for space before\n if (format.indexOf(' b') > -1) {\n bytes = ' ';\n format = format.replace(' b', '');\n } else {\n format = format.replace('b', '');\n }\n\n for (power = 0; power <= binarySuffixes.length; power++) {\n min = Math.pow(1024, power);\n max = Math.pow(1024, power + 1);\n\n if (value >= min && value < max) {\n bytes = bytes + binarySuffixes[power];\n if (min > 0) {\n value = value / min;\n }\n break;\n }\n }\n }\n\n // see if we are formatting decimal bytes\n if (format.indexOf('d') > -1) {\n // check for space before\n if (format.indexOf(' d') > -1) {\n bytes = ' ';\n format = format.replace(' d', '');\n } else {\n format = format.replace('d', '');\n }\n\n for (power = 0; power <= decimalSuffixes.length; power++) {\n min = Math.pow(1000, power);\n max = Math.pow(1000, power + 1);\n\n if (value >= min && value < max) {\n bytes = bytes + decimalSuffixes[power];\n if (min > 0) {\n value = value / min;\n }\n break;\n }\n }\n }\n\n // see if ordinal is wanted\n if (format.indexOf('o') > -1) {\n // check for space before\n if (format.indexOf(' o') > -1) {\n ord = ' ';\n format = format.replace(' o', '');\n } else {\n format = format.replace('o', '');\n }\n\n if (cultures[currentCulture].ordinal) {\n ord = ord + cultures[currentCulture].ordinal(value);\n }\n }\n\n if (format.indexOf('[.]') > -1) {\n optDec = true;\n format = format.replace('[.]', '.');\n }\n\n w = value.toString().split('.')[0];\n precision = format.split('.')[1];\n thousands = format.indexOf(',');\n\n if (precision) {\n if (precision.indexOf('*') !== -1) {\n d = toFixed(value, value.toString().split('.')[1].length, roundingFunction);\n } else {\n if (precision.indexOf('[') > -1) {\n precision = precision.replace(']', '');\n precision = precision.split('[');\n d = toFixed(value, (precision[0].length + precision[1].length), roundingFunction,\n precision[1].length);\n } else {\n d = toFixed(value, precision.length, roundingFunction);\n }\n }\n\n w = d.split('.')[0];\n\n if (d.split('.')[1].length) {\n var p = sep ? abbr + sep : cultures[currentCulture].delimiters.decimal;\n d = p + d.split('.')[1];\n } else {\n d = '';\n }\n\n if (optDec && Number(d.slice(1)) === 0) {\n d = '';\n }\n } else {\n w = toFixed(value, null, roundingFunction);\n }\n\n // format number\n if (w.indexOf('-') > -1) {\n w = w.slice(1);\n neg = true;\n }\n\n if (w.length < minlen) {\n w = new Array(minlen - w.length + 1).join('0') + w;\n }\n\n if (thousands > -1) {\n w = w.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1' +\n cultures[currentCulture].delimiters.thousands);\n }\n\n if (format.indexOf('.') === 0) {\n w = '';\n }\n\n indexOpenP = format.indexOf('(');\n indexMinus = format.indexOf('-');\n\n if (indexOpenP < indexMinus) {\n paren = ((negP && neg) ? '(' : '') + (((forcedNeg && neg) || (!negP && neg)) ? '-' : '');\n } else {\n paren = (((forcedNeg && neg) || (!negP && neg)) ? '-' : '') + ((negP && neg) ? '(' : '');\n }\n\n return prefix +\n paren + ((!neg && signed && value !== 0) ? '+' : '') +\n w + d +\n ((ord) ? ord : '') +\n ((abbr && !sep) ? abbr : '') +\n ((bytes) ? bytes : '') +\n ((negP && neg) ? ')' : '') +\n postfix;\n }\n\n /************************************\n Top Level Functions\n ************************************/\n\n numbro = function(input) {\n if (numbro.isNumbro(input)) {\n input = input.value();\n } else if (input === 0 || typeof input === 'undefined') {\n input = 0;\n } else if (!Number(input)) {\n input = numbro.fn.unformat(input);\n }\n\n return new Numbro(Number(input));\n };\n\n // version number\n numbro.version = VERSION;\n\n // compare numbro object\n numbro.isNumbro = function(obj) {\n return obj instanceof Numbro;\n };\n\n /**\n * This function allow the user to set a new language with a fallback if\n * the language does not exist. If no fallback language is provided,\n * it fallbacks to english.\n *\n * @deprecated Since in version 1.6.0. It will be deleted in version 2.0\n * `setCulture` should be used instead.\n */\n numbro.setLanguage = function(newLanguage, fallbackLanguage) {\n console.warn('`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead');\n var key = newLanguage,\n prefix = newLanguage.split('-')[0],\n matchingLanguage = null;\n if (!languages[key]) {\n Object.keys(languages).forEach(function(language) {\n if (!matchingLanguage && language.split('-')[0] === prefix) {\n matchingLanguage = language;\n }\n });\n key = matchingLanguage || fallbackLanguage || 'en-US';\n }\n chooseCulture(key);\n };\n\n /**\n * This function allow the user to set a new culture with a fallback if\n * the culture does not exist. If no fallback culture is provided,\n * it fallbacks to \"en-US\".\n */\n numbro.setCulture = function(newCulture, fallbackCulture) {\n var key = newCulture,\n suffix = newCulture.split('-')[1],\n matchingCulture = null;\n if (!cultures[key]) {\n if (suffix) {\n Object.keys(cultures).forEach(function(language) {\n if (!matchingCulture && language.split('-')[1] === suffix) {\n matchingCulture = language;\n }\n });\n }\n\n key = matchingCulture || fallbackCulture || 'en-US';\n }\n chooseCulture(key);\n };\n\n /**\n * This function will load languages and then set the global language. If\n * no arguments are passed in, it will simply return the current global\n * language key.\n *\n * @deprecated Since in version 1.6.0. It will be deleted in version 2.0\n * `culture` should be used instead.\n */\n numbro.language = function(key, values) {\n console.warn('`language` is deprecated since version 1.6.0. Use `culture` instead');\n\n if (!key) {\n return currentCulture;\n }\n\n if (key && !values) {\n if (!languages[key]) {\n throw new Error('Unknown language : ' + key);\n }\n chooseCulture(key);\n }\n\n if (values || !languages[key]) {\n setCulture(key, values);\n }\n\n return numbro;\n };\n\n /**\n * This function will load cultures and then set the global culture. If\n * no arguments are passed in, it will simply return the current global\n * culture code.\n */\n numbro.culture = function(code, values) {\n if (!code) {\n return currentCulture;\n }\n\n if (code && !values) {\n if (!cultures[code]) {\n throw new Error('Unknown culture : ' + code);\n }\n chooseCulture(code);\n }\n\n if (values || !cultures[code]) {\n setCulture(code, values);\n }\n\n return numbro;\n };\n\n /**\n * This function provides access to the loaded language data. If\n * no arguments are passed in, it will simply return the current\n * global language object.\n *\n * @deprecated Since in version 1.6.0. It will be deleted in version 2.0\n * `culture` should be used instead.\n */\n numbro.languageData = function(key) {\n console.warn('`languageData` is deprecated since version 1.6.0. Use `cultureData` instead');\n\n if (!key) {\n return languages[currentCulture];\n }\n\n if (!languages[key]) {\n throw new Error('Unknown language : ' + key);\n }\n\n return languages[key];\n };\n\n /**\n * This function provides access to the loaded culture data. If\n * no arguments are passed in, it will simply return the current\n * global culture object.\n */\n numbro.cultureData = function(code) {\n if (!code) {\n return cultures[currentCulture];\n }\n\n if (!cultures[code]) {\n throw new Error('Unknown culture : ' + code);\n }\n\n return cultures[code];\n };\n\n numbro.culture('en-US', enUS);\n\n /**\n * @deprecated Since in version 1.6.0. It will be deleted in version 2.0\n * `cultures` should be used instead.\n */\n numbro.languages = function() {\n console.warn('`languages` is deprecated since version 1.6.0. Use `cultures` instead');\n\n return languages;\n };\n\n numbro.cultures = function() {\n return cultures;\n };\n\n numbro.zeroFormat = function(format) {\n zeroFormat = typeof(format) === 'string' ? format : null;\n };\n\n numbro.defaultFormat = function(format) {\n defaultFormat = typeof(format) === 'string' ? format : '0.0';\n };\n\n numbro.defaultCurrencyFormat = function (format) {\n defaultCurrencyFormat = typeof(format) === 'string' ? format : '0$';\n };\n\n numbro.validate = function(val, culture) {\n\n var _decimalSep,\n _thousandSep,\n _currSymbol,\n _valArray,\n _abbrObj,\n _thousandRegEx,\n cultureData,\n temp;\n\n //coerce val to string\n if (typeof val !== 'string') {\n val += '';\n if (console.warn) {\n console.warn('Numbro.js: Value is not string. It has been co-erced to: ', val);\n }\n }\n\n //trim whitespaces from either sides\n val = val.trim();\n\n //if val is just digits return true\n if ( !! val.match(/^\\d+$/)) {\n return true;\n }\n\n //if val is empty return false\n if (val === '') {\n return false;\n }\n\n //get the decimal and thousands separator from numbro.cultureData\n try {\n //check if the culture is understood by numbro. if not, default it to current culture\n cultureData = numbro.cultureData(culture);\n } catch (e) {\n cultureData = numbro.cultureData(numbro.culture());\n }\n\n //setup the delimiters and currency symbol based on culture\n _currSymbol = cultureData.currency.symbol;\n _abbrObj = cultureData.abbreviations;\n _decimalSep = cultureData.delimiters.decimal;\n if (cultureData.delimiters.thousands === '.') {\n _thousandSep = '\\\\.';\n } else {\n _thousandSep = cultureData.delimiters.thousands;\n }\n\n // validating currency symbol\n temp = val.match(/^[^\\d]+/);\n if (temp !== null) {\n val = val.substr(1);\n if (temp[0] !== _currSymbol) {\n return false;\n }\n }\n\n //validating abbreviation symbol\n temp = val.match(/[^\\d]+$/);\n if (temp !== null) {\n val = val.slice(0, -1);\n if (temp[0] !== _abbrObj.thousand && temp[0] !== _abbrObj.million &&\n temp[0] !== _abbrObj.billion && temp[0] !== _abbrObj.trillion) {\n return false;\n }\n }\n\n _thousandRegEx = new RegExp(_thousandSep + '{2}');\n\n if (!val.match(/[^\\d.,]/g)) {\n _valArray = val.split(_decimalSep);\n if (_valArray.length > 2) {\n return false;\n } else {\n if (_valArray.length < 2) {\n return ( !! _valArray[0].match(/^\\d+.*\\d$/) && !_valArray[0].match(_thousandRegEx));\n } else {\n if (_valArray[0].length === 1) {\n return ( !! _valArray[0].match(/^\\d+$/) &&\n !_valArray[0].match(_thousandRegEx) &&\n !! _valArray[1].match(/^\\d+$/));\n } else {\n return ( !! _valArray[0].match(/^\\d+.*\\d$/) &&\n !_valArray[0].match(_thousandRegEx) &&\n !! _valArray[1].match(/^\\d+$/));\n }\n }\n }\n }\n\n return false;\n };\n\n numbro.includeLocalesInNode = function(culturesPath, culture) {\n if (!inNodejsRuntime()) {\n return;\n }\n\n var path = require('path');\n\n culture.forEach(function(langLocaleCode) {\n var culture = require(path.join(__dirname, culturesPath, langLocaleCode));\n numbro.culture(culture.langLocaleCode, culture);\n });\n };\n\n /**\n * * @deprecated Since in version 1.6.0. It will be deleted in version 2.0\n * `loadCulturesInNode` should be used instead.\n */\n numbro.loadLanguagesInNode = function(languagesPath) {\n console.warn('`loadLanguagesInNode` is deprecated since version 1.6.0. Use `loadCulturesInNode` instead');\n\n if (!inNodejsRuntime()) {\n return;\n }\n\n var fs = require('fs');\n var path = require('path');\n\n var langFiles = fs.readdirSync(path.join(__dirname, languagesPath));\n\n numbro.includeLocalesInNode(languagesPath, langFiles);\n };\n\n numbro.loadCulturesInNode = function(culturesPath) {\n if (!inNodejsRuntime()) {\n return;\n }\n\n var fs = require('fs');\n var path = require('path');\n\n var langFiles = fs.readdirSync(path.join(__dirname, culturesPath));\n\n numbro.includeLocalesInNode(culturesPath, langFiles);\n };\n\n /************************************\n Helpers\n ************************************/\n\n function setCulture(code, values) {\n cultures[code] = values;\n }\n\n function chooseCulture(code) {\n currentCulture = code;\n var defaults = cultures[code].defaults;\n if (defaults && defaults.format) {\n numbro.defaultFormat(defaults.format);\n }\n if (defaults && defaults.currencyFormat) {\n numbro.defaultCurrencyFormat(defaults.currencyFormat);\n }\n }\n\n function inNodejsRuntime() {\n return (typeof process !== 'undefined') &&\n (process.browser === undefined) &&\n (process.title === 'node' || process.title === 'grunt');\n }\n\n /************************************\n Floating-point helpers\n ************************************/\n\n // The floating-point helper functions and implementation\n // borrows heavily from sinful.js: http://guipn.github.io/sinful.js/\n\n /**\n * Array.prototype.reduce for browsers that don't support it\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce#Compatibility\n */\n if ('function' !== typeof Array.prototype.reduce) {\n Array.prototype.reduce = function(callback, optInitialValue) {\n\n if (null === this || 'undefined' === typeof this) {\n // At the moment all modern browsers, that support strict mode, have\n // native implementation of Array.prototype.reduce. For instance, IE8\n // does not support strict mode, so this check is actually useless.\n throw new TypeError('Array.prototype.reduce called on null or undefined');\n }\n\n if ('function' !== typeof callback) {\n throw new TypeError(callback + ' is not a function');\n }\n\n var index,\n value,\n length = this.length >>> 0,\n isValueSet = false;\n\n if (1 < arguments.length) {\n value = optInitialValue;\n isValueSet = true;\n }\n\n for (index = 0; length > index; ++index) {\n if (this.hasOwnProperty(index)) {\n if (isValueSet) {\n value = callback(value, this[index], index, this);\n } else {\n value = this[index];\n isValueSet = true;\n }\n }\n }\n\n if (!isValueSet) {\n throw new TypeError('Reduce of empty array with no initial value');\n }\n\n return value;\n };\n }\n\n\n /**\n * Computes the multiplier necessary to make x >= 1,\n * effectively eliminating miscalculations caused by\n * finite precision.\n */\n function multiplier(x) {\n var parts = x.toString().split('.');\n if (parts.length < 2) {\n return 1;\n }\n return Math.pow(10, parts[1].length);\n }\n\n /**\n * Given a variable number of arguments, returns the maximum\n * multiplier that must be used to normalize an operation involving\n * all of them.\n */\n function correctionFactor() {\n var args = Array.prototype.slice.call(arguments);\n return args.reduce(function(prev, next) {\n var mp = multiplier(prev),\n mn = multiplier(next);\n return mp > mn ? mp : mn;\n }, -Infinity);\n }\n\n /************************************\n Numbro Prototype\n ************************************/\n\n\n numbro.fn = Numbro.prototype = {\n\n clone: function() {\n return numbro(this);\n },\n\n format: function(inputString, roundingFunction) {\n return formatNumbro(this,\n inputString ? inputString : defaultFormat,\n (roundingFunction !== undefined) ? roundingFunction : Math.round\n );\n },\n\n formatCurrency: function(inputString, roundingFunction) {\n return formatCurrency(this,\n inputString ? inputString : defaultCurrencyFormat,\n (roundingFunction !== undefined) ? roundingFunction : Math.round\n );\n },\n\n unformat: function(inputString) {\n if (Object.prototype.toString.call(inputString) === '[object Number]') {\n return inputString;\n }\n return unformatNumbro(this, inputString ? inputString : defaultFormat);\n },\n\n value: function() {\n return this._value;\n },\n\n valueOf: function() {\n return this._value;\n },\n\n set: function(value) {\n this._value = Number(value);\n return this;\n },\n\n add: function(value) {\n var corrFactor = correctionFactor.call(null, this._value, value);\n\n function cback(accum, curr) {\n return accum + corrFactor * curr;\n }\n this._value = [this._value, value].reduce(cback, 0) / corrFactor;\n return this;\n },\n\n subtract: function(value) {\n var corrFactor = correctionFactor.call(null, this._value, value);\n\n function cback(accum, curr) {\n return accum - corrFactor * curr;\n }\n this._value = [value].reduce(cback, this._value * corrFactor) / corrFactor;\n return this;\n },\n\n multiply: function(value) {\n function cback(accum, curr) {\n var corrFactor = correctionFactor(accum, curr),\n result = accum * corrFactor;\n result *= curr * corrFactor;\n result /= corrFactor * corrFactor;\n return result;\n }\n this._value = [this._value, value].reduce(cback, 1);\n return this;\n },\n\n divide: function(value) {\n function cback(accum, curr) {\n var corrFactor = correctionFactor(accum, curr);\n return (accum * corrFactor) / (curr * corrFactor);\n }\n this._value = [this._value, value].reduce(cback);\n return this;\n },\n\n difference: function(value) {\n return Math.abs(numbro(this._value).subtract(value).value());\n }\n\n };\n\n /************************************\n Exposing Numbro\n ************************************/\n\n // CommonJS module is defined\n if (hasModule) {\n module.exports = numbro;\n }\n\n //Todo: Rename the folder in 2.0.0\n numbro.loadCulturesInNode('languages');\n\n /*global ender:false */\n if (typeof ender === 'undefined') {\n // here, `this` means `window` in the browser, or `global` on the server\n // add `numbro` as a global object via a string identifier,\n // for Closure Compiler 'advanced' mode\n this.numbro = numbro;\n }\n\n /*global define:false */\n if (typeof define === 'function' && define.amd) {\n define([], function() {\n return numbro;\n });\n }\n\n}.call(typeof window === 'undefined' ? this : window));\n","// vim:ts=4:sts=4:sw=4:\n/*!\n *\n * Copyright 2009-2012 Kris Kowal under the terms of the MIT\n * license found at http://github.com/kriskowal/q/raw/master/LICENSE\n *\n * With parts by Tyler Close\n * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found\n * at http://www.opensource.org/licenses/mit-license.html\n * Forked at ref_send.js version: 2009-05-11\n *\n * With parts by Mark Miller\n * Copyright (C) 2011 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\n(function (definition) {\n // Turn off strict mode for this function so we can assign to global.Q\n /* jshint strict: false */\n\n // This file will function properly as a <script> tag, or a module\n // using CommonJS and NodeJS or RequireJS module formats. In\n // Common/Node/RequireJS, the module exports the Q API and when\n // executed as a simple <script>, it creates a Q global instead.\n\n // Montage Require\n if (typeof bootstrap === \"function\") {\n bootstrap(\"promise\", definition);\n\n // CommonJS\n } else if (typeof exports === \"object\") {\n module.exports = definition();\n\n // RequireJS\n } else if (typeof define === \"function\" && define.amd) {\n define(definition);\n\n // SES (Secure EcmaScript)\n } else if (typeof ses !== \"undefined\") {\n if (!ses.ok()) {\n return;\n } else {\n ses.makeQ = definition;\n }\n\n // <script>\n } else {\n Q = definition();\n }\n\n})(function () {\n\"use strict\";\n\nvar hasStacks = false;\ntry {\n throw new Error();\n} catch (e) {\n hasStacks = !!e.stack;\n}\n\n// All code after this point will be filtered from stack traces reported\n// by Q.\nvar qStartingLine = captureLine();\nvar qFileName;\n\n// shims\n\n// used for fallback in \"allResolved\"\nvar noop = function () {};\n\n// Use the fastest possible means to execute a task in a future turn\n// of the event loop.\nvar nextTick =(function () {\n // linked list of tasks (single, with head node)\n var head = {task: void 0, next: null};\n var tail = head;\n var flushing = false;\n var requestTick = void 0;\n var isNodeJS = false;\n\n function flush() {\n /* jshint loopfunc: true */\n\n while (head.next) {\n head = head.next;\n var task = head.task;\n head.task = void 0;\n var domain = head.domain;\n\n if (domain) {\n head.domain = void 0;\n domain.enter();\n }\n\n try {\n task();\n\n } catch (e) {\n if (isNodeJS) {\n // In node, uncaught exceptions are considered fatal errors.\n // Re-throw them synchronously to interrupt flushing!\n\n // Ensure continuation if the uncaught exception is suppressed\n // listening \"uncaughtException\" events (as domains does).\n // Continue in next event to avoid tick recursion.\n if (domain) {\n domain.exit();\n }\n setTimeout(flush, 0);\n if (domain) {\n domain.enter();\n }\n\n throw e;\n\n } else {\n // In browsers, uncaught exceptions are not fatal.\n // Re-throw them asynchronously to avoid slow-downs.\n setTimeout(function() {\n throw e;\n }, 0);\n }\n }\n\n if (domain) {\n domain.exit();\n }\n }\n\n flushing = false;\n }\n\n nextTick = function (task) {\n tail = tail.next = {\n task: task,\n domain: isNodeJS && process.domain,\n next: null\n };\n\n if (!flushing) {\n flushing = true;\n requestTick();\n }\n };\n\n if (typeof process !== \"undefined\" && process.nextTick) {\n // Node.js before 0.9. Note that some fake-Node environments, like the\n // Mocha test runner, introduce a `process` global without a `nextTick`.\n isNodeJS = true;\n\n requestTick = function () {\n process.nextTick(flush);\n };\n\n } else if (typeof setImmediate === \"function\") {\n // In IE10, Node.js 0.9+, or https://github.com/NobleJS/setImmediate\n if (typeof window !== \"undefined\") {\n requestTick = setImmediate.bind(window, flush);\n } else {\n requestTick = function () {\n setImmediate(flush);\n };\n }\n\n } else if (typeof MessageChannel !== \"undefined\") {\n // modern browsers\n // http://www.nonblocking.io/2011/06/windownexttick.html\n var channel = new MessageChannel();\n // At least Safari Version 6.0.5 (8536.30.1) intermittently cannot create\n // working message ports the first time a page loads.\n channel.port1.onmessage = function () {\n requestTick = requestPortTick;\n channel.port1.onmessage = flush;\n flush();\n };\n var requestPortTick = function () {\n // Opera requires us to provide a message payload, regardless of\n // whether we use it.\n channel.port2.postMessage(0);\n };\n requestTick = function () {\n setTimeout(flush, 0);\n requestPortTick();\n };\n\n } else {\n // old browsers\n requestTick = function () {\n setTimeout(flush, 0);\n };\n }\n\n return nextTick;\n})();\n\n// Attempt to make generics safe in the face of downstream\n// modifications.\n// There is no situation where this is necessary.\n// If you need a security guarantee, these primordials need to be\n// deeply frozen anyway, and if you don’t need a security guarantee,\n// this is just plain paranoid.\n// However, this **might** have the nice side-effect of reducing the size of\n// the minified code by reducing x.call() to merely x()\n// See Mark Miller’s explanation of what this does.\n// http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming\nvar call = Function.call;\nfunction uncurryThis(f) {\n return function () {\n return call.apply(f, arguments);\n };\n}\n// This is equivalent, but slower:\n// uncurryThis = Function_bind.bind(Function_bind.call);\n// http://jsperf.com/uncurrythis\n\nvar array_slice = uncurryThis(Array.prototype.slice);\n\nvar array_reduce = uncurryThis(\n Array.prototype.reduce || function (callback, basis) {\n var index = 0,\n length = this.length;\n // concerning the initial value, if one is not provided\n if (arguments.length === 1) {\n // seek to the first value in the array, accounting\n // for the possibility that is is a sparse array\n do {\n if (index in this) {\n basis = this[index++];\n break;\n }\n if (++index >= length) {\n throw new TypeError();\n }\n } while (1);\n }\n // reduce\n for (; index < length; index++) {\n // account for the possibility that the array is sparse\n if (index in this) {\n basis = callback(basis, this[index], index);\n }\n }\n return basis;\n }\n);\n\nvar array_indexOf = uncurryThis(\n Array.prototype.indexOf || function (value) {\n // not a very good shim, but good enough for our one use of it\n for (var i = 0; i < this.length; i++) {\n if (this[i] === value) {\n return i;\n }\n }\n return -1;\n }\n);\n\nvar array_map = uncurryThis(\n Array.prototype.map || function (callback, thisp) {\n var self = this;\n var collect = [];\n array_reduce(self, function (undefined, value, index) {\n collect.push(callback.call(thisp, value, index, self));\n }, void 0);\n return collect;\n }\n);\n\nvar object_create = Object.create || function (prototype) {\n function Type() { }\n Type.prototype = prototype;\n return new Type();\n};\n\nvar object_hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\n\nvar object_keys = Object.keys || function (object) {\n var keys = [];\n for (var key in object) {\n if (object_hasOwnProperty(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n};\n\nvar object_toString = uncurryThis(Object.prototype.toString);\n\nfunction isObject(value) {\n return value === Object(value);\n}\n\n// generator related shims\n\n// FIXME: Remove this function once ES6 generators are in SpiderMonkey.\nfunction isStopIteration(exception) {\n return (\n object_toString(exception) === \"[object StopIteration]\" ||\n exception instanceof QReturnValue\n );\n}\n\n// FIXME: Remove this helper and Q.return once ES6 generators are in\n// SpiderMonkey.\nvar QReturnValue;\nif (typeof ReturnValue !== \"undefined\") {\n QReturnValue = ReturnValue;\n} else {\n QReturnValue = function (value) {\n this.value = value;\n };\n}\n\n// long stack traces\n\nvar STACK_JUMP_SEPARATOR = \"From previous event:\";\n\nfunction makeStackTraceLong(error, promise) {\n // If possible, transform the error stack trace by removing Node and Q\n // cruft, then concatenating with the stack trace of `promise`. See #57.\n if (hasStacks &&\n promise.stack &&\n typeof error === \"object\" &&\n error !== null &&\n error.stack &&\n error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1\n ) {\n var stacks = [];\n for (var p = promise; !!p; p = p.source) {\n if (p.stack) {\n stacks.unshift(p.stack);\n }\n }\n stacks.unshift(error.stack);\n\n var concatedStacks = stacks.join(\"\\n\" + STACK_JUMP_SEPARATOR + \"\\n\");\n error.stack = filterStackString(concatedStacks);\n }\n}\n\nfunction filterStackString(stackString) {\n var lines = stackString.split(\"\\n\");\n var desiredLines = [];\n for (var i = 0; i < lines.length; ++i) {\n var line = lines[i];\n\n if (!isInternalFrame(line) && !isNodeFrame(line) && line) {\n desiredLines.push(line);\n }\n }\n return desiredLines.join(\"\\n\");\n}\n\nfunction isNodeFrame(stackLine) {\n return stackLine.indexOf(\"(module.js:\") !== -1 ||\n stackLine.indexOf(\"(node.js:\") !== -1;\n}\n\nfunction getFileNameAndLineNumber(stackLine) {\n // Named functions: \"at functionName (filename:lineNumber:columnNumber)\"\n // In IE10 function name can have spaces (\"Anonymous function\") O_o\n var attempt1 = /at .+ \\((.+):(\\d+):(?:\\d+)\\)$/.exec(stackLine);\n if (attempt1) {\n return [attempt1[1], Number(attempt1[2])];\n }\n\n // Anonymous functions: \"at filename:lineNumber:columnNumber\"\n var attempt2 = /at ([^ ]+):(\\d+):(?:\\d+)$/.exec(stackLine);\n if (attempt2) {\n return [attempt2[1], Number(attempt2[2])];\n }\n\n // Firefox style: \"function@filename:lineNumber or @filename:lineNumber\"\n var attempt3 = /.*@(.+):(\\d+)$/.exec(stackLine);\n if (attempt3) {\n return [attempt3[1], Number(attempt3[2])];\n }\n}\n\nfunction isInternalFrame(stackLine) {\n var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine);\n\n if (!fileNameAndLineNumber) {\n return false;\n }\n\n var fileName = fileNameAndLineNumber[0];\n var lineNumber = fileNameAndLineNumber[1];\n\n return fileName === qFileName &&\n lineNumber >= qStartingLine &&\n lineNumber <= qEndingLine;\n}\n\n// discover own file name and line number range for filtering stack\n// traces\nfunction captureLine() {\n if (!hasStacks) {\n return;\n }\n\n try {\n throw new Error();\n } catch (e) {\n var lines = e.stack.split(\"\\n\");\n var firstLine = lines[0].indexOf(\"@\") > 0 ? lines[1] : lines[2];\n var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\n if (!fileNameAndLineNumber) {\n return;\n }\n\n qFileName = fileNameAndLineNumber[0];\n return fileNameAndLineNumber[1];\n }\n}\n\nfunction deprecate(callback, name, alternative) {\n return function () {\n if (typeof console !== \"undefined\" &&\n typeof console.warn === \"function\") {\n console.warn(name + \" is deprecated, use \" + alternative +\n \" instead.\", new Error(\"\").stack);\n }\n return callback.apply(callback, arguments);\n };\n}\n\n// end of shims\n// beginning of real work\n\n/**\n * Constructs a promise for an immediate reference, passes promises through, or\n * coerces promises from different systems.\n * @param value immediate reference or promise\n */\nfunction Q(value) {\n // If the object is already a Promise, return it directly. This enables\n // the resolve function to both be used to created references from objects,\n // but to tolerably coerce non-promises to promises.\n if (isPromise(value)) {\n return value;\n }\n\n // assimilate thenables\n if (isPromiseAlike(value)) {\n return coerce(value);\n } else {\n return fulfill(value);\n }\n}\nQ.resolve = Q;\n\n/**\n * Performs a task in a future turn of the event loop.\n * @param {Function} task\n */\nQ.nextTick = nextTick;\n\n/**\n * Controls whether or not long stack traces will be on\n */\nQ.longStackSupport = false;\n\n/**\n * Constructs a {promise, resolve, reject} object.\n *\n * `resolve` is a callback to invoke with a more resolved value for the\n * promise. To fulfill the promise, invoke `resolve` with any value that is\n * not a thenable. To reject the promise, invoke `resolve` with a rejected\n * thenable, or invoke `reject` with the reason directly. To resolve the\n * promise to another thenable, thus putting it in the same state, invoke\n * `resolve` with that other thenable.\n */\nQ.defer = defer;\nfunction defer() {\n // if \"messages\" is an \"Array\", that indicates that the promise has not yet\n // been resolved. If it is \"undefined\", it has been resolved. Each\n // element of the messages array is itself an array of complete arguments to\n // forward to the resolved promise. We coerce the resolution value to a\n // promise using the `resolve` function because it handles both fully\n // non-thenable values and other thenables gracefully.\n var messages = [], progressListeners = [], resolvedPromise;\n\n var deferred = object_create(defer.prototype);\n var promise = object_create(Promise.prototype);\n\n promise.promiseDispatch = function (resolve, op, operands) {\n var args = array_slice(arguments);\n if (messages) {\n messages.push(args);\n if (op === \"when\" && operands[1]) { // progress operand\n progressListeners.push(operands[1]);\n }\n } else {\n nextTick(function () {\n resolvedPromise.promiseDispatch.apply(resolvedPromise, args);\n });\n }\n };\n\n // XXX deprecated\n promise.valueOf = function () {\n if (messages) {\n return promise;\n }\n var nearerValue = nearer(resolvedPromise);\n if (isPromise(nearerValue)) {\n resolvedPromise = nearerValue; // shorten chain\n }\n return nearerValue;\n };\n\n promise.inspect = function () {\n if (!resolvedPromise) {\n return { state: \"pending\" };\n }\n return resolvedPromise.inspect();\n };\n\n if (Q.longStackSupport && hasStacks) {\n try {\n throw new Error();\n } catch (e) {\n // NOTE: don't try to use `Error.captureStackTrace` or transfer the\n // accessor around; that causes memory leaks as per GH-111. Just\n // reify the stack trace as a string ASAP.\n //\n // At the same time, cut off the first line; it's always just\n // \"[object Promise]\\n\", as per the `toString`.\n promise.stack = e.stack.substring(e.stack.indexOf(\"\\n\") + 1);\n }\n }\n\n // NOTE: we do the checks for `resolvedPromise` in each method, instead of\n // consolidating them into `become`, since otherwise we'd create new\n // promises with the lines `become(whatever(value))`. See e.g. GH-252.\n\n function become(newPromise) {\n resolvedPromise = newPromise;\n promise.source = newPromise;\n\n array_reduce(messages, function (undefined, message) {\n nextTick(function () {\n newPromise.promiseDispatch.apply(newPromise, message);\n });\n }, void 0);\n\n messages = void 0;\n progressListeners = void 0;\n }\n\n deferred.promise = promise;\n deferred.resolve = function (value) {\n if (resolvedPromise) {\n return;\n }\n\n become(Q(value));\n };\n\n deferred.fulfill = function (value) {\n if (resolvedPromise) {\n return;\n }\n\n become(fulfill(value));\n };\n deferred.reject = function (reason) {\n if (resolvedPromise) {\n return;\n }\n\n become(reject(reason));\n };\n deferred.notify = function (progress) {\n if (resolvedPromise) {\n return;\n }\n\n array_reduce(progressListeners, function (undefined, progressListener) {\n nextTick(function () {\n progressListener(progress);\n });\n }, void 0);\n };\n\n return deferred;\n}\n\n/**\n * Creates a Node-style callback that will resolve or reject the deferred\n * promise.\n * @returns a nodeback\n */\ndefer.prototype.makeNodeResolver = function () {\n var self = this;\n return function (error, value) {\n if (error) {\n self.reject(error);\n } else if (arguments.length > 2) {\n self.resolve(array_slice(arguments, 1));\n } else {\n self.resolve(value);\n }\n };\n};\n\n/**\n * @param resolver {Function} a function that returns nothing and accepts\n * the resolve, reject, and notify functions for a deferred.\n * @returns a promise that may be resolved with the given resolve and reject\n * functions, or rejected by a thrown exception in resolver\n */\nQ.Promise = promise; // ES6\nQ.promise = promise;\nfunction promise(resolver) {\n if (typeof resolver !== \"function\") {\n throw new TypeError(\"resolver must be a function.\");\n }\n var deferred = defer();\n try {\n resolver(deferred.resolve, deferred.reject, deferred.notify);\n } catch (reason) {\n deferred.reject(reason);\n }\n return deferred.promise;\n}\n\npromise.race = race; // ES6\npromise.all = all; // ES6\npromise.reject = reject; // ES6\npromise.resolve = Q; // ES6\n\n// XXX experimental. This method is a way to denote that a local value is\n// serializable and should be immediately dispatched to a remote upon request,\n// instead of passing a reference.\nQ.passByCopy = function (object) {\n //freeze(object);\n //passByCopies.set(object, true);\n return object;\n};\n\nPromise.prototype.passByCopy = function () {\n //freeze(object);\n //passByCopies.set(object, true);\n return this;\n};\n\n/**\n * If two promises eventually fulfill to the same value, promises that value,\n * but otherwise rejects.\n * @param x {Any*}\n * @param y {Any*}\n * @returns {Any*} a promise for x and y if they are the same, but a rejection\n * otherwise.\n *\n */\nQ.join = function (x, y) {\n return Q(x).join(y);\n};\n\nPromise.prototype.join = function (that) {\n return Q([this, that]).spread(function (x, y) {\n if (x === y) {\n // TODO: \"===\" should be Object.is or equiv\n return x;\n } else {\n throw new Error(\"Can't join: not the same: \" + x + \" \" + y);\n }\n });\n};\n\n/**\n * Returns a promise for the first of an array of promises to become fulfilled.\n * @param answers {Array[Any*]} promises to race\n * @returns {Any*} the first promise to be fulfilled\n */\nQ.race = race;\nfunction race(answerPs) {\n return promise(function(resolve, reject) {\n // Switch to this once we can assume at least ES5\n // answerPs.forEach(function(answerP) {\n // Q(answerP).then(resolve, reject);\n // });\n // Use this in the meantime\n for (var i = 0, len = answerPs.length; i < len; i++) {\n Q(answerPs[i]).then(resolve, reject);\n }\n });\n}\n\nPromise.prototype.race = function () {\n return this.then(Q.race);\n};\n\n/**\n * Constructs a Promise with a promise descriptor object and optional fallback\n * function. The descriptor contains methods like when(rejected), get(name),\n * set(name, value), post(name, args), and delete(name), which all\n * return either a value, a promise for a value, or a rejection. The fallback\n * accepts the operation name, a resolver, and any further arguments that would\n * have been forwarded to the appropriate method above had a method been\n * provided with the proper name. The API makes no guarantees about the nature\n * of the returned object, apart from that it is usable whereever promises are\n * bought and sold.\n */\nQ.makePromise = Promise;\nfunction Promise(descriptor, fallback, inspect) {\n if (fallback === void 0) {\n fallback = function (op) {\n return reject(new Error(\n \"Promise does not support operation: \" + op\n ));\n };\n }\n if (inspect === void 0) {\n inspect = function () {\n return {state: \"unknown\"};\n };\n }\n\n var promise = object_create(Promise.prototype);\n\n promise.promiseDispatch = function (resolve, op, args) {\n var result;\n try {\n if (descriptor[op]) {\n result = descriptor[op].apply(promise, args);\n } else {\n result = fallback.call(promise, op, args);\n }\n } catch (exception) {\n result = reject(exception);\n }\n if (resolve) {\n resolve(result);\n }\n };\n\n promise.inspect = inspect;\n\n // XXX deprecated `valueOf` and `exception` support\n if (inspect) {\n var inspected = inspect();\n if (inspected.state === \"rejected\") {\n promise.exception = inspected.reason;\n }\n\n promise.valueOf = function () {\n var inspected = inspect();\n if (inspected.state === \"pending\" ||\n inspected.state === \"rejected\") {\n return promise;\n }\n return inspected.value;\n };\n }\n\n return promise;\n}\n\nPromise.prototype.toString = function () {\n return \"[object Promise]\";\n};\n\nPromise.prototype.then = function (fulfilled, rejected, progressed) {\n var self = this;\n var deferred = defer();\n var done = false; // ensure the untrusted promise makes at most a\n // single call to one of the callbacks\n\n function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }\n\n function _rejected(exception) {\n if (typeof rejected === \"function\") {\n makeStackTraceLong(exception, self);\n try {\n return rejected(exception);\n } catch (newException) {\n return reject(newException);\n }\n }\n return reject(exception);\n }\n\n function _progressed(value) {\n return typeof progressed === \"function\" ? progressed(value) : value;\n }\n\n nextTick(function () {\n self.promiseDispatch(function (value) {\n if (done) {\n return;\n }\n done = true;\n\n deferred.resolve(_fulfilled(value));\n }, \"when\", [function (exception) {\n if (done) {\n return;\n }\n done = true;\n\n deferred.resolve(_rejected(exception));\n }]);\n });\n\n // Progress propagator need to be attached in the current tick.\n self.promiseDispatch(void 0, \"when\", [void 0, function (value) {\n var newValue;\n var threw = false;\n try {\n newValue = _progressed(value);\n } catch (e) {\n threw = true;\n if (Q.onerror) {\n Q.onerror(e);\n } else {\n throw e;\n }\n }\n\n if (!threw) {\n deferred.notify(newValue);\n }\n }]);\n\n return deferred.promise;\n};\n\n/**\n * Registers an observer on a promise.\n *\n * Guarantees:\n *\n * 1. that fulfilled and rejected will be called only once.\n * 2. that either the fulfilled callback or the rejected callback will be\n * called, but not both.\n * 3. that fulfilled and rejected will not be called in this turn.\n *\n * @param value promise or immediate reference to observe\n * @param fulfilled function to be called with the fulfilled value\n * @param rejected function to be called with the rejection exception\n * @param progressed function to be called on any progress notifications\n * @return promise for the return value from the invoked callback\n */\nQ.when = when;\nfunction when(value, fulfilled, rejected, progressed) {\n return Q(value).then(fulfilled, rejected, progressed);\n}\n\nPromise.prototype.thenResolve = function (value) {\n return this.then(function () { return value; });\n};\n\nQ.thenResolve = function (promise, value) {\n return Q(promise).thenResolve(value);\n};\n\nPromise.prototype.thenReject = function (reason) {\n return this.then(function () { throw reason; });\n};\n\nQ.thenReject = function (promise, reason) {\n return Q(promise).thenReject(reason);\n};\n\n/**\n * If an object is not a promise, it is as \"near\" as possible.\n * If a promise is rejected, it is as \"near\" as possible too.\n * If it’s a fulfilled promise, the fulfillment value is nearer.\n * If it’s a deferred promise and the deferred has been resolved, the\n * resolution is \"nearer\".\n * @param object\n * @returns most resolved (nearest) form of the object\n */\n\n// XXX should we re-do this?\nQ.nearer = nearer;\nfunction nearer(value) {\n if (isPromise(value)) {\n var inspected = value.inspect();\n if (inspected.state === \"fulfilled\") {\n return inspected.value;\n }\n }\n return value;\n}\n\n/**\n * @returns whether the given object is a promise.\n * Otherwise it is a fulfilled value.\n */\nQ.isPromise = isPromise;\nfunction isPromise(object) {\n return isObject(object) &&\n typeof object.promiseDispatch === \"function\" &&\n typeof object.inspect === \"function\";\n}\n\nQ.isPromiseAlike = isPromiseAlike;\nfunction isPromiseAlike(object) {\n return isObject(object) && typeof object.then === \"function\";\n}\n\n/**\n * @returns whether the given object is a pending promise, meaning not\n * fulfilled or rejected.\n */\nQ.isPending = isPending;\nfunction isPending(object) {\n return isPromise(object) && object.inspect().state === \"pending\";\n}\n\nPromise.prototype.isPending = function () {\n return this.inspect().state === \"pending\";\n};\n\n/**\n * @returns whether the given object is a value or fulfilled\n * promise.\n */\nQ.isFulfilled = isFulfilled;\nfunction isFulfilled(object) {\n return !isPromise(object) || object.inspect().state === \"fulfilled\";\n}\n\nPromise.prototype.isFulfilled = function () {\n return this.inspect().state === \"fulfilled\";\n};\n\n/**\n * @returns whether the given object is a rejected promise.\n */\nQ.isRejected = isRejected;\nfunction isRejected(object) {\n return isPromise(object) && object.inspect().state === \"rejected\";\n}\n\nPromise.prototype.isRejected = function () {\n return this.inspect().state === \"rejected\";\n};\n\n//// BEGIN UNHANDLED REJECTION TRACKING\n\n// This promise library consumes exceptions thrown in handlers so they can be\n// handled by a subsequent promise. The exceptions get added to this array when\n// they are created, and removed when they are handled. Note that in ES6 or\n// shimmed environments, this would naturally be a `Set`.\nvar unhandledReasons = [];\nvar unhandledRejections = [];\nvar trackUnhandledRejections = true;\n\nfunction resetUnhandledRejections() {\n unhandledReasons.length = 0;\n unhandledRejections.length = 0;\n\n if (!trackUnhandledRejections) {\n trackUnhandledRejections = true;\n }\n}\n\nfunction trackRejection(promise, reason) {\n if (!trackUnhandledRejections) {\n return;\n }\n\n unhandledRejections.push(promise);\n if (reason && typeof reason.stack !== \"undefined\") {\n unhandledReasons.push(reason.stack);\n } else {\n unhandledReasons.push(\"(no stack) \" + reason);\n }\n}\n\nfunction untrackRejection(promise) {\n if (!trackUnhandledRejections) {\n return;\n }\n\n var at = array_indexOf(unhandledRejections, promise);\n if (at !== -1) {\n unhandledRejections.splice(at, 1);\n unhandledReasons.splice(at, 1);\n }\n}\n\nQ.resetUnhandledRejections = resetUnhandledRejections;\n\nQ.getUnhandledReasons = function () {\n // Make a copy so that consumers can't interfere with our internal state.\n return unhandledReasons.slice();\n};\n\nQ.stopUnhandledRejectionTracking = function () {\n resetUnhandledRejections();\n trackUnhandledRejections = false;\n};\n\nresetUnhandledRejections();\n\n//// END UNHANDLED REJECTION TRACKING\n\n/**\n * Constructs a rejected promise.\n * @param reason value describing the failure\n */\nQ.reject = reject;\nfunction reject(reason) {\n var rejection = Promise({\n \"when\": function (rejected) {\n // note that the error has been handled\n if (rejected) {\n untrackRejection(this);\n }\n return rejected ? rejected(reason) : this;\n }\n }, function fallback() {\n return this;\n }, function inspect() {\n return { state: \"rejected\", reason: reason };\n });\n\n // Note that the reason has not been handled.\n trackRejection(rejection, reason);\n\n return rejection;\n}\n\n/**\n * Constructs a fulfilled promise for an immediate reference.\n * @param value immediate reference\n */\nQ.fulfill = fulfill;\nfunction fulfill(value) {\n return Promise({\n \"when\": function () {\n return value;\n },\n \"get\": function (name) {\n return value[name];\n },\n \"set\": function (name, rhs) {\n value[name] = rhs;\n },\n \"delete\": function (name) {\n delete value[name];\n },\n \"post\": function (name, args) {\n // Mark Miller proposes that post with no name should apply a\n // promised function.\n if (name === null || name === void 0) {\n return value.apply(void 0, args);\n } else {\n return value[name].apply(value, args);\n }\n },\n \"apply\": function (thisp, args) {\n return value.apply(thisp, args);\n },\n \"keys\": function () {\n return object_keys(value);\n }\n }, void 0, function inspect() {\n return { state: \"fulfilled\", value: value };\n });\n}\n\n/**\n * Converts thenables to Q promises.\n * @param promise thenable promise\n * @returns a Q promise\n */\nfunction coerce(promise) {\n var deferred = defer();\n nextTick(function () {\n try {\n promise.then(deferred.resolve, deferred.reject, deferred.notify);\n } catch (exception) {\n deferred.reject(exception);\n }\n });\n return deferred.promise;\n}\n\n/**\n * Annotates an object such that it will never be\n * transferred away from this process over any promise\n * communication channel.\n * @param object\n * @returns promise a wrapping of that object that\n * additionally responds to the \"isDef\" message\n * without a rejection.\n */\nQ.master = master;\nfunction master(object) {\n return Promise({\n \"isDef\": function () {}\n }, function fallback(op, args) {\n return dispatch(object, op, args);\n }, function () {\n return Q(object).inspect();\n });\n}\n\n/**\n * Spreads the values of a promised array of arguments into the\n * fulfillment callback.\n * @param fulfilled callback that receives variadic arguments from the\n * promised array\n * @param rejected callback that receives the exception if the promise\n * is rejected.\n * @returns a promise for the return value or thrown exception of\n * either callback.\n */\nQ.spread = spread;\nfunction spread(value, fulfilled, rejected) {\n return Q(value).spread(fulfilled, rejected);\n}\n\nPromise.prototype.spread = function (fulfilled, rejected) {\n return this.all().then(function (array) {\n return fulfilled.apply(void 0, array);\n }, rejected);\n};\n\n/**\n * The async function is a decorator for generator functions, turning\n * them into asynchronous generators. Although generators are only part\n * of the newest ECMAScript 6 drafts, this code does not cause syntax\n * errors in older engines. This code should continue to work and will\n * in fact improve over time as the language improves.\n *\n * ES6 generators are currently part of V8 version 3.19 with the\n * --harmony-generators runtime flag enabled. SpiderMonkey has had them\n * for longer, but under an older Python-inspired form. This function\n * works on both kinds of generators.\n *\n * Decorates a generator function such that:\n * - it may yield promises\n * - execution will continue when that promise is fulfilled\n * - the value of the yield expression will be the fulfilled value\n * - it returns a promise for the return value (when the generator\n * stops iterating)\n * - the decorated function returns a promise for the return value\n * of the generator or the first rejected promise among those\n * yielded.\n * - if an error is thrown in the generator, it propagates through\n * every following yield until it is caught, or until it escapes\n * the generator function altogether, and is translated into a\n * rejection for the promise returned by the decorated generator.\n */\nQ.async = async;\nfunction async(makeGenerator) {\n return function () {\n // when verb is \"send\", arg is a value\n // when verb is \"throw\", arg is an exception\n function continuer(verb, arg) {\n var result;\n\n // Until V8 3.19 / Chromium 29 is released, SpiderMonkey is the only\n // engine that has a deployed base of browsers that support generators.\n // However, SM's generators use the Python-inspired semantics of\n // outdated ES6 drafts. We would like to support ES6, but we'd also\n // like to make it possible to use generators in deployed browsers, so\n // we also support Python-style generators. At some point we can remove\n // this block.\n\n if (typeof StopIteration === \"undefined\") {\n // ES6 Generators\n try {\n result = generator[verb](arg);\n } catch (exception) {\n return reject(exception);\n }\n if (result.done) {\n return result.value;\n } else {\n return when(result.value, callback, errback);\n }\n } else {\n // SpiderMonkey Generators\n // FIXME: Remove this case when SM does ES6 generators.\n try {\n result = generator[verb](arg);\n } catch (exception) {\n if (isStopIteration(exception)) {\n return exception.value;\n } else {\n return reject(exception);\n }\n }\n return when(result, callback, errback);\n }\n }\n var generator = makeGenerator.apply(this, arguments);\n var callback = continuer.bind(continuer, \"next\");\n var errback = continuer.bind(continuer, \"throw\");\n return callback();\n };\n}\n\n/**\n * The spawn function is a small wrapper around async that immediately\n * calls the generator and also ends the promise chain, so that any\n * unhandled errors are thrown instead of forwarded to the error\n * handler. This is useful because it's extremely common to run\n * generators at the top-level to work with libraries.\n */\nQ.spawn = spawn;\nfunction spawn(makeGenerator) {\n Q.done(Q.async(makeGenerator)());\n}\n\n// FIXME: Remove this interface once ES6 generators are in SpiderMonkey.\n/**\n * Throws a ReturnValue exception to stop an asynchronous generator.\n *\n * This interface is a stop-gap measure to support generator return\n * values in older Firefox/SpiderMonkey. In browsers that support ES6\n * generators like Chromium 29, just use \"return\" in your generator\n * functions.\n *\n * @param value the return value for the surrounding generator\n * @throws ReturnValue exception with the value.\n * @example\n * // ES6 style\n * Q.async(function* () {\n * var foo = yield getFooPromise();\n * var bar = yield getBarPromise();\n * return foo + bar;\n * })\n * // Older SpiderMonkey style\n * Q.async(function () {\n * var foo = yield getFooPromise();\n * var bar = yield getBarPromise();\n * Q.return(foo + bar);\n * })\n */\nQ[\"return\"] = _return;\nfunction _return(value) {\n throw new QReturnValue(value);\n}\n\n/**\n * The promised function decorator ensures that any promise arguments\n * are settled and passed as values (`this` is also settled and passed\n * as a value). It will also ensure that the result of a function is\n * always a promise.\n *\n * @example\n * var add = Q.promised(function (a, b) {\n * return a + b;\n * });\n * add(Q(a), Q(B));\n *\n * @param {function} callback The function to decorate\n * @returns {function} a function that has been decorated.\n */\nQ.promised = promised;\nfunction promised(callback) {\n return function () {\n return spread([this, all(arguments)], function (self, args) {\n return callback.apply(self, args);\n });\n };\n}\n\n/**\n * sends a message to a value in a future turn\n * @param object* the recipient\n * @param op the name of the message operation, e.g., \"when\",\n * @param args further arguments to be forwarded to the operation\n * @returns result {Promise} a promise for the result of the operation\n */\nQ.dispatch = dispatch;\nfunction dispatch(object, op, args) {\n return Q(object).dispatch(op, args);\n}\n\nPromise.prototype.dispatch = function (op, args) {\n var self = this;\n var deferred = defer();\n nextTick(function () {\n self.promiseDispatch(deferred.resolve, op, args);\n });\n return deferred.promise;\n};\n\n/**\n * Gets the value of a property in a future turn.\n * @param object promise or immediate reference for target object\n * @param name name of property to get\n * @return promise for the property value\n */\nQ.get = function (object, key) {\n return Q(object).dispatch(\"get\", [key]);\n};\n\nPromise.prototype.get = function (key) {\n return this.dispatch(\"get\", [key]);\n};\n\n/**\n * Sets the value of a property in a future turn.\n * @param object promise or immediate reference for object object\n * @param name name of property to set\n * @param value new value of property\n * @return promise for the return value\n */\nQ.set = function (object, key, value) {\n return Q(object).dispatch(\"set\", [key, value]);\n};\n\nPromise.prototype.set = function (key, value) {\n return this.dispatch(\"set\", [key, value]);\n};\n\n/**\n * Deletes a property in a future turn.\n * @param object promise or immediate reference for target object\n * @param name name of property to delete\n * @return promise for the return value\n */\nQ.del = // XXX legacy\nQ[\"delete\"] = function (object, key) {\n return Q(object).dispatch(\"delete\", [key]);\n};\n\nPromise.prototype.del = // XXX legacy\nPromise.prototype[\"delete\"] = function (key) {\n return this.dispatch(\"delete\", [key]);\n};\n\n/**\n * Invokes a method in a future turn.\n * @param object promise or immediate reference for target object\n * @param name name of method to invoke\n * @param value a value to post, typically an array of\n * invocation arguments for promises that\n * are ultimately backed with `resolve` values,\n * as opposed to those backed with URLs\n * wherein the posted value can be any\n * JSON serializable object.\n * @return promise for the return value\n */\n// bound locally because it is used by other methods\nQ.mapply = // XXX As proposed by \"Redsandro\"\nQ.post = function (object, name, args) {\n return Q(object).dispatch(\"post\", [name, args]);\n};\n\nPromise.prototype.mapply = // XXX As proposed by \"Redsandro\"\nPromise.prototype.post = function (name, args) {\n return this.dispatch(\"post\", [name, args]);\n};\n\n/**\n * Invokes a method in a future turn.\n * @param object promise or immediate reference for target object\n * @param name name of method to invoke\n * @param ...args array of invocation arguments\n * @return promise for the return value\n */\nQ.send = // XXX Mark Miller's proposed parlance\nQ.mcall = // XXX As proposed by \"Redsandro\"\nQ.invoke = function (object, name /*...args*/) {\n return Q(object).dispatch(\"post\", [name, array_slice(arguments, 2)]);\n};\n\nPromise.prototype.send = // XXX Mark Miller's proposed parlance\nPromise.prototype.mcall = // XXX As proposed by \"Redsandro\"\nPromise.prototype.invoke = function (name /*...args*/) {\n return this.dispatch(\"post\", [name, array_slice(arguments, 1)]);\n};\n\n/**\n * Applies the promised function in a future turn.\n * @param object promise or immediate reference for target function\n * @param args array of application arguments\n */\nQ.fapply = function (object, args) {\n return Q(object).dispatch(\"apply\", [void 0, args]);\n};\n\nPromise.prototype.fapply = function (args) {\n return this.dispatch(\"apply\", [void 0, args]);\n};\n\n/**\n * Calls the promised function in a future turn.\n * @param object promise or immediate reference for target function\n * @param ...args array of application arguments\n */\nQ[\"try\"] =\nQ.fcall = function (object /* ...args*/) {\n return Q(object).dispatch(\"apply\", [void 0, array_slice(arguments, 1)]);\n};\n\nPromise.prototype.fcall = function (/*...args*/) {\n return this.dispatch(\"apply\", [void 0, array_slice(arguments)]);\n};\n\n/**\n * Binds the promised function, transforming return values into a fulfilled\n * promise and thrown errors into a rejected one.\n * @param object promise or immediate reference for target function\n * @param ...args array of application arguments\n */\nQ.fbind = function (object /*...args*/) {\n var promise = Q(object);\n var args = array_slice(arguments, 1);\n return function fbound() {\n return promise.dispatch(\"apply\", [\n this,\n args.concat(array_slice(arguments))\n ]);\n };\n};\nPromise.prototype.fbind = function (/*...args*/) {\n var promise = this;\n var args = array_slice(arguments);\n return function fbound() {\n return promise.dispatch(\"apply\", [\n this,\n args.concat(array_slice(arguments))\n ]);\n };\n};\n\n/**\n * Requests the names of the owned properties of a promised\n * object in a future turn.\n * @param object promise or immediate reference for target object\n * @return promise for the keys of the eventually settled object\n */\nQ.keys = function (object) {\n return Q(object).dispatch(\"keys\", []);\n};\n\nPromise.prototype.keys = function () {\n return this.dispatch(\"keys\", []);\n};\n\n/**\n * Turns an array of promises into a promise for an array. If any of\n * the promises gets rejected, the whole array is rejected immediately.\n * @param {Array*} an array (or promise for an array) of values (or\n * promises for values)\n * @returns a promise for an array of the corresponding values\n */\n// By Mark Miller\n// http://wiki.ecmascript.org/doku.php?id=strawman:concurrency&rev=1308776521#allfulfilled\nQ.all = all;\nfunction all(promises) {\n return when(promises, function (promises) {\n var countDown = 0;\n var deferred = defer();\n array_reduce(promises, function (undefined, promise, index) {\n var snapshot;\n if (\n isPromise(promise) &&\n (snapshot = promise.inspect()).state === \"fulfilled\"\n ) {\n promises[index] = snapshot.value;\n } else {\n ++countDown;\n when(\n promise,\n function (value) {\n promises[index] = value;\n if (--countDown === 0) {\n deferred.resolve(promises);\n }\n },\n deferred.reject,\n function (progress) {\n deferred.notify({ index: index, value: progress });\n }\n );\n }\n }, void 0);\n if (countDown === 0) {\n deferred.resolve(promises);\n }\n return deferred.promise;\n });\n}\n\nPromise.prototype.all = function () {\n return all(this);\n};\n\n/**\n * Waits for all promises to be settled, either fulfilled or\n * rejected. This is distinct from `all` since that would stop\n * waiting at the first rejection. The promise returned by\n * `allResolved` will never be rejected.\n * @param promises a promise for an array (or an array) of promises\n * (or values)\n * @return a promise for an array of promises\n */\nQ.allResolved = deprecate(allResolved, \"allResolved\", \"allSettled\");\nfunction allResolved(promises) {\n return when(promises, function (promises) {\n promises = array_map(promises, Q);\n return when(all(array_map(promises, function (promise) {\n return when(promise, noop, noop);\n })), function () {\n return promises;\n });\n });\n}\n\nPromise.prototype.allResolved = function () {\n return allResolved(this);\n};\n\n/**\n * @see Promise#allSettled\n */\nQ.allSettled = allSettled;\nfunction allSettled(promises) {\n return Q(promises).allSettled();\n}\n\n/**\n * Turns an array of promises into a promise for an array of their states (as\n * returned by `inspect`) when they have all settled.\n * @param {Array[Any*]} values an array (or promise for an array) of values (or\n * promises for values)\n * @returns {Array[State]} an array of states for the respective values.\n */\nPromise.prototype.allSettled = function () {\n return this.then(function (promises) {\n return all(array_map(promises, function (promise) {\n promise = Q(promise);\n function regardless() {\n return promise.inspect();\n }\n return promise.then(regardless, regardless);\n }));\n });\n};\n\n/**\n * Captures the failure of a promise, giving an oportunity to recover\n * with a callback. If the given promise is fulfilled, the returned\n * promise is fulfilled.\n * @param {Any*} promise for something\n * @param {Function} callback to fulfill the returned promise if the\n * given promise is rejected\n * @returns a promise for the return value of the callback\n */\nQ.fail = // XXX legacy\nQ[\"catch\"] = function (object, rejected) {\n return Q(object).then(void 0, rejected);\n};\n\nPromise.prototype.fail = // XXX legacy\nPromise.prototype[\"catch\"] = function (rejected) {\n return this.then(void 0, rejected);\n};\n\n/**\n * Attaches a listener that can respond to progress notifications from a\n * promise's originating deferred. This listener receives the exact arguments\n * passed to ``deferred.notify``.\n * @param {Any*} promise for something\n * @param {Function} callback to receive any progress notifications\n * @returns the given promise, unchanged\n */\nQ.progress = progress;\nfunction progress(object, progressed) {\n return Q(object).then(void 0, void 0, progressed);\n}\n\nPromise.prototype.progress = function (progressed) {\n return this.then(void 0, void 0, progressed);\n};\n\n/**\n * Provides an opportunity to observe the settling of a promise,\n * regardless of whether the promise is fulfilled or rejected. Forwards\n * the resolution to the returned promise when the callback is done.\n * The callback can return a promise to defer completion.\n * @param {Any*} promise\n * @param {Function} callback to observe the resolution of the given\n * promise, takes no arguments.\n * @returns a promise for the resolution of the given promise when\n * ``fin`` is done.\n */\nQ.fin = // XXX legacy\nQ[\"finally\"] = function (object, callback) {\n return Q(object)[\"finally\"](callback);\n};\n\nPromise.prototype.fin = // XXX legacy\nPromise.prototype[\"finally\"] = function (callback) {\n callback = Q(callback);\n return this.then(function (value) {\n return callback.fcall().then(function () {\n return value;\n });\n }, function (reason) {\n // TODO attempt to recycle the rejection with \"this\".\n return callback.fcall().then(function () {\n throw reason;\n });\n });\n};\n\n/**\n * Terminates a chain of promises, forcing rejections to be\n * thrown as exceptions.\n * @param {Any*} promise at the end of a chain of promises\n * @returns nothing\n */\nQ.done = function (object, fulfilled, rejected, progress) {\n return Q(object).done(fulfilled, rejected, progress);\n};\n\nPromise.prototype.done = function (fulfilled, rejected, progress) {\n var onUnhandledError = function (error) {\n // forward to a future turn so that ``when``\n // does not catch it and turn it into a rejection.\n nextTick(function () {\n makeStackTraceLong(error, promise);\n if (Q.onerror) {\n Q.onerror(error);\n } else {\n throw error;\n }\n });\n };\n\n // Avoid unnecessary `nextTick`ing via an unnecessary `when`.\n var promise = fulfilled || rejected || progress ?\n this.then(fulfilled, rejected, progress) :\n this;\n\n if (typeof process === \"object\" && process && process.domain) {\n onUnhandledError = process.domain.bind(onUnhandledError);\n }\n\n promise.then(void 0, onUnhandledError);\n};\n\n/**\n * Causes a promise to be rejected if it does not get fulfilled before\n * some milliseconds time out.\n * @param {Any*} promise\n * @param {Number} milliseconds timeout\n * @param {String} custom error message (optional)\n * @returns a promise for the resolution of the given promise if it is\n * fulfilled before the timeout, otherwise rejected.\n */\nQ.timeout = function (object, ms, message) {\n return Q(object).timeout(ms, message);\n};\n\nPromise.prototype.timeout = function (ms, message) {\n var deferred = defer();\n var timeoutId = setTimeout(function () {\n deferred.reject(new Error(message || \"Timed out after \" + ms + \" ms\"));\n }, ms);\n\n this.then(function (value) {\n clearTimeout(timeoutId);\n deferred.resolve(value);\n }, function (exception) {\n clearTimeout(timeoutId);\n deferred.reject(exception);\n }, deferred.notify);\n\n return deferred.promise;\n};\n\n/**\n * Returns a promise for the given value (or promised value), some\n * milliseconds after it resolved. Passes rejections immediately.\n * @param {Any*} promise\n * @param {Number} milliseconds\n * @returns a promise for the resolution of the given promise after milliseconds\n * time has elapsed since the resolution of the given promise.\n * If the given promise rejects, that is passed immediately.\n */\nQ.delay = function (object, timeout) {\n if (timeout === void 0) {\n timeout = object;\n object = void 0;\n }\n return Q(object).delay(timeout);\n};\n\nPromise.prototype.delay = function (timeout) {\n return this.then(function (value) {\n var deferred = defer();\n setTimeout(function () {\n deferred.resolve(value);\n }, timeout);\n return deferred.promise;\n });\n};\n\n/**\n * Passes a continuation to a Node function, which is called with the given\n * arguments provided as an array, and returns a promise.\n *\n * Q.nfapply(FS.readFile, [__filename])\n * .then(function (content) {\n * })\n *\n */\nQ.nfapply = function (callback, args) {\n return Q(callback).nfapply(args);\n};\n\nPromise.prototype.nfapply = function (args) {\n var deferred = defer();\n var nodeArgs = array_slice(args);\n nodeArgs.push(deferred.makeNodeResolver());\n this.fapply(nodeArgs).fail(deferred.reject);\n return deferred.promise;\n};\n\n/**\n * Passes a continuation to a Node function, which is called with the given\n * arguments provided individually, and returns a promise.\n * @example\n * Q.nfcall(FS.readFile, __filename)\n * .then(function (content) {\n * })\n *\n */\nQ.nfcall = function (callback /*...args*/) {\n var args = array_slice(arguments, 1);\n return Q(callback).nfapply(args);\n};\n\nPromise.prototype.nfcall = function (/*...args*/) {\n var nodeArgs = array_slice(arguments);\n var deferred = defer();\n nodeArgs.push(deferred.makeNodeResolver());\n this.fapply(nodeArgs).fail(deferred.reject);\n return deferred.promise;\n};\n\n/**\n * Wraps a NodeJS continuation passing function and returns an equivalent\n * version that returns a promise.\n * @example\n * Q.nfbind(FS.readFile, __filename)(\"utf-8\")\n * .then(console.log)\n * .done()\n */\nQ.nfbind =\nQ.denodeify = function (callback /*...args*/) {\n var baseArgs = array_slice(arguments, 1);\n return function () {\n var nodeArgs = baseArgs.concat(array_slice(arguments));\n var deferred = defer();\n nodeArgs.push(deferred.makeNodeResolver());\n Q(callback).fapply(nodeArgs).fail(deferred.reject);\n return deferred.promise;\n };\n};\n\nPromise.prototype.nfbind =\nPromise.prototype.denodeify = function (/*...args*/) {\n var args = array_slice(arguments);\n args.unshift(this);\n return Q.denodeify.apply(void 0, args);\n};\n\nQ.nbind = function (callback, thisp /*...args*/) {\n var baseArgs = array_slice(arguments, 2);\n return function () {\n var nodeArgs = baseArgs.concat(array_slice(arguments));\n var deferred = defer();\n nodeArgs.push(deferred.makeNodeResolver());\n function bound() {\n return callback.apply(thisp, arguments);\n }\n Q(bound).fapply(nodeArgs).fail(deferred.reject);\n return deferred.promise;\n };\n};\n\nPromise.prototype.nbind = function (/*thisp, ...args*/) {\n var args = array_slice(arguments, 0);\n args.unshift(this);\n return Q.nbind.apply(void 0, args);\n};\n\n/**\n * Calls a method of a Node-style object that accepts a Node-style\n * callback with a given array of arguments, plus a provided callback.\n * @param object an object that has the named method\n * @param {String} name name of the method of object\n * @param {Array} args arguments to pass to the method; the callback\n * will be provided by Q and appended to these arguments.\n * @returns a promise for the value or error\n */\nQ.nmapply = // XXX As proposed by \"Redsandro\"\nQ.npost = function (object, name, args) {\n return Q(object).npost(name, args);\n};\n\nPromise.prototype.nmapply = // XXX As proposed by \"Redsandro\"\nPromise.prototype.npost = function (name, args) {\n var nodeArgs = array_slice(args || []);\n var deferred = defer();\n nodeArgs.push(deferred.makeNodeResolver());\n this.dispatch(\"post\", [name, nodeArgs]).fail(deferred.reject);\n return deferred.promise;\n};\n\n/**\n * Calls a method of a Node-style object that accepts a Node-style\n * callback, forwarding the given variadic arguments, plus a provided\n * callback argument.\n * @param object an object that has the named method\n * @param {String} name name of the method of object\n * @param ...args arguments to pass to the method; the callback will\n * be provided by Q and appended to these arguments.\n * @returns a promise for the value or error\n */\nQ.nsend = // XXX Based on Mark Miller's proposed \"send\"\nQ.nmcall = // XXX Based on \"Redsandro's\" proposal\nQ.ninvoke = function (object, name /*...args*/) {\n var nodeArgs = array_slice(arguments, 2);\n var deferred = defer();\n nodeArgs.push(deferred.makeNodeResolver());\n Q(object).dispatch(\"post\", [name, nodeArgs]).fail(deferred.reject);\n return deferred.promise;\n};\n\nPromise.prototype.nsend = // XXX Based on Mark Miller's proposed \"send\"\nPromise.prototype.nmcall = // XXX Based on \"Redsandro's\" proposal\nPromise.prototype.ninvoke = function (name /*...args*/) {\n var nodeArgs = array_slice(arguments, 1);\n var deferred = defer();\n nodeArgs.push(deferred.makeNodeResolver());\n this.dispatch(\"post\", [name, nodeArgs]).fail(deferred.reject);\n return deferred.promise;\n};\n\n/**\n * If a function would like to support both Node continuation-passing-style and\n * promise-returning-style, it can end its internal promise chain with\n * `nodeify(nodeback)`, forwarding the optional nodeback argument. If the user\n * elects to use a nodeback, the result will be sent there. If they do not\n * pass a nodeback, they will receive the result promise.\n * @param object a result (or a promise for a result)\n * @param {Function} nodeback a Node.js-style callback\n * @returns either the promise or nothing\n */\nQ.nodeify = nodeify;\nfunction nodeify(object, nodeback) {\n return Q(object).nodeify(nodeback);\n}\n\nPromise.prototype.nodeify = function (nodeback) {\n if (nodeback) {\n this.then(function (value) {\n nextTick(function () {\n nodeback(null, value);\n });\n }, function (error) {\n nextTick(function () {\n nodeback(error);\n });\n });\n } else {\n return this;\n }\n};\n\n// All code before this point will be filtered from stack traces.\nvar qEndingLine = captureLine();\n\nreturn Q;\n\n});\n","/*!\n * Select2 4.0.1\n * https://select2.github.io\n *\n * Released under the MIT license\n * https://github.com/select2/select2/blob/master/LICENSE.md\n */\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['jquery'], factory);\n } else if (typeof exports === 'object') {\n // Node/CommonJS\n factory(require('jquery'));\n } else {\n // Browser globals\n factory(jQuery);\n }\n}(function (jQuery) {\n // This is needed so we can catch the AMD loader configuration and use it\n // The inner file should be wrapped (by `banner.start.js`) in a function that\n // returns the AMD loader references.\n var S2 =\n(function () {\n // Restore the Select2 AMD loader so it can be used\n // Needed mostly in the language files, where the loader is not inserted\n if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {\n var S2 = jQuery.fn.select2.amd;\n }\nvar S2;(function () { if (!S2 || !S2.requirejs) {\nif (!S2) { S2 = {}; } else { require = S2; }\n/**\n * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/jrburke/almond for details\n */\n//Going sloppy to avoid 'use strict' string cost, but strict practices should\n//be followed.\n/*jslint sloppy: true */\n/*global setTimeout: false */\n\nvar requirejs, require, define;\n(function (undef) {\n var main, req, makeMap, handlers,\n defined = {},\n waiting = {},\n config = {},\n defining = {},\n hasOwn = Object.prototype.hasOwnProperty,\n aps = [].slice,\n jsSuffixRegExp = /\\.js$/;\n\n function hasProp(obj, prop) {\n return hasOwn.call(obj, prop);\n }\n\n /**\n * Given a relative module name, like ./something, normalize it to\n * a real name that can be mapped to a path.\n * @param {String} name the relative name\n * @param {String} baseName a real name that the name arg is relative\n * to.\n * @returns {String} normalized name\n */\n function normalize(name, baseName) {\n var nameParts, nameSegment, mapValue, foundMap, lastIndex,\n foundI, foundStarMap, starI, i, j, part,\n baseParts = baseName && baseName.split(\"/\"),\n map = config.map,\n starMap = (map && map['*']) || {};\n\n //Adjust any relative paths.\n if (name && name.charAt(0) === \".\") {\n //If have a base name, try to normalize against it,\n //otherwise, assume it is a top-level require that will\n //be relative to baseUrl in the end.\n if (baseName) {\n name = name.split('/');\n lastIndex = name.length - 1;\n\n // Node .js allowance:\n if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\n name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\n }\n\n //Lop off the last part of baseParts, so that . matches the\n //\"directory\" and not name of the baseName's module. For instance,\n //baseName of \"one/two/three\", maps to \"one/two/three.js\", but we\n //want the directory, \"one/two\" for this normalization.\n name = baseParts.slice(0, baseParts.length - 1).concat(name);\n\n //start trimDots\n for (i = 0; i < name.length; i += 1) {\n part = name[i];\n if (part === \".\") {\n name.splice(i, 1);\n i -= 1;\n } else if (part === \"..\") {\n if (i === 1 && (name[2] === '..' || name[0] === '..')) {\n //End of the line. Keep at least one non-dot\n //path segment at the front so it can be mapped\n //correctly to disk. Otherwise, there is likely\n //no path mapping for a path starting with '..'.\n //This can still fail, but catches the most reasonable\n //uses of ..\n break;\n } else if (i > 0) {\n name.splice(i - 1, 2);\n i -= 2;\n }\n }\n }\n //end trimDots\n\n name = name.join(\"/\");\n } else if (name.indexOf('./') === 0) {\n // No baseName, so this is ID is resolved relative\n // to baseUrl, pull off the leading dot.\n name = name.substring(2);\n }\n }\n\n //Apply map config if available.\n if ((baseParts || starMap) && map) {\n nameParts = name.split('/');\n\n for (i = nameParts.length; i > 0; i -= 1) {\n nameSegment = nameParts.slice(0, i).join(\"/\");\n\n if (baseParts) {\n //Find the longest baseName segment match in the config.\n //So, do joins on the biggest to smallest lengths of baseParts.\n for (j = baseParts.length; j > 0; j -= 1) {\n mapValue = map[baseParts.slice(0, j).join('/')];\n\n //baseName segment has config, find if it has one for\n //this name.\n if (mapValue) {\n mapValue = mapValue[nameSegment];\n if (mapValue) {\n //Match, update name to the new value.\n foundMap = mapValue;\n foundI = i;\n break;\n }\n }\n }\n }\n\n if (foundMap) {\n break;\n }\n\n //Check for a star map match, but just hold on to it,\n //if there is a shorter segment match later in a matching\n //config, then favor over this star map.\n if (!foundStarMap && starMap && starMap[nameSegment]) {\n foundStarMap = starMap[nameSegment];\n starI = i;\n }\n }\n\n if (!foundMap && foundStarMap) {\n foundMap = foundStarMap;\n foundI = starI;\n }\n\n if (foundMap) {\n nameParts.splice(0, foundI, foundMap);\n name = nameParts.join('/');\n }\n }\n\n return name;\n }\n\n function makeRequire(relName, forceSync) {\n return function () {\n //A version of a require function that passes a moduleName\n //value for items that may need to\n //look up paths relative to the moduleName\n var args = aps.call(arguments, 0);\n\n //If first arg is not require('string'), and there is only\n //one arg, it is the array form without a callback. Insert\n //a null so that the following concat is correct.\n if (typeof args[0] !== 'string' && args.length === 1) {\n args.push(null);\n }\n return req.apply(undef, args.concat([relName, forceSync]));\n };\n }\n\n function makeNormalize(relName) {\n return function (name) {\n return normalize(name, relName);\n };\n }\n\n function makeLoad(depName) {\n return function (value) {\n defined[depName] = value;\n };\n }\n\n function callDep(name) {\n if (hasProp(waiting, name)) {\n var args = waiting[name];\n delete waiting[name];\n defining[name] = true;\n main.apply(undef, args);\n }\n\n if (!hasProp(defined, name) && !hasProp(defining, name)) {\n throw new Error('No ' + name);\n }\n return defined[name];\n }\n\n //Turns a plugin!resource to [plugin, resource]\n //with the plugin being undefined if the name\n //did not have a plugin prefix.\n function splitPrefix(name) {\n var prefix,\n index = name ? name.indexOf('!') : -1;\n if (index > -1) {\n prefix = name.substring(0, index);\n name = name.substring(index + 1, name.length);\n }\n return [prefix, name];\n }\n\n /**\n * Makes a name map, normalizing the name, and using a plugin\n * for normalization if necessary. Grabs a ref to plugin\n * too, as an optimization.\n */\n makeMap = function (name, relName) {\n var plugin,\n parts = splitPrefix(name),\n prefix = parts[0];\n\n name = parts[1];\n\n if (prefix) {\n prefix = normalize(prefix, relName);\n plugin = callDep(prefix);\n }\n\n //Normalize according\n if (prefix) {\n if (plugin && plugin.normalize) {\n name = plugin.normalize(name, makeNormalize(relName));\n } else {\n name = normalize(name, relName);\n }\n } else {\n name = normalize(name, relName);\n parts = splitPrefix(name);\n prefix = parts[0];\n name = parts[1];\n if (prefix) {\n plugin = callDep(prefix);\n }\n }\n\n //Using ridiculous property names for space reasons\n return {\n f: prefix ? prefix + '!' + name : name, //fullName\n n: name,\n pr: prefix,\n p: plugin\n };\n };\n\n function makeConfig(name) {\n return function () {\n return (config && config.config && config.config[name]) || {};\n };\n }\n\n handlers = {\n require: function (name) {\n return makeRequire(name);\n },\n exports: function (name) {\n var e = defined[name];\n if (typeof e !== 'undefined') {\n return e;\n } else {\n return (defined[name] = {});\n }\n },\n module: function (name) {\n return {\n id: name,\n uri: '',\n exports: defined[name],\n config: makeConfig(name)\n };\n }\n };\n\n main = function (name, deps, callback, relName) {\n var cjsModule, depName, ret, map, i,\n args = [],\n callbackType = typeof callback,\n usingExports;\n\n //Use name if no relName\n relName = relName || name;\n\n //Call the callback to define the module, if necessary.\n if (callbackType === 'undefined' || callbackType === 'function') {\n //Pull out the defined dependencies and pass the ordered\n //values to the callback.\n //Default to [require, exports, module] if no deps\n deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;\n for (i = 0; i < deps.length; i += 1) {\n map = makeMap(deps[i], relName);\n depName = map.f;\n\n //Fast path CommonJS standard dependencies.\n if (depName === \"require\") {\n args[i] = handlers.require(name);\n } else if (depName === \"exports\") {\n //CommonJS module spec 1.1\n args[i] = handlers.exports(name);\n usingExports = true;\n } else if (depName === \"module\") {\n //CommonJS module spec 1.1\n cjsModule = args[i] = handlers.module(name);\n } else if (hasProp(defined, depName) ||\n hasProp(waiting, depName) ||\n hasProp(defining, depName)) {\n args[i] = callDep(depName);\n } else if (map.p) {\n map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});\n args[i] = defined[depName];\n } else {\n throw new Error(name + ' missing ' + depName);\n }\n }\n\n ret = callback ? callback.apply(defined[name], args) : undefined;\n\n if (name) {\n //If setting exports via \"module\" is in play,\n //favor that over return value and exports. After that,\n //favor a non-undefined return value over exports use.\n if (cjsModule && cjsModule.exports !== undef &&\n cjsModule.exports !== defined[name]) {\n defined[name] = cjsModule.exports;\n } else if (ret !== undef || !usingExports) {\n //Use the return value from the function.\n defined[name] = ret;\n }\n }\n } else if (name) {\n //May just be an object definition for the module. Only\n //worry about defining if have a module name.\n defined[name] = callback;\n }\n };\n\n requirejs = require = req = function (deps, callback, relName, forceSync, alt) {\n if (typeof deps === \"string\") {\n if (handlers[deps]) {\n //callback in this case is really relName\n return handlers[deps](callback);\n }\n //Just return the module wanted. In this scenario, the\n //deps arg is the module name, and second arg (if passed)\n //is just the relName.\n //Normalize module name, if it contains . or ..\n return callDep(makeMap(deps, callback).f);\n } else if (!deps.splice) {\n //deps is a config object, not an array.\n config = deps;\n if (config.deps) {\n req(config.deps, config.callback);\n }\n if (!callback) {\n return;\n }\n\n if (callback.splice) {\n //callback is an array, which means it is a dependency list.\n //Adjust args if there are dependencies\n deps = callback;\n callback = relName;\n relName = null;\n } else {\n deps = undef;\n }\n }\n\n //Support require(['a'])\n callback = callback || function () {};\n\n //If relName is a function, it is an errback handler,\n //so remove it.\n if (typeof relName === 'function') {\n relName = forceSync;\n forceSync = alt;\n }\n\n //Simulate async callback;\n if (forceSync) {\n main(undef, deps, callback, relName);\n } else {\n //Using a non-zero value because of concern for what old browsers\n //do, and latest browsers \"upgrade\" to 4 if lower value is used:\n //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:\n //If want a value immediately, use require('id') instead -- something\n //that works in almond on the global level, but not guaranteed and\n //unlikely to work in other AMD implementations.\n setTimeout(function () {\n main(undef, deps, callback, relName);\n }, 4);\n }\n\n return req;\n };\n\n /**\n * Just drops the config on the floor, but returns req in case\n * the config return value is used.\n */\n req.config = function (cfg) {\n return req(cfg);\n };\n\n /**\n * Expose module registry for debugging and tooling\n */\n requirejs._defined = defined;\n\n define = function (name, deps, callback) {\n if (typeof name !== 'string') {\n throw new Error('See almond README: incorrect module build, no module name');\n }\n\n //This module may not have dependencies\n if (!deps.splice) {\n //deps is not an array, so probably means\n //an object literal or factory function for\n //the value. Adjust args.\n callback = deps;\n deps = [];\n }\n\n if (!hasProp(defined, name) && !hasProp(waiting, name)) {\n waiting[name] = [name, deps, callback];\n }\n };\n\n define.amd = {\n jQuery: true\n };\n}());\n\nS2.requirejs = requirejs;S2.require = require;S2.define = define;\n}\n}());\nS2.define(\"almond\", function(){});\n\n/* global jQuery:false, $:false */\nS2.define('jquery',[],function () {\n var _$ = jQuery || $;\n\n if (_$ == null && console && console.error) {\n console.error(\n 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +\n 'found. Make sure that you are including jQuery before Select2 on your ' +\n 'web page.'\n );\n }\n\n return _$;\n});\n\nS2.define('select2/utils',[\n 'jquery'\n], function ($) {\n var Utils = {};\n\n Utils.Extend = function (ChildClass, SuperClass) {\n var __hasProp = {}.hasOwnProperty;\n\n function BaseConstructor () {\n this.constructor = ChildClass;\n }\n\n for (var key in SuperClass) {\n if (__hasProp.call(SuperClass, key)) {\n ChildClass[key] = SuperClass[key];\n }\n }\n\n BaseConstructor.prototype = SuperClass.prototype;\n ChildClass.prototype = new BaseConstructor();\n ChildClass.__super__ = SuperClass.prototype;\n\n return ChildClass;\n };\n\n function getMethods (theClass) {\n var proto = theClass.prototype;\n\n var methods = [];\n\n for (var methodName in proto) {\n var m = proto[methodName];\n\n if (typeof m !== 'function') {\n continue;\n }\n\n if (methodName === 'constructor') {\n continue;\n }\n\n methods.push(methodName);\n }\n\n return methods;\n }\n\n Utils.Decorate = function (SuperClass, DecoratorClass) {\n var decoratedMethods = getMethods(DecoratorClass);\n var superMethods = getMethods(SuperClass);\n\n function DecoratedClass () {\n var unshift = Array.prototype.unshift;\n\n var argCount = DecoratorClass.prototype.constructor.length;\n\n var calledConstructor = SuperClass.prototype.constructor;\n\n if (argCount > 0) {\n unshift.call(arguments, SuperClass.prototype.constructor);\n\n calledConstructor = DecoratorClass.prototype.constructor;\n }\n\n calledConstructor.apply(this, arguments);\n }\n\n DecoratorClass.displayName = SuperClass.displayName;\n\n function ctr () {\n this.constructor = DecoratedClass;\n }\n\n DecoratedClass.prototype = new ctr();\n\n for (var m = 0; m < superMethods.length; m++) {\n var superMethod = superMethods[m];\n\n DecoratedClass.prototype[superMethod] =\n SuperClass.prototype[superMethod];\n }\n\n var calledMethod = function (methodName) {\n // Stub out the original method if it's not decorating an actual method\n var originalMethod = function () {};\n\n if (methodName in DecoratedClass.prototype) {\n originalMethod = DecoratedClass.prototype[methodName];\n }\n\n var decoratedMethod = DecoratorClass.prototype[methodName];\n\n return function () {\n var unshift = Array.prototype.unshift;\n\n unshift.call(arguments, originalMethod);\n\n return decoratedMethod.apply(this, arguments);\n };\n };\n\n for (var d = 0; d < decoratedMethods.length; d++) {\n var decoratedMethod = decoratedMethods[d];\n\n DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);\n }\n\n return DecoratedClass;\n };\n\n var Observable = function () {\n this.listeners = {};\n };\n\n Observable.prototype.on = function (event, callback) {\n this.listeners = this.listeners || {};\n\n if (event in this.listeners) {\n this.listeners[event].push(callback);\n } else {\n this.listeners[event] = [callback];\n }\n };\n\n Observable.prototype.trigger = function (event) {\n var slice = Array.prototype.slice;\n\n this.listeners = this.listeners || {};\n\n if (event in this.listeners) {\n this.invoke(this.listeners[event], slice.call(arguments, 1));\n }\n\n if ('*' in this.listeners) {\n this.invoke(this.listeners['*'], arguments);\n }\n };\n\n Observable.prototype.invoke = function (listeners, params) {\n for (var i = 0, len = listeners.length; i < len; i++) {\n listeners[i].apply(this, params);\n }\n };\n\n Utils.Observable = Observable;\n\n Utils.generateChars = function (length) {\n var chars = '';\n\n for (var i = 0; i < length; i++) {\n var randomChar = Math.floor(Math.random() * 36);\n chars += randomChar.toString(36);\n }\n\n return chars;\n };\n\n Utils.bind = function (func, context) {\n return function () {\n func.apply(context, arguments);\n };\n };\n\n Utils._convertData = function (data) {\n for (var originalKey in data) {\n var keys = originalKey.split('-');\n\n var dataLevel = data;\n\n if (keys.length === 1) {\n continue;\n }\n\n for (var k = 0; k < keys.length; k++) {\n var key = keys[k];\n\n // Lowercase the first letter\n // By default, dash-separated becomes camelCase\n key = key.substring(0, 1).toLowerCase() + key.substring(1);\n\n if (!(key in dataLevel)) {\n dataLevel[key] = {};\n }\n\n if (k == keys.length - 1) {\n dataLevel[key] = data[originalKey];\n }\n\n dataLevel = dataLevel[key];\n }\n\n delete data[originalKey];\n }\n\n return data;\n };\n\n Utils.hasScroll = function (index, el) {\n // Adapted from the function created by @ShadowScripter\n // and adapted by @BillBarry on the Stack Exchange Code Review website.\n // The original code can be found at\n // http://codereview.stackexchange.com/q/13338\n // and was designed to be used with the Sizzle selector engine.\n\n var $el = $(el);\n var overflowX = el.style.overflowX;\n var overflowY = el.style.overflowY;\n\n //Check both x and y declarations\n if (overflowX === overflowY &&\n (overflowY === 'hidden' || overflowY === 'visible')) {\n return false;\n }\n\n if (overflowX === 'scroll' || overflowY === 'scroll') {\n return true;\n }\n\n return ($el.innerHeight() < el.scrollHeight ||\n $el.innerWidth() < el.scrollWidth);\n };\n\n Utils.escapeMarkup = function (markup) {\n var replaceMap = {\n '\\\\': '\',\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n '\\'': ''',\n '/': '/'\n };\n\n // Do not try to escape the markup if it's not a string\n if (typeof markup !== 'string') {\n return markup;\n }\n\n return String(markup).replace(/[&<>\"'\\/\\\\]/g, function (match) {\n return replaceMap[match];\n });\n };\n\n // Append an array of jQuery nodes to a given element.\n Utils.appendMany = function ($element, $nodes) {\n // jQuery 1.7.x does not support $.fn.append() with an array\n // Fall back to a jQuery object collection using $.fn.add()\n if ($.fn.jquery.substr(0, 3) === '1.7') {\n var $jqNodes = $();\n\n $.map($nodes, function (node) {\n $jqNodes = $jqNodes.add(node);\n });\n\n $nodes = $jqNodes;\n }\n\n $element.append($nodes);\n };\n\n return Utils;\n});\n\nS2.define('select2/results',[\n 'jquery',\n './utils'\n], function ($, Utils) {\n function Results ($element, options, dataAdapter) {\n this.$element = $element;\n this.data = dataAdapter;\n this.options = options;\n\n Results.__super__.constructor.call(this);\n }\n\n Utils.Extend(Results, Utils.Observable);\n\n Results.prototype.render = function () {\n var $results = $(\n '<ul class=\"select2-results__options\" role=\"tree\"></ul>'\n );\n\n if (this.options.get('multiple')) {\n $results.attr('aria-multiselectable', 'true');\n }\n\n this.$results = $results;\n\n return $results;\n };\n\n Results.prototype.clear = function () {\n this.$results.empty();\n };\n\n Results.prototype.displayMessage = function (params) {\n var escapeMarkup = this.options.get('escapeMarkup');\n\n this.clear();\n this.hideLoading();\n\n var $message = $(\n '<li role=\"treeitem\" aria-live=\"assertive\"' +\n ' class=\"select2-results__option\"></li>'\n );\n\n var message = this.options.get('translations').get(params.message);\n\n $message.append(\n escapeMarkup(\n message(params.args)\n )\n );\n\n $message[0].className += ' select2-results__message';\n\n this.$results.append($message);\n };\n\n Results.prototype.hideMessages = function () {\n this.$results.find('.select2-results__message').remove();\n };\n\n Results.prototype.append = function (data) {\n this.hideLoading();\n\n var $options = [];\n\n if (data.results == null || data.results.length === 0) {\n if (this.$results.children().length === 0) {\n this.trigger('results:message', {\n message: 'noResults'\n });\n }\n\n return;\n }\n\n data.results = this.sort(data.results);\n\n for (var d = 0; d < data.results.length; d++) {\n var item = data.results[d];\n\n var $option = this.option(item);\n\n $options.push($option);\n }\n\n this.$results.append($options);\n };\n\n Results.prototype.position = function ($results, $dropdown) {\n var $resultsContainer = $dropdown.find('.select2-results');\n $resultsContainer.append($results);\n };\n\n Results.prototype.sort = function (data) {\n var sorter = this.options.get('sorter');\n\n return sorter(data);\n };\n\n Results.prototype.setClasses = function () {\n var self = this;\n\n this.data.current(function (selected) {\n var selectedIds = $.map(selected, function (s) {\n return s.id.toString();\n });\n\n var $options = self.$results\n .find('.select2-results__option[aria-selected]');\n\n $options.each(function () {\n var $option = $(this);\n\n var item = $.data(this, 'data');\n\n // id needs to be converted to a string when comparing\n var id = '' + item.id;\n\n if ((item.element != null && item.element.selected) ||\n (item.element == null && $.inArray(id, selectedIds) > -1)) {\n $option.attr('aria-selected', 'true');\n } else {\n $option.attr('aria-selected', 'false');\n }\n });\n\n var $selected = $options.filter('[aria-selected=true]');\n\n // Check if there are any selected options\n if ($selected.length > 0) {\n // If there are selected options, highlight the first\n $selected.first().trigger('mouseenter');\n } else {\n // If there are no selected options, highlight the first option\n // in the dropdown\n $options.first().trigger('mouseenter');\n }\n });\n };\n\n Results.prototype.showLoading = function (params) {\n this.hideLoading();\n\n var loadingMore = this.options.get('translations').get('searching');\n\n var loading = {\n disabled: true,\n loading: true,\n text: loadingMore(params)\n };\n var $loading = this.option(loading);\n $loading.className += ' loading-results';\n\n this.$results.prepend($loading);\n };\n\n Results.prototype.hideLoading = function () {\n this.$results.find('.loading-results').remove();\n };\n\n Results.prototype.option = function (data) {\n var option = document.createElement('li');\n option.className = 'select2-results__option';\n\n var attrs = {\n 'role': 'treeitem',\n 'aria-selected': 'false'\n };\n\n if (data.disabled) {\n delete attrs['aria-selected'];\n attrs['aria-disabled'] = 'true';\n }\n\n if (data.id == null) {\n delete attrs['aria-selected'];\n }\n\n if (data._resultId != null) {\n option.id = data._resultId;\n }\n\n if (data.title) {\n option.title = data.title;\n }\n\n if (data.children) {\n attrs.role = 'group';\n attrs['aria-label'] = data.text;\n delete attrs['aria-selected'];\n }\n\n for (var attr in attrs) {\n var val = attrs[attr];\n\n option.setAttribute(attr, val);\n }\n\n if (data.children) {\n var $option = $(option);\n\n var label = document.createElement('strong');\n label.className = 'select2-results__group';\n\n var $label = $(label);\n this.template(data, label);\n\n var $children = [];\n\n for (var c = 0; c < data.children.length; c++) {\n var child = data.children[c];\n\n var $child = this.option(child);\n\n $children.push($child);\n }\n\n var $childrenContainer = $('<ul></ul>', {\n 'class': 'select2-results__options select2-results__options--nested'\n });\n\n $childrenContainer.append($children);\n\n $option.append(label);\n $option.append($childrenContainer);\n } else {\n this.template(data, option);\n }\n\n $.data(option, 'data', data);\n\n return option;\n };\n\n Results.prototype.bind = function (container, $container) {\n var self = this;\n\n var id = container.id + '-results';\n\n this.$results.attr('id', id);\n\n container.on('results:all', function (params) {\n self.clear();\n self.append(params.data);\n\n if (container.isOpen()) {\n self.setClasses();\n }\n });\n\n container.on('results:append', function (params) {\n self.append(params.data);\n\n if (container.isOpen()) {\n self.setClasses();\n }\n });\n\n container.on('query', function (params) {\n self.hideMessages();\n self.showLoading(params);\n });\n\n container.on('select', function () {\n if (!container.isOpen()) {\n return;\n }\n\n self.setClasses();\n });\n\n container.on('unselect', function () {\n if (!container.isOpen()) {\n return;\n }\n\n self.setClasses();\n });\n\n container.on('open', function () {\n // When the dropdown is open, aria-expended=\"true\"\n self.$results.attr('aria-expanded', 'true');\n self.$results.attr('aria-hidden', 'false');\n\n self.setClasses();\n self.ensureHighlightVisible();\n });\n\n container.on('close', function () {\n // When the dropdown is closed, aria-expended=\"false\"\n self.$results.attr('aria-expanded', 'false');\n self.$results.attr('aria-hidden', 'true');\n self.$results.removeAttr('aria-activedescendant');\n });\n\n container.on('results:toggle', function () {\n var $highlighted = self.getHighlightedResults();\n\n if ($highlighted.length === 0) {\n return;\n }\n\n $highlighted.trigger('mouseup');\n });\n\n container.on('results:select', function () {\n var $highlighted = self.getHighlightedResults();\n\n if ($highlighted.length === 0) {\n return;\n }\n\n var data = $highlighted.data('data');\n\n if ($highlighted.attr('aria-selected') == 'true') {\n self.trigger('close', {});\n } else {\n self.trigger('select', {\n data: data\n });\n }\n });\n\n container.on('results:previous', function () {\n var $highlighted = self.getHighlightedResults();\n\n var $options = self.$results.find('[aria-selected]');\n\n var currentIndex = $options.index($highlighted);\n\n // If we are already at te top, don't move further\n if (currentIndex === 0) {\n return;\n }\n\n var nextIndex = currentIndex - 1;\n\n // If none are highlighted, highlight the first\n if ($highlighted.length === 0) {\n nextIndex = 0;\n }\n\n var $next = $options.eq(nextIndex);\n\n $next.trigger('mouseenter');\n\n var currentOffset = self.$results.offset().top;\n var nextTop = $next.offset().top;\n var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);\n\n if (nextIndex === 0) {\n self.$results.scrollTop(0);\n } else if (nextTop - currentOffset < 0) {\n self.$results.scrollTop(nextOffset);\n }\n });\n\n container.on('results:next', function () {\n var $highlighted = self.getHighlightedResults();\n\n var $options = self.$results.find('[aria-selected]');\n\n var currentIndex = $options.index($highlighted);\n\n var nextIndex = currentIndex + 1;\n\n // If we are at the last option, stay there\n if (nextIndex >= $options.length) {\n return;\n }\n\n var $next = $options.eq(nextIndex);\n\n $next.trigger('mouseenter');\n\n var currentOffset = self.$results.offset().top +\n self.$results.outerHeight(false);\n var nextBottom = $next.offset().top + $next.outerHeight(false);\n var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;\n\n if (nextIndex === 0) {\n self.$results.scrollTop(0);\n } else if (nextBottom > currentOffset) {\n self.$results.scrollTop(nextOffset);\n }\n });\n\n container.on('results:focus', function (params) {\n params.element.addClass('select2-results__option--highlighted');\n });\n\n container.on('results:message', function (params) {\n self.displayMessage(params);\n });\n\n if ($.fn.mousewheel) {\n this.$results.on('mousewheel', function (e) {\n var top = self.$results.scrollTop();\n\n var bottom = (\n self.$results.get(0).scrollHeight -\n self.$results.scrollTop() +\n e.deltaY\n );\n\n var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;\n var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();\n\n if (isAtTop) {\n self.$results.scrollTop(0);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (isAtBottom) {\n self.$results.scrollTop(\n self.$results.get(0).scrollHeight - self.$results.height()\n );\n\n e.preventDefault();\n e.stopPropagation();\n }\n });\n }\n\n this.$results.on('mouseup', '.select2-results__option[aria-selected]',\n function (evt) {\n var $this = $(this);\n\n var data = $this.data('data');\n\n if ($this.attr('aria-selected') === 'true') {\n if (self.options.get('multiple')) {\n self.trigger('unselect', {\n originalEvent: evt,\n data: data\n });\n } else {\n self.trigger('close', {});\n }\n\n return;\n }\n\n self.trigger('select', {\n originalEvent: evt,\n data: data\n });\n });\n\n this.$results.on('mouseenter', '.select2-results__option[aria-selected]',\n function (evt) {\n var data = $(this).data('data');\n\n self.getHighlightedResults()\n .removeClass('select2-results__option--highlighted');\n\n self.trigger('results:focus', {\n data: data,\n element: $(this)\n });\n });\n };\n\n Results.prototype.getHighlightedResults = function () {\n var $highlighted = this.$results\n .find('.select2-results__option--highlighted');\n\n return $highlighted;\n };\n\n Results.prototype.destroy = function () {\n this.$results.remove();\n };\n\n Results.prototype.ensureHighlightVisible = function () {\n var $highlighted = this.getHighlightedResults();\n\n if ($highlighted.length === 0) {\n return;\n }\n\n var $options = this.$results.find('[aria-selected]');\n\n var currentIndex = $options.index($highlighted);\n\n var currentOffset = this.$results.offset().top;\n var nextTop = $highlighted.offset().top;\n var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);\n\n var offsetDelta = nextTop - currentOffset;\n nextOffset -= $highlighted.outerHeight(false) * 2;\n\n if (currentIndex <= 2) {\n this.$results.scrollTop(0);\n } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {\n this.$results.scrollTop(nextOffset);\n }\n };\n\n Results.prototype.template = function (result, container) {\n var template = this.options.get('templateResult');\n var escapeMarkup = this.options.get('escapeMarkup');\n\n var content = template(result, container);\n\n if (content == null) {\n container.style.display = 'none';\n } else if (typeof content === 'string') {\n container.innerHTML = escapeMarkup(content);\n } else {\n $(container).append(content);\n }\n };\n\n return Results;\n});\n\nS2.define('select2/keys',[\n\n], function () {\n var KEYS = {\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n DELETE: 46\n };\n\n return KEYS;\n});\n\nS2.define('select2/selection/base',[\n 'jquery',\n '../utils',\n '../keys'\n], function ($, Utils, KEYS) {\n function BaseSelection ($element, options) {\n this.$element = $element;\n this.options = options;\n\n BaseSelection.__super__.constructor.call(this);\n }\n\n Utils.Extend(BaseSelection, Utils.Observable);\n\n BaseSelection.prototype.render = function () {\n var $selection = $(\n '<span class=\"select2-selection\" role=\"combobox\" ' +\n ' aria-haspopup=\"true\" aria-expanded=\"false\">' +\n '</span>'\n );\n\n this._tabindex = 0;\n\n if (this.$element.data('old-tabindex') != null) {\n this._tabindex = this.$element.data('old-tabindex');\n } else if (this.$element.attr('tabindex') != null) {\n this._tabindex = this.$element.attr('tabindex');\n }\n\n $selection.attr('title', this.$element.attr('title'));\n $selection.attr('tabindex', this._tabindex);\n\n this.$selection = $selection;\n\n return $selection;\n };\n\n BaseSelection.prototype.bind = function (container, $container) {\n var self = this;\n\n var id = container.id + '-container';\n var resultsId = container.id + '-results';\n\n this.container = container;\n\n this.$selection.on('focus', function (evt) {\n self.trigger('focus', evt);\n });\n\n this.$selection.on('blur', function (evt) {\n self._handleBlur(evt);\n });\n\n this.$selection.on('keydown', function (evt) {\n self.trigger('keypress', evt);\n\n if (evt.which === KEYS.SPACE) {\n evt.preventDefault();\n }\n });\n\n container.on('results:focus', function (params) {\n self.$selection.attr('aria-activedescendant', params.data._resultId);\n });\n\n container.on('selection:update', function (params) {\n self.update(params.data);\n });\n\n container.on('open', function () {\n // When the dropdown is open, aria-expanded=\"true\"\n self.$selection.attr('aria-expanded', 'true');\n self.$selection.attr('aria-owns', resultsId);\n\n self._attachCloseHandler(container);\n });\n\n container.on('close', function () {\n // When the dropdown is closed, aria-expanded=\"false\"\n self.$selection.attr('aria-expanded', 'false');\n self.$selection.removeAttr('aria-activedescendant');\n self.$selection.removeAttr('aria-owns');\n\n self.$selection.focus();\n\n self._detachCloseHandler(container);\n });\n\n container.on('enable', function () {\n self.$selection.attr('tabindex', self._tabindex);\n });\n\n container.on('disable', function () {\n self.$selection.attr('tabindex', '-1');\n });\n };\n\n BaseSelection.prototype._handleBlur = function (evt) {\n var self = this;\n\n // This needs to be delayed as the active element is the body when the tab\n // key is pressed, possibly along with others.\n window.setTimeout(function () {\n // Don't trigger `blur` if the focus is still in the selection\n if (\n (document.activeElement == self.$selection[0]) ||\n ($.contains(self.$selection[0], document.activeElement))\n ) {\n return;\n }\n\n self.trigger('blur', evt);\n }, 1);\n };\n\n BaseSelection.prototype._attachCloseHandler = function (container) {\n var self = this;\n\n $(document.body).on('mousedown.select2.' + container.id, function (e) {\n var $target = $(e.target);\n\n var $select = $target.closest('.select2');\n\n var $all = $('.select2.select2-container--open');\n\n $all.each(function () {\n var $this = $(this);\n\n if (this == $select[0]) {\n return;\n }\n\n var $element = $this.data('element');\n\n $element.select2('close');\n });\n });\n };\n\n BaseSelection.prototype._detachCloseHandler = function (container) {\n $(document.body).off('mousedown.select2.' + container.id);\n };\n\n BaseSelection.prototype.position = function ($selection, $container) {\n var $selectionContainer = $container.find('.selection');\n $selectionContainer.append($selection);\n };\n\n BaseSelection.prototype.destroy = function () {\n this._detachCloseHandler(this.container);\n };\n\n BaseSelection.prototype.update = function (data) {\n throw new Error('The `update` method must be defined in child classes.');\n };\n\n return BaseSelection;\n});\n\nS2.define('select2/selection/single',[\n 'jquery',\n './base',\n '../utils',\n '../keys'\n], function ($, BaseSelection, Utils, KEYS) {\n function SingleSelection () {\n SingleSelection.__super__.constructor.apply(this, arguments);\n }\n\n Utils.Extend(SingleSelection, BaseSelection);\n\n SingleSelection.prototype.render = function () {\n var $selection = SingleSelection.__super__.render.call(this);\n\n $selection.addClass('select2-selection--single');\n\n $selection.html(\n '<span class=\"select2-selection__rendered\"></span>' +\n '<span class=\"select2-selection__arrow\" role=\"presentation\">' +\n '<b role=\"presentation\"></b>' +\n '</span>'\n );\n\n return $selection;\n };\n\n SingleSelection.prototype.bind = function (container, $container) {\n var self = this;\n\n SingleSelection.__super__.bind.apply(this, arguments);\n\n var id = container.id + '-container';\n\n this.$selection.find('.select2-selection__rendered').attr('id', id);\n this.$selection.attr('aria-labelledby', id);\n\n this.$selection.on('mousedown', function (evt) {\n // Only respond to left clicks\n if (evt.which !== 1) {\n return;\n }\n\n self.trigger('toggle', {\n originalEvent: evt\n });\n });\n\n this.$selection.on('focus', function (evt) {\n // User focuses on the container\n });\n\n this.$selection.on('blur', function (evt) {\n // User exits the container\n });\n\n container.on('selection:update', function (params) {\n self.update(params.data);\n });\n };\n\n SingleSelection.prototype.clear = function () {\n this.$selection.find('.select2-selection__rendered').empty();\n };\n\n SingleSelection.prototype.display = function (data, container) {\n var template = this.options.get('templateSelection');\n var escapeMarkup = this.options.get('escapeMarkup');\n\n return escapeMarkup(template(data, container));\n };\n\n SingleSelection.prototype.selectionContainer = function () {\n return $('<span></span>');\n };\n\n SingleSelection.prototype.update = function (data) {\n if (data.length === 0) {\n this.clear();\n return;\n }\n\n var selection = data[0];\n\n var $rendered = this.$selection.find('.select2-selection__rendered');\n var formatted = this.display(selection, $rendered);\n\n $rendered.empty().append(formatted);\n $rendered.prop('title', selection.title || selection.text);\n };\n\n return SingleSelection;\n});\n\nS2.define('select2/selection/multiple',[\n 'jquery',\n './base',\n '../utils'\n], function ($, BaseSelection, Utils) {\n function MultipleSelection ($element, options) {\n MultipleSelection.__super__.constructor.apply(this, arguments);\n }\n\n Utils.Extend(MultipleSelection, BaseSelection);\n\n MultipleSelection.prototype.render = function () {\n var $selection = MultipleSelection.__super__.render.call(this);\n\n $selection.addClass('select2-selection--multiple');\n\n $selection.html(\n '<ul class=\"select2-selection__rendered\"></ul>'\n );\n\n return $selection;\n };\n\n MultipleSelection.prototype.bind = function (container, $container) {\n var self = this;\n\n MultipleSelection.__super__.bind.apply(this, arguments);\n\n this.$selection.on('click', function (evt) {\n self.trigger('toggle', {\n originalEvent: evt\n });\n });\n\n this.$selection.on(\n 'click',\n '.select2-selection__choice__remove',\n function (evt) {\n // Ignore the event if it is disabled\n if (self.options.get('disabled')) {\n return;\n }\n\n var $remove = $(this);\n var $selection = $remove.parent();\n\n var data = $selection.data('data');\n\n self.trigger('unselect', {\n originalEvent: evt,\n data: data\n });\n }\n );\n };\n\n MultipleSelection.prototype.clear = function () {\n this.$selection.find('.select2-selection__rendered').empty();\n };\n\n MultipleSelection.prototype.display = function (data, container) {\n var template = this.options.get('templateSelection');\n var escapeMarkup = this.options.get('escapeMarkup');\n\n return escapeMarkup(template(data, container));\n };\n\n MultipleSelection.prototype.selectionContainer = function () {\n var $container = $(\n '<li class=\"select2-selection__choice\">' +\n '<span class=\"select2-selection__choice__remove\" role=\"presentation\">' +\n '×' +\n '</span>' +\n '</li>'\n );\n\n return $container;\n };\n\n MultipleSelection.prototype.update = function (data) {\n this.clear();\n\n if (data.length === 0) {\n return;\n }\n\n var $selections = [];\n\n for (var d = 0; d < data.length; d++) {\n var selection = data[d];\n\n var $selection = this.selectionContainer();\n var formatted = this.display(selection, $selection);\n\n $selection.append(formatted);\n $selection.prop('title', selection.title || selection.text);\n\n $selection.data('data', selection);\n\n $selections.push($selection);\n }\n\n var $rendered = this.$selection.find('.select2-selection__rendered');\n\n Utils.appendMany($rendered, $selections);\n };\n\n return MultipleSelection;\n});\n\nS2.define('select2/selection/placeholder',[\n '../utils'\n], function (Utils) {\n function Placeholder (decorated, $element, options) {\n this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\n\n decorated.call(this, $element, options);\n }\n\n Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {\n if (typeof placeholder === 'string') {\n placeholder = {\n id: '',\n text: placeholder\n };\n }\n\n return placeholder;\n };\n\n Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {\n var $placeholder = this.selectionContainer();\n\n $placeholder.html(this.display(placeholder));\n $placeholder.addClass('select2-selection__placeholder')\n .removeClass('select2-selection__choice');\n\n return $placeholder;\n };\n\n Placeholder.prototype.update = function (decorated, data) {\n var singlePlaceholder = (\n data.length == 1 && data[0].id != this.placeholder.id\n );\n var multipleSelections = data.length > 1;\n\n if (multipleSelections || singlePlaceholder) {\n return decorated.call(this, data);\n }\n\n this.clear();\n\n var $placeholder = this.createPlaceholder(this.placeholder);\n\n this.$selection.find('.select2-selection__rendered').append($placeholder);\n };\n\n return Placeholder;\n});\n\nS2.define('select2/selection/allowClear',[\n 'jquery',\n '../keys'\n], function ($, KEYS) {\n function AllowClear () { }\n\n AllowClear.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n if (this.placeholder == null) {\n if (this.options.get('debug') && window.console && console.error) {\n console.error(\n 'Select2: The `allowClear` option should be used in combination ' +\n 'with the `placeholder` option.'\n );\n }\n }\n\n this.$selection.on('mousedown', '.select2-selection__clear',\n function (evt) {\n self._handleClear(evt);\n });\n\n container.on('keypress', function (evt) {\n self._handleKeyboardClear(evt, container);\n });\n };\n\n AllowClear.prototype._handleClear = function (_, evt) {\n // Ignore the event if it is disabled\n if (this.options.get('disabled')) {\n return;\n }\n\n var $clear = this.$selection.find('.select2-selection__clear');\n\n // Ignore the event if nothing has been selected\n if ($clear.length === 0) {\n return;\n }\n\n evt.stopPropagation();\n\n var data = $clear.data('data');\n\n for (var d = 0; d < data.length; d++) {\n var unselectData = {\n data: data[d]\n };\n\n // Trigger the `unselect` event, so people can prevent it from being\n // cleared.\n this.trigger('unselect', unselectData);\n\n // If the event was prevented, don't clear it out.\n if (unselectData.prevented) {\n return;\n }\n }\n\n this.$element.val(this.placeholder.id).trigger('change');\n\n this.trigger('toggle', {});\n };\n\n AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {\n if (container.isOpen()) {\n return;\n }\n\n if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {\n this._handleClear(evt);\n }\n };\n\n AllowClear.prototype.update = function (decorated, data) {\n decorated.call(this, data);\n\n if (this.$selection.find('.select2-selection__placeholder').length > 0 ||\n data.length === 0) {\n return;\n }\n\n var $remove = $(\n '<span class=\"select2-selection__clear\">' +\n '×' +\n '</span>'\n );\n $remove.data('data', data);\n\n this.$selection.find('.select2-selection__rendered').prepend($remove);\n };\n\n return AllowClear;\n});\n\nS2.define('select2/selection/search',[\n 'jquery',\n '../utils',\n '../keys'\n], function ($, Utils, KEYS) {\n function Search (decorated, $element, options) {\n decorated.call(this, $element, options);\n }\n\n Search.prototype.render = function (decorated) {\n var $search = $(\n '<li class=\"select2-search select2-search--inline\">' +\n '<input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\"' +\n ' autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\"' +\n ' spellcheck=\"false\" role=\"textbox\" aria-autocomplete=\"list\" />' +\n '</li>'\n );\n\n this.$searchContainer = $search;\n this.$search = $search.find('input');\n\n var $rendered = decorated.call(this);\n\n this._transferTabIndex();\n\n return $rendered;\n };\n\n Search.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('open', function () {\n self.$search.trigger('focus');\n });\n\n container.on('close', function () {\n self.$search.val('');\n self.$search.removeAttr('aria-activedescendant');\n self.$search.trigger('focus');\n });\n\n container.on('enable', function () {\n self.$search.prop('disabled', false);\n\n self._transferTabIndex();\n });\n\n container.on('disable', function () {\n self.$search.prop('disabled', true);\n });\n\n container.on('focus', function (evt) {\n self.$search.trigger('focus');\n });\n\n container.on('results:focus', function (params) {\n self.$search.attr('aria-activedescendant', params.id);\n });\n\n this.$selection.on('focusin', '.select2-search--inline', function (evt) {\n self.trigger('focus', evt);\n });\n\n this.$selection.on('focusout', '.select2-search--inline', function (evt) {\n self._handleBlur(evt);\n });\n\n this.$selection.on('keydown', '.select2-search--inline', function (evt) {\n evt.stopPropagation();\n\n self.trigger('keypress', evt);\n\n self._keyUpPrevented = evt.isDefaultPrevented();\n\n var key = evt.which;\n\n if (key === KEYS.BACKSPACE && self.$search.val() === '') {\n var $previousChoice = self.$searchContainer\n .prev('.select2-selection__choice');\n\n if ($previousChoice.length > 0) {\n var item = $previousChoice.data('data');\n\n self.searchRemoveChoice(item);\n\n evt.preventDefault();\n }\n }\n });\n\n // Try to detect the IE version should the `documentMode` property that\n // is stored on the document. This is only implemented in IE and is\n // slightly cleaner than doing a user agent check.\n // This property is not available in Edge, but Edge also doesn't have\n // this bug.\n var msie = document.documentMode;\n var disableInputEvents = msie && msie <= 11;\n\n // Workaround for browsers which do not support the `input` event\n // This will prevent double-triggering of events for browsers which support\n // both the `keyup` and `input` events.\n this.$selection.on(\n 'input.searchcheck',\n '.select2-search--inline',\n function (evt) {\n // IE will trigger the `input` event when a placeholder is used on a\n // search box. To get around this issue, we are forced to ignore all\n // `input` events in IE and keep using `keyup`.\n if (disableInputEvents) {\n self.$selection.off('input.search input.searchcheck');\n return;\n }\n\n // Unbind the duplicated `keyup` event\n self.$selection.off('keyup.search');\n }\n );\n\n this.$selection.on(\n 'keyup.search input.search',\n '.select2-search--inline',\n function (evt) {\n // IE will trigger the `input` event when a placeholder is used on a\n // search box. To get around this issue, we are forced to ignore all\n // `input` events in IE and keep using `keyup`.\n if (disableInputEvents && evt.type === 'input') {\n self.$selection.off('input.search input.searchcheck');\n return;\n }\n\n var key = evt.which;\n\n // We can freely ignore events from modifier keys\n if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {\n return;\n }\n\n // Tabbing will be handled during the `keydown` phase\n if (key == KEYS.TAB) {\n return;\n }\n\n self.handleSearch(evt);\n }\n );\n };\n\n /**\n * This method will transfer the tabindex attribute from the rendered\n * selection to the search box. This allows for the search box to be used as\n * the primary focus instead of the selection container.\n *\n * @private\n */\n Search.prototype._transferTabIndex = function (decorated) {\n this.$search.attr('tabindex', this.$selection.attr('tabindex'));\n this.$selection.attr('tabindex', '-1');\n };\n\n Search.prototype.createPlaceholder = function (decorated, placeholder) {\n this.$search.attr('placeholder', placeholder.text);\n };\n\n Search.prototype.update = function (decorated, data) {\n var searchHadFocus = this.$search[0] == document.activeElement;\n\n this.$search.attr('placeholder', '');\n\n decorated.call(this, data);\n\n this.$selection.find('.select2-selection__rendered')\n .append(this.$searchContainer);\n\n this.resizeSearch();\n if (searchHadFocus) {\n this.$search.focus();\n }\n };\n\n Search.prototype.handleSearch = function () {\n this.resizeSearch();\n\n if (!this._keyUpPrevented) {\n var input = this.$search.val();\n\n this.trigger('query', {\n term: input\n });\n }\n\n this._keyUpPrevented = false;\n };\n\n Search.prototype.searchRemoveChoice = function (decorated, item) {\n this.trigger('unselect', {\n data: item\n });\n\n this.$search.val(item.text);\n this.handleSearch();\n };\n\n Search.prototype.resizeSearch = function () {\n this.$search.css('width', '25px');\n\n var width = '';\n\n if (this.$search.attr('placeholder') !== '') {\n width = this.$selection.find('.select2-selection__rendered').innerWidth();\n } else {\n var minimumWidth = this.$search.val().length + 1;\n\n width = (minimumWidth * 0.75) + 'em';\n }\n\n this.$search.css('width', width);\n };\n\n return Search;\n});\n\nS2.define('select2/selection/eventRelay',[\n 'jquery'\n], function ($) {\n function EventRelay () { }\n\n EventRelay.prototype.bind = function (decorated, container, $container) {\n var self = this;\n var relayEvents = [\n 'open', 'opening',\n 'close', 'closing',\n 'select', 'selecting',\n 'unselect', 'unselecting'\n ];\n\n var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];\n\n decorated.call(this, container, $container);\n\n container.on('*', function (name, params) {\n // Ignore events that should not be relayed\n if ($.inArray(name, relayEvents) === -1) {\n return;\n }\n\n // The parameters should always be an object\n params = params || {};\n\n // Generate the jQuery event for the Select2 event\n var evt = $.Event('select2:' + name, {\n params: params\n });\n\n self.$element.trigger(evt);\n\n // Only handle preventable events if it was one\n if ($.inArray(name, preventableEvents) === -1) {\n return;\n }\n\n params.prevented = evt.isDefaultPrevented();\n });\n };\n\n return EventRelay;\n});\n\nS2.define('select2/translation',[\n 'jquery',\n 'require'\n], function ($, require) {\n function Translation (dict) {\n this.dict = dict || {};\n }\n\n Translation.prototype.all = function () {\n return this.dict;\n };\n\n Translation.prototype.get = function (key) {\n return this.dict[key];\n };\n\n Translation.prototype.extend = function (translation) {\n this.dict = $.extend({}, translation.all(), this.dict);\n };\n\n // Static functions\n\n Translation._cache = {};\n\n Translation.loadPath = function (path) {\n if (!(path in Translation._cache)) {\n var translations = require(path);\n\n Translation._cache[path] = translations;\n }\n\n return new Translation(Translation._cache[path]);\n };\n\n return Translation;\n});\n\nS2.define('select2/diacritics',[\n\n], function () {\n var diacritics = {\n '\\u24B6': 'A',\n '\\uFF21': 'A',\n '\\u00C0': 'A',\n '\\u00C1': 'A',\n '\\u00C2': 'A',\n '\\u1EA6': 'A',\n '\\u1EA4': 'A',\n '\\u1EAA': 'A',\n '\\u1EA8': 'A',\n '\\u00C3': 'A',\n '\\u0100': 'A',\n '\\u0102': 'A',\n '\\u1EB0': 'A',\n '\\u1EAE': 'A',\n '\\u1EB4': 'A',\n '\\u1EB2': 'A',\n '\\u0226': 'A',\n '\\u01E0': 'A',\n '\\u00C4': 'A',\n '\\u01DE': 'A',\n '\\u1EA2': 'A',\n '\\u00C5': 'A',\n '\\u01FA': 'A',\n '\\u01CD': 'A',\n '\\u0200': 'A',\n '\\u0202': 'A',\n '\\u1EA0': 'A',\n '\\u1EAC': 'A',\n '\\u1EB6': 'A',\n '\\u1E00': 'A',\n '\\u0104': 'A',\n '\\u023A': 'A',\n '\\u2C6F': 'A',\n '\\uA732': 'AA',\n '\\u00C6': 'AE',\n '\\u01FC': 'AE',\n '\\u01E2': 'AE',\n '\\uA734': 'AO',\n '\\uA736': 'AU',\n '\\uA738': 'AV',\n '\\uA73A': 'AV',\n '\\uA73C': 'AY',\n '\\u24B7': 'B',\n '\\uFF22': 'B',\n '\\u1E02': 'B',\n '\\u1E04': 'B',\n '\\u1E06': 'B',\n '\\u0243': 'B',\n '\\u0182': 'B',\n '\\u0181': 'B',\n '\\u24B8': 'C',\n '\\uFF23': 'C',\n '\\u0106': 'C',\n '\\u0108': 'C',\n '\\u010A': 'C',\n '\\u010C': 'C',\n '\\u00C7': 'C',\n '\\u1E08': 'C',\n '\\u0187': 'C',\n '\\u023B': 'C',\n '\\uA73E': 'C',\n '\\u24B9': 'D',\n '\\uFF24': 'D',\n '\\u1E0A': 'D',\n '\\u010E': 'D',\n '\\u1E0C': 'D',\n '\\u1E10': 'D',\n '\\u1E12': 'D',\n '\\u1E0E': 'D',\n '\\u0110': 'D',\n '\\u018B': 'D',\n '\\u018A': 'D',\n '\\u0189': 'D',\n '\\uA779': 'D',\n '\\u01F1': 'DZ',\n '\\u01C4': 'DZ',\n '\\u01F2': 'Dz',\n '\\u01C5': 'Dz',\n '\\u24BA': 'E',\n '\\uFF25': 'E',\n '\\u00C8': 'E',\n '\\u00C9': 'E',\n '\\u00CA': 'E',\n '\\u1EC0': 'E',\n '\\u1EBE': 'E',\n '\\u1EC4': 'E',\n '\\u1EC2': 'E',\n '\\u1EBC': 'E',\n '\\u0112': 'E',\n '\\u1E14': 'E',\n '\\u1E16': 'E',\n '\\u0114': 'E',\n '\\u0116': 'E',\n '\\u00CB': 'E',\n '\\u1EBA': 'E',\n '\\u011A': 'E',\n '\\u0204': 'E',\n '\\u0206': 'E',\n '\\u1EB8': 'E',\n '\\u1EC6': 'E',\n '\\u0228': 'E',\n '\\u1E1C': 'E',\n '\\u0118': 'E',\n '\\u1E18': 'E',\n '\\u1E1A': 'E',\n '\\u0190': 'E',\n '\\u018E': 'E',\n '\\u24BB': 'F',\n '\\uFF26': 'F',\n '\\u1E1E': 'F',\n '\\u0191': 'F',\n '\\uA77B': 'F',\n '\\u24BC': 'G',\n '\\uFF27': 'G',\n '\\u01F4': 'G',\n '\\u011C': 'G',\n '\\u1E20': 'G',\n '\\u011E': 'G',\n '\\u0120': 'G',\n '\\u01E6': 'G',\n '\\u0122': 'G',\n '\\u01E4': 'G',\n '\\u0193': 'G',\n '\\uA7A0': 'G',\n '\\uA77D': 'G',\n '\\uA77E': 'G',\n '\\u24BD': 'H',\n '\\uFF28': 'H',\n '\\u0124': 'H',\n '\\u1E22': 'H',\n '\\u1E26': 'H',\n '\\u021E': 'H',\n '\\u1E24': 'H',\n '\\u1E28': 'H',\n '\\u1E2A': 'H',\n '\\u0126': 'H',\n '\\u2C67': 'H',\n '\\u2C75': 'H',\n '\\uA78D': 'H',\n '\\u24BE': 'I',\n '\\uFF29': 'I',\n '\\u00CC': 'I',\n '\\u00CD': 'I',\n '\\u00CE': 'I',\n '\\u0128': 'I',\n '\\u012A': 'I',\n '\\u012C': 'I',\n '\\u0130': 'I',\n '\\u00CF': 'I',\n '\\u1E2E': 'I',\n '\\u1EC8': 'I',\n '\\u01CF': 'I',\n '\\u0208': 'I',\n '\\u020A': 'I',\n '\\u1ECA': 'I',\n '\\u012E': 'I',\n '\\u1E2C': 'I',\n '\\u0197': 'I',\n '\\u24BF': 'J',\n '\\uFF2A': 'J',\n '\\u0134': 'J',\n '\\u0248': 'J',\n '\\u24C0': 'K',\n '\\uFF2B': 'K',\n '\\u1E30': 'K',\n '\\u01E8': 'K',\n '\\u1E32': 'K',\n '\\u0136': 'K',\n '\\u1E34': 'K',\n '\\u0198': 'K',\n '\\u2C69': 'K',\n '\\uA740': 'K',\n '\\uA742': 'K',\n '\\uA744': 'K',\n '\\uA7A2': 'K',\n '\\u24C1': 'L',\n '\\uFF2C': 'L',\n '\\u013F': 'L',\n '\\u0139': 'L',\n '\\u013D': 'L',\n '\\u1E36': 'L',\n '\\u1E38': 'L',\n '\\u013B': 'L',\n '\\u1E3C': 'L',\n '\\u1E3A': 'L',\n '\\u0141': 'L',\n '\\u023D': 'L',\n '\\u2C62': 'L',\n '\\u2C60': 'L',\n '\\uA748': 'L',\n '\\uA746': 'L',\n '\\uA780': 'L',\n '\\u01C7': 'LJ',\n '\\u01C8': 'Lj',\n '\\u24C2': 'M',\n '\\uFF2D': 'M',\n '\\u1E3E': 'M',\n '\\u1E40': 'M',\n '\\u1E42': 'M',\n '\\u2C6E': 'M',\n '\\u019C': 'M',\n '\\u24C3': 'N',\n '\\uFF2E': 'N',\n '\\u01F8': 'N',\n '\\u0143': 'N',\n '\\u00D1': 'N',\n '\\u1E44': 'N',\n '\\u0147': 'N',\n '\\u1E46': 'N',\n '\\u0145': 'N',\n '\\u1E4A': 'N',\n '\\u1E48': 'N',\n '\\u0220': 'N',\n '\\u019D': 'N',\n '\\uA790': 'N',\n '\\uA7A4': 'N',\n '\\u01CA': 'NJ',\n '\\u01CB': 'Nj',\n '\\u24C4': 'O',\n '\\uFF2F': 'O',\n '\\u00D2': 'O',\n '\\u00D3': 'O',\n '\\u00D4': 'O',\n '\\u1ED2': 'O',\n '\\u1ED0': 'O',\n '\\u1ED6': 'O',\n '\\u1ED4': 'O',\n '\\u00D5': 'O',\n '\\u1E4C': 'O',\n '\\u022C': 'O',\n '\\u1E4E': 'O',\n '\\u014C': 'O',\n '\\u1E50': 'O',\n '\\u1E52': 'O',\n '\\u014E': 'O',\n '\\u022E': 'O',\n '\\u0230': 'O',\n '\\u00D6': 'O',\n '\\u022A': 'O',\n '\\u1ECE': 'O',\n '\\u0150': 'O',\n '\\u01D1': 'O',\n '\\u020C': 'O',\n '\\u020E': 'O',\n '\\u01A0': 'O',\n '\\u1EDC': 'O',\n '\\u1EDA': 'O',\n '\\u1EE0': 'O',\n '\\u1EDE': 'O',\n '\\u1EE2': 'O',\n '\\u1ECC': 'O',\n '\\u1ED8': 'O',\n '\\u01EA': 'O',\n '\\u01EC': 'O',\n '\\u00D8': 'O',\n '\\u01FE': 'O',\n '\\u0186': 'O',\n '\\u019F': 'O',\n '\\uA74A': 'O',\n '\\uA74C': 'O',\n '\\u01A2': 'OI',\n '\\uA74E': 'OO',\n '\\u0222': 'OU',\n '\\u24C5': 'P',\n '\\uFF30': 'P',\n '\\u1E54': 'P',\n '\\u1E56': 'P',\n '\\u01A4': 'P',\n '\\u2C63': 'P',\n '\\uA750': 'P',\n '\\uA752': 'P',\n '\\uA754': 'P',\n '\\u24C6': 'Q',\n '\\uFF31': 'Q',\n '\\uA756': 'Q',\n '\\uA758': 'Q',\n '\\u024A': 'Q',\n '\\u24C7': 'R',\n '\\uFF32': 'R',\n '\\u0154': 'R',\n '\\u1E58': 'R',\n '\\u0158': 'R',\n '\\u0210': 'R',\n '\\u0212': 'R',\n '\\u1E5A': 'R',\n '\\u1E5C': 'R',\n '\\u0156': 'R',\n '\\u1E5E': 'R',\n '\\u024C': 'R',\n '\\u2C64': 'R',\n '\\uA75A': 'R',\n '\\uA7A6': 'R',\n '\\uA782': 'R',\n '\\u24C8': 'S',\n '\\uFF33': 'S',\n '\\u1E9E': 'S',\n '\\u015A': 'S',\n '\\u1E64': 'S',\n '\\u015C': 'S',\n '\\u1E60': 'S',\n '\\u0160': 'S',\n '\\u1E66': 'S',\n '\\u1E62': 'S',\n '\\u1E68': 'S',\n '\\u0218': 'S',\n '\\u015E': 'S',\n '\\u2C7E': 'S',\n '\\uA7A8': 'S',\n '\\uA784': 'S',\n '\\u24C9': 'T',\n '\\uFF34': 'T',\n '\\u1E6A': 'T',\n '\\u0164': 'T',\n '\\u1E6C': 'T',\n '\\u021A': 'T',\n '\\u0162': 'T',\n '\\u1E70': 'T',\n '\\u1E6E': 'T',\n '\\u0166': 'T',\n '\\u01AC': 'T',\n '\\u01AE': 'T',\n '\\u023E': 'T',\n '\\uA786': 'T',\n '\\uA728': 'TZ',\n '\\u24CA': 'U',\n '\\uFF35': 'U',\n '\\u00D9': 'U',\n '\\u00DA': 'U',\n '\\u00DB': 'U',\n '\\u0168': 'U',\n '\\u1E78': 'U',\n '\\u016A': 'U',\n '\\u1E7A': 'U',\n '\\u016C': 'U',\n '\\u00DC': 'U',\n '\\u01DB': 'U',\n '\\u01D7': 'U',\n '\\u01D5': 'U',\n '\\u01D9': 'U',\n '\\u1EE6': 'U',\n '\\u016E': 'U',\n '\\u0170': 'U',\n '\\u01D3': 'U',\n '\\u0214': 'U',\n '\\u0216': 'U',\n '\\u01AF': 'U',\n '\\u1EEA': 'U',\n '\\u1EE8': 'U',\n '\\u1EEE': 'U',\n '\\u1EEC': 'U',\n '\\u1EF0': 'U',\n '\\u1EE4': 'U',\n '\\u1E72': 'U',\n '\\u0172': 'U',\n '\\u1E76': 'U',\n '\\u1E74': 'U',\n '\\u0244': 'U',\n '\\u24CB': 'V',\n '\\uFF36': 'V',\n '\\u1E7C': 'V',\n '\\u1E7E': 'V',\n '\\u01B2': 'V',\n '\\uA75E': 'V',\n '\\u0245': 'V',\n '\\uA760': 'VY',\n '\\u24CC': 'W',\n '\\uFF37': 'W',\n '\\u1E80': 'W',\n '\\u1E82': 'W',\n '\\u0174': 'W',\n '\\u1E86': 'W',\n '\\u1E84': 'W',\n '\\u1E88': 'W',\n '\\u2C72': 'W',\n '\\u24CD': 'X',\n '\\uFF38': 'X',\n '\\u1E8A': 'X',\n '\\u1E8C': 'X',\n '\\u24CE': 'Y',\n '\\uFF39': 'Y',\n '\\u1EF2': 'Y',\n '\\u00DD': 'Y',\n '\\u0176': 'Y',\n '\\u1EF8': 'Y',\n '\\u0232': 'Y',\n '\\u1E8E': 'Y',\n '\\u0178': 'Y',\n '\\u1EF6': 'Y',\n '\\u1EF4': 'Y',\n '\\u01B3': 'Y',\n '\\u024E': 'Y',\n '\\u1EFE': 'Y',\n '\\u24CF': 'Z',\n '\\uFF3A': 'Z',\n '\\u0179': 'Z',\n '\\u1E90': 'Z',\n '\\u017B': 'Z',\n '\\u017D': 'Z',\n '\\u1E92': 'Z',\n '\\u1E94': 'Z',\n '\\u01B5': 'Z',\n '\\u0224': 'Z',\n '\\u2C7F': 'Z',\n '\\u2C6B': 'Z',\n '\\uA762': 'Z',\n '\\u24D0': 'a',\n '\\uFF41': 'a',\n '\\u1E9A': 'a',\n '\\u00E0': 'a',\n '\\u00E1': 'a',\n '\\u00E2': 'a',\n '\\u1EA7': 'a',\n '\\u1EA5': 'a',\n '\\u1EAB': 'a',\n '\\u1EA9': 'a',\n '\\u00E3': 'a',\n '\\u0101': 'a',\n '\\u0103': 'a',\n '\\u1EB1': 'a',\n '\\u1EAF': 'a',\n '\\u1EB5': 'a',\n '\\u1EB3': 'a',\n '\\u0227': 'a',\n '\\u01E1': 'a',\n '\\u00E4': 'a',\n '\\u01DF': 'a',\n '\\u1EA3': 'a',\n '\\u00E5': 'a',\n '\\u01FB': 'a',\n '\\u01CE': 'a',\n '\\u0201': 'a',\n '\\u0203': 'a',\n '\\u1EA1': 'a',\n '\\u1EAD': 'a',\n '\\u1EB7': 'a',\n '\\u1E01': 'a',\n '\\u0105': 'a',\n '\\u2C65': 'a',\n '\\u0250': 'a',\n '\\uA733': 'aa',\n '\\u00E6': 'ae',\n '\\u01FD': 'ae',\n '\\u01E3': 'ae',\n '\\uA735': 'ao',\n '\\uA737': 'au',\n '\\uA739': 'av',\n '\\uA73B': 'av',\n '\\uA73D': 'ay',\n '\\u24D1': 'b',\n '\\uFF42': 'b',\n '\\u1E03': 'b',\n '\\u1E05': 'b',\n '\\u1E07': 'b',\n '\\u0180': 'b',\n '\\u0183': 'b',\n '\\u0253': 'b',\n '\\u24D2': 'c',\n '\\uFF43': 'c',\n '\\u0107': 'c',\n '\\u0109': 'c',\n '\\u010B': 'c',\n '\\u010D': 'c',\n '\\u00E7': 'c',\n '\\u1E09': 'c',\n '\\u0188': 'c',\n '\\u023C': 'c',\n '\\uA73F': 'c',\n '\\u2184': 'c',\n '\\u24D3': 'd',\n '\\uFF44': 'd',\n '\\u1E0B': 'd',\n '\\u010F': 'd',\n '\\u1E0D': 'd',\n '\\u1E11': 'd',\n '\\u1E13': 'd',\n '\\u1E0F': 'd',\n '\\u0111': 'd',\n '\\u018C': 'd',\n '\\u0256': 'd',\n '\\u0257': 'd',\n '\\uA77A': 'd',\n '\\u01F3': 'dz',\n '\\u01C6': 'dz',\n '\\u24D4': 'e',\n '\\uFF45': 'e',\n '\\u00E8': 'e',\n '\\u00E9': 'e',\n '\\u00EA': 'e',\n '\\u1EC1': 'e',\n '\\u1EBF': 'e',\n '\\u1EC5': 'e',\n '\\u1EC3': 'e',\n '\\u1EBD': 'e',\n '\\u0113': 'e',\n '\\u1E15': 'e',\n '\\u1E17': 'e',\n '\\u0115': 'e',\n '\\u0117': 'e',\n '\\u00EB': 'e',\n '\\u1EBB': 'e',\n '\\u011B': 'e',\n '\\u0205': 'e',\n '\\u0207': 'e',\n '\\u1EB9': 'e',\n '\\u1EC7': 'e',\n '\\u0229': 'e',\n '\\u1E1D': 'e',\n '\\u0119': 'e',\n '\\u1E19': 'e',\n '\\u1E1B': 'e',\n '\\u0247': 'e',\n '\\u025B': 'e',\n '\\u01DD': 'e',\n '\\u24D5': 'f',\n '\\uFF46': 'f',\n '\\u1E1F': 'f',\n '\\u0192': 'f',\n '\\uA77C': 'f',\n '\\u24D6': 'g',\n '\\uFF47': 'g',\n '\\u01F5': 'g',\n '\\u011D': 'g',\n '\\u1E21': 'g',\n '\\u011F': 'g',\n '\\u0121': 'g',\n '\\u01E7': 'g',\n '\\u0123': 'g',\n '\\u01E5': 'g',\n '\\u0260': 'g',\n '\\uA7A1': 'g',\n '\\u1D79': 'g',\n '\\uA77F': 'g',\n '\\u24D7': 'h',\n '\\uFF48': 'h',\n '\\u0125': 'h',\n '\\u1E23': 'h',\n '\\u1E27': 'h',\n '\\u021F': 'h',\n '\\u1E25': 'h',\n '\\u1E29': 'h',\n '\\u1E2B': 'h',\n '\\u1E96': 'h',\n '\\u0127': 'h',\n '\\u2C68': 'h',\n '\\u2C76': 'h',\n '\\u0265': 'h',\n '\\u0195': 'hv',\n '\\u24D8': 'i',\n '\\uFF49': 'i',\n '\\u00EC': 'i',\n '\\u00ED': 'i',\n '\\u00EE': 'i',\n '\\u0129': 'i',\n '\\u012B': 'i',\n '\\u012D': 'i',\n '\\u00EF': 'i',\n '\\u1E2F': 'i',\n '\\u1EC9': 'i',\n '\\u01D0': 'i',\n '\\u0209': 'i',\n '\\u020B': 'i',\n '\\u1ECB': 'i',\n '\\u012F': 'i',\n '\\u1E2D': 'i',\n '\\u0268': 'i',\n '\\u0131': 'i',\n '\\u24D9': 'j',\n '\\uFF4A': 'j',\n '\\u0135': 'j',\n '\\u01F0': 'j',\n '\\u0249': 'j',\n '\\u24DA': 'k',\n '\\uFF4B': 'k',\n '\\u1E31': 'k',\n '\\u01E9': 'k',\n '\\u1E33': 'k',\n '\\u0137': 'k',\n '\\u1E35': 'k',\n '\\u0199': 'k',\n '\\u2C6A': 'k',\n '\\uA741': 'k',\n '\\uA743': 'k',\n '\\uA745': 'k',\n '\\uA7A3': 'k',\n '\\u24DB': 'l',\n '\\uFF4C': 'l',\n '\\u0140': 'l',\n '\\u013A': 'l',\n '\\u013E': 'l',\n '\\u1E37': 'l',\n '\\u1E39': 'l',\n '\\u013C': 'l',\n '\\u1E3D': 'l',\n '\\u1E3B': 'l',\n '\\u017F': 'l',\n '\\u0142': 'l',\n '\\u019A': 'l',\n '\\u026B': 'l',\n '\\u2C61': 'l',\n '\\uA749': 'l',\n '\\uA781': 'l',\n '\\uA747': 'l',\n '\\u01C9': 'lj',\n '\\u24DC': 'm',\n '\\uFF4D': 'm',\n '\\u1E3F': 'm',\n '\\u1E41': 'm',\n '\\u1E43': 'm',\n '\\u0271': 'm',\n '\\u026F': 'm',\n '\\u24DD': 'n',\n '\\uFF4E': 'n',\n '\\u01F9': 'n',\n '\\u0144': 'n',\n '\\u00F1': 'n',\n '\\u1E45': 'n',\n '\\u0148': 'n',\n '\\u1E47': 'n',\n '\\u0146': 'n',\n '\\u1E4B': 'n',\n '\\u1E49': 'n',\n '\\u019E': 'n',\n '\\u0272': 'n',\n '\\u0149': 'n',\n '\\uA791': 'n',\n '\\uA7A5': 'n',\n '\\u01CC': 'nj',\n '\\u24DE': 'o',\n '\\uFF4F': 'o',\n '\\u00F2': 'o',\n '\\u00F3': 'o',\n '\\u00F4': 'o',\n '\\u1ED3': 'o',\n '\\u1ED1': 'o',\n '\\u1ED7': 'o',\n '\\u1ED5': 'o',\n '\\u00F5': 'o',\n '\\u1E4D': 'o',\n '\\u022D': 'o',\n '\\u1E4F': 'o',\n '\\u014D': 'o',\n '\\u1E51': 'o',\n '\\u1E53': 'o',\n '\\u014F': 'o',\n '\\u022F': 'o',\n '\\u0231': 'o',\n '\\u00F6': 'o',\n '\\u022B': 'o',\n '\\u1ECF': 'o',\n '\\u0151': 'o',\n '\\u01D2': 'o',\n '\\u020D': 'o',\n '\\u020F': 'o',\n '\\u01A1': 'o',\n '\\u1EDD': 'o',\n '\\u1EDB': 'o',\n '\\u1EE1': 'o',\n '\\u1EDF': 'o',\n '\\u1EE3': 'o',\n '\\u1ECD': 'o',\n '\\u1ED9': 'o',\n '\\u01EB': 'o',\n '\\u01ED': 'o',\n '\\u00F8': 'o',\n '\\u01FF': 'o',\n '\\u0254': 'o',\n '\\uA74B': 'o',\n '\\uA74D': 'o',\n '\\u0275': 'o',\n '\\u01A3': 'oi',\n '\\u0223': 'ou',\n '\\uA74F': 'oo',\n '\\u24DF': 'p',\n '\\uFF50': 'p',\n '\\u1E55': 'p',\n '\\u1E57': 'p',\n '\\u01A5': 'p',\n '\\u1D7D': 'p',\n '\\uA751': 'p',\n '\\uA753': 'p',\n '\\uA755': 'p',\n '\\u24E0': 'q',\n '\\uFF51': 'q',\n '\\u024B': 'q',\n '\\uA757': 'q',\n '\\uA759': 'q',\n '\\u24E1': 'r',\n '\\uFF52': 'r',\n '\\u0155': 'r',\n '\\u1E59': 'r',\n '\\u0159': 'r',\n '\\u0211': 'r',\n '\\u0213': 'r',\n '\\u1E5B': 'r',\n '\\u1E5D': 'r',\n '\\u0157': 'r',\n '\\u1E5F': 'r',\n '\\u024D': 'r',\n '\\u027D': 'r',\n '\\uA75B': 'r',\n '\\uA7A7': 'r',\n '\\uA783': 'r',\n '\\u24E2': 's',\n '\\uFF53': 's',\n '\\u00DF': 's',\n '\\u015B': 's',\n '\\u1E65': 's',\n '\\u015D': 's',\n '\\u1E61': 's',\n '\\u0161': 's',\n '\\u1E67': 's',\n '\\u1E63': 's',\n '\\u1E69': 's',\n '\\u0219': 's',\n '\\u015F': 's',\n '\\u023F': 's',\n '\\uA7A9': 's',\n '\\uA785': 's',\n '\\u1E9B': 's',\n '\\u24E3': 't',\n '\\uFF54': 't',\n '\\u1E6B': 't',\n '\\u1E97': 't',\n '\\u0165': 't',\n '\\u1E6D': 't',\n '\\u021B': 't',\n '\\u0163': 't',\n '\\u1E71': 't',\n '\\u1E6F': 't',\n '\\u0167': 't',\n '\\u01AD': 't',\n '\\u0288': 't',\n '\\u2C66': 't',\n '\\uA787': 't',\n '\\uA729': 'tz',\n '\\u24E4': 'u',\n '\\uFF55': 'u',\n '\\u00F9': 'u',\n '\\u00FA': 'u',\n '\\u00FB': 'u',\n '\\u0169': 'u',\n '\\u1E79': 'u',\n '\\u016B': 'u',\n '\\u1E7B': 'u',\n '\\u016D': 'u',\n '\\u00FC': 'u',\n '\\u01DC': 'u',\n '\\u01D8': 'u',\n '\\u01D6': 'u',\n '\\u01DA': 'u',\n '\\u1EE7': 'u',\n '\\u016F': 'u',\n '\\u0171': 'u',\n '\\u01D4': 'u',\n '\\u0215': 'u',\n '\\u0217': 'u',\n '\\u01B0': 'u',\n '\\u1EEB': 'u',\n '\\u1EE9': 'u',\n '\\u1EEF': 'u',\n '\\u1EED': 'u',\n '\\u1EF1': 'u',\n '\\u1EE5': 'u',\n '\\u1E73': 'u',\n '\\u0173': 'u',\n '\\u1E77': 'u',\n '\\u1E75': 'u',\n '\\u0289': 'u',\n '\\u24E5': 'v',\n '\\uFF56': 'v',\n '\\u1E7D': 'v',\n '\\u1E7F': 'v',\n '\\u028B': 'v',\n '\\uA75F': 'v',\n '\\u028C': 'v',\n '\\uA761': 'vy',\n '\\u24E6': 'w',\n '\\uFF57': 'w',\n '\\u1E81': 'w',\n '\\u1E83': 'w',\n '\\u0175': 'w',\n '\\u1E87': 'w',\n '\\u1E85': 'w',\n '\\u1E98': 'w',\n '\\u1E89': 'w',\n '\\u2C73': 'w',\n '\\u24E7': 'x',\n '\\uFF58': 'x',\n '\\u1E8B': 'x',\n '\\u1E8D': 'x',\n '\\u24E8': 'y',\n '\\uFF59': 'y',\n '\\u1EF3': 'y',\n '\\u00FD': 'y',\n '\\u0177': 'y',\n '\\u1EF9': 'y',\n '\\u0233': 'y',\n '\\u1E8F': 'y',\n '\\u00FF': 'y',\n '\\u1EF7': 'y',\n '\\u1E99': 'y',\n '\\u1EF5': 'y',\n '\\u01B4': 'y',\n '\\u024F': 'y',\n '\\u1EFF': 'y',\n '\\u24E9': 'z',\n '\\uFF5A': 'z',\n '\\u017A': 'z',\n '\\u1E91': 'z',\n '\\u017C': 'z',\n '\\u017E': 'z',\n '\\u1E93': 'z',\n '\\u1E95': 'z',\n '\\u01B6': 'z',\n '\\u0225': 'z',\n '\\u0240': 'z',\n '\\u2C6C': 'z',\n '\\uA763': 'z',\n '\\u0386': '\\u0391',\n '\\u0388': '\\u0395',\n '\\u0389': '\\u0397',\n '\\u038A': '\\u0399',\n '\\u03AA': '\\u0399',\n '\\u038C': '\\u039F',\n '\\u038E': '\\u03A5',\n '\\u03AB': '\\u03A5',\n '\\u038F': '\\u03A9',\n '\\u03AC': '\\u03B1',\n '\\u03AD': '\\u03B5',\n '\\u03AE': '\\u03B7',\n '\\u03AF': '\\u03B9',\n '\\u03CA': '\\u03B9',\n '\\u0390': '\\u03B9',\n '\\u03CC': '\\u03BF',\n '\\u03CD': '\\u03C5',\n '\\u03CB': '\\u03C5',\n '\\u03B0': '\\u03C5',\n '\\u03C9': '\\u03C9',\n '\\u03C2': '\\u03C3'\n };\n\n return diacritics;\n});\n\nS2.define('select2/data/base',[\n '../utils'\n], function (Utils) {\n function BaseAdapter ($element, options) {\n BaseAdapter.__super__.constructor.call(this);\n }\n\n Utils.Extend(BaseAdapter, Utils.Observable);\n\n BaseAdapter.prototype.current = function (callback) {\n throw new Error('The `current` method must be defined in child classes.');\n };\n\n BaseAdapter.prototype.query = function (params, callback) {\n throw new Error('The `query` method must be defined in child classes.');\n };\n\n BaseAdapter.prototype.bind = function (container, $container) {\n // Can be implemented in subclasses\n };\n\n BaseAdapter.prototype.destroy = function () {\n // Can be implemented in subclasses\n };\n\n BaseAdapter.prototype.generateResultId = function (container, data) {\n var id = container.id + '-result-';\n\n id += Utils.generateChars(4);\n\n if (data.id != null) {\n id += '-' + data.id.toString();\n } else {\n id += '-' + Utils.generateChars(4);\n }\n return id;\n };\n\n return BaseAdapter;\n});\n\nS2.define('select2/data/select',[\n './base',\n '../utils',\n 'jquery'\n], function (BaseAdapter, Utils, $) {\n function SelectAdapter ($element, options) {\n this.$element = $element;\n this.options = options;\n\n SelectAdapter.__super__.constructor.call(this);\n }\n\n Utils.Extend(SelectAdapter, BaseAdapter);\n\n SelectAdapter.prototype.current = function (callback) {\n var data = [];\n var self = this;\n\n this.$element.find(':selected').each(function () {\n var $option = $(this);\n\n var option = self.item($option);\n\n data.push(option);\n });\n\n callback(data);\n };\n\n SelectAdapter.prototype.select = function (data) {\n var self = this;\n\n data.selected = true;\n\n // If data.element is a DOM node, use it instead\n if ($(data.element).is('option')) {\n data.element.selected = true;\n\n this.$element.trigger('change');\n\n return;\n }\n\n if (this.$element.prop('multiple')) {\n this.current(function (currentData) {\n var val = [];\n\n data = [data];\n data.push.apply(data, currentData);\n\n for (var d = 0; d < data.length; d++) {\n var id = data[d].id;\n\n if ($.inArray(id, val) === -1) {\n val.push(id);\n }\n }\n\n self.$element.val(val);\n self.$element.trigger('change');\n });\n } else {\n var val = data.id;\n\n this.$element.val(val);\n this.$element.trigger('change');\n }\n };\n\n SelectAdapter.prototype.unselect = function (data) {\n var self = this;\n\n if (!this.$element.prop('multiple')) {\n return;\n }\n\n data.selected = false;\n\n if ($(data.element).is('option')) {\n data.element.selected = false;\n\n this.$element.trigger('change');\n\n return;\n }\n\n this.current(function (currentData) {\n var val = [];\n\n for (var d = 0; d < currentData.length; d++) {\n var id = currentData[d].id;\n\n if (id !== data.id && $.inArray(id, val) === -1) {\n val.push(id);\n }\n }\n\n self.$element.val(val);\n\n self.$element.trigger('change');\n });\n };\n\n SelectAdapter.prototype.bind = function (container, $container) {\n var self = this;\n\n this.container = container;\n\n container.on('select', function (params) {\n self.select(params.data);\n });\n\n container.on('unselect', function (params) {\n self.unselect(params.data);\n });\n };\n\n SelectAdapter.prototype.destroy = function () {\n // Remove anything added to child elements\n this.$element.find('*').each(function () {\n // Remove any custom data set by Select2\n $.removeData(this, 'data');\n });\n };\n\n SelectAdapter.prototype.query = function (params, callback) {\n var data = [];\n var self = this;\n\n var $options = this.$element.children();\n\n $options.each(function () {\n var $option = $(this);\n\n if (!$option.is('option') && !$option.is('optgroup')) {\n return;\n }\n\n var option = self.item($option);\n\n var matches = self.matches(params, option);\n\n if (matches !== null) {\n data.push(matches);\n }\n });\n\n callback({\n results: data\n });\n };\n\n SelectAdapter.prototype.addOptions = function ($options) {\n Utils.appendMany(this.$element, $options);\n };\n\n SelectAdapter.prototype.option = function (data) {\n var option;\n\n if (data.children) {\n option = document.createElement('optgroup');\n option.label = data.text;\n } else {\n option = document.createElement('option');\n\n if (option.textContent !== undefined) {\n option.textContent = data.text;\n } else {\n option.innerText = data.text;\n }\n }\n\n if (data.id) {\n option.value = data.id;\n }\n\n if (data.disabled) {\n option.disabled = true;\n }\n\n if (data.selected) {\n option.selected = true;\n }\n\n if (data.title) {\n option.title = data.title;\n }\n\n var $option = $(option);\n\n var normalizedData = this._normalizeItem(data);\n normalizedData.element = option;\n\n // Override the option's data with the combined data\n $.data(option, 'data', normalizedData);\n\n return $option;\n };\n\n SelectAdapter.prototype.item = function ($option) {\n var data = {};\n\n data = $.data($option[0], 'data');\n\n if (data != null) {\n return data;\n }\n\n if ($option.is('option')) {\n data = {\n id: $option.val(),\n text: $option.text(),\n disabled: $option.prop('disabled'),\n selected: $option.prop('selected'),\n title: $option.prop('title')\n };\n } else if ($option.is('optgroup')) {\n data = {\n text: $option.prop('label'),\n children: [],\n title: $option.prop('title')\n };\n\n var $children = $option.children('option');\n var children = [];\n\n for (var c = 0; c < $children.length; c++) {\n var $child = $($children[c]);\n\n var child = this.item($child);\n\n children.push(child);\n }\n\n data.children = children;\n }\n\n data = this._normalizeItem(data);\n data.element = $option[0];\n\n $.data($option[0], 'data', data);\n\n return data;\n };\n\n SelectAdapter.prototype._normalizeItem = function (item) {\n if (!$.isPlainObject(item)) {\n item = {\n id: item,\n text: item\n };\n }\n\n item = $.extend({}, {\n text: ''\n }, item);\n\n var defaults = {\n selected: false,\n disabled: false\n };\n\n if (item.id != null) {\n item.id = item.id.toString();\n }\n\n if (item.text != null) {\n item.text = item.text.toString();\n }\n\n if (item._resultId == null && item.id && this.container != null) {\n item._resultId = this.generateResultId(this.container, item);\n }\n\n return $.extend({}, defaults, item);\n };\n\n SelectAdapter.prototype.matches = function (params, data) {\n var matcher = this.options.get('matcher');\n\n return matcher(params, data);\n };\n\n return SelectAdapter;\n});\n\nS2.define('select2/data/array',[\n './select',\n '../utils',\n 'jquery'\n], function (SelectAdapter, Utils, $) {\n function ArrayAdapter ($element, options) {\n var data = options.get('data') || [];\n\n ArrayAdapter.__super__.constructor.call(this, $element, options);\n\n this.addOptions(this.convertToOptions(data));\n }\n\n Utils.Extend(ArrayAdapter, SelectAdapter);\n\n ArrayAdapter.prototype.select = function (data) {\n var $option = this.$element.find('option').filter(function (i, elm) {\n return elm.value == data.id.toString();\n });\n\n if ($option.length === 0) {\n $option = this.option(data);\n\n this.addOptions($option);\n }\n\n ArrayAdapter.__super__.select.call(this, data);\n };\n\n ArrayAdapter.prototype.convertToOptions = function (data) {\n var self = this;\n\n var $existing = this.$element.find('option');\n var existingIds = $existing.map(function () {\n return self.item($(this)).id;\n }).get();\n\n var $options = [];\n\n // Filter out all items except for the one passed in the argument\n function onlyItem (item) {\n return function () {\n return $(this).val() == item.id;\n };\n }\n\n for (var d = 0; d < data.length; d++) {\n var item = this._normalizeItem(data[d]);\n\n // Skip items which were pre-loaded, only merge the data\n if ($.inArray(item.id, existingIds) >= 0) {\n var $existingOption = $existing.filter(onlyItem(item));\n\n var existingData = this.item($existingOption);\n var newData = $.extend(true, {}, existingData, item);\n\n var $newOption = this.option(newData);\n\n $existingOption.replaceWith($newOption);\n\n continue;\n }\n\n var $option = this.option(item);\n\n if (item.children) {\n var $children = this.convertToOptions(item.children);\n\n Utils.appendMany($option, $children);\n }\n\n $options.push($option);\n }\n\n return $options;\n };\n\n return ArrayAdapter;\n});\n\nS2.define('select2/data/ajax',[\n './array',\n '../utils',\n 'jquery'\n], function (ArrayAdapter, Utils, $) {\n function AjaxAdapter ($element, options) {\n this.ajaxOptions = this._applyDefaults(options.get('ajax'));\n\n if (this.ajaxOptions.processResults != null) {\n this.processResults = this.ajaxOptions.processResults;\n }\n\n AjaxAdapter.__super__.constructor.call(this, $element, options);\n }\n\n Utils.Extend(AjaxAdapter, ArrayAdapter);\n\n AjaxAdapter.prototype._applyDefaults = function (options) {\n var defaults = {\n data: function (params) {\n return $.extend({}, params, {\n q: params.term\n });\n },\n transport: function (params, success, failure) {\n var $request = $.ajax(params);\n\n $request.then(success);\n $request.fail(failure);\n\n return $request;\n }\n };\n\n return $.extend({}, defaults, options, true);\n };\n\n AjaxAdapter.prototype.processResults = function (results) {\n return results;\n };\n\n AjaxAdapter.prototype.query = function (params, callback) {\n var matches = [];\n var self = this;\n\n if (this._request != null) {\n // JSONP requests cannot always be aborted\n if ($.isFunction(this._request.abort)) {\n this._request.abort();\n }\n\n this._request = null;\n }\n\n var options = $.extend({\n type: 'GET'\n }, this.ajaxOptions);\n\n if (typeof options.url === 'function') {\n options.url = options.url.call(this.$element, params);\n }\n\n if (typeof options.data === 'function') {\n options.data = options.data.call(this.$element, params);\n }\n\n function request () {\n var $request = options.transport(options, function (data) {\n var results = self.processResults(data, params);\n\n if (self.options.get('debug') && window.console && console.error) {\n // Check to make sure that the response included a `results` key.\n if (!results || !results.results || !$.isArray(results.results)) {\n console.error(\n 'Select2: The AJAX results did not return an array in the ' +\n '`results` key of the response.'\n );\n }\n }\n\n callback(results);\n }, function () {\n // TODO: Handle AJAX errors\n });\n\n self._request = $request;\n }\n\n if (this.ajaxOptions.delay && params.term !== '') {\n if (this._queryTimeout) {\n window.clearTimeout(this._queryTimeout);\n }\n\n this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);\n } else {\n request();\n }\n };\n\n return AjaxAdapter;\n});\n\nS2.define('select2/data/tags',[\n 'jquery'\n], function ($) {\n function Tags (decorated, $element, options) {\n var tags = options.get('tags');\n\n var createTag = options.get('createTag');\n\n if (createTag !== undefined) {\n this.createTag = createTag;\n }\n\n decorated.call(this, $element, options);\n\n if ($.isArray(tags)) {\n for (var t = 0; t < tags.length; t++) {\n var tag = tags[t];\n var item = this._normalizeItem(tag);\n\n var $option = this.option(item);\n\n this.$element.append($option);\n }\n }\n }\n\n Tags.prototype.query = function (decorated, params, callback) {\n var self = this;\n\n this._removeOldTags();\n\n if (params.term == null || params.page != null) {\n decorated.call(this, params, callback);\n return;\n }\n\n function wrapper (obj, child) {\n var data = obj.results;\n\n for (var i = 0; i < data.length; i++) {\n var option = data[i];\n\n var checkChildren = (\n option.children != null &&\n !wrapper({\n results: option.children\n }, true)\n );\n\n var checkText = option.text === params.term;\n\n if (checkText || checkChildren) {\n if (child) {\n return false;\n }\n\n obj.data = data;\n callback(obj);\n\n return;\n }\n }\n\n if (child) {\n return true;\n }\n\n var tag = self.createTag(params);\n\n if (tag != null) {\n var $option = self.option(tag);\n $option.attr('data-select2-tag', true);\n\n self.addOptions([$option]);\n\n self.insertTag(data, tag);\n }\n\n obj.results = data;\n\n callback(obj);\n }\n\n decorated.call(this, params, wrapper);\n };\n\n Tags.prototype.createTag = function (decorated, params) {\n var term = $.trim(params.term);\n\n if (term === '') {\n return null;\n }\n\n return {\n id: term,\n text: term\n };\n };\n\n Tags.prototype.insertTag = function (_, data, tag) {\n data.unshift(tag);\n };\n\n Tags.prototype._removeOldTags = function (_) {\n var tag = this._lastTag;\n\n var $options = this.$element.find('option[data-select2-tag]');\n\n $options.each(function () {\n if (this.selected) {\n return;\n }\n\n $(this).remove();\n });\n };\n\n return Tags;\n});\n\nS2.define('select2/data/tokenizer',[\n 'jquery'\n], function ($) {\n function Tokenizer (decorated, $element, options) {\n var tokenizer = options.get('tokenizer');\n\n if (tokenizer !== undefined) {\n this.tokenizer = tokenizer;\n }\n\n decorated.call(this, $element, options);\n }\n\n Tokenizer.prototype.bind = function (decorated, container, $container) {\n decorated.call(this, container, $container);\n\n this.$search = container.dropdown.$search || container.selection.$search ||\n $container.find('.select2-search__field');\n };\n\n Tokenizer.prototype.query = function (decorated, params, callback) {\n var self = this;\n\n function select (data) {\n self.trigger('select', {\n data: data\n });\n }\n\n params.term = params.term || '';\n\n var tokenData = this.tokenizer(params, this.options, select);\n\n if (tokenData.term !== params.term) {\n // Replace the search term if we have the search box\n if (this.$search.length) {\n this.$search.val(tokenData.term);\n this.$search.focus();\n }\n\n params.term = tokenData.term;\n }\n\n decorated.call(this, params, callback);\n };\n\n Tokenizer.prototype.tokenizer = function (_, params, options, callback) {\n var separators = options.get('tokenSeparators') || [];\n var term = params.term;\n var i = 0;\n\n var createTag = this.createTag || function (params) {\n return {\n id: params.term,\n text: params.term\n };\n };\n\n while (i < term.length) {\n var termChar = term[i];\n\n if ($.inArray(termChar, separators) === -1) {\n i++;\n\n continue;\n }\n\n var part = term.substr(0, i);\n var partParams = $.extend({}, params, {\n term: part\n });\n\n var data = createTag(partParams);\n\n if (data == null) {\n i++;\n continue;\n }\n\n callback(data);\n\n // Reset the term to not include the tokenized portion\n term = term.substr(i + 1) || '';\n i = 0;\n }\n\n return {\n term: term\n };\n };\n\n return Tokenizer;\n});\n\nS2.define('select2/data/minimumInputLength',[\n\n], function () {\n function MinimumInputLength (decorated, $e, options) {\n this.minimumInputLength = options.get('minimumInputLength');\n\n decorated.call(this, $e, options);\n }\n\n MinimumInputLength.prototype.query = function (decorated, params, callback) {\n params.term = params.term || '';\n\n if (params.term.length < this.minimumInputLength) {\n this.trigger('results:message', {\n message: 'inputTooShort',\n args: {\n minimum: this.minimumInputLength,\n input: params.term,\n params: params\n }\n });\n\n return;\n }\n\n decorated.call(this, params, callback);\n };\n\n return MinimumInputLength;\n});\n\nS2.define('select2/data/maximumInputLength',[\n\n], function () {\n function MaximumInputLength (decorated, $e, options) {\n this.maximumInputLength = options.get('maximumInputLength');\n\n decorated.call(this, $e, options);\n }\n\n MaximumInputLength.prototype.query = function (decorated, params, callback) {\n params.term = params.term || '';\n\n if (this.maximumInputLength > 0 &&\n params.term.length > this.maximumInputLength) {\n this.trigger('results:message', {\n message: 'inputTooLong',\n args: {\n maximum: this.maximumInputLength,\n input: params.term,\n params: params\n }\n });\n\n return;\n }\n\n decorated.call(this, params, callback);\n };\n\n return MaximumInputLength;\n});\n\nS2.define('select2/data/maximumSelectionLength',[\n\n], function (){\n function MaximumSelectionLength (decorated, $e, options) {\n this.maximumSelectionLength = options.get('maximumSelectionLength');\n\n decorated.call(this, $e, options);\n }\n\n MaximumSelectionLength.prototype.query =\n function (decorated, params, callback) {\n var self = this;\n\n this.current(function (currentData) {\n var count = currentData != null ? currentData.length : 0;\n if (self.maximumSelectionLength > 0 &&\n count >= self.maximumSelectionLength) {\n self.trigger('results:message', {\n message: 'maximumSelected',\n args: {\n maximum: self.maximumSelectionLength\n }\n });\n return;\n }\n decorated.call(self, params, callback);\n });\n };\n\n return MaximumSelectionLength;\n});\n\nS2.define('select2/dropdown',[\n 'jquery',\n './utils'\n], function ($, Utils) {\n function Dropdown ($element, options) {\n this.$element = $element;\n this.options = options;\n\n Dropdown.__super__.constructor.call(this);\n }\n\n Utils.Extend(Dropdown, Utils.Observable);\n\n Dropdown.prototype.render = function () {\n var $dropdown = $(\n '<span class=\"select2-dropdown\">' +\n '<span class=\"select2-results\"></span>' +\n '</span>'\n );\n\n $dropdown.attr('dir', this.options.get('dir'));\n\n this.$dropdown = $dropdown;\n\n return $dropdown;\n };\n\n Dropdown.prototype.bind = function () {\n // Should be implemented in subclasses\n };\n\n Dropdown.prototype.position = function ($dropdown, $container) {\n // Should be implmented in subclasses\n };\n\n Dropdown.prototype.destroy = function () {\n // Remove the dropdown from the DOM\n this.$dropdown.remove();\n };\n\n return Dropdown;\n});\n\nS2.define('select2/dropdown/search',[\n 'jquery',\n '../utils'\n], function ($, Utils) {\n function Search () { }\n\n Search.prototype.render = function (decorated) {\n var $rendered = decorated.call(this);\n\n var $search = $(\n '<span class=\"select2-search select2-search--dropdown\">' +\n '<input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\"' +\n ' autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\"' +\n ' spellcheck=\"false\" role=\"textbox\" />' +\n '</span>'\n );\n\n this.$searchContainer = $search;\n this.$search = $search.find('input');\n\n $rendered.prepend($search);\n\n return $rendered;\n };\n\n Search.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n this.$search.on('keydown', function (evt) {\n self.trigger('keypress', evt);\n\n self._keyUpPrevented = evt.isDefaultPrevented();\n });\n\n // Workaround for browsers which do not support the `input` event\n // This will prevent double-triggering of events for browsers which support\n // both the `keyup` and `input` events.\n this.$search.on('input', function (evt) {\n // Unbind the duplicated `keyup` event\n $(this).off('keyup');\n });\n\n this.$search.on('keyup input', function (evt) {\n self.handleSearch(evt);\n });\n\n container.on('open', function () {\n self.$search.attr('tabindex', 0);\n\n self.$search.focus();\n\n window.setTimeout(function () {\n self.$search.focus();\n }, 0);\n });\n\n container.on('close', function () {\n self.$search.attr('tabindex', -1);\n\n self.$search.val('');\n });\n\n container.on('results:all', function (params) {\n if (params.query.term == null || params.query.term === '') {\n var showSearch = self.showSearch(params);\n\n if (showSearch) {\n self.$searchContainer.removeClass('select2-search--hide');\n } else {\n self.$searchContainer.addClass('select2-search--hide');\n }\n }\n });\n };\n\n Search.prototype.handleSearch = function (evt) {\n if (!this._keyUpPrevented) {\n var input = this.$search.val();\n\n this.trigger('query', {\n term: input\n });\n }\n\n this._keyUpPrevented = false;\n };\n\n Search.prototype.showSearch = function (_, params) {\n return true;\n };\n\n return Search;\n});\n\nS2.define('select2/dropdown/hidePlaceholder',[\n\n], function () {\n function HidePlaceholder (decorated, $element, options, dataAdapter) {\n this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\n\n decorated.call(this, $element, options, dataAdapter);\n }\n\n HidePlaceholder.prototype.append = function (decorated, data) {\n data.results = this.removePlaceholder(data.results);\n\n decorated.call(this, data);\n };\n\n HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {\n if (typeof placeholder === 'string') {\n placeholder = {\n id: '',\n text: placeholder\n };\n }\n\n return placeholder;\n };\n\n HidePlaceholder.prototype.removePlaceholder = function (_, data) {\n var modifiedData = data.slice(0);\n\n for (var d = data.length - 1; d >= 0; d--) {\n var item = data[d];\n\n if (this.placeholder.id === item.id) {\n modifiedData.splice(d, 1);\n }\n }\n\n return modifiedData;\n };\n\n return HidePlaceholder;\n});\n\nS2.define('select2/dropdown/infiniteScroll',[\n 'jquery'\n], function ($) {\n function InfiniteScroll (decorated, $element, options, dataAdapter) {\n this.lastParams = {};\n\n decorated.call(this, $element, options, dataAdapter);\n\n this.$loadingMore = this.createLoadingMore();\n this.loading = false;\n }\n\n InfiniteScroll.prototype.append = function (decorated, data) {\n this.$loadingMore.remove();\n this.loading = false;\n\n decorated.call(this, data);\n\n if (this.showLoadingMore(data)) {\n this.$results.append(this.$loadingMore);\n }\n };\n\n InfiniteScroll.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('query', function (params) {\n self.lastParams = params;\n self.loading = true;\n });\n\n container.on('query:append', function (params) {\n self.lastParams = params;\n self.loading = true;\n });\n\n this.$results.on('scroll', function () {\n var isLoadMoreVisible = $.contains(\n document.documentElement,\n self.$loadingMore[0]\n );\n\n if (self.loading || !isLoadMoreVisible) {\n return;\n }\n\n var currentOffset = self.$results.offset().top +\n self.$results.outerHeight(false);\n var loadingMoreOffset = self.$loadingMore.offset().top +\n self.$loadingMore.outerHeight(false);\n\n if (currentOffset + 50 >= loadingMoreOffset) {\n self.loadMore();\n }\n });\n };\n\n InfiniteScroll.prototype.loadMore = function () {\n this.loading = true;\n\n var params = $.extend({}, {page: 1}, this.lastParams);\n\n params.page++;\n\n this.trigger('query:append', params);\n };\n\n InfiniteScroll.prototype.showLoadingMore = function (_, data) {\n return data.pagination && data.pagination.more;\n };\n\n InfiniteScroll.prototype.createLoadingMore = function () {\n var $option = $(\n '<li ' +\n 'class=\"select2-results__option select2-results__option--load-more\"' +\n 'role=\"treeitem\" aria-disabled=\"true\"></li>'\n );\n\n var message = this.options.get('translations').get('loadingMore');\n\n $option.html(message(this.lastParams));\n\n return $option;\n };\n\n return InfiniteScroll;\n});\n\nS2.define('select2/dropdown/attachBody',[\n 'jquery',\n '../utils'\n], function ($, Utils) {\n function AttachBody (decorated, $element, options) {\n this.$dropdownParent = options.get('dropdownParent') || $(document.body);\n\n decorated.call(this, $element, options);\n }\n\n AttachBody.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n var setupResultsEvents = false;\n\n decorated.call(this, container, $container);\n\n container.on('open', function () {\n self._showDropdown();\n self._attachPositioningHandler(container);\n\n if (!setupResultsEvents) {\n setupResultsEvents = true;\n\n container.on('results:all', function () {\n self._positionDropdown();\n self._resizeDropdown();\n });\n\n container.on('results:append', function () {\n self._positionDropdown();\n self._resizeDropdown();\n });\n }\n });\n\n container.on('close', function () {\n self._hideDropdown();\n self._detachPositioningHandler(container);\n });\n\n this.$dropdownContainer.on('mousedown', function (evt) {\n evt.stopPropagation();\n });\n };\n\n AttachBody.prototype.destroy = function (decorated) {\n decorated.call(this);\n\n this.$dropdownContainer.remove();\n };\n\n AttachBody.prototype.position = function (decorated, $dropdown, $container) {\n // Clone all of the container classes\n $dropdown.attr('class', $container.attr('class'));\n\n $dropdown.removeClass('select2');\n $dropdown.addClass('select2-container--open');\n\n $dropdown.css({\n position: 'absolute',\n top: -999999\n });\n\n this.$container = $container;\n };\n\n AttachBody.prototype.render = function (decorated) {\n var $container = $('<span></span>');\n\n var $dropdown = decorated.call(this);\n $container.append($dropdown);\n\n this.$dropdownContainer = $container;\n\n return $container;\n };\n\n AttachBody.prototype._hideDropdown = function (decorated) {\n this.$dropdownContainer.detach();\n };\n\n AttachBody.prototype._attachPositioningHandler =\n function (decorated, container) {\n var self = this;\n\n var scrollEvent = 'scroll.select2.' + container.id;\n var resizeEvent = 'resize.select2.' + container.id;\n var orientationEvent = 'orientationchange.select2.' + container.id;\n\n var $watchers = this.$container.parents().filter(Utils.hasScroll);\n $watchers.each(function () {\n $(this).data('select2-scroll-position', {\n x: $(this).scrollLeft(),\n y: $(this).scrollTop()\n });\n });\n\n $watchers.on(scrollEvent, function (ev) {\n var position = $(this).data('select2-scroll-position');\n $(this).scrollTop(position.y);\n });\n\n $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,\n function (e) {\n self._positionDropdown();\n self._resizeDropdown();\n });\n };\n\n AttachBody.prototype._detachPositioningHandler =\n function (decorated, container) {\n var scrollEvent = 'scroll.select2.' + container.id;\n var resizeEvent = 'resize.select2.' + container.id;\n var orientationEvent = 'orientationchange.select2.' + container.id;\n\n var $watchers = this.$container.parents().filter(Utils.hasScroll);\n $watchers.off(scrollEvent);\n\n $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);\n };\n\n AttachBody.prototype._positionDropdown = function () {\n var $window = $(window);\n\n var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');\n var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');\n\n var newDirection = null;\n\n var position = this.$container.position();\n var offset = this.$container.offset();\n\n offset.bottom = offset.top + this.$container.outerHeight(false);\n\n var container = {\n height: this.$container.outerHeight(false)\n };\n\n container.top = offset.top;\n container.bottom = offset.top + container.height;\n\n var dropdown = {\n height: this.$dropdown.outerHeight(false)\n };\n\n var viewport = {\n top: $window.scrollTop(),\n bottom: $window.scrollTop() + $window.height()\n };\n\n var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);\n var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);\n\n var css = {\n left: offset.left,\n top: container.bottom\n };\n\n // Fix positioning with static parents\n if (this.$dropdownParent[0].style.position !== 'static') {\n var parentOffset = this.$dropdownParent.offset();\n\n css.top -= parentOffset.top;\n css.left -= parentOffset.left;\n }\n\n if (!isCurrentlyAbove && !isCurrentlyBelow) {\n newDirection = 'below';\n }\n\n if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {\n newDirection = 'above';\n } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {\n newDirection = 'below';\n }\n\n if (newDirection == 'above' ||\n (isCurrentlyAbove && newDirection !== 'below')) {\n css.top = container.top - dropdown.height;\n }\n\n if (newDirection != null) {\n this.$dropdown\n .removeClass('select2-dropdown--below select2-dropdown--above')\n .addClass('select2-dropdown--' + newDirection);\n this.$container\n .removeClass('select2-container--below select2-container--above')\n .addClass('select2-container--' + newDirection);\n }\n\n this.$dropdownContainer.css(css);\n };\n\n AttachBody.prototype._resizeDropdown = function () {\n var css = {\n width: this.$container.outerWidth(false) + 'px'\n };\n\n if (this.options.get('dropdownAutoWidth')) {\n css.minWidth = css.width;\n css.width = 'auto';\n }\n\n this.$dropdown.css(css);\n };\n\n AttachBody.prototype._showDropdown = function (decorated) {\n this.$dropdownContainer.appendTo(this.$dropdownParent);\n\n this._positionDropdown();\n this._resizeDropdown();\n };\n\n return AttachBody;\n});\n\nS2.define('select2/dropdown/minimumResultsForSearch',[\n\n], function () {\n function countResults (data) {\n var count = 0;\n\n for (var d = 0; d < data.length; d++) {\n var item = data[d];\n\n if (item.children) {\n count += countResults(item.children);\n } else {\n count++;\n }\n }\n\n return count;\n }\n\n function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {\n this.minimumResultsForSearch = options.get('minimumResultsForSearch');\n\n if (this.minimumResultsForSearch < 0) {\n this.minimumResultsForSearch = Infinity;\n }\n\n decorated.call(this, $element, options, dataAdapter);\n }\n\n MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {\n if (countResults(params.data.results) < this.minimumResultsForSearch) {\n return false;\n }\n\n return decorated.call(this, params);\n };\n\n return MinimumResultsForSearch;\n});\n\nS2.define('select2/dropdown/selectOnClose',[\n\n], function () {\n function SelectOnClose () { }\n\n SelectOnClose.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('close', function () {\n self._handleSelectOnClose();\n });\n };\n\n SelectOnClose.prototype._handleSelectOnClose = function () {\n var $highlightedResults = this.getHighlightedResults();\n\n // Only select highlighted results\n if ($highlightedResults.length < 1) {\n return;\n }\n\n var data = $highlightedResults.data('data');\n\n // Don't re-select already selected resulte\n if (\n (data.element != null && data.element.selected) ||\n (data.element == null && data.selected)\n ) {\n return;\n }\n\n this.trigger('select', {\n data: data\n });\n };\n\n return SelectOnClose;\n});\n\nS2.define('select2/dropdown/closeOnSelect',[\n\n], function () {\n function CloseOnSelect () { }\n\n CloseOnSelect.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('select', function (evt) {\n self._selectTriggered(evt);\n });\n\n container.on('unselect', function (evt) {\n self._selectTriggered(evt);\n });\n };\n\n CloseOnSelect.prototype._selectTriggered = function (_, evt) {\n var originalEvent = evt.originalEvent;\n\n // Don't close if the control key is being held\n if (originalEvent && originalEvent.ctrlKey) {\n return;\n }\n\n this.trigger('close', {});\n };\n\n return CloseOnSelect;\n});\n\nS2.define('select2/i18n/en',[],function () {\n // English\n return {\n errorLoading: function () {\n return 'The results could not be loaded.';\n },\n inputTooLong: function (args) {\n var overChars = args.input.length - args.maximum;\n\n var message = 'Please delete ' + overChars + ' character';\n\n if (overChars != 1) {\n message += 's';\n }\n\n return message;\n },\n inputTooShort: function (args) {\n var remainingChars = args.minimum - args.input.length;\n\n var message = 'Please enter ' + remainingChars + ' or more characters';\n\n return message;\n },\n loadingMore: function () {\n return 'Loading more results…';\n },\n maximumSelected: function (args) {\n var message = 'You can only select ' + args.maximum + ' item';\n\n if (args.maximum != 1) {\n message += 's';\n }\n\n return message;\n },\n noResults: function () {\n return 'No results found';\n },\n searching: function () {\n return 'Searching…';\n }\n };\n});\n\nS2.define('select2/defaults',[\n 'jquery',\n 'require',\n\n './results',\n\n './selection/single',\n './selection/multiple',\n './selection/placeholder',\n './selection/allowClear',\n './selection/search',\n './selection/eventRelay',\n\n './utils',\n './translation',\n './diacritics',\n\n './data/select',\n './data/array',\n './data/ajax',\n './data/tags',\n './data/tokenizer',\n './data/minimumInputLength',\n './data/maximumInputLength',\n './data/maximumSelectionLength',\n\n './dropdown',\n './dropdown/search',\n './dropdown/hidePlaceholder',\n './dropdown/infiniteScroll',\n './dropdown/attachBody',\n './dropdown/minimumResultsForSearch',\n './dropdown/selectOnClose',\n './dropdown/closeOnSelect',\n\n './i18n/en'\n], function ($, require,\n\n ResultsList,\n\n SingleSelection, MultipleSelection, Placeholder, AllowClear,\n SelectionSearch, EventRelay,\n\n Utils, Translation, DIACRITICS,\n\n SelectData, ArrayData, AjaxData, Tags, Tokenizer,\n MinimumInputLength, MaximumInputLength, MaximumSelectionLength,\n\n Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,\n AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,\n\n EnglishTranslation) {\n function Defaults () {\n this.reset();\n }\n\n Defaults.prototype.apply = function (options) {\n options = $.extend({}, this.defaults, options);\n\n if (options.dataAdapter == null) {\n if (options.ajax != null) {\n options.dataAdapter = AjaxData;\n } else if (options.data != null) {\n options.dataAdapter = ArrayData;\n } else {\n options.dataAdapter = SelectData;\n }\n\n if (options.minimumInputLength > 0) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n MinimumInputLength\n );\n }\n\n if (options.maximumInputLength > 0) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n MaximumInputLength\n );\n }\n\n if (options.maximumSelectionLength > 0) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n MaximumSelectionLength\n );\n }\n\n if (options.tags) {\n options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);\n }\n\n if (options.tokenSeparators != null || options.tokenizer != null) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n Tokenizer\n );\n }\n\n if (options.query != null) {\n var Query = require(options.amdBase + 'compat/query');\n\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n Query\n );\n }\n\n if (options.initSelection != null) {\n var InitSelection = require(options.amdBase + 'compat/initSelection');\n\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n InitSelection\n );\n }\n }\n\n if (options.resultsAdapter == null) {\n options.resultsAdapter = ResultsList;\n\n if (options.ajax != null) {\n options.resultsAdapter = Utils.Decorate(\n options.resultsAdapter,\n InfiniteScroll\n );\n }\n\n if (options.placeholder != null) {\n options.resultsAdapter = Utils.Decorate(\n options.resultsAdapter,\n HidePlaceholder\n );\n }\n\n if (options.selectOnClose) {\n options.resultsAdapter = Utils.Decorate(\n options.resultsAdapter,\n SelectOnClose\n );\n }\n }\n\n if (options.dropdownAdapter == null) {\n if (options.multiple) {\n options.dropdownAdapter = Dropdown;\n } else {\n var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);\n\n options.dropdownAdapter = SearchableDropdown;\n }\n\n if (options.minimumResultsForSearch !== 0) {\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n MinimumResultsForSearch\n );\n }\n\n if (options.closeOnSelect) {\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n CloseOnSelect\n );\n }\n\n if (\n options.dropdownCssClass != null ||\n options.dropdownCss != null ||\n options.adaptDropdownCssClass != null\n ) {\n var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');\n\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n DropdownCSS\n );\n }\n\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n AttachBody\n );\n }\n\n if (options.selectionAdapter == null) {\n if (options.multiple) {\n options.selectionAdapter = MultipleSelection;\n } else {\n options.selectionAdapter = SingleSelection;\n }\n\n // Add the placeholder mixin if a placeholder was specified\n if (options.placeholder != null) {\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n Placeholder\n );\n }\n\n if (options.allowClear) {\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n AllowClear\n );\n }\n\n if (options.multiple) {\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n SelectionSearch\n );\n }\n\n if (\n options.containerCssClass != null ||\n options.containerCss != null ||\n options.adaptContainerCssClass != null\n ) {\n var ContainerCSS = require(options.amdBase + 'compat/containerCss');\n\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n ContainerCSS\n );\n }\n\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n EventRelay\n );\n }\n\n if (typeof options.language === 'string') {\n // Check if the language is specified with a region\n if (options.language.indexOf('-') > 0) {\n // Extract the region information if it is included\n var languageParts = options.language.split('-');\n var baseLanguage = languageParts[0];\n\n options.language = [options.language, baseLanguage];\n } else {\n options.language = [options.language];\n }\n }\n\n if ($.isArray(options.language)) {\n var languages = new Translation();\n options.language.push('en');\n\n var languageNames = options.language;\n\n for (var l = 0; l < languageNames.length; l++) {\n var name = languageNames[l];\n var language = {};\n\n try {\n // Try to load it with the original name\n language = Translation.loadPath(name);\n } catch (e) {\n try {\n // If we couldn't load it, check if it wasn't the full path\n name = this.defaults.amdLanguageBase + name;\n language = Translation.loadPath(name);\n } catch (ex) {\n // The translation could not be loaded at all. Sometimes this is\n // because of a configuration problem, other times this can be\n // because of how Select2 helps load all possible translation files.\n if (options.debug && window.console && console.warn) {\n console.warn(\n 'Select2: The language file for \"' + name + '\" could not be ' +\n 'automatically loaded. A fallback will be used instead.'\n );\n }\n\n continue;\n }\n }\n\n languages.extend(language);\n }\n\n options.translations = languages;\n } else {\n var baseTranslation = Translation.loadPath(\n this.defaults.amdLanguageBase + 'en'\n );\n var customTranslation = new Translation(options.language);\n\n customTranslation.extend(baseTranslation);\n\n options.translations = customTranslation;\n }\n\n return options;\n };\n\n Defaults.prototype.reset = function () {\n function stripDiacritics (text) {\n // Used 'uni range + named function' from http://jsperf.com/diacritics/18\n function match(a) {\n return DIACRITICS[a] || a;\n }\n\n return text.replace(/[^\\u0000-\\u007E]/g, match);\n }\n\n function matcher (params, data) {\n // Always return the object if there is nothing to compare\n if ($.trim(params.term) === '') {\n return data;\n }\n\n // Do a recursive check for options with children\n if (data.children && data.children.length > 0) {\n // Clone the data object if there are children\n // This is required as we modify the object to remove any non-matches\n var match = $.extend(true, {}, data);\n\n // Check each child of the option\n for (var c = data.children.length - 1; c >= 0; c--) {\n var child = data.children[c];\n\n var matches = matcher(params, child);\n\n // If there wasn't a match, remove the object in the array\n if (matches == null) {\n match.children.splice(c, 1);\n }\n }\n\n // If any children matched, return the new object\n if (match.children.length > 0) {\n return match;\n }\n\n // If there were no matching children, check just the plain object\n return matcher(params, match);\n }\n\n var original = stripDiacritics(data.text).toUpperCase();\n var term = stripDiacritics(params.term).toUpperCase();\n\n // Check if the text contains the term\n if (original.indexOf(term) > -1) {\n return data;\n }\n\n // If it doesn't contain the term, don't return anything\n return null;\n }\n\n this.defaults = {\n amdBase: './',\n amdLanguageBase: './i18n/',\n closeOnSelect: true,\n debug: false,\n dropdownAutoWidth: false,\n escapeMarkup: Utils.escapeMarkup,\n language: EnglishTranslation,\n matcher: matcher,\n minimumInputLength: 0,\n maximumInputLength: 0,\n maximumSelectionLength: 0,\n minimumResultsForSearch: 0,\n selectOnClose: false,\n sorter: function (data) {\n return data;\n },\n templateResult: function (result) {\n return result.text;\n },\n templateSelection: function (selection) {\n return selection.text;\n },\n theme: 'default',\n width: 'resolve'\n };\n };\n\n Defaults.prototype.set = function (key, value) {\n var camelKey = $.camelCase(key);\n\n var data = {};\n data[camelKey] = value;\n\n var convertedData = Utils._convertData(data);\n\n $.extend(this.defaults, convertedData);\n };\n\n var defaults = new Defaults();\n\n return defaults;\n});\n\nS2.define('select2/options',[\n 'require',\n 'jquery',\n './defaults',\n './utils'\n], function (require, $, Defaults, Utils) {\n function Options (options, $element) {\n this.options = options;\n\n if ($element != null) {\n this.fromElement($element);\n }\n\n this.options = Defaults.apply(this.options);\n\n if ($element && $element.is('input')) {\n var InputCompat = require(this.get('amdBase') + 'compat/inputData');\n\n this.options.dataAdapter = Utils.Decorate(\n this.options.dataAdapter,\n InputCompat\n );\n }\n }\n\n Options.prototype.fromElement = function ($e) {\n var excludedData = ['select2'];\n\n if (this.options.multiple == null) {\n this.options.multiple = $e.prop('multiple');\n }\n\n if (this.options.disabled == null) {\n this.options.disabled = $e.prop('disabled');\n }\n\n if (this.options.language == null) {\n if ($e.prop('lang')) {\n this.options.language = $e.prop('lang').toLowerCase();\n } else if ($e.closest('[lang]').prop('lang')) {\n this.options.language = $e.closest('[lang]').prop('lang');\n }\n }\n\n if (this.options.dir == null) {\n if ($e.prop('dir')) {\n this.options.dir = $e.prop('dir');\n } else if ($e.closest('[dir]').prop('dir')) {\n this.options.dir = $e.closest('[dir]').prop('dir');\n } else {\n this.options.dir = 'ltr';\n }\n }\n\n $e.prop('disabled', this.options.disabled);\n $e.prop('multiple', this.options.multiple);\n\n if ($e.data('select2Tags')) {\n if (this.options.debug && window.console && console.warn) {\n console.warn(\n 'Select2: The `data-select2-tags` attribute has been changed to ' +\n 'use the `data-data` and `data-tags=\"true\"` attributes and will be ' +\n 'removed in future versions of Select2.'\n );\n }\n\n $e.data('data', $e.data('select2Tags'));\n $e.data('tags', true);\n }\n\n if ($e.data('ajaxUrl')) {\n if (this.options.debug && window.console && console.warn) {\n console.warn(\n 'Select2: The `data-ajax-url` attribute has been changed to ' +\n '`data-ajax--url` and support for the old attribute will be removed' +\n ' in future versions of Select2.'\n );\n }\n\n $e.attr('ajax--url', $e.data('ajaxUrl'));\n $e.data('ajax--url', $e.data('ajaxUrl'));\n }\n\n var dataset = {};\n\n // Prefer the element's `dataset` attribute if it exists\n // jQuery 1.x does not correctly handle data attributes with multiple dashes\n if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {\n dataset = $.extend(true, {}, $e[0].dataset, $e.data());\n } else {\n dataset = $e.data();\n }\n\n var data = $.extend(true, {}, dataset);\n\n data = Utils._convertData(data);\n\n for (var key in data) {\n if ($.inArray(key, excludedData) > -1) {\n continue;\n }\n\n if ($.isPlainObject(this.options[key])) {\n $.extend(this.options[key], data[key]);\n } else {\n this.options[key] = data[key];\n }\n }\n\n return this;\n };\n\n Options.prototype.get = function (key) {\n return this.options[key];\n };\n\n Options.prototype.set = function (key, val) {\n this.options[key] = val;\n };\n\n return Options;\n});\n\nS2.define('select2/core',[\n 'jquery',\n './options',\n './utils',\n './keys'\n], function ($, Options, Utils, KEYS) {\n var Select2 = function ($element, options) {\n if ($element.data('select2') != null) {\n $element.data('select2').destroy();\n }\n\n this.$element = $element;\n\n this.id = this._generateId($element);\n\n options = options || {};\n\n this.options = new Options(options, $element);\n\n Select2.__super__.constructor.call(this);\n\n // Set up the tabindex\n\n var tabindex = $element.attr('tabindex') || 0;\n $element.data('old-tabindex', tabindex);\n $element.attr('tabindex', '-1');\n\n // Set up containers and adapters\n\n var DataAdapter = this.options.get('dataAdapter');\n this.dataAdapter = new DataAdapter($element, this.options);\n\n var $container = this.render();\n\n this._placeContainer($container);\n\n var SelectionAdapter = this.options.get('selectionAdapter');\n this.selection = new SelectionAdapter($element, this.options);\n this.$selection = this.selection.render();\n\n this.selection.position(this.$selection, $container);\n\n var DropdownAdapter = this.options.get('dropdownAdapter');\n this.dropdown = new DropdownAdapter($element, this.options);\n this.$dropdown = this.dropdown.render();\n\n this.dropdown.position(this.$dropdown, $container);\n\n var ResultsAdapter = this.options.get('resultsAdapter');\n this.results = new ResultsAdapter($element, this.options, this.dataAdapter);\n this.$results = this.results.render();\n\n this.results.position(this.$results, this.$dropdown);\n\n // Bind events\n\n var self = this;\n\n // Bind the container to all of the adapters\n this._bindAdapters();\n\n // Register any DOM event handlers\n this._registerDomEvents();\n\n // Register any internal event handlers\n this._registerDataEvents();\n this._registerSelectionEvents();\n this._registerDropdownEvents();\n this._registerResultsEvents();\n this._registerEvents();\n\n // Set the initial state\n this.dataAdapter.current(function (initialData) {\n self.trigger('selection:update', {\n data: initialData\n });\n });\n\n // Hide the original select\n $element.addClass('select2-hidden-accessible');\n $element.attr('aria-hidden', 'true');\n\n // Synchronize any monitored attributes\n this._syncAttributes();\n\n $element.data('select2', this);\n };\n\n Utils.Extend(Select2, Utils.Observable);\n\n Select2.prototype._generateId = function ($element) {\n var id = '';\n\n if ($element.attr('id') != null) {\n id = $element.attr('id');\n } else if ($element.attr('name') != null) {\n id = $element.attr('name') + '-' + Utils.generateChars(2);\n } else {\n id = Utils.generateChars(4);\n }\n\n id = 'select2-' + id;\n\n return id;\n };\n\n Select2.prototype._placeContainer = function ($container) {\n $container.insertAfter(this.$element);\n\n var width = this._resolveWidth(this.$element, this.options.get('width'));\n\n if (width != null) {\n $container.css('width', width);\n }\n };\n\n Select2.prototype._resolveWidth = function ($element, method) {\n var WIDTH = /^width:(([-+]?([0-9]*\\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;\n\n if (method == 'resolve') {\n var styleWidth = this._resolveWidth($element, 'style');\n\n if (styleWidth != null) {\n return styleWidth;\n }\n\n return this._resolveWidth($element, 'element');\n }\n\n if (method == 'element') {\n var elementWidth = $element.outerWidth(false);\n\n if (elementWidth <= 0) {\n return 'auto';\n }\n\n return elementWidth + 'px';\n }\n\n if (method == 'style') {\n var style = $element.attr('style');\n\n if (typeof(style) !== 'string') {\n return null;\n }\n\n var attrs = style.split(';');\n\n for (var i = 0, l = attrs.length; i < l; i = i + 1) {\n var attr = attrs[i].replace(/\\s/g, '');\n var matches = attr.match(WIDTH);\n\n if (matches !== null && matches.length >= 1) {\n return matches[1];\n }\n }\n\n return null;\n }\n\n return method;\n };\n\n Select2.prototype._bindAdapters = function () {\n this.dataAdapter.bind(this, this.$container);\n this.selection.bind(this, this.$container);\n\n this.dropdown.bind(this, this.$container);\n this.results.bind(this, this.$container);\n };\n\n Select2.prototype._registerDomEvents = function () {\n var self = this;\n\n this.$element.on('change.select2', function () {\n self.dataAdapter.current(function (data) {\n self.trigger('selection:update', {\n data: data\n });\n });\n });\n\n this._sync = Utils.bind(this._syncAttributes, this);\n\n if (this.$element[0].attachEvent) {\n this.$element[0].attachEvent('onpropertychange', this._sync);\n }\n\n var observer = window.MutationObserver ||\n window.WebKitMutationObserver ||\n window.MozMutationObserver\n ;\n\n if (observer != null) {\n this._observer = new observer(function (mutations) {\n $.each(mutations, self._sync);\n });\n this._observer.observe(this.$element[0], {\n attributes: true,\n subtree: false\n });\n } else if (this.$element[0].addEventListener) {\n this.$element[0].addEventListener('DOMAttrModified', self._sync, false);\n }\n };\n\n Select2.prototype._registerDataEvents = function () {\n var self = this;\n\n this.dataAdapter.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerSelectionEvents = function () {\n var self = this;\n var nonRelayEvents = ['toggle', 'focus'];\n\n this.selection.on('toggle', function () {\n self.toggleDropdown();\n });\n\n this.selection.on('focus', function (params) {\n self.focus(params);\n });\n\n this.selection.on('*', function (name, params) {\n if ($.inArray(name, nonRelayEvents) !== -1) {\n return;\n }\n\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerDropdownEvents = function () {\n var self = this;\n\n this.dropdown.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerResultsEvents = function () {\n var self = this;\n\n this.results.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerEvents = function () {\n var self = this;\n\n this.on('open', function () {\n self.$container.addClass('select2-container--open');\n });\n\n this.on('close', function () {\n self.$container.removeClass('select2-container--open');\n });\n\n this.on('enable', function () {\n self.$container.removeClass('select2-container--disabled');\n });\n\n this.on('disable', function () {\n self.$container.addClass('select2-container--disabled');\n });\n\n this.on('blur', function () {\n self.$container.removeClass('select2-container--focus');\n });\n\n this.on('query', function (params) {\n if (!self.isOpen()) {\n self.trigger('open', {});\n }\n\n this.dataAdapter.query(params, function (data) {\n self.trigger('results:all', {\n data: data,\n query: params\n });\n });\n });\n\n this.on('query:append', function (params) {\n this.dataAdapter.query(params, function (data) {\n self.trigger('results:append', {\n data: data,\n query: params\n });\n });\n });\n\n this.on('keypress', function (evt) {\n var key = evt.which;\n\n if (self.isOpen()) {\n if (key === KEYS.ESC || key === KEYS.TAB ||\n (key === KEYS.UP && evt.altKey)) {\n self.close();\n\n evt.preventDefault();\n } else if (key === KEYS.ENTER) {\n self.trigger('results:select', {});\n\n evt.preventDefault();\n } else if ((key === KEYS.SPACE && evt.ctrlKey)) {\n self.trigger('results:toggle', {});\n\n evt.preventDefault();\n } else if (key === KEYS.UP) {\n self.trigger('results:previous', {});\n\n evt.preventDefault();\n } else if (key === KEYS.DOWN) {\n self.trigger('results:next', {});\n\n evt.preventDefault();\n }\n } else {\n if (key === KEYS.ENTER || key === KEYS.SPACE ||\n (key === KEYS.DOWN && evt.altKey)) {\n self.open();\n\n evt.preventDefault();\n }\n }\n });\n };\n\n Select2.prototype._syncAttributes = function () {\n this.options.set('disabled', this.$element.prop('disabled'));\n\n if (this.options.get('disabled')) {\n if (this.isOpen()) {\n this.close();\n }\n\n this.trigger('disable', {});\n } else {\n this.trigger('enable', {});\n }\n };\n\n /**\n * Override the trigger method to automatically trigger pre-events when\n * there are events that can be prevented.\n */\n Select2.prototype.trigger = function (name, args) {\n var actualTrigger = Select2.__super__.trigger;\n var preTriggerMap = {\n 'open': 'opening',\n 'close': 'closing',\n 'select': 'selecting',\n 'unselect': 'unselecting'\n };\n\n if (args === undefined) {\n args = {};\n }\n\n if (name in preTriggerMap) {\n var preTriggerName = preTriggerMap[name];\n var preTriggerArgs = {\n prevented: false,\n name: name,\n args: args\n };\n\n actualTrigger.call(this, preTriggerName, preTriggerArgs);\n\n if (preTriggerArgs.prevented) {\n args.prevented = true;\n\n return;\n }\n }\n\n actualTrigger.call(this, name, args);\n };\n\n Select2.prototype.toggleDropdown = function () {\n if (this.options.get('disabled')) {\n return;\n }\n\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n };\n\n Select2.prototype.open = function () {\n if (this.isOpen()) {\n return;\n }\n\n this.trigger('query', {});\n };\n\n Select2.prototype.close = function () {\n if (!this.isOpen()) {\n return;\n }\n\n this.trigger('close', {});\n };\n\n Select2.prototype.isOpen = function () {\n return this.$container.hasClass('select2-container--open');\n };\n\n Select2.prototype.hasFocus = function () {\n return this.$container.hasClass('select2-container--focus');\n };\n\n Select2.prototype.focus = function (data) {\n // No need to re-trigger focus events if we are already focused\n if (this.hasFocus()) {\n return;\n }\n\n this.$container.addClass('select2-container--focus');\n this.trigger('focus', {});\n };\n\n Select2.prototype.enable = function (args) {\n if (this.options.get('debug') && window.console && console.warn) {\n console.warn(\n 'Select2: The `select2(\"enable\")` method has been deprecated and will' +\n ' be removed in later Select2 versions. Use $element.prop(\"disabled\")' +\n ' instead.'\n );\n }\n\n if (args == null || args.length === 0) {\n args = [true];\n }\n\n var disabled = !args[0];\n\n this.$element.prop('disabled', disabled);\n };\n\n Select2.prototype.data = function () {\n if (this.options.get('debug') &&\n arguments.length > 0 && window.console && console.warn) {\n console.warn(\n 'Select2: Data can no longer be set using `select2(\"data\")`. You ' +\n 'should consider setting the value instead using `$element.val()`.'\n );\n }\n\n var data = [];\n\n this.dataAdapter.current(function (currentData) {\n data = currentData;\n });\n\n return data;\n };\n\n Select2.prototype.val = function (args) {\n if (this.options.get('debug') && window.console && console.warn) {\n console.warn(\n 'Select2: The `select2(\"val\")` method has been deprecated and will be' +\n ' removed in later Select2 versions. Use $element.val() instead.'\n );\n }\n\n if (args == null || args.length === 0) {\n return this.$element.val();\n }\n\n var newVal = args[0];\n\n if ($.isArray(newVal)) {\n newVal = $.map(newVal, function (obj) {\n return obj.toString();\n });\n }\n\n this.$element.val(newVal).trigger('change');\n };\n\n Select2.prototype.destroy = function () {\n this.$container.remove();\n\n if (this.$element[0].detachEvent) {\n this.$element[0].detachEvent('onpropertychange', this._sync);\n }\n\n if (this._observer != null) {\n this._observer.disconnect();\n this._observer = null;\n } else if (this.$element[0].removeEventListener) {\n this.$element[0]\n .removeEventListener('DOMAttrModified', this._sync, false);\n }\n\n this._sync = null;\n\n this.$element.off('.select2');\n this.$element.attr('tabindex', this.$element.data('old-tabindex'));\n\n this.$element.removeClass('select2-hidden-accessible');\n this.$element.attr('aria-hidden', 'false');\n this.$element.removeData('select2');\n\n this.dataAdapter.destroy();\n this.selection.destroy();\n this.dropdown.destroy();\n this.results.destroy();\n\n this.dataAdapter = null;\n this.selection = null;\n this.dropdown = null;\n this.results = null;\n };\n\n Select2.prototype.render = function () {\n var $container = $(\n '<span class=\"select2 select2-container\">' +\n '<span class=\"selection\"></span>' +\n '<span class=\"dropdown-wrapper\" aria-hidden=\"true\"></span>' +\n '</span>'\n );\n\n $container.attr('dir', this.options.get('dir'));\n\n this.$container = $container;\n\n this.$container.addClass('select2-container--' + this.options.get('theme'));\n\n $container.data('element', this.$element);\n\n return $container;\n };\n\n return Select2;\n});\n\nS2.define('jquery-mousewheel',[\n 'jquery'\n], function ($) {\n // Used to shim jQuery.mousewheel for non-full builds.\n return $;\n});\n\nS2.define('jquery.select2',[\n 'jquery',\n 'jquery-mousewheel',\n\n './select2/core',\n './select2/defaults'\n], function ($, _, Select2, Defaults) {\n if ($.fn.select2 == null) {\n // All methods that should return the element\n var thisMethods = ['open', 'close', 'destroy'];\n\n $.fn.select2 = function (options) {\n options = options || {};\n\n if (typeof options === 'object') {\n this.each(function () {\n var instanceOptions = $.extend(true, {}, options);\n\n var instance = new Select2($(this), instanceOptions);\n });\n\n return this;\n } else if (typeof options === 'string') {\n var ret;\n\n this.each(function () {\n var instance = $(this).data('select2');\n\n if (instance == null && window.console && console.error) {\n console.error(\n 'The select2(\\'' + options + '\\') method was called on an ' +\n 'element that is not using Select2.'\n );\n }\n\n var args = Array.prototype.slice.call(arguments, 1);\n\n ret = instance[options].apply(instance, args);\n });\n\n // Check if we should be returning `this`\n if ($.inArray(options, thisMethods) > -1) {\n return this;\n }\n\n return ret;\n } else {\n throw new Error('Invalid arguments for Select2: ' + options);\n }\n };\n }\n\n if ($.fn.select2.defaults == null) {\n $.fn.select2.defaults = Defaults;\n }\n\n return Select2;\n});\n\n // Return the AMD loader configuration so it can be used outside of this file\n return {\n define: S2.define,\n require: S2.require\n };\n}());\n\n // Autoload the jQuery bindings\n // We know that all of the modules exist above this, so we're safe\n var select2 = S2.require('jquery.select2');\n\n // Hold the AMD module references on the jQuery function that was just loaded\n // This allows Select2 to use the internal loader outside of this file, such\n // as in the language files.\n jQuery.fn.select2.amd = S2;\n\n // Return the Select2 instance for anyone who is importing it.\n return select2;\n}));\n","/*!\n * skrollr core\n *\n * Alexander Prinzhorn - https://github.com/Prinzhorn/skrollr\n *\n * Free to use under terms of MIT license\n */\n(function(window, document, undefined) {\n\t'use strict';\n\n\t/*\n\t * Global api.\n\t */\n\tvar skrollr = {\n\t\tget: function() {\n\t\t\treturn _instance;\n\t\t},\n\t\t//Main entry point.\n\t\tinit: function(options) {\n\t\t\treturn _instance || new Skrollr(options);\n\t\t},\n\t\tVERSION: '0.6.29'\n\t};\n\n\t//Minify optimization.\n\tvar hasProp = Object.prototype.hasOwnProperty;\n\tvar Math = window.Math;\n\tvar getStyle = window.getComputedStyle;\n\n\t//They will be filled when skrollr gets initialized.\n\tvar documentElement;\n\tvar body;\n\n\tvar EVENT_TOUCHSTART = 'touchstart';\n\tvar EVENT_TOUCHMOVE = 'touchmove';\n\tvar EVENT_TOUCHCANCEL = 'touchcancel';\n\tvar EVENT_TOUCHEND = 'touchend';\n\n\tvar SKROLLABLE_CLASS = 'skrollable';\n\tvar SKROLLABLE_BEFORE_CLASS = SKROLLABLE_CLASS + '-before';\n\tvar SKROLLABLE_BETWEEN_CLASS = SKROLLABLE_CLASS + '-between';\n\tvar SKROLLABLE_AFTER_CLASS = SKROLLABLE_CLASS + '-after';\n\n\tvar SKROLLR_CLASS = 'skrollr';\n\tvar NO_SKROLLR_CLASS = 'no-' + SKROLLR_CLASS;\n\tvar SKROLLR_DESKTOP_CLASS = SKROLLR_CLASS + '-desktop';\n\tvar SKROLLR_MOBILE_CLASS = SKROLLR_CLASS + '-mobile';\n\n\tvar DEFAULT_EASING = 'linear';\n\tvar DEFAULT_DURATION = 1000;//ms\n\tvar DEFAULT_MOBILE_DECELERATION = 0.004;//pixel/ms²\n\n\tvar DEFAULT_SKROLLRBODY = 'skrollr-body';\n\n\tvar DEFAULT_SMOOTH_SCROLLING_DURATION = 200;//ms\n\n\tvar ANCHOR_START = 'start';\n\tvar ANCHOR_END = 'end';\n\tvar ANCHOR_CENTER = 'center';\n\tvar ANCHOR_BOTTOM = 'bottom';\n\n\t//The property which will be added to the DOM element to hold the ID of the skrollable.\n\tvar SKROLLABLE_ID_DOM_PROPERTY = '___skrollable_id';\n\n\tvar rxTouchIgnoreTags = /^(?:input|textarea|button|select)$/i;\n\n\tvar rxTrim = /^\\s+|\\s+$/g;\n\n\t//Find all data-attributes. data-[_constant]-[offset]-[anchor]-[anchor].\n\tvar rxKeyframeAttribute = /^data(?:-(_\\w+))?(?:-?(-?\\d*\\.?\\d+p?))?(?:-?(start|end|top|center|bottom))?(?:-?(top|center|bottom))?$/;\n\n\tvar rxPropValue = /\\s*(@?[\\w\\-\\[\\]]+)\\s*:\\s*(.+?)\\s*(?:;|$)/gi;\n\n\t//Easing function names follow the property in square brackets.\n\tvar rxPropEasing = /^(@?[a-z\\-]+)\\[(\\w+)\\]$/;\n\n\tvar rxCamelCase = /-([a-z0-9_])/g;\n\tvar rxCamelCaseFn = function(str, letter) {\n\t\treturn letter.toUpperCase();\n\t};\n\n\t//Numeric values with optional sign.\n\tvar rxNumericValue = /[\\-+]?[\\d]*\\.?[\\d]+/g;\n\n\t//Used to replace occurences of {?} with a number.\n\tvar rxInterpolateString = /\\{\\?\\}/g;\n\n\t//Finds rgb(a) colors, which don't use the percentage notation.\n\tvar rxRGBAIntegerColor = /rgba?\\(\\s*-?\\d+\\s*,\\s*-?\\d+\\s*,\\s*-?\\d+/g;\n\n\t//Finds all gradients.\n\tvar rxGradient = /[a-z\\-]+-gradient/g;\n\n\t//Vendor prefix. Will be set once skrollr gets initialized.\n\tvar theCSSPrefix = '';\n\tvar theDashedCSSPrefix = '';\n\n\t//Will be called once (when skrollr gets initialized).\n\tvar detectCSSPrefix = function() {\n\t\t//Only relevant prefixes. May be extended.\n\t\t//Could be dangerous if there will ever be a CSS property which actually starts with \"ms\". Don't hope so.\n\t\tvar rxPrefixes = /^(?:O|Moz|webkit|ms)|(?:-(?:o|moz|webkit|ms)-)/;\n\n\t\t//Detect prefix for current browser by finding the first property using a prefix.\n\t\tif(!getStyle) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar style = getStyle(body, null);\n\n\t\tfor(var k in style) {\n\t\t\t//We check the key and if the key is a number, we check the value as well, because safari's getComputedStyle returns some weird array-like thingy.\n\t\t\ttheCSSPrefix = (k.match(rxPrefixes) || (+k == k && style[k].match(rxPrefixes)));\n\n\t\t\tif(theCSSPrefix) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t//Did we even detect a prefix?\n\t\tif(!theCSSPrefix) {\n\t\t\ttheCSSPrefix = theDashedCSSPrefix = '';\n\n\t\t\treturn;\n\t\t}\n\n\t\ttheCSSPrefix = theCSSPrefix[0];\n\n\t\t//We could have detected either a dashed prefix or this camelCaseish-inconsistent stuff.\n\t\tif(theCSSPrefix.slice(0,1) === '-') {\n\t\t\ttheDashedCSSPrefix = theCSSPrefix;\n\n\t\t\t//There's no logic behind these. Need a look up.\n\t\t\ttheCSSPrefix = ({\n\t\t\t\t'-webkit-': 'webkit',\n\t\t\t\t'-moz-': 'Moz',\n\t\t\t\t'-ms-': 'ms',\n\t\t\t\t'-o-': 'O'\n\t\t\t})[theCSSPrefix];\n\t\t} else {\n\t\t\ttheDashedCSSPrefix = '-' + theCSSPrefix.toLowerCase() + '-';\n\t\t}\n\t};\n\n\tvar polyfillRAF = function() {\n\t\tvar requestAnimFrame = window.requestAnimationFrame || window[theCSSPrefix.toLowerCase() + 'RequestAnimationFrame'];\n\n\t\tvar lastTime = _now();\n\n\t\tif(_isMobile || !requestAnimFrame) {\n\t\t\trequestAnimFrame = function(callback) {\n\t\t\t\t//How long did it take to render?\n\t\t\t\tvar deltaTime = _now() - lastTime;\n\t\t\t\tvar delay = Math.max(0, 1000 / 60 - deltaTime);\n\n\t\t\t\treturn window.setTimeout(function() {\n\t\t\t\t\tlastTime = _now();\n\t\t\t\t\tcallback();\n\t\t\t\t}, delay);\n\t\t\t};\n\t\t}\n\n\t\treturn requestAnimFrame;\n\t};\n\n\tvar polyfillCAF = function() {\n\t\tvar cancelAnimFrame = window.cancelAnimationFrame || window[theCSSPrefix.toLowerCase() + 'CancelAnimationFrame'];\n\n\t\tif(_isMobile || !cancelAnimFrame) {\n\t\t\tcancelAnimFrame = function(timeout) {\n\t\t\t\treturn window.clearTimeout(timeout);\n\t\t\t};\n\t\t}\n\n\t\treturn cancelAnimFrame;\n\t};\n\n\t//Built-in easing functions.\n\tvar easings = {\n\t\tbegin: function() {\n\t\t\treturn 0;\n\t\t},\n\t\tend: function() {\n\t\t\treturn 1;\n\t\t},\n\t\tlinear: function(p) {\n\t\t\treturn p;\n\t\t},\n\t\tquadratic: function(p) {\n\t\t\treturn p * p;\n\t\t},\n\t\tcubic: function(p) {\n\t\t\treturn p * p * p;\n\t\t},\n\t\tswing: function(p) {\n\t\t\treturn (-Math.cos(p * Math.PI) / 2) + 0.5;\n\t\t},\n\t\tsqrt: function(p) {\n\t\t\treturn Math.sqrt(p);\n\t\t},\n\t\toutCubic: function(p) {\n\t\t\treturn (Math.pow((p - 1), 3) + 1);\n\t\t},\n\t\t//see https://www.desmos.com/calculator/tbr20s8vd2 for how I did this\n\t\tbounce: function(p) {\n\t\t\tvar a;\n\n\t\t\tif(p <= 0.5083) {\n\t\t\t\ta = 3;\n\t\t\t} else if(p <= 0.8489) {\n\t\t\t\ta = 9;\n\t\t\t} else if(p <= 0.96208) {\n\t\t\t\ta = 27;\n\t\t\t} else if(p <= 0.99981) {\n\t\t\t\ta = 91;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn 1 - Math.abs(3 * Math.cos(p * a * 1.028) / a);\n\t\t}\n\t};\n\n\t/**\n\t * Constructor.\n\t */\n\tfunction Skrollr(options) {\n\t\tdocumentElement = document.documentElement;\n\t\tbody = document.body;\n\n\t\tdetectCSSPrefix();\n\n\t\t_instance = this;\n\n\t\toptions = options || {};\n\n\t\t_constants = options.constants || {};\n\n\t\t//We allow defining custom easings or overwrite existing.\n\t\tif(options.easing) {\n\t\t\tfor(var e in options.easing) {\n\t\t\t\teasings[e] = options.easing[e];\n\t\t\t}\n\t\t}\n\n\t\t_edgeStrategy = options.edgeStrategy || 'set';\n\n\t\t_listeners = {\n\t\t\t//Function to be called right before rendering.\n\t\t\tbeforerender: options.beforerender,\n\n\t\t\t//Function to be called right after finishing rendering.\n\t\t\trender: options.render,\n\n\t\t\t//Function to be called whenever an element with the `data-emit-events` attribute passes a keyframe.\n\t\t\tkeyframe: options.keyframe\n\t\t};\n\n\t\t//forceHeight is true by default\n\t\t_forceHeight = options.forceHeight !== false;\n\n\t\tif(_forceHeight) {\n\t\t\t_scale = options.scale || 1;\n\t\t}\n\n\t\t_mobileDeceleration = options.mobileDeceleration || DEFAULT_MOBILE_DECELERATION;\n\n\t\t_smoothScrollingEnabled = options.smoothScrolling !== false;\n\t\t_smoothScrollingDuration = options.smoothScrollingDuration || DEFAULT_SMOOTH_SCROLLING_DURATION;\n\n\t\t//Dummy object. Will be overwritten in the _render method when smooth scrolling is calculated.\n\t\t_smoothScrolling = {\n\t\t\ttargetTop: _instance.getScrollTop()\n\t\t};\n\n\t\t//A custom check function may be passed.\n\t\t_isMobile = ((options.mobileCheck || function() {\n\t\t\treturn (/Android|iPhone|iPad|iPod|BlackBerry/i).test(navigator.userAgent || navigator.vendor || window.opera);\n\t\t})());\n\n\t\tif(_isMobile) {\n\t\t\t_skrollrBody = document.getElementById(options.skrollrBody || DEFAULT_SKROLLRBODY);\n\n\t\t\t//Detect 3d transform if there's a skrollr-body (only needed for #skrollr-body).\n\t\t\tif(_skrollrBody) {\n\t\t\t\t_detect3DTransforms();\n\t\t\t}\n\n\t\t\t_initMobile();\n\t\t\t_updateClass(documentElement, [SKROLLR_CLASS, SKROLLR_MOBILE_CLASS], [NO_SKROLLR_CLASS]);\n\t\t} else {\n\t\t\t_updateClass(documentElement, [SKROLLR_CLASS, SKROLLR_DESKTOP_CLASS], [NO_SKROLLR_CLASS]);\n\t\t}\n\n\t\t//Triggers parsing of elements and a first reflow.\n\t\t_instance.refresh();\n\n\t\t_addEvent(window, 'resize orientationchange', function() {\n\t\t\tvar width = documentElement.clientWidth;\n\t\t\tvar height = documentElement.clientHeight;\n\n\t\t\t//Only reflow if the size actually changed (#271).\n\t\t\tif(height !== _lastViewportHeight || width !== _lastViewportWidth) {\n\t\t\t\t_lastViewportHeight = height;\n\t\t\t\t_lastViewportWidth = width;\n\n\t\t\t\t_requestReflow = true;\n\t\t\t}\n\t\t});\n\n\t\tvar requestAnimFrame = polyfillRAF();\n\n\t\t//Let's go.\n\t\t(function animloop(){\n\t\t\t_render();\n\t\t\t_animFrame = requestAnimFrame(animloop);\n\t\t}());\n\n\t\treturn _instance;\n\t}\n\n\t/**\n\t * (Re)parses some or all elements.\n\t */\n\tSkrollr.prototype.refresh = function(elements) {\n\t\tvar elementIndex;\n\t\tvar elementsLength;\n\t\tvar ignoreID = false;\n\n\t\t//Completely reparse anything without argument.\n\t\tif(elements === undefined) {\n\t\t\t//Ignore that some elements may already have a skrollable ID.\n\t\t\tignoreID = true;\n\n\t\t\t_skrollables = [];\n\t\t\t_skrollableIdCounter = 0;\n\n\t\t\telements = document.getElementsByTagName('*');\n\t\t} else if(elements.length === undefined) {\n\t\t\t//We also accept a single element as parameter.\n\t\t\telements = [elements];\n\t\t}\n\n\t\telementIndex = 0;\n\t\telementsLength = elements.length;\n\n\t\tfor(; elementIndex < elementsLength; elementIndex++) {\n\t\t\tvar el = elements[elementIndex];\n\t\t\tvar anchorTarget = el;\n\t\t\tvar keyFrames = [];\n\n\t\t\t//If this particular element should be smooth scrolled.\n\t\t\tvar smoothScrollThis = _smoothScrollingEnabled;\n\n\t\t\t//The edge strategy for this particular element.\n\t\t\tvar edgeStrategy = _edgeStrategy;\n\n\t\t\t//If this particular element should emit keyframe events.\n\t\t\tvar emitEvents = false;\n\n\t\t\t//If we're reseting the counter, remove any old element ids that may be hanging around.\n\t\t\tif(ignoreID && SKROLLABLE_ID_DOM_PROPERTY in el) {\n\t\t\t\tdelete el[SKROLLABLE_ID_DOM_PROPERTY];\n\t\t\t}\n\n\t\t\tif(!el.attributes) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//Iterate over all attributes and search for key frame attributes.\n\t\t\tvar attributeIndex = 0;\n\t\t\tvar attributesLength = el.attributes.length;\n\n\t\t\tfor (; attributeIndex < attributesLength; attributeIndex++) {\n\t\t\t\tvar attr = el.attributes[attributeIndex];\n\n\t\t\t\tif(attr.name === 'data-anchor-target') {\n\t\t\t\t\tanchorTarget = document.querySelector(attr.value);\n\n\t\t\t\t\tif(anchorTarget === null) {\n\t\t\t\t\t\tthrow 'Unable to find anchor target \"' + attr.value + '\"';\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t//Global smooth scrolling can be overridden by the element attribute.\n\t\t\t\tif(attr.name === 'data-smooth-scrolling') {\n\t\t\t\t\tsmoothScrollThis = attr.value !== 'off';\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t//Global edge strategy can be overridden by the element attribute.\n\t\t\t\tif(attr.name === 'data-edge-strategy') {\n\t\t\t\t\tedgeStrategy = attr.value;\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t//Is this element tagged with the `data-emit-events` attribute?\n\t\t\t\tif(attr.name === 'data-emit-events') {\n\t\t\t\t\temitEvents = true;\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar match = attr.name.match(rxKeyframeAttribute);\n\n\t\t\t\tif(match === null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar kf = {\n\t\t\t\t\tprops: attr.value,\n\t\t\t\t\t//Point back to the element as well.\n\t\t\t\t\telement: el,\n\t\t\t\t\t//The name of the event which this keyframe will fire, if emitEvents is\n\t\t\t\t\teventType: attr.name.replace(rxCamelCase, rxCamelCaseFn)\n\t\t\t\t};\n\n\t\t\t\tkeyFrames.push(kf);\n\n\t\t\t\tvar constant = match[1];\n\n\t\t\t\tif(constant) {\n\t\t\t\t\t//Strip the underscore prefix.\n\t\t\t\t\tkf.constant = constant.substr(1);\n\t\t\t\t}\n\n\t\t\t\t//Get the key frame offset.\n\t\t\t\tvar offset = match[2];\n\n\t\t\t\t//Is it a percentage offset?\n\t\t\t\tif(/p$/.test(offset)) {\n\t\t\t\t\tkf.isPercentage = true;\n\t\t\t\t\tkf.offset = (offset.slice(0, -1) | 0) / 100;\n\t\t\t\t} else {\n\t\t\t\t\tkf.offset = (offset | 0);\n\t\t\t\t}\n\n\t\t\t\tvar anchor1 = match[3];\n\n\t\t\t\t//If second anchor is not set, the first will be taken for both.\n\t\t\t\tvar anchor2 = match[4] || anchor1;\n\n\t\t\t\t//\"absolute\" (or \"classic\") mode, where numbers mean absolute scroll offset.\n\t\t\t\tif(!anchor1 || anchor1 === ANCHOR_START || anchor1 === ANCHOR_END) {\n\t\t\t\t\tkf.mode = 'absolute';\n\n\t\t\t\t\t//data-end needs to be calculated after all key frames are known.\n\t\t\t\t\tif(anchor1 === ANCHOR_END) {\n\t\t\t\t\t\tkf.isEnd = true;\n\t\t\t\t\t} else if(!kf.isPercentage) {\n\t\t\t\t\t\t//For data-start we can already set the key frame w/o calculations.\n\t\t\t\t\t\t//#59: \"scale\" options should only affect absolute mode.\n\t\t\t\t\t\tkf.offset = kf.offset * _scale;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\"relative\" mode, where numbers are relative to anchors.\n\t\t\t\telse {\n\t\t\t\t\tkf.mode = 'relative';\n\t\t\t\t\tkf.anchors = [anchor1, anchor2];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Does this element have key frames?\n\t\t\tif(!keyFrames.length) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//Will hold the original style and class attributes before we controlled the element (see #80).\n\t\t\tvar styleAttr, classAttr;\n\n\t\t\tvar id;\n\n\t\t\tif(!ignoreID && SKROLLABLE_ID_DOM_PROPERTY in el) {\n\t\t\t\t//We already have this element under control. Grab the corresponding skrollable id.\n\t\t\t\tid = el[SKROLLABLE_ID_DOM_PROPERTY];\n\t\t\t\tstyleAttr = _skrollables[id].styleAttr;\n\t\t\t\tclassAttr = _skrollables[id].classAttr;\n\t\t\t} else {\n\t\t\t\t//It's an unknown element. Asign it a new skrollable id.\n\t\t\t\tid = (el[SKROLLABLE_ID_DOM_PROPERTY] = _skrollableIdCounter++);\n\t\t\t\tstyleAttr = el.style.cssText;\n\t\t\t\tclassAttr = _getClass(el);\n\t\t\t}\n\n\t\t\t_skrollables[id] = {\n\t\t\t\telement: el,\n\t\t\t\tstyleAttr: styleAttr,\n\t\t\t\tclassAttr: classAttr,\n\t\t\t\tanchorTarget: anchorTarget,\n\t\t\t\tkeyFrames: keyFrames,\n\t\t\t\tsmoothScrolling: smoothScrollThis,\n\t\t\t\tedgeStrategy: edgeStrategy,\n\t\t\t\temitEvents: emitEvents,\n\t\t\t\tlastFrameIndex: -1\n\t\t\t};\n\n\t\t\t_updateClass(el, [SKROLLABLE_CLASS], []);\n\t\t}\n\n\t\t//Reflow for the first time.\n\t\t_reflow();\n\n\t\t//Now that we got all key frame numbers right, actually parse the properties.\n\t\telementIndex = 0;\n\t\telementsLength = elements.length;\n\n\t\tfor(; elementIndex < elementsLength; elementIndex++) {\n\t\t\tvar sk = _skrollables[elements[elementIndex][SKROLLABLE_ID_DOM_PROPERTY]];\n\n\t\t\tif(sk === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//Parse the property string to objects\n\t\t\t_parseProps(sk);\n\n\t\t\t//Fill key frames with missing properties from left and right\n\t\t\t_fillProps(sk);\n\t\t}\n\n\t\treturn _instance;\n\t};\n\n\t/**\n\t * Transform \"relative\" mode to \"absolute\" mode.\n\t * That is, calculate anchor position and offset of element.\n\t */\n\tSkrollr.prototype.relativeToAbsolute = function(element, viewportAnchor, elementAnchor) {\n\t\tvar viewportHeight = documentElement.clientHeight;\n\t\tvar box = element.getBoundingClientRect();\n\t\tvar absolute = box.top;\n\n\t\t//#100: IE doesn't supply \"height\" with getBoundingClientRect.\n\t\tvar boxHeight = box.bottom - box.top;\n\n\t\tif(viewportAnchor === ANCHOR_BOTTOM) {\n\t\t\tabsolute -= viewportHeight;\n\t\t} else if(viewportAnchor === ANCHOR_CENTER) {\n\t\t\tabsolute -= viewportHeight / 2;\n\t\t}\n\n\t\tif(elementAnchor === ANCHOR_BOTTOM) {\n\t\t\tabsolute += boxHeight;\n\t\t} else if(elementAnchor === ANCHOR_CENTER) {\n\t\t\tabsolute += boxHeight / 2;\n\t\t}\n\n\t\t//Compensate scrolling since getBoundingClientRect is relative to viewport.\n\t\tabsolute += _instance.getScrollTop();\n\n\t\treturn (absolute + 0.5) | 0;\n\t};\n\n\t/**\n\t * Animates scroll top to new position.\n\t */\n\tSkrollr.prototype.animateTo = function(top, options) {\n\t\toptions = options || {};\n\n\t\tvar now = _now();\n\t\tvar scrollTop = _instance.getScrollTop();\n\t\tvar duration = options.duration === undefined ? DEFAULT_DURATION : options.duration;\n\n\t\t//Setting this to a new value will automatically cause the current animation to stop, if any.\n\t\t_scrollAnimation = {\n\t\t\tstartTop: scrollTop,\n\t\t\ttopDiff: top - scrollTop,\n\t\t\ttargetTop: top,\n\t\t\tduration: duration,\n\t\t\tstartTime: now,\n\t\t\tendTime: now + duration,\n\t\t\teasing: easings[options.easing || DEFAULT_EASING],\n\t\t\tdone: options.done\n\t\t};\n\n\t\t//Don't queue the animation if there's nothing to animate.\n\t\tif(!_scrollAnimation.topDiff) {\n\t\t\tif(_scrollAnimation.done) {\n\t\t\t\t_scrollAnimation.done.call(_instance, false);\n\t\t\t}\n\n\t\t\t_scrollAnimation = undefined;\n\t\t}\n\n\t\treturn _instance;\n\t};\n\n\t/**\n\t * Stops animateTo animation.\n\t */\n\tSkrollr.prototype.stopAnimateTo = function() {\n\t\tif(_scrollAnimation && _scrollAnimation.done) {\n\t\t\t_scrollAnimation.done.call(_instance, true);\n\t\t}\n\n\t\t_scrollAnimation = undefined;\n\t};\n\n\t/**\n\t * Returns if an animation caused by animateTo is currently running.\n\t */\n\tSkrollr.prototype.isAnimatingTo = function() {\n\t\treturn !!_scrollAnimation;\n\t};\n\n\tSkrollr.prototype.isMobile = function() {\n\t\treturn _isMobile;\n\t};\n\n\tSkrollr.prototype.setScrollTop = function(top, force) {\n\t\t_forceRender = (force === true);\n\n\t\tif(_isMobile) {\n\t\t\t_mobileOffset = Math.min(Math.max(top, 0), _maxKeyFrame);\n\t\t} else {\n\t\t\twindow.scrollTo(0, top);\n\t\t}\n\n\t\treturn _instance;\n\t};\n\n\tSkrollr.prototype.getScrollTop = function() {\n\t\tif(_isMobile) {\n\t\t\treturn _mobileOffset;\n\t\t} else {\n\t\t\treturn window.pageYOffset || documentElement.scrollTop || body.scrollTop || 0;\n\t\t}\n\t};\n\n\tSkrollr.prototype.getMaxScrollTop = function() {\n\t\treturn _maxKeyFrame;\n\t};\n\n\tSkrollr.prototype.on = function(name, fn) {\n\t\t_listeners[name] = fn;\n\n\t\treturn _instance;\n\t};\n\n\tSkrollr.prototype.off = function(name) {\n\t\tdelete _listeners[name];\n\n\t\treturn _instance;\n\t};\n\n\tSkrollr.prototype.destroy = function() {\n\t\tvar cancelAnimFrame = polyfillCAF();\n\t\tcancelAnimFrame(_animFrame);\n\t\t_removeAllEvents();\n\n\t\t_updateClass(documentElement, [NO_SKROLLR_CLASS], [SKROLLR_CLASS, SKROLLR_DESKTOP_CLASS, SKROLLR_MOBILE_CLASS]);\n\n\t\tvar skrollableIndex = 0;\n\t\tvar skrollablesLength = _skrollables.length;\n\n\t\tfor(; skrollableIndex < skrollablesLength; skrollableIndex++) {\n\t\t\t_reset(_skrollables[skrollableIndex].element);\n\t\t}\n\n\t\tdocumentElement.style.overflow = body.style.overflow = '';\n\t\tdocumentElement.style.height = body.style.height = '';\n\n\t\tif(_skrollrBody) {\n\t\t\tskrollr.setStyle(_skrollrBody, 'transform', 'none');\n\t\t}\n\n\t\t_instance = undefined;\n\t\t_skrollrBody = undefined;\n\t\t_listeners = undefined;\n\t\t_forceHeight = undefined;\n\t\t_maxKeyFrame = 0;\n\t\t_scale = 1;\n\t\t_constants = undefined;\n\t\t_mobileDeceleration = undefined;\n\t\t_direction = 'down';\n\t\t_lastTop = -1;\n\t\t_lastViewportWidth = 0;\n\t\t_lastViewportHeight = 0;\n\t\t_requestReflow = false;\n\t\t_scrollAnimation = undefined;\n\t\t_smoothScrollingEnabled = undefined;\n\t\t_smoothScrollingDuration = undefined;\n\t\t_smoothScrolling = undefined;\n\t\t_forceRender = undefined;\n\t\t_skrollableIdCounter = 0;\n\t\t_edgeStrategy = undefined;\n\t\t_isMobile = false;\n\t\t_mobileOffset = 0;\n\t\t_translateZ = undefined;\n\t};\n\n\t/*\n\t\tPrivate methods.\n\t*/\n\n\tvar _initMobile = function() {\n\t\tvar initialElement;\n\t\tvar initialTouchY;\n\t\tvar initialTouchX;\n\t\tvar currentElement;\n\t\tvar currentTouchY;\n\t\tvar currentTouchX;\n\t\tvar lastTouchY;\n\t\tvar deltaY;\n\n\t\tvar initialTouchTime;\n\t\tvar currentTouchTime;\n\t\tvar lastTouchTime;\n\t\tvar deltaTime;\n\n\t\t_addEvent(documentElement, [EVENT_TOUCHSTART, EVENT_TOUCHMOVE, EVENT_TOUCHCANCEL, EVENT_TOUCHEND].join(' '), function(e) {\n\t\t\tvar touch = e.changedTouches[0];\n\n\t\t\tcurrentElement = e.target;\n\n\t\t\t//We don't want text nodes.\n\t\t\twhile(currentElement.nodeType === 3) {\n\t\t\t\tcurrentElement = currentElement.parentNode;\n\t\t\t}\n\n\t\t\tcurrentTouchY = touch.clientY;\n\t\t\tcurrentTouchX = touch.clientX;\n\t\t\tcurrentTouchTime = e.timeStamp;\n\n\t\t\tif(!rxTouchIgnoreTags.test(currentElement.tagName)) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\n\t\t\tswitch(e.type) {\n\t\t\t\tcase EVENT_TOUCHSTART:\n\t\t\t\t\t//The last element we tapped on.\n\t\t\t\t\tif(initialElement) {\n\t\t\t\t\t\tinitialElement.blur();\n\t\t\t\t\t}\n\n\t\t\t\t\t_instance.stopAnimateTo();\n\n\t\t\t\t\tinitialElement = currentElement;\n\n\t\t\t\t\tinitialTouchY = lastTouchY = currentTouchY;\n\t\t\t\t\tinitialTouchX = currentTouchX;\n\t\t\t\t\tinitialTouchTime = currentTouchTime;\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase EVENT_TOUCHMOVE:\n\t\t\t\t\t//Prevent default event on touchIgnore elements in case they don't have focus yet.\n\t\t\t\t\tif(rxTouchIgnoreTags.test(currentElement.tagName) && document.activeElement !== currentElement) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\n\t\t\t\t\tdeltaY = currentTouchY - lastTouchY;\n\t\t\t\t\tdeltaTime = currentTouchTime - lastTouchTime;\n\n\t\t\t\t\t_instance.setScrollTop(_mobileOffset - deltaY, true);\n\n\t\t\t\t\tlastTouchY = currentTouchY;\n\t\t\t\t\tlastTouchTime = currentTouchTime;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tcase EVENT_TOUCHCANCEL:\n\t\t\t\tcase EVENT_TOUCHEND:\n\t\t\t\t\tvar distanceY = initialTouchY - currentTouchY;\n\t\t\t\t\tvar distanceX = initialTouchX - currentTouchX;\n\t\t\t\t\tvar distance2 = distanceX * distanceX + distanceY * distanceY;\n\n\t\t\t\t\t//Check if it was more like a tap (moved less than 7px).\n\t\t\t\t\tif(distance2 < 49) {\n\t\t\t\t\t\tif(!rxTouchIgnoreTags.test(initialElement.tagName)) {\n\t\t\t\t\t\t\tinitialElement.focus();\n\n\t\t\t\t\t\t\t//It was a tap, click the element.\n\t\t\t\t\t\t\tvar clickEvent = document.createEvent('MouseEvents');\n\t\t\t\t\t\t\tclickEvent.initMouseEvent('click', true, true, e.view, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, 0, null);\n\t\t\t\t\t\t\tinitialElement.dispatchEvent(clickEvent);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tinitialElement = undefined;\n\n\t\t\t\t\tvar speed = deltaY / deltaTime;\n\n\t\t\t\t\t//Cap speed at 3 pixel/ms.\n\t\t\t\t\tspeed = Math.max(Math.min(speed, 3), -3);\n\n\t\t\t\t\tvar duration = Math.abs(speed / _mobileDeceleration);\n\t\t\t\t\tvar targetOffset = speed * duration + 0.5 * _mobileDeceleration * duration * duration;\n\t\t\t\t\tvar targetTop = _instance.getScrollTop() - targetOffset;\n\n\t\t\t\t\t//Relative duration change for when scrolling above bounds.\n\t\t\t\t\tvar targetRatio = 0;\n\n\t\t\t\t\t//Change duration proportionally when scrolling would leave bounds.\n\t\t\t\t\tif(targetTop > _maxKeyFrame) {\n\t\t\t\t\t\ttargetRatio = (_maxKeyFrame - targetTop) / targetOffset;\n\n\t\t\t\t\t\ttargetTop = _maxKeyFrame;\n\t\t\t\t\t} else if(targetTop < 0) {\n\t\t\t\t\t\ttargetRatio = -targetTop / targetOffset;\n\n\t\t\t\t\t\ttargetTop = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tduration = duration * (1 - targetRatio);\n\n\t\t\t\t\t_instance.animateTo((targetTop + 0.5) | 0, {easing: 'outCubic', duration: duration});\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\n\t\t//Just in case there has already been some native scrolling, reset it.\n\t\twindow.scrollTo(0, 0);\n\t\tdocumentElement.style.overflow = body.style.overflow = 'hidden';\n\t};\n\n\t/**\n\t * Updates key frames which depend on others / need to be updated on resize.\n\t * That is \"end\" in \"absolute\" mode and all key frames in \"relative\" mode.\n\t * Also handles constants, because they may change on resize.\n\t */\n\tvar _updateDependentKeyFrames = function() {\n\t\tvar viewportHeight = documentElement.clientHeight;\n\t\tvar processedConstants = _processConstants();\n\t\tvar skrollable;\n\t\tvar element;\n\t\tvar anchorTarget;\n\t\tvar keyFrames;\n\t\tvar keyFrameIndex;\n\t\tvar keyFramesLength;\n\t\tvar kf;\n\t\tvar skrollableIndex;\n\t\tvar skrollablesLength;\n\t\tvar offset;\n\t\tvar constantValue;\n\n\t\t//First process all relative-mode elements and find the max key frame.\n\t\tskrollableIndex = 0;\n\t\tskrollablesLength = _skrollables.length;\n\n\t\tfor(; skrollableIndex < skrollablesLength; skrollableIndex++) {\n\t\t\tskrollable = _skrollables[skrollableIndex];\n\t\t\telement = skrollable.element;\n\t\t\tanchorTarget = skrollable.anchorTarget;\n\t\t\tkeyFrames = skrollable.keyFrames;\n\n\t\t\tkeyFrameIndex = 0;\n\t\t\tkeyFramesLength = keyFrames.length;\n\n\t\t\tfor(; keyFrameIndex < keyFramesLength; keyFrameIndex++) {\n\t\t\t\tkf = keyFrames[keyFrameIndex];\n\n\t\t\t\toffset = kf.offset;\n\t\t\t\tconstantValue = processedConstants[kf.constant] || 0;\n\n\t\t\t\tkf.frame = offset;\n\n\t\t\t\tif(kf.isPercentage) {\n\t\t\t\t\t//Convert the offset to percentage of the viewport height.\n\t\t\t\t\toffset = offset * viewportHeight;\n\n\t\t\t\t\t//Absolute + percentage mode.\n\t\t\t\t\tkf.frame = offset;\n\t\t\t\t}\n\n\t\t\t\tif(kf.mode === 'relative') {\n\t\t\t\t\t_reset(element);\n\n\t\t\t\t\tkf.frame = _instance.relativeToAbsolute(anchorTarget, kf.anchors[0], kf.anchors[1]) - offset;\n\n\t\t\t\t\t_reset(element, true);\n\t\t\t\t}\n\n\t\t\t\tkf.frame += constantValue;\n\n\t\t\t\t//Only search for max key frame when forceHeight is enabled.\n\t\t\t\tif(_forceHeight) {\n\t\t\t\t\t//Find the max key frame, but don't use one of the data-end ones for comparison.\n\t\t\t\t\tif(!kf.isEnd && kf.frame > _maxKeyFrame) {\n\t\t\t\t\t\t_maxKeyFrame = kf.frame;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//#133: The document can be larger than the maxKeyFrame we found.\n\t\t_maxKeyFrame = Math.max(_maxKeyFrame, _getDocumentHeight());\n\n\t\t//Now process all data-end keyframes.\n\t\tskrollableIndex = 0;\n\t\tskrollablesLength = _skrollables.length;\n\n\t\tfor(; skrollableIndex < skrollablesLength; skrollableIndex++) {\n\t\t\tskrollable = _skrollables[skrollableIndex];\n\t\t\tkeyFrames = skrollable.keyFrames;\n\n\t\t\tkeyFrameIndex = 0;\n\t\t\tkeyFramesLength = keyFrames.length;\n\n\t\t\tfor(; keyFrameIndex < keyFramesLength; keyFrameIndex++) {\n\t\t\t\tkf = keyFrames[keyFrameIndex];\n\n\t\t\t\tconstantValue = processedConstants[kf.constant] || 0;\n\n\t\t\t\tif(kf.isEnd) {\n\t\t\t\t\tkf.frame = _maxKeyFrame - kf.offset + constantValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tskrollable.keyFrames.sort(_keyFrameComparator);\n\t\t}\n\t};\n\n\t/**\n\t * Calculates and sets the style properties for the element at the given frame.\n\t * @param fakeFrame The frame to render at when smooth scrolling is enabled.\n\t * @param actualFrame The actual frame we are at.\n\t */\n\tvar _calcSteps = function(fakeFrame, actualFrame) {\n\t\t//Iterate over all skrollables.\n\t\tvar skrollableIndex = 0;\n\t\tvar skrollablesLength = _skrollables.length;\n\n\t\tfor(; skrollableIndex < skrollablesLength; skrollableIndex++) {\n\t\t\tvar skrollable = _skrollables[skrollableIndex];\n\t\t\tvar element = skrollable.element;\n\t\t\tvar frame = skrollable.smoothScrolling ? fakeFrame : actualFrame;\n\t\t\tvar frames = skrollable.keyFrames;\n\t\t\tvar framesLength = frames.length;\n\t\t\tvar firstFrame = frames[0];\n\t\t\tvar lastFrame = frames[frames.length - 1];\n\t\t\tvar beforeFirst = frame < firstFrame.frame;\n\t\t\tvar afterLast = frame > lastFrame.frame;\n\t\t\tvar firstOrLastFrame = beforeFirst ? firstFrame : lastFrame;\n\t\t\tvar emitEvents = skrollable.emitEvents;\n\t\t\tvar lastFrameIndex = skrollable.lastFrameIndex;\n\t\t\tvar key;\n\t\t\tvar value;\n\n\t\t\t//If we are before/after the first/last frame, set the styles according to the given edge strategy.\n\t\t\tif(beforeFirst || afterLast) {\n\t\t\t\t//Check if we already handled this edge case last time.\n\t\t\t\t//Note: using setScrollTop it's possible that we jumped from one edge to the other.\n\t\t\t\tif(beforeFirst && skrollable.edge === -1 || afterLast && skrollable.edge === 1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t//Add the skrollr-before or -after class.\n\t\t\t\tif(beforeFirst) {\n\t\t\t\t\t_updateClass(element, [SKROLLABLE_BEFORE_CLASS], [SKROLLABLE_AFTER_CLASS, SKROLLABLE_BETWEEN_CLASS]);\n\n\t\t\t\t\t//This handles the special case where we exit the first keyframe.\n\t\t\t\t\tif(emitEvents && lastFrameIndex > -1) {\n\t\t\t\t\t\t_emitEvent(element, firstFrame.eventType, _direction);\n\t\t\t\t\t\tskrollable.lastFrameIndex = -1;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t_updateClass(element, [SKROLLABLE_AFTER_CLASS], [SKROLLABLE_BEFORE_CLASS, SKROLLABLE_BETWEEN_CLASS]);\n\n\t\t\t\t\t//This handles the special case where we exit the last keyframe.\n\t\t\t\t\tif(emitEvents && lastFrameIndex < framesLength) {\n\t\t\t\t\t\t_emitEvent(element, lastFrame.eventType, _direction);\n\t\t\t\t\t\tskrollable.lastFrameIndex = framesLength;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//Remember that we handled the edge case (before/after the first/last keyframe).\n\t\t\t\tskrollable.edge = beforeFirst ? -1 : 1;\n\n\t\t\t\tswitch(skrollable.edgeStrategy) {\n\t\t\t\t\tcase 'reset':\n\t\t\t\t\t\t_reset(element);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tcase 'ease':\n\t\t\t\t\t\t//Handle this case like it would be exactly at first/last keyframe and just pass it on.\n\t\t\t\t\t\tframe = firstOrLastFrame.frame;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\tcase 'set':\n\t\t\t\t\t\tvar props = firstOrLastFrame.props;\n\n\t\t\t\t\t\tfor(key in props) {\n\t\t\t\t\t\t\tif(hasProp.call(props, key)) {\n\t\t\t\t\t\t\t\tvalue = _interpolateString(props[key].value);\n\n\t\t\t\t\t\t\t\t//Set style or attribute.\n\t\t\t\t\t\t\t\tif(key.indexOf('@') === 0) {\n\t\t\t\t\t\t\t\t\telement.setAttribute(key.substr(1), value);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tskrollr.setStyle(element, key, value);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//Did we handle an edge last time?\n\t\t\t\tif(skrollable.edge !== 0) {\n\t\t\t\t\t_updateClass(element, [SKROLLABLE_CLASS, SKROLLABLE_BETWEEN_CLASS], [SKROLLABLE_BEFORE_CLASS, SKROLLABLE_AFTER_CLASS]);\n\t\t\t\t\tskrollable.edge = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Find out between which two key frames we are right now.\n\t\t\tvar keyFrameIndex = 0;\n\n\t\t\tfor(; keyFrameIndex < framesLength - 1; keyFrameIndex++) {\n\t\t\t\tif(frame >= frames[keyFrameIndex].frame && frame <= frames[keyFrameIndex + 1].frame) {\n\t\t\t\t\tvar left = frames[keyFrameIndex];\n\t\t\t\t\tvar right = frames[keyFrameIndex + 1];\n\n\t\t\t\t\tfor(key in left.props) {\n\t\t\t\t\t\tif(hasProp.call(left.props, key)) {\n\t\t\t\t\t\t\tvar progress = (frame - left.frame) / (right.frame - left.frame);\n\n\t\t\t\t\t\t\t//Transform the current progress using the given easing function.\n\t\t\t\t\t\t\tprogress = left.props[key].easing(progress);\n\n\t\t\t\t\t\t\t//Interpolate between the two values\n\t\t\t\t\t\t\tvalue = _calcInterpolation(left.props[key].value, right.props[key].value, progress);\n\n\t\t\t\t\t\t\tvalue = _interpolateString(value);\n\n\t\t\t\t\t\t\t//Set style or attribute.\n\t\t\t\t\t\t\tif(key.indexOf('@') === 0) {\n\t\t\t\t\t\t\t\telement.setAttribute(key.substr(1), value);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tskrollr.setStyle(element, key, value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//Are events enabled on this element?\n\t\t\t\t\t//This code handles the usual cases of scrolling through different keyframes.\n\t\t\t\t\t//The special cases of before first and after last keyframe are handled above.\n\t\t\t\t\tif(emitEvents) {\n\t\t\t\t\t\t//Did we pass a new keyframe?\n\t\t\t\t\t\tif(lastFrameIndex !== keyFrameIndex) {\n\t\t\t\t\t\t\tif(_direction === 'down') {\n\t\t\t\t\t\t\t\t_emitEvent(element, left.eventType, _direction);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t_emitEvent(element, right.eventType, _direction);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tskrollable.lastFrameIndex = keyFrameIndex;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Renders all elements.\n\t */\n\tvar _render = function() {\n\t\tif(_requestReflow) {\n\t\t\t_requestReflow = false;\n\t\t\t_reflow();\n\t\t}\n\n\t\t//We may render something else than the actual scrollbar position.\n\t\tvar renderTop = _instance.getScrollTop();\n\n\t\t//If there's an animation, which ends in current render call, call the callback after rendering.\n\t\tvar afterAnimationCallback;\n\t\tvar now = _now();\n\t\tvar progress;\n\n\t\t//Before actually rendering handle the scroll animation, if any.\n\t\tif(_scrollAnimation) {\n\t\t\t//It's over\n\t\t\tif(now >= _scrollAnimation.endTime) {\n\t\t\t\trenderTop = _scrollAnimation.targetTop;\n\t\t\t\tafterAnimationCallback = _scrollAnimation.done;\n\t\t\t\t_scrollAnimation = undefined;\n\t\t\t} else {\n\t\t\t\t//Map the current progress to the new progress using given easing function.\n\t\t\t\tprogress = _scrollAnimation.easing((now - _scrollAnimation.startTime) / _scrollAnimation.duration);\n\n\t\t\t\trenderTop = (_scrollAnimation.startTop + progress * _scrollAnimation.topDiff) | 0;\n\t\t\t}\n\n\t\t\t_instance.setScrollTop(renderTop, true);\n\t\t}\n\t\t//Smooth scrolling only if there's no animation running and if we're not forcing the rendering.\n\t\telse if(!_forceRender) {\n\t\t\tvar smoothScrollingDiff = _smoothScrolling.targetTop - renderTop;\n\n\t\t\t//The user scrolled, start new smooth scrolling.\n\t\t\tif(smoothScrollingDiff) {\n\t\t\t\t_smoothScrolling = {\n\t\t\t\t\tstartTop: _lastTop,\n\t\t\t\t\ttopDiff: renderTop - _lastTop,\n\t\t\t\t\ttargetTop: renderTop,\n\t\t\t\t\tstartTime: _lastRenderCall,\n\t\t\t\t\tendTime: _lastRenderCall + _smoothScrollingDuration\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t//Interpolate the internal scroll position (not the actual scrollbar).\n\t\t\tif(now <= _smoothScrolling.endTime) {\n\t\t\t\t//Map the current progress to the new progress using easing function.\n\t\t\t\tprogress = easings.sqrt((now - _smoothScrolling.startTime) / _smoothScrollingDuration);\n\n\t\t\t\trenderTop = (_smoothScrolling.startTop + progress * _smoothScrolling.topDiff) | 0;\n\t\t\t}\n\t\t}\n\n\t\t//Did the scroll position even change?\n\t\tif(_forceRender || _lastTop !== renderTop) {\n\t\t\t//Remember in which direction are we scrolling?\n\t\t\t_direction = (renderTop > _lastTop) ? 'down' : (renderTop < _lastTop ? 'up' : _direction);\n\n\t\t\t_forceRender = false;\n\n\t\t\tvar listenerParams = {\n\t\t\t\tcurTop: renderTop,\n\t\t\t\tlastTop: _lastTop,\n\t\t\t\tmaxTop: _maxKeyFrame,\n\t\t\t\tdirection: _direction\n\t\t\t};\n\n\t\t\t//Tell the listener we are about to render.\n\t\t\tvar continueRendering = _listeners.beforerender && _listeners.beforerender.call(_instance, listenerParams);\n\n\t\t\t//The beforerender listener function is able the cancel rendering.\n\t\t\tif(continueRendering !== false) {\n\t\t\t\t//Now actually interpolate all the styles.\n\t\t\t\t_calcSteps(renderTop, _instance.getScrollTop());\n\n\t\t\t\t//That's were we actually \"scroll\" on mobile.\n\t\t\t\tif(_isMobile && _skrollrBody) {\n\t\t\t\t\t//Set the transform (\"scroll it\").\n\t\t\t\t\tskrollr.setStyle(_skrollrBody, 'transform', 'translate(0, ' + -(_mobileOffset) + 'px) ' + _translateZ);\n\t\t\t\t}\n\n\t\t\t\t//Remember when we last rendered.\n\t\t\t\t_lastTop = renderTop;\n\n\t\t\t\tif(_listeners.render) {\n\t\t\t\t\t_listeners.render.call(_instance, listenerParams);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(afterAnimationCallback) {\n\t\t\t\tafterAnimationCallback.call(_instance, false);\n\t\t\t}\n\t\t}\n\n\t\t_lastRenderCall = now;\n\t};\n\n\t/**\n\t * Parses the properties for each key frame of the given skrollable.\n\t */\n\tvar _parseProps = function(skrollable) {\n\t\t//Iterate over all key frames\n\t\tvar keyFrameIndex = 0;\n\t\tvar keyFramesLength = skrollable.keyFrames.length;\n\n\t\tfor(; keyFrameIndex < keyFramesLength; keyFrameIndex++) {\n\t\t\tvar frame = skrollable.keyFrames[keyFrameIndex];\n\t\t\tvar easing;\n\t\t\tvar value;\n\t\t\tvar prop;\n\t\t\tvar props = {};\n\n\t\t\tvar match;\n\n\t\t\twhile((match = rxPropValue.exec(frame.props)) !== null) {\n\t\t\t\tprop = match[1];\n\t\t\t\tvalue = match[2];\n\n\t\t\t\teasing = prop.match(rxPropEasing);\n\n\t\t\t\t//Is there an easing specified for this prop?\n\t\t\t\tif(easing !== null) {\n\t\t\t\t\tprop = easing[1];\n\t\t\t\t\teasing = easing[2];\n\t\t\t\t} else {\n\t\t\t\t\teasing = DEFAULT_EASING;\n\t\t\t\t}\n\n\t\t\t\t//Exclamation point at first position forces the value to be taken literal.\n\t\t\t\tvalue = value.indexOf('!') ? _parseProp(value) : [value.slice(1)];\n\n\t\t\t\t//Save the prop for this key frame with his value and easing function\n\t\t\t\tprops[prop] = {\n\t\t\t\t\tvalue: value,\n\t\t\t\t\teasing: easings[easing]\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tframe.props = props;\n\t\t}\n\t};\n\n\t/**\n\t * Parses a value extracting numeric values and generating a format string\n\t * for later interpolation of the new values in old string.\n\t *\n\t * @param val The CSS value to be parsed.\n\t * @return Something like [\"rgba(?%,?%, ?%,?)\", 100, 50, 0, .7]\n\t * where the first element is the format string later used\n\t * and all following elements are the numeric value.\n\t */\n\tvar _parseProp = function(val) {\n\t\tvar numbers = [];\n\n\t\t//One special case, where floats don't work.\n\t\t//We replace all occurences of rgba colors\n\t\t//which don't use percentage notation with the percentage notation.\n\t\trxRGBAIntegerColor.lastIndex = 0;\n\t\tval = val.replace(rxRGBAIntegerColor, function(rgba) {\n\t\t\treturn rgba.replace(rxNumericValue, function(n) {\n\t\t\t\treturn n / 255 * 100 + '%';\n\t\t\t});\n\t\t});\n\n\t\t//Handle prefixing of \"gradient\" values.\n\t\t//For now only the prefixed value will be set. Unprefixed isn't supported anyway.\n\t\tif(theDashedCSSPrefix) {\n\t\t\trxGradient.lastIndex = 0;\n\t\t\tval = val.replace(rxGradient, function(s) {\n\t\t\t\treturn theDashedCSSPrefix + s;\n\t\t\t});\n\t\t}\n\n\t\t//Now parse ANY number inside this string and create a format string.\n\t\tval = val.replace(rxNumericValue, function(n) {\n\t\t\tnumbers.push(+n);\n\t\t\treturn '{?}';\n\t\t});\n\n\t\t//Add the formatstring as first value.\n\t\tnumbers.unshift(val);\n\n\t\treturn numbers;\n\t};\n\n\t/**\n\t * Fills the key frames with missing left and right hand properties.\n\t * If key frame 1 has property X and key frame 2 is missing X,\n\t * but key frame 3 has X again, then we need to assign X to key frame 2 too.\n\t *\n\t * @param sk A skrollable.\n\t */\n\tvar _fillProps = function(sk) {\n\t\t//Will collect the properties key frame by key frame\n\t\tvar propList = {};\n\t\tvar keyFrameIndex;\n\t\tvar keyFramesLength;\n\n\t\t//Iterate over all key frames from left to right\n\t\tkeyFrameIndex = 0;\n\t\tkeyFramesLength = sk.keyFrames.length;\n\n\t\tfor(; keyFrameIndex < keyFramesLength; keyFrameIndex++) {\n\t\t\t_fillPropForFrame(sk.keyFrames[keyFrameIndex], propList);\n\t\t}\n\n\t\t//Now do the same from right to fill the last gaps\n\n\t\tpropList = {};\n\n\t\t//Iterate over all key frames from right to left\n\t\tkeyFrameIndex = sk.keyFrames.length - 1;\n\n\t\tfor(; keyFrameIndex >= 0; keyFrameIndex--) {\n\t\t\t_fillPropForFrame(sk.keyFrames[keyFrameIndex], propList);\n\t\t}\n\t};\n\n\tvar _fillPropForFrame = function(frame, propList) {\n\t\tvar key;\n\n\t\t//For each key frame iterate over all right hand properties and assign them,\n\t\t//but only if the current key frame doesn't have the property by itself\n\t\tfor(key in propList) {\n\t\t\t//The current frame misses this property, so assign it.\n\t\t\tif(!hasProp.call(frame.props, key)) {\n\t\t\t\tframe.props[key] = propList[key];\n\t\t\t}\n\t\t}\n\n\t\t//Iterate over all props of the current frame and collect them\n\t\tfor(key in frame.props) {\n\t\t\tpropList[key] = frame.props[key];\n\t\t}\n\t};\n\n\t/**\n\t * Calculates the new values for two given values array.\n\t */\n\tvar _calcInterpolation = function(val1, val2, progress) {\n\t\tvar valueIndex;\n\t\tvar val1Length = val1.length;\n\n\t\t//They both need to have the same length\n\t\tif(val1Length !== val2.length) {\n\t\t\tthrow 'Can\\'t interpolate between \"' + val1[0] + '\" and \"' + val2[0] + '\"';\n\t\t}\n\n\t\t//Add the format string as first element.\n\t\tvar interpolated = [val1[0]];\n\n\t\tvalueIndex = 1;\n\n\t\tfor(; valueIndex < val1Length; valueIndex++) {\n\t\t\t//That's the line where the two numbers are actually interpolated.\n\t\t\tinterpolated[valueIndex] = val1[valueIndex] + ((val2[valueIndex] - val1[valueIndex]) * progress);\n\t\t}\n\n\t\treturn interpolated;\n\t};\n\n\t/**\n\t * Interpolates the numeric values into the format string.\n\t */\n\tvar _interpolateString = function(val) {\n\t\tvar valueIndex = 1;\n\n\t\trxInterpolateString.lastIndex = 0;\n\n\t\treturn val[0].replace(rxInterpolateString, function() {\n\t\t\treturn val[valueIndex++];\n\t\t});\n\t};\n\n\t/**\n\t * Resets the class and style attribute to what it was before skrollr manipulated the element.\n\t * Also remembers the values it had before reseting, in order to undo the reset.\n\t */\n\tvar _reset = function(elements, undo) {\n\t\t//We accept a single element or an array of elements.\n\t\telements = [].concat(elements);\n\n\t\tvar skrollable;\n\t\tvar element;\n\t\tvar elementsIndex = 0;\n\t\tvar elementsLength = elements.length;\n\n\t\tfor(; elementsIndex < elementsLength; elementsIndex++) {\n\t\t\telement = elements[elementsIndex];\n\t\t\tskrollable = _skrollables[element[SKROLLABLE_ID_DOM_PROPERTY]];\n\n\t\t\t//Couldn't find the skrollable for this DOM element.\n\t\t\tif(!skrollable) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(undo) {\n\t\t\t\t//Reset class and style to the \"dirty\" (set by skrollr) values.\n\t\t\t\telement.style.cssText = skrollable.dirtyStyleAttr;\n\t\t\t\t_updateClass(element, skrollable.dirtyClassAttr);\n\t\t\t} else {\n\t\t\t\t//Remember the \"dirty\" (set by skrollr) class and style.\n\t\t\t\tskrollable.dirtyStyleAttr = element.style.cssText;\n\t\t\t\tskrollable.dirtyClassAttr = _getClass(element);\n\n\t\t\t\t//Reset class and style to what it originally was.\n\t\t\t\telement.style.cssText = skrollable.styleAttr;\n\t\t\t\t_updateClass(element, skrollable.classAttr);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Detects support for 3d transforms by applying it to the skrollr-body.\n\t */\n\tvar _detect3DTransforms = function() {\n\t\t_translateZ = 'translateZ(0)';\n\t\tskrollr.setStyle(_skrollrBody, 'transform', _translateZ);\n\n\t\tvar computedStyle = getStyle(_skrollrBody);\n\t\tvar computedTransform = computedStyle.getPropertyValue('transform');\n\t\tvar computedTransformWithPrefix = computedStyle.getPropertyValue(theDashedCSSPrefix + 'transform');\n\t\tvar has3D = (computedTransform && computedTransform !== 'none') || (computedTransformWithPrefix && computedTransformWithPrefix !== 'none');\n\n\t\tif(!has3D) {\n\t\t\t_translateZ = '';\n\t\t}\n\t};\n\n\t/**\n\t * Set the CSS property on the given element. Sets prefixed properties as well.\n\t */\n\tskrollr.setStyle = function(el, prop, val) {\n\t\tvar style = el.style;\n\n\t\t//Camel case.\n\t\tprop = prop.replace(rxCamelCase, rxCamelCaseFn).replace('-', '');\n\n\t\t//Make sure z-index gets a <integer>.\n\t\t//This is the only <integer> case we need to handle.\n\t\tif(prop === 'zIndex') {\n\t\t\tif(isNaN(val)) {\n\t\t\t\t//If it's not a number, don't touch it.\n\t\t\t\t//It could for example be \"auto\" (#351).\n\t\t\t\tstyle[prop] = val;\n\t\t\t} else {\n\t\t\t\t//Floor the number.\n\t\t\t\tstyle[prop] = '' + (val | 0);\n\t\t\t}\n\t\t}\n\t\t//#64: \"float\" can't be set across browsers. Needs to use \"cssFloat\" for all except IE.\n\t\telse if(prop === 'float') {\n\t\t\tstyle.styleFloat = style.cssFloat = val;\n\t\t}\n\t\telse {\n\t\t\t//Need try-catch for old IE.\n\t\t\ttry {\n\t\t\t\t//Set prefixed property if there's a prefix.\n\t\t\t\tif(theCSSPrefix) {\n\t\t\t\t\tstyle[theCSSPrefix + prop.slice(0,1).toUpperCase() + prop.slice(1)] = val;\n\t\t\t\t}\n\n\t\t\t\t//Set unprefixed.\n\t\t\t\tstyle[prop] = val;\n\t\t\t} catch(ignore) {}\n\t\t}\n\t};\n\n\t/**\n\t * Cross browser event handling.\n\t */\n\tvar _addEvent = skrollr.addEvent = function(element, names, callback) {\n\t\tvar intermediate = function(e) {\n\t\t\t//Normalize IE event stuff.\n\t\t\te = e || window.event;\n\n\t\t\tif(!e.target) {\n\t\t\t\te.target = e.srcElement;\n\t\t\t}\n\n\t\t\tif(!e.preventDefault) {\n\t\t\t\te.preventDefault = function() {\n\t\t\t\t\te.returnValue = false;\n\t\t\t\t\te.defaultPrevented = true;\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn callback.call(this, e);\n\t\t};\n\n\t\tnames = names.split(' ');\n\n\t\tvar name;\n\t\tvar nameCounter = 0;\n\t\tvar namesLength = names.length;\n\n\t\tfor(; nameCounter < namesLength; nameCounter++) {\n\t\t\tname = names[nameCounter];\n\n\t\t\tif(element.addEventListener) {\n\t\t\t\telement.addEventListener(name, callback, false);\n\t\t\t} else {\n\t\t\t\telement.attachEvent('on' + name, intermediate);\n\t\t\t}\n\n\t\t\t//Remember the events to be able to flush them later.\n\t\t\t_registeredEvents.push({\n\t\t\t\telement: element,\n\t\t\t\tname: name,\n\t\t\t\tlistener: callback\n\t\t\t});\n\t\t}\n\t};\n\n\tvar _removeEvent = skrollr.removeEvent = function(element, names, callback) {\n\t\tnames = names.split(' ');\n\n\t\tvar nameCounter = 0;\n\t\tvar namesLength = names.length;\n\n\t\tfor(; nameCounter < namesLength; nameCounter++) {\n\t\t\tif(element.removeEventListener) {\n\t\t\t\telement.removeEventListener(names[nameCounter], callback, false);\n\t\t\t} else {\n\t\t\t\telement.detachEvent('on' + names[nameCounter], callback);\n\t\t\t}\n\t\t}\n\t};\n\n\tvar _removeAllEvents = function() {\n\t\tvar eventData;\n\t\tvar eventCounter = 0;\n\t\tvar eventsLength = _registeredEvents.length;\n\n\t\tfor(; eventCounter < eventsLength; eventCounter++) {\n\t\t\teventData = _registeredEvents[eventCounter];\n\n\t\t\t_removeEvent(eventData.element, eventData.name, eventData.listener);\n\t\t}\n\n\t\t_registeredEvents = [];\n\t};\n\n\tvar _emitEvent = function(element, name, direction) {\n\t\tif(_listeners.keyframe) {\n\t\t\t_listeners.keyframe.call(_instance, element, name, direction);\n\t\t}\n\t};\n\n\tvar _reflow = function() {\n\t\tvar pos = _instance.getScrollTop();\n\n\t\t//Will be recalculated by _updateDependentKeyFrames.\n\t\t_maxKeyFrame = 0;\n\n\t\tif(_forceHeight && !_isMobile) {\n\t\t\t//un-\"force\" the height to not mess with the calculations in _updateDependentKeyFrames (#216).\n\t\t\tbody.style.height = '';\n\t\t}\n\n\t\t_updateDependentKeyFrames();\n\n\t\tif(_forceHeight && !_isMobile) {\n\t\t\t//\"force\" the height.\n\t\t\tbody.style.height = (_maxKeyFrame + documentElement.clientHeight) + 'px';\n\t\t}\n\n\t\t//The scroll offset may now be larger than needed (on desktop the browser/os prevents scrolling farther than the bottom).\n\t\tif(_isMobile) {\n\t\t\t_instance.setScrollTop(Math.min(_instance.getScrollTop(), _maxKeyFrame));\n\t\t} else {\n\t\t\t//Remember and reset the scroll pos (#217).\n\t\t\t_instance.setScrollTop(pos, true);\n\t\t}\n\n\t\t_forceRender = true;\n\t};\n\n\t/*\n\t * Returns a copy of the constants object where all functions and strings have been evaluated.\n\t */\n\tvar _processConstants = function() {\n\t\tvar viewportHeight = documentElement.clientHeight;\n\t\tvar copy = {};\n\t\tvar prop;\n\t\tvar value;\n\n\t\tfor(prop in _constants) {\n\t\t\tvalue = _constants[prop];\n\n\t\t\tif(typeof value === 'function') {\n\t\t\t\tvalue = value.call(_instance);\n\t\t\t}\n\t\t\t//Percentage offset.\n\t\t\telse if((/p$/).test(value)) {\n\t\t\t\tvalue = (value.slice(0, -1) / 100) * viewportHeight;\n\t\t\t}\n\n\t\t\tcopy[prop] = value;\n\t\t}\n\n\t\treturn copy;\n\t};\n\n\t/*\n\t * Returns the height of the document.\n\t */\n\tvar _getDocumentHeight = function() {\n\t\tvar skrollrBodyHeight = 0;\n\t\tvar bodyHeight;\n\n\t\tif(_skrollrBody) {\n\t\t\tskrollrBodyHeight = Math.max(_skrollrBody.offsetHeight, _skrollrBody.scrollHeight);\n\t\t}\n\n\t\tbodyHeight = Math.max(skrollrBodyHeight, body.scrollHeight, body.offsetHeight, documentElement.scrollHeight, documentElement.offsetHeight, documentElement.clientHeight);\n\n\t\treturn bodyHeight - documentElement.clientHeight;\n\t};\n\n\t/**\n\t * Returns a string of space separated classnames for the current element.\n\t * Works with SVG as well.\n\t */\n\tvar _getClass = function(element) {\n\t\tvar prop = 'className';\n\n\t\t//SVG support by using className.baseVal instead of just className.\n\t\tif(window.SVGElement && element instanceof window.SVGElement) {\n\t\t\telement = element[prop];\n\t\t\tprop = 'baseVal';\n\t\t}\n\n\t\treturn element[prop];\n\t};\n\n\t/**\n\t * Adds and removes a CSS classes.\n\t * Works with SVG as well.\n\t * add and remove are arrays of strings,\n\t * or if remove is ommited add is a string and overwrites all classes.\n\t */\n\tvar _updateClass = function(element, add, remove) {\n\t\tvar prop = 'className';\n\n\t\t//SVG support by using className.baseVal instead of just className.\n\t\tif(window.SVGElement && element instanceof window.SVGElement) {\n\t\t\telement = element[prop];\n\t\t\tprop = 'baseVal';\n\t\t}\n\n\t\t//When remove is ommited, we want to overwrite/set the classes.\n\t\tif(remove === undefined) {\n\t\t\telement[prop] = add;\n\t\t\treturn;\n\t\t}\n\n\t\t//Cache current classes. We will work on a string before passing back to DOM.\n\t\tvar val = element[prop];\n\n\t\t//All classes to be removed.\n\t\tvar classRemoveIndex = 0;\n\t\tvar removeLength = remove.length;\n\n\t\tfor(; classRemoveIndex < removeLength; classRemoveIndex++) {\n\t\t\tval = _untrim(val).replace(_untrim(remove[classRemoveIndex]), ' ');\n\t\t}\n\n\t\tval = _trim(val);\n\n\t\t//All classes to be added.\n\t\tvar classAddIndex = 0;\n\t\tvar addLength = add.length;\n\n\t\tfor(; classAddIndex < addLength; classAddIndex++) {\n\t\t\t//Only add if el not already has class.\n\t\t\tif(_untrim(val).indexOf(_untrim(add[classAddIndex])) === -1) {\n\t\t\t\tval += ' ' + add[classAddIndex];\n\t\t\t}\n\t\t}\n\n\t\telement[prop] = _trim(val);\n\t};\n\n\tvar _trim = function(a) {\n\t\treturn a.replace(rxTrim, '');\n\t};\n\n\t/**\n\t * Adds a space before and after the string.\n\t */\n\tvar _untrim = function(a) {\n\t\treturn ' ' + a + ' ';\n\t};\n\n\tvar _now = Date.now || function() {\n\t\treturn +new Date();\n\t};\n\n\tvar _keyFrameComparator = function(a, b) {\n\t\treturn a.frame - b.frame;\n\t};\n\n\t/*\n\t * Private variables.\n\t */\n\n\t//Singleton\n\tvar _instance;\n\n\t/*\n\t\tA list of all elements which should be animated associated with their the metadata.\n\t\tExmaple skrollable with two key frames animating from 100px width to 20px:\n\n\t\tskrollable = {\n\t\t\telement: <the DOM element>,\n\t\t\tstyleAttr: <style attribute of the element before skrollr>,\n\t\t\tclassAttr: <class attribute of the element before skrollr>,\n\t\t\tkeyFrames: [\n\t\t\t\t{\n\t\t\t\t\tframe: 100,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\twidth: {\n\t\t\t\t\t\t\tvalue: ['{?}px', 100],\n\t\t\t\t\t\t\teasing: <reference to easing function>\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tmode: \"absolute\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tframe: 200,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\twidth: {\n\t\t\t\t\t\t\tvalue: ['{?}px', 20],\n\t\t\t\t\t\t\teasing: <reference to easing function>\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tmode: \"absolute\"\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t*/\n\tvar _skrollables;\n\n\tvar _skrollrBody;\n\n\tvar _listeners;\n\tvar _forceHeight;\n\tvar _maxKeyFrame = 0;\n\n\tvar _scale = 1;\n\tvar _constants;\n\n\tvar _mobileDeceleration;\n\n\t//Current direction (up/down).\n\tvar _direction = 'down';\n\n\t//The last top offset value. Needed to determine direction.\n\tvar _lastTop = -1;\n\n\t//The last time we called the render method (doesn't mean we rendered!).\n\tvar _lastRenderCall = _now();\n\n\t//For detecting if it actually resized (#271).\n\tvar _lastViewportWidth = 0;\n\tvar _lastViewportHeight = 0;\n\n\tvar _requestReflow = false;\n\n\t//Will contain data about a running scrollbar animation, if any.\n\tvar _scrollAnimation;\n\n\tvar _smoothScrollingEnabled;\n\n\tvar _smoothScrollingDuration;\n\n\t//Will contain settins for smooth scrolling if enabled.\n\tvar _smoothScrolling;\n\n\t//Can be set by any operation/event to force rendering even if the scrollbar didn't move.\n\tvar _forceRender;\n\n\t//Each skrollable gets an unique ID incremented for each skrollable.\n\t//The ID is the index in the _skrollables array.\n\tvar _skrollableIdCounter = 0;\n\n\tvar _edgeStrategy;\n\n\n\t//Mobile specific vars. Will be stripped by UglifyJS when not in use.\n\tvar _isMobile = false;\n\n\t//The virtual scroll offset when using mobile scrolling.\n\tvar _mobileOffset = 0;\n\n\t//If the browser supports 3d transforms, this will be filled with 'translateZ(0)' (empty string otherwise).\n\tvar _translateZ;\n\n\t//Will contain data about registered events by skrollr.\n\tvar _registeredEvents = [];\n\n\t//Animation frame id returned by RequestAnimationFrame (or timeout when RAF is not supported).\n\tvar _animFrame;\n\n\t//Expose skrollr as either a global variable or a require.js module.\n\tif(typeof define === 'function' && define.amd) {\n\t\tdefine([], function () {\n\t\t\treturn skrollr;\n\t\t});\n\t} else if (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = skrollr;\n\t} else {\n\t\twindow.skrollr = skrollr;\n\t}\n\n}(window, document));\n","/*\n _ _ _ _\n ___| (_) ___| | __ (_)___\n/ __| | |/ __| |/ / | / __|\n\\__ \\ | | (__| < _ | \\__ \\\n|___/_|_|\\___|_|\\_(_)/ |___/\n |__/\n\n Version: 1.5.9\n Author: Ken Wheeler\n Website: http://kenwheeler.github.io\n Docs: http://kenwheeler.github.io/slick\n Repo: http://github.com/kenwheeler/slick\n Issues: http://github.com/kenwheeler/slick/issues\n\n */\n!function(a){\"use strict\";\"function\"==typeof define&&define.amd?define([\"jquery\"],a):\"undefined\"!=typeof exports?module.exports=a(require(\"jquery\")):a(jQuery)}(function(a){\"use strict\";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type=\"button\" data-role=\"none\" class=\"slick-prev\" aria-label=\"Previous\" tabindex=\"0\" role=\"button\">Previous</button>',nextArrow:'<button type=\"button\" data-role=\"none\" class=\"slick-next\" aria-label=\"Next\" tabindex=\"0\" role=\"button\">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:\"50px\",cssEase:\"ease\",customPaging:function(a,b){return'<button type=\"button\" data-role=\"none\" role=\"button\" aria-required=\"false\" tabindex=\"0\">'+(b+1)+\"</button>\"},dots:!1,dotsClass:\"slick-dots\",draggable:!0,easing:\"linear\",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:\"ondemand\",mobileFirst:!1,pauseOnHover:!0,pauseOnDotsHover:!1,respondTo:\"window\",responsive:null,rows:1,rtl:!1,slide:\"\",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!1,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.hidden=\"hidden\",e.paused=!1,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange=\"visibilitychange\",e.windowWidth=0,e.windowTimer=null,f=a(c).data(\"slick\")||{},e.options=a.extend({},e.defaults,f,d),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,\"undefined\"!=typeof document.mozHidden?(e.hidden=\"mozHidden\",e.visibilityChange=\"mozvisibilitychange\"):\"undefined\"!=typeof document.webkitHidden&&(e.hidden=\"webkitHidden\",e.visibilityChange=\"webkitvisibilitychange\"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.instanceUid=b++,e.htmlExpr=/^(?:\\s*(<[\\w\\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0),e.checkResponsive(!0)}var b=0;return c}(),b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if(\"boolean\"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),\"number\"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr(\"data-slick-index\",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]=\"translate(\"+a+\"px, 0px)\",e.$slideTrack.css(d)):(d[e.animType]=\"translate(0px,\"+a+\"px)\",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]=\"translate3d(\"+b+\"px, 0px, 0px)\":d[e.animType]=\"translate3d(0px,\"+b+\"px, 0px)\",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.asNavFor=function(b){var c=this,d=c.options.asNavFor;d&&null!==d&&(d=a(d).not(c.$slider)),null!==d&&\"object\"==typeof d&&d.each(function(){var c=a(this).slick(\"getSlick\");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+\" \"+b.options.speed+\"ms \"+b.options.cssEase:c[b.transitionType]=\"opacity \"+b.options.speed+\"ms \"+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer),a.slideCount>a.options.slidesToShow&&a.paused!==!0&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this;a.options.infinite===!1?1===a.direction?(a.currentSlide+1===a.slideCount-1&&(a.direction=0),a.slideHandler(a.currentSlide+a.options.slidesToScroll)):(a.currentSlide-1===0&&(a.direction=1),a.slideHandler(a.currentSlide-a.options.slidesToScroll)):a.slideHandler(a.currentSlide+a.options.slidesToScroll)},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass(\"slick-arrow\"),b.$nextArrow=a(b.options.nextArrow).addClass(\"slick-arrow\"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass(\"slick-hidden\").removeAttr(\"aria-hidden tabindex\"),b.$nextArrow.removeClass(\"slick-hidden\").removeAttr(\"aria-hidden tabindex\"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass(\"slick-disabled\").attr(\"aria-disabled\",\"true\")):b.$prevArrow.add(b.$nextArrow).addClass(\"slick-hidden\").attr({\"aria-disabled\":\"true\",tabindex:\"-1\"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(d='<ul class=\"'+b.options.dotsClass+'\">',c=0;c<=b.getDotCount();c+=1)d+=\"<li>\"+b.options.customPaging.call(this,b,c)+\"</li>\";d+=\"</ul>\",b.$dots=a(d).appendTo(b.options.appendDots),b.$dots.find(\"li\").first().addClass(\"slick-active\").attr(\"aria-hidden\",\"false\")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+\":not(.slick-cloned)\").addClass(\"slick-slide\"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr(\"data-slick-index\",b).data(\"originalStyling\",a(c).attr(\"style\")||\"\")}),b.$slider.addClass(\"slick-slider\"),b.$slideTrack=0===b.slideCount?a('<div class=\"slick-track\"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class=\"slick-track\"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live=\"polite\" class=\"slick-list\"/>').parent(),b.$slideTrack.css(\"opacity\",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a(\"img[data-lazy]\",b.$slider).not(\"[src]\").addClass(\"slick-loading\"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses(\"number\"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass(\"draggable\")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement(\"div\");for(c=0;c<a.options.rows;c++){var j=document.createElement(\"div\");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.html(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+\"%\",display:\"inline-block\"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if(\"window\"===d.respondTo?g=j:\"slider\"===d.respondTo?g=i:\"min\"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,\"unslick\"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,\"unslick\"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger(\"breakpoint\",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.target);switch(e.is(\"a\")&&b.preventDefault(),e.is(\"li\")||(e=e.closest(\"li\")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case\"previous\":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case\"next\":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case\"index\":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger(\"focus\");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&(a(\"li\",b.$dots).off(\"click.slick\",b.changeSlide),b.options.pauseOnDotsHover===!0&&b.options.autoplay===!0&&a(\"li\",b.$dots).off(\"mouseenter.slick\",a.proxy(b.setPaused,b,!0)).off(\"mouseleave.slick\",a.proxy(b.setPaused,b,!1))),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off(\"click.slick\",b.changeSlide),b.$nextArrow&&b.$nextArrow.off(\"click.slick\",b.changeSlide)),b.$list.off(\"touchstart.slick mousedown.slick\",b.swipeHandler),b.$list.off(\"touchmove.slick mousemove.slick\",b.swipeHandler),b.$list.off(\"touchend.slick mouseup.slick\",b.swipeHandler),b.$list.off(\"touchcancel.slick mouseleave.slick\",b.swipeHandler),b.$list.off(\"click.slick\",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.$list.off(\"mouseenter.slick\",a.proxy(b.setPaused,b,!0)),b.$list.off(\"mouseleave.slick\",a.proxy(b.setPaused,b,!1)),b.options.accessibility===!0&&b.$list.off(\"keydown.slick\",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off(\"click.slick\",b.selectHandler),a(window).off(\"orientationchange.slick.slick-\"+b.instanceUid,b.orientationChange),a(window).off(\"resize.slick.slick-\"+b.instanceUid,b.resize),a(\"[draggable!=true]\",b.$slideTrack).off(\"dragstart\",b.preventDefault),a(window).off(\"load.slick.slick-\"+b.instanceUid,b.setPosition),a(document).off(\"ready.slick.slick-\"+b.instanceUid,b.setPosition)},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr(\"style\"),a.$slider.html(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(\".slick-cloned\",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass(\"slick-disabled slick-arrow slick-hidden\").removeAttr(\"aria-hidden aria-disabled tabindex\").css(\"display\",\"\"),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass(\"slick-disabled slick-arrow slick-hidden\").removeAttr(\"aria-hidden aria-disabled tabindex\").css(\"display\",\"\"),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass(\"slick-slide slick-active slick-center slick-visible slick-current\").removeAttr(\"aria-hidden\").removeAttr(\"data-slick-index\").each(function(){a(this).attr(\"style\",a(this).data(\"originalStyling\"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass(\"slick-slider\"),c.$slider.removeClass(\"slick-initialized\"),c.unslicked=!0,b||c.$slider.trigger(\"destroy\",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]=\"\",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(\".slick-slide\").eq(a):b.$slideTrack.children(\".slick-slide\").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(\".slick-slide\").eq(a):b.$slideTrack.children(\".slick-slide\").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(\".slick-slide\").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr(\"data-slick-index\")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:\"index\",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass(\"slick-initialized\")||(a(c.$slider).addClass(\"slick-initialized\"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots()),b&&c.$slider.trigger(\"init\",[c]),c.options.accessibility===!0&&c.initADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.on(\"click.slick\",{message:\"previous\"},a.changeSlide),a.$nextArrow.on(\"click.slick\",{message:\"next\"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a(\"li\",b.$dots).on(\"click.slick\",{message:\"index\"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&b.options.autoplay===!0&&a(\"li\",b.$dots).on(\"mouseenter.slick\",a.proxy(b.setPaused,b,!0)).on(\"mouseleave.slick\",a.proxy(b.setPaused,b,!1))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.$list.on(\"touchstart.slick mousedown.slick\",{action:\"start\"},b.swipeHandler),b.$list.on(\"touchmove.slick mousemove.slick\",{action:\"move\"},b.swipeHandler),b.$list.on(\"touchend.slick mouseup.slick\",{action:\"end\"},b.swipeHandler),b.$list.on(\"touchcancel.slick mouseleave.slick\",{action:\"end\"},b.swipeHandler),b.$list.on(\"click.slick\",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.$list.on(\"mouseenter.slick\",a.proxy(b.setPaused,b,!0)),b.$list.on(\"mouseleave.slick\",a.proxy(b.setPaused,b,!1)),b.options.accessibility===!0&&b.$list.on(\"keydown.slick\",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on(\"click.slick\",b.selectHandler),a(window).on(\"orientationchange.slick.slick-\"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on(\"resize.slick.slick-\"+b.instanceUid,a.proxy(b.resize,b)),a(\"[draggable!=true]\",b.$slideTrack).on(\"dragstart\",b.preventDefault),a(window).on(\"load.slick.slick-\"+b.instanceUid,b.setPosition),a(document).on(\"ready.slick.slick-\"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show(),a.options.autoplay===!0&&a.autoPlay()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match(\"TEXTAREA|INPUT|SELECT\")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:\"previous\"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:\"next\"}}))},b.prototype.lazyLoad=function(){function g(b){a(\"img[data-lazy]\",b).each(function(){var b=a(this),c=a(this).attr(\"data-lazy\"),d=document.createElement(\"img\");d.onload=function(){b.animate({opacity:0},100,function(){b.attr(\"src\",c).animate({opacity:1},200,function(){b.removeAttr(\"data-lazy\").removeClass(\"slick-loading\")})})},d.src=c})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=e+b.options.slidesToShow,b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(\".slick-slide\").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(\".slick-slide\"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(\".slick-cloned\").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(\".slick-cloned\").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass(\"slick-loading\"),a.initUI(),\"progressive\"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:\"next\"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.paused=!1,a.autoPlay()},b.prototype.postSlide=function(a){var b=this;b.$slider.trigger(\"afterChange\",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay===!0&&b.paused===!1&&b.autoPlay(),b.options.accessibility===!0&&b.initADA()},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:\"previous\"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(){var c,d,b=this;c=a(\"img[data-lazy]\",b.$slider).length,c>0&&(d=a(\"img[data-lazy]\",b.$slider).first(),d.attr(\"src\",null),d.attr(\"src\",d.attr(\"data-lazy\")).removeClass(\"slick-loading\").load(function(){d.removeAttr(\"data-lazy\"),b.progressiveLazyLoad(),b.options.adaptiveHeight===!0&&b.setPosition()}).error(function(){d.removeAttr(\"data-lazy\"),b.progressiveLazyLoad()}))},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,c.options.infinite||(c.slideCount<=c.options.slidesToShow?c.currentSlide=0:c.currentSlide>e&&(c.currentSlide=e)),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:\"index\",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if(\"array\"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||\"window\";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass(\"slick-slide\"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on(\"click.slick\",b.selectHandler),b.setSlideClasses(0),b.setPosition(),b.$slider.trigger(\"reInit\",[b]),b.options.autoplay===!0&&b.focusHandler()},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return\"boolean\"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d=\"left\"==b.positionProp?Math.ceil(a)+\"px\":\"0px\",e=\"top\"==b.positionProp?Math.ceil(a)+\"px\":\"0px\",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]=\"translate(\"+d+\", \"+e+\")\",b.$slideTrack.css(c)):(c[b.animType]=\"translate3d(\"+d+\", \"+e+\", 0px)\",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:\"0px \"+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+\" 0px\"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(\".slick-slide\").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(\".slick-slide\").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(\".slick-slide\").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:\"relative\",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}):a(e).css({position:\"relative\",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css(\"height\",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(b,c,d){var f,g,e=this;if(\"responsive\"===b&&\"array\"===a.type(c))for(g in c)if(\"array\"!==a.type(e.options.responsive))e.options.responsive=[c[g]];else{for(f=e.options.responsive.length-1;f>=0;)e.options.responsive[f].breakpoint===c[g].breakpoint&&e.options.responsive.splice(f,1),f--;e.options.responsive.push(c[g])}else e.options[b]=c;d===!0&&(e.unload(),e.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger(\"setPosition\",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?\"top\":\"left\",\"top\"===a.positionProp?a.$slider.addClass(\"slick-vertical\"):a.$slider.removeClass(\"slick-vertical\"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&(\"number\"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType=\"OTransform\",a.transformType=\"-o-transform\",a.transitionType=\"OTransition\",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType=\"MozTransform\",a.transformType=\"-moz-transform\",a.transitionType=\"MozTransition\",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType=\"webkitTransform\",a.transformType=\"-webkit-transform\",a.transitionType=\"webkitTransition\",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType=\"msTransform\",a.transformType=\"-ms-transform\",a.transitionType=\"msTransition\",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType=\"transform\",a.transformType=\"transform\",a.transitionType=\"transition\"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(\".slick-slide\").removeClass(\"slick-active slick-center slick-current\").attr(\"aria-hidden\",\"true\"),b.$slides.eq(a).addClass(\"slick-current\"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\"):(e=b.options.slidesToShow+a,d.slice(e-c+1,e+c+2).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass(\"slick-center\"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass(\"slick-center\")),b.$slides.eq(a).addClass(\"slick-center\")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\"):d.length<=b.options.slidesToShow?d.addClass(\"slick-active\").attr(\"aria-hidden\",\"false\"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\"):d.slice(e,e+b.options.slidesToShow).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\")),\"ondemand\"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr(\"id\",\"\").attr(\"data-slick-index\",d-b.slideCount).prependTo(b.$slideTrack).addClass(\"slick-cloned\");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr(\"id\",\"\").attr(\"data-slick-index\",d+b.slideCount).appendTo(b.$slideTrack).addClass(\"slick-cloned\");b.$slideTrack.find(\".slick-cloned\").find(\"[id]\").each(function(){a(this).attr(\"id\",\"\")})}},b.prototype.setPaused=function(a){var b=this;b.options.autoplay===!0&&b.options.pauseOnHover===!0&&(b.paused=a,a?b.autoPlayClear():b.autoPlay())},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(\".slick-slide\")?a(b.target):a(b.target).parents(\".slick-slide\"),e=parseInt(d.attr(\"data-slick-index\"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d);\n}):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay===!0&&clearInterval(i.autoPlayTimer),e=0>d?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger(\"beforeChange\",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass(\"slick-loading\")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?\"left\":\"right\":360>=d&&d>=315?e.options.rtl===!1?\"left\":\"right\":d>=135&&225>=d?e.options.rtl===!1?\"right\":\"left\":e.options.verticalSwiping===!0?d>=35&&135>=d?\"left\":\"right\":\"vertical\"},b.prototype.swipeEnd=function(a){var c,b=this;if(b.dragging=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger(\"edge\",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe)switch(b.swipeDirection()){case\"left\":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.slideHandler(c),b.currentDirection=0,b.touchObject={},b.$slider.trigger(\"swipe\",[b,\"left\"]);break;case\"right\":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.slideHandler(c),b.currentDirection=1,b.touchObject={},b.$slider.trigger(\"swipe\",[b,\"right\"])}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||\"ontouchend\"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf(\"mouse\")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case\"start\":b.swipeStart(a);break;case\"move\":b.swipeMove(a);break;case\"end\":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),\"vertical\"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&\"right\"===e||b.currentSlide>=b.getDotCount()&&\"left\"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return 1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(\".slick-cloned\",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass(\"slick-slide slick-active slick-visible slick-current\").attr(\"aria-hidden\",\"true\").css(\"width\",\"\")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger(\"unslick\",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass(\"slick-disabled\").attr(\"aria-disabled\",\"false\"),a.$nextArrow.removeClass(\"slick-disabled\").attr(\"aria-disabled\",\"false\"),0===a.currentSlide?(a.$prevArrow.addClass(\"slick-disabled\").attr(\"aria-disabled\",\"true\"),a.$nextArrow.removeClass(\"slick-disabled\").attr(\"aria-disabled\",\"false\")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass(\"slick-disabled\").attr(\"aria-disabled\",\"true\"),a.$prevArrow.removeClass(\"slick-disabled\").attr(\"aria-disabled\",\"false\")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass(\"slick-disabled\").attr(\"aria-disabled\",\"true\"),a.$prevArrow.removeClass(\"slick-disabled\").attr(\"aria-disabled\",\"false\")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find(\"li\").removeClass(\"slick-active\").attr(\"aria-hidden\",\"true\"),a.$dots.find(\"li\").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass(\"slick-active\").attr(\"aria-hidden\",\"false\"))},b.prototype.visibility=function(){var a=this;document[a.hidden]?(a.paused=!0,a.autoPlayClear()):a.options.autoplay===!0&&(a.paused=!1,a.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(\".slick-cloned\")).attr({\"aria-hidden\":\"true\",tabindex:\"-1\"}).find(\"a, input, button, select\").attr({tabindex:\"-1\"}),b.$slideTrack.attr(\"role\",\"listbox\"),b.$slides.not(b.$slideTrack.find(\".slick-cloned\")).each(function(c){a(this).attr({role:\"option\",\"aria-describedby\":\"slick-slide\"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr(\"role\",\"tablist\").find(\"li\").each(function(c){a(this).attr({role:\"presentation\",\"aria-selected\":\"false\",\"aria-controls\":\"navigation\"+b.instanceUid+c,id:\"slick-slide\"+b.instanceUid+c})}).first().attr(\"aria-selected\",\"true\").end().find(\"button\").attr(\"role\",\"button\").end().closest(\"div\").attr(\"role\",\"toolbar\"),b.activateADA()},b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(\".slick-active\").attr({\"aria-hidden\":\"false\"}).find(\"a, input, button, select\").attr({tabindex:\"0\"})},b.prototype.focusHandler=function(){var b=this;b.$slider.on(\"focus.slick blur.slick\",\"*\",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.isPlay&&(d.is(\":focus\")?(b.autoPlayClear(),b.paused=!0):(b.paused=!1,b.autoPlay()))},0)})},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;e>f;f++)if(\"object\"==typeof c||\"undefined\"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),\"undefined\"!=typeof g)return g;return a}});","/**\n * Super simple wysiwyg editor v0.7.0\n * http://summernote.org/\n *\n * summernote.js\n * Copyright 2013-2015 Alan Hong. and other contributors\n * summernote may be freely distributed under the MIT license./\n *\n * Date: 2015-12-02T16:01Z\n */\n(function (factory) {\n /* global define */\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['jquery'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node/CommonJS\n module.exports = factory(require('jquery'));\n } else {\n // Browser globals\n factory(window.jQuery);\n }\n}(function ($) {\n \n\n\n /**\n * @class core.func\n *\n * func utils (for high-order func's arg)\n *\n * @singleton\n * @alternateClassName func\n */\n var func = (function () {\n var eq = function (itemA) {\n return function (itemB) {\n return itemA === itemB;\n };\n };\n\n var eq2 = function (itemA, itemB) {\n return itemA === itemB;\n };\n\n var peq2 = function (propName) {\n return function (itemA, itemB) {\n return itemA[propName] === itemB[propName];\n };\n };\n\n var ok = function () {\n return true;\n };\n\n var fail = function () {\n return false;\n };\n\n var not = function (f) {\n return function () {\n return !f.apply(f, arguments);\n };\n };\n\n var and = function (fA, fB) {\n return function (item) {\n return fA(item) && fB(item);\n };\n };\n\n var self = function (a) {\n return a;\n };\n\n var idCounter = 0;\n\n /**\n * generate a globally-unique id\n *\n * @param {String} [prefix]\n */\n var uniqueId = function (prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n /**\n * returns bnd (bounds) from rect\n *\n * - IE Compatability Issue: http://goo.gl/sRLOAo\n * - Scroll Issue: http://goo.gl/sNjUc\n *\n * @param {Rect} rect\n * @return {Object} bounds\n * @return {Number} bounds.top\n * @return {Number} bounds.left\n * @return {Number} bounds.width\n * @return {Number} bounds.height\n */\n var rect2bnd = function (rect) {\n var $document = $(document);\n return {\n top: rect.top + $document.scrollTop(),\n left: rect.left + $document.scrollLeft(),\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n };\n\n /**\n * returns a copy of the object where the keys have become the values and the values the keys.\n * @param {Object} obj\n * @return {Object}\n */\n var invertObject = function (obj) {\n var inverted = {};\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n inverted[obj[key]] = key;\n }\n }\n return inverted;\n };\n\n /**\n * @param {String} namespace\n * @param {String} [prefix]\n * @return {String}\n */\n var namespaceToCamel = function (namespace, prefix) {\n prefix = prefix || '';\n return prefix + namespace.split('.').map(function (name) {\n return name.substring(0, 1).toUpperCase() + name.substring(1);\n }).join('');\n };\n\n return {\n eq: eq,\n eq2: eq2,\n peq2: peq2,\n ok: ok,\n fail: fail,\n self: self,\n not: not,\n and: and,\n uniqueId: uniqueId,\n rect2bnd: rect2bnd,\n invertObject: invertObject,\n namespaceToCamel: namespaceToCamel\n };\n })();\n\n /**\n * @class core.list\n *\n * list utils\n *\n * @singleton\n * @alternateClassName list\n */\n var list = (function () {\n /**\n * returns the first item of an array.\n *\n * @param {Array} array\n */\n var head = function (array) {\n return array[0];\n };\n\n /**\n * returns the last item of an array.\n *\n * @param {Array} array\n */\n var last = function (array) {\n return array[array.length - 1];\n };\n\n /**\n * returns everything but the last entry of the array.\n *\n * @param {Array} array\n */\n var initial = function (array) {\n return array.slice(0, array.length - 1);\n };\n\n /**\n * returns the rest of the items in an array.\n *\n * @param {Array} array\n */\n var tail = function (array) {\n return array.slice(1);\n };\n\n /**\n * returns item of array\n */\n var find = function (array, pred) {\n for (var idx = 0, len = array.length; idx < len; idx ++) {\n var item = array[idx];\n if (pred(item)) {\n return item;\n }\n }\n };\n\n /**\n * returns true if all of the values in the array pass the predicate truth test.\n */\n var all = function (array, pred) {\n for (var idx = 0, len = array.length; idx < len; idx ++) {\n if (!pred(array[idx])) {\n return false;\n }\n }\n return true;\n };\n\n /**\n * returns index of item\n */\n var indexOf = function (array, item) {\n return $.inArray(item, array);\n };\n\n /**\n * returns true if the value is present in the list.\n */\n var contains = function (array, item) {\n return indexOf(array, item) !== -1;\n };\n\n /**\n * get sum from a list\n *\n * @param {Array} array - array\n * @param {Function} fn - iterator\n */\n var sum = function (array, fn) {\n fn = fn || func.self;\n return array.reduce(function (memo, v) {\n return memo + fn(v);\n }, 0);\n };\n \n /**\n * returns a copy of the collection with array type.\n * @param {Collection} collection - collection eg) node.childNodes, ...\n */\n var from = function (collection) {\n var result = [], idx = -1, length = collection.length;\n while (++idx < length) {\n result[idx] = collection[idx];\n }\n return result;\n };\n\n /**\n * returns whether list is empty or not\n */\n var isEmpty = function (array) {\n return !array || !array.length;\n };\n \n /**\n * cluster elements by predicate function.\n *\n * @param {Array} array - array\n * @param {Function} fn - predicate function for cluster rule\n * @param {Array[]}\n */\n var clusterBy = function (array, fn) {\n if (!array.length) { return []; }\n var aTail = tail(array);\n return aTail.reduce(function (memo, v) {\n var aLast = last(memo);\n if (fn(last(aLast), v)) {\n aLast[aLast.length] = v;\n } else {\n memo[memo.length] = [v];\n }\n return memo;\n }, [[head(array)]]);\n };\n \n /**\n * returns a copy of the array with all falsy values removed\n *\n * @param {Array} array - array\n * @param {Function} fn - predicate function for cluster rule\n */\n var compact = function (array) {\n var aResult = [];\n for (var idx = 0, len = array.length; idx < len; idx ++) {\n if (array[idx]) { aResult.push(array[idx]); }\n }\n return aResult;\n };\n\n /**\n * produces a duplicate-free version of the array\n *\n * @param {Array} array\n */\n var unique = function (array) {\n var results = [];\n\n for (var idx = 0, len = array.length; idx < len; idx ++) {\n if (!contains(results, array[idx])) {\n results.push(array[idx]);\n }\n }\n\n return results;\n };\n\n /**\n * returns next item.\n * @param {Array} array\n */\n var next = function (array, item) {\n var idx = indexOf(array, item);\n if (idx === -1) { return null; }\n\n return array[idx + 1];\n };\n\n /**\n * returns prev item.\n * @param {Array} array\n */\n var prev = function (array, item) {\n var idx = indexOf(array, item);\n if (idx === -1) { return null; }\n\n return array[idx - 1];\n };\n\n return { head: head, last: last, initial: initial, tail: tail,\n prev: prev, next: next, find: find, contains: contains,\n all: all, sum: sum, from: from, isEmpty: isEmpty,\n clusterBy: clusterBy, compact: compact, unique: unique };\n })();\n\n var isSupportAmd = typeof define === 'function' && define.amd;\n\n /**\n * returns whether font is installed or not.\n *\n * @param {String} fontName\n * @return {Boolean}\n */\n var isFontInstalled = function (fontName) {\n var testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS';\n var $tester = $('<div>').css({\n position: 'absolute',\n left: '-9999px',\n top: '-9999px',\n fontSize: '200px'\n }).text('mmmmmmmmmwwwwwww').appendTo(document.body);\n\n var originalWidth = $tester.css('fontFamily', testFontName).width();\n var width = $tester.css('fontFamily', fontName + ',' + testFontName).width();\n\n $tester.remove();\n\n return originalWidth !== width;\n };\n\n var userAgent = navigator.userAgent;\n var isMSIE = /MSIE|Trident/i.test(userAgent);\n var browserVersion;\n if (isMSIE) {\n var matches = /MSIE (\\d+[.]\\d+)/.exec(userAgent);\n if (matches) {\n browserVersion = parseFloat(matches[1]);\n }\n matches = /Trident\\/.*rv:([0-9]{1,}[\\.0-9]{0,})/.exec(userAgent);\n if (matches) {\n browserVersion = parseFloat(matches[1]);\n }\n }\n\n /**\n * @class core.agent\n *\n * Object which check platform and agent\n *\n * @singleton\n * @alternateClassName agent\n */\n var agent = {\n isMac: navigator.appVersion.indexOf('Mac') > -1,\n isMSIE: isMSIE,\n isFF: /firefox/i.test(userAgent),\n isWebkit: /webkit/i.test(userAgent),\n isSafari: /safari/i.test(userAgent),\n browserVersion: browserVersion,\n jqueryVersion: parseFloat($.fn.jquery),\n isSupportAmd: isSupportAmd,\n hasCodeMirror: isSupportAmd ? require.specified('CodeMirror') : !!window.CodeMirror,\n isFontInstalled: isFontInstalled,\n isW3CRangeSupport: !!document.createRange\n };\n\n\n var NBSP_CHAR = String.fromCharCode(160);\n var ZERO_WIDTH_NBSP_CHAR = '\\ufeff';\n\n /**\n * @class core.dom\n *\n * Dom functions\n *\n * @singleton\n * @alternateClassName dom\n */\n var dom = (function () {\n /**\n * @method isEditable\n *\n * returns whether node is `note-editable` or not.\n *\n * @param {Node} node\n * @return {Boolean}\n */\n var isEditable = function (node) {\n return node && $(node).hasClass('note-editable');\n };\n\n /**\n * @method isControlSizing\n *\n * returns whether node is `note-control-sizing` or not.\n *\n * @param {Node} node\n * @return {Boolean}\n */\n var isControlSizing = function (node) {\n return node && $(node).hasClass('note-control-sizing');\n };\n\n /**\n * @method makePredByNodeName\n *\n * returns predicate which judge whether nodeName is same\n *\n * @param {String} nodeName\n * @return {Function}\n */\n var makePredByNodeName = function (nodeName) {\n nodeName = nodeName.toUpperCase();\n return function (node) {\n return node && node.nodeName.toUpperCase() === nodeName;\n };\n };\n\n /**\n * @method isText\n *\n *\n *\n * @param {Node} node\n * @return {Boolean} true if node's type is text(3)\n */\n var isText = function (node) {\n return node && node.nodeType === 3;\n };\n\n /**\n * @method isElement\n *\n *\n *\n * @param {Node} node\n * @return {Boolean} true if node's type is element(1)\n */\n var isElement = function (node) {\n return node && node.nodeType === 1;\n };\n\n /**\n * ex) br, col, embed, hr, img, input, ...\n * @see http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements\n */\n var isVoid = function (node) {\n return node && /^BR|^IMG|^HR|^IFRAME|^BUTTON/.test(node.nodeName.toUpperCase());\n };\n\n var isPara = function (node) {\n if (isEditable(node)) {\n return false;\n }\n\n // Chrome(v31.0), FF(v25.0.1) use DIV for paragraph\n return node && /^DIV|^P|^LI|^H[1-7]/.test(node.nodeName.toUpperCase());\n };\n\n var isHeading = function (node) {\n return node && /^H[1-7]/.test(node.nodeName.toUpperCase());\n };\n\n var isLi = makePredByNodeName('LI');\n\n var isPurePara = function (node) {\n return isPara(node) && !isLi(node);\n };\n\n var isTable = makePredByNodeName('TABLE');\n\n var isInline = function (node) {\n return !isBodyContainer(node) &&\n !isList(node) &&\n !isHr(node) &&\n !isPara(node) &&\n !isTable(node) &&\n !isBlockquote(node);\n };\n\n var isList = function (node) {\n return node && /^UL|^OL/.test(node.nodeName.toUpperCase());\n };\n\n var isHr = makePredByNodeName('HR');\n\n var isCell = function (node) {\n return node && /^TD|^TH/.test(node.nodeName.toUpperCase());\n };\n\n var isBlockquote = makePredByNodeName('BLOCKQUOTE');\n\n var isBodyContainer = function (node) {\n return isCell(node) || isBlockquote(node) || isEditable(node);\n };\n\n var isAnchor = makePredByNodeName('A');\n\n var isParaInline = function (node) {\n return isInline(node) && !!ancestor(node, isPara);\n };\n\n var isBodyInline = function (node) {\n return isInline(node) && !ancestor(node, isPara);\n };\n\n var isBody = makePredByNodeName('BODY');\n\n /**\n * returns whether nodeB is closest sibling of nodeA\n *\n * @param {Node} nodeA\n * @param {Node} nodeB\n * @return {Boolean}\n */\n var isClosestSibling = function (nodeA, nodeB) {\n return nodeA.nextSibling === nodeB ||\n nodeA.previousSibling === nodeB;\n };\n\n /**\n * returns array of closest siblings with node\n *\n * @param {Node} node\n * @param {function} [pred] - predicate function\n * @return {Node[]}\n */\n var withClosestSiblings = function (node, pred) {\n pred = pred || func.ok;\n\n var siblings = [];\n if (node.previousSibling && pred(node.previousSibling)) {\n siblings.push(node.previousSibling);\n }\n siblings.push(node);\n if (node.nextSibling && pred(node.nextSibling)) {\n siblings.push(node.nextSibling);\n }\n return siblings;\n };\n\n /**\n * blank HTML for cursor position\n * - [workaround] old IE only works with \n * - [workaround] IE11 and other browser works with bogus br\n */\n var blankHTML = agent.isMSIE && agent.browserVersion < 11 ? ' ' : '<br>';\n\n /**\n * @method nodeLength\n *\n * returns #text's text size or element's childNodes size\n *\n * @param {Node} node\n */\n var nodeLength = function (node) {\n if (isText(node)) {\n return node.nodeValue.length;\n }\n\n return node.childNodes.length;\n };\n\n /**\n * returns whether node is empty or not.\n *\n * @param {Node} node\n * @return {Boolean}\n */\n var isEmpty = function (node) {\n var len = nodeLength(node);\n\n if (len === 0) {\n return true;\n } else if (!isText(node) && len === 1 && node.innerHTML === blankHTML) {\n // ex) <p><br></p>, <span><br></span>\n return true;\n } else if (list.all(node.childNodes, isText) && node.innerHTML === '') {\n // ex) <p></p>, <span></span>\n return true;\n }\n\n return false;\n };\n\n /**\n * padding blankHTML if node is empty (for cursor position)\n */\n var paddingBlankHTML = function (node) {\n if (!isVoid(node) && !nodeLength(node)) {\n node.innerHTML = blankHTML;\n }\n };\n\n /**\n * find nearest ancestor predicate hit\n *\n * @param {Node} node\n * @param {Function} pred - predicate function\n */\n var ancestor = function (node, pred) {\n while (node) {\n if (pred(node)) { return node; }\n if (isEditable(node)) { break; }\n\n node = node.parentNode;\n }\n return null;\n };\n\n /**\n * find nearest ancestor only single child blood line and predicate hit\n *\n * @param {Node} node\n * @param {Function} pred - predicate function\n */\n var singleChildAncestor = function (node, pred) {\n node = node.parentNode;\n\n while (node) {\n if (nodeLength(node) !== 1) { break; }\n if (pred(node)) { return node; }\n if (isEditable(node)) { break; }\n\n node = node.parentNode;\n }\n return null;\n };\n\n /**\n * returns new array of ancestor nodes (until predicate hit).\n *\n * @param {Node} node\n * @param {Function} [optional] pred - predicate function\n */\n var listAncestor = function (node, pred) {\n pred = pred || func.fail;\n\n var ancestors = [];\n ancestor(node, function (el) {\n if (!isEditable(el)) {\n ancestors.push(el);\n }\n\n return pred(el);\n });\n return ancestors;\n };\n\n /**\n * find farthest ancestor predicate hit\n */\n var lastAncestor = function (node, pred) {\n var ancestors = listAncestor(node);\n return list.last(ancestors.filter(pred));\n };\n\n /**\n * returns common ancestor node between two nodes.\n *\n * @param {Node} nodeA\n * @param {Node} nodeB\n */\n var commonAncestor = function (nodeA, nodeB) {\n var ancestors = listAncestor(nodeA);\n for (var n = nodeB; n; n = n.parentNode) {\n if ($.inArray(n, ancestors) > -1) { return n; }\n }\n return null; // difference document area\n };\n\n /**\n * listing all previous siblings (until predicate hit).\n *\n * @param {Node} node\n * @param {Function} [optional] pred - predicate function\n */\n var listPrev = function (node, pred) {\n pred = pred || func.fail;\n\n var nodes = [];\n while (node) {\n if (pred(node)) { break; }\n nodes.push(node);\n node = node.previousSibling;\n }\n return nodes;\n };\n\n /**\n * listing next siblings (until predicate hit).\n *\n * @param {Node} node\n * @param {Function} [pred] - predicate function\n */\n var listNext = function (node, pred) {\n pred = pred || func.fail;\n\n var nodes = [];\n while (node) {\n if (pred(node)) { break; }\n nodes.push(node);\n node = node.nextSibling;\n }\n return nodes;\n };\n\n /**\n * listing descendant nodes\n *\n * @param {Node} node\n * @param {Function} [pred] - predicate function\n */\n var listDescendant = function (node, pred) {\n var descendents = [];\n pred = pred || func.ok;\n\n // start DFS(depth first search) with node\n (function fnWalk(current) {\n if (node !== current && pred(current)) {\n descendents.push(current);\n }\n for (var idx = 0, len = current.childNodes.length; idx < len; idx++) {\n fnWalk(current.childNodes[idx]);\n }\n })(node);\n\n return descendents;\n };\n\n /**\n * wrap node with new tag.\n *\n * @param {Node} node\n * @param {Node} tagName of wrapper\n * @return {Node} - wrapper\n */\n var wrap = function (node, wrapperName) {\n var parent = node.parentNode;\n var wrapper = $('<' + wrapperName + '>')[0];\n\n parent.insertBefore(wrapper, node);\n wrapper.appendChild(node);\n\n return wrapper;\n };\n\n /**\n * insert node after preceding\n *\n * @param {Node} node\n * @param {Node} preceding - predicate function\n */\n var insertAfter = function (node, preceding) {\n var next = preceding.nextSibling, parent = preceding.parentNode;\n if (next) {\n parent.insertBefore(node, next);\n } else {\n parent.appendChild(node);\n }\n return node;\n };\n\n /**\n * append elements.\n *\n * @param {Node} node\n * @param {Collection} aChild\n */\n var appendChildNodes = function (node, aChild) {\n $.each(aChild, function (idx, child) {\n node.appendChild(child);\n });\n return node;\n };\n\n /**\n * returns whether boundaryPoint is left edge or not.\n *\n * @param {BoundaryPoint} point\n * @return {Boolean}\n */\n var isLeftEdgePoint = function (point) {\n return point.offset === 0;\n };\n\n /**\n * returns whether boundaryPoint is right edge or not.\n *\n * @param {BoundaryPoint} point\n * @return {Boolean}\n */\n var isRightEdgePoint = function (point) {\n return point.offset === nodeLength(point.node);\n };\n\n /**\n * returns whether boundaryPoint is edge or not.\n *\n * @param {BoundaryPoint} point\n * @return {Boolean}\n */\n var isEdgePoint = function (point) {\n return isLeftEdgePoint(point) || isRightEdgePoint(point);\n };\n\n /**\n * returns wheter node is left edge of ancestor or not.\n *\n * @param {Node} node\n * @param {Node} ancestor\n * @return {Boolean}\n */\n var isLeftEdgeOf = function (node, ancestor) {\n while (node && node !== ancestor) {\n if (position(node) !== 0) {\n return false;\n }\n node = node.parentNode;\n }\n\n return true;\n };\n\n /**\n * returns whether node is right edge of ancestor or not.\n *\n * @param {Node} node\n * @param {Node} ancestor\n * @return {Boolean}\n */\n var isRightEdgeOf = function (node, ancestor) {\n while (node && node !== ancestor) {\n if (position(node) !== nodeLength(node.parentNode) - 1) {\n return false;\n }\n node = node.parentNode;\n }\n\n return true;\n };\n\n /**\n * returns whether point is left edge of ancestor or not.\n * @param {BoundaryPoint} point\n * @param {Node} ancestor\n * @return {Boolean}\n */\n var isLeftEdgePointOf = function (point, ancestor) {\n return isLeftEdgePoint(point) && isLeftEdgeOf(point.node, ancestor);\n };\n\n /**\n * returns whether point is right edge of ancestor or not.\n * @param {BoundaryPoint} point\n * @param {Node} ancestor\n * @return {Boolean}\n */\n var isRightEdgePointOf = function (point, ancestor) {\n return isRightEdgePoint(point) && isRightEdgeOf(point.node, ancestor);\n };\n\n /**\n * returns offset from parent.\n *\n * @param {Node} node\n */\n var position = function (node) {\n var offset = 0;\n while ((node = node.previousSibling)) {\n offset += 1;\n }\n return offset;\n };\n\n var hasChildren = function (node) {\n return !!(node && node.childNodes && node.childNodes.length);\n };\n\n /**\n * returns previous boundaryPoint\n *\n * @param {BoundaryPoint} point\n * @param {Boolean} isSkipInnerOffset\n * @return {BoundaryPoint}\n */\n var prevPoint = function (point, isSkipInnerOffset) {\n var node, offset;\n\n if (point.offset === 0) {\n if (isEditable(point.node)) {\n return null;\n }\n\n node = point.node.parentNode;\n offset = position(point.node);\n } else if (hasChildren(point.node)) {\n node = point.node.childNodes[point.offset - 1];\n offset = nodeLength(node);\n } else {\n node = point.node;\n offset = isSkipInnerOffset ? 0 : point.offset - 1;\n }\n\n return {\n node: node,\n offset: offset\n };\n };\n\n /**\n * returns next boundaryPoint\n *\n * @param {BoundaryPoint} point\n * @param {Boolean} isSkipInnerOffset\n * @return {BoundaryPoint}\n */\n var nextPoint = function (point, isSkipInnerOffset) {\n var node, offset;\n\n if (nodeLength(point.node) === point.offset) {\n if (isEditable(point.node)) {\n return null;\n }\n\n node = point.node.parentNode;\n offset = position(point.node) + 1;\n } else if (hasChildren(point.node)) {\n node = point.node.childNodes[point.offset];\n offset = 0;\n } else {\n node = point.node;\n offset = isSkipInnerOffset ? nodeLength(point.node) : point.offset + 1;\n }\n\n return {\n node: node,\n offset: offset\n };\n };\n\n /**\n * returns whether pointA and pointB is same or not.\n *\n * @param {BoundaryPoint} pointA\n * @param {BoundaryPoint} pointB\n * @return {Boolean}\n */\n var isSamePoint = function (pointA, pointB) {\n return pointA.node === pointB.node && pointA.offset === pointB.offset;\n };\n\n /**\n * returns whether point is visible (can set cursor) or not.\n * \n * @param {BoundaryPoint} point\n * @return {Boolean}\n */\n var isVisiblePoint = function (point) {\n if (isText(point.node) || !hasChildren(point.node) || isEmpty(point.node)) {\n return true;\n }\n\n var leftNode = point.node.childNodes[point.offset - 1];\n var rightNode = point.node.childNodes[point.offset];\n if ((!leftNode || isVoid(leftNode)) && (!rightNode || isVoid(rightNode))) {\n return true;\n }\n\n return false;\n };\n\n /**\n * @method prevPointUtil\n *\n * @param {BoundaryPoint} point\n * @param {Function} pred\n * @return {BoundaryPoint}\n */\n var prevPointUntil = function (point, pred) {\n while (point) {\n if (pred(point)) {\n return point;\n }\n\n point = prevPoint(point);\n }\n\n return null;\n };\n\n /**\n * @method nextPointUntil\n *\n * @param {BoundaryPoint} point\n * @param {Function} pred\n * @return {BoundaryPoint}\n */\n var nextPointUntil = function (point, pred) {\n while (point) {\n if (pred(point)) {\n return point;\n }\n\n point = nextPoint(point);\n }\n\n return null;\n };\n\n /**\n * returns whether point has character or not.\n *\n * @param {Point} point\n * @return {Boolean}\n */\n var isCharPoint = function (point) {\n if (!isText(point.node)) {\n return false;\n }\n\n var ch = point.node.nodeValue.charAt(point.offset - 1);\n return ch && (ch !== ' ' && ch !== NBSP_CHAR);\n };\n\n /**\n * @method walkPoint\n *\n * @param {BoundaryPoint} startPoint\n * @param {BoundaryPoint} endPoint\n * @param {Function} handler\n * @param {Boolean} isSkipInnerOffset\n */\n var walkPoint = function (startPoint, endPoint, handler, isSkipInnerOffset) {\n var point = startPoint;\n\n while (point) {\n handler(point);\n\n if (isSamePoint(point, endPoint)) {\n break;\n }\n\n var isSkipOffset = isSkipInnerOffset &&\n startPoint.node !== point.node &&\n endPoint.node !== point.node;\n point = nextPoint(point, isSkipOffset);\n }\n };\n\n /**\n * @method makeOffsetPath\n *\n * return offsetPath(array of offset) from ancestor\n *\n * @param {Node} ancestor - ancestor node\n * @param {Node} node\n */\n var makeOffsetPath = function (ancestor, node) {\n var ancestors = listAncestor(node, func.eq(ancestor));\n return ancestors.map(position).reverse();\n };\n\n /**\n * @method fromOffsetPath\n *\n * return element from offsetPath(array of offset)\n *\n * @param {Node} ancestor - ancestor node\n * @param {array} offsets - offsetPath\n */\n var fromOffsetPath = function (ancestor, offsets) {\n var current = ancestor;\n for (var i = 0, len = offsets.length; i < len; i++) {\n if (current.childNodes.length <= offsets[i]) {\n current = current.childNodes[current.childNodes.length - 1];\n } else {\n current = current.childNodes[offsets[i]];\n }\n }\n return current;\n };\n\n /**\n * @method splitNode\n *\n * split element or #text\n *\n * @param {BoundaryPoint} point\n * @param {Object} [options]\n * @param {Boolean} [options.isSkipPaddingBlankHTML] - default: false\n * @param {Boolean} [options.isNotSplitEdgePoint] - default: false\n * @return {Node} right node of boundaryPoint\n */\n var splitNode = function (point, options) {\n var isSkipPaddingBlankHTML = options && options.isSkipPaddingBlankHTML;\n var isNotSplitEdgePoint = options && options.isNotSplitEdgePoint;\n\n // edge case\n if (isEdgePoint(point) && (isText(point.node) || isNotSplitEdgePoint)) {\n if (isLeftEdgePoint(point)) {\n return point.node;\n } else if (isRightEdgePoint(point)) {\n return point.node.nextSibling;\n }\n }\n\n // split #text\n if (isText(point.node)) {\n return point.node.splitText(point.offset);\n } else {\n var childNode = point.node.childNodes[point.offset];\n var clone = insertAfter(point.node.cloneNode(false), point.node);\n appendChildNodes(clone, listNext(childNode));\n\n if (!isSkipPaddingBlankHTML) {\n paddingBlankHTML(point.node);\n paddingBlankHTML(clone);\n }\n\n return clone;\n }\n };\n\n /**\n * @method splitTree\n *\n * split tree by point\n *\n * @param {Node} root - split root\n * @param {BoundaryPoint} point\n * @param {Object} [options]\n * @param {Boolean} [options.isSkipPaddingBlankHTML] - default: false\n * @param {Boolean} [options.isNotSplitEdgePoint] - default: false\n * @return {Node} right node of boundaryPoint\n */\n var splitTree = function (root, point, options) {\n // ex) [#text, <span>, <p>]\n var ancestors = listAncestor(point.node, func.eq(root));\n\n if (!ancestors.length) {\n return null;\n } else if (ancestors.length === 1) {\n return splitNode(point, options);\n }\n\n return ancestors.reduce(function (node, parent) {\n if (node === point.node) {\n node = splitNode(point, options);\n }\n\n return splitNode({\n node: parent,\n offset: node ? dom.position(node) : nodeLength(parent)\n }, options);\n });\n };\n\n /**\n * split point\n *\n * @param {Point} point\n * @param {Boolean} isInline\n * @return {Object}\n */\n var splitPoint = function (point, isInline) {\n // find splitRoot, container\n // - inline: splitRoot is a child of paragraph\n // - block: splitRoot is a child of bodyContainer\n var pred = isInline ? isPara : isBodyContainer;\n var ancestors = listAncestor(point.node, pred);\n var topAncestor = list.last(ancestors) || point.node;\n\n var splitRoot, container;\n if (pred(topAncestor)) {\n splitRoot = ancestors[ancestors.length - 2];\n container = topAncestor;\n } else {\n splitRoot = topAncestor;\n container = splitRoot.parentNode;\n }\n\n // if splitRoot is exists, split with splitTree\n var pivot = splitRoot && splitTree(splitRoot, point, {\n isSkipPaddingBlankHTML: isInline,\n isNotSplitEdgePoint: isInline\n });\n\n // if container is point.node, find pivot with point.offset\n if (!pivot && container === point.node) {\n pivot = point.node.childNodes[point.offset];\n }\n\n return {\n rightNode: pivot,\n container: container\n };\n };\n\n var create = function (nodeName) {\n return document.createElement(nodeName);\n };\n\n var createText = function (text) {\n return document.createTextNode(text);\n };\n\n /**\n * @method remove\n *\n * remove node, (isRemoveChild: remove child or not)\n *\n * @param {Node} node\n * @param {Boolean} isRemoveChild\n */\n var remove = function (node, isRemoveChild) {\n if (!node || !node.parentNode) { return; }\n if (node.removeNode) { return node.removeNode(isRemoveChild); }\n\n var parent = node.parentNode;\n if (!isRemoveChild) {\n var nodes = [];\n var i, len;\n for (i = 0, len = node.childNodes.length; i < len; i++) {\n nodes.push(node.childNodes[i]);\n }\n\n for (i = 0, len = nodes.length; i < len; i++) {\n parent.insertBefore(nodes[i], node);\n }\n }\n\n parent.removeChild(node);\n };\n\n /**\n * @method removeWhile\n *\n * @param {Node} node\n * @param {Function} pred\n */\n var removeWhile = function (node, pred) {\n while (node) {\n if (isEditable(node) || !pred(node)) {\n break;\n }\n\n var parent = node.parentNode;\n remove(node);\n node = parent;\n }\n };\n\n /**\n * @method replace\n *\n * replace node with provided nodeName\n *\n * @param {Node} node\n * @param {String} nodeName\n * @return {Node} - new node\n */\n var replace = function (node, nodeName) {\n if (node.nodeName.toUpperCase() === nodeName.toUpperCase()) {\n return node;\n }\n\n var newNode = create(nodeName);\n\n if (node.style.cssText) {\n newNode.style.cssText = node.style.cssText;\n }\n\n appendChildNodes(newNode, list.from(node.childNodes));\n insertAfter(newNode, node);\n remove(node);\n\n return newNode;\n };\n\n var isTextarea = makePredByNodeName('TEXTAREA');\n\n /**\n * @param {jQuery} $node\n * @param {Boolean} [stripLinebreaks] - default: false\n */\n var value = function ($node, stripLinebreaks) {\n var val = isTextarea($node[0]) ? $node.val() : $node.html();\n if (stripLinebreaks) {\n return val.replace(/[\\n\\r]/g, '');\n }\n return val;\n };\n\n /**\n * @method html\n *\n * get the HTML contents of node\n *\n * @param {jQuery} $node\n * @param {Boolean} [isNewlineOnBlock]\n */\n var html = function ($node, isNewlineOnBlock) {\n var markup = value($node);\n\n if (isNewlineOnBlock) {\n var regexTag = /<(\\/?)(\\b(?!!)[^>\\s]*)(.*?)(\\s*\\/?>)/g;\n markup = markup.replace(regexTag, function (match, endSlash, name) {\n name = name.toUpperCase();\n var isEndOfInlineContainer = /^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(name) &&\n !!endSlash;\n var isBlockNode = /^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(name);\n\n return match + ((isEndOfInlineContainer || isBlockNode) ? '\\n' : '');\n });\n markup = $.trim(markup);\n }\n\n return markup;\n };\n\n var posFromPlaceholder = function (placeholder) {\n var $placeholder = $(placeholder);\n var pos = $placeholder.offset();\n var height = $placeholder.outerHeight(true); // include margin\n\n return {\n left: pos.left,\n top: pos.top + height\n };\n };\n\n var attachEvents = function ($node, events) {\n Object.keys(events).forEach(function (key) {\n $node.on(key, events[key]);\n });\n };\n\n var detachEvents = function ($node, events) {\n Object.keys(events).forEach(function (key) {\n $node.off(key, events[key]);\n });\n };\n\n return {\n /** @property {String} NBSP_CHAR */\n NBSP_CHAR: NBSP_CHAR,\n /** @property {String} ZERO_WIDTH_NBSP_CHAR */\n ZERO_WIDTH_NBSP_CHAR: ZERO_WIDTH_NBSP_CHAR,\n /** @property {String} blank */\n blank: blankHTML,\n /** @property {String} emptyPara */\n emptyPara: '<p>' + blankHTML + '</p>',\n makePredByNodeName: makePredByNodeName,\n isEditable: isEditable,\n isControlSizing: isControlSizing,\n isText: isText,\n isElement: isElement,\n isVoid: isVoid,\n isPara: isPara,\n isPurePara: isPurePara,\n isHeading: isHeading,\n isInline: isInline,\n isBlock: func.not(isInline),\n isBodyInline: isBodyInline,\n isBody: isBody,\n isParaInline: isParaInline,\n isList: isList,\n isTable: isTable,\n isCell: isCell,\n isBlockquote: isBlockquote,\n isBodyContainer: isBodyContainer,\n isAnchor: isAnchor,\n isDiv: makePredByNodeName('DIV'),\n isLi: isLi,\n isBR: makePredByNodeName('BR'),\n isSpan: makePredByNodeName('SPAN'),\n isB: makePredByNodeName('B'),\n isU: makePredByNodeName('U'),\n isS: makePredByNodeName('S'),\n isI: makePredByNodeName('I'),\n isImg: makePredByNodeName('IMG'),\n isTextarea: isTextarea,\n isEmpty: isEmpty,\n isEmptyAnchor: func.and(isAnchor, isEmpty),\n isClosestSibling: isClosestSibling,\n withClosestSiblings: withClosestSiblings,\n nodeLength: nodeLength,\n isLeftEdgePoint: isLeftEdgePoint,\n isRightEdgePoint: isRightEdgePoint,\n isEdgePoint: isEdgePoint,\n isLeftEdgeOf: isLeftEdgeOf,\n isRightEdgeOf: isRightEdgeOf,\n isLeftEdgePointOf: isLeftEdgePointOf,\n isRightEdgePointOf: isRightEdgePointOf,\n prevPoint: prevPoint,\n nextPoint: nextPoint,\n isSamePoint: isSamePoint,\n isVisiblePoint: isVisiblePoint,\n prevPointUntil: prevPointUntil,\n nextPointUntil: nextPointUntil,\n isCharPoint: isCharPoint,\n walkPoint: walkPoint,\n ancestor: ancestor,\n singleChildAncestor: singleChildAncestor,\n listAncestor: listAncestor,\n lastAncestor: lastAncestor,\n listNext: listNext,\n listPrev: listPrev,\n listDescendant: listDescendant,\n commonAncestor: commonAncestor,\n wrap: wrap,\n insertAfter: insertAfter,\n appendChildNodes: appendChildNodes,\n position: position,\n hasChildren: hasChildren,\n makeOffsetPath: makeOffsetPath,\n fromOffsetPath: fromOffsetPath,\n splitTree: splitTree,\n splitPoint: splitPoint,\n create: create,\n createText: createText,\n remove: remove,\n removeWhile: removeWhile,\n replace: replace,\n html: html,\n value: value,\n posFromPlaceholder: posFromPlaceholder,\n attachEvents: attachEvents,\n detachEvents: detachEvents\n };\n })();\n\n\n /**\n * @param {jQuery} $note\n * @param {Object} options\n * @return {Context}\n */\n var Context = function ($note, options) {\n var self = this;\n\n var ui = $.summernote.ui;\n this.memos = {};\n this.modules = {};\n this.layoutInfo = {};\n this.options = options;\n\n this.initialize = function () {\n // create layout info\n this.layoutInfo = ui.createLayout($note, options);\n\n // add optional buttons\n var buttons = $.extend({}, this.options.buttons);\n Object.keys(buttons).forEach(function (key) {\n self.memo('button.' + key, buttons[key]);\n });\n\n var modules = $.extend({}, this.options.modules, $.summernote.plugins || {});\n\n // add module\n Object.keys(modules).forEach(function (key) {\n self.module(key, modules[key], true);\n });\n\n Object.keys(this.modules).forEach(function (key) {\n self.initializeModule(key);\n });\n\n $note.hide();\n return this;\n };\n\n this.destroy = function () {\n Object.keys(this.modules).forEach(function (key) {\n self.removeModule(key);\n });\n\n Object.keys(this.memos).forEach(function (key) {\n self.removeMemo(key);\n });\n\n $note.removeData('summernote');\n\n ui.removeLayout($note, this.layoutInfo);\n };\n\n this.code = function (html) {\n var isActivated = this.invoke('codeview.isActivated');\n\n if (html === undefined) {\n this.invoke('codeview.sync');\n return isActivated ? this.layoutInfo.codable.val() : this.layoutInfo.editable.html();\n } else {\n if (isActivated) {\n this.layoutInfo.codable.val(html);\n } else {\n this.layoutInfo.editable.html(html);\n }\n }\n };\n\n this.triggerEvent = function () {\n var namespace = list.head(arguments);\n var args = list.tail(list.from(arguments));\n\n var callback = this.options.callbacks[func.namespaceToCamel(namespace, 'on')];\n if (callback) {\n callback.apply($note[0], args);\n }\n $note.trigger('summernote.' + namespace, args);\n };\n\n this.initializeModule = function (key) {\n var module = this.modules[key];\n module.shouldInitialize = module.shouldInitialize || func.ok;\n if (!module.shouldInitialize()) {\n return;\n }\n\n // initialize module\n if (module.initialize) {\n module.initialize();\n }\n\n // attach events\n if (module.events) {\n dom.attachEvents($note, module.events);\n }\n };\n\n this.module = function (key, ModuleClass, withoutIntialize) {\n if (arguments.length === 1) {\n return this.modules[key];\n }\n\n this.modules[key] = new ModuleClass(this);\n\n if (!withoutIntialize) {\n this.initializeModule(key);\n }\n };\n\n this.removeModule = function (key) {\n var module = this.modules[key];\n if (module.shouldInitialize()) {\n if (module.events) {\n dom.detachEvents($note, module.events);\n }\n\n if (module.destroy) {\n module.destroy();\n }\n }\n\n delete this.modules[key];\n this.modules[key] = null;\n };\n\n this.memo = function (key, obj) {\n if (arguments.length === 1) {\n return this.memos[key];\n }\n this.memos[key] = obj;\n };\n\n this.removeMemo = function (key) {\n if (this.memos[key] && this.memos[key].destroy) {\n this.memos[key].destroy();\n }\n\n delete this.memos[key];\n this.memos[key] = null;\n };\n\n this.createInvokeHandler = function (namespace, value) {\n return function (event) {\n event.preventDefault();\n self.invoke(namespace, value || $(event.target).data('value') || $(event.currentTarget).data('value'));\n };\n };\n\n this.invoke = function () {\n var namespace = list.head(arguments);\n var args = list.tail(list.from(arguments));\n\n var splits = namespace.split('.');\n var hasSeparator = splits.length > 1;\n var moduleName = hasSeparator && list.head(splits);\n var methodName = hasSeparator ? list.last(splits) : list.head(splits);\n\n var module = this.modules[moduleName || 'editor'];\n if (!moduleName && this[methodName]) {\n return this[methodName].apply(this, args);\n } else if (module && module[methodName] && module.shouldInitialize()) {\n return module[methodName].apply(module, args);\n }\n };\n\n return this.initialize();\n };\n\n $.summernote = $.summernote || {\n lang: {}\n };\n\n $.fn.extend({\n /**\n * Summernote API\n *\n * @param {Object|String}\n * @return {this}\n */\n summernote: function () {\n var type = $.type(list.head(arguments));\n var isExternalAPICalled = type === 'string';\n var hasInitOptions = type === 'object';\n\n var options = hasInitOptions ? list.head(arguments) : {};\n\n options = $.extend({}, $.summernote.options, options);\n options.langInfo = $.extend(true, {}, $.summernote.lang['en-US'], $.summernote.lang[options.lang]);\n\n this.each(function (idx, note) {\n var $note = $(note);\n if (!$note.data('summernote')) {\n $note.data('summernote', new Context($note, options));\n $note.data('summernote').triggerEvent('init');\n }\n });\n\n var $note = this.first();\n if (isExternalAPICalled && $note.length) {\n var context = $note.data('summernote');\n return context.invoke.apply(context, list.from(arguments));\n } else {\n return this;\n }\n }\n });\n\n\n var Renderer = function (markup, children, options, callback) {\n this.render = function ($parent) {\n var $node = $(markup);\n\n if (options && options.contents) {\n $node.html(options.contents);\n }\n\n if (options && options.className) {\n $node.addClass(options.className);\n }\n\n if (options && options.data) {\n $.each(options.data, function (k, v) {\n $node.attr('data-' + k, v);\n });\n }\n\n if (options && options.click) {\n $node.on('click', options.click);\n }\n\n if (children) {\n var $container = $node.find('.note-children-container');\n children.forEach(function (child) {\n child.render($container.length ? $container : $node);\n });\n }\n\n if (callback) {\n callback($node, options);\n }\n\n if (options && options.callback) {\n options.callback($node);\n }\n\n if ($parent) {\n $parent.append($node);\n }\n\n return $node;\n };\n };\n\n var renderer = {\n create: function (markup, callback) {\n return function () {\n var children = $.isArray(arguments[0]) ? arguments[0] : [];\n var options = typeof arguments[1] === 'object' ? arguments[1] : arguments[0];\n if (options && options.children) {\n children = options.children;\n }\n return new Renderer(markup, children, options, callback);\n };\n }\n };\n\n var editor = renderer.create('<div class=\"note-editor note-frame panel panel-default\"/>');\n var toolbar = renderer.create('<div class=\"note-toolbar panel-heading\"/>');\n var editingArea = renderer.create('<div class=\"note-editing-area\"/>');\n var codable = renderer.create('<textarea class=\"note-codable\"/>');\n var editable = renderer.create('<div class=\"note-editable panel-body\" contentEditable=\"true\"/>');\n var statusbar = renderer.create([\n '<div class=\"note-statusbar\">',\n ' <div class=\"note-resizebar\">',\n ' <div class=\"note-icon-bar\"/>',\n ' <div class=\"note-icon-bar\"/>',\n ' <div class=\"note-icon-bar\"/>',\n ' </div>',\n '</div>'\n ].join(''));\n\n var airEditor = renderer.create('<div class=\"note-editor\"/>');\n var airEditable = renderer.create('<div class=\"note-editable\" contentEditable=\"true\"/>');\n\n var buttonGroup = renderer.create('<div class=\"note-btn-group btn-group\">');\n var button = renderer.create('<button type=\"button\" class=\"note-btn btn btn-default btn-sm\">', function ($node, options) {\n if (options && options.tooltip) {\n $node.attr({\n title: options.tooltip\n }).tooltip({\n container: 'body',\n trigger: 'hover',\n placement: 'bottom'\n });\n }\n });\n\n var dropdown = renderer.create('<div class=\"dropdown-menu\">', function ($node, options) {\n var markup = $.isArray(options.items) ? options.items.map(function (item) {\n return '<li><a href=\"#\" data-value=\"' + item + '\">' + item + '</a></li>';\n }).join('') : options.items;\n\n $node.html(markup);\n });\n\n var dropdownCheck = renderer.create('<div class=\"dropdown-menu note-check\">', function ($node, options) {\n var markup = $.isArray(options.items) ? options.items.map(function (item) {\n return '<li><a href=\"#\" data-value=\"' + item + '\">' + icon(options.checkClassName) + ' ' + item + '</a></li>';\n }).join('') : options.items;\n $node.html(markup);\n });\n\n var palette = renderer.create('<div class=\"note-color-palette\"/>', function ($node, options) {\n var contents = [];\n for (var row = 0, rowSize = options.colors.length; row < rowSize; row++) {\n var eventName = options.eventName;\n var colors = options.colors[row];\n var buttons = [];\n for (var col = 0, colSize = colors.length; col < colSize; col++) {\n var color = colors[col];\n buttons.push([\n '<button type=\"button\" class=\"note-color-btn\"',\n 'style=\"background-color:', color, '\" ',\n 'data-event=\"', eventName, '\" ',\n 'data-value=\"', color, '\" ',\n 'title=\"', color, '\" ',\n 'data-toggle=\"button\" tabindex=\"-1\"></button>'\n ].join(''));\n }\n contents.push('<div class=\"note-color-row\">' + buttons.join('') + '</div>');\n }\n $node.html(contents.join(''));\n\n $node.find('.note-color-btn').tooltip({\n container: 'body',\n trigger: 'hover',\n placement: 'bottom'\n });\n });\n\n var dialog = renderer.create('<div class=\"modal\" aria-hidden=\"false\"/>', function ($node, options) {\n $node.html([\n '<div class=\"modal-dialog\">',\n ' <div class=\"modal-content\">',\n (options.title ?\n ' <div class=\"modal-header\">' +\n ' <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>' +\n ' <h4 class=\"modal-title\">' + options.title + '</h4>' +\n ' </div>' : ''\n ),\n ' <div class=\"modal-body\">' + options.body + '</div>',\n (options.footer ?\n ' <div class=\"modal-footer\">' + options.footer + '</div>' : ''\n ),\n ' </div>',\n '</div>'\n ].join(''));\n });\n\n var popover = renderer.create([\n '<div class=\"note-popover popover bottom in\">',\n ' <div class=\"arrow\"/>',\n ' <div class=\"popover-content note-children-container\"/>',\n '</div>'\n ].join(''));\n\n var icon = function (iconClassName, tagName) {\n tagName = tagName || 'i';\n return '<' + tagName + ' class=\"' + iconClassName + '\"/>';\n };\n\n var ui = {\n editor: editor,\n toolbar: toolbar,\n editingArea: editingArea,\n codable: codable,\n editable: editable,\n statusbar: statusbar,\n airEditor: airEditor,\n airEditable: airEditable,\n buttonGroup: buttonGroup,\n button: button,\n dropdown: dropdown,\n dropdownCheck: dropdownCheck,\n palette: palette,\n dialog: dialog,\n popover: popover,\n icon: icon,\n\n toggleBtn: function ($btn, isEnable) {\n $btn.toggleClass('disabled', !isEnable);\n $btn.attr('disabled', !isEnable);\n },\n\n toggleBtnActive: function ($btn, isActive) {\n $btn.toggleClass('active', isActive);\n },\n\n onDialogShown: function ($dialog, handler) {\n $dialog.one('shown.bs.modal', handler);\n },\n\n onDialogHidden: function ($dialog, handler) {\n $dialog.one('hidden.bs.modal', handler);\n },\n\n showDialog: function ($dialog) {\n $dialog.modal('show');\n },\n\n hideDialog: function ($dialog) {\n $dialog.modal('hide');\n },\n\n createLayout: function ($note, options) {\n var $editor = (options.airMode ? ui.airEditor([\n ui.editingArea([\n ui.airEditable()\n ])\n ]) : ui.editor([\n ui.toolbar(),\n ui.editingArea([\n ui.codable(),\n ui.editable()\n ]),\n ui.statusbar()\n ])).render();\n\n $editor.insertAfter($note);\n\n return {\n note: $note,\n editor: $editor,\n toolbar: $editor.find('.note-toolbar'),\n editingArea: $editor.find('.note-editing-area'),\n editable: $editor.find('.note-editable'),\n codable: $editor.find('.note-codable'),\n statusbar: $editor.find('.note-statusbar')\n };\n },\n\n removeLayout: function ($note, layoutInfo) {\n $note.html(layoutInfo.editable.html());\n layoutInfo.editor.remove();\n $note.show();\n }\n };\n\n $.extend($.summernote.lang, {\n 'en-US': {\n font: {\n bold: 'Bold',\n italic: 'Italic',\n underline: 'Underline',\n clear: 'Remove Font Style',\n height: 'Line Height',\n name: 'Font Family',\n strikethrough: 'Strikethrough',\n subscript: 'Subscript',\n superscript: 'Superscript',\n size: 'Font Size'\n },\n image: {\n image: 'Picture',\n insert: 'Insert Image',\n resizeFull: 'Resize Full',\n resizeHalf: 'Resize Half',\n resizeQuarter: 'Resize Quarter',\n floatLeft: 'Float Left',\n floatRight: 'Float Right',\n floatNone: 'Float None',\n shapeRounded: 'Shape: Rounded',\n shapeCircle: 'Shape: Circle',\n shapeThumbnail: 'Shape: Thumbnail',\n shapeNone: 'Shape: None',\n dragImageHere: 'Drag image or text here',\n dropImage: 'Drop image or Text',\n selectFromFiles: 'Select from files',\n maximumFileSize: 'Maximum file size',\n maximumFileSizeError: 'Maximum file size exceeded.',\n url: 'Image URL',\n remove: 'Remove Image'\n },\n video: {\n video: 'Video',\n videoLink: 'Video Link',\n insert: 'Insert Video',\n url: 'Video URL?',\n providers: '(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)'\n },\n link: {\n link: 'Link',\n insert: 'Insert Link',\n unlink: 'Unlink',\n edit: 'Edit',\n textToDisplay: 'Text to display',\n url: 'To what URL should this link go?',\n openInNewWindow: 'Open in new window'\n },\n table: {\n table: 'Table'\n },\n hr: {\n insert: 'Insert Horizontal Rule'\n },\n style: {\n style: 'Style',\n normal: 'Normal',\n blockquote: 'Quote',\n pre: 'Code',\n h1: 'Header 1',\n h2: 'Header 2',\n h3: 'Header 3',\n h4: 'Header 4',\n h5: 'Header 5',\n h6: 'Header 6'\n },\n lists: {\n unordered: 'Unordered list',\n ordered: 'Ordered list'\n },\n options: {\n help: 'Help',\n fullscreen: 'Full Screen',\n codeview: 'Code View'\n },\n paragraph: {\n paragraph: 'Paragraph',\n outdent: 'Outdent',\n indent: 'Indent',\n left: 'Align left',\n center: 'Align center',\n right: 'Align right',\n justify: 'Justify full'\n },\n color: {\n recent: 'Recent Color',\n more: 'More Color',\n background: 'Background Color',\n foreground: 'Foreground Color',\n transparent: 'Transparent',\n setTransparent: 'Set transparent',\n reset: 'Reset',\n resetToDefault: 'Reset to default'\n },\n shortcut: {\n shortcuts: 'Keyboard shortcuts',\n close: 'Close',\n textFormatting: 'Text formatting',\n action: 'Action',\n paragraphFormatting: 'Paragraph formatting',\n documentStyle: 'Document Style',\n extraKeys: 'Extra keys'\n },\n help : {\n 'insertParagraph': 'Insert Paragraph',\n 'undo': 'Undoes the last command',\n 'redo': 'Redoes the last command',\n 'tab': 'Tab',\n 'untab': 'Untab',\n 'bold': 'Set a bold style',\n 'italic': 'Set a italic style',\n 'underline': 'Set a underline style',\n 'strikethrough': 'Set a strikethrough style',\n 'removeFormat': 'Clean a style',\n 'justifyLeft': 'Set left align',\n 'justifyCenter': 'Set center align',\n 'justifyRight': 'Set right align',\n 'justifyFull': 'Set full align',\n 'insertUnorderedList': 'Toggle unordered list',\n 'insertOrderedList': 'Toggle ordered list',\n 'outdent': 'Outdent on current paragraph',\n 'indent': 'Indent on current paragraph',\n 'formatPara': 'Change current block\\'s format as a paragraph(P tag)',\n 'formatH1': 'Change current block\\'s format as H1',\n 'formatH2': 'Change current block\\'s format as H2',\n 'formatH3': 'Change current block\\'s format as H3',\n 'formatH4': 'Change current block\\'s format as H4',\n 'formatH5': 'Change current block\\'s format as H5',\n 'formatH6': 'Change current block\\'s format as H6',\n 'insertHorizontalRule': 'Insert horizontal rule',\n 'linkDialog.show': 'Show Link Dialog'\n },\n history: {\n undo: 'Undo',\n redo: 'Redo'\n },\n specialChar: {\n specialChar: 'SPECIAL CHARACTERS',\n select: 'Select Special characters'\n }\n }\n });\n\n\n /**\n * @class core.key\n *\n * Object for keycodes.\n *\n * @singleton\n * @alternateClassName key\n */\n var key = (function () {\n var keyMap = {\n 'BACKSPACE': 8,\n 'TAB': 9,\n 'ENTER': 13,\n 'SPACE': 32,\n\n // Arrow\n 'LEFT': 37,\n 'UP': 38,\n 'RIGHT': 39,\n 'DOWN': 40,\n\n // Number: 0-9\n 'NUM0': 48,\n 'NUM1': 49,\n 'NUM2': 50,\n 'NUM3': 51,\n 'NUM4': 52,\n 'NUM5': 53,\n 'NUM6': 54,\n 'NUM7': 55,\n 'NUM8': 56,\n\n // Alphabet: a-z\n 'B': 66,\n 'E': 69,\n 'I': 73,\n 'J': 74,\n 'K': 75,\n 'L': 76,\n 'R': 82,\n 'S': 83,\n 'U': 85,\n 'V': 86,\n 'Y': 89,\n 'Z': 90,\n\n 'SLASH': 191,\n 'LEFTBRACKET': 219,\n 'BACKSLASH': 220,\n 'RIGHTBRACKET': 221\n };\n\n return {\n /**\n * @method isEdit\n *\n * @param {Number} keyCode\n * @return {Boolean}\n */\n isEdit: function (keyCode) {\n return list.contains([\n keyMap.BACKSPACE,\n keyMap.TAB,\n keyMap.ENTER,\n keyMap.SPACe\n ], keyCode);\n },\n /**\n * @method isMove\n *\n * @param {Number} keyCode\n * @return {Boolean}\n */\n isMove: function (keyCode) {\n return list.contains([\n keyMap.LEFT,\n keyMap.UP,\n keyMap.RIGHT,\n keyMap.DOWN\n ], keyCode);\n },\n /**\n * @property {Object} nameFromCode\n * @property {String} nameFromCode.8 \"BACKSPACE\"\n */\n nameFromCode: func.invertObject(keyMap),\n code: keyMap\n };\n })();\n\n\n var range = (function () {\n\n /**\n * return boundaryPoint from TextRange, inspired by Andy Na's HuskyRange.js\n *\n * @param {TextRange} textRange\n * @param {Boolean} isStart\n * @return {BoundaryPoint}\n *\n * @see http://msdn.microsoft.com/en-us/library/ie/ms535872(v=vs.85).aspx\n */\n var textRangeToPoint = function (textRange, isStart) {\n var container = textRange.parentElement(), offset;\n \n var tester = document.body.createTextRange(), prevContainer;\n var childNodes = list.from(container.childNodes);\n for (offset = 0; offset < childNodes.length; offset++) {\n if (dom.isText(childNodes[offset])) {\n continue;\n }\n tester.moveToElementText(childNodes[offset]);\n if (tester.compareEndPoints('StartToStart', textRange) >= 0) {\n break;\n }\n prevContainer = childNodes[offset];\n }\n \n if (offset !== 0 && dom.isText(childNodes[offset - 1])) {\n var textRangeStart = document.body.createTextRange(), curTextNode = null;\n textRangeStart.moveToElementText(prevContainer || container);\n textRangeStart.collapse(!prevContainer);\n curTextNode = prevContainer ? prevContainer.nextSibling : container.firstChild;\n \n var pointTester = textRange.duplicate();\n pointTester.setEndPoint('StartToStart', textRangeStart);\n var textCount = pointTester.text.replace(/[\\r\\n]/g, '').length;\n \n while (textCount > curTextNode.nodeValue.length && curTextNode.nextSibling) {\n textCount -= curTextNode.nodeValue.length;\n curTextNode = curTextNode.nextSibling;\n }\n \n /* jshint ignore:start */\n var dummy = curTextNode.nodeValue; // enforce IE to re-reference curTextNode, hack\n /* jshint ignore:end */\n \n if (isStart && curTextNode.nextSibling && dom.isText(curTextNode.nextSibling) &&\n textCount === curTextNode.nodeValue.length) {\n textCount -= curTextNode.nodeValue.length;\n curTextNode = curTextNode.nextSibling;\n }\n \n container = curTextNode;\n offset = textCount;\n }\n \n return {\n cont: container,\n offset: offset\n };\n };\n \n /**\n * return TextRange from boundary point (inspired by google closure-library)\n * @param {BoundaryPoint} point\n * @return {TextRange}\n */\n var pointToTextRange = function (point) {\n var textRangeInfo = function (container, offset) {\n var node, isCollapseToStart;\n \n if (dom.isText(container)) {\n var prevTextNodes = dom.listPrev(container, func.not(dom.isText));\n var prevContainer = list.last(prevTextNodes).previousSibling;\n node = prevContainer || container.parentNode;\n offset += list.sum(list.tail(prevTextNodes), dom.nodeLength);\n isCollapseToStart = !prevContainer;\n } else {\n node = container.childNodes[offset] || container;\n if (dom.isText(node)) {\n return textRangeInfo(node, 0);\n }\n \n offset = 0;\n isCollapseToStart = false;\n }\n \n return {\n node: node,\n collapseToStart: isCollapseToStart,\n offset: offset\n };\n };\n \n var textRange = document.body.createTextRange();\n var info = textRangeInfo(point.node, point.offset);\n \n textRange.moveToElementText(info.node);\n textRange.collapse(info.collapseToStart);\n textRange.moveStart('character', info.offset);\n return textRange;\n };\n \n /**\n * Wrapped Range\n *\n * @constructor\n * @param {Node} sc - start container\n * @param {Number} so - start offset\n * @param {Node} ec - end container\n * @param {Number} eo - end offset\n */\n var WrappedRange = function (sc, so, ec, eo) {\n this.sc = sc;\n this.so = so;\n this.ec = ec;\n this.eo = eo;\n \n // nativeRange: get nativeRange from sc, so, ec, eo\n var nativeRange = function () {\n if (agent.isW3CRangeSupport) {\n var w3cRange = document.createRange();\n w3cRange.setStart(sc, so);\n w3cRange.setEnd(ec, eo);\n\n return w3cRange;\n } else {\n var textRange = pointToTextRange({\n node: sc,\n offset: so\n });\n\n textRange.setEndPoint('EndToEnd', pointToTextRange({\n node: ec,\n offset: eo\n }));\n\n return textRange;\n }\n };\n\n this.getPoints = function () {\n return {\n sc: sc,\n so: so,\n ec: ec,\n eo: eo\n };\n };\n\n this.getStartPoint = function () {\n return {\n node: sc,\n offset: so\n };\n };\n\n this.getEndPoint = function () {\n return {\n node: ec,\n offset: eo\n };\n };\n\n /**\n * select update visible range\n */\n this.select = function () {\n var nativeRng = nativeRange();\n if (agent.isW3CRangeSupport) {\n var selection = document.getSelection();\n if (selection.rangeCount > 0) {\n selection.removeAllRanges();\n }\n selection.addRange(nativeRng);\n } else {\n nativeRng.select();\n }\n \n return this;\n };\n\n /**\n * @return {WrappedRange}\n */\n this.normalize = function () {\n\n /**\n * @param {BoundaryPoint} point\n * @param {Boolean} isLeftToRight\n * @return {BoundaryPoint}\n */\n var getVisiblePoint = function (point, isLeftToRight) {\n if ((dom.isVisiblePoint(point) && !dom.isEdgePoint(point)) ||\n (dom.isVisiblePoint(point) && dom.isRightEdgePoint(point) && !isLeftToRight) ||\n (dom.isVisiblePoint(point) && dom.isLeftEdgePoint(point) && isLeftToRight) ||\n (dom.isVisiblePoint(point) && dom.isBlock(point.node) && dom.isEmpty(point.node))) {\n return point;\n }\n\n // point on block's edge\n var block = dom.ancestor(point.node, dom.isBlock);\n if (((dom.isLeftEdgePointOf(point, block) || dom.isVoid(dom.prevPoint(point).node)) && !isLeftToRight) ||\n ((dom.isRightEdgePointOf(point, block) || dom.isVoid(dom.nextPoint(point).node)) && isLeftToRight)) {\n\n // returns point already on visible point\n if (dom.isVisiblePoint(point)) {\n return point;\n }\n // reverse direction \n isLeftToRight = !isLeftToRight;\n }\n\n var nextPoint = isLeftToRight ? dom.nextPointUntil(dom.nextPoint(point), dom.isVisiblePoint) :\n dom.prevPointUntil(dom.prevPoint(point), dom.isVisiblePoint);\n return nextPoint || point;\n };\n\n var endPoint = getVisiblePoint(this.getEndPoint(), false);\n var startPoint = this.isCollapsed() ? endPoint : getVisiblePoint(this.getStartPoint(), true);\n\n return new WrappedRange(\n startPoint.node,\n startPoint.offset,\n endPoint.node,\n endPoint.offset\n );\n };\n\n /**\n * returns matched nodes on range\n *\n * @param {Function} [pred] - predicate function\n * @param {Object} [options]\n * @param {Boolean} [options.includeAncestor]\n * @param {Boolean} [options.fullyContains]\n * @return {Node[]}\n */\n this.nodes = function (pred, options) {\n pred = pred || func.ok;\n\n var includeAncestor = options && options.includeAncestor;\n var fullyContains = options && options.fullyContains;\n\n // TODO compare points and sort\n var startPoint = this.getStartPoint();\n var endPoint = this.getEndPoint();\n\n var nodes = [];\n var leftEdgeNodes = [];\n\n dom.walkPoint(startPoint, endPoint, function (point) {\n if (dom.isEditable(point.node)) {\n return;\n }\n\n var node;\n if (fullyContains) {\n if (dom.isLeftEdgePoint(point)) {\n leftEdgeNodes.push(point.node);\n }\n if (dom.isRightEdgePoint(point) && list.contains(leftEdgeNodes, point.node)) {\n node = point.node;\n }\n } else if (includeAncestor) {\n node = dom.ancestor(point.node, pred);\n } else {\n node = point.node;\n }\n\n if (node && pred(node)) {\n nodes.push(node);\n }\n }, true);\n\n return list.unique(nodes);\n };\n\n /**\n * returns commonAncestor of range\n * @return {Element} - commonAncestor\n */\n this.commonAncestor = function () {\n return dom.commonAncestor(sc, ec);\n };\n\n /**\n * returns expanded range by pred\n *\n * @param {Function} pred - predicate function\n * @return {WrappedRange}\n */\n this.expand = function (pred) {\n var startAncestor = dom.ancestor(sc, pred);\n var endAncestor = dom.ancestor(ec, pred);\n\n if (!startAncestor && !endAncestor) {\n return new WrappedRange(sc, so, ec, eo);\n }\n\n var boundaryPoints = this.getPoints();\n\n if (startAncestor) {\n boundaryPoints.sc = startAncestor;\n boundaryPoints.so = 0;\n }\n\n if (endAncestor) {\n boundaryPoints.ec = endAncestor;\n boundaryPoints.eo = dom.nodeLength(endAncestor);\n }\n\n return new WrappedRange(\n boundaryPoints.sc,\n boundaryPoints.so,\n boundaryPoints.ec,\n boundaryPoints.eo\n );\n };\n\n /**\n * @param {Boolean} isCollapseToStart\n * @return {WrappedRange}\n */\n this.collapse = function (isCollapseToStart) {\n if (isCollapseToStart) {\n return new WrappedRange(sc, so, sc, so);\n } else {\n return new WrappedRange(ec, eo, ec, eo);\n }\n };\n\n /**\n * splitText on range\n */\n this.splitText = function () {\n var isSameContainer = sc === ec;\n var boundaryPoints = this.getPoints();\n\n if (dom.isText(ec) && !dom.isEdgePoint(this.getEndPoint())) {\n ec.splitText(eo);\n }\n\n if (dom.isText(sc) && !dom.isEdgePoint(this.getStartPoint())) {\n boundaryPoints.sc = sc.splitText(so);\n boundaryPoints.so = 0;\n\n if (isSameContainer) {\n boundaryPoints.ec = boundaryPoints.sc;\n boundaryPoints.eo = eo - so;\n }\n }\n\n return new WrappedRange(\n boundaryPoints.sc,\n boundaryPoints.so,\n boundaryPoints.ec,\n boundaryPoints.eo\n );\n };\n\n /**\n * delete contents on range\n * @return {WrappedRange}\n */\n this.deleteContents = function () {\n if (this.isCollapsed()) {\n return this;\n }\n\n var rng = this.splitText();\n var nodes = rng.nodes(null, {\n fullyContains: true\n });\n\n // find new cursor point\n var point = dom.prevPointUntil(rng.getStartPoint(), function (point) {\n return !list.contains(nodes, point.node);\n });\n\n var emptyParents = [];\n $.each(nodes, function (idx, node) {\n // find empty parents\n var parent = node.parentNode;\n if (point.node !== parent && dom.nodeLength(parent) === 1) {\n emptyParents.push(parent);\n }\n dom.remove(node, false);\n });\n\n // remove empty parents\n $.each(emptyParents, function (idx, node) {\n dom.remove(node, false);\n });\n\n return new WrappedRange(\n point.node,\n point.offset,\n point.node,\n point.offset\n ).normalize();\n };\n \n /**\n * makeIsOn: return isOn(pred) function\n */\n var makeIsOn = function (pred) {\n return function () {\n var ancestor = dom.ancestor(sc, pred);\n return !!ancestor && (ancestor === dom.ancestor(ec, pred));\n };\n };\n \n // isOnEditable: judge whether range is on editable or not\n this.isOnEditable = makeIsOn(dom.isEditable);\n // isOnList: judge whether range is on list node or not\n this.isOnList = makeIsOn(dom.isList);\n // isOnAnchor: judge whether range is on anchor node or not\n this.isOnAnchor = makeIsOn(dom.isAnchor);\n // isOnAnchor: judge whether range is on cell node or not\n this.isOnCell = makeIsOn(dom.isCell);\n\n /**\n * @param {Function} pred\n * @return {Boolean}\n */\n this.isLeftEdgeOf = function (pred) {\n if (!dom.isLeftEdgePoint(this.getStartPoint())) {\n return false;\n }\n\n var node = dom.ancestor(this.sc, pred);\n return node && dom.isLeftEdgeOf(this.sc, node);\n };\n\n /**\n * returns whether range was collapsed or not\n */\n this.isCollapsed = function () {\n return sc === ec && so === eo;\n };\n\n /**\n * wrap inline nodes which children of body with paragraph\n *\n * @return {WrappedRange}\n */\n this.wrapBodyInlineWithPara = function () {\n if (dom.isBodyContainer(sc) && dom.isEmpty(sc)) {\n sc.innerHTML = dom.emptyPara;\n return new WrappedRange(sc.firstChild, 0, sc.firstChild, 0);\n }\n\n /**\n * [workaround] firefox often create range on not visible point. so normalize here.\n * - firefox: |<p>text</p>|\n * - chrome: <p>|text|</p>\n */\n var rng = this.normalize();\n if (dom.isParaInline(sc) || dom.isPara(sc)) {\n return rng;\n }\n\n // find inline top ancestor\n var topAncestor;\n if (dom.isInline(rng.sc)) {\n var ancestors = dom.listAncestor(rng.sc, func.not(dom.isInline));\n topAncestor = list.last(ancestors);\n if (!dom.isInline(topAncestor)) {\n topAncestor = ancestors[ancestors.length - 2] || rng.sc.childNodes[rng.so];\n }\n } else {\n topAncestor = rng.sc.childNodes[rng.so > 0 ? rng.so - 1 : 0];\n }\n\n // siblings not in paragraph\n var inlineSiblings = dom.listPrev(topAncestor, dom.isParaInline).reverse();\n inlineSiblings = inlineSiblings.concat(dom.listNext(topAncestor.nextSibling, dom.isParaInline));\n\n // wrap with paragraph\n if (inlineSiblings.length) {\n var para = dom.wrap(list.head(inlineSiblings), 'p');\n dom.appendChildNodes(para, list.tail(inlineSiblings));\n }\n\n return this.normalize();\n };\n\n /**\n * insert node at current cursor\n *\n * @param {Node} node\n * @return {Node}\n */\n this.insertNode = function (node) {\n var rng = this.wrapBodyInlineWithPara().deleteContents();\n var info = dom.splitPoint(rng.getStartPoint(), dom.isInline(node));\n\n if (info.rightNode) {\n info.rightNode.parentNode.insertBefore(node, info.rightNode);\n } else {\n info.container.appendChild(node);\n }\n\n return node;\n };\n\n /**\n * insert html at current cursor\n */\n this.pasteHTML = function (markup) {\n var contentsContainer = $('<div></div>').html(markup)[0];\n var childNodes = list.from(contentsContainer.childNodes);\n\n var rng = this.wrapBodyInlineWithPara().deleteContents();\n\n return childNodes.reverse().map(function (childNode) {\n return rng.insertNode(childNode);\n }).reverse();\n };\n \n /**\n * returns text in range\n *\n * @return {String}\n */\n this.toString = function () {\n var nativeRng = nativeRange();\n return agent.isW3CRangeSupport ? nativeRng.toString() : nativeRng.text;\n };\n\n /**\n * returns range for word before cursor\n *\n * @param {Boolean} [findAfter] - find after cursor, default: false\n * @return {WrappedRange}\n */\n this.getWordRange = function (findAfter) {\n var endPoint = this.getEndPoint();\n\n if (!dom.isCharPoint(endPoint)) {\n return this;\n }\n\n var startPoint = dom.prevPointUntil(endPoint, function (point) {\n return !dom.isCharPoint(point);\n });\n\n if (findAfter) {\n endPoint = dom.nextPointUntil(endPoint, function (point) {\n return !dom.isCharPoint(point);\n });\n }\n\n return new WrappedRange(\n startPoint.node,\n startPoint.offset,\n endPoint.node,\n endPoint.offset\n );\n };\n \n /**\n * create offsetPath bookmark\n *\n * @param {Node} editable\n */\n this.bookmark = function (editable) {\n return {\n s: {\n path: dom.makeOffsetPath(editable, sc),\n offset: so\n },\n e: {\n path: dom.makeOffsetPath(editable, ec),\n offset: eo\n }\n };\n };\n\n /**\n * create offsetPath bookmark base on paragraph\n *\n * @param {Node[]} paras\n */\n this.paraBookmark = function (paras) {\n return {\n s: {\n path: list.tail(dom.makeOffsetPath(list.head(paras), sc)),\n offset: so\n },\n e: {\n path: list.tail(dom.makeOffsetPath(list.last(paras), ec)),\n offset: eo\n }\n };\n };\n\n /**\n * getClientRects\n * @return {Rect[]}\n */\n this.getClientRects = function () {\n var nativeRng = nativeRange();\n return nativeRng.getClientRects();\n };\n };\n\n /**\n * @class core.range\n *\n * Data structure\n * * BoundaryPoint: a point of dom tree\n * * BoundaryPoints: two boundaryPoints corresponding to the start and the end of the Range\n *\n * See to http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Position\n *\n * @singleton\n * @alternateClassName range\n */\n return {\n /**\n * @method\n * \n * create Range Object From arguments or Browser Selection\n *\n * @param {Node} sc - start container\n * @param {Number} so - start offset\n * @param {Node} ec - end container\n * @param {Number} eo - end offset\n * @return {WrappedRange}\n */\n create : function (sc, so, ec, eo) {\n if (!arguments.length) { // from Browser Selection\n if (agent.isW3CRangeSupport) {\n var selection = document.getSelection();\n if (!selection || selection.rangeCount === 0) {\n return null;\n } else if (dom.isBody(selection.anchorNode)) {\n // Firefox: returns entire body as range on initialization. We won't never need it.\n return null;\n }\n \n var nativeRng = selection.getRangeAt(0);\n sc = nativeRng.startContainer;\n so = nativeRng.startOffset;\n ec = nativeRng.endContainer;\n eo = nativeRng.endOffset;\n } else { // IE8: TextRange\n var textRange = document.selection.createRange();\n var textRangeEnd = textRange.duplicate();\n textRangeEnd.collapse(false);\n var textRangeStart = textRange;\n textRangeStart.collapse(true);\n \n var startPoint = textRangeToPoint(textRangeStart, true),\n endPoint = textRangeToPoint(textRangeEnd, false);\n\n // same visible point case: range was collapsed.\n if (dom.isText(startPoint.node) && dom.isLeftEdgePoint(startPoint) &&\n dom.isTextNode(endPoint.node) && dom.isRightEdgePoint(endPoint) &&\n endPoint.node.nextSibling === startPoint.node) {\n startPoint = endPoint;\n }\n\n sc = startPoint.cont;\n so = startPoint.offset;\n ec = endPoint.cont;\n eo = endPoint.offset;\n }\n } else if (arguments.length === 2) { //collapsed\n ec = sc;\n eo = so;\n }\n return new WrappedRange(sc, so, ec, eo);\n },\n\n /**\n * @method \n * \n * create WrappedRange from node\n *\n * @param {Node} node\n * @return {WrappedRange}\n */\n createFromNode: function (node) {\n var sc = node;\n var so = 0;\n var ec = node;\n var eo = dom.nodeLength(ec);\n\n // browsers can't target a picture or void node\n if (dom.isVoid(sc)) {\n so = dom.listPrev(sc).length - 1;\n sc = sc.parentNode;\n }\n if (dom.isBR(ec)) {\n eo = dom.listPrev(ec).length - 1;\n ec = ec.parentNode;\n } else if (dom.isVoid(ec)) {\n eo = dom.listPrev(ec).length;\n ec = ec.parentNode;\n }\n\n return this.create(sc, so, ec, eo);\n },\n\n /**\n * create WrappedRange from node after position\n *\n * @param {Node} node\n * @return {WrappedRange}\n */\n createFromNodeBefore: function (node) {\n return this.createFromNode(node).collapse(true);\n },\n\n /**\n * create WrappedRange from node after position\n *\n * @param {Node} node\n * @return {WrappedRange}\n */\n createFromNodeAfter: function (node) {\n return this.createFromNode(node).collapse();\n },\n\n /**\n * @method \n * \n * create WrappedRange from bookmark\n *\n * @param {Node} editable\n * @param {Object} bookmark\n * @return {WrappedRange}\n */\n createFromBookmark : function (editable, bookmark) {\n var sc = dom.fromOffsetPath(editable, bookmark.s.path);\n var so = bookmark.s.offset;\n var ec = dom.fromOffsetPath(editable, bookmark.e.path);\n var eo = bookmark.e.offset;\n return new WrappedRange(sc, so, ec, eo);\n },\n\n /**\n * @method \n *\n * create WrappedRange from paraBookmark\n *\n * @param {Object} bookmark\n * @param {Node[]} paras\n * @return {WrappedRange}\n */\n createFromParaBookmark: function (bookmark, paras) {\n var so = bookmark.s.offset;\n var eo = bookmark.e.offset;\n var sc = dom.fromOffsetPath(list.head(paras), bookmark.s.path);\n var ec = dom.fromOffsetPath(list.last(paras), bookmark.e.path);\n\n return new WrappedRange(sc, so, ec, eo);\n }\n };\n })();\n\n /**\n * @class core.async\n *\n * Async functions which returns `Promise`\n *\n * @singleton\n * @alternateClassName async\n */\n var async = (function () {\n /**\n * @method readFileAsDataURL\n *\n * read contents of file as representing URL\n *\n * @param {File} file\n * @return {Promise} - then: dataUrl\n */\n var readFileAsDataURL = function (file) {\n return $.Deferred(function (deferred) {\n $.extend(new FileReader(), {\n onload: function (e) {\n var dataURL = e.target.result;\n deferred.resolve(dataURL);\n },\n onerror: function () {\n deferred.reject(this);\n }\n }).readAsDataURL(file);\n }).promise();\n };\n \n /**\n * @method createImage\n *\n * create `<image>` from url string\n *\n * @param {String} sUrl\n * @param {String} filename\n * @return {Promise} - then: $image\n */\n var createImage = function (sUrl, filename) {\n return $.Deferred(function (deferred) {\n var $img = $('<img>');\n\n $img.one('load', function () {\n $img.off('error abort');\n deferred.resolve($img);\n }).one('error abort', function () {\n $img.off('load').detach();\n deferred.reject($img);\n }).css({\n display: 'none'\n }).appendTo(document.body).attr({\n 'src': sUrl,\n 'data-filename': filename\n });\n }).promise();\n };\n\n return {\n readFileAsDataURL: readFileAsDataURL,\n createImage: createImage\n };\n })();\n\n /**\n * @class editing.History\n *\n * Editor History\n *\n */\n var History = function ($editable) {\n var stack = [], stackOffset = -1;\n var editable = $editable[0];\n\n var makeSnapshot = function () {\n var rng = range.create();\n var emptyBookmark = {s: {path: [], offset: 0}, e: {path: [], offset: 0}};\n\n return {\n contents: $editable.html(),\n bookmark: (rng ? rng.bookmark(editable) : emptyBookmark)\n };\n };\n\n var applySnapshot = function (snapshot) {\n if (snapshot.contents !== null) {\n $editable.html(snapshot.contents);\n }\n if (snapshot.bookmark !== null) {\n range.createFromBookmark(editable, snapshot.bookmark).select();\n }\n };\n\n /**\n * @method rewind\n * Rewinds the history stack back to the first snapshot taken.\n * Leaves the stack intact, so that \"Redo\" can still be used.\n */\n this.rewind = function () {\n\n // Create snap shot if not yet recorded\n if ($editable.html() !== stack[stackOffset].contents) {\n this.recordUndo();\n }\n\n // Return to the first available snapshot.\n stackOffset = 0;\n\n // Apply that snapshot.\n applySnapshot(stack[stackOffset]);\n\n };\n\n\n /**\n * @method reset\n * Resets the history stack completely; reverting to an empty editor.\n */\n this.reset = function () {\n\n // Clear the stack.\n stack = [];\n\n // Restore stackOffset to its original value.\n stackOffset = -1;\n\n // Clear the editable area.\n $editable.html('');\n\n // Record our first snapshot (of nothing).\n this.recordUndo();\n\n };\n\n /**\n * undo\n */\n this.undo = function () {\n // Create snap shot if not yet recorded\n if ($editable.html() !== stack[stackOffset].contents) {\n this.recordUndo();\n }\n\n if (0 < stackOffset) {\n stackOffset--;\n applySnapshot(stack[stackOffset]);\n }\n };\n\n /**\n * redo\n */\n this.redo = function () {\n if (stack.length - 1 > stackOffset) {\n stackOffset++;\n applySnapshot(stack[stackOffset]);\n }\n };\n\n /**\n * recorded undo\n */\n this.recordUndo = function () {\n stackOffset++;\n\n // Wash out stack after stackOffset\n if (stack.length > stackOffset) {\n stack = stack.slice(0, stackOffset);\n }\n\n // Create new snapshot and push it to the end\n stack.push(makeSnapshot());\n };\n };\n\n /**\n * @class editing.Style\n *\n * Style\n *\n */\n var Style = function () {\n /**\n * @method jQueryCSS\n *\n * [workaround] for old jQuery\n * passing an array of style properties to .css()\n * will result in an object of property-value pairs.\n * (compability with version < 1.9)\n *\n * @private\n * @param {jQuery} $obj\n * @param {Array} propertyNames - An array of one or more CSS properties.\n * @return {Object}\n */\n var jQueryCSS = function ($obj, propertyNames) {\n if (agent.jqueryVersion < 1.9) {\n var result = {};\n $.each(propertyNames, function (idx, propertyName) {\n result[propertyName] = $obj.css(propertyName);\n });\n return result;\n }\n return $obj.css.call($obj, propertyNames);\n };\n\n /**\n * returns style object from node\n *\n * @param {jQuery} $node\n * @return {Object}\n */\n this.fromNode = function ($node) {\n var properties = ['font-family', 'font-size', 'text-align', 'list-style-type', 'line-height'];\n var styleInfo = jQueryCSS($node, properties) || {};\n styleInfo['font-size'] = parseInt(styleInfo['font-size'], 10);\n return styleInfo;\n };\n\n /**\n * paragraph level style\n *\n * @param {WrappedRange} rng\n * @param {Object} styleInfo\n */\n this.stylePara = function (rng, styleInfo) {\n $.each(rng.nodes(dom.isPara, {\n includeAncestor: true\n }), function (idx, para) {\n $(para).css(styleInfo);\n });\n };\n\n /**\n * insert and returns styleNodes on range.\n *\n * @param {WrappedRange} rng\n * @param {Object} [options] - options for styleNodes\n * @param {String} [options.nodeName] - default: `SPAN`\n * @param {Boolean} [options.expandClosestSibling] - default: `false`\n * @param {Boolean} [options.onlyPartialContains] - default: `false`\n * @return {Node[]}\n */\n this.styleNodes = function (rng, options) {\n rng = rng.splitText();\n\n var nodeName = options && options.nodeName || 'SPAN';\n var expandClosestSibling = !!(options && options.expandClosestSibling);\n var onlyPartialContains = !!(options && options.onlyPartialContains);\n\n if (rng.isCollapsed()) {\n return [rng.insertNode(dom.create(nodeName))];\n }\n\n var pred = dom.makePredByNodeName(nodeName);\n var nodes = rng.nodes(dom.isText, {\n fullyContains: true\n }).map(function (text) {\n return dom.singleChildAncestor(text, pred) || dom.wrap(text, nodeName);\n });\n\n if (expandClosestSibling) {\n if (onlyPartialContains) {\n var nodesInRange = rng.nodes();\n // compose with partial contains predication\n pred = func.and(pred, function (node) {\n return list.contains(nodesInRange, node);\n });\n }\n\n return nodes.map(function (node) {\n var siblings = dom.withClosestSiblings(node, pred);\n var head = list.head(siblings);\n var tails = list.tail(siblings);\n $.each(tails, function (idx, elem) {\n dom.appendChildNodes(head, elem.childNodes);\n dom.remove(elem);\n });\n return list.head(siblings);\n });\n } else {\n return nodes;\n }\n };\n\n /**\n * get current style on cursor\n *\n * @param {WrappedRange} rng\n * @return {Object} - object contains style properties.\n */\n this.current = function (rng) {\n var $cont = $(!dom.isElement(rng.sc) ? rng.sc.parentNode : rng.sc);\n var styleInfo = this.fromNode($cont);\n\n // document.queryCommandState for toggle state\n // [workaround] prevent Firefox nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"\n try {\n styleInfo = $.extend(styleInfo, {\n 'font-bold': document.queryCommandState('bold') ? 'bold' : 'normal',\n 'font-italic': document.queryCommandState('italic') ? 'italic' : 'normal',\n 'font-underline': document.queryCommandState('underline') ? 'underline' : 'normal',\n 'font-subscript': document.queryCommandState('subscript') ? 'subscript' : 'normal',\n 'font-superscript': document.queryCommandState('superscript') ? 'superscript' : 'normal',\n 'font-strikethrough': document.queryCommandState('strikeThrough') ? 'strikethrough' : 'normal'\n });\n } catch (e) {}\n\n // list-style-type to list-style(unordered, ordered)\n if (!rng.isOnList()) {\n styleInfo['list-style'] = 'none';\n } else {\n var orderedTypes = ['circle', 'disc', 'disc-leading-zero', 'square'];\n var isUnordered = $.inArray(styleInfo['list-style-type'], orderedTypes) > -1;\n styleInfo['list-style'] = isUnordered ? 'unordered' : 'ordered';\n }\n\n var para = dom.ancestor(rng.sc, dom.isPara);\n if (para && para.style['line-height']) {\n styleInfo['line-height'] = para.style.lineHeight;\n } else {\n var lineHeight = parseInt(styleInfo['line-height'], 10) / parseInt(styleInfo['font-size'], 10);\n styleInfo['line-height'] = lineHeight.toFixed(1);\n }\n\n styleInfo.anchor = rng.isOnAnchor() && dom.ancestor(rng.sc, dom.isAnchor);\n styleInfo.ancestors = dom.listAncestor(rng.sc, dom.isEditable);\n styleInfo.range = rng;\n\n return styleInfo;\n };\n };\n\n\n /**\n * @class editing.Bullet\n *\n * @alternateClassName Bullet\n */\n var Bullet = function () {\n /**\n * @method insertOrderedList\n *\n * toggle ordered list\n *\n * @type command\n */\n this.insertOrderedList = function () {\n this.toggleList('OL');\n };\n\n /**\n * @method insertUnorderedList\n *\n * toggle unordered list\n *\n * @type command\n */\n this.insertUnorderedList = function () {\n this.toggleList('UL');\n };\n\n /**\n * @method indent\n *\n * indent\n *\n * @type command\n */\n this.indent = function () {\n var self = this;\n var rng = range.create().wrapBodyInlineWithPara();\n\n var paras = rng.nodes(dom.isPara, { includeAncestor: true });\n var clustereds = list.clusterBy(paras, func.peq2('parentNode'));\n\n $.each(clustereds, function (idx, paras) {\n var head = list.head(paras);\n if (dom.isLi(head)) {\n self.wrapList(paras, head.parentNode.nodeName);\n } else {\n $.each(paras, function (idx, para) {\n $(para).css('marginLeft', function (idx, val) {\n return (parseInt(val, 10) || 0) + 25;\n });\n });\n }\n });\n\n rng.select();\n };\n\n /**\n * @method outdent\n *\n * outdent\n *\n * @type command\n */\n this.outdent = function () {\n var self = this;\n var rng = range.create().wrapBodyInlineWithPara();\n\n var paras = rng.nodes(dom.isPara, { includeAncestor: true });\n var clustereds = list.clusterBy(paras, func.peq2('parentNode'));\n\n $.each(clustereds, function (idx, paras) {\n var head = list.head(paras);\n if (dom.isLi(head)) {\n self.releaseList([paras]);\n } else {\n $.each(paras, function (idx, para) {\n $(para).css('marginLeft', function (idx, val) {\n val = (parseInt(val, 10) || 0);\n return val > 25 ? val - 25 : '';\n });\n });\n }\n });\n\n rng.select();\n };\n\n /**\n * @method toggleList\n *\n * toggle list\n *\n * @param {String} listName - OL or UL\n */\n this.toggleList = function (listName) {\n var self = this;\n var rng = range.create().wrapBodyInlineWithPara();\n\n var paras = rng.nodes(dom.isPara, { includeAncestor: true });\n var bookmark = rng.paraBookmark(paras);\n var clustereds = list.clusterBy(paras, func.peq2('parentNode'));\n\n // paragraph to list\n if (list.find(paras, dom.isPurePara)) {\n var wrappedParas = [];\n $.each(clustereds, function (idx, paras) {\n wrappedParas = wrappedParas.concat(self.wrapList(paras, listName));\n });\n paras = wrappedParas;\n // list to paragraph or change list style\n } else {\n var diffLists = rng.nodes(dom.isList, {\n includeAncestor: true\n }).filter(function (listNode) {\n return !$.nodeName(listNode, listName);\n });\n\n if (diffLists.length) {\n $.each(diffLists, function (idx, listNode) {\n dom.replace(listNode, listName);\n });\n } else {\n paras = this.releaseList(clustereds, true);\n }\n }\n\n range.createFromParaBookmark(bookmark, paras).select();\n };\n\n /**\n * @method wrapList\n *\n * @param {Node[]} paras\n * @param {String} listName\n * @return {Node[]}\n */\n this.wrapList = function (paras, listName) {\n var head = list.head(paras);\n var last = list.last(paras);\n\n var prevList = dom.isList(head.previousSibling) && head.previousSibling;\n var nextList = dom.isList(last.nextSibling) && last.nextSibling;\n\n var listNode = prevList || dom.insertAfter(dom.create(listName || 'UL'), last);\n\n // P to LI\n paras = paras.map(function (para) {\n return dom.isPurePara(para) ? dom.replace(para, 'LI') : para;\n });\n\n // append to list(<ul>, <ol>)\n dom.appendChildNodes(listNode, paras);\n\n if (nextList) {\n dom.appendChildNodes(listNode, list.from(nextList.childNodes));\n dom.remove(nextList);\n }\n\n return paras;\n };\n\n /**\n * @method releaseList\n *\n * @param {Array[]} clustereds\n * @param {Boolean} isEscapseToBody\n * @return {Node[]}\n */\n this.releaseList = function (clustereds, isEscapseToBody) {\n var releasedParas = [];\n\n $.each(clustereds, function (idx, paras) {\n var head = list.head(paras);\n var last = list.last(paras);\n\n var headList = isEscapseToBody ? dom.lastAncestor(head, dom.isList) :\n head.parentNode;\n var lastList = headList.childNodes.length > 1 ? dom.splitTree(headList, {\n node: last.parentNode,\n offset: dom.position(last) + 1\n }, {\n isSkipPaddingBlankHTML: true\n }) : null;\n\n var middleList = dom.splitTree(headList, {\n node: head.parentNode,\n offset: dom.position(head)\n }, {\n isSkipPaddingBlankHTML: true\n });\n\n paras = isEscapseToBody ? dom.listDescendant(middleList, dom.isLi) :\n list.from(middleList.childNodes).filter(dom.isLi);\n\n // LI to P\n if (isEscapseToBody || !dom.isList(headList.parentNode)) {\n paras = paras.map(function (para) {\n return dom.replace(para, 'P');\n });\n }\n\n $.each(list.from(paras).reverse(), function (idx, para) {\n dom.insertAfter(para, headList);\n });\n\n // remove empty lists\n var rootLists = list.compact([headList, middleList, lastList]);\n $.each(rootLists, function (idx, rootList) {\n var listNodes = [rootList].concat(dom.listDescendant(rootList, dom.isList));\n $.each(listNodes.reverse(), function (idx, listNode) {\n if (!dom.nodeLength(listNode)) {\n dom.remove(listNode, true);\n }\n });\n });\n\n releasedParas = releasedParas.concat(paras);\n });\n\n return releasedParas;\n };\n };\n\n\n /**\n * @class editing.Typing\n *\n * Typing\n *\n */\n var Typing = function () {\n\n // a Bullet instance to toggle lists off\n var bullet = new Bullet();\n\n /**\n * insert tab\n *\n * @param {jQuery} $editable\n * @param {WrappedRange} rng\n * @param {Number} tabsize\n */\n this.insertTab = function ($editable, rng, tabsize) {\n var tab = dom.createText(new Array(tabsize + 1).join(dom.NBSP_CHAR));\n rng = rng.deleteContents();\n rng.insertNode(tab, true);\n\n rng = range.create(tab, tabsize);\n rng.select();\n };\n\n /**\n * insert paragraph\n */\n this.insertParagraph = function () {\n var rng = range.create();\n\n // deleteContents on range.\n rng = rng.deleteContents();\n\n // Wrap range if it needs to be wrapped by paragraph\n rng = rng.wrapBodyInlineWithPara();\n\n // finding paragraph\n var splitRoot = dom.ancestor(rng.sc, dom.isPara);\n\n var nextPara;\n // on paragraph: split paragraph\n if (splitRoot) {\n // if it is an empty line with li\n if (dom.isEmpty(splitRoot) && dom.isLi(splitRoot)) {\n // toogle UL/OL and escape\n bullet.toggleList(splitRoot.parentNode.nodeName);\n return;\n // if it is an empty line with para on blockquote\n } else if (dom.isEmpty(splitRoot) && dom.isPara(splitRoot) && dom.isBlockquote(splitRoot.parentNode)) {\n // escape blockquote\n dom.insertAfter(splitRoot, splitRoot.parentNode);\n nextPara = splitRoot;\n // if new line has content (not a line break)\n } else {\n nextPara = dom.splitTree(splitRoot, rng.getStartPoint());\n\n var emptyAnchors = dom.listDescendant(splitRoot, dom.isEmptyAnchor);\n emptyAnchors = emptyAnchors.concat(dom.listDescendant(nextPara, dom.isEmptyAnchor));\n\n $.each(emptyAnchors, function (idx, anchor) {\n dom.remove(anchor);\n });\n\n // replace empty heading with P tag\n if (dom.isHeading(nextPara) && dom.isEmpty(nextPara)) {\n nextPara = dom.replace(nextPara, 'p');\n }\n }\n // no paragraph: insert empty paragraph\n } else {\n var next = rng.sc.childNodes[rng.so];\n nextPara = $(dom.emptyPara)[0];\n if (next) {\n rng.sc.insertBefore(nextPara, next);\n } else {\n rng.sc.appendChild(nextPara);\n }\n }\n\n range.create(nextPara, 0).normalize().select();\n };\n };\n\n /**\n * @class editing.Table\n *\n * Table\n *\n */\n var Table = function () {\n /**\n * handle tab key\n *\n * @param {WrappedRange} rng\n * @param {Boolean} isShift\n */\n this.tab = function (rng, isShift) {\n var cell = dom.ancestor(rng.commonAncestor(), dom.isCell);\n var table = dom.ancestor(cell, dom.isTable);\n var cells = dom.listDescendant(table, dom.isCell);\n\n var nextCell = list[isShift ? 'prev' : 'next'](cells, cell);\n if (nextCell) {\n range.create(nextCell, 0).select();\n }\n };\n\n /**\n * create empty table element\n *\n * @param {Number} rowCount\n * @param {Number} colCount\n * @return {Node}\n */\n this.createTable = function (colCount, rowCount, options) {\n var tds = [], tdHTML;\n for (var idxCol = 0; idxCol < colCount; idxCol++) {\n tds.push('<td>' + dom.blank + '</td>');\n }\n tdHTML = tds.join('');\n\n var trs = [], trHTML;\n for (var idxRow = 0; idxRow < rowCount; idxRow++) {\n trs.push('<tr>' + tdHTML + '</tr>');\n }\n trHTML = trs.join('');\n var $table = $('<table>' + trHTML + '</table>');\n if (options && options.tableClassName) {\n $table.addClass(options.tableClassName);\n }\n\n return $table[0];\n };\n };\n\n\n var KEY_BOGUS = 'bogus';\n\n /**\n * @class Editor\n */\n var Editor = function (context) {\n var self = this;\n\n var $note = context.layoutInfo.note;\n var $editor = context.layoutInfo.editor;\n var $editable = context.layoutInfo.editable;\n var options = context.options;\n var lang = options.langInfo;\n\n var style = new Style();\n var table = new Table();\n var typing = new Typing();\n var bullet = new Bullet();\n var history = new History($editable);\n\n this.initialize = function () {\n // bind custom events\n $editable.on('keydown', function (event) {\n if (event.keyCode === key.code.ENTER) {\n context.triggerEvent('enter', event);\n }\n context.triggerEvent('keydown', event);\n\n if (options.shortcuts && !event.isDefaultPrevented()) {\n self.handleKeyMap(event);\n }\n }).on('keyup', function (event) {\n context.triggerEvent('keyup', event);\n }).on('focus', function (event) {\n context.triggerEvent('focus', event);\n }).on('blur', function (event) {\n context.triggerEvent('blur', event);\n }).on('mousedown', function (event) {\n context.triggerEvent('mousedown', event);\n }).on('mouseup', function (event) {\n context.triggerEvent('mouseup', event);\n }).on('scroll', function (event) {\n context.triggerEvent('scroll', event);\n }).on('paste', function (event) {\n context.triggerEvent('paste', event);\n });\n\n // [workaround] IE doesn't have input events for contentEditable\n // - see: https://goo.gl/4bfIvA\n var changeEventName = agent.isMSIE ? 'DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted' : 'input';\n $editable.on(changeEventName, function (event) {\n context.triggerEvent('change', event);\n });\n\n $editor.on('focusin', function (event) {\n context.triggerEvent('focusin', event);\n }).on('focusout', function (event) {\n context.triggerEvent('focusout', event);\n });\n\n if (!options.airMode && options.height) {\n $editable.outerHeight(options.height);\n }\n\n $editable.html($note.html());\n history.recordUndo();\n };\n\n this.destroy = function () {\n $editable.off();\n };\n\n this.handleKeyMap = function (event) {\n var keyMap = options.keyMap[agent.isMac ? 'mac' : 'pc'];\n var keys = [];\n\n if (event.metaKey) { keys.push('CMD'); }\n if (event.ctrlKey && !event.altKey) { keys.push('CTRL'); }\n if (event.shiftKey) { keys.push('SHIFT'); }\n\n var keyName = key.nameFromCode[event.keyCode];\n if (keyName) {\n keys.push(keyName);\n }\n\n var eventName = keyMap[keys.join('+')];\n if (eventName) {\n event.preventDefault();\n context.invoke(eventName);\n } else if (key.isEdit(event.keyCode)) {\n this.afterCommand();\n }\n };\n\n /**\n * createRange\n *\n * create range\n * @return {WrappedRange}\n */\n this.createRange = function () {\n this.focus();\n return range.create();\n };\n\n /**\n * saveRange\n *\n * save current range\n *\n * @param {Boolean} [thenCollapse=false]\n */\n this.saveRange = function (thenCollapse) {\n this.focus();\n $editable.data('range', range.create());\n if (thenCollapse) {\n range.create().collapse().select();\n }\n };\n\n /**\n * restoreRange\n *\n * restore lately range\n */\n this.restoreRange = function () {\n var rng = $editable.data('range');\n if (rng) {\n rng.select();\n this.focus();\n }\n };\n\n this.saveTarget = function (node) {\n $editable.data('target', node);\n };\n\n this.clearTarget = function () {\n $editable.removeData('target');\n };\n\n this.restoreTarget = function () {\n return $editable.data('target');\n };\n\n /**\n * currentStyle\n *\n * current style\n * @return {Object|Boolean} unfocus\n */\n this.currentStyle = function () {\n var rng = range.create();\n if (rng) {\n rng = rng.normalize();\n }\n return rng ? style.current(rng) : style.fromNode($editable);\n };\n\n /**\n * style from node\n *\n * @param {jQuery} $node\n * @return {Object}\n */\n this.styleFromNode = function ($node) {\n return style.fromNode($node);\n };\n\n /**\n * undo\n */\n this.undo = function () {\n context.triggerEvent('before.command', $editable.html());\n history.undo();\n context.triggerEvent('change', $editable.html());\n };\n context.memo('help.undo', lang.help.undo);\n\n /**\n * redo\n */\n this.redo = function () {\n context.triggerEvent('before.command', $editable.html());\n history.redo();\n context.triggerEvent('change', $editable.html());\n };\n context.memo('help.redo', lang.help.redo);\n\n this.reset = function () {\n context.triggerEvent('before.command', $editable.html());\n history.reset();\n context.triggerEvent('change', $editable.html());\n };\n\n this.rewind = function () {\n context.triggerEvent('before.command', $editable.html());\n history.rewind();\n context.triggerEvent('change', $editable.html());\n };\n\n /**\n * beforeCommand\n * before command\n */\n var beforeCommand = this.beforeCommand = function () {\n context.triggerEvent('before.command', $editable.html());\n // keep focus on editable before command execution\n self.focus();\n };\n\n /**\n * afterCommand\n * after command\n * @param {Boolean} isPreventTrigger\n */\n var afterCommand = this.afterCommand = function (isPreventTrigger) {\n history.recordUndo();\n if (!isPreventTrigger) {\n context.triggerEvent('change', $editable.html());\n }\n };\n\n /* jshint ignore:start */\n // native commands(with execCommand), generate function for execCommand\n var commands = ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript',\n 'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull',\n 'formatBlock', 'removeFormat',\n 'backColor', 'foreColor', 'fontName'];\n\n for (var idx = 0, len = commands.length; idx < len; idx ++) {\n this[commands[idx]] = (function (sCmd) {\n return function (value) {\n beforeCommand();\n document.execCommand(sCmd, false, value);\n afterCommand(true);\n };\n })(commands[idx]);\n context.memo('help.' + commands[idx], lang.help[commands[idx]]);\n }\n /* jshint ignore:end */\n\n /**\n * tab\n *\n * handle tab key\n */\n this.tab = function () {\n var rng = this.createRange();\n if (rng.isCollapsed() && rng.isOnCell()) {\n table.tab(rng);\n } else {\n beforeCommand();\n typing.insertTab($editable, rng, options.tabSize);\n afterCommand();\n }\n };\n context.memo('help.tab', lang.help.tab);\n\n /**\n * untab\n *\n * handle shift+tab key\n *\n */\n this.untab = function () {\n var rng = this.createRange();\n if (rng.isCollapsed() && rng.isOnCell()) {\n table.tab(rng, true);\n }\n };\n context.memo('help.untab', lang.help.untab);\n\n /**\n * wrapCommand\n *\n * run given function between beforeCommand and afterCommand\n */\n this.wrapCommand = function (fn) {\n return function () {\n beforeCommand();\n fn.apply(self, arguments);\n afterCommand();\n };\n };\n\n /**\n * insertParagraph\n *\n * insert paragraph\n */\n this.insertParagraph = this.wrapCommand(function () {\n typing.insertParagraph($editable);\n });\n context.memo('help.insertParagraph', lang.help.insertParagraph);\n\n /**\n * insertOrderedList\n */\n this.insertOrderedList = this.wrapCommand(function () {\n bullet.insertOrderedList($editable);\n });\n context.memo('help.insertOrderedList', lang.help.insertOrderedList);\n\n this.insertUnorderedList = this.wrapCommand(function () {\n bullet.insertUnorderedList($editable);\n });\n context.memo('help.insertUnorderedList', lang.help.insertUnorderedList);\n\n this.indent = this.wrapCommand(function () {\n bullet.indent($editable);\n });\n context.memo('help.indent', lang.help.indent);\n\n this.outdent = this.wrapCommand(function () {\n bullet.outdent($editable);\n });\n context.memo('help.outdent', lang.help.outdent);\n\n /**\n * insert image\n *\n * @param {String} sUrl\n * @return {Promise}\n */\n this.insertImage = function (sUrl, filename) {\n return async.createImage(sUrl, filename).then(function ($image) {\n beforeCommand();\n $image.css({\n display: '',\n width: Math.min($editable.width(), $image.width())\n });\n range.create().insertNode($image[0]);\n range.createFromNodeAfter($image[0]).select();\n afterCommand();\n }).fail(function () {\n context.triggerEvent('image.upload.error');\n });\n };\n\n /**\n * insertImages\n * @param {File[]} files\n */\n this.insertImages = function (files) {\n $.each(files, function (idx, file) {\n var filename = file.name;\n if (options.maximumImageFileSize && options.maximumImageFileSize < file.size) {\n context.triggerEvent('image.upload.error', lang.image.maximumFileSizeError);\n } else {\n async.readFileAsDataURL(file).then(function (dataURL) {\n return self.insertImage(dataURL, filename);\n }).fail(function () {\n context.triggerEvent('image.upload.error');\n });\n }\n });\n };\n\n /**\n * insertImagesOrCallback\n * @param {File[]} files\n */\n this.insertImagesOrCallback = function (files) {\n var callbacks = options.callbacks;\n\n // If onImageUpload options setted\n if (callbacks.onImageUpload) {\n context.triggerEvent('image.upload', files);\n // else insert Image as dataURL\n } else {\n this.insertImages(files);\n }\n };\n\n /**\n * insertNode\n * insert node\n * @param {Node} node\n */\n this.insertNode = this.wrapCommand(function (node) {\n range.create().insertNode(node);\n range.createFromNodeAfter(node).select();\n });\n\n /**\n * insert text\n * @param {String} text\n */\n this.insertText = this.wrapCommand(function (text) {\n var textNode = range.create().insertNode(dom.createText(text));\n range.create(textNode, dom.nodeLength(textNode)).select();\n });\n\n /**\n * return selected plain text\n * @return {String} text\n */\n this.getSelectedText = function () {\n var rng = this.createRange();\n\n // if range on anchor, expand range with anchor\n if (rng.isOnAnchor()) {\n rng = range.createFromNode(dom.ancestor(rng.sc, dom.isAnchor));\n }\n\n return rng.toString();\n };\n\n /**\n * paste HTML\n * @param {String} markup\n */\n this.pasteHTML = this.wrapCommand(function (markup) {\n var contents = range.create().pasteHTML(markup);\n range.createFromNodeAfter(list.last(contents)).select();\n });\n\n /**\n * formatBlock\n *\n * @param {String} tagName\n */\n this.formatBlock = this.wrapCommand(function (tagName) {\n // [workaround] for MSIE, IE need `<`\n tagName = agent.isMSIE ? '<' + tagName + '>' : tagName;\n document.execCommand('FormatBlock', false, tagName);\n });\n\n this.formatPara = function () {\n this.formatBlock('P');\n };\n context.memo('help.formatPara', lang.help.formatPara);\n\n /* jshint ignore:start */\n for (var idx = 1; idx <= 6; idx ++) {\n this['formatH' + idx] = function (idx) {\n return function () {\n this.formatBlock('H' + idx);\n };\n }(idx);\n context.memo('help.formatH'+idx, lang.help['formatH' + idx]);\n };\n /* jshint ignore:end */\n\n\n /**\n * fontSize\n *\n * @param {String} value - px\n */\n this.fontSize = function (value) {\n this.focus();\n var rng = range.create();\n\n if (rng && rng.isCollapsed()) {\n var spans = style.styleNodes(rng);\n var firstSpan = list.head(spans);\n\n $(spans).css({\n 'font-size': value + 'px'\n });\n\n // [workaround] added styled bogus span for style\n // - also bogus character needed for cursor position\n if (firstSpan && !dom.nodeLength(firstSpan)) {\n firstSpan.innerHTML = dom.ZERO_WIDTH_NBSP_CHAR;\n range.createFromNodeAfter(firstSpan.firstChild).select();\n $editable.data(KEY_BOGUS, firstSpan);\n }\n } else {\n beforeCommand();\n $(style.styleNodes(rng)).css({\n 'font-size': value + 'px'\n });\n afterCommand();\n }\n };\n\n /**\n * insert horizontal rule\n */\n this.insertHorizontalRule = this.wrapCommand(function () {\n var rng = range.create();\n var hrNode = rng.insertNode($('<HR/>')[0]);\n if (hrNode.nextSibling) {\n range.create(hrNode.nextSibling, 0).normalize().select();\n }\n });\n context.memo('help.insertHorizontalRule', lang.help.insertHorizontalRule);\n\n\n /**\n * remove bogus node and character\n */\n this.removeBogus = function () {\n var bogusNode = $editable.data(KEY_BOGUS);\n if (!bogusNode) {\n return;\n }\n\n var textNode = list.find(list.from(bogusNode.childNodes), dom.isText);\n\n var bogusCharIdx = textNode.nodeValue.indexOf(dom.ZERO_WIDTH_NBSP_CHAR);\n if (bogusCharIdx !== -1) {\n textNode.deleteData(bogusCharIdx, 1);\n }\n\n if (dom.isEmpty(bogusNode)) {\n dom.remove(bogusNode);\n }\n\n $editable.removeData(KEY_BOGUS);\n };\n\n /**\n * lineHeight\n * @param {String} value\n */\n this.lineHeight = this.wrapCommand(function (value) {\n style.stylePara(range.create(), {\n lineHeight: value\n });\n });\n\n /**\n * unlink\n *\n * @type command\n */\n this.unlink = function () {\n var rng = this.createRange();\n if (rng.isOnAnchor()) {\n var anchor = dom.ancestor(rng.sc, dom.isAnchor);\n rng = range.createFromNode(anchor);\n rng.select();\n\n beforeCommand();\n document.execCommand('unlink');\n afterCommand();\n }\n };\n\n /**\n * create link (command)\n *\n * @param {Object} linkInfo\n */\n this.createLink = this.wrapCommand(function (linkInfo) {\n var linkUrl = linkInfo.url;\n var linkText = linkInfo.text;\n var isNewWindow = linkInfo.isNewWindow;\n var rng = linkInfo.range || this.createRange();\n var isTextChanged = rng.toString() !== linkText;\n\n if (options.onCreateLink) {\n linkUrl = options.onCreateLink(linkUrl);\n }\n\n var anchors = [];\n if (isTextChanged) {\n // Create a new link when text changed.\n var anchor = rng.insertNode($('<A>' + linkText + '</A>')[0]);\n anchors.push(anchor);\n } else {\n anchors = style.styleNodes(rng, {\n nodeName: 'A',\n expandClosestSibling: true,\n onlyPartialContains: true\n });\n }\n\n $.each(anchors, function (idx, anchor) {\n $(anchor).attr('href', linkUrl);\n if (isNewWindow) {\n $(anchor).attr('target', '_blank');\n } else {\n $(anchor).removeAttr('target');\n }\n });\n\n var startRange = range.createFromNodeBefore(list.head(anchors));\n var startPoint = startRange.getStartPoint();\n var endRange = range.createFromNodeAfter(list.last(anchors));\n var endPoint = endRange.getEndPoint();\n\n range.create(\n startPoint.node,\n startPoint.offset,\n endPoint.node,\n endPoint.offset\n ).select();\n });\n\n /**\n * returns link info\n *\n * @return {Object}\n * @return {WrappedRange} return.range\n * @return {String} return.text\n * @return {Boolean} [return.isNewWindow=true]\n * @return {String} [return.url=\"\"]\n */\n this.getLinkInfo = function () {\n this.focus();\n\n var rng = range.create().expand(dom.isAnchor);\n\n // Get the first anchor on range(for edit).\n var $anchor = $(list.head(rng.nodes(dom.isAnchor)));\n\n return {\n range: rng,\n text: rng.toString(),\n isNewWindow: $anchor.length ? $anchor.attr('target') === '_blank' : false,\n url: $anchor.length ? $anchor.attr('href') : ''\n };\n };\n\n /**\n * setting color\n *\n * @param {Object} sObjColor color code\n * @param {String} sObjColor.foreColor foreground color\n * @param {String} sObjColor.backColor background color\n */\n this.color = this.wrapCommand(function (colorInfo) {\n var foreColor = colorInfo.foreColor;\n var backColor = colorInfo.backColor;\n\n if (foreColor) { document.execCommand('foreColor', false, foreColor); }\n if (backColor) { document.execCommand('backColor', false, backColor); }\n });\n\n /**\n * insert Table\n *\n * @param {String} sDim dimension of table (ex : \"5x5\")\n */\n this.insertTable = this.wrapCommand(function (sDim) {\n var dimension = sDim.split('x');\n\n var rng = range.create().deleteContents();\n rng.insertNode(table.createTable(dimension[0], dimension[1], options));\n });\n\n /**\n * float me\n *\n * @param {String} value\n */\n this.floatMe = this.wrapCommand(function (value) {\n var $target = $(this.restoreTarget());\n $target.css('float', value);\n });\n\n /**\n * resize overlay element\n * @param {String} value\n */\n this.resize = this.wrapCommand(function (value) {\n var $target = $(this.restoreTarget());\n $target.css({\n width: value * 100 + '%',\n height: ''\n });\n });\n\n /**\n * @param {Position} pos\n * @param {jQuery} $target - target element\n * @param {Boolean} [bKeepRatio] - keep ratio\n */\n this.resizeTo = function (pos, $target, bKeepRatio) {\n var imageSize;\n if (bKeepRatio) {\n var newRatio = pos.y / pos.x;\n var ratio = $target.data('ratio');\n imageSize = {\n width: ratio > newRatio ? pos.x : pos.y / ratio,\n height: ratio > newRatio ? pos.x * ratio : pos.y\n };\n } else {\n imageSize = {\n width: pos.x,\n height: pos.y\n };\n }\n\n $target.css(imageSize);\n };\n\n /**\n * remove media object\n */\n this.removeMedia = this.wrapCommand(function () {\n var $target = $(this.restoreTarget()).detach();\n context.triggerEvent('media.delete', $target, $editable);\n });\n\n /**\n * set focus\n */\n this.focus = function () {\n // [workaround] Screen will move when page is scolled in IE.\n // - do focus when not focused\n if (!$editable.is(':focus')) {\n $editable.focus();\n\n // [workaround] for firefox bug http://goo.gl/lVfAaI\n if (!$editable.is(':focus') && agent.isFF) {\n range.createFromNode($editable[0])\n .normalize()\n .collapse()\n .select();\n }\n }\n };\n\n /**\n * returns whether contents is empty or not.\n * @return {Boolean}\n */\n this.isEmpty = function () {\n return dom.isEmpty($editable[0]) || dom.emptyPara === $editable.html();\n };\n };\n\n var Clipboard = function (context) {\n var self = this;\n\n var $editable = context.layoutInfo.editable;\n\n this.events = {\n 'summernote.keydown': function (we, e) {\n if (self.needKeydownHook()) {\n if ((e.ctrlKey || e.metaKey) && e.keyCode === key.code.V) {\n context.invoke('editor.saveRange');\n self.$paste.focus();\n\n setTimeout(function () {\n self.pasteByHook();\n }, 0);\n }\n }\n }\n };\n\n this.needKeydownHook = function () {\n return (agent.isMSIE && agent.browserVersion > 10) || agent.isFF;\n };\n\n this.initialize = function () {\n // [workaround] getting image from clipboard\n // - IE11 and Firefox: CTRL+v hook\n // - Webkit: event.clipboardData\n if (this.needKeydownHook()) {\n this.$paste = $('<div />').attr('contenteditable', true).css({\n position : 'absolute',\n left : -100000,\n opacity : 0\n });\n $editable.before(this.$paste);\n\n this.$paste.on('paste', function (event) {\n context.triggerEvent('paste', event);\n });\n } else {\n $editable.on('paste', this.pasteByEvent);\n }\n };\n\n this.destroy = function () {\n if (this.needKeydownHook()) {\n this.$paste.remove();\n this.$paste = null;\n }\n };\n\n this.pasteByHook = function () {\n var node = this.$paste[0].firstChild;\n\n if (dom.isImg(node)) {\n var dataURI = node.src;\n var decodedData = atob(dataURI.split(',')[1]);\n var array = new Uint8Array(decodedData.length);\n for (var i = 0; i < decodedData.length; i++) {\n array[i] = decodedData.charCodeAt(i);\n }\n\n var blob = new Blob([array], { type : 'image/png' });\n blob.name = 'clipboard.png';\n\n context.invoke('editor.restoreRange');\n context.invoke('editor.focus');\n context.invoke('editor.insertImagesOrCallback', [blob]);\n } else {\n var pasteContent = $('<div />').html(this.$paste.html()).html();\n context.invoke('editor.restoreRange');\n context.invoke('editor.focus');\n\n if (pasteContent) {\n context.invoke('editor.pasteHTML', pasteContent);\n }\n }\n\n this.$paste.empty();\n };\n\n /**\n * paste by clipboard event\n *\n * @param {Event} event\n */\n this.pasteByEvent = function (event) {\n var clipboardData = event.originalEvent.clipboardData;\n if (clipboardData && clipboardData.items && clipboardData.items.length) {\n var item = list.head(clipboardData.items);\n if (item.kind === 'file' && item.type.indexOf('image/') !== -1) {\n context.invoke('editor.insertImagesOrCallback', [item.getAsFile()]);\n }\n context.invoke('editor.afterCommand');\n }\n };\n };\n\n var Dropzone = function (context) {\n var $document = $(document);\n var $editor = context.layoutInfo.editor;\n var $editable = context.layoutInfo.editable;\n var options = context.options;\n var lang = options.langInfo;\n\n var $dropzone = $([\n '<div class=\"note-dropzone\">',\n ' <div class=\"note-dropzone-message\"/>',\n '</div>'\n ].join('')).prependTo($editor);\n\n /**\n * attach Drag and Drop Events\n */\n this.initialize = function () {\n if (options.disableDragAndDrop) {\n // prevent default drop event\n $document.on('drop', function (e) {\n e.preventDefault();\n });\n } else {\n this.attachDragAndDropEvent();\n }\n };\n\n /**\n * attach Drag and Drop Events\n */\n this.attachDragAndDropEvent = function () {\n var collection = $(),\n $dropzoneMessage = $dropzone.find('.note-dropzone-message');\n\n // show dropzone on dragenter when dragging a object to document\n // -but only if the editor is visible, i.e. has a positive width and height\n $document.on('dragenter', function (e) {\n var isCodeview = context.invoke('codeview.isActivated');\n var hasEditorSize = $editor.width() > 0 && $editor.height() > 0;\n if (!isCodeview && !collection.length && hasEditorSize) {\n $editor.addClass('dragover');\n $dropzone.width($editor.width());\n $dropzone.height($editor.height());\n $dropzoneMessage.text(lang.image.dragImageHere);\n }\n collection = collection.add(e.target);\n }).on('dragleave', function (e) {\n collection = collection.not(e.target);\n if (!collection.length) {\n $editor.removeClass('dragover');\n }\n }).on('drop', function () {\n collection = $();\n $editor.removeClass('dragover');\n });\n\n // change dropzone's message on hover.\n $dropzone.on('dragenter', function () {\n $dropzone.addClass('hover');\n $dropzoneMessage.text(lang.image.dropImage);\n }).on('dragleave', function () {\n $dropzone.removeClass('hover');\n $dropzoneMessage.text(lang.image.dragImageHere);\n });\n\n // attach dropImage\n $dropzone.on('drop', function (event) {\n var dataTransfer = event.originalEvent.dataTransfer;\n\n if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {\n event.preventDefault();\n $editable.focus();\n context.invoke('editor.insertImagesOrCallback', dataTransfer.files);\n } else {\n $.each(dataTransfer.types, function (idx, type) {\n var content = dataTransfer.getData(type);\n\n if (type.toLowerCase().indexOf('text') > -1) {\n context.invoke('editor.pasteHTML', content);\n } else {\n $(content).each(function () {\n context.invoke('editor.insertNode', this);\n });\n }\n });\n }\n }).on('dragover', false); // prevent default dragover event\n };\n };\n\n\n var CodeMirror;\n if (agent.hasCodeMirror) {\n if (agent.isSupportAmd) {\n require(['CodeMirror'], function (cm) {\n CodeMirror = cm;\n });\n } else {\n CodeMirror = window.CodeMirror;\n }\n }\n\n /**\n * @class Codeview\n */\n var Codeview = function (context) {\n var $editor = context.layoutInfo.editor;\n var $editable = context.layoutInfo.editable;\n var $codable = context.layoutInfo.codable;\n var options = context.options;\n\n this.sync = function () {\n var isCodeview = this.isActivated();\n if (isCodeview && agent.hasCodeMirror) {\n $codable.data('cmEditor').save();\n }\n };\n\n /**\n * @return {Boolean}\n */\n this.isActivated = function () {\n return $editor.hasClass('codeview');\n };\n\n /**\n * toggle codeview\n */\n this.toggle = function () {\n if (this.isActivated()) {\n this.deactivate();\n } else {\n this.activate();\n }\n context.triggerEvent('codeview.toggled');\n };\n\n /**\n * activate code view\n */\n this.activate = function () {\n $codable.val(dom.html($editable, options.prettifyHtml));\n $codable.height($editable.height());\n\n context.invoke('toolbar.updateCodeview', true);\n $editor.addClass('codeview');\n $codable.focus();\n\n // activate CodeMirror as codable\n if (agent.hasCodeMirror) {\n var cmEditor = CodeMirror.fromTextArea($codable[0], options.codemirror);\n\n // CodeMirror TernServer\n if (options.codemirror.tern) {\n var server = new CodeMirror.TernServer(options.codemirror.tern);\n cmEditor.ternServer = server;\n cmEditor.on('cursorActivity', function (cm) {\n server.updateArgHints(cm);\n });\n }\n\n // CodeMirror hasn't Padding.\n cmEditor.setSize(null, $editable.outerHeight());\n $codable.data('cmEditor', cmEditor);\n }\n };\n\n /**\n * deactivate code view\n */\n this.deactivate = function () {\n // deactivate CodeMirror as codable\n if (agent.hasCodeMirror) {\n var cmEditor = $codable.data('cmEditor');\n $codable.val(cmEditor.getValue());\n cmEditor.toTextArea();\n }\n\n var value = dom.value($codable, options.prettifyHtml) || dom.emptyPara;\n var isChange = $editable.html() !== value;\n\n $editable.html(value);\n $editable.height(options.height ? $codable.height() : 'auto');\n $editor.removeClass('codeview');\n\n if (isChange) {\n context.triggerEvent('change', $editable.html(), $editable);\n }\n\n $editable.focus();\n\n context.invoke('toolbar.updateCodeview', false);\n };\n };\n\n var EDITABLE_PADDING = 24;\n\n var Statusbar = function (context) {\n var $document = $(document);\n var $statusbar = context.layoutInfo.statusbar;\n var $editable = context.layoutInfo.editable;\n var options = context.options;\n\n this.initialize = function () {\n if (options.airMode || options.disableResizeEditor) {\n return;\n }\n\n $statusbar.on('mousedown', function (event) {\n event.preventDefault();\n event.stopPropagation();\n\n var editableTop = $editable.offset().top - $document.scrollTop();\n\n $document.on('mousemove', function (event) {\n var height = event.clientY - (editableTop + EDITABLE_PADDING);\n\n height = (options.minheight > 0) ? Math.max(height, options.minheight) : height;\n height = (options.maxHeight > 0) ? Math.min(height, options.maxHeight) : height;\n\n $editable.height(height);\n }).one('mouseup', function () {\n $document.off('mousemove');\n });\n });\n };\n\n this.destroy = function () {\n $statusbar.off();\n };\n };\n\n var Fullscreen = function (context) {\n var $editor = context.layoutInfo.editor;\n var $toolbar = context.layoutInfo.toolbar;\n var $editable = context.layoutInfo.editable;\n var $codable = context.layoutInfo.codable;\n\n var $window = $(window);\n var $scrollbar = $('html, body');\n\n /**\n * toggle fullscreen\n */\n this.toggle = function () {\n var resize = function (size) {\n $editable.css('height', size.h);\n $codable.css('height', size.h);\n if ($codable.data('cmeditor')) {\n $codable.data('cmeditor').setsize(null, size.h);\n }\n };\n\n $editor.toggleClass('fullscreen');\n var isFullscreen = $editor.hasClass('fullscreen');\n if (isFullscreen) {\n $editable.data('orgHeight', $editable.css('height'));\n\n $window.on('resize', function () {\n resize({\n h: $window.height() - $toolbar.outerHeight()\n });\n }).trigger('resize');\n\n $scrollbar.css('overflow', 'hidden');\n } else {\n $window.off('resize');\n resize({\n h: $editable.data('orgHeight')\n });\n $scrollbar.css('overflow', 'visible');\n }\n\n context.invoke('toolbar.updateFullscreen', isFullscreen);\n };\n };\n\n var Handle = function (context) {\n var self = this;\n\n var $document = $(document);\n var $editingArea = context.layoutInfo.editingArea;\n var options = context.options;\n\n this.events = {\n 'summernote.mousedown': function (we, e) {\n if (self.update(e.target)) {\n e.preventDefault();\n }\n },\n 'summernote.keyup summernote.scroll summernote.change summernote.dialog.shown': function () {\n self.update();\n }\n };\n\n this.initialize = function () {\n this.$handle = $([\n '<div class=\"note-handle\">',\n '<div class=\"note-control-selection\">',\n '<div class=\"note-control-selection-bg\"></div>',\n '<div class=\"note-control-holder note-control-nw\"></div>',\n '<div class=\"note-control-holder note-control-ne\"></div>',\n '<div class=\"note-control-holder note-control-sw\"></div>',\n '<div class=\"',\n (options.disableResizeImage ? 'note-control-holder' : 'note-control-sizing'),\n ' note-control-se\"></div>',\n (options.disableResizeImage ? '' : '<div class=\"note-control-selection-info\"></div>'),\n '</div>',\n '</div>'\n ].join('')).prependTo($editingArea);\n\n this.$handle.on('mousedown', function (event) {\n if (dom.isControlSizing(event.target)) {\n event.preventDefault();\n event.stopPropagation();\n\n var $target = self.$handle.find('.note-control-selection').data('target'),\n posStart = $target.offset(),\n scrollTop = $document.scrollTop();\n\n $document.on('mousemove', function (event) {\n context.invoke('editor.resizeTo', {\n x: event.clientX - posStart.left,\n y: event.clientY - (posStart.top - scrollTop)\n }, $target, !event.shiftKey);\n\n self.update($target[0]);\n }).one('mouseup', function (e) {\n e.preventDefault();\n $document.off('mousemove');\n context.invoke('editor.afterCommand');\n });\n\n if (!$target.data('ratio')) { // original ratio.\n $target.data('ratio', $target.height() / $target.width());\n }\n }\n });\n };\n\n this.destroy = function () {\n this.$handle.remove();\n };\n\n this.update = function (target) {\n var isImage = dom.isImg(target);\n var $selection = this.$handle.find('.note-control-selection');\n\n context.invoke('imagePopover.update', target);\n\n if (isImage) {\n var $image = $(target);\n var pos = $image.position();\n\n // include margin\n var imageSize = {\n w: $image.outerWidth(true),\n h: $image.outerHeight(true)\n };\n\n $selection.css({\n display: 'block',\n left: pos.left,\n top: pos.top,\n width: imageSize.w,\n height: imageSize.h\n }).data('target', $image); // save current image element.\n\n var sizingText = imageSize.w + 'x' + imageSize.h;\n $selection.find('.note-control-selection-info').text(sizingText);\n context.invoke('editor.saveTarget', target);\n } else {\n this.hide();\n }\n\n return isImage;\n };\n\n /**\n * hide\n *\n * @param {jQuery} $handle\n */\n this.hide = function () {\n context.invoke('editor.clearTarget');\n this.$handle.children().hide();\n };\n };\n\n var AutoLink = function (context) {\n var self = this;\n\n var linkPattern = /^(https?:\\/\\/|ssh:\\/\\/|ftp:\\/\\/|file:\\/|www\\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i;\n\n this.events = {\n 'summernote.keyup': function (we, e) {\n if (!e.isDefaultPrevented()) {\n self.handleKeyup(e);\n }\n },\n 'summernote.keydown': function (we, e) {\n self.handleKeydown(e);\n }\n };\n\n this.initialize = function () {\n this.lastWordRange = null;\n };\n\n this.destroy = function () {\n this.lastWordRange = null;\n };\n\n this.replace = function () {\n if (!this.lastWordRange) {\n return;\n }\n\n var keyword = this.lastWordRange.toString();\n\n if (linkPattern.test(keyword)) {\n var node = this.nodeFromKeyword(keyword);\n\n this.lastWordRange.insertNode(node);\n this.lastWordRange = null;\n context.invoke('editor.focus');\n }\n\n };\n\n this.nodeFromKeyword = function (keyword) {\n return $('<a />').html(keyword).attr('href', keyword)[0];\n };\n\n this.handleKeydown = function (e) {\n if (list.contains([key.code.ENTER, key.code.SPACE], e.keyCode)) {\n var wordRange = context.invoke('editor.createRange').getWordRange();\n this.lastWordRange = wordRange;\n }\n };\n\n this.handleKeyup = function (e) {\n if (list.contains([key.code.ENTER, key.code.SPACE], e.keyCode)) {\n this.replace();\n }\n };\n };\n\n /**\n * textarea auto sync.\n */\n var AutoSync = function (context) {\n var $note = context.layoutInfo.note;\n\n this.events = {\n 'summernote.change': function () {\n $note.val(context.invoke('code'));\n }\n };\n\n this.shouldInitialize = function () {\n return dom.isTextarea($note[0]);\n };\n };\n\n var Placeholder = function (context) {\n var self = this;\n var $editingArea = context.layoutInfo.editingArea;\n var options = context.options;\n\n this.events = {\n 'summernote.init summernote.change': function () {\n self.update();\n },\n 'summernote.codeview.toggled': function () {\n self.update();\n }\n };\n\n this.shouldInitialize = function () {\n return !!options.placeholder;\n };\n\n this.initialize = function () {\n this.$placeholder = $('<div class=\"note-placeholder\">');\n this.$placeholder.on('click', function () {\n context.invoke('focus');\n }).text(options.placeholder).prependTo($editingArea);\n };\n\n this.destroy = function () {\n this.$placeholder.remove();\n };\n\n this.update = function () {\n var isShow = !context.invoke('codeview.isActivated') && context.invoke('editor.isEmpty');\n this.$placeholder.toggle(isShow);\n };\n };\n\n var Buttons = function (context) {\n var self = this;\n var ui = $.summernote.ui;\n\n var $toolbar = context.layoutInfo.toolbar;\n var options = context.options;\n var lang = options.langInfo;\n\n var invertedKeyMap = func.invertObject(options.keyMap[agent.isMac ? 'mac' : 'pc']);\n\n var representShortcut = this.representShortcut = function (editorMethod) {\n var shortcut = invertedKeyMap[editorMethod];\n if (agent.isMac) {\n shortcut = shortcut.replace('CMD', '⌘').replace('SHIFT', '⇧');\n }\n\n shortcut = shortcut.replace('BACKSLASH', '\\\\')\n .replace('SLASH', '/')\n .replace('LEFTBRACKET', '[')\n .replace('RIGHTBRACKET', ']');\n\n return ' (' + shortcut + ')';\n };\n\n this.initialize = function () {\n this.addToolbarButtons();\n this.addImagePopoverButtons();\n this.addLinkPopoverButtons();\n };\n\n this.addToolbarButtons = function () {\n context.memo('button.style', function () {\n return ui.buttonGroup([\n ui.button({\n className: 'dropdown-toggle',\n contents: ui.icon(options.icons.magic) + ' ' + ui.icon(options.icons.caret, 'span'),\n tooltip: lang.style.style,\n data: {\n toggle: 'dropdown'\n }\n }),\n ui.dropdown({\n className: 'dropdown-style',\n items: context.options.styleTags,\n click: context.createInvokeHandler('editor.formatBlock')\n })\n ]).render();\n });\n\n context.memo('button.bold', function () {\n return ui.button({\n className: 'note-btn-bold',\n contents: ui.icon(options.icons.bold),\n tooltip: lang.font.bold + representShortcut('bold'),\n click: context.createInvokeHandler('editor.bold')\n }).render();\n });\n\n context.memo('button.italic', function () {\n return ui.button({\n className: 'note-btn-italic',\n contents: ui.icon(options.icons.italic),\n tooltip: lang.font.italic + representShortcut('italic'),\n click: context.createInvokeHandler('editor.italic')\n }).render();\n });\n\n context.memo('button.underline', function () {\n return ui.button({\n className: 'note-btn-underline',\n contents: ui.icon(options.icons.underline),\n tooltip: lang.font.underline + representShortcut('underline'),\n click: context.createInvokeHandler('editor.underline')\n }).render();\n });\n\n context.memo('button.clear', function () {\n return ui.button({\n contents: ui.icon(options.icons.eraser),\n tooltip: lang.font.clear + representShortcut('removeFormat'),\n click: context.createInvokeHandler('editor.removeFormat')\n }).render();\n });\n\n context.memo('button.strikethrough', function () {\n return ui.button({\n contents: ui.icon(options.icons.strikethrough),\n tooltip: lang.font.strikethrough + representShortcut('strikethrough'),\n click: context.createInvokeHandler('editor.strikethrough')\n }).render();\n });\n\n context.memo('button.superscript', function () {\n return ui.button({\n contents: ui.icon(options.icons.superscript),\n tooltip: lang.font.superscript,\n click: context.createInvokeHandler('editor.superscript')\n }).render();\n });\n\n context.memo('button.subscript', function () {\n return ui.button({\n contents: ui.icon(options.icons.subscript),\n tooltip: lang.font.subscript,\n click: context.createInvokeHandler('editor.subscript')\n }).render();\n });\n\n context.memo('button.fontname', function () {\n return ui.buttonGroup([\n ui.button({\n className: 'dropdown-toggle',\n contents: '<span class=\"note-current-fontname\"/> ' + ui.icon(options.icons.caret, 'span'),\n tooltip: lang.font.name,\n data: {\n toggle: 'dropdown'\n }\n }),\n ui.dropdownCheck({\n className: 'dropdown-fontname',\n checkClassName : options.icons.menuCheck,\n items: options.fontNames.filter(function (name) {\n return agent.isFontInstalled(name) ||\n list.contains(options.fontNamesIgnoreCheck, name);\n }),\n click: context.createInvokeHandler('editor.fontName')\n })\n ]).render();\n });\n\n context.memo('button.fontsize', function () {\n return ui.buttonGroup([\n ui.button({\n className: 'dropdown-toggle',\n contents: '<span class=\"note-current-fontsize\"/>' + ui.icon(options.icons.caret, 'span'),\n tooltip: lang.font.size,\n data: {\n toggle: 'dropdown'\n }\n }),\n ui.dropdownCheck({\n className: 'dropdown-fontsize',\n checkClassName : options.icons.menuCheck,\n items: options.fontSizes,\n click: context.createInvokeHandler('editor.fontSize')\n })\n ]).render();\n });\n\n context.memo('button.color', function () {\n return ui.buttonGroup({\n className: 'note-color',\n children: [\n ui.button({\n className : 'note-current-color-button',\n contents: ui.icon(options.icons.font + ' note-recent-color'),\n tooltip: lang.color.recent,\n click: context.createInvokeHandler('editor.color'),\n callback: function ($button) {\n var $recentColor = $button.find('.note-recent-color');\n $recentColor.css({\n 'background-color': 'yellow'\n });\n\n $button.data('value', {\n backColor: 'yellow'\n });\n }\n }),\n ui.button({\n className: 'dropdown-toggle',\n contents: ui.icon(options.icons.caret, 'span'),\n tooltip: lang.color.more,\n data: {\n toggle: 'dropdown'\n }\n }),\n ui.dropdown({\n items: [\n '<li>',\n '<div class=\"btn-group\">',\n ' <div class=\"note-palette-title\">' + lang.color.background + '</div>',\n ' <div class=\"note-color-reset\" data-event=\"backColor\" data-value=\"inherit\">' + lang.color.transparent + '</div>',\n ' <div class=\"note-holder\" data-event=\"backColor\"/>',\n '</div>',\n '<div class=\"btn-group\">',\n ' <div class=\"note-palette-title\">' + lang.color.foreground + '</div>',\n ' <div class=\"note-color-reset\" data-event=\"foreColor\" data-value=\"inherit\">' + lang.color.resetToDefault + '</div>',\n ' <div class=\"note-holder\" data-event=\"foreColor\"/>',\n '</div>',\n '</li>'\n ].join(''),\n callback: function ($dropdown) {\n $dropdown.find('.note-holder').each(function () {\n var $holder = $(this);\n $holder.append(ui.palette({\n colors: options.colors,\n eventName: $holder.data('event')\n }).render());\n });\n },\n click: function (event) {\n var $button = $(event.target);\n var eventName = $button.data('event');\n var value = $button.data('value');\n\n if (eventName && value) {\n var key = eventName === 'backColor' ? 'background-color' : 'color';\n var $color = $button.closest('.note-color').find('.note-recent-color');\n var $currentButton = $button.closest('.note-color').find('.note-current-color-button');\n\n var colorInfo = $currentButton.data('value');\n colorInfo[eventName] = value;\n $color.css(key, value);\n $currentButton.data('value', colorInfo);\n\n context.invoke('editor.' + eventName, value);\n }\n }\n })\n ]\n }).render();\n });\n\n context.memo('button.ol', function () {\n return ui.button({\n contents: ui.icon(options.icons.unorderedlist),\n tooltip: lang.lists.unordered + representShortcut('insertUnorderedList'),\n click: context.createInvokeHandler('editor.insertUnorderedList')\n }).render();\n });\n\n context.memo('button.ul', function () {\n return ui.button({\n contents: ui.icon(options.icons.orderedlist),\n tooltip: lang.lists.ordered + representShortcut('insertOrderedList'),\n click: context.createInvokeHandler('editor.insertOrderedList')\n }).render();\n });\n\n context.memo('button.paragraph', function () {\n return ui.buttonGroup([\n ui.button({\n className: 'dropdown-toggle',\n contents: ui.icon(options.icons.align) + ' ' + ui.icon(options.icons.caret, 'span'),\n tooltip: lang.paragraph.paragraph,\n data: {\n toggle: 'dropdown'\n }\n }),\n ui.dropdown([\n ui.buttonGroup({\n className: 'note-align',\n children: [\n ui.button({\n contents: ui.icon(options.icons.alignLeft),\n tooltip: lang.paragraph.left + representShortcut('justifyLeft'),\n click: context.createInvokeHandler('editor.justifyLeft')\n }),\n ui.button({\n contents: ui.icon(options.icons.alignCenter),\n tooltip: lang.paragraph.center + representShortcut('justifyCenter'),\n click: context.createInvokeHandler('editor.justifyCenter')\n }),\n ui.button({\n contents: ui.icon(options.icons.alignRight),\n tooltip: lang.paragraph.right + representShortcut('justifyRight'),\n click: context.createInvokeHandler('editor.justifyRight')\n }),\n ui.button({\n contents: ui.icon(options.icons.alignJustify),\n tooltip: lang.paragraph.justify + representShortcut('justifyFull'),\n click: context.createInvokeHandler('editor.justifyFull')\n })\n ]\n }),\n ui.buttonGroup({\n className: 'note-list',\n children: [\n ui.button({\n contents: ui.icon(options.icons.outdent),\n tooltip: lang.paragraph.outdent + representShortcut('outdent'),\n click: context.createInvokeHandler('editor.outdent')\n }),\n ui.button({\n contents: ui.icon(options.icons.indent),\n tooltip: lang.paragraph.indent + representShortcut('indent'),\n click: context.createInvokeHandler('editor.indent')\n })\n ]\n })\n ])\n ]).render();\n });\n\n context.memo('button.height', function () {\n return ui.buttonGroup([\n ui.button({\n className: 'dropdown-toggle',\n contents: ui.icon(options.icons.textHeight) + ' ' + ui.icon(options.icons.caret, 'span'),\n tooltip: lang.font.height,\n data: {\n toggle: 'dropdown'\n }\n }),\n ui.dropdownCheck({\n items: options.lineHeights,\n checkClassName : options.icons.menuCheck,\n className: 'dropdown-line-height',\n click: context.createInvokeHandler('editor.lineHeight')\n })\n ]).render();\n });\n\n context.memo('button.table', function () {\n return ui.buttonGroup([\n ui.button({\n className: 'dropdown-toggle',\n contents: ui.icon(options.icons.table) + ' ' + ui.icon(options.icons.caret, 'span'),\n tooltip: lang.table.table,\n data: {\n toggle: 'dropdown'\n }\n }),\n ui.dropdown({\n className: 'note-table',\n items: [\n '<div class=\"note-dimension-picker\">',\n ' <div class=\"note-dimension-picker-mousecatcher\" data-event=\"insertTable\" data-value=\"1x1\"/>',\n ' <div class=\"note-dimension-picker-highlighted\"/>',\n ' <div class=\"note-dimension-picker-unhighlighted\"/>',\n '</div>',\n '<div class=\"note-dimension-display\">1 x 1</div>'\n ].join('')\n })\n ], {\n callback: function ($node) {\n var $catcher = $node.find('.note-dimension-picker-mousecatcher');\n $catcher.css({\n width: options.insertTableMaxSize.col + 'em',\n height: options.insertTableMaxSize.row + 'em'\n }).mousedown(context.createInvokeHandler('editor.insertTable'))\n .on('mousemove', self.tableMoveHandler);\n }\n }).render();\n });\n\n context.memo('button.link', function () {\n return ui.button({\n contents: ui.icon(options.icons.link),\n tooltip: lang.link.link,\n click: context.createInvokeHandler('linkDialog.show')\n }).render();\n });\n\n context.memo('button.picture', function () {\n return ui.button({\n contents: ui.icon(options.icons.picture),\n tooltip: lang.image.image,\n click: context.createInvokeHandler('imageDialog.show')\n }).render();\n });\n\n context.memo('button.video', function () {\n return ui.button({\n contents: ui.icon(options.icons.video),\n tooltip: lang.video.video,\n click: context.createInvokeHandler('videoDialog.show')\n }).render();\n });\n\n context.memo('button.hr', function () {\n return ui.button({\n contents: ui.icon(options.icons.minus),\n tooltip: lang.hr.insert + representShortcut('insertHorizontalRule'),\n click: context.createInvokeHandler('editor.insertHorizontalRule')\n }).render();\n });\n\n context.memo('button.fullscreen', function () {\n return ui.button({\n className: 'btn-fullscreen',\n contents: ui.icon(options.icons.arrowsAlt),\n tooltip: lang.options.fullscreen,\n click: context.createInvokeHandler('fullscreen.toggle')\n }).render();\n });\n\n context.memo('button.codeview', function () {\n return ui.button({\n className: 'btn-codeview',\n contents: ui.icon(options.icons.code),\n tooltip: lang.options.codeview,\n click: context.createInvokeHandler('codeview.toggle')\n }).render();\n });\n\n context.memo('button.redo', function () {\n return ui.button({\n contents: ui.icon(options.icons.redo),\n tooltip: lang.history.redo + representShortcut('redo'),\n click: context.createInvokeHandler('editor.redo')\n }).render();\n });\n\n context.memo('button.undo', function () {\n return ui.button({\n contents: ui.icon(options.icons.undo),\n tooltip: lang.history.undo + representShortcut('undo'),\n click: context.createInvokeHandler('editor.undo')\n }).render();\n });\n\n context.memo('button.help', function () {\n return ui.button({\n contents: ui.icon(options.icons.question),\n tooltip: lang.options.help,\n click: context.createInvokeHandler('helpDialog.show')\n }).render();\n });\n };\n\n /**\n * image : [\n * ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],\n * ['float', ['floatLeft', 'floatRight', 'floatNone' ]],\n * ['remove', ['removeMedia']]\n * ],\n */\n this.addImagePopoverButtons = function () {\n // Image Size Buttons\n context.memo('button.imageSize100', function () {\n return ui.button({\n contents: '<span class=\"note-fontsize-10\">100%</span>',\n tooltip: lang.image.resizeFull,\n click: context.createInvokeHandler('editor.resize', '1')\n }).render();\n });\n context.memo('button.imageSize50', function () {\n return ui.button({\n contents: '<span class=\"note-fontsize-10\">50%</span>',\n tooltip: lang.image.resizeHalf,\n click: context.createInvokeHandler('editor.resize', '0.5')\n }).render();\n });\n context.memo('button.imageSize25', function () {\n return ui.button({\n contents: '<span class=\"note-fontsize-10\">25%</span>',\n tooltip: lang.image.resizeQuarter,\n click: context.createInvokeHandler('editor.resize', '0.25')\n }).render();\n });\n\n // Float Buttons\n context.memo('button.floatLeft', function () {\n return ui.button({\n contents: ui.icon(options.icons.alignLeft),\n tooltip: lang.image.floatLeft,\n click: context.createInvokeHandler('editor.floatMe', 'left')\n }).render();\n });\n\n context.memo('button.floatRight', function () {\n return ui.button({\n contents: ui.icon(options.icons.alignRight),\n tooltip: lang.image.floatRight,\n click: context.createInvokeHandler('editor.floatMe', 'right')\n }).render();\n });\n\n context.memo('button.floatNone', function () {\n return ui.button({\n contents: ui.icon(options.icons.alignJustify),\n tooltip: lang.image.floatNone,\n click: context.createInvokeHandler('editor.floatMe', 'none')\n }).render();\n });\n\n // Remove Buttons\n context.memo('button.removeMedia', function () {\n return ui.button({\n contents: ui.icon(options.icons.trash),\n tooltip: lang.image.remove,\n click: context.createInvokeHandler('editor.removeMedia')\n }).render();\n });\n };\n\n this.addLinkPopoverButtons = function () {\n context.memo('button.linkDialogShow', function () {\n return ui.button({\n contents: ui.icon(options.icons.link),\n tooltip: lang.link.edit,\n click: context.createInvokeHandler('linkDialog.show')\n }).render();\n });\n\n context.memo('button.unlink', function () {\n return ui.button({\n contents: ui.icon(options.icons.unlink),\n tooltip: lang.link.unlink,\n click: context.createInvokeHandler('editor.unlink')\n }).render();\n });\n };\n\n this.build = function ($container, groups) {\n for (var groupIdx = 0, groupLen = groups.length; groupIdx < groupLen; groupIdx++) {\n var group = groups[groupIdx];\n var groupName = group[0];\n var buttons = group[1];\n\n var $group = ui.buttonGroup({\n className: 'note-' + groupName\n }).render();\n\n for (var idx = 0, len = buttons.length; idx < len; idx++) {\n var button = context.memo('button.' + buttons[idx]);\n if (button) {\n $group.append(typeof button === 'function' ? button(context) : button);\n }\n }\n $group.appendTo($container);\n }\n };\n\n this.updateCurrentStyle = function () {\n var styleInfo = context.invoke('editor.currentStyle');\n this.updateBtnStates({\n '.note-btn-bold': function () {\n return styleInfo['font-bold'] === 'bold';\n },\n '.note-btn-italic': function () {\n return styleInfo['font-italic'] === 'italic';\n },\n '.note-btn-underline': function () {\n return styleInfo['font-underline'] === 'underline';\n }\n });\n\n if (styleInfo['font-family']) {\n var fontNames = styleInfo['font-family'].split(',').map(function (name) {\n return name.replace(/[\\'\\\"]/g, '')\n .replace(/\\s+$/, '')\n .replace(/^\\s+/, '');\n });\n var fontName = list.find(fontNames, function (name) {\n return agent.isFontInstalled(name) ||\n list.contains(options.fontNamesIgnoreCheck, name);\n });\n\n $toolbar.find('.dropdown-fontname li a').each(function () {\n // always compare string to avoid creating another func.\n var isChecked = ($(this).data('value') + '') === (fontName + '');\n this.className = isChecked ? 'checked' : '';\n });\n $toolbar.find('.note-current-fontname').text(fontName);\n }\n\n if (styleInfo['font-size']) {\n var fontSize = styleInfo['font-size'];\n $toolbar.find('.dropdown-fontsize li a').each(function () {\n // always compare with string to avoid creating another func.\n var isChecked = ($(this).data('value') + '') === (fontSize + '');\n this.className = isChecked ? 'checked' : '';\n });\n $toolbar.find('.note-current-fontsize').text(fontSize);\n }\n\n if (styleInfo['line-height']) {\n var lineHeight = styleInfo['line-height'];\n $toolbar.find('.dropdown-line-height li a').each(function () {\n // always compare with string to avoid creating another func.\n var isChecked = ($(this).data('value') + '') === (lineHeight + '');\n this.className = isChecked ? 'checked' : '';\n });\n }\n };\n\n this.updateBtnStates = function (infos) {\n $.each(infos, function (selector, pred) {\n ui.toggleBtnActive($toolbar.find(selector), pred());\n });\n };\n\n this.tableMoveHandler = function (event) {\n var PX_PER_EM = 18;\n var $picker = $(event.target.parentNode); // target is mousecatcher\n var $dimensionDisplay = $picker.next();\n var $catcher = $picker.find('.note-dimension-picker-mousecatcher');\n var $highlighted = $picker.find('.note-dimension-picker-highlighted');\n var $unhighlighted = $picker.find('.note-dimension-picker-unhighlighted');\n\n var posOffset;\n // HTML5 with jQuery - e.offsetX is undefined in Firefox\n if (event.offsetX === undefined) {\n var posCatcher = $(event.target).offset();\n posOffset = {\n x: event.pageX - posCatcher.left,\n y: event.pageY - posCatcher.top\n };\n } else {\n posOffset = {\n x: event.offsetX,\n y: event.offsetY\n };\n }\n\n var dim = {\n c: Math.ceil(posOffset.x / PX_PER_EM) || 1,\n r: Math.ceil(posOffset.y / PX_PER_EM) || 1\n };\n\n $highlighted.css({ width: dim.c + 'em', height: dim.r + 'em' });\n $catcher.data('value', dim.c + 'x' + dim.r);\n\n if (3 < dim.c && dim.c < options.insertTableMaxSize.col) {\n $unhighlighted.css({ width: dim.c + 1 + 'em'});\n }\n\n if (3 < dim.r && dim.r < options.insertTableMaxSize.row) {\n $unhighlighted.css({ height: dim.r + 1 + 'em'});\n }\n\n $dimensionDisplay.html(dim.c + ' x ' + dim.r);\n };\n };\n\n var Toolbar = function (context) {\n var ui = $.summernote.ui;\n\n var $note = context.layoutInfo.note;\n var $toolbar = context.layoutInfo.toolbar;\n var options = context.options;\n\n this.shouldInitialize = function () {\n return !options.airMode;\n };\n\n this.initialize = function () {\n options.toolbar = options.toolbar || [];\n\n if (!options.toolbar.length) {\n $toolbar.hide();\n } else {\n context.invoke('buttons.build', $toolbar, options.toolbar);\n }\n\n $note.on('summernote.keyup summernote.mouseup summernote.change', function () {\n context.invoke('buttons.updateCurrentStyle');\n });\n\n context.invoke('buttons.updateCurrentStyle');\n };\n\n this.destroy = function () {\n $toolbar.children().remove();\n };\n\n this.updateFullscreen = function (isFullscreen) {\n ui.toggleBtnActive($toolbar.find('.btn-fullscreen'), isFullscreen);\n };\n\n this.updateCodeview = function (isCodeview) {\n ui.toggleBtnActive($toolbar.find('.btn-codeview'), isCodeview);\n if (isCodeview) {\n this.deactivate();\n } else {\n this.activate();\n }\n };\n\n this.activate = function () {\n var $btn = $toolbar.find('button').not('.btn-codeview');\n ui.toggleBtn($btn, true);\n };\n\n this.deactivate = function () {\n var $btn = $toolbar.find('button').not('.btn-codeview');\n ui.toggleBtn($btn, false);\n };\n };\n\n var LinkDialog = function (context) {\n var self = this;\n var ui = $.summernote.ui;\n\n var $editor = context.layoutInfo.editor;\n var options = context.options;\n var lang = options.langInfo;\n\n this.initialize = function () {\n var $container = options.dialogsInBody ? $(document.body) : $editor;\n\n var body = '<div class=\"form-group\">' +\n '<label>' + lang.link.textToDisplay + '</label>' +\n '<input class=\"note-link-text form-control\" type=\"text\" />' +\n '</div>' +\n '<div class=\"form-group\">' +\n '<label>' + lang.link.url + '</label>' +\n '<input class=\"note-link-url form-control\" type=\"text\" value=\"http://\" />' +\n '</div>' +\n (!options.disableLinkTarget ?\n '<div class=\"checkbox\">' +\n '<label>' + '<input type=\"checkbox\" checked> ' + lang.link.openInNewWindow + '</label>' +\n '</div>' : ''\n );\n var footer = '<button href=\"#\" class=\"btn btn-primary note-link-btn disabled\" disabled>' + lang.link.insert + '</button>';\n\n this.$dialog = ui.dialog({\n className: 'link-dialog',\n title: lang.link.insert,\n body: body,\n footer: footer\n }).render().appendTo($container);\n };\n\n this.destroy = function () {\n ui.hideDialog(this.$dialog);\n this.$dialog.remove();\n };\n\n this.bindEnterKey = function ($input, $btn) {\n $input.on('keypress', function (event) {\n if (event.keyCode === key.code.ENTER) {\n $btn.trigger('click');\n }\n });\n };\n\n /**\n * Show link dialog and set event handlers on dialog controls.\n *\n * @param {Object} linkInfo\n * @return {Promise}\n */\n this.showLinkDialog = function (linkInfo) {\n return $.Deferred(function (deferred) {\n var $linkText = self.$dialog.find('.note-link-text'),\n $linkUrl = self.$dialog.find('.note-link-url'),\n $linkBtn = self.$dialog.find('.note-link-btn'),\n $openInNewWindow = self.$dialog.find('input[type=checkbox]');\n\n ui.onDialogShown(self.$dialog, function () {\n context.triggerEvent('dialog.shown');\n\n $linkText.val(linkInfo.text);\n\n $linkText.on('input', function () {\n ui.toggleBtn($linkBtn, $linkText.val() && $linkUrl.val());\n // if linktext was modified by keyup,\n // stop cloning text from linkUrl\n linkInfo.text = $linkText.val();\n });\n\n // if no url was given, copy text to url\n if (!linkInfo.url) {\n linkInfo.url = linkInfo.text || 'http://';\n ui.toggleBtn($linkBtn, linkInfo.text);\n }\n\n $linkUrl.on('input', function () {\n ui.toggleBtn($linkBtn, $linkText.val() && $linkUrl.val());\n // display same link on `Text to display` input\n // when create a new link\n if (!linkInfo.text) {\n $linkText.val($linkUrl.val());\n }\n }).val(linkInfo.url).trigger('focus');\n\n self.bindEnterKey($linkUrl, $linkBtn);\n self.bindEnterKey($linkText, $linkBtn);\n\n $openInNewWindow.prop('checked', linkInfo.isNewWindow);\n\n $linkBtn.one('click', function (event) {\n event.preventDefault();\n\n deferred.resolve({\n range: linkInfo.range,\n url: $linkUrl.val(),\n text: $linkText.val(),\n isNewWindow: $openInNewWindow.is(':checked')\n });\n self.$dialog.modal('hide');\n });\n });\n\n ui.onDialogHidden(self.$dialog, function () {\n // detach events\n $linkText.off('input keypress');\n $linkUrl.off('input keypress');\n $linkBtn.off('click');\n\n if (deferred.state() === 'pending') {\n deferred.reject();\n }\n });\n\n ui.showDialog(self.$dialog);\n }).promise();\n };\n\n /**\n * @param {Object} layoutInfo\n */\n this.show = function () {\n var linkInfo = context.invoke('editor.getLinkInfo');\n\n context.invoke('editor.saveRange');\n this.showLinkDialog(linkInfo).then(function (linkInfo) {\n context.invoke('editor.restoreRange');\n context.invoke('editor.createLink', linkInfo);\n }).fail(function () {\n context.invoke('editor.restoreRange');\n });\n };\n context.memo('help.linkDialog.show', options.langInfo.help['linkDialog.show']);\n };\n\n var LinkPopover = function (context) {\n var self = this;\n var ui = $.summernote.ui;\n\n var options = context.options;\n\n this.events = {\n 'summernote.keyup summernote.mouseup summernote.change summernote.scroll': function () {\n self.update();\n },\n 'summernote.dialog.shown': function () {\n self.hide();\n }\n };\n\n this.shouldInitailize = function () {\n return !list.isEmpty(options.popover.link);\n };\n\n this.initialize = function () {\n this.$popover = ui.popover({\n className: 'note-link-popover',\n callback: function ($node) {\n var $content = $node.find('.popover-content');\n $content.prepend('<span><a target=\"_blank\"></a> </span>');\n }\n }).render().appendTo('body');\n var $content = this.$popover.find('.popover-content');\n\n context.invoke('buttons.build', $content, options.popover.link);\n };\n\n this.destroy = function () {\n this.$popover.remove();\n };\n\n this.update = function () {\n var rng = context.invoke('editor.createRange');\n if (rng.isCollapsed() && rng.isOnAnchor()) {\n var anchor = dom.ancestor(rng.sc, dom.isAnchor);\n var href = $(anchor).attr('href');\n this.$popover.find('a').attr('href', href).html(href);\n\n var pos = dom.posFromPlaceholder(anchor);\n this.$popover.css({\n display: 'block',\n left: pos.left,\n top: pos.top\n });\n } else {\n this.hide();\n }\n };\n\n this.hide = function () {\n this.$popover.hide();\n };\n };\n\n var ImageDialog = function (context) {\n var self = this;\n var ui = $.summernote.ui;\n\n var $editor = context.layoutInfo.editor;\n var options = context.options;\n var lang = options.langInfo;\n\n this.initialize = function () {\n var $container = options.dialogsInBody ? $(document.body) : $editor;\n\n var imageLimitation = '';\n if (options.maximumImageFileSize) {\n var unit = Math.floor(Math.log(options.maximumImageFileSize) / Math.log(1024));\n var readableSize = (options.maximumImageFileSize / Math.pow(1024, unit)).toFixed(2) * 1 +\n ' ' + ' KMGTP'[unit] + 'B';\n imageLimitation = '<small>' + lang.image.maximumFileSize + ' : ' + readableSize + '</small>';\n }\n\n var body = '<div class=\"form-group note-group-select-from-files\">' +\n '<label>' + lang.image.selectFromFiles + '</label>' +\n '<input class=\"note-image-input form-control\" type=\"file\" name=\"files\" accept=\"image/*\" multiple=\"multiple\" />' +\n imageLimitation +\n '</div>' +\n '<div class=\"form-group\" style=\"overflow:auto;\">' +\n '<label>' + lang.image.url + '</label>' +\n '<input class=\"note-image-url form-control col-md-12\" type=\"text\" />' +\n '</div>';\n var footer = '<button href=\"#\" class=\"btn btn-primary note-image-btn disabled\" disabled>' + lang.image.insert + '</button>';\n\n this.$dialog = ui.dialog({\n title: lang.image.insert,\n body: body,\n footer: footer\n }).render().appendTo($container);\n };\n\n this.destroy = function () {\n ui.hideDialog(this.$dialog);\n this.$dialog.remove();\n };\n\n this.bindEnterKey = function ($input, $btn) {\n $input.on('keypress', function (event) {\n if (event.keyCode === key.code.ENTER) {\n $btn.trigger('click');\n }\n });\n };\n\n this.show = function () {\n context.invoke('editor.saveRange');\n this.showImageDialog().then(function (data) {\n // [workaround] hide dialog before restore range for IE range focus\n ui.hideDialog(self.$dialog);\n context.invoke('editor.restoreRange');\n\n if (typeof data === 'string') { // image url\n context.invoke('editor.insertImage', data);\n } else { // array of files\n context.invoke('editor.insertImagesOrCallback', data);\n }\n }).fail(function () {\n context.invoke('editor.restoreRange');\n });\n };\n\n /**\n * show image dialog\n *\n * @param {jQuery} $dialog\n * @return {Promise}\n */\n this.showImageDialog = function () {\n return $.Deferred(function (deferred) {\n var $imageInput = self.$dialog.find('.note-image-input'),\n $imageUrl = self.$dialog.find('.note-image-url'),\n $imageBtn = self.$dialog.find('.note-image-btn');\n\n ui.onDialogShown(self.$dialog, function () {\n context.triggerEvent('dialog.shown');\n\n // Cloning imageInput to clear element.\n $imageInput.replaceWith($imageInput.clone()\n .on('change', function () {\n deferred.resolve(this.files || this.value);\n })\n .val('')\n );\n\n $imageBtn.click(function (event) {\n event.preventDefault();\n\n deferred.resolve($imageUrl.val());\n });\n\n $imageUrl.on('keyup paste', function () {\n var url = $imageUrl.val();\n ui.toggleBtn($imageBtn, url);\n }).val('').trigger('focus');\n self.bindEnterKey($imageUrl, $imageBtn);\n });\n\n ui.onDialogHidden(self.$dialog, function () {\n $imageInput.off('change');\n $imageUrl.off('keyup paste keypress');\n $imageBtn.off('click');\n\n if (deferred.state() === 'pending') {\n deferred.reject();\n }\n });\n\n ui.showDialog(self.$dialog);\n });\n };\n };\n\n var ImagePopover = function (context) {\n var ui = $.summernote.ui;\n\n var options = context.options;\n\n this.shouldInitialize = function () {\n return !list.isEmpty(options.popover.image);\n };\n\n this.initialize = function () {\n this.$popover = ui.popover({\n className: 'note-image-popover'\n }).render().appendTo('body');\n var $content = this.$popover.find('.popover-content');\n\n context.invoke('buttons.build', $content, options.popover.image);\n };\n\n this.destroy = function () {\n this.$popover.remove();\n };\n\n this.update = function (target) {\n if (dom.isImg(target)) {\n var pos = dom.posFromPlaceholder(target);\n this.$popover.css({\n display: 'block',\n left: pos.left,\n top: pos.top\n });\n } else {\n this.hide();\n }\n };\n\n this.hide = function () {\n this.$popover.hide();\n };\n };\n\n var VideoDialog = function (context) {\n var self = this;\n var ui = $.summernote.ui;\n\n var $editor = context.layoutInfo.editor;\n var options = context.options;\n var lang = options.langInfo;\n\n this.initialize = function () {\n var $container = options.dialogsInBody ? $(document.body) : $editor;\n\n var body = '<div class=\"form-group row-fluid\">' +\n '<label>' + lang.video.url + ' <small class=\"text-muted\">' + lang.video.providers + '</small></label>' +\n '<input class=\"note-video-url form-control span12\" type=\"text\" />' +\n '</div>';\n var footer = '<button href=\"#\" class=\"btn btn-primary note-video-btn disabled\" disabled>' + lang.video.insert + '</button>';\n\n this.$dialog = ui.dialog({\n title: lang.video.insert,\n body: body,\n footer: footer\n }).render().appendTo($container);\n };\n\n this.destroy = function () {\n ui.hideDialog(this.$dialog);\n this.$dialog.remove();\n };\n\n this.bindEnterKey = function ($input, $btn) {\n $input.on('keypress', function (event) {\n if (event.keyCode === key.code.ENTER) {\n $btn.trigger('click');\n }\n });\n };\n\n this.createVideoNode = function (url) {\n // video url patterns(youtube, instagram, vimeo, dailymotion, youku, mp4, ogg, webm)\n var ytRegExp = /^(?:https?:\\/\\/)?(?:www\\.)?(?:youtu\\.be\\/|youtube\\.com\\/(?:embed\\/|v\\/|watch\\?v=|watch\\?.+&v=))((\\w|-){11})(?:\\S+)?$/;\n var ytMatch = url.match(ytRegExp);\n\n var igRegExp = /\\/\\/instagram.com\\/p\\/(.[a-zA-Z0-9_-]*)/;\n var igMatch = url.match(igRegExp);\n\n var vRegExp = /\\/\\/vine.co\\/v\\/(.[a-zA-Z0-9]*)/;\n var vMatch = url.match(vRegExp);\n\n var vimRegExp = /\\/\\/(player.)?vimeo.com\\/([a-z]*\\/)*([0-9]{6,11})[?]?.*/;\n var vimMatch = url.match(vimRegExp);\n\n var dmRegExp = /.+dailymotion.com\\/(video|hub)\\/([^_]+)[^#]*(#video=([^_&]+))?/;\n var dmMatch = url.match(dmRegExp);\n\n var youkuRegExp = /\\/\\/v\\.youku\\.com\\/v_show\\/id_(\\w+)=*\\.html/;\n var youkuMatch = url.match(youkuRegExp);\n\n var mp4RegExp = /^.+.(mp4|m4v)$/;\n var mp4Match = url.match(mp4RegExp);\n\n var oggRegExp = /^.+.(ogg|ogv)$/;\n var oggMatch = url.match(oggRegExp);\n\n var webmRegExp = /^.+.(webm)$/;\n var webmMatch = url.match(webmRegExp);\n\n var $video;\n if (ytMatch && ytMatch[1].length === 11) {\n var youtubeId = ytMatch[1];\n $video = $('<iframe>')\n .attr('frameborder', 0)\n .attr('src', '//www.youtube.com/embed/' + youtubeId)\n .attr('width', '640').attr('height', '360');\n } else if (igMatch && igMatch[0].length) {\n $video = $('<iframe>')\n .attr('frameborder', 0)\n .attr('src', igMatch[0] + '/embed/')\n .attr('width', '612').attr('height', '710')\n .attr('scrolling', 'no')\n .attr('allowtransparency', 'true');\n } else if (vMatch && vMatch[0].length) {\n $video = $('<iframe>')\n .attr('frameborder', 0)\n .attr('src', vMatch[0] + '/embed/simple')\n .attr('width', '600').attr('height', '600')\n .attr('class', 'vine-embed');\n } else if (vimMatch && vimMatch[3].length) {\n $video = $('<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>')\n .attr('frameborder', 0)\n .attr('src', '//player.vimeo.com/video/' + vimMatch[3])\n .attr('width', '640').attr('height', '360');\n } else if (dmMatch && dmMatch[2].length) {\n $video = $('<iframe>')\n .attr('frameborder', 0)\n .attr('src', '//www.dailymotion.com/embed/video/' + dmMatch[2])\n .attr('width', '640').attr('height', '360');\n } else if (youkuMatch && youkuMatch[1].length) {\n $video = $('<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>')\n .attr('frameborder', 0)\n .attr('height', '498')\n .attr('width', '510')\n .attr('src', '//player.youku.com/embed/' + youkuMatch[1]);\n } else if (mp4Match || oggMatch || webmMatch) {\n $video = $('<video controls>')\n .attr('src', url)\n .attr('width', '640').attr('height', '360');\n } else {\n // this is not a known video link. Now what, Cat? Now what?\n return false;\n }\n\n $video.addClass('note-video-clip');\n\n return $video[0];\n };\n\n\n this.show = function () {\n var text = context.invoke('editor.getSelectedText');\n context.invoke('editor.saveRange');\n this.showVideoDialog(text).then(function (url) {\n // [workaround] hide dialog before restore range for IE range focus\n ui.hideDialog(self.$dialog);\n context.invoke('editor.restoreRange');\n\n // build node\n var $node = self.createVideoNode(url);\n\n if ($node) {\n // insert video node\n context.invoke('editor.insertNode', $node);\n }\n }).fail(function () {\n context.invoke('editor.restoreRange');\n });\n };\n\n /**\n * show image dialog\n *\n * @param {jQuery} $dialog\n * @return {Promise}\n */\n this.showVideoDialog = function (text) {\n return $.Deferred(function (deferred) {\n var $videoUrl = self.$dialog.find('.note-video-url'),\n $videoBtn = self.$dialog.find('.note-video-btn');\n\n ui.onDialogShown(self.$dialog, function () {\n context.triggerEvent('dialog.shown');\n\n $videoUrl.val(text).on('input', function () {\n ui.toggleBtn($videoBtn, $videoUrl.val());\n }).trigger('focus');\n\n $videoBtn.click(function (event) {\n event.preventDefault();\n\n deferred.resolve($videoUrl.val());\n });\n\n self.bindEnterKey($videoUrl, $videoBtn);\n });\n\n ui.onDialogHidden(self.$dialog, function () {\n $videoUrl.off('input');\n $videoBtn.off('click');\n\n if (deferred.state() === 'pending') {\n deferred.reject();\n }\n });\n\n ui.showDialog(self.$dialog);\n });\n };\n };\n\n var HelpDialog = function (context) {\n var self = this;\n var ui = $.summernote.ui;\n\n var $editor = context.layoutInfo.editor;\n var options = context.options;\n var lang = options.langInfo;\n\n\n this.createShortCutList = function () {\n var keyMap = options.keyMap[agent.isMac ? 'mac' : 'pc'];\n\n var $list = $('<div />');\n\n Object.keys(keyMap).forEach(function (keyString) {\n var $row = $('<div class=\"help-list-item\"/>');\n\n var command = keyMap[keyString];\n var str = context.memo('help.' + command) ? context.memo('help.' + command) : command;\n var $keyString = $('<label />').css({\n 'width': 180,\n 'max-width': 200,\n 'margin-right': 10\n }).html(keyString);\n var $description = $('<span />').html(str);\n\n $row.html($keyString).append($description);\n\n $list.append($row);\n });\n\n return $list.html();\n };\n\n this.initialize = function () {\n var $container = options.dialogsInBody ? $(document.body) : $editor;\n\n var body = [\n '<p class=\"text-center\">',\n '<a href=\"//summernote.org/\" target=\"_blank\">Summernote 0.7.0</a> · ',\n '<a href=\"//github.com/summernote/summernote\" target=\"_blank\">Project</a> · ',\n '<a href=\"//github.com/summernote/summernote/issues\" target=\"_blank\">Issues</a>',\n '</p>'\n ].join('');\n\n this.$dialog = ui.dialog({\n title: lang.options.help,\n body: this.createShortCutList(),\n footer: body,\n callback: function ($node) {\n $node.find('.modal-body').css({\n 'max-height': 300,\n 'overflow': 'scroll'\n });\n }\n }).render().appendTo($container);\n };\n\n this.destroy = function () {\n ui.hideDialog(this.$dialog);\n this.$dialog.remove();\n };\n\n /**\n * show help dialog\n *\n * @return {Promise}\n */\n this.showHelpDialog = function () {\n return $.Deferred(function (deferred) {\n ui.onDialogHidden(self.$dialog, function () {\n context.triggerEvent('dialog.shown');\n deferred.resolve();\n });\n ui.showDialog(self.$dialog);\n }).promise();\n };\n\n this.show = function () {\n context.invoke('editor.saveRange');\n this.showHelpDialog().then(function () {\n context.invoke('editor.restoreRange');\n });\n };\n };\n\n var AirPopover = function (context) {\n var self = this;\n var ui = $.summernote.ui;\n\n var options = context.options;\n\n var AIR_MODE_POPOVER_X_OFFSET = 20;\n\n this.events = {\n 'summernote.keyup summernote.mouseup summernote.scroll': function () {\n self.update();\n },\n 'summernote.change summernote.dialog.shown': function () {\n self.hide();\n },\n 'summernote.focusout': function (we, e) {\n if (!e.relatedTarget || !dom.ancestor(e.relatedTarget, func.eq(self.$popover[0]))) {\n self.hide();\n }\n }\n };\n\n this.shouldInitialize = function () {\n return options.airMode && !list.isEmpty(options.popover.air);\n };\n\n this.initialize = function () {\n this.$popover = ui.popover({\n className: 'note-air-popover'\n }).render().appendTo('body');\n var $content = this.$popover.find('.popover-content');\n\n context.invoke('buttons.build', $content, options.popover.air);\n };\n\n this.destroy = function () {\n this.$popover.remove();\n };\n\n this.update = function () {\n var styleInfo = context.invoke('editor.currentStyle');\n if (styleInfo.range && !styleInfo.range.isCollapsed()) {\n var rect = list.last(styleInfo.range.getClientRects());\n if (rect) {\n var bnd = func.rect2bnd(rect);\n this.$popover.css({\n display: 'block',\n left: Math.max(bnd.left + bnd.width / 2, 0) - AIR_MODE_POPOVER_X_OFFSET,\n top: bnd.top + bnd.height\n });\n }\n } else {\n this.hide();\n }\n };\n\n this.hide = function () {\n this.$popover.hide();\n };\n };\n\n var HintPopover = function (context) {\n var self = this;\n var ui = $.summernote.ui;\n\n var hint = context.options.hint || [];\n var hints = $.isArray(hint) ? hint : [hint];\n\n this.events = {\n 'summernote.keyup': function (we, e) {\n if (!e.isDefaultPrevented()) {\n self.handleKeyup(e);\n }\n },\n 'summernote.keydown' : function (we, e) {\n self.handleKeydown(e);\n },\n 'summernote.dialog.shown': function () {\n self.hide();\n }\n };\n\n this.shouldInitialize = function () {\n return hints.length > 0;\n };\n\n this.initialize = function () {\n this.lastWordRange = null;\n this.$popover = ui.popover({\n className: 'note-hint-popover'\n }).render().appendTo('body');\n\n this.$content = this.$popover.find('.popover-content');\n\n this.$content.on('click', '.note-hint-item', function () {\n self.$content.find('.active').removeClass('active');\n $(this).addClass('active');\n self.replace();\n });\n };\n\n this.destroy = function () {\n this.$popover.remove();\n };\n\n this.selectItem = function ($item) {\n this.$content.find('.active').removeClass('active');\n $item.addClass('active');\n\n this.$content[0].scrollTop = $item[0].offsetTop - (this.$content.innerHeight() / 2);\n };\n\n this.moveDown = function () {\n var $current = this.$content.find('.note-hint-item.active');\n var $next = $current.next();\n\n if ($next.length) {\n this.selectItem($next);\n } else {\n var $nextGroup = $current.parent().next();\n\n if (!$nextGroup.length) {\n $nextGroup = this.$content.find('.note-hint-group').first();\n }\n\n this.selectItem($nextGroup.find('.note-hint-item').first());\n }\n };\n\n this.moveUp = function () {\n var $current = this.$content.find('.note-hint-item.active');\n var $prev = $current.prev();\n\n if ($prev.length) {\n this.selectItem($prev);\n } else {\n var $prevGroup = $current.parent().prev();\n\n if (!$prevGroup.length) {\n $prevGroup = this.$content.find('.note-hint-group').last();\n }\n\n this.selectItem($prevGroup.find('.note-hint-item').last());\n }\n };\n\n this.replace = function () {\n var $item = this.$content.find('.note-hint-item.active');\n var node = this.nodeFromItem($item);\n this.lastWordRange.insertNode(node);\n range.createFromNode(node).collapse().select();\n\n this.lastWordRange = null;\n this.hide();\n context.invoke('editor.focus');\n };\n\n this.nodeFromItem = function ($item) {\n var hint = hints[$item.data('index')];\n var item = $item.data('item');\n var node = hint.content ? hint.content(item) : item;\n if (typeof node === 'string') {\n node = dom.createText(node);\n }\n return node;\n };\n\n this.createItemTemplates = function (hintIdx, items) {\n var hint = hints[hintIdx];\n return items.map(function (item, idx) {\n var $item = $('<div class=\"note-hint-item\"/>');\n $item.append(hint.template ? hint.template(item) : item + '');\n $item.data({\n 'index': hintIdx,\n 'item': item\n });\n\n if (hintIdx === 0 && idx === 0) {\n $item.addClass('active');\n }\n return $item;\n });\n };\n\n this.handleKeydown = function (e) {\n if (!this.$popover.is(':visible')) {\n return;\n }\n\n if (e.keyCode === key.code.ENTER) {\n e.preventDefault();\n this.replace();\n } else if (e.keyCode === key.code.UP) {\n e.preventDefault();\n this.moveUp();\n } else if (e.keyCode === key.code.DOWN) {\n e.preventDefault();\n this.moveDown();\n }\n };\n\n this.searchKeyword = function (index, keyword, callback) {\n var hint = hints[index];\n if (hint && hint.match.test(keyword) && hint.search) {\n var matches = hint.match.exec(keyword);\n hint.search(matches[1], callback);\n } else {\n callback();\n }\n };\n\n this.createGroup = function (idx, keyword) {\n var $group = $('<div class=\"note-hint-group note-hint-group-' + idx + '\"/>');\n this.searchKeyword(idx, keyword, function (items) {\n items = items || [];\n if (items.length) {\n $group.html(self.createItemTemplates(idx, items));\n self.show();\n }\n });\n\n return $group;\n };\n\n this.handleKeyup = function (e) {\n if (list.contains([key.code.ENTER, key.code.UP, key.code.DOWN], e.keyCode)) {\n if (e.keyCode === key.code.ENTER) {\n if (this.$popover.is(':visible')) {\n return;\n }\n }\n } else {\n var wordRange = context.invoke('editor.createRange').getWordRange();\n var keyword = wordRange.toString();\n if (hints.length && keyword) {\n this.$content.empty();\n\n var bnd = func.rect2bnd(list.last(wordRange.getClientRects()));\n if (bnd) {\n this.$popover.css({\n left: bnd.left,\n top: bnd.top + bnd.height\n }).hide();\n\n this.lastWordRange = wordRange;\n\n hints.forEach(function (hint, idx) {\n if (hint.match.test(keyword)) {\n self.createGroup(idx, keyword).appendTo(self.$content);\n }\n });\n }\n } else {\n this.hide();\n }\n }\n };\n\n this.show = function () {\n this.$popover.show();\n };\n\n this.hide = function () {\n this.$popover.hide();\n };\n };\n\n\n $.summernote = $.extend($.summernote, {\n version: '0.7.0',\n ui: ui,\n\n plugins: {},\n\n options: {\n modules: {\n 'editor': Editor,\n 'clipboard': Clipboard,\n 'dropzone': Dropzone,\n 'codeview': Codeview,\n 'statusbar': Statusbar,\n 'fullscreen': Fullscreen,\n 'handle': Handle,\n // FIXME: HintPopover must be front of autolink\n // - Script error about range when Enter key is pressed on hint popover\n 'hintPopover': HintPopover,\n 'autoLink': AutoLink,\n 'autoSync': AutoSync,\n 'placeholder': Placeholder,\n 'buttons' : Buttons,\n 'toolbar': Toolbar,\n 'linkDialog': LinkDialog,\n 'linkPopover': LinkPopover,\n 'imageDialog': ImageDialog,\n 'imagePopover': ImagePopover,\n 'videoDialog': VideoDialog,\n 'helpDialog': HelpDialog,\n 'airPopover': AirPopover\n },\n\n buttons: {},\n \n lang: 'en-US',\n\n // toolbar\n toolbar: [\n ['style', ['style']],\n ['font', ['bold', 'underline', 'clear']],\n ['fontname', ['fontname']],\n ['color', ['color']],\n ['para', ['ul', 'ol', 'paragraph']],\n ['table', ['table']],\n ['insert', ['link', 'picture', 'video']],\n ['view', ['fullscreen', 'codeview', 'help']]\n ],\n\n // popover\n popover: {\n image: [\n ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],\n ['float', ['floatLeft', 'floatRight', 'floatNone']],\n ['remove', ['removeMedia']]\n ],\n link: [\n ['link', ['linkDialogShow', 'unlink']]\n ],\n air: [\n ['color', ['color']],\n ['font', ['bold', 'underline', 'clear']],\n ['para', ['ul', 'paragraph']],\n ['table', ['table']],\n ['insert', ['link', 'picture']]\n ]\n },\n\n // air mode: inline editor\n airMode: false,\n\n width: null,\n height: null,\n\n focus: false,\n tabSize: 4,\n styleWithSpan: true,\n shortcuts: true,\n textareaAutoSync: true,\n direction: null,\n\n styleTags: ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],\n\n fontNames: [\n 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New',\n 'Helvetica Neue', 'Helvetica', 'Impact', 'Lucida Grande',\n 'Tahoma', 'Times New Roman', 'Verdana'\n ],\n\n fontSizes: ['8', '9', '10', '11', '12', '14', '18', '24', '36'],\n\n // pallete colors(n x n)\n colors: [\n ['#000000', '#424242', '#636363', '#9C9C94', '#CEC6CE', '#EFEFEF', '#F7F7F7', '#FFFFFF'],\n ['#FF0000', '#FF9C00', '#FFFF00', '#00FF00', '#00FFFF', '#0000FF', '#9C00FF', '#FF00FF'],\n ['#F7C6CE', '#FFE7CE', '#FFEFC6', '#D6EFD6', '#CEDEE7', '#CEE7F7', '#D6D6E7', '#E7D6DE'],\n ['#E79C9C', '#FFC69C', '#FFE79C', '#B5D6A5', '#A5C6CE', '#9CC6EF', '#B5A5D6', '#D6A5BD'],\n ['#E76363', '#F7AD6B', '#FFD663', '#94BD7B', '#73A5AD', '#6BADDE', '#8C7BC6', '#C67BA5'],\n ['#CE0000', '#E79439', '#EFC631', '#6BA54A', '#4A7B8C', '#3984C6', '#634AA5', '#A54A7B'],\n ['#9C0000', '#B56308', '#BD9400', '#397B21', '#104A5A', '#085294', '#311873', '#731842'],\n ['#630000', '#7B3900', '#846300', '#295218', '#083139', '#003163', '#21104A', '#4A1031']\n ],\n\n lineHeights: ['1.0', '1.2', '1.4', '1.5', '1.6', '1.8', '2.0', '3.0'],\n\n tableClassName: 'table table-bordered',\n\n insertTableMaxSize: {\n col: 10,\n row: 10\n },\n\n dialogsInBody: false,\n\n maximumImageFileSize: null,\n\n callbacks: {\n onInit: null,\n onFocus: null,\n onBlur: null,\n onEnter: null,\n onKeyup: null,\n onKeydown: null,\n onSubmit: null,\n onImageUpload: null,\n onImageUploadError: null\n },\n\n codemirror: {\n mode: 'text/html',\n htmlMode: true,\n lineNumbers: true\n },\n\n keyMap: {\n pc: {\n 'ENTER': 'insertParagraph',\n 'CTRL+Z': 'undo',\n 'CTRL+Y': 'redo',\n 'TAB': 'tab',\n 'SHIFT+TAB': 'untab',\n 'CTRL+B': 'bold',\n 'CTRL+I': 'italic',\n 'CTRL+U': 'underline',\n 'CTRL+SHIFT+S': 'strikethrough',\n 'CTRL+BACKSLASH': 'removeFormat',\n 'CTRL+SHIFT+L': 'justifyLeft',\n 'CTRL+SHIFT+E': 'justifyCenter',\n 'CTRL+SHIFT+R': 'justifyRight',\n 'CTRL+SHIFT+J': 'justifyFull',\n 'CTRL+SHIFT+NUM7': 'insertUnorderedList',\n 'CTRL+SHIFT+NUM8': 'insertOrderedList',\n 'CTRL+LEFTBRACKET': 'outdent',\n 'CTRL+RIGHTBRACKET': 'indent',\n 'CTRL+NUM0': 'formatPara',\n 'CTRL+NUM1': 'formatH1',\n 'CTRL+NUM2': 'formatH2',\n 'CTRL+NUM3': 'formatH3',\n 'CTRL+NUM4': 'formatH4',\n 'CTRL+NUM5': 'formatH5',\n 'CTRL+NUM6': 'formatH6',\n 'CTRL+ENTER': 'insertHorizontalRule',\n 'CTRL+K': 'linkDialog.show'\n },\n\n mac: {\n 'ENTER': 'insertParagraph',\n 'CMD+Z': 'undo',\n 'CMD+SHIFT+Z': 'redo',\n 'TAB': 'tab',\n 'SHIFT+TAB': 'untab',\n 'CMD+B': 'bold',\n 'CMD+I': 'italic',\n 'CMD+U': 'underline',\n 'CMD+SHIFT+S': 'strikethrough',\n 'CMD+BACKSLASH': 'removeFormat',\n 'CMD+SHIFT+L': 'justifyLeft',\n 'CMD+SHIFT+E': 'justifyCenter',\n 'CMD+SHIFT+R': 'justifyRight',\n 'CMD+SHIFT+J': 'justifyFull',\n 'CMD+SHIFT+NUM7': 'insertUnorderedList',\n 'CMD+SHIFT+NUM8': 'insertOrderedList',\n 'CMD+LEFTBRACKET': 'outdent',\n 'CMD+RIGHTBRACKET': 'indent',\n 'CMD+NUM0': 'formatPara',\n 'CMD+NUM1': 'formatH1',\n 'CMD+NUM2': 'formatH2',\n 'CMD+NUM3': 'formatH3',\n 'CMD+NUM4': 'formatH4',\n 'CMD+NUM5': 'formatH5',\n 'CMD+NUM6': 'formatH6',\n 'CMD+ENTER': 'insertHorizontalRule',\n 'CMD+K': 'linkDialog.show'\n }\n },\n icons: {\n 'align': 'fa fa-align-left',\n 'alignCenter': 'fa fa-align-center',\n 'alignJustify': 'fa fa-align-justify',\n 'alignLeft': 'fa fa-align-left',\n 'alignRight': 'fa fa-align-right',\n 'indent': 'fa fa-indent',\n 'outdent': 'fa fa-outdent',\n 'arrowsAlt': 'fa fa-arrows-alt',\n 'bold': 'fa fa-bold',\n 'caret': 'caret',\n 'circle': 'fa fa-circle',\n 'close': 'fa fa-close',\n 'code': 'fa fa-code',\n 'eraser': 'fa fa-eraser',\n 'font': 'fa fa-font',\n 'frame': 'fa fa-frame',\n 'italic': 'fa fa-italic',\n 'link': 'fa fa-link',\n 'unlink': 'fa fa-chain-broken',\n 'magic': 'fa fa-magic',\n 'menuCheck': 'fa fa-check',\n 'minus': 'fa fa-minus',\n 'orderedlist': 'fa fa-list-ol',\n 'pencil': 'fa fa-pencil',\n 'picture': 'fa fa-picture-o',\n 'question': 'fa fa-question',\n 'redo': 'fa fa-repeat',\n 'square': 'fa fa-square',\n 'strikethrough': 'fa fa-strikethrough',\n 'subscript': 'fa fa-subscript',\n 'superscript': 'fa fa-superscript',\n 'table': 'fa fa-table',\n 'textHeight': 'fa fa-text-height',\n 'trash': 'fa fa-trash',\n 'underline': 'fa fa-underline',\n 'undo': 'fa fa-undo',\n 'unorderedlist': 'fa fa-list-ul',\n 'video': 'fa fa-youtube-play'\n }\n }\n });\n}));\n","/*!\n * sweetalert2 v5.2.0\n * Released under the MIT License.\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.Sweetalert2 = factory());\n}(this, function () { 'use strict';\n\n var swalPrefix = 'swal2-';\n\n var prefix = function(items) {\n var result = {};\n for (var i in items) {\n result[items[i]] = swalPrefix + items[i];\n }\n return result;\n };\n\n var swalClasses = prefix([\n 'container',\n 'in',\n 'modal',\n 'overlay',\n 'close',\n 'content',\n 'spacer',\n 'confirm',\n 'cancel',\n 'icon',\n 'image',\n 'input',\n 'file',\n 'range',\n 'select',\n 'radio',\n 'checkbox',\n 'textarea',\n 'validationerror',\n 'progresssteps',\n 'activeprogressstep',\n 'progresscircle',\n 'progressline'\n ]);\n\n var iconTypes = prefix([\n 'success',\n 'warning',\n 'info',\n 'question',\n 'error'\n ]);\n\n var defaultParams = {\n title: '',\n text: '',\n html: '',\n type: null,\n customClass: '',\n animation: true,\n allowOutsideClick: true,\n allowEscapeKey: true,\n showConfirmButton: true,\n showCancelButton: false,\n preConfirm: null,\n confirmButtonText: 'OK',\n confirmButtonColor: '#3085d6',\n confirmButtonClass: null,\n cancelButtonText: 'Cancel',\n cancelButtonColor: '#aaa',\n cancelButtonClass: null,\n buttonsStyling: true,\n reverseButtons: false,\n focusCancel: false,\n showCloseButton: false,\n showLoaderOnConfirm: false,\n imageUrl: null,\n imageWidth: null,\n imageHeight: null,\n imageClass: null,\n timer: null,\n width: 500,\n padding: 20,\n background: '#fff',\n input: null,\n inputPlaceholder: '',\n inputValue: '',\n inputOptions: {},\n inputAutoTrim: true,\n inputClass: null,\n inputAttributes: {},\n inputValidator: null,\n progressSteps: [],\n currentProgressStep: null,\n progressStepsDistance: '40px',\n onOpen: null,\n onClose: null\n };\n\n var sweetHTML = '<div class=\"' + swalClasses.modal + '\" style=\"display: none\" tabIndex=\"-1\">' +\n '<ul class=\"' + swalClasses.progresssteps + '\"></ul>' +\n '<div class=\"' + swalClasses.icon + ' ' + iconTypes.error + '\">' +\n '<span class=\"x-mark\"><span class=\"line left\"></span><span class=\"line right\"></span></span>' +\n '</div>' +\n '<div class=\"' + swalClasses.icon + ' ' + iconTypes.question + '\">?</div>' +\n '<div class=\"' + swalClasses.icon + ' ' + iconTypes.warning + '\">!</div>' +\n '<div class=\"' + swalClasses.icon + ' ' + iconTypes.info + '\">i</div>' +\n '<div class=\"' + swalClasses.icon + ' ' + iconTypes.success + '\">' +\n '<span class=\"line tip\"></span> <span class=\"line long\"></span>' +\n '<div class=\"placeholder\"></div> <div class=\"fix\"></div>' +\n '</div>' +\n '<img class=\"' + swalClasses.image + '\">' +\n '<h2></h2>' +\n '<div class=\"' + swalClasses.content + '\"></div>' +\n '<input class=\"' + swalClasses.input + '\">' +\n '<input type=\"file\" class=\"' + swalClasses.file + '\">' +\n '<div class=\"' + swalClasses.range + '\">' +\n '<output></output>' +\n '<input type=\"range\">' +\n '</div>' +\n '<select class=\"' + swalClasses.select + '\"></select>' +\n '<div class=\"' + swalClasses.radio + '\"></div>' +\n '<label for=\"' + swalClasses.checkbox + '\" class=\"' + swalClasses.checkbox + '\">' +\n '<input type=\"checkbox\">' +\n '</label>' +\n '<textarea class=\"' + swalClasses.textarea + '\"></textarea>' +\n '<div class=\"' + swalClasses.validationerror + '\"></div>' +\n '<hr class=\"' + swalClasses.spacer + '\">' +\n '<button type=\"button\" class=\"' + swalClasses.confirm + '\">OK</button>' +\n '<button type=\"button\" class=\"' + swalClasses.cancel + '\">Cancel</button>' +\n '<span class=\"' + swalClasses.close + '\">×</span>' +\n '</div>';\n\n var sweetContainer;\n\n var existingSweetContainers = document.getElementsByClassName(swalClasses.container);\n\n if (existingSweetContainers.length) {\n sweetContainer = existingSweetContainers[0];\n } else {\n sweetContainer = document.createElement('div');\n sweetContainer.className = swalClasses.container;\n sweetContainer.innerHTML = sweetHTML;\n }\n\n var extend = function(a, b) {\n for (var key in b) {\n if (b.hasOwnProperty(key)) {\n a[key] = b[key];\n }\n }\n\n return a;\n };\n\n\n /*\n * Set hover, active and focus-states for buttons (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color)\n */\n var colorLuminance = function(hex, lum) {\n // Validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n lum = lum || 0;\n\n // Convert to decimal and change luminosity\n var rgb = '#';\n for (var i = 0; i < 3; i++) {\n var c = parseInt(hex.substr(i * 2, 2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n rgb += ('00' + c).substr(c.length);\n }\n\n return rgb;\n };\n\n // Remember state in cases where opening and handling a modal will fiddle with it.\n var states = {\n previousWindowKeyDown: null,\n previousActiveElement: null,\n previousBodyPadding: null\n };\n\n /*\n * Add modal + overlay to DOM\n */\n var init = function() {\n if (typeof document === 'undefined') {\n console.error('SweetAlert2 requires document to initialize');\n return;\n } else if (document.getElementsByClassName(swalClasses.container).length) {\n return;\n }\n\n document.body.appendChild(sweetContainer);\n\n var modal = getModal();\n var input = getChildByClass(modal, swalClasses.input);\n var file = getChildByClass(modal, swalClasses.file);\n var range = modal.querySelector('.' + swalClasses.range + ' input');\n var select = getChildByClass(modal, swalClasses.select);\n var checkbox = modal.querySelector('.' + swalClasses.checkbox + ' input');\n var textarea = getChildByClass(modal, swalClasses.textarea);\n\n input.oninput = function() {\n sweetAlert.resetValidationError();\n };\n\n input.onkeyup = function(event) {\n event.stopPropagation();\n if (event.keyCode === 13) {\n sweetAlert.clickConfirm();\n }\n };\n\n file.onchange = function() {\n sweetAlert.resetValidationError();\n };\n\n range.oninput = function() {\n sweetAlert.resetValidationError();\n range.previousSibling.value = range.value;\n };\n\n range.onchange = function() {\n sweetAlert.resetValidationError();\n range.previousSibling.value = range.value;\n };\n\n select.onchange = function() {\n sweetAlert.resetValidationError();\n };\n\n checkbox.onchange = function() {\n sweetAlert.resetValidationError();\n };\n\n textarea.oninput = function() {\n sweetAlert.resetValidationError();\n };\n\n return modal;\n };\n\n /*\n * Manipulate DOM\n */\n var elementByClass = function(className) {\n return sweetContainer.querySelector('.' + className);\n };\n\n var getModal = function() {\n return document.body.querySelector('.' + swalClasses.modal) || init();\n };\n\n var getIcons = function() {\n var modal = getModal();\n return modal.querySelectorAll('.' + swalClasses.icon);\n };\n\n var getSpacer = function() {\n return elementByClass(swalClasses.spacer);\n };\n\n var getProgressSteps = function() {\n return elementByClass(swalClasses.progresssteps);\n };\n\n var getValidationError = function() {\n return elementByClass(swalClasses.validationerror);\n };\n\n var getConfirmButton = function() {\n return elementByClass(swalClasses.confirm);\n };\n\n var getCancelButton = function() {\n return elementByClass(swalClasses.cancel);\n };\n\n var getCloseButton = function() {\n return elementByClass(swalClasses.close);\n };\n\n var getFocusableElements = function(focusCancel) {\n var buttons = [getConfirmButton(), getCancelButton()];\n if (focusCancel) {\n buttons.reverse();\n }\n return buttons.concat(Array.prototype.slice.call(\n getModal().querySelectorAll('button:not([class^=' + swalPrefix + ']), input:not([type=hidden]), textarea, select')\n ));\n };\n\n var hasClass = function(elem, className) {\n return elem.classList.contains(className);\n };\n\n var focusInput = function(input) {\n input.focus();\n\n // place cursor at end of text in text input\n if (input.type !== 'file') {\n // http://stackoverflow.com/a/2345915/1331425\n var val = input.value;\n input.value = '';\n input.value = val;\n }\n };\n\n var addClass = function(elem, className) {\n if (!elem || !className) {\n return;\n }\n var classes = className.split(/\\s+/);\n classes.forEach(function(className) {\n elem.classList.add(className);\n });\n };\n\n var removeClass = function(elem, className) {\n if (!elem || !className) {\n return;\n }\n var classes = className.split(/\\s+/);\n classes.forEach(function(className) {\n elem.classList.remove(className);\n });\n };\n\n var getChildByClass = function(elem, className) {\n for (var i = 0; i < elem.childNodes.length; i++) {\n if (hasClass(elem.childNodes[i], className)) {\n return elem.childNodes[i];\n }\n }\n };\n\n var show = function(elem, display) {\n if (!display) {\n display = 'block';\n }\n elem.style.opacity = '';\n elem.style.display = display;\n };\n\n var hide = function(elem) {\n elem.style.opacity = '';\n elem.style.display = 'none';\n };\n\n var empty = function(elem) {\n while (elem.firstChild) {\n elem.removeChild(elem.firstChild);\n }\n };\n\n // borrowed from jqeury $(elem).is(':visible') implementation\n var isVisible = function(elem) {\n return elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length;\n };\n\n var removeStyleProperty = function(elem, property) {\n if (elem.style.removeProperty) {\n elem.style.removeProperty(property);\n } else {\n elem.style.removeAttribute(property);\n }\n };\n\n var fireClick = function(node) {\n // Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/\n // Then fixed for today's Chrome browser.\n if (typeof MouseEvent === 'function') {\n // Up-to-date approach\n var mevt = new MouseEvent('click', {\n view: window,\n bubbles: false,\n cancelable: true\n });\n node.dispatchEvent(mevt);\n } else if (document.createEvent) {\n // Fallback\n var evt = document.createEvent('MouseEvents');\n evt.initEvent('click', false, false);\n node.dispatchEvent(evt);\n } else if (document.createEventObject) {\n node.fireEvent('onclick');\n } else if (typeof node.onclick === 'function') {\n node.onclick();\n }\n };\n\n var stopEventPropagation = function(e) {\n // In particular, make sure the space bar doesn't scroll the main window.\n if (typeof e.stopPropagation === 'function') {\n e.stopPropagation();\n e.preventDefault();\n } else if (window.event && window.event.hasOwnProperty('cancelBubble')) {\n window.event.cancelBubble = true;\n }\n };\n\n var animationEndEvent = (function() {\n var testEl = document.createElement('div'),\n transEndEventNames = {\n 'WebkitAnimation': 'webkitAnimationEnd',\n 'OAnimation': 'oAnimationEnd oanimationend',\n 'msAnimation': 'MSAnimationEnd',\n 'animation': 'animationend'\n };\n for (var i in transEndEventNames) {\n if (transEndEventNames.hasOwnProperty(i) &&\n testEl.style[i] !== undefined) {\n return transEndEventNames[i];\n }\n }\n\n return false;\n })();\n\n\n // Reset the page to its previous state\n var resetPrevState = function() {\n var modal = getModal();\n window.onkeydown = states.previousWindowKeyDown;\n if (states.previousActiveElement && states.previousActiveElement.focus) {\n states.previousActiveElement.focus();\n }\n clearTimeout(modal.timeout);\n };\n\n // Measure width of scrollbar\n // https://github.com/twbs/bootstrap/blob/master/js/modal.js#L279-L286\n var measureScrollbar = function() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '50px';\n scrollDiv.style.height = '50px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n };\n\n // JavaScript Debounce Function\n // https://davidwalsh.name/javascript-debounce-function\n var debounce = function(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n };\n\n var modalParams = extend({}, defaultParams);\n var queue = [];\n var swal2Observer;\n\n /*\n * Set type, text and actions on modal\n */\n var setParameters = function(params) {\n var modal = getModal();\n\n for (var param in params) {\n if (!defaultParams.hasOwnProperty(param) && param !== 'extraParams') {\n console.warn('SweetAlert2: Unknown parameter \"' + param + '\"');\n }\n }\n\n // set modal width and margin-left\n modal.style.width = (typeof params.width === 'number') ? params.width + 'px' : params.width;\n\n modal.style.padding = params.padding + 'px';\n modal.style.background = params.background;\n\n var $title = modal.querySelector('h2');\n var $content = modal.querySelector('.' + swalClasses.content);\n var $confirmBtn = getConfirmButton();\n var $cancelBtn = getCancelButton();\n var $closeButton = modal.querySelector('.' + swalClasses.close);\n\n // Title\n $title.innerHTML = params.title.split('\\n').join('<br>');\n\n // Content\n var i;\n if (params.text || params.html) {\n if (typeof params.html === 'object') {\n $content.innerHTML = '';\n if (0 in params.html) {\n for (i = 0; i in params.html; i++) {\n $content.appendChild(params.html[i].cloneNode(true));\n }\n } else {\n $content.appendChild(params.html.cloneNode(true));\n }\n } else {\n $content.innerHTML = params.html || (params.text.split('\\n').join('<br>'));\n }\n show($content);\n } else {\n hide($content);\n }\n\n // Close button\n if (params.showCloseButton) {\n show($closeButton);\n } else {\n hide($closeButton);\n }\n\n // Custom Class\n modal.className = swalClasses.modal;\n if (params.customClass) {\n addClass(modal, params.customClass);\n }\n\n // Progress steps\n var progressStepsContainer = getProgressSteps();\n var currentProgressStep = parseInt(params.currentProgressStep === null? sweetAlert.getQueueStep() : params.currentProgressStep, 10);\n if (params.progressSteps.length) {\n show(progressStepsContainer);\n empty(progressStepsContainer);\n if (currentProgressStep >= params.progressSteps.length) {\n console.warn(\n 'SweetAlert2: Invalid currentProgressStep parameter, it should be less than progressSteps.length ' +\n '(currentProgressStep like JS arrays starts from 0)'\n );\n }\n params.progressSteps.forEach(function(step, index) {\n var circle = document.createElement('li');\n addClass(circle, swalClasses.progresscircle);\n circle.innerHTML = step;\n if (index === currentProgressStep) {\n addClass(circle, swalClasses.activeprogressstep);\n }\n progressStepsContainer.appendChild(circle);\n if (index !== params.progressSteps.length - 1) {\n var line = document.createElement('li');\n addClass(line, swalClasses.progressline);\n line.style.width = params.progressStepsDistance;\n progressStepsContainer.appendChild(line);\n }\n });\n } else {\n hide(progressStepsContainer);\n }\n\n // Icon\n var icons = getIcons();\n for (i = 0; i < icons.length; i++) {\n hide(icons[i]);\n }\n if (params.type) {\n var validType = false;\n for (var iconType in iconTypes) {\n if (params.type === iconType) {\n validType = true;\n break;\n }\n }\n if (!validType) {\n console.error('SweetAlert2: Unknown alert type: ' + params.type);\n return false;\n }\n var $icon = modal.querySelector('.' + swalClasses.icon + '.' + iconTypes[params.type]);\n show($icon);\n\n // Animate icon\n switch (params.type) {\n case 'success':\n addClass($icon, 'animate');\n addClass($icon.querySelector('.tip'), 'animate-success-tip');\n addClass($icon.querySelector('.long'), 'animate-success-long');\n break;\n case 'error':\n addClass($icon, 'animate-error-icon');\n addClass($icon.querySelector('.x-mark'), 'animate-x-mark');\n break;\n case 'warning':\n addClass($icon, 'pulse-warning');\n break;\n default:\n break;\n }\n\n }\n\n // Custom image\n var $customImage = modal.querySelector('.' + swalClasses.image);\n if (params.imageUrl) {\n $customImage.setAttribute('src', params.imageUrl);\n show($customImage);\n\n if (params.imageWidth) {\n $customImage.setAttribute('width', params.imageWidth);\n } else {\n $customImage.removeAttribute('width');\n }\n\n if (params.imageHeight) {\n $customImage.setAttribute('height', params.imageHeight);\n } else {\n $customImage.removeAttribute('height');\n }\n\n $customImage.className = swalClasses.image;\n if (params.imageClass) {\n addClass($customImage, params.imageClass);\n }\n } else {\n hide($customImage);\n }\n\n // Cancel button\n if (params.showCancelButton) {\n $cancelBtn.style.display = 'inline-block';\n } else {\n hide($cancelBtn);\n }\n\n // Confirm button\n if (params.showConfirmButton) {\n removeStyleProperty($confirmBtn, 'display');\n } else {\n hide($confirmBtn);\n }\n\n // Buttons spacer\n var spacer = getSpacer();\n if (!params.showConfirmButton && !params.showCancelButton) {\n hide(spacer);\n } else {\n show(spacer);\n }\n\n // Edit text on cancel and confirm buttons\n $confirmBtn.innerHTML = params.confirmButtonText;\n $cancelBtn.innerHTML = params.cancelButtonText;\n\n // Set buttons to selected background colors\n if (params.buttonsStyling) {\n $confirmBtn.style.backgroundColor = params.confirmButtonColor;\n $cancelBtn.style.backgroundColor = params.cancelButtonColor;\n }\n\n // Add buttons custom classes\n $confirmBtn.className = swalClasses.confirm;\n addClass($confirmBtn, params.confirmButtonClass);\n $cancelBtn.className = swalClasses.cancel;\n addClass($cancelBtn, params.cancelButtonClass);\n\n // Buttons styling\n if (params.buttonsStyling) {\n addClass($confirmBtn, 'styled');\n addClass($cancelBtn, 'styled');\n } else {\n removeClass($confirmBtn, 'styled');\n removeClass($cancelBtn, 'styled');\n\n $confirmBtn.style.backgroundColor = $confirmBtn.style.borderLeftColor = $confirmBtn.style.borderRightColor = '';\n $cancelBtn.style.backgroundColor = $cancelBtn.style.borderLeftColor = $cancelBtn.style.borderRightColor = '';\n }\n\n // CSS animation\n if (params.animation === true) {\n removeClass(modal, 'no-animation');\n } else {\n addClass(modal, 'no-animation');\n }\n };\n\n /*\n * Animations\n */\n var openModal = function(animation, onComplete) {\n var modal = getModal();\n if (animation) {\n addClass(modal, 'show-swal2');\n addClass(sweetContainer, 'fade');\n removeClass(modal, 'hide-swal2');\n } else {\n removeClass(modal, 'fade');\n }\n show(modal);\n\n // scrolling is 'hidden' until animation is done, after that 'auto'\n sweetContainer.style.overflowY = 'hidden';\n if (animationEndEvent && !hasClass(modal, 'no-animation')) {\n modal.addEventListener(animationEndEvent, function swalCloseEventFinished() {\n modal.removeEventListener(animationEndEvent, swalCloseEventFinished);\n sweetContainer.style.overflowY = 'auto';\n });\n } else {\n sweetContainer.style.overflowY = 'auto';\n }\n\n addClass(sweetContainer, 'in');\n addClass(document.body, swalClasses.in);\n fixScrollbar();\n states.previousActiveElement = document.activeElement;\n if (onComplete !== null && typeof onComplete === 'function') {\n onComplete.call(this, modal);\n }\n };\n\n function fixScrollbar() {\n // for queues, do not do this more than once\n if (states.previousBodyPadding !== null) {\n return;\n }\n // if the body has overflow\n if (document.body.scrollHeight > window.innerHeight) {\n // add padding so the content doesn't shift after removal of scrollbar\n states.previousBodyPadding = document.body.style.paddingRight;\n document.body.style.paddingRight = measureScrollbar() + 'px';\n }\n }\n\n function undoScrollbar() {\n if (states.previousBodyPadding !== null) {\n document.body.style.paddingRight = states.previousBodyPadding;\n states.previousBodyPadding = null;\n }\n }\n\n function modalDependant() {\n if (arguments[0] === undefined) {\n console.error('SweetAlert2 expects at least 1 attribute!');\n return false;\n }\n\n var params = extend({}, modalParams);\n\n switch (typeof arguments[0]) {\n\n case 'string':\n params.title = arguments[0];\n params.text = arguments[1] || '';\n params.type = arguments[2] || '';\n\n break;\n\n case 'object':\n extend(params, arguments[0]);\n params.extraParams = arguments[0].extraParams;\n\n if (params.input === 'email' && params.inputValidator === null) {\n params.inputValidator = function(email) {\n return new Promise(function(resolve, reject) {\n var emailRegex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$/;\n if (emailRegex.test(email)) {\n resolve();\n } else {\n reject('Invalid email address');\n }\n });\n };\n }\n\n break;\n\n default:\n console.error('SweetAlert2: Unexpected type of argument! Expected \"string\" or \"object\", got ' + typeof arguments[0]);\n return false;\n }\n\n setParameters(params);\n\n // Modal interactions\n var modal = getModal();\n\n return new Promise(function(resolve, reject) {\n // Close on timer\n if (params.timer) {\n modal.timeout = setTimeout(function() {\n sweetAlert.closeModal(params.onClose);\n reject('timer');\n }, params.timer);\n }\n\n // Get input element by specified type or, if type isn't specified, by params.input\n var getInput = function(inputType) {\n inputType = inputType || params.input;\n switch (inputType) {\n case 'select':\n case 'textarea':\n case 'file':\n return getChildByClass(modal, swalClasses[inputType]);\n case 'checkbox':\n return modal.querySelector('.' + swalClasses.checkbox + ' input');\n case 'radio':\n return modal.querySelector('.' + swalClasses.radio + ' input:checked') ||\n modal.querySelector('.' + swalClasses.radio + ' input:first-child');\n case 'range':\n return modal.querySelector('.' + swalClasses.range + ' input');\n default:\n return getChildByClass(modal, swalClasses.input);\n }\n };\n\n // Get the value of the modal input\n var getInputValue = function() {\n var input = getInput();\n if (!input) {\n return null;\n }\n switch (params.input) {\n case 'checkbox':\n return input.checked ? 1 : 0;\n case 'radio':\n return input.checked ? input.value : null;\n case 'file':\n return input.files.length ? input.files[0] : null;\n default:\n return params.inputAutoTrim? input.value.trim() : input.value;\n }\n };\n\n // input autofocus\n if (params.input) {\n setTimeout(function() {\n var input = getInput();\n if (input) {\n focusInput(input);\n }\n }, 0);\n }\n\n var confirm = function(value) {\n if (params.showLoaderOnConfirm) {\n sweetAlert.showLoading();\n }\n\n if (params.preConfirm) {\n params.preConfirm(value, params.extraParams).then(\n function(preConfirmValue) {\n sweetAlert.closeModal(params.onClose);\n resolve(preConfirmValue || value);\n },\n function(error) {\n sweetAlert.hideLoading();\n if (error) {\n sweetAlert.showValidationError(error);\n }\n }\n );\n } else {\n sweetAlert.closeModal(params.onClose);\n resolve(value);\n }\n };\n\n // Mouse interactions\n var onButtonEvent = function(event) {\n var e = event || window.event;\n var target = e.target || e.srcElement;\n var confirmBtn = getConfirmButton();\n var cancelBtn = getCancelButton();\n var targetedConfirm = confirmBtn === target || confirmBtn.contains(target);\n var targetedCancel = cancelBtn === target || cancelBtn.contains(target);\n\n switch (e.type) {\n case 'mouseover':\n case 'mouseup':\n if (params.buttonsStyling) {\n if (targetedConfirm) {\n confirmBtn.style.backgroundColor = colorLuminance(params.confirmButtonColor, -0.1);\n } else if (targetedCancel) {\n cancelBtn.style.backgroundColor = colorLuminance(params.cancelButtonColor, -0.1);\n }\n }\n break;\n case 'mouseout':\n if (params.buttonsStyling) {\n if (targetedConfirm) {\n confirmBtn.style.backgroundColor = params.confirmButtonColor;\n } else if (targetedCancel) {\n cancelBtn.style.backgroundColor = params.cancelButtonColor;\n }\n }\n break;\n case 'mousedown':\n if (params.buttonsStyling) {\n if (targetedConfirm) {\n confirmBtn.style.backgroundColor = colorLuminance(params.confirmButtonColor, -0.2);\n } else if (targetedCancel) {\n cancelBtn.style.backgroundColor = colorLuminance(params.cancelButtonColor, -0.2);\n }\n }\n break;\n case 'click':\n // Clicked 'confirm'\n if (targetedConfirm && sweetAlert.isVisible()) {\n if (params.input) {\n var inputValue = getInputValue();\n\n if (params.inputValidator) {\n sweetAlert.disableInput();\n params.inputValidator(inputValue, params.extraParams).then(\n function() {\n sweetAlert.enableInput();\n confirm(inputValue);\n },\n function(error) {\n sweetAlert.enableInput();\n if (error) {\n sweetAlert.showValidationError(error);\n }\n }\n );\n } else {\n confirm(inputValue);\n }\n\n } else {\n confirm(true);\n }\n\n // Clicked 'cancel'\n } else if (targetedCancel && sweetAlert.isVisible()) {\n sweetAlert.closeModal(params.onClose);\n reject('cancel');\n }\n\n break;\n default:\n }\n };\n\n var $buttons = modal.querySelectorAll('button');\n var i;\n for (i = 0; i < $buttons.length; i++) {\n $buttons[i].onclick = onButtonEvent;\n $buttons[i].onmouseover = onButtonEvent;\n $buttons[i].onmouseout = onButtonEvent;\n $buttons[i].onmousedown = onButtonEvent;\n }\n\n // Closing modal by close button\n getCloseButton().onclick = function() {\n sweetAlert.closeModal(params.onClose);\n reject('close');\n };\n\n // Closing modal by overlay click\n sweetContainer.onclick = function(e) {\n if (e.target !== sweetContainer) {\n return;\n }\n if (params.allowOutsideClick) {\n sweetAlert.closeModal(params.onClose);\n reject('overlay');\n }\n };\n\n var $confirmButton = getConfirmButton();\n var $cancelButton = getCancelButton();\n\n // Reverse buttons if neede d\n if (params.reverseButtons) {\n $confirmButton.parentNode.insertBefore($cancelButton, $confirmButton);\n } else {\n $confirmButton.parentNode.insertBefore($confirmButton, $cancelButton);\n }\n\n // Focus handling\n function setFocus(index, increment) {\n var focusableElements = getFocusableElements(params.focusCancel);\n // search for visible elements and select the next possible match\n for (var i = 0; i < focusableElements.length; i++) {\n index = index + increment;\n\n // rollover to first item\n if (index === focusableElements.length) {\n index = 0;\n\n // go to last item\n } else if (index === -1) {\n index = focusableElements.length - 1;\n }\n\n // determine if element is visible\n var el = focusableElements[index];\n if (isVisible(el)) {\n return el.focus();\n }\n }\n }\n\n function handleKeyDown(event) {\n var e = event || window.event;\n var keyCode = e.keyCode || e.which;\n\n if ([9, 13, 32, 27].indexOf(keyCode) === -1) {\n // Don't do work on keys we don't care about.\n return;\n }\n\n var $targetElement = e.target || e.srcElement;\n\n var focusableElements = getFocusableElements(params.focusCancel);\n var btnIndex = -1; // Find the button - note, this is a nodelist, not an array.\n for (var i = 0; i < focusableElements.length; i++) {\n if ($targetElement === focusableElements[i]) {\n btnIndex = i;\n break;\n }\n }\n\n // TAB\n if (keyCode === 9) {\n if (!e.shiftKey) {\n // Cycle to the next button\n setFocus(btnIndex, 1);\n } else {\n // Cycle to the prev button\n setFocus(btnIndex, -1);\n }\n\n stopEventPropagation(e);\n\n } else {\n if (keyCode === 13 || keyCode === 32) {\n if (btnIndex === -1) {\n // ENTER/SPACE clicked outside of a button.\n if (params.focusCancel) {\n fireClick($cancelButton, e);\n } else {\n fireClick($confirmButton, e);\n }\n }\n } else if (keyCode === 27 && params.allowEscapeKey === true) {\n sweetAlert.closeModal(params.onClose);\n reject('esc');\n }\n }\n }\n\n states.previousWindowKeyDown = window.onkeydown;\n window.onkeydown = handleKeyDown;\n\n // Loading state\n if (params.buttonsStyling) {\n $confirmButton.style.borderLeftColor = params.confirmButtonColor;\n $confirmButton.style.borderRightColor = params.confirmButtonColor;\n }\n\n /**\n * Show spinner instead of Confirm button and disable Cancel button\n */\n sweetAlert.showLoading = sweetAlert.enableLoading = function() {\n show(getSpacer());\n show($confirmButton, 'inline-block');\n addClass($confirmButton, 'loading');\n addClass(modal, 'loading');\n $confirmButton.disabled = true;\n $cancelButton.disabled = true;\n };\n\n /**\n * Show spinner instead of Confirm button and disable Cancel button\n */\n sweetAlert.hideLoading = sweetAlert.disableLoading = function() {\n if (!params.showConfirmButton) {\n hide($confirmButton);\n if (!params.showCancelButton) {\n hide(getSpacer());\n }\n }\n removeClass($confirmButton, 'loading');\n removeClass(modal, 'loading');\n $confirmButton.disabled = false;\n $cancelButton.disabled = false;\n };\n\n sweetAlert.enableButtons = function() {\n $confirmButton.disabled = false;\n $cancelButton.disabled = false;\n };\n\n sweetAlert.disableButtons = function() {\n $confirmButton.disabled = true;\n $cancelButton.disabled = true;\n };\n\n sweetAlert.enableConfirmButton = function() {\n $confirmButton.disabled = false;\n };\n\n sweetAlert.disableConfirmButton = function() {\n $confirmButton.disabled = true;\n };\n\n sweetAlert.enableInput = function() {\n var input = getInput();\n if (!input) {\n return false;\n }\n if (input.type === 'radio') {\n var radiosContainer = input.parentNode.parentNode;\n var radios = radiosContainer.querySelectorAll('input');\n for (var i = 0; i < radios.length; i++) {\n radios[i].disabled = false;\n }\n } else {\n input.disabled = false;\n }\n };\n\n sweetAlert.disableInput = function() {\n var input = getInput();\n if (!input) {\n return false;\n }\n if (input && input.type === 'radio') {\n var radiosContainer = input.parentNode.parentNode;\n var radios = radiosContainer.querySelectorAll('input');\n for (var i = 0; i < radios.length; i++) {\n radios[i].disabled = true;\n }\n } else {\n input.disabled = true;\n }\n };\n\n // Set modal min-height to disable scrolling inside the modal\n sweetAlert.recalculateHeight = debounce(function() {\n var modal = getModal();\n var prevState = modal.style.display;\n modal.style.minHeight = '';\n show(modal);\n modal.style.minHeight = (modal.scrollHeight + 1) + 'px';\n modal.style.display = prevState;\n }, 50);\n\n // Show block with validation error\n sweetAlert.showValidationError = function(error) {\n var validationError = getValidationError();\n validationError.innerHTML = error;\n show(validationError);\n\n var input = getInput();\n focusInput(input);\n addClass(input, 'error');\n };\n\n // Hide block with validation error\n sweetAlert.resetValidationError = function() {\n var validationError = getValidationError();\n hide(validationError);\n sweetAlert.recalculateHeight();\n\n var input = getInput();\n if (input) {\n removeClass(input, 'error');\n }\n };\n\n sweetAlert.getProgressSteps = function() {\n return params.progressSteps;\n };\n\n sweetAlert.setProgressSteps = function(progressSteps) {\n params.progressSteps = progressSteps;\n setParameters(params);\n };\n\n sweetAlert.showProgressSteps = function() {\n show(getProgressSteps());\n };\n\n sweetAlert.hideProgressSteps = function() {\n hide(getProgressSteps());\n };\n\n sweetAlert.enableButtons();\n sweetAlert.hideLoading();\n sweetAlert.resetValidationError();\n\n // inputs\n var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];\n var input;\n for (i = 0; i < inputTypes.length; i++) {\n var inputClass = swalClasses[inputTypes[i]];\n var inputContainer = getChildByClass(modal, inputClass);\n input = getInput(inputTypes[i]);\n\n // set attributes\n if (input) {\n for (var j in input.attributes) {\n if (input.attributes.hasOwnProperty(j)) {\n var attrName = input.attributes[j].name;\n if (attrName !== 'type' && attrName !== 'value') {\n input.removeAttribute(attrName);\n }\n }\n }\n for (var attr in params.inputAttributes) {\n input.setAttribute(attr, params.inputAttributes[attr]);\n }\n }\n\n // set class\n inputContainer.className = inputClass;\n if (params.inputClass) {\n addClass(inputContainer, params.inputClass);\n }\n\n hide(inputContainer);\n }\n\n var populateInputOptions;\n switch (params.input) {\n case 'text':\n case 'email':\n case 'password':\n case 'number':\n case 'tel':\n input = getChildByClass(modal, swalClasses.input);\n input.value = params.inputValue;\n input.placeholder = params.inputPlaceholder;\n input.type = params.input;\n show(input);\n break;\n case 'file':\n input = getChildByClass(modal, swalClasses.file);\n input.placeholder = params.inputPlaceholder;\n input.type = params.input;\n show(input);\n break;\n case 'range':\n var range = getChildByClass(modal, swalClasses.range);\n var rangeInput = range.querySelector('input');\n var rangeOutput = range.querySelector('output');\n rangeInput.value = params.inputValue;\n rangeInput.type = params.input;\n rangeOutput.value = params.inputValue;\n show(range);\n break;\n case 'select':\n var select = getChildByClass(modal, swalClasses.select);\n select.innerHTML = '';\n if (params.inputPlaceholder) {\n var placeholder = document.createElement('option');\n placeholder.innerHTML = params.inputPlaceholder;\n placeholder.value = '';\n placeholder.disabled = true;\n placeholder.selected = true;\n select.appendChild(placeholder);\n }\n populateInputOptions = function(inputOptions) {\n for (var optionValue in inputOptions) {\n var option = document.createElement('option');\n option.value = optionValue;\n option.innerHTML = inputOptions[optionValue];\n if (params.inputValue === optionValue) {\n option.selected = true;\n }\n select.appendChild(option);\n }\n show(select);\n select.focus();\n };\n break;\n case 'radio':\n var radio = getChildByClass(modal, swalClasses.radio);\n radio.innerHTML = '';\n populateInputOptions = function(inputOptions) {\n for (var radioValue in inputOptions) {\n var id = 1;\n var radioInput = document.createElement('input');\n var radioLabel = document.createElement('label');\n var radioLabelSpan = document.createElement('span');\n radioInput.type = 'radio';\n radioInput.name = swalClasses.radio;\n radioInput.value = radioValue;\n radioInput.id = swalClasses.radio + '-' + (id++);\n if (params.inputValue === radioValue) {\n radioInput.checked = true;\n }\n radioLabelSpan.innerHTML = inputOptions[radioValue];\n radioLabel.appendChild(radioInput);\n radioLabel.appendChild(radioLabelSpan);\n radioLabel.for = radioInput.id;\n radio.appendChild(radioLabel);\n }\n show(radio);\n var radios = radio.querySelectorAll('input');\n if (radios.length) {\n radios[0].focus();\n }\n };\n break;\n case 'checkbox':\n var checkbox = getChildByClass(modal, swalClasses.checkbox);\n var checkboxInput = getInput('checkbox');\n checkboxInput.type = 'checkbox';\n checkboxInput.value = 1;\n checkboxInput.id = swalClasses.checkbox;\n checkboxInput.checked = Boolean(params.inputValue);\n var label = checkbox.getElementsByTagName('span');\n if (label.length) {\n checkbox.removeChild(label[0]);\n }\n label = document.createElement('span');\n label.innerHTML = params.inputPlaceholder;\n checkbox.appendChild(label);\n show(checkbox);\n break;\n case 'textarea':\n var textarea = getChildByClass(modal, swalClasses.textarea);\n textarea.value = params.inputValue;\n textarea.placeholder = params.inputPlaceholder;\n show(textarea);\n break;\n case null:\n break;\n default:\n console.error('SweetAlert2: Unexpected type of input! Expected \"text\" or \"email\" or \"password\", \"select\", \"checkbox\", \"textarea\" or \"file\", got \"' + params.input + '\"');\n break;\n }\n\n if (params.input === 'select' || params.input === 'radio') {\n if (params.inputOptions instanceof Promise) {\n sweetAlert.showLoading();\n params.inputOptions.then(function(inputOptions) {\n sweetAlert.hideLoading();\n populateInputOptions(inputOptions);\n });\n } else if (typeof params.inputOptions === 'object') {\n populateInputOptions(params.inputOptions);\n } else {\n console.error('SweetAlert2: Unexpected type of inputOptions! Expected object or Promise, got ' + typeof params.inputOptions);\n }\n }\n\n openModal(params.animation, params.onOpen);\n\n // Focus the first element (input or button)\n setFocus(-1, 1);\n\n // fix scroll\n sweetContainer.scrollTop = 0;\n\n // Observe changes inside the modal and adjust height\n if (typeof MutationObserver !== 'undefined' && !swal2Observer) {\n swal2Observer = new MutationObserver(sweetAlert.recalculateHeight);\n swal2Observer.observe(modal, {childList: true, characterData: true, subtree: true});\n }\n });\n }\n\n // SweetAlert function\n function sweetAlert() {\n // Copy arguments to the local args variable\n var args = arguments;\n\n if (sweetAlert.isVisible()) {\n sweetAlert.close();\n }\n\n return modalDependant.apply(this, args);\n }\n\n /*\n * Global function to determine if swal2 modal is visible\n */\n sweetAlert.isVisible = function() {\n var modal = getModal();\n return isVisible(modal);\n };\n\n /*\n * Global function for chaining sweetAlert modals\n */\n sweetAlert.queue = function(steps) {\n queue = steps;\n var modal = getModal();\n var resetQueue = function() {\n queue = [];\n modal.removeAttribute('data-queue-step');\n };\n return new Promise(function(resolve, reject) {\n (function step(i, callback) {\n if (i < queue.length) {\n modal.setAttribute('data-queue-step', i);\n\n sweetAlert(queue[i]).then(function() {\n step(i+1, callback);\n }, function(dismiss) {\n resetQueue();\n reject(dismiss);\n });\n } else {\n resetQueue();\n resolve();\n }\n })(0);\n });\n };\n\n /*\n * Global function for getting the index of current modal in queue\n */\n sweetAlert.getQueueStep = function() {\n return getModal().getAttribute('data-queue-step');\n };\n\n /*\n * Global function for inserting a modal to the queue\n */\n sweetAlert.insertQueueStep = function(step, index) {\n if (index && index < queue.length) {\n return queue.splice(index, 0, step);\n }\n return queue.push(step);\n };\n\n /*\n * Global function for deleting a modal from the queue\n */\n sweetAlert.deleteQueueStep = function(index) {\n if (typeof queue[index] !== 'undefined') {\n queue.splice(index, 1);\n }\n };\n\n /*\n * Global function to close sweetAlert\n */\n sweetAlert.close = sweetAlert.closeModal = function(onComplete) {\n var modal = getModal();\n removeClass(modal, 'show-swal2');\n addClass(modal, 'hide-swal2');\n\n // Reset icon animations\n var $successIcon = modal.querySelector('.' + swalClasses.icon + '.' + iconTypes.success);\n removeClass($successIcon, 'animate');\n removeClass($successIcon.querySelector('.tip'), 'animate-success-tip');\n removeClass($successIcon.querySelector('.long'), 'animate-success-long');\n\n var $errorIcon = modal.querySelector('.' + swalClasses.icon + '.' + iconTypes.error);\n removeClass($errorIcon, 'animate-error-icon');\n removeClass($errorIcon.querySelector('.x-mark'), 'animate-x-mark');\n\n var $warningIcon = modal.querySelector('.' + swalClasses.icon + '.' + iconTypes.warning);\n removeClass($warningIcon, 'pulse-warning');\n\n resetPrevState();\n\n // If animation is supported, animate\n if (animationEndEvent && !hasClass(modal, 'no-animation')) {\n modal.addEventListener(animationEndEvent, function swalCloseEventFinished() {\n modal.removeEventListener(animationEndEvent, swalCloseEventFinished);\n if (hasClass(modal, 'hide-swal2')) {\n hide(modal);\n removeClass(sweetContainer, 'in');\n removeClass(document.body, swalClasses.in);\n undoScrollbar();\n }\n });\n } else {\n // Otherwise, hide immediately\n hide(modal);\n removeClass(sweetContainer, 'in');\n removeClass(document.body, swalClasses.in);\n undoScrollbar();\n }\n if (onComplete !== null && typeof onComplete === 'function') {\n onComplete.call(this, modal);\n }\n };\n\n /*\n * Global function to click 'Confirm' button\n */\n sweetAlert.clickConfirm = function() {\n getConfirmButton().click();\n };\n\n /*\n * Global function to click 'Cancel' button\n */\n sweetAlert.clickCancel = function() {\n getCancelButton().click();\n };\n\n /**\n * Set default params for each popup\n * @param {Object} userParams\n */\n sweetAlert.setDefaults = function(userParams) {\n if (!userParams) {\n throw new Error('userParams is required');\n }\n if (typeof userParams !== 'object') {\n throw new Error('userParams has to be a object');\n }\n\n extend(modalParams, userParams);\n };\n\n /**\n * Reset default params for each popup\n */\n sweetAlert.resetDefaults = function() {\n modalParams = extend({}, defaultParams);\n };\n\n sweetAlert.version = '5.2.0';\n\n if (typeof Promise === 'function') {\n Promise.prototype.done = Promise.prototype.done || function() {\n return this.catch(function() {\n // Catch promise rejections silently.\n // https://github.com/limonte/sweetalert2/issues/177\n });\n };\n } else {\n console.warn('SweetAlert2: Please inlude Promise polyfill BEFORE including sweetalert2.js if IE10+ support needed.');\n }\n\n return sweetAlert;\n\n}));\nif (window.Sweetalert2) window.sweetAlert = window.swal = window.Sweetalert2;"]}