rails_marketplace 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +37 -0
- data/app/assets/javascripts/rails_marketplace/application.js +46 -0
- data/app/assets/javascripts/rails_marketplace/catalog.coffee +3 -0
- data/app/assets/javascripts/rails_marketplace/flash.js +6 -0
- data/app/assets/javascripts/rails_marketplace/footermanifest.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/autocomplete/countries.js +267 -0
- data/app/assets/javascripts/rails_marketplace/js/autocomplete/jquery.autocomplete.js +986 -0
- data/app/assets/javascripts/rails_marketplace/js/bootstrap.min.js +7 -0
- data/app/assets/javascripts/rails_marketplace/js/calendar/fullcalendar.min.js +9 -0
- data/app/assets/javascripts/rails_marketplace/js/chartjs/chart.min.js +14 -0
- data/app/assets/javascripts/rails_marketplace/js/colorpicker/bootstrap-colorpicker.min.js +1087 -0
- data/app/assets/javascripts/rails_marketplace/js/colorpicker/docs.js +17 -0
- data/app/assets/javascripts/rails_marketplace/js/cropping/cropper.min.js +10 -0
- data/app/assets/javascripts/rails_marketplace/js/cropping/main.js +321 -0
- data/app/assets/javascripts/rails_marketplace/js/cropping/main2.js +160 -0
- data/app/assets/javascripts/rails_marketplace/js/custom.js +380 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.bootstrap.min.css +1 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.bootstrap.min.js +6 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.html5.min.js +22 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.print.min.js +4 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.bootstrap.js +8 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.buttons.min.js +36 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.fixedHeader.min.js +17 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.keyTable.min.js +18 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.responsive.min.js +25 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.scroller.min.js +26 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/fixedHeader.bootstrap.min.css +1 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/jquery.dataTables.min.css +333 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/jquery.dataTables.min.js +166 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/json/scroller-demo.json +2502 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/jszip.min.js +14 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/pdfmake.min.js +22 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/responsive.bootstrap.min.css +1 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/responsive.bootstrap.min.js +7 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/scroller.bootstrap.min.css +1 -0
- data/app/assets/javascripts/rails_marketplace/js/datatables/vfs_fonts.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/datepicker/daterangepicker.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/dropzone/dropzone.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/easypie/jquery.easypiechart.min.js +9 -0
- data/app/assets/javascripts/rails_marketplace/js/echart/echarts-all.js +35 -0
- data/app/assets/javascripts/rails_marketplace/js/echart/green.js +212 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/bootstrap-wysiwyg.js +200 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-apollo.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-basic.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-clj.js +18 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-css.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-dart.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-erlang.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-go.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-hs.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-lisp.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-llvm.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-lua.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-matlab.js +6 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-ml.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-mumps.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-n.js +4 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-pascal.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-proto.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-r.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-rd.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-scala.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-sql.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-tcl.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-tex.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-vb.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-vhdl.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-wiki.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-xq.js +3 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-yaml.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/prettify.js +30 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/run_prettify.js +34 -0
- data/app/assets/javascripts/rails_marketplace/js/editor/external/jquery.hotkeys.js +100 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/curvedLines.js +483 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/date.js +104 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.orderBars.js +201 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.pie.js +820 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.resize.js +57 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.spline.js +212 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.stack.js +188 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.time.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.tooltip.min.js +12 -0
- data/app/assets/javascripts/rails_marketplace/js/gauge/gauge.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/gauge/gauge_demo.js +21 -0
- data/app/assets/javascripts/rails_marketplace/js/icheck/icheck.min.js +11 -0
- data/app/assets/javascripts/rails_marketplace/js/input_mask/jquery.inputmask.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/ion_range/ion.rangeSlider.min.js +66 -0
- data/app/assets/javascripts/rails_marketplace/js/jquery.min.js +5 -0
- data/app/assets/javascripts/rails_marketplace/js/knob/jquery.knob.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/maps/gdp-data.js +185 -0
- data/app/assets/javascripts/rails_marketplace/js/maps/jquery-jvectormap-2.0.3.min.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/maps/jquery-jvectormap-us-aea-en.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/maps/jquery-jvectormap-world-mill-en.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/maps/us-unemployment.json +1 -0
- data/app/assets/javascripts/rails_marketplace/js/moment/moment.min.js +7 -0
- data/app/assets/javascripts/rails_marketplace/js/moris/example.js +127 -0
- data/app/assets/javascripts/rails_marketplace/js/moris/morris.min.js +7 -0
- data/app/assets/javascripts/rails_marketplace/js/moris/raphael-min.js +11 -0
- data/app/assets/javascripts/rails_marketplace/js/notify/pnotify.buttons.js +132 -0
- data/app/assets/javascripts/rails_marketplace/js/notify/pnotify.core.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/notify/pnotify.nonblock.js +151 -0
- data/app/assets/javascripts/rails_marketplace/js/nprogress.js +476 -0
- data/app/assets/javascripts/rails_marketplace/js/pace/pace.min.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/parsley/parsley.min.js +9 -0
- data/app/assets/javascripts/rails_marketplace/js/progressbar/bootstrap-progressbar.min.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/select/select2.full.js +2 -0
- data/app/assets/javascripts/rails_marketplace/js/sidebar/classie.js +80 -0
- data/app/assets/javascripts/rails_marketplace/js/sidebar/component.css +569 -0
- data/app/assets/javascripts/rails_marketplace/js/sidebar/modernizr.custom.js +4 -0
- data/app/assets/javascripts/rails_marketplace/js/sidebar/sidebarEffects.js +63 -0
- data/app/assets/javascripts/rails_marketplace/js/skycons/skycons.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/sparkline/jquery.sparkline.min.js +5 -0
- data/app/assets/javascripts/rails_marketplace/js/switchery/switchery.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/tags/jquery.tagsinput.min.js +1 -0
- data/app/assets/javascripts/rails_marketplace/js/textarea/autosize.min.js +6 -0
- data/app/assets/javascripts/rails_marketplace/js/validator/validator.js +411 -0
- data/app/assets/javascripts/rails_marketplace/js/wizard/jquery.smartWizard.js +489 -0
- data/app/assets/javascripts/rails_marketplace/less/custom.css +6355 -0
- data/app/assets/javascripts/rails_marketplace/marketplace.js +17 -0
- data/app/assets/javascripts/rails_marketplace/welcome.coffee +3 -0
- data/app/assets/stylesheets/rails_marketplace/application.scss +31 -0
- data/app/assets/stylesheets/rails_marketplace/catalog.scss +132 -0
- data/app/assets/stylesheets/rails_marketplace/css/animate.min.css +11 -0
- data/app/assets/stylesheets/rails_marketplace/css/bootstrap.min.css +6 -0
- data/app/assets/stylesheets/rails_marketplace/css/calendar/fullcalendar.css +1116 -0
- data/app/assets/stylesheets/rails_marketplace/css/calendar/fullcalendar.min.css +5 -0
- data/app/assets/stylesheets/rails_marketplace/css/calendar/fullcalendar.print.css +208 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/bootstrap-colorpicker.min.css +9 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/alpha.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/hue-horizontal.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/hue.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/saturation.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/custom.css +5347 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/css/demo_page.css +103 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/css/demo_table.css +258 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/css/demo_table_jui.css +501 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/css/jquery.dataTables.css +221 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/css/jquery.dataTables_themeroller.css +244 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/Sorting icons.psd +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/back_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/back_enabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/back_enabled_hover.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/favicon.ico +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/forward_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/forward_enabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/forward_enabled_hover.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_asc.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_asc_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_both.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_desc.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_desc_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/datatables/tools/css/dataTables.tableTools.css +336 -0
- data/app/assets/stylesheets/rails_marketplace/css/editor/external/google-code-prettify/prettify.css +1 -0
- data/app/assets/stylesheets/rails_marketplace/css/editor/index.css +42 -0
- data/app/assets/stylesheets/rails_marketplace/css/floatexamples.css +22 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/_all.css +530 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/aero.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/aero.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/aero@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/blue.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/blue.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/blue@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/flat.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/flat.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/flat@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/green.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/green.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/green@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/grey.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/grey.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/grey@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/orange.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/orange.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/orange@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/pink.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/pink.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/pink@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/purple.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/purple.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/purple@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/red.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/red.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/red@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/yellow.css +53 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/yellow.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/yellow@2x.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/css/ion.rangeSlider.css +146 -0
- data/app/assets/stylesheets/rails_marketplace/css/ion.rangeSlider.skinFlat.css +106 -0
- data/app/assets/stylesheets/rails_marketplace/css/maps/jquery-jvectormap-2.0.3.css +135 -0
- data/app/assets/stylesheets/rails_marketplace/css/normalize.css +421 -0
- data/app/assets/stylesheets/rails_marketplace/css/nprogress.css +74 -0
- data/app/assets/stylesheets/rails_marketplace/css/progressbar/bootstrap-progressbar-3.3.0.css +161 -0
- data/app/assets/stylesheets/rails_marketplace/css/select/select2.min.css +404 -0
- data/app/assets/stylesheets/rails_marketplace/css/switchery/switchery.min.css +1 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/css/font-awesome.css +2086 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/css/font-awesome.min.css +4 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/FontAwesome.otf +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.svg +655 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.woff2 +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.svg +288 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/animated.less +34 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/bordered-pulled.less +25 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/core.less +12 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/fixed-width.less +6 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/font-awesome.less +17 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/icons.less +697 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/larger.less +13 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/list.less +19 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/mixins.less +26 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/path.less +15 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/rotated-flipped.less +20 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/spinning.less +29 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/stacked.less +20 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/less/variables.less +708 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_animated.scss +34 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_bordered-pulled.scss +25 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_core.scss +12 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_fixed-width.scss +6 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_icons.scss +697 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_larger.scss +13 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_list.scss +19 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_mixins.scss +26 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_path.scss +15 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_rotated-flipped.scss +20 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_spinning.scss +29 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_stacked.scss +20 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/_variables.scss +708 -0
- data/app/assets/stylesheets/rails_marketplace/fonts/scss/font-awesome.scss +17 -0
- data/app/assets/stylesheets/rails_marketplace/images/1.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/4.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/american-express.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/back_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/back_enabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/back_enabled_hover.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/alpha-horizontal.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/alpha.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/hue-horizontal.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/hue.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/saturation.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/data.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/favicon.ico +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/forward_disabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/forward_enabled.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/forward_enabled_hover.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/icons.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/img.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/loading.gif +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/mastercard.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/paypal2.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/picture-2.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/picture.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/picture2.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/prod1.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/prod2.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/prod3.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/prod4.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/prod5.jpg +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-flat.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-modern.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-nice.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-simple.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/user.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/images/visa.png +0 -0
- data/app/assets/stylesheets/rails_marketplace/marketplace.scss +20 -0
- data/app/assets/stylesheets/rails_marketplace/pace.css +76 -0
- data/app/assets/stylesheets/rails_marketplace/welcome.scss +3 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/rails_marketplace/admin_controller.rb +151 -0
- data/app/controllers/rails_marketplace/application_controller.rb +4 -0
- data/app/controllers/rails_marketplace/catalog_controller.rb +172 -0
- data/app/controllers/rails_marketplace/seller_controller.rb +181 -0
- data/app/helpers/rails_marketplace/admin_helper.rb +16 -0
- data/app/helpers/rails_marketplace/application_helper.rb +4 -0
- data/app/helpers/rails_marketplace/catalog_helper.rb +4 -0
- data/app/helpers/rails_marketplace/plainpage_helper.rb +4 -0
- data/app/helpers/rails_marketplace/seller_helper.rb +16 -0
- data/app/models/rails_marketplace/admin.rb +10 -0
- data/app/models/rails_marketplace/admin_setting.rb +13 -0
- data/app/models/rails_marketplace/cart.rb +49 -0
- data/app/models/rails_marketplace/cart_product.rb +7 -0
- data/app/models/rails_marketplace/category.rb +22 -0
- data/app/models/rails_marketplace/category_product.rb +6 -0
- data/app/models/rails_marketplace/customer.rb +6 -0
- data/app/models/rails_marketplace/order.rb +22 -0
- data/app/models/rails_marketplace/order_product.rb +7 -0
- data/app/models/rails_marketplace/product.rb +34 -0
- data/app/models/rails_marketplace/seller.rb +13 -0
- data/app/models/rails_marketplace/seller_setting.rb +5 -0
- data/app/views/layouts/rails_marketplace/application.html.erb +37 -0
- data/app/views/layouts/rails_marketplace/seller_central.html.erb +58 -0
- data/app/views/layouts/rails_marketplace/super_admin.html.erb +58 -0
- data/app/views/rails_marketplace/admin/add_category.html.erb +63 -0
- data/app/views/rails_marketplace/admin/categories.html.erb +50 -0
- data/app/views/rails_marketplace/admin/category_products.html.erb +54 -0
- data/app/views/rails_marketplace/admin/dashboard.html.erb +50 -0
- data/app/views/rails_marketplace/admin/edit_category.html.erb +63 -0
- data/app/views/rails_marketplace/admin/login_form.html.erb +20 -0
- data/app/views/rails_marketplace/admin/products.html.erb +54 -0
- data/app/views/rails_marketplace/admin/seller_products.html.erb +54 -0
- data/app/views/rails_marketplace/admin/sellers.html.erb +48 -0
- data/app/views/rails_marketplace/admin/settings_form.html.erb +39 -0
- data/app/views/rails_marketplace/admin/signup_form.html.erb +25 -0
- data/app/views/rails_marketplace/catalog/cart.html.erb +80 -0
- data/app/views/rails_marketplace/catalog/category_products.html.erb +52 -0
- data/app/views/rails_marketplace/catalog/checkout.html.erb +207 -0
- data/app/views/rails_marketplace/catalog/checkout_success.html.erb +15 -0
- data/app/views/rails_marketplace/catalog/index.html.erb +1 -0
- data/app/views/rails_marketplace/catalog/product_detail.html.erb +88 -0
- data/app/views/rails_marketplace/partials/_admin_sidenav.html.erb +80 -0
- data/app/views/rails_marketplace/partials/_admin_topnav.html.erb +111 -0
- data/app/views/rails_marketplace/partials/_footer.html.erb +19 -0
- data/app/views/rails_marketplace/partials/_menu.html.erb +42 -0
- data/app/views/rails_marketplace/partials/_sidenav.html.erb +77 -0
- data/app/views/rails_marketplace/partials/_topnav.html.erb +105 -0
- data/app/views/rails_marketplace/seller/add_bulk_products.html.erb +0 -0
- data/app/views/rails_marketplace/seller/add_product.html.erb +67 -0
- data/app/views/rails_marketplace/seller/dashboard.html.erb +50 -0
- data/app/views/rails_marketplace/seller/edit_product.html.erb +69 -0
- data/app/views/rails_marketplace/seller/login_form.html.erb +36 -0
- data/app/views/rails_marketplace/seller/order_details.html.erb +69 -0
- data/app/views/rails_marketplace/seller/orders.html.erb +68 -0
- data/app/views/rails_marketplace/seller/products.html.erb +55 -0
- data/app/views/rails_marketplace/seller/settings_general.html.erb +64 -0
- data/app/views/rails_marketplace/seller/settings_payment.html.erb +34 -0
- data/app/views/rails_marketplace/seller/settings_shipping.html.erb +34 -0
- data/app/views/rails_marketplace/seller/settings_tax.html.erb +34 -0
- data/app/views/rails_marketplace/seller/signup_form.html.erb +28 -0
- data/app/views/rails_marketplace/seller/step_two.html.erb +17 -0
- data/app/views/rails_marketplace/shared/_admin_error_messages.html.erb +12 -0
- data/app/views/rails_marketplace/shared/_product_error_messages.html.erb +12 -0
- data/app/views/rails_marketplace/shared/_seller_error_messages.html.erb +12 -0
- data/config/routes.rb +58 -0
- data/db/migrate/20161013194852_create_sellers.rb +13 -0
- data/db/migrate/20161013195006_create_customers.rb +13 -0
- data/db/migrate/20161013195758_create_orders.rb +8 -0
- data/db/migrate/20161014013032_create_category_products.rb +10 -0
- data/db/migrate/20161014013058_create_order_products.rb +13 -0
- data/db/migrate/20161017185755_create_admins.rb +12 -0
- data/db/migrate/20161017232347_create_products.rb +14 -0
- data/db/migrate/20161019012043_add_reference_product_seller.rb +5 -0
- data/db/migrate/20161019013502_change_data_type_images_files.rb +6 -0
- data/db/migrate/20161019022020_add_reference_order_customers.rb +5 -0
- data/db/migrate/20161109191644_create_categories.rb +15 -0
- data/db/migrate/20161110021043_create_friendly_id_slugs.rb +15 -0
- data/db/migrate/20161110021131_add_slug_to_category.rb +6 -0
- data/db/migrate/20161110024118_add_slug_to_product.rb +6 -0
- data/db/migrate/20161111001446_create_carts.rb +8 -0
- data/db/migrate/20161111004451_create_cart_products.rb +12 -0
- data/db/migrate/20161115013956_add_currency_format_to_price.rb +6 -0
- data/db/migrate/20161115015227_monetize_product.rb +5 -0
- data/db/migrate/20161115032905_add_stripe_key_to_admin.rb +6 -0
- data/db/migrate/20161124015608_add_order_fields.rb +16 -0
- data/db/migrate/20161207193917_add_seller_to_orders.rb +6 -0
- data/db/migrate/20161208012601_add_price_to_cart_products.rb +6 -0
- data/db/migrate/20161208013402_add_money_to_cart_products.rb +6 -0
- data/db/migrate/20170217183953_create_seller_settings.rb +29 -0
- data/db/migrate/20170218003202_create_admin_settings.rb +24 -0
- data/db/migrate/20170224230449_create_stripe_managed_accounts.rb +9 -0
- data/db/migrate/20170224233736_add_stripe_to_admin_settings.rb +9 -0
- data/db/migrate/20170224235259_add_id_to_settings.rb +6 -0
- data/db/migrate/20170225002939_delete_stripe_accounts.rb +8 -0
- data/db/migrate/20170225003252_add_stripe_account_id_to_seller_settings.rb +5 -0
- data/lib/rails_marketplace.rb +4 -0
- data/lib/rails_marketplace/engine.rb +9 -0
- data/lib/rails_marketplace/version.rb +3 -0
- data/lib/tasks/rails_marketplace_tasks.rake +4 -0
- data/spec/controllers/rails_marketplace/catalog_controller_spec.rb +75 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +32 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/schema.rb +194 -0
- data/spec/dummy/log/development.log +889 -0
- data/spec/dummy/log/test.log +1229 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/helpers/rails_marketplace/catalog_helper_spec.rb +17 -0
- data/spec/routing/rails_marketplace/catalog_routing_spec.rb +44 -0
- data/spec/spec_helper.rb +44 -0
- data/spec/views/rails_marketplace/catalog/edit.html.erb_spec.rb +15 -0
- data/spec/views/rails_marketplace/catalog/index.html.erb_spec.rb +15 -0
- data/spec/views/rails_marketplace/catalog/new.html.erb_spec.rb +15 -0
- data/spec/views/rails_marketplace/catalog/show.html.erb_spec.rb +12 -0
- metadata +595 -0
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! pace 1.0.0 */
|
2
|
+
(function(){var 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=[].slice,Y={}.hasOwnProperty,Z=function(a,b){function c(){this.constructor=a}for(var d in b)Y.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},$=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};for(u={catchupTime:100,initialRate:.03,minTime:250,ghostTime:100,maxProgressPerFrame:20,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:"body",elements:{checkInterval:100,selectors:["body"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:["GET"],trackWebSockets:!0,ignoreURLs:[]}},C=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?a:+new Date},E=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,t=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==E&&(E=function(a){return setTimeout(a,50)},t=function(a){return clearTimeout(a)}),G=function(a){var b,c;return b=C(),(c=function(){var d;return d=C()-b,d>=33?(b=C(),a(d,function(){return E(c)})):setTimeout(c,33-d)})()},F=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?X.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},v=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?X.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)Y.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?v(b[a],e):b[a]=e);return b},q=function(a){var b,c,d,e,f;for(c=b=0,e=0,f=a.length;f>e;e++)d=a[e],c+=Math.abs(d),b++;return c/b},x=function(a,b){var c,d,e;if(null==a&&(a="options"),null==b&&(b=!0),e=document.querySelector("[data-pace-"+a+"]")){if(c=e.getAttribute("data-pace-"+a),!b)return c;try{return JSON.parse(c)}catch(f){return d=f,"undefined"!=typeof console&&null!==console?console.error("Error parsing inline pace options",d):void 0}}},g=function(){function a(){}return a.prototype.on=function(a,b,c,d){var e;return null==d&&(d=!1),null==this.bindings&&(this.bindings={}),null==(e=this.bindings)[a]&&(e[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})},a.prototype.once=function(a,b,c){return this.on(a,b,c,!0)},a.prototype.off=function(a,b){var c,d,e;if(null!=(null!=(d=this.bindings)?d[a]:void 0)){if(null==b)return delete this.bindings[a];for(c=0,e=[];c<this.bindings[a].length;)e.push(this.bindings[a][c].handler===b?this.bindings[a].splice(c,1):c++);return e}},a.prototype.trigger=function(){var a,b,c,d,e,f,g,h,i;if(c=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],null!=(g=this.bindings)?g[c]:void 0){for(e=0,i=[];e<this.bindings[c].length;)h=this.bindings[c][e],d=h.handler,b=h.ctx,f=h.once,d.apply(null!=b?b:this,a),i.push(f?this.bindings[c].splice(e,1):e++);return i}},a}(),j=window.Pace||{},window.Pace=j,v(j,g.prototype),D=j.options=v({},u,window.paceOptions,x()),U=["ajax","document","eventLag","elements"],Q=0,S=U.length;S>Q;Q++)K=U[Q],D[K]===!0&&(D[K]=u[K]);i=function(a){function b(){return V=b.__super__.constructor.apply(this,arguments)}return Z(b,a),b}(Error),b=function(){function a(){this.progress=0}return a.prototype.getElement=function(){var a;if(null==this.el){if(a=document.querySelector(D.target),!a)throw new i;this.el=document.createElement("div"),this.el.className="pace pace-active",document.body.className=document.body.className.replace(/pace-done/g,""),document.body.className+=" pace-running",this.el.innerHTML='<div class="pace-progress">\n <div class="pace-progress-inner"></div>\n</div>\n<div class="pace-activity"></div>',null!=a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getElement(),a.className=a.className.replace("pace-active",""),a.className+=" pace-inactive",document.body.className=document.body.className.replace("pace-running",""),document.body.className+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b,c,d,e,f,g;if(null==document.querySelector(D.target))return!1;for(a=this.getElement(),d="translate3d("+this.progress+"%, 0, 0)",g=["webkitTransform","msTransform","transform"],e=0,f=g.length;f>e;e++)b=g[e],a.children[0].style[b]=d;return(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(a.children[0].setAttribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?c="99":(c=this.progress<10?"0":"",c+=0|this.progress),a.children[0].setAttribute("data-progress",""+c)),this.lastRenderedProgress=this.progress},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),P=window.XMLHttpRequest,O=window.XDomainRequest,N=window.WebSocket,w=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],f.push(null==a[d]&&"function"!=typeof e?a[d]=e:void 0)}catch(g){c=g}return f},A=[],j.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("ignore"),c=b.apply(null,a),A.shift(),c},j.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("track"),c=b.apply(null,a),A.shift(),c},J=function(a){var b;if(null==a&&(a="GET"),"track"===A[0])return"force";if(!A.length&&D.ajax){if("socket"===a&&D.ajax.trackWebSockets)return!0;if(b=a.toUpperCase(),$.call(D.ajax.trackMethods,b)>=0)return!0}return!1},k=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return J(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.XMLHttpRequest=function(b){var c;return c=new P(b),a(c),c};try{w(window.XMLHttpRequest,P)}catch(d){}if(null!=O){window.XDomainRequest=function(){var b;return b=new O,a(b),b};try{w(window.XDomainRequest,O)}catch(d){}}if(null!=N&&D.ajax.trackWebSockets){window.WebSocket=function(a,b){var d;return d=null!=b?new N(a,b):new N(a),J("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d};try{w(window.WebSocket,N)}catch(d){}}}return Z(b,a),b}(h),R=null,y=function(){return null==R&&(R=new k),R},I=function(a){var b,c,d,e;for(e=D.ajax.ignoreURLs,c=0,d=e.length;d>c;c++)if(b=e[c],"string"==typeof b){if(-1!==a.indexOf(b))return!0}else if(b.test(a))return!0;return!1},y().on("request",function(b){var c,d,e,f,g;return f=b.type,e=b.request,g=b.url,I(g)?void 0:j.running||D.restartOnRequestAfter===!1&&"force"!==J(f)?void 0:(d=arguments,c=D.restartOnRequestAfter||0,"boolean"==typeof c&&(c=0),setTimeout(function(){var b,c,g,h,i,k;if(b="socket"===f?e.readyState<2:0<(h=e.readyState)&&4>h){for(j.restart(),i=j.sources,k=[],c=0,g=i.length;g>c;c++){if(K=i[c],K instanceof a){K.watch.apply(K,d);break}k.push(void 0)}return k}},c))}),a=function(){function a(){var a=this;this.elements=[],y().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d,e;return d=a.type,b=a.request,e=a.url,I(e)?void 0:(c="socket"===d?new n(b):new o(b),this.elements.push(c))},a}(),o=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.ProgressEvent)for(c=null,a.addEventListener("progress",function(a){return h.progress=a.lengthComputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2},!1),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addEventListener(b,function(){return h.progress=100},!1);else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readyState)||4===b?h.progress=100:3===a.readyState&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),n=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addEventListener(b,function(){return f.progress=100},!1)}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return a.check()},D.elements.checkInterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readyState])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readyState]&&(c.progress=c.states[document.readyState]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=C(),b=setInterval(function(){var g;return g=C()-c-50,c=C(),e.push(g),e.length>D.eventLag.sampleCount&&e.shift(),a=q(e),++d>=D.eventLag.minSamples&&a<D.eventLag.lagThreshold?(f.progress=100,clearInterval(b)):f.progress=100*(3/(a+3))},50)}return a}(),m=function(){function a(a){this.source=a,this.last=this.sinceLastUpdate=0,this.rate=D.initialRate,this.catchup=0,this.progress=this.lastProgress=0,null!=this.source&&(this.progress=F(this.source,"progress"))}return a.prototype.tick=function(a,b){var c;return null==b&&(b=F(this.source,"progress")),b>=100&&(this.done=!0),b===this.last?this.sinceLastUpdate+=a:(this.sinceLastUpdate&&(this.rate=(b-this.last)/this.sinceLastUpdate),this.catchup=(b-this.progress)/D.catchupTime,this.sinceLastUpdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-Math.pow(this.progress/100,D.easeFactor),this.progress+=c*this.rate*a,this.progress=Math.min(this.lastProgress+D.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},a}(),L=null,H=null,r=null,M=null,p=null,s=null,j.running=!1,z=function(){return D.restartOnPushState?j.restart():void 0},null!=window.history.pushState&&(T=window.history.pushState,window.history.pushState=function(){return z(),T.apply(window.history,arguments)}),null!=window.history.replaceState&&(W=window.history.replaceState,window.history.replaceState=function(){return z(),W.apply(window.history,arguments)}),l={ajax:a,elements:d,document:c,eventLag:f},(B=function(){var a,c,d,e,f,g,h,i;for(j.sources=L=[],g=["ajax","elements","document","eventLag"],c=0,e=g.length;e>c;c++)a=g[c],D[a]!==!1&&L.push(new l[a](D[a]));for(i=null!=(h=D.extraSources)?h:[],d=0,f=i.length;f>d;d++)K=i[d],L.push(new K(D));return j.bar=r=new b,H=[],M=new m})(),j.stop=function(){return j.trigger("stop"),j.running=!1,r.destroy(),s=!0,null!=p&&("function"==typeof t&&t(p),p=null),B()},j.restart=function(){return j.trigger("restart"),j.stop(),j.start()},j.go=function(){var a;return j.running=!0,r.render(),a=C(),s=!1,p=G(function(b,c){var d,e,f,g,h,i,k,l,n,o,p,q,t,u,v,w;for(l=100-r.progress,e=p=0,f=!0,i=q=0,u=L.length;u>q;i=++q)for(K=L[i],o=null!=H[i]?H[i]:H[i]=[],h=null!=(w=K.elements)?w:[K],k=t=0,v=h.length;v>t;k=++t)g=h[k],n=null!=o[k]?o[k]:o[k]=new m(g),f&=n.done,n.done||(e++,p+=n.tick(b));return d=p/e,r.update(M.tick(b,d)),r.done()||f||s?(r.update(100),j.trigger("done"),setTimeout(function(){return r.finish(),j.running=!1,j.trigger("hide")},Math.max(D.ghostTime,Math.max(D.minTime-(C()-a),0)))):c()})},j.start=function(a){v(D,a),j.running=!0;try{r.render()}catch(b){i=b}return document.querySelector(".pace")?(j.trigger("start"),j.go()):setTimeout(j.start,50)},"function"==typeof define&&define.amd?define(function(){return j}):"object"==typeof exports?module.exports=j:D.startOnPageLoad&&j.start()}).call(this);
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/*!
|
2
|
+
* Parsleyjs
|
3
|
+
* Guillaume Potier - <guillaume@wisembly.com>
|
4
|
+
* Version 2.0.6 - built Sat Jan 24 2015 14:44:37
|
5
|
+
* MIT Licensed
|
6
|
+
*
|
7
|
+
*/
|
8
|
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"undefined"==typeof a&&"undefined"!=typeof window.jQuery&&(a=window.jQuery);var b={attr:function(a,b,c){var d,e={},f=this.msieversion(),g=new RegExp("^"+b,"i");if("undefined"==typeof a||"undefined"==typeof a[0])return{};for(var h in a[0].attributes)if(d=a[0].attributes[h],"undefined"!=typeof d&&null!==d&&(!f||f>=8||d.specified)&&g.test(d.name)){if("undefined"!=typeof c&&new RegExp(c+"$","i").test(d.name))return!0;e[this.camelize(d.name.replace(b,""))]=this.deserializeValue(d.value)}return"undefined"==typeof c?e:!1},setAttr:function(a,b,c,d){a[0].setAttribute(this.dasherize(b+c),String(d))},get:function(a,b){for(var c=0,d=(b||"").split(".");this.isObject(a)||this.isArray(a);)if(a=a[d[c++]],c===d.length)return a;return void 0},hash:function(a){return String(Math.random()).substring(2,a?a+2:9)},isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},isObject:function(a){return a===Object(a)},deserializeValue:function(b){var c;try{return b?"true"==b||("false"==b?!1:"null"==b?null:isNaN(c=Number(b))?/^[\[\{]/.test(b)?a.parseJSON(b):b:c):b}catch(d){return b}},camelize:function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},dasherize:function(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},msieversion:function(){var a=window.navigator.userAgent,b=a.indexOf("MSIE ");return b>0||navigator.userAgent.match(/Trident.*rv\:11\./)?parseInt(a.substring(b+5,a.indexOf(".",b)),10):0}},c={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(){},errorsContainer:function(){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},d=function(){};d.prototype={asyncSupport:!1,actualizeOptions:function(){return this.options=this.OptionsFactory.get(this),this},validateThroughValidator:function(a,b,c){return window.ParsleyValidator.validate(a,b,c)},subscribe:function(b,c){return a.listenTo(this,b.toLowerCase(),c),this},unsubscribe:function(b){return a.unsubscribeTo(this,b.toLowerCase()),this},reset:function(){if("ParsleyForm"!==this.__class__)return a.emit("parsley:field:reset",this);for(var b=0;b<this.fields.length;b++)a.emit("parsley:field:reset",this.fields[b]);a.emit("parsley:form:reset",this)},destroy:function(){if("ParsleyForm"!==this.__class__)return this.$element.removeData("Parsley"),this.$element.removeData("ParsleyFieldMultiple"),void a.emit("parsley:field:destroy",this);for(var b=0;b<this.fields.length;b++)this.fields[b].destroy();this.$element.removeData("Parsley"),a.emit("parsley:form:destroy",this)}};var e=function(){var a={},b=function(a){this.__class__="Validator",this.__version__="1.0.1",this.options=a||{},this.bindingKey=this.options.bindingKey||"_validatorjsConstraint"};b.prototype={constructor:b,validate:function(a,b,c){if("string"!=typeof a&&"object"!=typeof a)throw new Error("You must validate an object or a string");return"string"==typeof a||g(a)?this._validateString(a,b,c):this.isBinded(a)?this._validateBindedObject(a,b):this._validateObject(a,b,c)},bind:function(a,b){if("object"!=typeof a)throw new Error("Must bind a Constraint to an object");return a[this.bindingKey]=new c(b),this},unbind:function(a){return"undefined"==typeof a._validatorjsConstraint?this:(delete a[this.bindingKey],this)},isBinded:function(a){return"undefined"!=typeof a[this.bindingKey]},getBinded:function(a){return this.isBinded(a)?a[this.bindingKey]:null},_validateString:function(a,b,c){var f,h=[];g(b)||(b=[b]);for(var i=0;i<b.length;i++){if(!(b[i]instanceof e))throw new Error("You must give an Assert or an Asserts array to validate a string");f=b[i].check(a,c),f instanceof d&&h.push(f)}return h.length?h:!0},_validateObject:function(a,b,d){if("object"!=typeof b)throw new Error("You must give a constraint to validate an object");return b instanceof c?b.check(a,d):new c(b).check(a,d)},_validateBindedObject:function(a,b){return a[this.bindingKey].check(a,b)}},b.errorCode={must_be_a_string:"must_be_a_string",must_be_an_array:"must_be_an_array",must_be_a_number:"must_be_a_number",must_be_a_string_or_array:"must_be_a_string_or_array"};var c=function(a,b){if(this.__class__="Constraint",this.options=b||{},this.nodes={},a)try{this._bootstrap(a)}catch(c){throw new Error("Should give a valid mapping object to Constraint",c,a)}};c.prototype={constructor:c,check:function(a,b){var c,d={};for(var h in this.nodes){for(var i=!1,j=this.get(h),k=g(j)?j:[j],l=k.length-1;l>=0;l--)"Required"!==k[l].__class__||(i=k[l].requiresValidation(b));if(this.has(h,a)||this.options.strict||i)try{this.has(h,this.options.strict||i?a:void 0)||(new e).HaveProperty(h).validate(a),c=this._check(h,a[h],b),(g(c)&&c.length>0||!g(c)&&!f(c))&&(d[h]=c)}catch(m){d[h]=m}}return f(d)?!0:d},add:function(a,b){if(b instanceof e||g(b)&&b[0]instanceof e)return this.nodes[a]=b,this;if("object"==typeof b&&!g(b))return this.nodes[a]=b instanceof c?b:new c(b),this;throw new Error("Should give an Assert, an Asserts array, a Constraint",b)},has:function(a,b){return b="undefined"!=typeof b?b:this.nodes,"undefined"!=typeof b[a]},get:function(a,b){return this.has(a)?this.nodes[a]:b||null},remove:function(a){var b=[];for(var c in this.nodes)c!==a&&(b[c]=this.nodes[c]);return this.nodes=b,this},_bootstrap:function(a){if(a instanceof c)return this.nodes=a.nodes;for(var b in a)this.add(b,a[b])},_check:function(a,b,d){if(this.nodes[a]instanceof e)return this._checkAsserts(b,[this.nodes[a]],d);if(g(this.nodes[a]))return this._checkAsserts(b,this.nodes[a],d);if(this.nodes[a]instanceof c)return this.nodes[a].check(b,d);throw new Error("Invalid node",this.nodes[a])},_checkAsserts:function(a,b,c){for(var d,e=[],f=0;f<b.length;f++)d=b[f].check(a,c),"undefined"!=typeof d&&!0!==d&&e.push(d);return e}};var d=function(a,b,c){if(this.__class__="Violation",!(a instanceof e))throw new Error("Should give an assertion implementing the Assert interface");this.assert=a,this.value=b,"undefined"!=typeof c&&(this.violation=c)};d.prototype={show:function(){var a={assert:this.assert.__class__,value:this.value};return this.violation&&(a.violation=this.violation),a},__toString:function(){return"undefined"!=typeof this.violation&&(this.violation='", '+this.getViolation().constraint+" expected was "+this.getViolation().expected),this.assert.__class__+' assert failed for "'+this.value+this.violation||""},getViolation:function(){var a,b;for(a in this.violation)b=this.violation[a];return{constraint:a,expected:b}}};var e=function(a){this.__class__="Assert",this.__parentClass__=this.__class__,this.groups=[],"undefined"!=typeof a&&this.addGroup(a)};e.prototype={construct:e,requiresValidation:function(a){return a&&!this.hasGroup(a)?!1:!a&&this.hasGroups()?!1:!0},check:function(a,b){if(this.requiresValidation(b))try{return this.validate(a,b)}catch(c){return c}},hasGroup:function(a){return g(a)?this.hasOneOf(a):"Any"===a?!0:this.hasGroups()?-1!==this.groups.indexOf(a):"Default"===a},hasOneOf:function(a){for(var b=0;b<a.length;b++)if(this.hasGroup(a[b]))return!0;return!1},hasGroups:function(){return this.groups.length>0},addGroup:function(a){return g(a)?this.addGroups(a):(this.hasGroup(a)||this.groups.push(a),this)},removeGroup:function(a){for(var b=[],c=0;c<this.groups.length;c++)a!==this.groups[c]&&b.push(this.groups[c]);return this.groups=b,this},addGroups:function(a){for(var b=0;b<a.length;b++)this.addGroup(a[b]);return this},HaveProperty:function(a){return this.__class__="HaveProperty",this.node=a,this.validate=function(a){if("undefined"==typeof a[this.node])throw new d(this,a,{value:this.node});return!0},this},Blank:function(){return this.__class__="Blank",this.validate=function(a){if("string"!=typeof a)throw new d(this,a,{value:b.errorCode.must_be_a_string});if(""!==a.replace(/^\s+/g,"").replace(/\s+$/g,""))throw new d(this,a);return!0},this},Callback:function(a){if(this.__class__="Callback",this.arguments=Array.prototype.slice.call(arguments),1===this.arguments.length?this.arguments=[]:this.arguments.splice(0,1),"function"!=typeof a)throw new Error("Callback must be instanciated with a function");return this.fn=a,this.validate=function(a){var b=this.fn.apply(this,[a].concat(this.arguments));if(!0!==b)throw new d(this,a,{result:b});return!0},this},Choice:function(a){if(this.__class__="Choice",!g(a)&&"function"!=typeof a)throw new Error("Choice must be instanciated with an array or a function");return this.list=a,this.validate=function(a){for(var b="function"==typeof this.list?this.list():this.list,c=0;c<b.length;c++)if(a===b[c])return!0;throw new d(this,a,{choices:b})},this},Collection:function(a){return this.__class__="Collection",this.constraint="undefined"!=typeof a?a instanceof e?a:new c(a):!1,this.validate=function(a,c){var e,h=new b,i=0,j={},k=this.groups.length?this.groups:c;if(!g(a))throw new d(this,a,{value:b.errorCode.must_be_an_array});for(var l=0;l<a.length;l++)e=this.constraint?h.validate(a[l],this.constraint,k):h.validate(a[l],k),f(e)||(j[i]=e),i++;return f(j)?!0:j},this},Count:function(a){return this.__class__="Count",this.count=a,this.validate=function(a){if(!g(a))throw new d(this,a,{value:b.errorCode.must_be_an_array});var c="function"==typeof this.count?this.count(a):this.count;if(isNaN(Number(c)))throw new Error("Count must be a valid interger",c);if(c!==a.length)throw new d(this,a,{count:c});return!0},this},Email:function(){return this.__class__="Email",this.validate=function(a){var c=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;if("string"!=typeof a)throw new d(this,a,{value:b.errorCode.must_be_a_string});if(!c.test(a))throw new d(this,a);return!0},this},EqualTo:function(a){if(this.__class__="EqualTo","undefined"==typeof a)throw new Error("EqualTo must be instanciated with a value or a function");return this.reference=a,this.validate=function(a){var b="function"==typeof this.reference?this.reference(a):this.reference;if(b!==a)throw new d(this,a,{value:b});return!0},this},GreaterThan:function(a){if(this.__class__="GreaterThan","undefined"==typeof a)throw new Error("Should give a threshold value");return this.threshold=a,this.validate=function(a){if(""===a||isNaN(Number(a)))throw new d(this,a,{value:b.errorCode.must_be_a_number});if(this.threshold>=a)throw new d(this,a,{threshold:this.threshold});return!0},this},GreaterThanOrEqual:function(a){if(this.__class__="GreaterThanOrEqual","undefined"==typeof a)throw new Error("Should give a threshold value");return this.threshold=a,this.validate=function(a){if(""===a||isNaN(Number(a)))throw new d(this,a,{value:b.errorCode.must_be_a_number});if(this.threshold>a)throw new d(this,a,{threshold:this.threshold});return!0},this},InstanceOf:function(a){if(this.__class__="InstanceOf","undefined"==typeof a)throw new Error("InstanceOf must be instanciated with a value");return this.classRef=a,this.validate=function(a){if(!0!=a instanceof this.classRef)throw new d(this,a,{classRef:this.classRef});return!0},this},Length:function(a){if(this.__class__="Length",!a.min&&!a.max)throw new Error("Lenth assert must be instanciated with a { min: x, max: y } object");return this.min=a.min,this.max=a.max,this.validate=function(a){if("string"!=typeof a&&!g(a))throw new d(this,a,{value:b.errorCode.must_be_a_string_or_array});if("undefined"!=typeof this.min&&this.min===this.max&&a.length!==this.min)throw new d(this,a,{min:this.min,max:this.max});if("undefined"!=typeof this.max&&a.length>this.max)throw new d(this,a,{max:this.max});if("undefined"!=typeof this.min&&a.length<this.min)throw new d(this,a,{min:this.min});return!0},this},LessThan:function(a){if(this.__class__="LessThan","undefined"==typeof a)throw new Error("Should give a threshold value");return this.threshold=a,this.validate=function(a){if(""===a||isNaN(Number(a)))throw new d(this,a,{value:b.errorCode.must_be_a_number});if(this.threshold<=a)throw new d(this,a,{threshold:this.threshold});return!0},this},LessThanOrEqual:function(a){if(this.__class__="LessThanOrEqual","undefined"==typeof a)throw new Error("Should give a threshold value");return this.threshold=a,this.validate=function(a){if(""===a||isNaN(Number(a)))throw new d(this,a,{value:b.errorCode.must_be_a_number});if(this.threshold<a)throw new d(this,a,{threshold:this.threshold});return!0},this},NotNull:function(){return this.__class__="NotNull",this.validate=function(a){if(null===a||"undefined"==typeof a)throw new d(this,a);return!0},this},NotBlank:function(){return this.__class__="NotBlank",this.validate=function(a){if("string"!=typeof a)throw new d(this,a,{value:b.errorCode.must_be_a_string});if(""===a.replace(/^\s+/g,"").replace(/\s+$/g,""))throw new d(this,a);return!0},this},Null:function(){return this.__class__="Null",this.validate=function(a){if(null!==a)throw new d(this,a);return!0},this},Range:function(a,b){if(this.__class__="Range","undefined"==typeof a||"undefined"==typeof b)throw new Error("Range assert expects min and max values");return this.min=a,this.max=b,this.validate=function(a){try{return"string"==typeof a&&isNaN(Number(a))||g(a)?(new e).Length({min:this.min,max:this.max}).validate(a):(new e).GreaterThanOrEqual(this.min).validate(a)&&(new e).LessThanOrEqual(this.max).validate(a),!0}catch(b){throw new d(this,a,b.violation)}return!0},this},Regexp:function(a,c){if(this.__class__="Regexp","undefined"==typeof a)throw new Error("You must give a regexp");return this.regexp=a,this.flag=c||"",this.validate=function(a){if("string"!=typeof a)throw new d(this,a,{value:b.errorCode.must_be_a_string});if(!new RegExp(this.regexp,this.flag).test(a))throw new d(this,a,{regexp:this.regexp,flag:this.flag});return!0},this},Required:function(){return this.__class__="Required",this.validate=function(a){if("undefined"==typeof a)throw new d(this,a);try{"string"==typeof a?(new e).NotNull().validate(a)&&(new e).NotBlank().validate(a):!0===g(a)&&(new e).Length({min:1}).validate(a)}catch(b){throw new d(this,a)}return!0},this},Unique:function(a){return this.__class__="Unique","object"==typeof a&&(this.key=a.key),this.validate=function(a){var c,e=[];if(!g(a))throw new d(this,a,{value:b.errorCode.must_be_an_array});for(var f=0;f<a.length;f++)if(c="object"==typeof a[f]?a[f][this.key]:a[f],"undefined"!=typeof c){if(-1!==e.indexOf(c))throw new d(this,a,{value:c});e.push(c)}return!0},this}},a.Assert=e,a.Validator=b,a.Violation=d,a.Constraint=c,Array.prototype.indexOf||(Array.prototype.indexOf=function(a){if(null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!==d&&1/0!=d&&d!=-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1});var f=function(a){for(var b in a)return!1;return!0},g=function(a){return"[object Array]"===Object.prototype.toString.call(a)};return"function"==typeof define&&define.amd?define("vendors/validator.js/dist/validator",[],function(){return a}):"undefined"!=typeof module&&module.exports?module.exports=a:window["undefined"!=typeof validatorjs_ns?validatorjs_ns:"Validator"]=a,a}();e="undefined"!=typeof e?e:"undefined"!=typeof module?module.exports:null;var f=function(a,b){this.__class__="ParsleyValidator",this.Validator=e,this.locale="en",this.init(a||{},b||{})};f.prototype={init:function(b,c){this.catalog=c;for(var d in b)this.addValidator(d,b[d].fn,b[d].priority,b[d].requirementsTransformer);a.emit("parsley:validator:init")},setLocale:function(a){if("undefined"==typeof this.catalog[a])throw new Error(a+" is not available in the catalog");return this.locale=a,this},addCatalog:function(a,b,c){return"object"==typeof b&&(this.catalog[a]=b),!0===c?this.setLocale(a):this},addMessage:function(a,b,c){return"undefined"==typeof this.catalog[a]&&(this.catalog[a]={}),this.catalog[a][b.toLowerCase()]=c,this},validate:function(){return(new this.Validator.Validator).validate.apply(new e.Validator,arguments)},addValidator:function(b,c,d,f){return this.validators[b.toLowerCase()]=function(b){return a.extend((new e.Assert).Callback(c,b),{priority:d,requirementsTransformer:f})},this},updateValidator:function(a,b,c,d){return this.addValidator(a,b,c,d)},removeValidator:function(a){return delete this.validators[a],this},getErrorMessage:function(a){var b;return b="type"===a.name?this.catalog[this.locale][a.name][a.requirements]:this.formatMessage(this.catalog[this.locale][a.name],a.requirements),""!==b?b:this.catalog[this.locale].defaultMessage},formatMessage:function(a,b){if("object"==typeof b){for(var c in b)a=this.formatMessage(a,b[c]);return a}return"string"==typeof a?a.replace(new RegExp("%s","i"),b):""},validators:{notblank:function(){return a.extend((new e.Assert).NotBlank(),{priority:2})},required:function(){return a.extend((new e.Assert).Required(),{priority:512})},type:function(b){var c;switch(b){case"email":c=(new e.Assert).Email();break;case"range":case"number":c=(new e.Assert).Regexp("^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$");break;case"integer":c=(new e.Assert).Regexp("^-?\\d+$");break;case"digits":c=(new e.Assert).Regexp("^\\d+$");break;case"alphanum":c=(new e.Assert).Regexp("^\\w+$","i");break;case"url":c=(new e.Assert).Regexp("(https?:\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,24}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)","i");break;default:throw new Error("validator type `"+b+"` is not supported")}return a.extend(c,{priority:256})},pattern:function(b){var c="";return/^\/.*\/(?:[gimy]*)$/.test(b)&&(c=b.replace(/.*\/([gimy]*)$/,"$1"),b=b.replace(new RegExp("^/(.*?)/"+c+"$"),"$1")),a.extend((new e.Assert).Regexp(b,c),{priority:64})},minlength:function(b){return a.extend((new e.Assert).Length({min:b}),{priority:30,requirementsTransformer:function(){return"string"!=typeof b||isNaN(b)?b:parseInt(b,10)}})},maxlength:function(b){return a.extend((new e.Assert).Length({max:b}),{priority:30,requirementsTransformer:function(){return"string"!=typeof b||isNaN(b)?b:parseInt(b,10)}})},length:function(b){return a.extend((new e.Assert).Length({min:b[0],max:b[1]}),{priority:32})},mincheck:function(a){return this.minlength(a)},maxcheck:function(a){return this.maxlength(a)},check:function(a){return this.length(a)},min:function(b){return a.extend((new e.Assert).GreaterThanOrEqual(b),{priority:30,requirementsTransformer:function(){return"string"!=typeof b||isNaN(b)?b:parseInt(b,10)}})},max:function(b){return a.extend((new e.Assert).LessThanOrEqual(b),{priority:30,requirementsTransformer:function(){return"string"!=typeof b||isNaN(b)?b:parseInt(b,10)}})},range:function(b){return a.extend((new e.Assert).Range(b[0],b[1]),{priority:32,requirementsTransformer:function(){for(var a=0;a<b.length;a++)b[a]="string"!=typeof b[a]||isNaN(b[a])?b[a]:parseInt(b[a],10);return b}})},equalto:function(b){return a.extend((new e.Assert).EqualTo(b),{priority:256,requirementsTransformer:function(){return a(b).length?a(b).val():b}})}}};var g=function(){this.__class__="ParsleyUI"};g.prototype={listen:function(){return a.listen("parsley:form:init",this,this.setupForm),a.listen("parsley:field:init",this,this.setupField),a.listen("parsley:field:validated",this,this.reflow),a.listen("parsley:form:validated",this,this.focus),a.listen("parsley:field:reset",this,this.reset),a.listen("parsley:form:destroy",this,this.destroy),a.listen("parsley:field:destroy",this,this.destroy),this},reflow:function(a){if("undefined"!=typeof a._ui&&!1!==a._ui.active){var b=this._diff(a.validationResult,a._ui.lastValidationResult);a._ui.lastValidationResult=a.validationResult,a._ui.validatedOnce=!0,this.manageStatusClass(a),this.manageErrorsMessages(a,b),this.actualizeTriggers(a),(b.kept.length||b.added.length)&&"undefined"==typeof a._ui.failedOnce&&this.manageFailingFieldTrigger(a)}},getErrorsMessages:function(a){if(!0===a.validationResult)return[];for(var b=[],c=0;c<a.validationResult.length;c++)b.push(this._getErrorMessage(a,a.validationResult[c].assert));return b},manageStatusClass:function(a){!0===a.validationResult?this._successClass(a):a.validationResult.length>0?this._errorClass(a):this._resetClass(a)},manageErrorsMessages:function(b,c){if("undefined"==typeof b.options.errorsMessagesDisabled){if("undefined"!=typeof b.options.errorMessage)return c.added.length||c.kept.length?(0===b._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&b._ui.$errorsWrapper.append(a(b.options.errorTemplate).addClass("parsley-custom-error-message")),b._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(b.options.errorMessage)):b._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var d=0;d<c.removed.length;d++)this.removeError(b,c.removed[d].assert.name,!0);for(d=0;d<c.added.length;d++)this.addError(b,c.added[d].assert.name,void 0,c.added[d].assert,!0);for(d=0;d<c.kept.length;d++)this.updateError(b,c.kept[d].assert.name,void 0,c.kept[d].assert,!0)}},addError:function(b,c,d,e,f){b._ui.$errorsWrapper.addClass("filled").append(a(b.options.errorTemplate).addClass("parsley-"+c).html(d||this._getErrorMessage(b,e))),!0!==f&&this._errorClass(b)},updateError:function(a,b,c,d,e){a._ui.$errorsWrapper.addClass("filled").find(".parsley-"+b).html(c||this._getErrorMessage(a,d)),!0!==e&&this._errorClass(a)},removeError:function(a,b,c){a._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+b).remove(),!0!==c&&this.manageStatusClass(a)},focus:function(a){if(!0===a.validationResult||"none"===a.options.focus)return a._focusedField=null;a._focusedField=null;for(var b=0;b<a.fields.length;b++)if(!0!==a.fields[b].validationResult&&a.fields[b].validationResult.length>0&&"undefined"==typeof a.fields[b].options.noFocus){if("first"===a.options.focus)return a._focusedField=a.fields[b].$element,a._focusedField.focus();a._focusedField=a.fields[b].$element}return null===a._focusedField?null:a._focusedField.focus()},_getErrorMessage:function(a,b){var c=b.name+"Message";return"undefined"!=typeof a.options[c]?window.ParsleyValidator.formatMessage(a.options[c],b.requirements):window.ParsleyValidator.getErrorMessage(b)},_diff:function(a,b,c){for(var d=[],e=[],f=0;f<a.length;f++){for(var g=!1,h=0;h<b.length;h++)if(a[f].assert.name===b[h].assert.name){g=!0;break}g?e.push(a[f]):d.push(a[f])}return{kept:e,added:d,removed:c?[]:this._diff(b,a,!0).added}},setupForm:function(b){b.$element.on("submit.Parsley",!1,a.proxy(b.onSubmitValidate,b)),!1!==b.options.uiEnabled&&b.$element.attr("novalidate","")},setupField:function(b){var c={active:!1};!1!==b.options.uiEnabled&&(c.active=!0,b.$element.attr(b.options.namespace+"id",b.__id__),c.$errorClassHandler=this._manageClassHandler(b),c.errorsWrapperId="parsley-id-"+("undefined"!=typeof b.options.multiple?"multiple-"+b.options.multiple:b.__id__),c.$errorsWrapper=a(b.options.errorsWrapper).attr("id",c.errorsWrapperId),c.lastValidationResult=[],c.validatedOnce=!1,c.validationInformationVisible=!1,b._ui=c,b.$element.is(b.options.excluded)||this._insertErrorWrapper(b),this.actualizeTriggers(b))},_manageClassHandler:function(b){if("string"==typeof b.options.classHandler&&a(b.options.classHandler).length)return a(b.options.classHandler);var c=b.options.classHandler(b);return"undefined"!=typeof c&&c.length?c:"undefined"==typeof b.options.multiple||b.$element.is("select")?b.$element:b.$element.parent()},_insertErrorWrapper:function(b){var c;if("string"==typeof b.options.errorsContainer){if(a(b.options.errorsContainer).length)return a(b.options.errorsContainer).append(b._ui.$errorsWrapper);window.console&&window.console.warn&&window.console.warn("The errors container `"+b.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof b.options.errorsContainer&&(c=b.options.errorsContainer(b));return"undefined"!=typeof c&&c.length?c.append(b._ui.$errorsWrapper):"undefined"==typeof b.options.multiple?b.$element.after(b._ui.$errorsWrapper):b.$element.parent().after(b._ui.$errorsWrapper)},actualizeTriggers:function(b){var c=b.$element;if(b.options.multiple&&(c=a("["+b.options.namespace+'multiple="'+b.options.multiple+'"]')),c.off(".Parsley"),!1!==b.options.trigger){var d=b.options.trigger.replace(/^\s+/g,"").replace(/\s+$/g,"");""!==d&&c.on(d.split(" ").join(".Parsley ")+".Parsley",a.proxy("function"==typeof b.eventValidate?b.eventValidate:this.eventValidate,b))}},eventValidate:function(a){new RegExp("key").test(a.type)&&!this._ui.validationInformationVisible&&this.getValue().length<=this.options.validationThreshold||(this._ui.validatedOnce=!0,this.validate())},manageFailingFieldTrigger:function(b){return b._ui.failedOnce=!0,b.options.multiple&&a("["+b.options.namespace+'multiple="'+b.options.multiple+'"]').each(function(){return new RegExp("change","i").test(a(this).parsley().options.trigger||"")?void 0:a(this).on("change.ParsleyFailedOnce",!1,a.proxy(b.validate,b))}),b.$element.is("select")&&!new RegExp("change","i").test(b.options.trigger||"")?b.$element.on("change.ParsleyFailedOnce",!1,a.proxy(b.validate,b)):new RegExp("keyup","i").test(b.options.trigger||"")?void 0:b.$element.on("keyup.ParsleyFailedOnce",!1,a.proxy(b.validate,b))},reset:function(a){a.$element.off(".Parsley"),a.$element.off(".ParsleyFailedOnce"),"undefined"!=typeof a._ui&&"ParsleyForm"!==a.__class__&&(a._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(a),a._ui.validatedOnce=!1,a._ui.lastValidationResult=[],a._ui.validationInformationVisible=!1)},destroy:function(a){this.reset(a),"ParsleyForm"!==a.__class__&&("undefined"!=typeof a._ui&&a._ui.$errorsWrapper.remove(),delete a._ui)},_successClass:function(a){a._ui.validationInformationVisible=!0,a._ui.$errorClassHandler.removeClass(a.options.errorClass).addClass(a.options.successClass)},_errorClass:function(a){a._ui.validationInformationVisible=!0,a._ui.$errorClassHandler.removeClass(a.options.successClass).addClass(a.options.errorClass)},_resetClass:function(a){a._ui.$errorClassHandler.removeClass(a.options.successClass).removeClass(a.options.errorClass)}};var h=function(c,d,e,f){this.__class__="OptionsFactory",this.__id__=b.hash(4),this.formOptions=null,this.fieldOptions=null,this.staticOptions=a.extend(!0,{},c,d,e,{namespace:f})};h.prototype={get:function(a){if("undefined"==typeof a.__class__)throw new Error("Parsley Instance expected");switch(a.__class__){case"Parsley":return this.staticOptions;case"ParsleyForm":return this.getFormOptions(a);case"ParsleyField":case"ParsleyFieldMultiple":return this.getFieldOptions(a);default:throw new Error("Instance "+a.__class__+" is not supported")}},getFormOptions:function(c){return this.formOptions=b.attr(c.$element,this.staticOptions.namespace),a.extend({},this.staticOptions,this.formOptions)},getFieldOptions:function(c){return this.fieldOptions=b.attr(c.$element,this.staticOptions.namespace),null===this.formOptions&&"undefined"!=typeof c.parent&&(this.formOptions=this.getFormOptions(c.parent)),a.extend({},this.staticOptions,this.formOptions,this.fieldOptions)}};var i=function(c,d){if(this.__class__="ParsleyForm",this.__id__=b.hash(4),"OptionsFactory"!==b.get(d,"__class__"))throw new Error("You must give an OptionsFactory instance");this.OptionsFactory=d,this.$element=a(c),this.validationResult=null,this.options=this.OptionsFactory.get(this)};i.prototype={onSubmitValidate:function(b){return this.validate(void 0,void 0,b),!1===this.validationResult&&b instanceof a.Event&&(b.stopImmediatePropagation(),b.preventDefault()),this},validate:function(b,c,d){this.submitEvent=d,this.validationResult=!0;var e=[];a.emit("parsley:form:validate",this),this._refreshFields();for(var f=0;f<this.fields.length;f++)(!b||this._isFieldInGroup(this.fields[f],b))&&(e=this.fields[f].validate(c),!0!==e&&e.length>0&&this.validationResult&&(this.validationResult=!1));return a.emit("parsley:form:"+(this.validationResult?"success":"error"),this),a.emit("parsley:form:validated",this),this.validationResult},isValid:function(a,b){this._refreshFields();for(var c=0;c<this.fields.length;c++)if((!a||this._isFieldInGroup(this.fields[c],a))&&!1===this.fields[c].isValid(b))return!1;return!0},_isFieldInGroup:function(c,d){return b.isArray(c.options.group)?-1!==a.inArray(d,c.options.group):c.options.group===d},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var a=this;return this.fields=[],this.fieldsMappedById={},this.$element.find(this.options.inputs).each(function(){var b=new window.Parsley(this,{},a);"ParsleyField"!==b.__class__&&"ParsleyFieldMultiple"!==b.__class__||b.$element.is(b.options.excluded)||"undefined"==typeof a.fieldsMappedById[b.__class__+"-"+b.__id__]&&(a.fieldsMappedById[b.__class__+"-"+b.__id__]=b,a.fields.push(b))}),this}};var j=function(c,d,e,f,g){var h={};if(!new RegExp("ParsleyField").test(b.get(c,"__class__")))throw new Error("ParsleyField or ParsleyFieldMultiple instance expected");if("function"==typeof window.ParsleyValidator.validators[d]&&(h=window.ParsleyValidator.validators[d](e)),"Assert"!==h.__parentClass__)throw new Error("Valid validator expected");var i=function(){return"undefined"!=typeof c.options[d+"Priority"]?c.options[d+"Priority"]:b.get(h,"priority")||2};return f=f||i(),"function"==typeof h.requirementsTransformer&&(e=h.requirementsTransformer(),h=window.ParsleyValidator.validators[d](e)),a.extend(h,{name:d,requirements:e,priority:f,groups:[f],isDomConstraint:g||b.attr(c.$element,c.options.namespace,d)})},k=function(c,d,e){this.__class__="ParsleyField",this.__id__=b.hash(4),this.$element=a(c),"undefined"!=typeof e?(this.parent=e,this.OptionsFactory=this.parent.OptionsFactory,this.options=this.OptionsFactory.get(this)):(this.OptionsFactory=d,this.options=this.OptionsFactory.get(this)),this.constraints=[],this.constraintsByName={},this.validationResult=[],this._bindConstraints()};k.prototype={validate:function(b){return this.value=this.getValue(),a.emit("parsley:field:validate",this),a.emit("parsley:field:"+(this.isValid(b,this.value)?"success":"error"),this),a.emit("parsley:field:validated",this),this.validationResult},isValid:function(a,b){this.refreshConstraints();var c=this._getConstraintsSortedPriorities();if(0===c.length)return this.validationResult=[];if(("undefined"==typeof b||null===b)&&(b=this.getValue()),!b.length&&!this._isRequired()&&"undefined"==typeof this.options.validateIfEmpty&&!0!==a)return this.validationResult=[];if(!1===this.options.priorityEnabled)return!0===(this.validationResult=this.validateThroughValidator(b,this.constraints,"Any"));for(var d=0;d<c.length;d++)if(!0!==(this.validationResult=this.validateThroughValidator(b,this.constraints,c[d])))return!1;return!0},getValue:function(){var a;return a="undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof a||null===a?"":!0===this.options.trimValue?a.replace(/^\s+|\s+$/g,""):a},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(a,b,c,d){if(a=a.toLowerCase(),"function"==typeof window.ParsleyValidator.validators[a]){var e=new j(this,a,b,c,d);
|
9
|
+
"undefined"!==this.constraintsByName[e.name]&&this.removeConstraint(e.name),this.constraints.push(e),this.constraintsByName[e.name]=e}return this},removeConstraint:function(a){for(var b=0;b<this.constraints.length;b++)if(a===this.constraints[b].name){this.constraints.splice(b,1);break}return delete this.constraintsByName[a],this},updateConstraint:function(a,b,c){return this.removeConstraint(a).addConstraint(a,b,c)},_bindConstraints:function(){for(var a=[],b={},c=0;c<this.constraints.length;c++)!1===this.constraints[c].isDomConstraint&&(a.push(this.constraints[c]),b[this.constraints[c].name]=this.constraints[c]);this.constraints=a,this.constraintsByName=b;for(var d in this.options)this.addConstraint(d,this.options[d]);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){(this.$element.hasClass("required")||this.$element.attr("required"))&&this.addConstraint("required",!0,void 0,!0),"string"==typeof this.$element.attr("pattern")&&this.addConstraint("pattern",this.$element.attr("pattern"),void 0,!0),"undefined"!=typeof this.$element.attr("min")&&"undefined"!=typeof this.$element.attr("max")?this.addConstraint("range",[this.$element.attr("min"),this.$element.attr("max")],void 0,!0):"undefined"!=typeof this.$element.attr("min")?this.addConstraint("min",this.$element.attr("min"),void 0,!0):"undefined"!=typeof this.$element.attr("max")&&this.addConstraint("max",this.$element.attr("max"),void 0,!0),"undefined"!=typeof this.$element.attr("minlength")&&"undefined"!=typeof this.$element.attr("maxlength")?this.addConstraint("length",[this.$element.attr("minlength"),this.$element.attr("maxlength")],void 0,!0):"undefined"!=typeof this.$element.attr("minlength")?this.addConstraint("minlength",this.$element.attr("minlength"),void 0,!0):"undefined"!=typeof this.$element.attr("maxlength")&&this.addConstraint("maxlength",this.$element.attr("maxlength"),void 0,!0);var a=this.$element.attr("type");return"undefined"==typeof a?this:"number"===a?"undefined"==typeof this.$element.attr("step")||0===parseFloat(this.$element.attr("step"))%1?this.addConstraint("type","integer",void 0,!0):this.addConstraint("type","number",void 0,!0):new RegExp(a,"i").test("email url range")?this.addConstraint("type",a,void 0,!0):this},_isRequired:function(){return"undefined"==typeof this.constraintsByName.required?!1:!1!==this.constraintsByName.required.requirements},_getConstraintsSortedPriorities:function(){for(var a=[],b=0;b<this.constraints.length;b++)-1===a.indexOf(this.constraints[b].priority)&&a.push(this.constraints[b].priority);return a.sort(function(a,b){return b-a}),a}};var l=function(){this.__class__="ParsleyFieldMultiple"};l.prototype={addElement:function(a){return this.$elements.push(a),this},refreshConstraints:function(){var b;if(this.constraints=[],this.$element.is("select"))return this.actualizeOptions()._bindConstraints(),this;for(var c=0;c<this.$elements.length;c++)if(a("html").has(this.$elements[c]).length){b=this.$elements[c].data("ParsleyFieldMultiple").refreshConstraints().constraints;for(var d=0;d<b.length;d++)this.addConstraint(b[d].name,b[d].requirements,b[d].priority,b[d].isDomConstraint)}else this.$elements.splice(c,1);return this},getValue:function(){if("undefined"!=typeof this.options.value)return this.options.value;if(this.$element.is("input[type=radio]"))return a("["+this.options.namespace+'multiple="'+this.options.multiple+'"]:checked').val()||"";if(this.$element.is("input[type=checkbox]")){var b=[];return a("["+this.options.namespace+'multiple="'+this.options.multiple+'"]:checked').each(function(){b.push(a(this).val())}),b.length?b:[]}return this.$element.is("select")&&null===this.$element.val()?[]:this.$element.val()},_init:function(a){return this.$elements=[this.$element],this.options.multiple=a,this}};var m=a({}),n={};a.listen=function(a){if("undefined"==typeof n[a]&&(n[a]=[]),"function"==typeof arguments[1])return n[a].push({fn:arguments[1]});if("object"==typeof arguments[1]&&"function"==typeof arguments[2])return n[a].push({fn:arguments[2],ctxt:arguments[1]});throw new Error("Wrong parameters")},a.listenTo=function(a,b,c){if("undefined"==typeof n[b]&&(n[b]=[]),!(a instanceof k||a instanceof i))throw new Error("Must give Parsley instance");if("string"!=typeof b||"function"!=typeof c)throw new Error("Wrong parameters");n[b].push({instance:a,fn:c})},a.unsubscribe=function(a,b){if("undefined"!=typeof n[a]){if("string"!=typeof a||"function"!=typeof b)throw new Error("Wrong arguments");for(var c=0;c<n[a].length;c++)if(n[a][c].fn===b)return n[a].splice(c,1)}},a.unsubscribeTo=function(a,b){if("undefined"!=typeof n[b]){if(!(a instanceof k||a instanceof i))throw new Error("Must give Parsley instance");for(var c=0;c<n[b].length;c++)if("undefined"!=typeof n[b][c].instance&&n[b][c].instance.__id__===a.__id__)return n[b].splice(c,1)}},a.unsubscribeAll=function(a){"undefined"!=typeof n[a]&&delete n[a]},a.emit=function(a,b){if("undefined"!=typeof n[a])for(var c=0;c<n[a].length;c++)if("undefined"!=typeof n[a][c].instance){if(b instanceof k||b instanceof i)if(n[a][c].instance.__id__!==b.__id__){if(n[a][c].instance instanceof i&&b instanceof k)for(var d=0;d<n[a][c].instance.fields.length;d++)if(n[a][c].instance.fields[d].__id__===b.__id__){n[a][c].fn.apply(m,Array.prototype.slice.call(arguments,1));continue}}else n[a][c].fn.apply(m,Array.prototype.slice.call(arguments,1))}else n[a][c].fn.apply("undefined"!=typeof n[a][c].ctxt?n[a][c].ctxt:m,Array.prototype.slice.call(arguments,1))},a.subscribed=function(){return n},window.ParsleyConfig=window.ParsleyConfig||{},window.ParsleyConfig.i18n=window.ParsleyConfig.i18n||{},window.ParsleyConfig.i18n.en=a.extend(window.ParsleyConfig.i18n.en||{},{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),"undefined"!=typeof window.ParsleyValidator&&window.ParsleyValidator.addCatalog("en",window.ParsleyConfig.i18n.en,!0);var o=function(c,d,e){if(this.__class__="Parsley",this.__version__="2.0.6",this.__id__=b.hash(4),"undefined"==typeof c)throw new Error("You must give an element");if("undefined"!=typeof e&&"ParsleyForm"!==e.__class__)throw new Error("Parent instance must be a ParsleyForm instance");return this.init(a(c),d,e)};o.prototype={init:function(a,d,e){if(!a.length)throw new Error("You must bind Parsley on an existing element.");if(this.$element=a,this.$element.data("Parsley")){var f=this.$element.data("Parsley");return"undefined"!=typeof e&&(f.parent=e),f}return this.OptionsFactory=new h(c,b.get(window,"ParsleyConfig")||{},d,this.getNamespace(d)),this.options=this.OptionsFactory.get(this),this.$element.is("form")||b.attr(this.$element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.$element.is(this.options.inputs)&&!this.$element.is(this.options.excluded)?this.isMultiple()?this.handleMultiple(e):this.bind("parsleyField",e):this},isMultiple:function(){return this.$element.is("input[type=radio], input[type=checkbox]")&&"undefined"==typeof this.options.multiple||this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple")},handleMultiple:function(c){var d,e,f,g=this;if(this.options=a.extend(this.options,c?c.OptionsFactory.get(c):{},b.attr(this.$element,this.options.namespace)),this.options.multiple?e=this.options.multiple:"undefined"!=typeof this.$element.attr("name")&&this.$element.attr("name").length?e=d=this.$element.attr("name"):"undefined"!=typeof this.$element.attr("id")&&this.$element.attr("id").length&&(e=this.$element.attr("id")),this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple"))return this.bind("parsleyFieldMultiple",c,e||this.__id__);if("undefined"==typeof e)return window.console&&window.console.warn&&window.console.warn("To be binded by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;if(e=e.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),"undefined"!=typeof d&&a('input[name="'+d+'"]').each(function(){a(this).is("input[type=radio], input[type=checkbox]")&&a(this).attr(g.options.namespace+"multiple",e)}),a("["+this.options.namespace+"multiple="+e+"]").length)for(var h=0;h<a("["+this.options.namespace+"multiple="+e+"]").length;h++)if("undefined"!=typeof a(a("["+this.options.namespace+"multiple="+e+"]").get(h)).data("Parsley")){f=a(a("["+this.options.namespace+"multiple="+e+"]").get(h)).data("Parsley"),this.$element.data("ParsleyFieldMultiple")||(f.addElement(this.$element),this.$element.attr(this.options.namespace+"id",f.__id__));break}return this.bind("parsleyField",c,e,!0),f||this.bind("parsleyFieldMultiple",c,e)},getNamespace:function(a){return"undefined"!=typeof this.$element.data("parsleyNamespace")?this.$element.data("parsleyNamespace"):"undefined"!=typeof b.get(a,"namespace")?a.namespace:"undefined"!=typeof b.get(window,"ParsleyConfig.namespace")?window.ParsleyConfig.namespace:c.namespace},bind:function(c,e,f,g){var h;switch(c){case"parsleyForm":h=a.extend(new i(this.$element,this.OptionsFactory),new d,window.ParsleyExtend)._bindFields();break;case"parsleyField":h=a.extend(new k(this.$element,this.OptionsFactory,e),new d,window.ParsleyExtend);break;case"parsleyFieldMultiple":h=a.extend(new k(this.$element,this.OptionsFactory,e),new d,new l,window.ParsleyExtend)._init(f);break;default:throw new Error(c+"is not a supported Parsley type")}return"undefined"!=typeof f&&b.setAttr(this.$element,this.options.namespace,"multiple",f),"undefined"!=typeof g?(this.$element.data("ParsleyFieldMultiple",h),h):(new RegExp("ParsleyF","i").test(h.__class__)&&(this.$element.data("Parsley",h),a.emit("parsley:"+("parsleyForm"===c?"form":"field")+":init",h)),h)}},a.fn.parsley=a.fn.psly=function(b){if(this.length>1){var c=[];return this.each(function(){c.push(a(this).parsley(b))}),c}return a(this).length?new o(this,b):void(window.console&&window.console.warn&&window.console.warn("You must bind Parsley on an existing element."))},window.ParsleyUI="function"==typeof b.get(window,"ParsleyConfig.ParsleyUI")?(new window.ParsleyConfig.ParsleyUI).listen():(new g).listen(),"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),"undefined"==typeof window.ParsleyConfig&&(window.ParsleyConfig={}),window.Parsley=window.psly=o,window.ParsleyUtils=b,window.ParsleyValidator=new f(window.ParsleyConfig.validators,window.ParsleyConfig.i18n),!1!==b.get(window,"ParsleyConfig.autoBind")&&a(function(){a("[data-parsley-validate]").length&&a("[data-parsley-validate]").parsley()})});
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! bootstrap-progressbar v0.8.4 | Copyright (c) 2012-2014 Stephan Groß | MIT license | http://www.minddust.com */
|
2
|
+
!function(t){"use strict";var e=function(n,a){this.$element=t(n),this.options=t.extend({},e.defaults,a)};e.defaults={transition_delay:300,refresh_speed:50,display_text:"none",use_percentage:!0,percent_format:function(t){return t+"%"},amount_format:function(t,e){return t+" / "+e},update:t.noop,done:t.noop,fail:t.noop},e.prototype.transition=function(){var n=this.$element,a=n.parent(),s=this.$back_text,r=this.$front_text,i=this.options,o=parseInt(n.attr("data-transitiongoal")),h=parseInt(n.attr("aria-valuemin"))||0,d=parseInt(n.attr("aria-valuemax"))||100,f=a.hasClass("vertical"),p=i.update&&"function"==typeof i.update?i.update:e.defaults.update,u=i.done&&"function"==typeof i.done?i.done:e.defaults.done,c=i.fail&&"function"==typeof i.fail?i.fail:e.defaults.fail;if(isNaN(o))return void c("data-transitiongoal not set");var l=Math.round(100*(o-h)/(d-h));if("center"===i.display_text&&!s&&!r){this.$back_text=s=t("<span>").addClass("progressbar-back-text").prependTo(a),this.$front_text=r=t("<span>").addClass("progressbar-front-text").prependTo(n);var g;f?(g=a.css("height"),s.css({height:g,"line-height":g}),r.css({height:g,"line-height":g}),t(window).resize(function(){g=a.css("height"),s.css({height:g,"line-height":g}),r.css({height:g,"line-height":g})})):(g=a.css("width"),r.css({width:g}),t(window).resize(function(){g=a.css("width"),r.css({width:g})}))}setTimeout(function(){var t,e,c,g,_;f?n.css("height",l+"%"):n.css("width",l+"%");var x=setInterval(function(){f?(c=n.height(),g=a.height()):(c=n.width(),g=a.width()),t=Math.round(100*c/g),e=Math.round(h+c/g*(d-h)),t>=l&&(t=l,e=o,u(n),clearInterval(x)),"none"!==i.display_text&&(_=i.use_percentage?i.percent_format(t):i.amount_format(e,d,h),"fill"===i.display_text?n.text(_):"center"===i.display_text&&(s.text(_),r.text(_))),n.attr("aria-valuenow",e),p(t,n)},i.refresh_speed)},i.transition_delay)};var n=t.fn.progressbar;t.fn.progressbar=function(n){return this.each(function(){var a=t(this),s=a.data("bs.progressbar"),r="object"==typeof n&&n;s||a.data("bs.progressbar",s=new e(this,r)),s.transition()})},t.fn.progressbar.Constructor=e,t.fn.progressbar.noConflict=function(){return t.fn.progressbar=n,this}}(window.jQuery);
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(){if(window.define)var e=window.define;if(window.require)var t=window.require;if(window.jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd.define,t=jQuery.fn.select2.amd.require;var n,t,e;!function(r){function i(e,t){return _.call(e,t)}function o(e,t){var n,r,i,o,s,a,l,c,u,d,h,p=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e&&"."===e.charAt(0))if(t){for(p=p.slice(0,p.length-1),e=e.split("/"),s=e.length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),e=p.concat(e),u=0;u<e.length;u+=1)if(h=e[u],"."===h)e.splice(u,1),u-=1;else if(".."===h){if(1===u&&(".."===e[2]||".."===e[0]))break;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((p||g)&&f){for(n=e.split("/"),u=n.length;u>0;u-=1){if(r=n.slice(0,u).join("/"),p)for(d=p.length;d>0;d-=1)if(i=f[p.slice(0,d).join("/")],i&&(i=i[r])){o=i,a=u;break}if(o)break;!l&&g&&g[r]&&(l=g[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function s(e,t){return function(){return p.apply(r,$.call(arguments,0).concat([e,t]))}}function a(e){return function(t){return o(t,e)}}function l(e){return function(t){m[e]=t}}function c(e){if(i(v,e)){var t=v[e];delete v[e],w[e]=!0,h.apply(r,t)}if(!i(m,e)&&!i(w,e))throw new Error("No "+e);return m[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function d(e){return function(){return y&&y.config&&y.config[e]||{}}}var h,p,f,g,m={},v={},y={},w={},_=Object.prototype.hasOwnProperty,$=[].slice,b=/\.js$/;f=function(e,t){var n,r=u(e),i=r[0];return e=r[1],i&&(i=o(i,t),n=c(i)),i?e=n&&n.normalize?n.normalize(e,a(t)):o(e,t):(e=o(e,t),r=u(e),i=r[0],e=r[1],i&&(n=c(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},g={require:function(e){return s(e)},exports:function(e){var t=m[e];return"undefined"!=typeof t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:d(e)}}},h=function(e,t,n,o){var a,u,d,h,p,y,_=[],$=typeof n;if(o=o||e,"undefined"===$||"function"===$){for(t=!t.length&&n.length?["require","exports","module"]:t,p=0;p<t.length;p+=1)if(h=f(t[p],o),u=h.f,"require"===u)_[p]=g.require(e);else if("exports"===u)_[p]=g.exports(e),y=!0;else if("module"===u)a=_[p]=g.module(e);else if(i(m,u)||i(v,u)||i(w,u))_[p]=c(u);else{if(!h.p)throw new Error(e+" missing "+u);h.p.load(h.n,s(o,!0),l(u),{}),_[p]=m[u]}d=n?n.apply(m[e],_):void 0,e&&(a&&a.exports!==r&&a.exports!==m[e]?m[e]=a.exports:d===r&&y||(m[e]=d))}else e&&(m[e]=n)},n=t=p=function(e,t,n,i,o){if("string"==typeof e)return g[e]?g[e](t):c(f(e,t).f);if(!e.splice){if(y=e,y.deps&&p(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=r}return t=t||function(){},"function"==typeof n&&(n=i,i=o),i?h(r,e,t,n):setTimeout(function(){h(r,e,t,n)},4),p},p.config=function(e){return p(e)},n._defined=m,e=function(e,t,n){t.splice||(n=t,t=[]),i(m,e)||i(v,e)||(v[e]=[e,t,n])},e.amd={jQuery:!0}}(),e("almond",function(){}),e("jquery",[],function(){var e=jQuery||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e("select2/utils",[],function(){function e(e){var t=e.prototype,n=[];for(var r in t){var i=t[r];"function"==typeof i&&"constructor"!==r&&n.push(r)}return n}var t={};t.Extend=function(e,t){function n(){this.constructor=e}var r={}.hasOwnProperty;for(var i in t)r.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},t.Decorate=function(t,n){function r(){var e=Array.prototype.unshift,r=n.prototype.constructor.length,i=t.prototype.constructor;r>0&&(e.call(arguments,t.prototype.constructor),i=n.prototype.constructor),i.apply(this,arguments)}function i(){this.constructor=r}var o=e(n),s=e(t);n.displayName=t.displayName,r.prototype=new i;for(var a=0;a<s.length;a++){var l=s[a];r.prototype[l]=t.prototype[l]}for(var c=(function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var i=n.prototype[e];return function(){var e=Array.prototype.unshift;return e.call(arguments,t),i.apply(this,arguments)}}),u=0;u<o.length;u++){var d=o[u];r.prototype[d]=c(d)}return r};var n=function(){this.listeners={}};return n.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},n.prototype.trigger=function(e){var t=Array.prototype.slice;this.listeners=this.listeners||{},e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},n.prototype.invoke=function(e,t){for(var n=0,r=e.length;r>n;n++)e[n].apply(this,t)},t.Observable=n,t.generateChars=function(e){for(var t="",n=0;e>n;n++){var r=Math.floor(36*Math.random());t+=r.toString(36)}return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];o=o.substring(0,1).toLowerCase()+o.substring(1),o in r||(r[o]={}),i==n.length-1&&(r[o]=e[t]),r=r[o]}delete e[t]}}return e},t.hasScroll=function(e,t){var n=$(t),r=t.style.overflowX,i=t.style.overflowY;return r!==i||"hidden"!==i&&"visible"!==i?"scroll"===r||"scroll"===i?!0:n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth:!1},t}),e("select2/results",["jquery","./utils"],function(e,t){function n(e,t,r){this.$element=e,this.data=r,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){this.clear(),this.hideLoading();var n=e('<li role="treeitem" class="select2-results__option"></li>'),r=this.options.get("translations").get(t.message);n.text(r(t.args)),this.$results.append(n)},n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],i=this.option(r);t.push(i)}this.$results.append(t)},n.prototype.position=function(e,t){var n=t.find(".select2-results");n.append(e)},n.prototype.sort=function(e){var t=this.options.get("sorter");return t(e)},n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var r=e.map(n,function(e){return e.id.toString()}),i=t.$results.find(".select2-results__option[aria-selected]");i.each(function(){var t=e(this),n=e.data(this,"data");null!=n.id&&r.indexOf(n.id.toString())>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")});var o=i.filter("[aria-selected=true]");o.length>0?o.first().trigger("mouseenter"):i.first().trigger("mouseenter")})},n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},r=this.option(n);r.className+=" loading-results",this.$results.prepend(r)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var r={role:"treeitem","aria-selected":"false"};t.disabled&&(delete r["aria-selected"],r["aria-disabled"]="true"),null==t.id&&delete r["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.children&&(r.role="group",r["aria-label"]=t.text,delete r["aria-selected"]);for(var i in r){var o=r[i];n.setAttribute(i,o)}if(t.children){var s=e(n),a=document.createElement("strong");a.className="select2-results__group";{e(a)}this.template(t,a);for(var l=[],c=0;c<t.children.length;c++){var u=t.children[c],d=this.option(u);l.push(d)}var h=e("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});h.append(l),s.append(a),s.append(h)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t){var n=this,r=t.id+"-results";this.$results.attr("id",r),t.on("results:all",function(e){n.clear(),n.append(e.data),t.isOpen()&&n.setClasses()}),t.on("results:append",function(e){n.append(e.data),t.isOpen()&&n.setClasses()}),t.on("query",function(e){n.showLoading(e)}),t.on("select",function(){t.isOpen()&&n.setClasses()}),t.on("unselect",function(){t.isOpen()&&n.setClasses()}),t.on("open",function(){n.$results.attr("aria-expanded","true"),n.$results.attr("aria-hidden","false"),n.setClasses(),n.ensureHighlightVisible()}),t.on("close",function(){n.$results.attr("aria-expanded","false"),n.$results.attr("aria-hidden","true"),n.$results.removeAttr("aria-activedescendant")}),t.on("results:select",function(){var e=n.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?n.options.get("multiple")?n.trigger("unselect",{data:t}):n.trigger("close"):n.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=n.getHighlightedResults(),t=n.$results.find("[aria-selected]"),r=t.index(e);if(0!==r){var i=r-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var s=n.$results.offset().top,a=o.offset().top,l=n.$results.scrollTop()+(a-s);0===i?n.$results.scrollTop(0):0>a-s&&n.$results.scrollTop(l)}}),t.on("results:next",function(){var e=n.getHighlightedResults(),t=n.$results.find("[aria-selected]"),r=t.index(e),i=r+1;if(!(i>=t.length)){var o=t.eq(i);o.trigger("mouseenter");var s=n.$results.offset().top+n.$results.outerHeight(!1),a=o.offset().top+o.outerHeight(!1),l=n.$results.scrollTop()+a-s;0===i?n.$results.scrollTop(0):a>s&&n.$results.scrollTop(l)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){n.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=n.$results.scrollTop(),r=n.$results.get(0).scrollHeight-n.$results.scrollTop()+e.deltaY,i=e.deltaY>0&&t-e.deltaY<=0,o=e.deltaY<0&&r<=n.$results.height();i?(n.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):o&&(n.$results.scrollTop(n.$results.get(0).scrollHeight-n.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var r=e(this),i=r.data("data");return"true"===r.attr("aria-selected")?void(n.options.get("multiple")?n.trigger("unselect",{originalEvent:t,data:i}):n.trigger("close")):void n.trigger("select",{originalEvent:t,data:i})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(){var t=e(this).data("data");n.getHighlightedResults().removeClass("select2-results__option--highlighted"),n.trigger("results:focus",{data:t,element:e(this)})})},n.prototype.getHighlightedResults=function(){var e=this.$results.find(".select2-results__option--highlighted");return e},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]"),n=t.index(e),r=this.$results.offset().top,i=e.offset().top,o=this.$results.scrollTop()+(i-r),s=i-r;o-=2*e.outerHeight(!1),2>=n?this.$results.scrollTop(0):(s>this.$results.outerHeight()||0>s)&&this.$results.scrollTop(o)}},n.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=n(e);null==r?t.style.display="none":t.innerHTML=r},n}),e("select2/keys",[],function(){var e={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,isArrow:function(e){switch(e=e.which?e.which:e){case KEY.LEFT:case KEY.RIGHT:case KEY.UP:case KEY.DOWN:return!0}return!1}};return e}),e("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,t.Observable),r.prototype.render=function(){var t=e('<span class="select2-selection" tabindex="0" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false"></span>');return t.attr("title",this.$element.attr("title")),this.$selection=t,t},r.prototype.bind=function(e){var t=this,r=(e.id+"-container",e.id+"-results");this.container=e,this.$selection.attr("aria-owns",r),this.$selection.on("keydown",function(e){t.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){t.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){t.update(e.data)}),e.on("open",function(){t.$selection.attr("aria-expanded","true"),t._attachCloseHandler(e)}),e.on("close",function(){t.$selection.attr("aria-expanded","false"),t.$selection.removeAttr("aria-activedescendant"),t.$selection.focus(),t._detachCloseHandler(e)}),e.on("enable",function(){t.$selection.attr("tabindex","0")}),e.on("disable",function(){t.$selection.attr("tabindex","-1")})},r.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,function(t){var n=e(t.target),r=n.closest(".select2"),i=e(".select2.select2-container--open");i.each(function(){var t=e(this);if(this!=r[0]){var n=t.data("element");n.select2("close")}})})},r.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},r.prototype.position=function(e,t){var n=t.find(".selection");n.append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(){throw new Error("The `update` method must be defined in child classes.")},r}),e("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(e){var t=this;r.__super__.bind.apply(this,arguments);var n=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",function(e){1===e.which&&t.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(){}),this.$selection.on("blur",function(){}),e.on("selection:update",function(e){t.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e){var t=this.options.get("templateSelection");return t(e)},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0===e.length)return void this.clear();var t=e[0],n=this.display(t);this.$selection.find(".select2-selection__rendered").html(n)},r}),e("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},r.prototype.bind=function(){var t=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){t.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(n){var r=e(this),i=r.parent(),o=i.data("data");t.trigger("unselect",{originalEvent:n,data:o})})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e){var t=this.options.get("templateSelection");return t(e)},r.prototype.selectionContainer=function(){var t=e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>');return t},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=this.display(r),o=this.selectionContainer();o.append(i),o.data("data",r),t.push(o)}this.$selection.find(".select2-selection__rendered").append(t)}},r}),e("select2/selection/placeholder",["../utils"],function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id,r=t.length>1;if(r||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},e}),e("select2/selection/allowClear",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,r){var i=this;t.call(this,n,r),this.$selection.on("mousedown",".select2-selection__clear",function(t){if(!i.options.get("disabled")){t.stopPropagation();for(var n=e(this).data("data"),r=0;r<n.length;r++){var o={data:n[r]};if(i.trigger("unselect",o),o.prevented)return}i.$element.val(i.placeholder.id).trigger("change"),i.trigger("toggle")}})},t.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var r=e('<span class="select2-selection__clear">×</span>');r.data("data",n),this.$selection.find(".select2-selection__rendered").append(r)}},t}),e("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function r(e,t,n){e.call(this,t,n)}return r.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" role="textbox" /></li>');this.$searchContainer=n,this.$search=n.find("input");var r=t.call(this);return r},r.prototype.bind=function(e,t,r){var i=this;e.call(this,t,r),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus()}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("enable",function(){i.$search.prop("disabled",!1)}),t.on("disable",function(){i.$search.prop("disabled",!0)}),this.$selection.on("keydown",".select2-search--inline",function(e){e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented();var t=e.which;if(t===n.BACKSPACE&&""===i.$search.val()){var r=i.$searchContainer.prev(".select2-selection__choice");if(r.length>0){var o=r.data("data");i.searchRemoveChoice(o)}}}),this.$selection.on("keyup",".select2-search--inline",function(e){i.handleSearch(e)})},r.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},r.prototype.update=function(e,t){this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch()},r.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},r.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.trigger("open"),this.$search.val(t.text+" ")},r.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(""!==this.$search.attr("placeholder"))e=this.$selection.find(".select2-selection__rendered").innerWidth();else{var t=this.$search.val().length+1;e=.75*t+"em"}this.$search.css("width",e)},r}),e("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,r){var i=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];t.call(this,n,r),n.on("*",function(t,n){if(-1!==o.indexOf(t)){n=n||{};var r=e.Event("select2:"+t,{params:n});i.$element.trigger(r),-1!==s.indexOf(t)&&(n.prevented=r.isDefaultPrevented())}})},t}),e("select2/translation",["jquery"],function(e){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var r=t(e);n._cache[e]=r}return new n(n._cache[e])},n}),e("select2/diacritics",[],function(){var e={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return e}),e("select2/data/base",["../utils"],function(e){function t(){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var r=t.id+"-result-";return r+=e.generateChars(4),r+=null!=n.id?"-"+n.id.toString():"-"+e.generateChars(4)},t}),e("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return t.Extend(r,e),r.prototype.current=function(e){var t=[],r=this;this.$element.find(":selected").each(function(){var e=n(this),i=r.item(e);t.push(i)}),e(t)},r.prototype.select=function(e){var t=this;if(n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(n){var r=[];e=[e],e.push.apply(e,n);for(var i=0;i<e.length;i++)id=e[i].id,-1===r.indexOf(id)&&r.push(id);t.$element.val(r),t.$element.trigger("change")});else{var r=e.id;this.$element.val(r),this.$element.trigger("change")}},r.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple"))return n(e.element).is("option")?(e.element.selected=!1,void this.$element.trigger("change")):void this.current(function(n){for(var r=[],i=0;i<n.length;i++)id=n[i].id,id!==e.id&&-1===r.indexOf(id)&&r.push(id);t.$element.val(r),t.$element.trigger("change")})},r.prototype.bind=function(e){var t=this;this.container=e,e.on("select",function(e){t.select(e.data)}),e.on("unselect",function(e){t.unselect(e.data)})},r.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},r.prototype.query=function(e,t){var r=[],i=this,o=this.$element.children();o.each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var o=i.item(t),s=i.matches(e,o);null!==s&&r.push(s)}}),t({results:r})},r.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup"),t.label=e.text):(t=document.createElement("option"),t.innerText=e.text),e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0);var r=n(t),i=this._normalizeItem(e);return i.element=t,n.data(t,"data",i),r},r.prototype.item=function(e){var t={};if(t=n.data(e[0],"data"),null!=t)return t;if(e.is("option"))t={id:e.val(),text:e.html(),disabled:e.prop("disabled"),selected:e.prop("selected")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[]};for(var r=e.children("option"),i=[],o=0;o<r.length;o++){var s=n(r[o]),a=this.item(s);i.push(a)}t.children=i}return t=this._normalizeItem(t),t.element=e[0],n.data(e[0],"data",t),t},r.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e}),e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=e.id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},t,e)},r.prototype.matches=function(e,t){var n=this.options.get("matcher");return n(e,t)},r}),e("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function r(e,t){var n=t.get("data")||[];r.__super__.constructor.call(this,e,t),e.append(this.convertToOptions(n))}return t.Extend(r,e),r.prototype.select=function(e){var t=this.$element.find('option[value="'+e.id+'"]');0===t.length&&(t=this.option(e),this.$element.append(t)),r.__super__.select.call(this,e)},r.prototype.convertToOptions=function(e){function t(e){return function(){return n(this).val()==e.id}}for(var r=this,i=this.$element.find("option"),o=i.map(function(){return r.item(n(this)).id}).get(),s=[],a=0;a<e.length;a++){var l=this._normalizeItem(e[a]);if(o.indexOf(l.id)>=0){var c=i.filter(t(l)),u=this.item(c),d=(n.extend(!0,{},u,l),this.option(u));c.replaceWith(d)}else{var h=this.option(l);if(l.children){var p=this.convertToOptions(l.children);h.append(p)}s.push(h)}}return s},r}),e("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function r(t,n){this.ajaxOptions=n.get("ajax"),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),e.__super__.constructor.call(this,t,n)}return t.Extend(r,e),r.prototype.processResults=function(e){return e},r.prototype.query=function(e,t){function r(){var r=n.ajax(o);r.success(function(r){var o=i.processResults(r,e);console&&console.error&&(o&&o.results&&n.isArray(o.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(o)}),i._request=r}var i=this;
|
2
|
+
this._request&&(this._request.abort(),this._request=null);var o=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof o.url&&(o.url=o.url(e)),"function"==typeof o.data&&(o.data=o.data(e)),this.ajaxOptions.delay&&""!==e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(r,this.ajaxOptions.delay)):r()},r}),e("select2/data/tags",["jquery"],function(e){function t(t,n,r){var i=r.get("tags"),o=r.get("createTag");if(void 0!==o&&(this.createTag=o),t.call(this,n,r),e.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return t.prototype.query=function(e,t,n){function r(e,o){for(var s=e.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!r({results:l.children},!0),u=l.text===t.term;if(u||c)return o?!1:(e.data=s,void n(e))}if(o)return!0;var d=i.createTag(t);if(null!=d){var h=i.option(d);h.attr("data-select2-tag",!0),i.$element.append(h),i.insertTag(s,d)}e.results=s,n(e)}var i=this;return this._removeOldTags(),null==t.term||""===t.term||null!=t.page?void e.call(this,t,n):void e.call(this,t,r)},t.prototype.createTag=function(e,t){return{id:t.term,text:t.term}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(){var t=(this._lastTag,this.$element.find("option[data-select2-tag]"));t.each(function(){this.selected||e(this).remove()})},t}),e("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(e,t,n){function r(e){i.select(e)}var i=this;t.term=t.term||"";var o=this.tokenizer(t,this.options,r);o.term!==t.term&&(this.$search.length&&(this.$search.val(o.term),this.$search.focus()),t.term=o.term),e.call(this,t,n)},t.prototype.tokenizer=function(t,n,r,i){for(var o=r.get("tokenSeparators")||[],s=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<s.length;){var c=s[a];if(-1!==o.indexOf(c)){var u=s.substr(0,a),d=e.extend({},n,{term:u}),h=l(d);i(h),s=s.substr(a+1)||"",a=0}else a++}return{term:s}},t}),e("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{minimum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var r=this;this.current(function(i){var o=null!=i?i.length:0;return r.maximumSelectionLength>0&&o>=r.maximumSelectionLength?void r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):void e.call(r,t,n)})},e}),e("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.position=function(){},n.prototype.destroy=function(){this.$dropdown.remove()},n.prototype.bind=function(e){var t=this;e.on("select",function(e){t._onSelect(e)}),e.on("unselect",function(e){t._onUnSelect(e)})},n.prototype._onSelect=function(){this.trigger("close")},n.prototype._onUnSelect=function(){this.trigger("close")},n}),e("select2/dropdown/search",["jquery","../utils"],function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),r=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" role="textbox" /></span>');return this.$searchContainer=r,this.$search=r.find("input"),n.prepend(r),n},t.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("keyup",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.focus(),window.setTimeout(function(){r.$search.focus()},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.val("")}),t.on("results:all",function(e){if(null==e.query.term||""===e.query.term){var t=r.showSearch(e);t?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide")}})},t.prototype.handleSearch=function(){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},t.prototype.showSearch=function(){return!0},t}),e("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;r>=0;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,r){var i=this;t.call(this,n,r),n.on("query",function(e){i.lastParams=e,i.loading=!0}),n.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&t){var n=i.$results.offset().top+i.$results.outerHeight(!1),r=i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1);n+50>=r&&i.loadMore()}})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="option load-more" role="treeitem"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),e("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(e,t,n){this.$dropdownParent=n.get("dropdownParent")||document.body,e.call(this,t,n)}return n.prototype.bind=function(e,t,n){var r=this,i=!1;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),i||(i=!0,t.on("results:all",function(){r._positionDropdown(),r._resizeDropdown()}),t.on("results:append",function(){r._positionDropdown(),r._resizeDropdown()}))}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),r=t.call(this);return n.append(r),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n){var r=this,i="scroll.select2."+n.id,o="resize.select2."+n.id,s="orientationchange.select2."+n.id;$watchers=this.$container.parents().filter(t.hasScroll),$watchers.each(function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),$watchers.on(i,function(){var t=e(this).data("select2-scroll-position");e(this).scrollTop(t.y)}),e(window).on(i+" "+o+" "+s,function(){r._positionDropdown(),r._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n){var r="scroll.select2."+n.id,i="resize.select2."+n.id,o="orientationchange.select2."+n.id;$watchers=this.$container.parents().filter(t.hasScroll),$watchers.off(r),e(window).off(r+" "+i+" "+o)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),r=this.$dropdown.hasClass("select2-dropdown--below"),i=null,o=(this.$container.position(),this.$container.offset());o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<o.top-a.height,u=l.bottom>o.bottom+a.height,d={left:o.left,top:s.bottom};n||r||(i="below"),u||!c||n?!c&&u&&n&&(i="below"):i="above",("above"==i||n&&"below"!==i)&&(d.top=s.top-a.height),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){this.$dropdownContainer.width(),this.$dropdown.css({width:this.$container.outerWidth(!1)+"px"})},n.prototype._showDropdown=function(){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),e("select2/dropdown/minimumResultsForSearch",[],function(){function e(t){count=0;for(var n=0;n<t.length;n++){var r=t[n];r.children?count+=e(r.children):count++}return count}function t(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),e.call(this,t,n,r)}return t.prototype.showSearch=function(t,n){return e(n.data.results)<this.minimumResultsForSearch?!1:t.call(this,n)},t}),e("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(){r._handleSelectOnClose()})},e.prototype._handleSelectOnClose=function(){var e=this.getHighlightedResults();e.length<1||e.trigger("mouseup")},e}),e("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./i18n/en"],function(e,n,r,i,o,s,a,l,c,u,d,h,p,f,g,m,v,y,w,_,$,b,x,A,O,S,E){function C(){this.reset()}C.prototype.apply=function(d){if(d=e.extend({},this.defaults,d),null==d.dataAdapter){if(d.dataAdapter=null!=d.ajax?f:null!=d.data?p:h,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,w)),null!=d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),(null!=d.tokenSeparators||null!=d.tokenizer)&&(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null!=d.query){var E=t(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,E)}if(null!=d.initSelection){var C=t(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,C)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,x)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,b)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,S))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=_;else{var D=c.Decorate(_,$);d.dropdownAdapter=D}d.minimumResultsForSearch>0&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,O)),d.dropdownAdapter=c.Decorate(d.dropdownAdapter,A)}if(null==d.selectionAdapter&&(d.selectionAdapter=d.multiple?i:r,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,o),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s))),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),d.selectionAdapter=c.Decorate(d.selectionAdapter,l)),"string"==typeof d.language)if(d.language.indexOf("-")>0){var T=d.language.split("-"),q=T[0];d.language=[d.language,q]}else d.language=[d.language];if(e.isArray(d.language)){var j=new u;d.language.push("en");for(var L=d.language,P=0;P<L.length;P++){var I=L[P],k={};try{k=u.loadPath(I)}catch(z){try{I=this.defaults.amdLanguageBase+I,k=u.loadPath(I)}catch(H){console&&console.warn&&console.warn('Select2: The lanugage file for "'+I+'" could not be automatically loaded. A fallback will be used instead.');continue}}j.extend(k)}d.translations=j}else d.translations=new u(d.language);return d},C.prototype.reset=function(){function t(e){function t(e){return d[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(r,i){if(""===e.trim(r.term))return i;if(i.children&&i.children.length>0){for(var o=e.extend(!0,{},i),s=i.children.length-1;s>=0;s--){var a=i.children[s],l=n(r,a);null==l&&o.children.splice(s,1)}return o.children.length>0?o:n(r,o)}var c=t(i.text).toUpperCase(),u=t(r.term).toUpperCase();return c.indexOf(u)>-1?i:null}this.defaults={amdBase:"select2/",amdLanguageBase:"select2/i18n/",language:E,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},C.prototype.set=function(t,n){var r=e.camelCase(t),i={};i[r]=n;var o=c._convertData(i);e.extend(this.defaults,o)};var D=new C;return D}),e("select2/options",["jquery","./defaults","./utils"],function(e,t,n){function r(e,n){this.options=e,null!=n&&this.fromElement(n),this.options=t.apply(this.options)}return r.prototype.fromElement=function(t){var r=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(this.options.dir=t.prop("dir")?t.prop("dir"):t.closest("[dir]").prop("dir")?t.closest("[dir]").prop("dir"):"ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),t.data("select2-tags")&&(console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),t.data("data",t.data("select2-tags")),t.data("tags",!0)),t.data("ajax-url")&&(console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.data("ajax--url",t.data("ajax-url")));var i=t.data();i=n._convertData(i);for(var o in i)r.indexOf(o)>-1||(e.isPlainObject(this.options[o])?e.extend(this.options[o],i[o]):this.options[o]=i[o]);return this},r.prototype.get=function(e){return this.options[e]},r.prototype.set=function(e,t){this.options[e]=t},r}),e("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,r){var o=function(e,n){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),n=n||{},this.options=new t(n,e),o.__super__.constructor.call(this);var r=this.options.get("dataAdapter");this.data=new r(e,this.options);var i=this.render();this._placeContainer(i);var s=this.options.get("selectionAdapter");this.selection=new s(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,i);var a=this.options.get("dropdownAdapter");this.dropdown=new a(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,i);var l=this.options.get("resultsAdapter");this.results=new l(e,this.options,this.data),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var c=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.data.current(function(e){c.trigger("selection:update",{data:e})}),e.hide(),this._syncAttributes(),this._tabindex=e.attr("tabindex")||0,e.attr("tabindex","-1"),e.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t="select2-"+t},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return 0>=o?"auto":o+"px"}if("style"==t){var s=e.attr("style");if("string"!=typeof s)return null;var a=s.split(";");for(i=0,l=a.length;i<l;i+=1){attr=a[i].replace(/\s/g,"");var c=attr.match(n);if(null!==c&&c.length>=1)return c[1]}return null}return t},o.prototype._bindAdapters=function(){this.data.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.data.current(function(e){t.trigger("selection:update",{data:e})})}),this._sync=n.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=r&&(this._observer=new r(function(n){e.each(n,t._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1}))},o.prototype._registerDataEvents=function(){var e=this;this.data.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var e=this,t=["toggle"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("*",function(n,r){-1===t.indexOf(n)&&e.trigger(n,r)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("query",function(t){this.data.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.data.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===r.ENTER?(e.trigger("results:select"),t.preventDefault()):n===r.UP?(e.trigger("results:previous"),t.preventDefault()):n===r.DOWN?(e.trigger("results:next"),t.preventDefault()):(n===r.ESC||n===r.TAB)&&(e.close(),t.preventDefault()):(n===r.ENTER||n===r.SPACE||(n===r.DOWN||n===r.UP)&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable")):this.trigger("enable")},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(e in r){var i=r[e],s={prevented:!1,name:e,args:t};if(n.call(this,i,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||(this.trigger("query",{}),this.trigger("open"))},o.prototype.close=function(){this.isOpen()&&this.trigger("close")},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.enable=function(e){console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),0===e.length&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.val=function(t){if(console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer&&(this._observer.disconnect(),this._observer=null),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this._tabindex),this.$element.show(),this.$element.removeData("select2"),this.data.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.data=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},o}),function(t){"function"==typeof e&&e.amd?e("jquery.mousewheel",["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(e){function t(t){var s=t||window.event,a=l.call(arguments,1),c=0,d=0,h=0,p=0,f=0,g=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(h=-1*s.detail),"wheelDelta"in s&&(h=s.wheelDelta),"wheelDeltaY"in s&&(h=s.wheelDeltaY),"wheelDeltaX"in s&&(d=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=-1*h,h=0),c=0===h?d:h,"deltaY"in s&&(h=-1*s.deltaY,c=h),"deltaX"in s&&(d=s.deltaX,0===h&&(c=-1*d)),0!==h||0!==d){if(1===s.deltaMode){var m=e.data(this,"mousewheel-line-height");c*=m,h*=m,d*=m}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,h*=v,d*=v}if(p=Math.max(Math.abs(h),Math.abs(d)),(!o||o>p)&&(o=p,r(s,p)&&(o/=40)),r(s,p)&&(c/=40,d/=40,h/=40),c=Math[c>=1?"floor":"ceil"](c/o),d=Math[d>=1?"floor":"ceil"](d/o),h=Math[h>=1?"floor":"ceil"](h/o),u.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=t.clientX-y.left,g=t.clientY-y.top}return t.deltaX=d,t.deltaY=h,t.deltaFactor=o,t.offsetX=f,t.offsetY=g,t.deltaMode=0,a.unshift(t,c,d,h),i&&clearTimeout(i),i=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function n(){o=null}function r(e,t){return u.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var i,o,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",u.getLineHeight(this)),e.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),r=n["offsetParent"in e.fn?"offsetParent":"parent"]();return r.length||(r=e("body")),parseInt(r.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),e("select2/compat/matcher",["jquery"],function(e){function t(t){function n(n,r){var i=e.extend(!0,{},r);if(null==n.term||""===e.trim(n.term))return i;if(r.children){for(var o=r.children.length-1;o>=0;o--){var s=r.children[o],a=t(n.term,s.text,s);a||i.children.splice(o,1)}if(i.children.length>0)return i}return t(n.term,r.text,r)?i:null}return n}return t}),e("select2/compat/initSelection",["jquery"],function(e){function t(e,t,n){console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return t.prototype.current=function(t,n){var r=this;return this._isInitialized?void t.call(this,n):void this.initSelection.call(null,this.$element,function(t){r._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)})},t}),e("select2/compat/query",[],function(){function e(e,t,n){console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n;var r=this.options.get("query");r.call(null,t)},e}),e("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){var r=n.find(".dropdown-wrapper");r.append(t),t.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},e}),e("jquery.select2",["jquery","./select2/core","./select2/defaults"],function(e,n,r){try{t("jquery.mousewheel")}catch(i){}return null==e.fn.select2&&(e.fn.select2=function(t){if(t=t||{},"object"==typeof t)return this.each(function(){{var r=e.extend({},t,!0);new n(e(this),r)}}),this;if("string"==typeof t){var r=this.data("select2"),i=Array.prototype.slice.call(arguments,1);return r[t](i)}throw new Error("Invalid arguments for Select2: "+t)}),null==e.fn.select2.defaults&&(e.fn.select2.defaults=r),n}),t("jquery.select2"),jQuery.fn.select2.amd={define:e,require:t}}();
|
@@ -0,0 +1,80 @@
|
|
1
|
+
/*!
|
2
|
+
* classie - class helper functions
|
3
|
+
* from bonzo https://github.com/ded/bonzo
|
4
|
+
*
|
5
|
+
* classie.has( elem, 'my-class' ) -> true/false
|
6
|
+
* classie.add( elem, 'my-new-class' )
|
7
|
+
* classie.remove( elem, 'my-unwanted-class' )
|
8
|
+
* classie.toggle( elem, 'my-class' )
|
9
|
+
*/
|
10
|
+
|
11
|
+
/*jshint browser: true, strict: true, undef: true */
|
12
|
+
/*global define: false */
|
13
|
+
|
14
|
+
( function( window ) {
|
15
|
+
|
16
|
+
'use strict';
|
17
|
+
|
18
|
+
// class helper functions from bonzo https://github.com/ded/bonzo
|
19
|
+
|
20
|
+
function classReg( className ) {
|
21
|
+
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
|
22
|
+
}
|
23
|
+
|
24
|
+
// classList support for class management
|
25
|
+
// altho to be fair, the api sucks because it won't accept multiple classes at once
|
26
|
+
var hasClass, addClass, removeClass;
|
27
|
+
|
28
|
+
if ( 'classList' in document.documentElement ) {
|
29
|
+
hasClass = function( elem, c ) {
|
30
|
+
return elem.classList.contains( c );
|
31
|
+
};
|
32
|
+
addClass = function( elem, c ) {
|
33
|
+
elem.classList.add( c );
|
34
|
+
};
|
35
|
+
removeClass = function( elem, c ) {
|
36
|
+
elem.classList.remove( c );
|
37
|
+
};
|
38
|
+
}
|
39
|
+
else {
|
40
|
+
hasClass = function( elem, c ) {
|
41
|
+
return classReg( c ).test( elem.className );
|
42
|
+
};
|
43
|
+
addClass = function( elem, c ) {
|
44
|
+
if ( !hasClass( elem, c ) ) {
|
45
|
+
elem.className = elem.className + ' ' + c;
|
46
|
+
}
|
47
|
+
};
|
48
|
+
removeClass = function( elem, c ) {
|
49
|
+
elem.className = elem.className.replace( classReg( c ), ' ' );
|
50
|
+
};
|
51
|
+
}
|
52
|
+
|
53
|
+
function toggleClass( elem, c ) {
|
54
|
+
var fn = hasClass( elem, c ) ? removeClass : addClass;
|
55
|
+
fn( elem, c );
|
56
|
+
}
|
57
|
+
|
58
|
+
var classie = {
|
59
|
+
// full names
|
60
|
+
hasClass: hasClass,
|
61
|
+
addClass: addClass,
|
62
|
+
removeClass: removeClass,
|
63
|
+
toggleClass: toggleClass,
|
64
|
+
// short names
|
65
|
+
has: hasClass,
|
66
|
+
add: addClass,
|
67
|
+
remove: removeClass,
|
68
|
+
toggle: toggleClass
|
69
|
+
};
|
70
|
+
|
71
|
+
// transport
|
72
|
+
if ( typeof define === 'function' && define.amd ) {
|
73
|
+
// AMD
|
74
|
+
define( classie );
|
75
|
+
} else {
|
76
|
+
// browser global
|
77
|
+
window.classie = classie;
|
78
|
+
}
|
79
|
+
|
80
|
+
})( window );
|
@@ -0,0 +1,569 @@
|
|
1
|
+
*,
|
2
|
+
*:after,
|
3
|
+
*::before {
|
4
|
+
-moz-box-sizing: border-box;
|
5
|
+
box-sizing: border-box;
|
6
|
+
}
|
7
|
+
|
8
|
+
html,
|
9
|
+
body,
|
10
|
+
.st-container,
|
11
|
+
.st-pusher,
|
12
|
+
.st-content {
|
13
|
+
height: 100%;
|
14
|
+
}
|
15
|
+
|
16
|
+
.st-content {
|
17
|
+
overflow-y: scroll;
|
18
|
+
background: #f3efe0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.st-content,
|
22
|
+
.st-content-inner {
|
23
|
+
position: relative;
|
24
|
+
}
|
25
|
+
|
26
|
+
.st-container {
|
27
|
+
position: relative;
|
28
|
+
overflow: hidden;
|
29
|
+
}
|
30
|
+
|
31
|
+
.st-pusher {
|
32
|
+
position: relative;
|
33
|
+
left: 0;
|
34
|
+
z-index: 99;
|
35
|
+
height: 100%;
|
36
|
+
-webkit-transition: -webkit-transform 0.5s;
|
37
|
+
transition: transform 0.5s;
|
38
|
+
}
|
39
|
+
|
40
|
+
.st-pusher::after {
|
41
|
+
position: absolute;
|
42
|
+
top: 0;
|
43
|
+
right: 0;
|
44
|
+
width: 0;
|
45
|
+
height: 0;
|
46
|
+
background: rgba(0,0,0,0.2);
|
47
|
+
content: '';
|
48
|
+
opacity: 0;
|
49
|
+
-webkit-transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s;
|
50
|
+
transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s;
|
51
|
+
}
|
52
|
+
|
53
|
+
.st-menu-open .st-pusher::after {
|
54
|
+
width: 100%;
|
55
|
+
height: 100%;
|
56
|
+
opacity: 1;
|
57
|
+
-webkit-transition: opacity 0.5s;
|
58
|
+
transition: opacity 0.5s;
|
59
|
+
}
|
60
|
+
|
61
|
+
.st-menu {
|
62
|
+
position: absolute;
|
63
|
+
top: 0;
|
64
|
+
left: 0;
|
65
|
+
z-index: 100;
|
66
|
+
visibility: hidden;
|
67
|
+
width: 300px;
|
68
|
+
height: 100%;
|
69
|
+
background: #48a770;
|
70
|
+
-webkit-transition: all 0.5s;
|
71
|
+
transition: all 0.5s;
|
72
|
+
}
|
73
|
+
|
74
|
+
.st-menu::after {
|
75
|
+
position: absolute;
|
76
|
+
top: 0;
|
77
|
+
right: 0;
|
78
|
+
width: 100%;
|
79
|
+
height: 100%;
|
80
|
+
background: rgba(0,0,0,0.2);
|
81
|
+
content: '';
|
82
|
+
opacity: 1;
|
83
|
+
-webkit-transition: opacity 0.5s;
|
84
|
+
transition: opacity 0.5s;
|
85
|
+
}
|
86
|
+
|
87
|
+
.st-menu-open .st-menu::after {
|
88
|
+
width: 0;
|
89
|
+
height: 0;
|
90
|
+
opacity: 0;
|
91
|
+
-webkit-transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s;
|
92
|
+
transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s;
|
93
|
+
}
|
94
|
+
|
95
|
+
/* content style */
|
96
|
+
|
97
|
+
.st-menu ul {
|
98
|
+
margin: 0;
|
99
|
+
padding: 0;
|
100
|
+
list-style: none;
|
101
|
+
}
|
102
|
+
|
103
|
+
.st-menu h2 {
|
104
|
+
margin: 0;
|
105
|
+
padding: 1em;
|
106
|
+
color: rgba(0,0,0,0.4);
|
107
|
+
text-shadow: 0 0 1px rgba(0,0,0,0.1);
|
108
|
+
font-weight: 300;
|
109
|
+
font-size: 2em;
|
110
|
+
}
|
111
|
+
|
112
|
+
.st-menu ul li a {
|
113
|
+
display: block;
|
114
|
+
padding: 1em 1em 1em 1.2em;
|
115
|
+
outline: none;
|
116
|
+
box-shadow: inset 0 -1px rgba(0,0,0,0.2);
|
117
|
+
color: #f3efe0;
|
118
|
+
text-transform: uppercase;
|
119
|
+
text-shadow: 0 0 1px rgba(255,255,255,0.1);
|
120
|
+
letter-spacing: 1px;
|
121
|
+
font-weight: 400;
|
122
|
+
-webkit-transition: background 0.3s, box-shadow 0.3s;
|
123
|
+
transition: background 0.3s, box-shadow 0.3s;
|
124
|
+
}
|
125
|
+
|
126
|
+
.st-menu ul li:first-child a {
|
127
|
+
box-shadow: inset 0 -1px rgba(0,0,0,0.2), inset 0 1px rgba(0,0,0,0.2);
|
128
|
+
}
|
129
|
+
|
130
|
+
.st-menu ul li a:hover {
|
131
|
+
background: rgba(0,0,0,0.2);
|
132
|
+
box-shadow: inset 0 -1px rgba(0,0,0,0);
|
133
|
+
color: #fff;
|
134
|
+
}
|
135
|
+
|
136
|
+
/* Individual effects */
|
137
|
+
|
138
|
+
/* Effect 1: Slide in on top */
|
139
|
+
.st-effect-1.st-menu {
|
140
|
+
visibility: visible;
|
141
|
+
-webkit-transform: translate3d(-100%, 0, 0);
|
142
|
+
transform: translate3d(-100%, 0, 0);
|
143
|
+
}
|
144
|
+
|
145
|
+
.st-effect-1.st-menu-open .st-effect-1.st-menu {
|
146
|
+
visibility: visible;
|
147
|
+
-webkit-transform: translate3d(0, 0, 0);
|
148
|
+
transform: translate3d(0, 0, 0);
|
149
|
+
}
|
150
|
+
|
151
|
+
.st-effect-1.st-menu::after {
|
152
|
+
display: none;
|
153
|
+
}
|
154
|
+
|
155
|
+
/* Effect 2: Reveal */
|
156
|
+
.st-effect-2.st-menu-open .st-pusher {
|
157
|
+
-webkit-transform: translate3d(300px, 0, 0);
|
158
|
+
transform: translate3d(300px, 0, 0);
|
159
|
+
}
|
160
|
+
|
161
|
+
.st-effect-2.st-menu {
|
162
|
+
z-index: 1;
|
163
|
+
}
|
164
|
+
|
165
|
+
.st-effect-2.st-menu-open .st-effect-2.st-menu {
|
166
|
+
visibility: visible;
|
167
|
+
-webkit-transition: -webkit-transform 0.5s;
|
168
|
+
transition: transform 0.5s;
|
169
|
+
}
|
170
|
+
|
171
|
+
.st-effect-2.st-menu::after {
|
172
|
+
display: none;
|
173
|
+
}
|
174
|
+
|
175
|
+
/* Effect 3: Push*/
|
176
|
+
.st-effect-3.st-menu-open .st-pusher {
|
177
|
+
-webkit-transform: translate3d(300px, 0, 0);
|
178
|
+
transform: translate3d(300px, 0, 0);
|
179
|
+
}
|
180
|
+
|
181
|
+
.st-effect-3.st-menu {
|
182
|
+
-webkit-transform: translate3d(-100%, 0, 0);
|
183
|
+
transform: translate3d(-100%, 0, 0);
|
184
|
+
}
|
185
|
+
|
186
|
+
.st-effect-3.st-menu-open .st-effect-3.st-menu {
|
187
|
+
visibility: visible;
|
188
|
+
-webkit-transition: -webkit-transform 0.5s;
|
189
|
+
transition: transform 0.5s;
|
190
|
+
}
|
191
|
+
|
192
|
+
.st-effect-3.st-menu::after {
|
193
|
+
display: none;
|
194
|
+
}
|
195
|
+
|
196
|
+
/* Effect 4: Slide along */
|
197
|
+
.st-effect-4.st-menu-open .st-pusher {
|
198
|
+
-webkit-transform: translate3d(300px, 0, 0);
|
199
|
+
transform: translate3d(300px, 0, 0);
|
200
|
+
}
|
201
|
+
|
202
|
+
.st-effect-4.st-menu {
|
203
|
+
z-index: 1;
|
204
|
+
-webkit-transform: translate3d(-50%, 0, 0);
|
205
|
+
transform: translate3d(-50%, 0, 0);
|
206
|
+
}
|
207
|
+
|
208
|
+
.st-effect-4.st-menu-open .st-effect-4.st-menu {
|
209
|
+
visibility: visible;
|
210
|
+
-webkit-transition: -webkit-transform 0.5s;
|
211
|
+
transition: transform 0.5s;
|
212
|
+
-webkit-transform: translate3d(0, 0, 0);
|
213
|
+
transform: translate3d(0, 0, 0);
|
214
|
+
}
|
215
|
+
|
216
|
+
.st-effect-4.st-menu::after {
|
217
|
+
display: none;
|
218
|
+
}
|
219
|
+
|
220
|
+
/* Effect 5: Reverse slide out */
|
221
|
+
.st-effect-5.st-menu-open .st-pusher {
|
222
|
+
-webkit-transform: translate3d(300px, 0, 0);
|
223
|
+
transform: translate3d(300px, 0, 0);
|
224
|
+
}
|
225
|
+
|
226
|
+
.st-effect-5.st-menu {
|
227
|
+
z-index: 1;
|
228
|
+
-webkit-transform: translate3d(50%, 0, 0);
|
229
|
+
transform: translate3d(50%, 0, 0);
|
230
|
+
}
|
231
|
+
|
232
|
+
.st-effect-5.st-menu-open .st-effect-5.st-menu {
|
233
|
+
visibility: visible;
|
234
|
+
-webkit-transition: -webkit-transform 0.5s;
|
235
|
+
transition: transform 0.5s;
|
236
|
+
-webkit-transform: translate3d(0, 0, 0);
|
237
|
+
transform: translate3d(0, 0, 0);
|
238
|
+
}
|
239
|
+
|
240
|
+
/* Effect 6: Rotate pusher */
|
241
|
+
|
242
|
+
.st-effect-6.st-container {
|
243
|
+
-webkit-perspective: 1500px;
|
244
|
+
perspective: 1500px;
|
245
|
+
}
|
246
|
+
|
247
|
+
.st-effect-6 .st-pusher {
|
248
|
+
-webkit-transform-origin: 0% 50%;
|
249
|
+
transform-origin: 0% 50%;
|
250
|
+
-webkit-transform-style: preserve-3d;
|
251
|
+
transform-style: preserve-3d;
|
252
|
+
}
|
253
|
+
|
254
|
+
.st-effect-6.st-menu-open .st-pusher {
|
255
|
+
-webkit-transform: translate3d(300px, 0, 0) rotateY(-15deg);
|
256
|
+
transform: translate3d(300px, 0, 0) rotateY(-15deg);
|
257
|
+
}
|
258
|
+
|
259
|
+
.st-effect-6.st-menu {
|
260
|
+
-webkit-transform: translate3d(-100%, 0, 0);
|
261
|
+
transform: translate3d(-100%, 0, 0);
|
262
|
+
-webkit-transform-origin: 100% 50%;
|
263
|
+
transform-origin: 100% 50%;
|
264
|
+
-webkit-transform-style: preserve-3d;
|
265
|
+
transform-style: preserve-3d;
|
266
|
+
}
|
267
|
+
|
268
|
+
.st-effect-6.st-menu-open .st-effect-6.st-menu {
|
269
|
+
visibility: visible;
|
270
|
+
-webkit-transition: -webkit-transform 0.5s;
|
271
|
+
transition: transform 0.5s;
|
272
|
+
-webkit-transform: translate3d(-100%, 0, 0) rotateY(15deg);
|
273
|
+
transform: translate3d(-100%, 0, 0) rotateY(15deg);
|
274
|
+
}
|
275
|
+
|
276
|
+
.st-effect-6.st-menu::after {
|
277
|
+
display: none;
|
278
|
+
}
|
279
|
+
|
280
|
+
/* Effect 7: 3D rotate in */
|
281
|
+
|
282
|
+
.st-effect-7.st-container {
|
283
|
+
-webkit-perspective: 1500px;
|
284
|
+
perspective: 1500px;
|
285
|
+
-webkit-perspective-origin: 0% 50%;
|
286
|
+
perspective-origin: 0% 50%;
|
287
|
+
}
|
288
|
+
|
289
|
+
.st-effect-7 .st-pusher {
|
290
|
+
-webkit-transform-style: preserve-3d;
|
291
|
+
transform-style: preserve-3d;
|
292
|
+
}
|
293
|
+
|
294
|
+
.st-effect-7.st-menu-open .st-pusher {
|
295
|
+
-webkit-transform: translate3d(300px, 0, 0);
|
296
|
+
transform: translate3d(300px, 0, 0);
|
297
|
+
}
|
298
|
+
|
299
|
+
.st-effect-7.st-menu {
|
300
|
+
-webkit-transform: translate3d(-100%, 0, 0) rotateY(-90deg);
|
301
|
+
transform: translate3d(-100%, 0, 0) rotateY(-90deg);
|
302
|
+
-webkit-transform-origin: 100% 50%;
|
303
|
+
transform-origin: 100% 50%;
|
304
|
+
-webkit-transform-style: preserve-3d;
|
305
|
+
transform-style: preserve-3d;
|
306
|
+
}
|
307
|
+
|
308
|
+
.st-effect-7.st-menu-open .st-effect-7.st-menu {
|
309
|
+
visibility: visible;
|
310
|
+
-webkit-transition: -webkit-transform 0.5s;
|
311
|
+
transition: transform 0.5s;
|
312
|
+
-webkit-transform: translate3d(-100%, 0, 0) rotateY(0deg);
|
313
|
+
transform: translate3d(-100%, 0, 0) rotateY(0deg);
|
314
|
+
}
|
315
|
+
|
316
|
+
/* Effect 8: 3D rotate out */
|
317
|
+
|
318
|
+
.st-effect-8.st-container {
|
319
|
+
-webkit-perspective: 1500px;
|
320
|
+
perspective: 1500px;
|
321
|
+
-webkit-perspective-origin: 0% 50%;
|
322
|
+
perspective-origin: 0% 50%;
|
323
|
+
}
|
324
|
+
|
325
|
+
.st-effect-8 .st-pusher {
|
326
|
+
-webkit-transform-style: preserve-3d;
|
327
|
+
transform-style: preserve-3d;
|
328
|
+
}
|
329
|
+
|
330
|
+
.st-effect-8.st-menu-open .st-pusher {
|
331
|
+
-webkit-transform: translate3d(300px, 0, 0);
|
332
|
+
transform: translate3d(300px, 0, 0);
|
333
|
+
}
|
334
|
+
|
335
|
+
.st-effect-8.st-menu {
|
336
|
+
-webkit-transform: translate3d(-100%, 0, 0) rotateY(90deg);
|
337
|
+
transform: translate3d(-100%, 0, 0) rotateY(90deg);
|
338
|
+
-webkit-transform-origin: 100% 50%;
|
339
|
+
transform-origin: 100% 50%;
|
340
|
+
-webkit-transform-style: preserve-3d;
|
341
|
+
transform-style: preserve-3d;
|
342
|
+
}
|
343
|
+
|
344
|
+
.st-effect-8.st-menu-open .st-effect-8.st-menu {
|
345
|
+
visibility: visible;
|
346
|
+
-webkit-transition: -webkit-transform 0.5s;
|
347
|
+
transition: transform 0.5s;
|
348
|
+
-webkit-transform: translate3d(-100%, 0, 0) rotateY(0deg);
|
349
|
+
transform: translate3d(-100%, 0, 0) rotateY(0deg);
|
350
|
+
}
|
351
|
+
|
352
|
+
.st-effect-8.st-menu::after {
|
353
|
+
display: none;
|
354
|
+
}
|
355
|
+
|
356
|
+
/* Effect 9: Scale down pusher */
|
357
|
+
|
358
|
+
.st-effect-9.st-container {
|
359
|
+
-webkit-perspective: 1500px;
|
360
|
+
perspective: 1500px;
|
361
|
+
}
|
362
|
+
|
363
|
+
.st-effect-9 .st-pusher {
|
364
|
+
-webkit-transform-style: preserve-3d;
|
365
|
+
transform-style: preserve-3d;
|
366
|
+
}
|
367
|
+
|
368
|
+
.st-effect-9.st-menu-open .st-pusher {
|
369
|
+
-webkit-transform: translate3d(0, 0, -300px);
|
370
|
+
transform: translate3d(0, 0, -300px);
|
371
|
+
}
|
372
|
+
|
373
|
+
.st-effect-9.st-menu {
|
374
|
+
opacity: 1;
|
375
|
+
-webkit-transform: translate3d(-100%, 0, 0);
|
376
|
+
transform: translate3d(-100%, 0, 0);
|
377
|
+
}
|
378
|
+
|
379
|
+
.st-effect-9.st-menu-open .st-effect-9.st-menu {
|
380
|
+
visibility: visible;
|
381
|
+
-webkit-transition: -webkit-transform 0.5s;
|
382
|
+
transition: transform 0.5s;
|
383
|
+
-webkit-transform: translate3d(0, 0, 0);
|
384
|
+
transform: translate3d(0, 0, 0);
|
385
|
+
}
|
386
|
+
|
387
|
+
.st-effect-9.st-menu::after {
|
388
|
+
display: none;
|
389
|
+
}
|
390
|
+
|
391
|
+
/* Effect 10: Scale up */
|
392
|
+
|
393
|
+
.st-effect-10.st-container {
|
394
|
+
-webkit-perspective: 1500px;
|
395
|
+
perspective: 1500px;
|
396
|
+
-webkit-perspective-origin: 0% 50%;
|
397
|
+
perspective-origin: 0% 50%;
|
398
|
+
}
|
399
|
+
|
400
|
+
.st-effect-10.st-menu-open .st-pusher {
|
401
|
+
-webkit-transform: translate3d(300px, 0, 0);
|
402
|
+
transform: translate3d(300px, 0, 0);
|
403
|
+
}
|
404
|
+
|
405
|
+
.st-effect-10.st-menu {
|
406
|
+
z-index: 1;
|
407
|
+
opacity: 1;
|
408
|
+
-webkit-transform: translate3d(0, 0, -300px);
|
409
|
+
transform: translate3d(0, 0, -300px);
|
410
|
+
}
|
411
|
+
|
412
|
+
.st-effect-10.st-menu-open .st-effect-10.st-menu {
|
413
|
+
visibility: visible;
|
414
|
+
-webkit-transition: -webkit-transform 0.5s;
|
415
|
+
transition: transform 0.5s;
|
416
|
+
-webkit-transform: translate3d(0, 0, 0);
|
417
|
+
transform: translate3d(0, 0, 0);
|
418
|
+
}
|
419
|
+
|
420
|
+
/* Effect 11: Scale and rotate pusher */
|
421
|
+
|
422
|
+
.st-effect-11.st-container {
|
423
|
+
-webkit-perspective: 1500px;
|
424
|
+
perspective: 1500px;
|
425
|
+
}
|
426
|
+
|
427
|
+
.st-effect-11 .st-pusher {
|
428
|
+
-webkit-transform-style: preserve-3d;
|
429
|
+
transform-style: preserve-3d;
|
430
|
+
}
|
431
|
+
|
432
|
+
.st-effect-11.st-menu-open .st-pusher {
|
433
|
+
-webkit-transform: translate3d(100px, 0, -600px) rotateY(-20deg);
|
434
|
+
transform: translate3d(100px, 0, -600px) rotateY(-20deg);
|
435
|
+
}
|
436
|
+
|
437
|
+
.st-effect-11.st-menu {
|
438
|
+
opacity: 1;
|
439
|
+
-webkit-transform: translate3d(-100%, 0, 0);
|
440
|
+
transform: translate3d(-100%, 0, 0);
|
441
|
+
}
|
442
|
+
|
443
|
+
.st-effect-11.st-menu-open .st-effect-11.st-menu {
|
444
|
+
visibility: visible;
|
445
|
+
-webkit-transition: -webkit-transform 0.5s;
|
446
|
+
transition: transform 0.5s;
|
447
|
+
-webkit-transform: translate3d(0, 0, 0);
|
448
|
+
transform: translate3d(0, 0, 0);
|
449
|
+
}
|
450
|
+
|
451
|
+
.st-effect-11.st-menu::after {
|
452
|
+
display: none;
|
453
|
+
}
|
454
|
+
|
455
|
+
/* Effect 12: Open door */
|
456
|
+
|
457
|
+
.st-effect-12.st-container {
|
458
|
+
-webkit-perspective: 1500px;
|
459
|
+
perspective: 1500px;
|
460
|
+
}
|
461
|
+
|
462
|
+
.st-effect-12 .st-pusher {
|
463
|
+
-webkit-transform-origin: 100% 50%;
|
464
|
+
transform-origin: 100% 50%;
|
465
|
+
-webkit-transform-style: preserve-3d;
|
466
|
+
transform-style: preserve-3d;
|
467
|
+
}
|
468
|
+
|
469
|
+
.st-effect-12.st-menu-open .st-pusher {
|
470
|
+
-webkit-transform: rotateY(-10deg);
|
471
|
+
transform: rotateY(-10deg);
|
472
|
+
}
|
473
|
+
|
474
|
+
.st-effect-12.st-menu {
|
475
|
+
opacity: 1;
|
476
|
+
-webkit-transform: translate3d(-100%, 0, 0);
|
477
|
+
transform: translate3d(-100%, 0, 0);
|
478
|
+
}
|
479
|
+
|
480
|
+
.st-effect-12.st-menu-open .st-effect-12.st-menu {
|
481
|
+
visibility: visible;
|
482
|
+
-webkit-transition: -webkit-transform 0.5s;
|
483
|
+
transition: transform 0.5s;
|
484
|
+
-webkit-transform: translate3d(0, 0, 0);
|
485
|
+
transform: translate3d(0, 0, 0);
|
486
|
+
}
|
487
|
+
|
488
|
+
.st-effect-12.st-menu::after {
|
489
|
+
display: none;
|
490
|
+
}
|
491
|
+
|
492
|
+
/* Effect 13: Fall down */
|
493
|
+
|
494
|
+
.st-effect-13.st-container {
|
495
|
+
-webkit-perspective: 1500px;
|
496
|
+
perspective: 1500px;
|
497
|
+
-webkit-perspective-origin: 0% 50%;
|
498
|
+
perspective-origin: 0% 50%;
|
499
|
+
}
|
500
|
+
|
501
|
+
.st-effect-13.st-menu-open .st-pusher {
|
502
|
+
-webkit-transform: translate3d(300px, 0, 0);
|
503
|
+
transform: translate3d(300px, 0, 0);
|
504
|
+
}
|
505
|
+
|
506
|
+
.st-effect-13.st-menu {
|
507
|
+
z-index: 1;
|
508
|
+
opacity: 1;
|
509
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
510
|
+
transform: translate3d(0, -100%, 0);
|
511
|
+
}
|
512
|
+
|
513
|
+
.st-effect-13.st-menu-open .st-effect-13.st-menu {
|
514
|
+
visibility: visible;
|
515
|
+
-webkit-transition-timing-function: ease-in-out;
|
516
|
+
transition-timing-function: ease-in-out;
|
517
|
+
-webkit-transition-property: -webkit-transform;
|
518
|
+
transition-property: transform;
|
519
|
+
-webkit-transform: translate3d(0, 0, 0);
|
520
|
+
transform: translate3d(0, 0, 0);
|
521
|
+
-webkit-transition-speed: 0.2s;
|
522
|
+
transition-speed: 0.2s;
|
523
|
+
}
|
524
|
+
|
525
|
+
/* Effect 14: Delayed 3D rotate */
|
526
|
+
|
527
|
+
.st-effect-14.st-container {
|
528
|
+
-webkit-perspective: 1500px;
|
529
|
+
perspective: 1500px;
|
530
|
+
-webkit-perspective-origin: 0% 50%;
|
531
|
+
perspective-origin: 0% 50%;
|
532
|
+
}
|
533
|
+
|
534
|
+
.st-effect-14 .st-pusher {
|
535
|
+
-webkit-transform-style: preserve-3d;
|
536
|
+
transform-style: preserve-3d;
|
537
|
+
}
|
538
|
+
|
539
|
+
.st-effect-14.st-menu-open .st-pusher {
|
540
|
+
-webkit-transform: translate3d(300px, 0, 0);
|
541
|
+
transform: translate3d(300px, 0, 0);
|
542
|
+
}
|
543
|
+
|
544
|
+
.st-effect-14.st-menu {
|
545
|
+
-webkit-transform: translate3d(-100%, 0, 0) rotateY(90deg);
|
546
|
+
transform: translate3d(-100%, 0, 0) rotateY(90deg);
|
547
|
+
-webkit-transform-origin: 0% 50%;
|
548
|
+
transform-origin: 0% 50%;
|
549
|
+
-webkit-transform-style: preserve-3d;
|
550
|
+
transform-style: preserve-3d;
|
551
|
+
}
|
552
|
+
|
553
|
+
.st-effect-14.st-menu-open .st-effect-14.st-menu {
|
554
|
+
visibility: visible;
|
555
|
+
-webkit-transition-delay: 0.1s;
|
556
|
+
transition-delay: 0.1s;
|
557
|
+
-webkit-transition-timing-function: ease-in-out;
|
558
|
+
transition-timing-function: ease-in-out;
|
559
|
+
-webkit-transition-property: -webkit-transform;
|
560
|
+
transition-property: transform;
|
561
|
+
-webkit-transform: translate3d(-100%, 0, 0) rotateY(0deg);
|
562
|
+
transform: translate3d(-100%, 0, 0) rotateY(0deg);
|
563
|
+
}
|
564
|
+
|
565
|
+
/* Fallback example for browsers that don't support 3D transforms (and no JS fallback) */
|
566
|
+
.no-csstransforms3d .st-pusher,
|
567
|
+
.no-js .st-pusher {
|
568
|
+
padding-left: 300px;
|
569
|
+
}
|